text
stringlengths
2
99.9k
meta
dict
/* Copyright 2009, 2015 Red Hat, Inc. * * Portions adapted from Mx's data/style/default.css * Copyright 2009 Intel Corporation * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for * more details. * * You should have received a copy of the GNU Lesser 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. */ stage { font-family: Futura Bk bt, Cantarell, Sans-Serif; font-size: 9pt; color: #D3DAE3; } .app-well-menu, .run-dialog-error-label, .dash-label, .window-caption, .switcher-list, .app-well-app > .overview-icon, .grid-search-result .overview-icon { font-size: 1em; font-weight: normal; } .app-well-app.running > .overview-icon, .app-well-app.running:hover > .overview-icon, .app-well-app.running:active > .overview-icon, .app-well-app.running:checked > .overview-icon { background-color: transparent !important; background-gradient-direction: none !important; border: none !important; border-radius: 0 !important; } .popup-menu .modal-dialog-button { font-size: 1em; min-height: 20px; padding: 5px 32px; transition-duration: 0; border-radius: 2px; background-gradient-direction: none !important; text-shadow: 0 1px rgba(64, 69, 82, 0); color: #D3DAE3; background-color: #444a58; border: 1px solid #2b2e39; box-shadow: inset 0 2px 4px rgba(68, 74, 88, 0.05); } .popup-menu .modal-dialog-button:focus { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #D3DAE3; background-color: #444a58; border: 1px solid #5294e2; box-shadow: inset 0 2px 4px rgba(68, 74, 88, 0.05); } .popup-menu .modal-dialog-button:hover { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #D3DAE3; background-color: #505666; border: 1px solid #2b2e39; box-shadow: inset 0 2px 4px rgba(80, 86, 102, 0.05); } .popup-menu .modal-dialog-button:hover:focus { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #D3DAE3; background-color: #444a58; border: 1px solid #5294e2; box-shadow: inset 0 2px 4px rgba(68, 74, 88, 0.05); } .popup-menu .modal-dialog-button:active, .popup-menu .modal-dialog-button:active:focus { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #ffffff; background-color: #5294e2; border: 1px solid #5294e2; box-shadow: inset 0 1px rgba(82, 148, 226, 0.05); } .popup-menu .modal-dialog-button:insensitive { text-shadow: 0 1px rgba(64, 69, 82, 0); color: rgba(211, 218, 227, 0.45); border: 1px solid rgba(43, 46, 57, 0.55); background-color: rgba(68, 74, 88, 0.55); box-shadow: inset 0 2px 4px rgba(68, 74, 88, 0.05); } .candidate-page-button, .hotplug-notification-item, .hotplug-resident-eject-button, .modal-dialog-button { background-gradient-direction: none !important; } .candidate-page-button, .hotplug-notification-item, .hotplug-resident-eject-button, .modal-dialog-button, .modal-dialog-button-box .button, .notification-button, .notification-icon-button, .hotplug-resident-mount { font-size: 1em; min-height: 20px; padding: 5px 32px; transition-duration: 0; border-radius: 2px; text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(102, 109, 132, 0.35); } .candidate-page-button:hover, .hotplug-notification-item:hover, .hotplug-resident-eject-button:hover, .modal-dialog-button:hover, .modal-dialog-button-box .button:hover, .notification-button:hover, .notification-icon-button:hover, .hotplug-resident-mount:hover { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(119, 127, 151, 0.45); } .candidate-page-button:focus, .hotplug-notification-item:focus, .hotplug-resident-eject-button:focus, .modal-dialog-button:focus, .modal-dialog-button-box .button:focus, .notification-button:focus, .notification-icon-button:focus, .hotplug-resident-mount:focus { color: #5294e2; } .candidate-page-button:active, .hotplug-notification-item:active, .hotplug-resident-eject-button:active, .modal-dialog-button:active, .modal-dialog-button-box .button:active, .notification-button:active, .notification-icon-button:active, .hotplug-resident-mount:active { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #ffffff; border: 1px solid #5294e2; background-color: #5294e2; } .candidate-page-button:insensitive, .hotplug-notification-item:insensitive, .hotplug-resident-eject-button:insensitive, .modal-dialog-button:insensitive, .modal-dialog-button-box .button:insensitive, .notification-button:insensitive, .notification-icon-button:insensitive, .hotplug-resident-mount:insensitive { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #5d626e; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(102, 109, 132, 0.2); } StEntry { font-size: 1em; padding: 7px; caret-size: 1px; selection-background-color: #5294e2; selected-color: #ffffff; transition-duration: 300ms; border-radius: 3px; background-gradient-direction: none !important; color: #D3DAE3; background-color: #404552; border: 1px solid #2b2e39; box-shadow: inset 0 2px 4px rgba(64, 69, 82, 0.05); } StEntry:focus, StEntry:hover { color: #D3DAE3; background-color: #404552; border: 1px solid #5294e2; box-shadow: inset 0 2px 4px rgba(64, 69, 82, 0.05); } StEntry:insensitive { color: rgba(211, 218, 227, 0.45); background-color: #3c414e; border-color: 1px solid #313440; box-shadow: inset 0 2px 4px rgba(60, 65, 78, 0.05); } StEntry StIcon.capslock-warning { icon-size: 16px; warning-color: #F27835; padding: 0 4px; } StScrollView.vfade { -st-vfade-offset: 0px; } StScrollView.hfade { -st-hfade-offset: 0px; } StScrollBar { padding: 8px; } StScrollView StScrollBar { min-width: 5px; min-height: 5px; } StScrollBar StBin#trough { background-color: rgba(64, 69, 82, 0.1); border-radius: 8px; } StScrollBar StButton#vhandle, StScrollBar StButton#hhandle { border-radius: 4px; background-color: #767b87; border: 0px solid; margin: 0px; } StScrollBar StButton#vhandle:hover, StScrollBar StButton#hhandle:hover { background-color: #676b78; } StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { background-color: #5294e2; } .slider { -slider-height: 4px; -slider-background-color: #2b2e39; -slider-border-color: transparent; -slider-active-background-color: #5294e2; -slider-active-border-color: transparent; -slider-border-width: 0; -slider-handle-radius: 0px; -slider-handle-border-color: transparent; -slider-handle-border-width: 0; height: 18px; border: 0 solid transparent; border-right-width: 1px; border-left-width: 5px; color: transparent; } .popup-menu-item:active .slider { -slider-background-color: rgba(0, 0, 0, 0.2); -slider-active-background-color: #ffffff; } .check-box StBoxLayout { spacing: .8em; } .check-box StBin { width: 16px; height: 16px; background-image: url("dark-assets/checkbox/checkbox-unchecked.svg"); } .check-box:focus StBin { background-image: url("dark-assets/checkbox/checkbox-unchecked-focused.svg"); } .check-box:checked StBin { background-image: url("dark-assets/checkbox/checkbox-checked.svg"); } .check-box:focus:checked StBin { background-image: url("dark-assets/checkbox/checkbox-checked-focused.svg"); } .toggle-switch { width: 50px; height: 20px; background-size: contain; background-image: url("dark-assets/switch/switch-off.svg"); } .toggle-switch:checked { background-image: url("dark-assets/switch/switch-on.svg"); } .popup-menu-item:active .toggle-switch { background-image: url("common-assets/switch/switch-off-selected.svg"); } .popup-menu-item:active .toggle-switch:checked { background-image: url("common-assets/switch/switch-on-selected.svg"); } .shell-link { color: #a9caf1; } .shell-link:hover { color: #d5e5f8; } .headline { font-size: 110%; } .lightbox { background-color: black; } .flashspot { background-color: white; } .modal-dialog { color: #D3DAE3; background-color: rgba(56, 60, 74, 0); border: none; border-image: url("dark-assets/misc/modal.svg") 9 9 9 67; padding: 0 5px 6px 5px; } .modal-dialog > StBoxLayout:first-child { padding: 20px 10px 10px 10px; } .modal-dialog-button-box { spacing: 10px; margin: 0px; padding: 14px 10px; background: none; border: none; border-image: url("dark-assets/misc/button-box.svg") 9 9 9 9; } .modal-dialog-button-box .button { padding-top: 0; padding-bottom: 0; height: 30px; } .modal-dialog .run-dialog-entry { width: 21em; caret-color: #D3DAE3; } .modal-dialog .run-dialog-error-box { padding-top: 5px; spacing: 5px; } .modal-dialog .run-dialog-label { font-size: 0; } .show-processes-dialog-subject, .mount-question-dialog-subject, .end-session-dialog-subject { font-size: 11pt; font-weight: bold; color: #D3DAE3; } .end-session-dialog { spacing: 42px; } .end-session-dialog-list { padding-top: 20px; } .end-session-dialog-layout { padding-left: 17px; } .end-session-dialog-layout:rtl { padding-right: 17px; } .end-session-dialog-description { width: 28em; padding-bottom: 10px; } .end-session-dialog-description:rtl { text-align: right; } .end-session-dialog-warning { width: 28em; color: #F27835; padding-top: 6px; } .end-session-dialog-warning:rtl { text-align: right; } .end-session-dialog-logout-icon { border: 0px solid transparent; border-radius: 2px; width: 48px; height: 48px; background-size: contain; } .end-session-dialog-shutdown-icon { color: #D3DAE3; width: 48px; height: 48px; } .end-session-dialog-inhibitor-layout { spacing: 16px; max-height: 200px; padding-right: 10px; padding-left: 10px; } .end-session-dialog-session-list, .end-session-dialog-app-list { spacing: 1em; } .end-session-dialog-list-header { font-weight: bold; } .end-session-dialog-list-header:rtl { text-align: right; } .end-session-dialog-app-list-item, .end-session-dialog-session-list-item { spacing: 1em; } .end-session-dialog-app-list-item-name, .end-session-dialog-session-list-item-name { font-weight: bold; } .end-session-dialog-app-list-item-description { color: #e3e7ed; font-size: 8pt; } .end-session-dialog .modal-dialog-button:last-child { color: white; background-color: #F04A50; border-color: #F04A50; } .end-session-dialog .modal-dialog-button:last-child:hover { color: white; background-color: #f47479; border-color: #f47479; } .end-session-dialog .modal-dialog-button:last-child:active { color: white; background-color: #ee3239; border-color: #ee3239; } .shell-mount-operation-icon { icon-size: 48px; } .show-processes-dialog, .mount-question-dialog { spacing: 24px; } .show-processes-dialog-subject, .mount-question-dialog-subject { padding-top: 10px; padding-left: 17px; padding-bottom: 6px; } .show-processes-dialog-subject:rtl, .mount-question-dialog-subject:rtl { padding-left: 0px; padding-right: 17px; } .mount-question-dialog-subject { max-width: 500px; } .show-processes-dialog-description, .mount-question-dialog-description { padding-left: 17px; width: 28em; } .show-processes-dialog-description:rtl, .mount-question-dialog-description:rtl { padding-right: 17px; } .show-processes-dialog-app-list { font-size: 10pt; max-height: 200px; padding-top: 24px; padding-left: 49px; padding-right: 32px; } .show-processes-dialog-app-list:rtl { padding-right: 49px; padding-left: 32px; } .show-processes-dialog-app-list-item { color: #b4c0cf; } .show-processes-dialog-app-list-item:hover { color: #D3DAE3; } .show-processes-dialog-app-list-item:ltr { padding-right: 1em; } .show-processes-dialog-app-list-item:rtl { padding-left: 1em; } .show-processes-dialog-app-list-item-icon:ltr { padding-right: 17px; } .show-processes-dialog-app-list-item-icon:rtl { padding-left: 17px; } .show-processes-dialog-app-list-item-name { font-size: 10pt; } .prompt-dialog { width: 500px; } .prompt-dialog-main-layout { spacing: 24px; padding: 10px; } .prompt-dialog-message-layout { spacing: 16px; } .prompt-dialog-headline { font-size: 12pt; font-weight: bold; color: #D3DAE3; } .prompt-dialog-descritption:rtl { text-align: right; } .prompt-dialog-password-box { spacing: 1em; padding-bottom: 1em; } .prompt-dialog-error-label { font-size: 9pt; color: #FC4138; padding-bottom: 8px; } .prompt-dialog-info-label { font-size: 9pt; padding-bottom: 8px; } .prompt-dialog-null-label { font-size: 9pt; padding-bottom: 8px; } .hidden { color: transparent; } .polkit-dialog-user-layout { padding-left: 10px; spacing: 10px; } .polkit-dialog-user-layout:rtl { padding-left: 0px; padding-right: 10px; } .polkit-dialog-user-root-label { color: #F27835; } .polkit-dialog-user-user-icon { border-radius: 2px; background-size: contain; width: 48px; height: 48px; } .network-dialog-secret-table { spacing-rows: 15px; spacing-columns: 1em; } .keyring-dialog-control-table { spacing-rows: 15px; spacing-columns: 1em; } .popup-menu { min-width: 200px; color: #D3DAE3; border-image: url("dark-assets/menu/menu.svg") 9 9 9 9; } .popup-menu .popup-sub-menu { background: none; box-shadow: none; background-gradient-direction: none !important; border-image: url("dark-assets/menu/submenu.svg") 9 9 9 9; } .popup-menu .popup-submenu-menu-item:open { color: #D3DAE3; background: none !important; box-shadow: none; border-image: url("dark-assets/menu/submenu-open.svg") 9 9 9 9; } .popup-menu .popup-menu-content { padding: 1em 0em 1em 0em; } .popup-menu .popup-menu-item { spacing: 12px; } .popup-menu .popup-menu-item:ltr { padding: .4em 3em .4em 0em; } .popup-menu .popup-menu-item:rtl { padding: .4em 0em .4em 3em; } .popup-menu .popup-menu-item:active, .popup-menu .popup-menu-item.selected { color: #ffffff; background-color: transparent; border-image: url("common-assets/menu/menu-hover.svg") 9 9 1 1; } .popup-menu .popup-menu-item:insensitive { color: rgba(211, 218, 227, 0.5); background: none; } .popup-menu .popup-inactive-menu-item { color: #D3DAE3; } .popup-menu .popup-inactive-menu-item:insensitive { color: rgba(211, 218, 227, 0.45); } .popup-menu .popup-status-menu-item, .popup-menu .popup-subtitle-menu-item { color: #D3DAE3; } .popup-menu .popup-menu-item:active .popup-status-menu-item, .popup-menu .popup-menu-item:active .popup-subtitle-menu-item { color: #ffffff; } .popup-menu.panel-menu { -boxpointer-gap: 0px; margin-bottom: 1.75em; } .popup-menu-ornament { text-align: right; margin-left: 10px; width: 16px; } .popup-menu-boxpointer { -arrow-border-radius: 2px !important; -arrow-background-color: transparent !important; -arrow-border-width: 1px !important; -arrow-border-color: transparent !important; -arrow-base: 0 !important; -arrow-rise: 0 !important; color: #D3DAE3 !important; } .candidate-popup-boxpointer { -arrow-border-radius: 2px; -arrow-background-color: rgba(53, 57, 69, 0.95); -arrow-border-width: 1px; -arrow-border-color: rgba(0, 0, 0, 0.4); -arrow-base: 5; -arrow-rise: 5; } .popup-separator-menu-item { -gradient-height: 0px; height: 2px; margin: 0; background-color: transparent; background-gradient-direction: none !important; border: none; border-image: url("common-assets/menu/menu-separator.svg") 1 1 1 1; } .background-menu { -boxpointer-gap: 4px; -arrow-rise: 0px; } .osd-window { text-align: center; font-weight: bold; spacing: 1em; padding: 20px; margin: 32px; min-width: 64px; min-height: 64px; color: white; background: none; border: none; border-radius: 5px; border-image: url("common-assets/misc/osd.svg") 9 9 9 9; } .osd-window .osd-monitor-label { font-size: 3em; } .osd-window .level { padding: 0; height: 4px; background-color: rgba(0, 0, 0, 0.5); border-radius: 2px; color: #5294e2; } .resize-popup { color: #BAC3CF; background: none; border: none; border-radius: 5px; border-image: url("common-assets/misc/osd.svg") 9 9 9 9; padding: 12px; } .switcher-popup { padding: 8px; spacing: 16px; } .switcher-list { color: #BAC3CF; background: none; border: none; border-image: url("common-assets/misc/bg.svg") 9 9 9 9; border-radius: 3px; padding: 20px; } .switcher-list-item-container { spacing: 8px; } .switcher-list .item-box { padding: 8px; border-radius: 2px; border: 1px solid transparent; } .switcher-list .item-box:outlined { padding: 8px; border: 1px solid #5294e2; } .switcher-list .item-box:selected { color: #ffffff; background-color: #5294e2; border: 1px solid #5294e2; } .switcher-list .thumbnail-box { padding: 2px; spacing: 4px; } .switcher-list .thumbnail { width: 256px; } .switcher-list .separator { width: 1px; background: rgba(211, 218, 227, 0.33); } .switcher-arrow { border-color: transparent; color: #BAC3CF; } .switcher-arrow:highlighted { color: white; } .input-source-switcher-symbol { font-size: 34pt; width: 96px; height: 96px; } .workspace-switcher { background: transparent; border: 0px; border-radius: 0px; padding: 0px; spacing: 8px; } .workspace-switcher-group { padding: 12px; } .workspace-switcher-container { border-image: url("common-assets/misc/bg.svg") 9 9 9 9; border-radius: 3px; padding: 20px; padding-bottom: 24px; } .ws-switcher-active-up, .ws-switcher-active-down { height: 30px; background-color: #5294e2; background-size: 96px; border-radius: 2px; border: 1px solid #5294e2; } .ws-switcher-active-up { background-image: url("common-assets/misc/ws-switch-arrow-up.png"); } .ws-switcher-active-down { background-image: url("common-assets/misc/ws-switch-arrow-down.png"); } .ws-switcher-box { height: 96px; background: rgba(0, 0, 0, 0.33); border: 1px solid rgba(0, 0, 0, 0.33); border-radius: 2px; } .tile-preview { background-color: rgba(82, 148, 226, 0.35); border: 1px solid #5294e2; } .tile-preview-left.on-primary { border-radius: 0px 0 0 0; } .tile-preview-right.on-primary { border-radius: 0 0px 0 0; } .tile-preview-left.tile-preview-right.on-primary { border-radius: 0px 0px 0 0; } #panel { font-weight: bold; height: 2.1em; min-height: 27px; background-color: transparent !important; background-gradient-direction: none !important; border-bottom: 0px !important; border-image: url("common-assets/panel/panel.svg") 1 1 1 1 !important; } #panel.dynamic-top-bar-white-btn { border-image: none; } #panel.unlock-screen, #panel.login-screen, #panel.lock-screen { background-color: transparent; border-image: none; } #panel:overview { border-image: url("common-assets/panel/panel-overview.svg") 1 1 1 1; } #panel #panelLeft, #panel #panelCenter { spacing: 8px; } #panel .panel-corner { -panel-corner-radius: 0px; -panel-corner-background-color: transparent; -panel-corner-border-width: 0px; -panel-corner-border-color: black; } #panel .panel-corner:active, #panel .panel-corner:overview, #panel .panel-corner:focus { -panel-corner-border-color: black; } #panel .panel-corner.lock-screen, #panel .panel-corner.login-screen, #panel .panel-cornerunlock-screen { -panel-corner-radius: 0; -panel-corner-background-color: transparent; -panel-corner-border-color: transparent; } #panel .panel-button { -natural-hpadding: 10px !important; -minimum-hpadding: 6px !important; font-weight: bold; color: white !important; transition-duration: 100ms; border-bottom-width: 1px; border-color: transparent; } #panel .panel-button #appMenuIcon { width: 0; height: 0; margin-left: 0px; margin-right: 0px; } #panel .panel-button:hover { color: white !important; background-color: rgba(0, 0, 0, 0.17); border-bottom-width: 1px; border-color: transparent; text-shadow: 0 0 transparent; } #panel .panel-button:active, #panel .panel-button:overview, #panel .panel-button:focus, #panel .panel-button:checked { color: #ffffff !important; background: #5294e2, url("common-assets/misc/null.svg"); border-image: none; box-shadow: none; border-bottom-width: 1px !important; border-color: black; text-shadow: 0 0 transparent; } #panel .panel-button:active > .system-status-icon, #panel .panel-button:overview > .system-status-icon, #panel .panel-button:focus > .system-status-icon, #panel .panel-button:checked > .system-status-icon { icon-shadow: none; } #panel .panel-button .system-status-icon { icon-size: 16px; padding: 0 4px; } .unlock-screen #panel .panel-button, .login-screen #panel .panel-button, .lock-screen #panel .panel-button { color: #f2f4f7; } .unlock-screen #panel .panel-button:focus, .unlock-screen #panel .panel-button:hover, .unlock-screen #panel .panel-button:active, .login-screen #panel .panel-button:focus, .login-screen #panel .panel-button:hover, .login-screen #panel .panel-button:active, .lock-screen #panel .panel-button:focus, .lock-screen #panel .panel-button:hover, .lock-screen #panel .panel-button:active { color: #f2f4f7; } #panel #panelActivities.panel-button { -natural-hpadding: 12px; } #panel .panel-status-indicators-box, #panel .panel-status-menu-box { spacing: 2px; } #panel .screencast-indicator { color: #FC4138; } #panel .clock-display > * > *:last-child { color: #5294e2; margin-left: .3em; } #panel .popup-menu-arrow { width: 0; } #panel #panelActivities.panel-button > * { background-image: url("common-assets/panel/activities.svg"); background-position: center top; width: 24px; height: 24px; background-color: transparent !important; background-gradient-direction: none !important; border: 0 solid transparent !important; text-shadow: 0 0 transparent !important; transition-duration: 0ms !important; box-shadow: none !important; color: transparent; } #panel #panelActivities.panel-button:active, #panel #panelActivities.panel-button:overview, #panel #panelActivities.panel-button:focus, #panel #panelActivities.panel-button:checked { background-color: transparent; box-shadow: none; border-bottom-width: 1px; border-color: transparent; } #panel #panelActivities.panel-button:active > *, #panel #panelActivities.panel-button:overview > *, #panel #panelActivities.panel-button:focus > *, #panel #panelActivities.panel-button:checked > * { background-image: url("common-assets/panel/activities-active.svg"); } .system-switch-user-submenu-icon { icon-size: 24px; border: 1px solid rgba(0, 0, 0, 0.2); } #appMenu { spinner-image: url("common-assets/misc/process-working.svg"); spacing: 4px; padding: 0 8px; } #appMenu .label-shadow { color: transparent !important; } .aggregate-menu { width: 360px; } .aggregate-menu .popup-menu-icon { padding: 0 4px; color: #D3DAE3; } .aggregate-menu .popup-menu-item:active .popup-menu-icon { color: #ffffff; } .system-menu-action { padding: 13px; color: #D3DAE3 !important; border-radius: 32px; /* wish we could do 50% */ border: 1px solid transparent !important; } .system-menu-action:hover, .system-menu-action:focus { transition-duration: 100ms; padding: 13px; color: #D3DAE3 !important; background-color: transparent !important; border: 1px solid #5294e2 !important; } .system-menu-action:active { color: #ffffff !important; background-color: #5294e2 !important; border: 1px solid #5294e2 !important; } .system-menu-action > StIcon { icon-size: 16px; } .calendar-vertical-separator { -stipple-width: 1px; -stipple-color: rgba(211, 218, 227, 0.4); width: 0.3em; } .calendar { padding: .4em 1.75em .8em 2.5em; } .calendar-month-label { color: #D3DAE3 !important; font-weight: bold; padding: 8px 0; } .calendar-change-month-back:hover, .calendar-change-month-back:focus, .calendar-change-month-back:active, .calendar-change-month-forward:hover, .calendar-change-month-forward:focus, .calendar-change-month-forward:active { background-color: transparent; } .calendar-change-month-back, .calendar-change-month-forward { width: 18px; height: 12px; border-radius: 4px; } .calendar-change-month-back { background-image: url("dark-assets/misc/calendar-arrow-left.svg"); } .calendar-change-month-back:focus, .calendar-change-month-back:hover { background-image: url("dark-assets/misc/calendar-arrow-left-hover.svg"); } .calendar-change-month-back:active { background-image: url("dark-assets/misc/calendar-arrow-left.svg"); } .calendar-change-month-back:rtl { background-image: url("dark-assets/misc/calendar-arrow-right.svg"); } .calendar-change-month-back:rtl:focus, .calendar-change-month-back:rtl:hover { background-image: url("dark-assets/misc/calendar-arrow-right-hover.svg"); } .calendar-change-month-back:rtl:active { background-image: url("dark-assets/misc/calendar-arrow-right.svg"); } .calendar-change-month-forward { background-image: url("dark-assets/misc/calendar-arrow-right.svg"); } .calendar-change-month-forward:focus, .calendar-change-month-forward:hover { background-image: url("dark-assets/misc/calendar-arrow-right-hover.svg"); } .calendar-change-month-forward:active { background-image: url("dark-assets/misc/calendar-arrow-right.svg"); } .calendar-change-month-forward:rtl { background-image: url("dark-assets/misc/calendar-arrow-left.svg"); } .calendar-change-month-forward:rtl:focus, .calendar-change-month-forward:rtl:hover { background-image: url("dark-assets/misc/calendar-arrow-left-hover.svg"); } .calendar-change-month-forward:rtl:active { background-image: url("dark-assets/misc/calendar-arrow-left.svg"); } .datemenu-date-label { padding: .4em 1.7em; font-weight: bold; text-align: center; color: #D3DAE3 !important; border-radius: 4px; } .calendar-day-base { font-size: 80%; text-align: center; width: 25px; height: 25px; padding: 0.1em; margin: 2px; border-radius: 12.5px; color: #D3DAE3 !important; } .calendar-day-base:hover, .calendar-day-base:focus { background-color: rgba(0, 0, 0, 0.1) !important; color: #D3DAE3 !important; } .calendar-day-base:active { color: #D3DAE3 !important; background-color: rgba(0, 0, 0, 0.15) !important; border-width: 0; } .calendar-day-base.calendar-day-heading { color: rgba(211, 218, 227, 0.85); margin-top: 1em; font-size: 70%; } .calendar-week-number { color: rgba(211, 218, 227, 0.5); font-weight: normal; } .calendar-day { border-width: 0; color: rgba(211, 218, 227, 0.8); } .calendar-day-top { border-top-width: 0; } .calendar-day-left { border-left-width: 0; } .calendar-nonwork-day { background-color: transparent; color: #D3DAE3 !important; font-weight: bold; } .calendar-today, .calendar-today:active, .calendar-today:focus, .calendar-today:hover { font-weight: bold; color: #ffffff !important; background: #5294e2, url("common-assets/misc/null.svg") !important; border-width: 0; } .calendar-day-with-events { color: #5294e2; font-weight: bold; } .calendar-today.calendar-day-with-events { color: #ffffff; } .calendar-other-month-day { color: rgba(211, 218, 227, 0.3); opacity: 1; } .events-table { width: 320px; spacing-columns: 6pt; padding: 0 1.4em; } .events-table:ltr { padding-right: 1.9em; } .events-table:rtl { padding-left: 1.9em; } .events-day-header { font-weight: bold; color: rgba(211, 218, 227, 0.8) !important; padding-left: 0.4em; padding-top: 1.2em; } .events-day-header:first-child { padding-top: 0; } .events-day-header:rtl { padding-left: 0; padding-right: 0.4em; } .events-day-dayname { color: rgba(211, 218, 227, 0.5) !important; text-align: left; min-width: 20px; } .events-day-dayname:rtl { text-align: right; } .events-day-time { color: rgba(211, 218, 227, 0.4) !important; text-align: right; } .events-day-time:rtl { text-align: left; } .events-day-task { color: #D3DAE3; padding-left: 8pt; } .events-day-task:rtl { padding-left: 0px; padding-right: 8pt; } .ripple-box { width: 52px; height: 52px; background-image: url("common-assets/misc/corner-ripple-ltr.svg"); background-size: contain; } .ripple-box:rtl { background-image: url("common-assets/misc/corner-ripple-rtl.svg"); } .popup-menu-arrow { width: 16px; height: 16px; } .popup-menu-icon { icon-size: 16px; } .window-close, .notification-close { background-image: url("common-assets/misc/close.svg"); background-size: 26px; height: 26px; width: 26px; } .window-close:hover, .notification-close:hover { background-image: url("common-assets/misc/close-hover.svg"); background-size: 26px; height: 26px; width: 26px; } .window-close:active, .notification-close:active { background-image: url("common-assets/misc/close-active.svg"); background-size: 26px; height: 26px; width: 26px; } .window-close { -shell-close-overlap: 11px; } .notification-close { -shell-close-overlap-x: 8px; -shell-close-overlap-y: -8px; } .notification-close:rtl { -shell-close-overlap-x: -8px; } .nm-dialog { max-height: 500px; min-height: 450px; min-width: 470px; } .nm-dialog-content { spacing: 20px; } .nm-dialog-header-hbox { spacing: 10px; } .nm-dialog-airplane-box { spacing: 12px; } .nm-dialog-airplane-headline { font-size: 1.1em; font-weight: bold; text-align: center; } .nm-dialog-airplane-text { color: #D3DAE3; } .nm-dialog-header-icon { icon-size: 32px; } .nm-dialog-scroll-view { border: 1px solid #2b2e39; border-radius: 2px; background-color: #404552; } .nm-dialog-header { font-weight: bold; font-size: 1.2em; } .nm-dialog-item { font-size: 1em; border-bottom: 0px solid; padding: 12px; spacing: 0px; } .nm-dialog-item:selected { background-color: #5294e2; color: #ffffff; } .nm-dialog-icons { spacing: .5em; } .nm-dialog-icon { icon-size: 16px; } .no-networks-label { color: rgba(211, 218, 227, 0.45); } .no-networks-box { spacing: 12px; } #overview { spacing: 24px; } .overview-controls { padding-bottom: 32px; } .window-picker { -horizontal-spacing: 32px; -vertical-spacing: 32px; padding-left: 32px; padding-right: 32px; padding-bottom: 48px; } .window-picker.external-monitor { padding: 32px; } .window-clone-border { border: 3px solid rgba(82, 148, 226, 0.8); border-radius: 4px; box-shadow: inset 0px 0px 0px 1px rgba(82, 148, 226, 0); } .window-caption, .window-caption:hover { spacing: 25px; color: #BAC3CF; background-color: rgba(0, 0, 0, 0.7); border-radius: 2px; padding: 4px 12px; -shell-caption-spacing: 12px; } .search-entry { width: 320px; padding: 7px 9px; border-radius: 20px; border: 1px solid rgba(0, 0, 0, 0.25); background-color: rgba(64, 69, 82, 0.9); } .search-entry:focus { padding: 7px 9px; } .search-entry .search-entry-icon { icon-size: 16px; padding: 0 4px; color: #D3DAE3; } .search-entry:hover, .search-entry:focus { color: #ffffff; caret-color: #ffffff; background-color: #5294e2; selection-background-color: #ffffff; selected-color: #5294e2; } .search-entry:hover .search-entry-icon, .search-entry:focus .search-entry-icon { color: #ffffff; } #searchResultsBin { max-width: 1000px; } #searchResultsContent { padding-left: 20px; padding-right: 20px; spacing: 16px; } .search-section { spacing: 16px; } .search-section-content { spacing: 32px; } .list-search-results { spacing: 3px; } .search-section-separator { background-color: rgba(255, 255, 255, 0.2); -margin-horizontal: 1.5em; height: 1px; } .list-search-result-content { spacing: 12px; padding: 12px; } .list-search-result-title { font-size: 1.5em; color: white; } .list-search-result-description { color: #cccccc; } .search-provider-icon { padding: 15px; } .search-provider-icon-more { width: 16px; height: 16px; background-image: url("common-assets/misc/more-results.svg"); } #dash { font-size: 1em; color: #BAC3CF; background-color: rgba(53, 57, 69, 0.95); border-color: rgba(0, 0, 0, 0.4); padding: 3px 0px 3px 0px; border-radius: 0 3px 3px 0; } #dash:rtl { border-radius: 3px 0 0 3px; } .right #dash, #dash:rtl { padding: 3px 0px 3px 0px; } .bottom #dash { padding: 0px 3px 0px 3px; } .top #dash { padding: 0px 3px 0px 3px; } #dash .placeholder { background-image: url("common-assets/dash/dash-placeholder.svg"); background-size: contain; height: 24px; } #dash .empty-dash-drop-target { width: 24px; height: 24px; } .dash-item-container > StWidget { padding: 2px 5px 2px 3px; } .right .dash-item-container > StWidget, .dash-item-container > StWidget:rtl { padding: 2px 3px 2px 5px; } .bottom .dash-item-container > StWidget { padding: 5px 2px 3px 2px; } .top .dash-item-container > StWidget { padding: 3px 2px 5px 2px; } .dash-label { border-radius: 3px; padding: 4px 12px; color: white; background-color: rgba(0, 0, 0, 0.7); text-align: center; -x-offset: 3px; } .bottom .dash-label, .top .dash-label { -y-offset: 3px; -x-offset: 0; } .dash-item-container > .app-well-app.running > .overview-icon, .dash-item-container > .app-well-app.running:hover > .overview-icon, .dash-item-container > .app-well-app.running:active > .overview-icon, .dash-item-container > .app-well-app > .overview-icon, .dash-item-container > .app-well-app:hover > .overview-icon, .dash-item-container > .app-well-app:active > .overview-icon { background-color: transparent !important; background-gradient-direction: none !important; border: none !important; border-radius: 0 !important; background: none !important; } #dash .app-well-app .overview-icon { padding: 10px; padding-left: 13px; } .right #dash .app-well-app .overview-icon, #dash:rtl .app-well-app .overview-icon { padding: 10px; padding-right: 13px; } .bottom #dash .app-well-app .overview-icon { padding: 10px; padding-bottom: 13px; } .top #dash .app-well-app .overview-icon { padding: 10px; padding-top: 13px; } #dash .app-well-app:hover .overview-icon { border-image: url("common-assets/dash/button-hover.svg") 5 5 5 5; } #dash .app-well-app:active .overview-icon { border-image: url("common-assets/dash/button-active.svg") 5 5 5 5; } #dash .app-well-app.running .overview-icon { border-image: url("common-assets/dash/button-running.svg") 5 5 5 5; } #dash .app-well-app.running:hover .overview-icon { border-image: url("common-assets/dash/button-running-hover.svg") 5 5 5 5; } #dash .app-well-app.running:active > .overview-icon { border-image: url("common-assets/dash/button-running-active.svg") 5 5 5 5; } .right #dash .app-well-app:hover .overview-icon, #dash:rtl .app-well-app:hover .overview-icon { border-image: url("common-assets/dash/button-hover-right.svg") 5 5 5 5; } .right #dash .app-well-app:active .overview-icon, #dash:rtl .app-well-app:active .overview-icon { border-image: url("common-assets/dash/button-active-right.svg") 5 5 5 5; } .right #dash .app-well-app.running .overview-icon, #dash:rtl .app-well-app.running .overview-icon { border-image: url("common-assets/dash/button-running-right.svg") 5 5 5 5; } .right #dash .app-well-app.running:hover .overview-icon, #dash:rtl .app-well-app.running:hover .overview-icon { border-image: url("common-assets/dash/button-running-hover-right.svg") 5 5 5 5; } .right #dash .app-well-app.running:active > .overview-icon, #dash:rtl .app-well-app.running:active > .overview-icon { border-image: url("common-assets/dash/button-running-active-right.svg") 5 5 5 5; } .bottom #dash .app-well-app:hover .overview-icon { border-image: url("common-assets/dash/button-hover-bottom.svg") 5 5 5 5; } .bottom #dash .app-well-app:active .overview-icon { border-image: url("common-assets/dash/button-active-bottom.svg") 5 5 5 5; } .bottom #dash .app-well-app.running .overview-icon { border-image: url("common-assets/dash/button-running-bottom.svg") 5 5 5 5; } .bottom #dash .app-well-app.running:hover .overview-icon { border-image: url("common-assets/dash/button-running-hover-bottom.svg") 5 5 5 5; } .bottom #dash .app-well-app.running:active > .overview-icon { border-image: url("common-assets/dash/button-running-active-bottom.svg") 5 5 5 5; } .top #dash .app-well-app:hover .overview-icon { border-image: url("common-assets/dash/button-hover-top.svg") 5 5 5 5; } .top #dash .app-well-app:active .overview-icon { border-image: url("common-assets/dash/button-active-top.svg") 5 5 5 5; } .top #dash .app-well-app.running .overview-icon { border-image: url("common-assets/dash/button-running-top.svg") 5 5 5 5; } .top #dash .app-well-app.running:hover .overview-icon { border-image: url("common-assets/dash/button-running-hover-top.svg") 5 5 5 5; } .top #dash .app-well-app.running:active > .overview-icon { border-image: url("common-assets/dash/button-running-active-top.svg") 5 5 5 5; } .show-apps .overview-icon { background-gradient-direction: none !important; padding: 11px; background-color: rgba(0, 0, 0, 0.5); border-radius: 2px; border: 0px solid; } .show-apps:hover .overview-icon { background-gradient-direction: none !important; background-color: rgba(0, 0, 0, 0.7); color: #5294e2; } .show-apps:active .overview-icon, .show-apps:active .show-apps-icon, .show-apps:checked .overview-icon, .show-apps:checked .show-apps-icon { background-gradient-direction: none !important; color: #ffffff; background-color: #5294e2; box-shadow: none; transition-duration: 0ms; } .icon-grid { spacing: 30px; -shell-grid-horizontal-item-size: 136px; -shell-grid-vertical-item-size: 136px; } .icon-grid .overview-icon { icon-size: 96px; } .app-view-controls { padding-bottom: 32px; } .app-view-control { padding: 4px 32px; background-gradient-direction: none; text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(102, 109, 132, 0.35); } .app-view-control:hover { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(119, 127, 151, 0.45); } .app-view-control:checked { color: #ffffff; background-color: #5294e2; border-color: #5294e2; } .app-view-control:first-child:ltr, .app-view-control:last-child:rtl { border-radius: 2px 0 0 2px; border-right-width: 0; } .app-view-control:last-child:ltr, .app-view-control:first-child:rtl { border-radius: 0 2px 2px 0; border-left-width: 0; } .search-provider-icon:active, .search-provider-icon:checked, .list-search-result:active, .list-search-result:checked { background-color: rgba(31, 33, 40, 0.85); } .search-provider-icon:focus, .search-provider-icon:selected, .search-provider-icon:hover, .list-search-result:focus, .list-search-result:selected, .list-search-result:hover { background-color: rgba(186, 195, 207, 0.4); transition-duration: 200ms; } .app-well-app:active .overview-icon, .app-well-app:checked .overview-icon, .app-well-app.app-folder:active .overview-icon, .app-well-app.app-folder:checked .overview-icon, .grid-search-result:active .overview-icon, .grid-search-result:checked .overview-icon { background-color: rgba(31, 33, 40, 0.85); box-shadow: inset 0 0 #5294e2; } .app-well-app:hover .overview-icon, .app-well-app:focus .overview-icon, .app-well-app:selected .overview-icon, .app-well-app.app-folder:hover .overview-icon, .app-well-app.app-folder:focus .overview-icon, .app-well-app.app-folder:selected .overview-icon, .grid-search-result:hover .overview-icon, .grid-search-result:focus .overview-icon, .grid-search-result:selected .overview-icon { background-color: rgba(186, 195, 207, 0.4); transition-duration: 0ms; border-image: none; background-image: none; } .app-well-app.running > .overview-icon { background: none !important; text-shadow: black 0px 0px; border-image: url("common-assets/dash/button-running-bottom.svg") 5 5 5 5; } .app-well-app.running:hover > .overview-icon { border-image: url("common-assets/dash/button-running-hover-bottom.svg") 5 5 5 5; } .app-well-app.running:active > .overview-icon, .app-well-app.running:checked > .overview-icon { border-image: url("common-assets/dash/button-running-active-bottom.svg") 5 5 5 5; } .search-provider-icon, .list-search-result, .app-well-app .overview-icon, .app-well-app.app-folder .overview-icon, .grid-search-result .overview-icon { color: white; border-radius: 2px; padding: 6px; border: 1px solid transparent; transition-duration: 0ms; text-align: center; } .app-well-app.app-folder > .overview-icon { background-color: rgba(35, 38, 46, 0.95); border: 1px solid rgba(0, 0, 0, 0.45); } .app-well-app.app-folder:hover > .overview-icon { background-color: rgba(60, 64, 78, 0.95); } .app-well-app.app-folder:active > .overview-icon, .app-well-app.app-folder:checked > .overview-icon { color: #ffffff; background-color: #5294e2; box-shadow: none; } .app-well-app.app-folder:focus > .overview-icon { background-color: #5294e2; } .app-folder-popup { -arrow-border-radius: 2px; -arrow-background-color: rgba(35, 38, 46, 0.95); -arrow-border-color: rgba(0, 0, 0, 0.45); -arrow-border-width: 1px; -arrow-base: 5; -arrow-rise: 5; } .app-folder-popup-bin { padding: 5px; } .app-folder-icon { padding: 5px; spacing-rows: 5px; spacing-columns: 5px; } .page-indicator { padding: 15px 20px; } .page-indicator .page-indicator-icon { width: 18px; height: 18px; background-image: url(common-assets/misc/page-indicator-inactive.svg); } .page-indicator:hover .page-indicator-icon { background-image: url(common-assets/misc/page-indicator-hover.svg); } .page-indicator:active .page-indicator-icon { background-image: url(common-assets/misc/page-indicator-active.svg); } .page-indicator:checked .page-indicator-icon, .page-indicator:checked:active { background-image: url(common-assets/misc/page-indicator-checked.svg); } .app-well-app > .overview-icon.overview-icon-with-label, .grid-search-result .overview-icon.overview-icon-with-label { padding: 10px 8px 5px 8px; spacing: 4px; } .workspace-thumbnails, .workspace-thumbnails:rtl, .workspace-thumbnails-left, .workspace-thumbnails-left:rtl { visible-width: 40px; spacing: 11px; padding: 12px; } .workspace-thumbnails, .workspace-thumbnails-left:rtl { padding-right: 7px; border-image: url("common-assets/dash/dash-right.svg") 9 9 9 9; } .workspace-thumbnails:rtl, .workspace-thumbnails-left { padding-left: 7px; border-image: url("common-assets/dash/dash-left.svg") 9 9 9 9; } .workspace-thumbnail-indicator { border: 4px solid rgba(82, 148, 226, 0.8); border-radius: 1px; padding: 1px; } .search-display > StBoxLayout, .all-apps, .frequent-apps > StBoxLayout { padding: 0px 88px 10px 88px; } .search-statustext, .no-frequent-applications-label { font-size: 2em; font-weight: bold; color: #D3DAE3; } #message-tray { background: #353945; background-repeat: repeat; height: 72px; border: solid rgba(0, 0, 0, 0.6); border-width: 0; border-top-width: 1px; } .message-tray-summary { height: 72px; } .message-tray-menu-button StIcon { padding: 0 20px; color: rgba(186, 195, 207, 0.6); icon-size: 24px; } .message-tray-menu-button:hover StIcon, .message-tray-menu-button:active StIcon, .message-tray-menu-button:focus StIcon { color: #BAC3CF; } .no-messages-label { color: rgba(186, 195, 207, 0.5); } .summary-boxpointer { -arrow-border-radius: 3px; -arrow-background-color: transparent; -arrow-base: 0; -arrow-rise: 0; -boxpointer-gap: 0; color: #D3DAE3; border-image: url("common-assets/misc/bg.svg") 9 9 9 9; padding: 7px; } .summary-boxpointer .notification { border-radius: 3px; background: none !important; border-image: none; padding-bottom: 12px; } .summary-boxpointer #summary-right-click-menu { color: #BAC3CF; padding-top: 12px; padding-bottom: 12px; } .summary-boxpointer #summary-right-click-menu .popup-menu-item:active { color: #ffffff; background-color: #5294e2; } .summary-boxpointer-stack-scrollview { max-height: 18em; padding-top: 8px; padding-bottom: 8px; } .summary-boxpointer-stack-scrollview:ltr { padding-right: 8px; } .summary-boxpointer-stack-scrollview:rtl { padding-left: 8px; } .summary-source { border-radius: 4px; padding: 0 6px 0 6px; transition-duration: 100ms; } .summary-source-counter { background-image: url("common-assets/misc/summary-counter.svg"); background-size: 26px; color: #ffffff; font-size: 10pt; font-weight: bold; height: 2.4em; width: 2.4em; -shell-counter-overlap-x: 8px; -shell-counter-overlap-y: 8px; } .summary-source-button { border-radius: 2px; padding: 6px 3px 6px 3px; } .summary-source-button:last-child:ltr { padding-right: 6px; } .summary-source-button:last-child:rtl { padding-left: 6px; } .summary-source-button .summary-source { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(102, 109, 132, 0.35); } .summary-source-button:hover .summary-source { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(119, 127, 151, 0.45); } .summary-source-button:focus .summary-source, .summary-source-button:selected .summary-source { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #ffffff; border: 1px solid #5294e2; background-color: #5294e2; } .url-highlighter { link-color: #a9caf1; } .notification, #notification-container { width: 34em; } .notification { font-size: 1em; color: #BAC3CF; padding: 12px 12px 12px 12px; spacing-rows: 4px; spacing-columns: 10px; border-image: url("common-assets/misc/notification.svg") 9 9 9 9; } .notification.multi-line-notification { padding-bottom: 12px; } .notification-unexpanded { min-height: 40px; height: 40px; } .notification-with-image { min-height: 159px; } .notification-scrollview { max-height: 10em; -st-vfade-offset: 0px; } .notification-scrollview:ltr > StScrollBar { padding-left: 6px; } .notification-scrollview:rtl > StScrollBar { padding-right: 6px; } .notification-body { spacing: 5px; } .notification-actions { padding-top: 12px; spacing: 10px; } .notification-button { -st-natural-width: 140px; padding: 4px 4px 5px; background-gradient-direction: none; } .notification-button:focus { -st-natural-width: 140px; padding: 4px 4px 5px; } .notification-icon-button { border-radius: 5px; padding: 5px; background-gradient-direction: none; } .notification-icon-button:focus { padding: 5px; } .notification-icon-button > StIcon { icon-size: 16px; padding: 8px; } .notification StEntry { padding: 7px; caret-color: #BAC3CF; color: #BAC3CF; background-color: rgba(102, 109, 132, 0.35); border: 1px solid rgba(26, 28, 34, 0.35); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } .notification StEntry:focus { color: #ffffff; background-color: #5294e2; border: 1px solid #5294e2; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } .secondary-icon { icon-size: 1.09em; } .chat-body { spacing: 5px; } .chat-response { margin: 5px; } .chat-log-message { color: #BAC3CF; } .chat-new-group { padding-top: 1em; } .chat-received { padding-left: 4px; } .chat-received:rtl { padding-left: 0px; padding-right: 4px; } StEntry.chat-response { padding: 7px; color: #BAC3CF; background-color: rgba(102, 109, 132, 0.35); border: 1px solid rgba(26, 28, 34, 0.35); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } StEntry.chat-response:focus { color: #ffffff; background-color: #5294e2; border: 1px solid #5294e2; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } .chat-sent { padding-left: 18pt; color: #5294e2; } .chat-sent:rtl { padding-left: 0; padding-right: 18pt; } .chat-meta-message { padding-left: 4px; font-size: 9pt; font-weight: bold; color: rgba(186, 195, 207, 0.6); } .chat-meta-message:rtl { padding-left: 0; padding-right: 4px; } .subscription-message { font-style: italic; } .hotplug-transient-box { spacing: 6px; padding: 2px 72px 2px 12px; } .hotplug-notification-item { padding: 2px 10px; } .hotplug-notification-item:focus { padding: 2px 10px; } .hotplug-notification-item-icon { icon-size: 24px; padding: 2px 5px; } .hotplug-resident-box { spacing: 8px; } .hotplug-resident-mount { spacing: 8px; border-radius: 2px 0 0 2px; background-gradient-direction: none; } .hotplug-resident-mount-label { color: inherit; padding-left: 6px; } .hotplug-resident-mount-icon { icon-size: 24px; padding-left: 6px; } .hotplug-resident-eject-icon { icon-size: 16px; } .hotplug-resident-eject-button { padding: 7px; border-radius: 0 2px 2px 0; color: #BAC3CF; border-left: none; } .magnifier-zoom-region { border: 2px solid #5294e2; } .magnifier-zoom-region.full-screen { border-width: 0; } #keyboard { background-color: rgba(53, 57, 69, 0.95); border-width: 0; border-top-width: 1px; border-color: rgba(0, 0, 0, 0.2); } .keyboard-layout { spacing: 10px; padding: 10px; } .keyboard-row { spacing: 15px; } .keyboard-key { min-height: 2em; min-width: 2em; font-size: 14pt; font-weight: bold; border-radius: 3px; box-shadow: none; background-gradient-direction: none; text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(102, 109, 132, 0.35); } .keyboard-key:hover { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #BAC3CF; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(119, 127, 151, 0.45); } .keyboard-key:active, .keyboard-key:checked { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #ffffff; border: 1px solid #5294e2; background-color: #5294e2; } .keyboard-key:grayed { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #5d626e; border: 1px solid rgba(0, 0, 0, 0.35); background-color: rgba(102, 109, 132, 0.2); } .keyboard-subkeys { color: #BAC3CF; padding: 5px; -arrow-border-radius: 2px; -arrow-background-color: rgba(53, 57, 69, 0.95); -arrow-border-width: 1px; -arrow-border-color: rgba(0, 0, 0, 0.4); -arrow-base: 20px; -arrow-rise: 10px; -boxpointer-gap: 5px; } .candidate-popup-content { padding: 0.5em; spacing: 0.3em; color: #BAC3CF; font-size: 1.15em; } .candidate-index { padding: 0 0.5em 0 0; color: #d8dde4; } .candidate-box { padding: 0.3em 0.5em 0.3em 0.5em; border-radius: 2px; color: #BAC3CF; } .candidate-box:selected, .candidate-box:hover { background-color: #5294e2; color: #ffffff; } .candidate-page-button-box { height: 2em; } .vertical .candidate-page-button-box { padding-top: 0.5em; } .horizontal .candidate-page-button-box { padding-left: 0.5em; } .candidate-page-button { padding: 4px; } .candidate-page-button-previous { border-radius: 2px 0px 0px 2px; border-right-width: 0; } .candidate-page-button-next { border-radius: 0px 2px 2px 0px; } .candidate-page-button-icon { icon-size: 1em; } .framed-user-icon { background-size: contain; border: 0px solid transparent; color: #D3DAE3; border-radius: 2px; } .framed-user-icon:hover { border-color: transparent; color: white; } .login-dialog-banner-view { padding-top: 24px; max-width: 23em; } .login-dialog { border: none; background-color: transparent; } .login-dialog .modal-dialog-button-box { spacing: 3px; } .login-dialog .modal-dialog-button { padding: 3px 18px; } .login-dialog .modal-dialog-button:default { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #D3DAE3; background-color: #444a58; border: 1px solid #2b2e39; box-shadow: inset 0 2px 4px rgba(68, 74, 88, 0.05); } .login-dialog .modal-dialog-button:default:hover, .login-dialog .modal-dialog-button:default:focus { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #D3DAE3; background-color: #505666; border: 1px solid #2b2e39; box-shadow: inset 0 2px 4px rgba(80, 86, 102, 0.05); } .login-dialog .modal-dialog-button:default:active { text-shadow: 0 1px rgba(64, 69, 82, 0); color: #ffffff; background-color: #5294e2; border: 1px solid #5294e2; box-shadow: inset 0 1px rgba(82, 148, 226, 0.05); } .login-dialog .modal-dialog-button:default:insensitive { text-shadow: 0 1px rgba(64, 69, 82, 0); color: rgba(211, 218, 227, 0.45); border: 1px solid rgba(43, 46, 57, 0.55); background-color: rgba(68, 74, 88, 0.55); box-shadow: inset 0 2px 4px rgba(68, 74, 88, 0.05); } .login-dialog-logo-bin { padding: 24px 0px; } .login-dialog-banner { color: #9ca9ba; } .login-dialog-button-box { spacing: 5px; } .login-dialog-message-warning { color: #F27835; } .login-dialog-message-hint { padding-top: 0; padding-bottom: 20px; } .login-dialog-user-selection-box { padding: 100px 0px; } .login-dialog-user-selection-box .login-dialog-not-listed-label { padding-left: 2px; } .login-dialog-not-listed-button:focus .login-dialog-user-selection-box .login-dialog-not-listed-label, .login-dialog-not-listed-button:hover .login-dialog-user-selection-box .login-dialog-not-listed-label { color: #BAC3CF; } .login-dialog-not-listed-label { font-size: 90%; font-weight: bold; color: #62758e; padding-top: 1em; } .login-dialog-user-list-view { -st-vfade-offset: 1em; } .login-dialog-user-list { spacing: 12px; padding: .2em; width: 23em; } .login-dialog-user-list:expanded .login-dialog-user-list-item:focus { background-color: #5294e2; color: #ffffff; } .login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in { border-right: 2px solid #5294e2; } .login-dialog-user-list-item { border-radius: 5px; padding: .2em; color: #62758e; } .login-dialog-user-list-item:ltr { padding-right: 1em; } .login-dialog-user-list-item:rtl { padding-left: 1em; } .login-dialog-user-list-item:hover { background-color: #5294e2; color: #ffffff; } .login-dialog-user-list-item .login-dialog-timed-login-indicator { height: 2px; margin: 2px 0 0 0; background-color: #BAC3CF; } .login-dialog-user-list-item:focus .login-dialog-timed-login-indicator { background-color: #ffffff; } .login-dialog-username, .user-widget-label { color: #BAC3CF; font-size: 120%; font-weight: bold; text-align: left; padding-left: 15px; } .user-widget-label:ltr { padding-left: 18px; } .user-widget-label:rtl { padding-right: 18px; } .login-dialog-prompt-layout { padding-top: 24px; padding-bottom: 12px; spacing: 8px; width: 23em; } .login-dialog-prompt-label { color: #7e8fa5; font-size: 110%; padding-top: 1em; } .login-dialog-session-list-button StIcon { icon-size: 1.25em; } .login-dialog-session-list-button { color: #62758e; } .login-dialog-session-list-button:hover, .login-dialog-session-list-button:focus { color: #BAC3CF; } .login-dialog-session-list-button:active { color: #394351; } .screen-shield-arrows { padding-bottom: 3em; } .screen-shield-arrows Gjs_Arrow { color: white; width: 80px; height: 48px; -arrow-thickness: 12px; -arrow-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); } .screen-shield-clock { color: white; text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6); font-weight: bold; text-align: center; padding-bottom: 1.5em; } .screen-shield-clock-time { font-size: 72pt; text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.4); } .screen-shield-clock-date { font-size: 28pt; } .screen-shield-notifications-container { spacing: 6px; width: 30em; background-color: transparent; max-height: 500px; } .screen-shield-notifications-container .summary-notification-stack-scrollview { padding-top: 0; padding-bottom: 0; } .screen-shield-notifications-container .notification, .screen-shield-notifications-container .screen-shield-notification-source { padding: 12px 6px; border: 1px solid rgba(186, 195, 207, 0.2); background-color: rgba(53, 57, 69, 0.45); color: #BAC3CF; border-radius: 4px; } .screen-shield-notifications-container .notification { margin-right: 15px; } .screen-shield-notification-label { font-weight: bold; padding: 0px 0px 0px 12px; } .screen-shield-notification-count-text { padding: 0px 0px 0px 12px; } #panel.lock-screen { background-color: rgba(53, 57, 69, 0.5); } .screen-shield-background { background: black; box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4); } #lockDialogGroup { background: #2e3436 url(misc/noise-texture.png); background-repeat: repeat; } #screenShieldNotifications StButton#vhandle, #screenShieldNotifications StButton#hhandle { background-color: rgba(56, 60, 74, 0.3); } #screenShieldNotifications StButton#vhandle:hover, #screenShieldNotifications StButton#vhandle:focus, #screenShieldNotifications StButton#hhandle:hover, #screenShieldNotifications StButton#hhandle:focus { background-color: rgba(56, 60, 74, 0.5); } #screenShieldNotifications StButton#vhandle:active, #screenShieldNotifications StButton#hhandle:active { background-color: rgba(82, 148, 226, 0.5); } #LookingGlassDialog { spacing: 4px; padding: 8px 8px 10px 8px; background-color: rgba(0, 0, 0, 0.7); border: 1px solid black; border-image: url("common-assets/misc/bg.svg") 9 9 9 9; border-radius: 2px; color: #BAC3CF; } #LookingGlassDialog > #Toolbar { padding: 3px; border: none; background-color: transparent; border-radius: 0px; } #LookingGlassDialog .labels { spacing: 4px; } #LookingGlassDialog .notebook-tab { -natural-hpadding: 12px; -minimum-hpadding: 6px; font-weight: bold; color: #BAC3CF; transition-duration: 100ms; padding-left: .3em; padding-right: .3em; } #LookingGlassDialog .notebook-tab:hover { color: white; text-shadow: black 0px 2px 2px; } #LookingGlassDialog .notebook-tab:selected { border-bottom-width: 0px; color: #5294e2; text-shadow: black 0px 2px 2px; } #LookingGlassDialog StBoxLayout#EvalBox { padding: 4px; spacing: 4px; } #LookingGlassDialog StBoxLayout#ResultsArea { spacing: 4px; } .lg-dialog StEntry { selection-background-color: #5294e2; selected-color: #ffffff; color: #BAC3CF; background-color: rgba(102, 109, 132, 0.35); border: 1px solid rgba(26, 28, 34, 0.35); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } .lg-dialog StEntry:focus { color: #ffffff; background-color: #5294e2; border: 1px solid #5294e2; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); } .lg-dialog .shell-link { color: #a9caf1; } .lg-dialog .shell-link:hover { color: #d5e5f8; } .lg-completions-text { font-size: .9em; font-style: italic; } .lg-obj-inspector-title { spacing: 4px; } .lg-obj-inspector-button { border: 1px solid gray; padding: 4px; border-radius: 4px; } .lg-obj-inspector-button:hover { border: 1px solid #ffffff; } #lookingGlassExtensions { padding: 4px; } .lg-extensions-list { padding: 4px; spacing: 6px; } .lg-extension { border: 1px solid rgba(0, 0, 0, 0.7); border-radius: 2px; background-color: rgba(53, 57, 69, 0.95); padding: 4px; } .lg-extension-name { font-weight: bold; } .lg-extension-meta { spacing: 6px; } #LookingGlassPropertyInspector { background: rgba(0, 0, 0, 0.7); border: 1px solid grey; border-radius: 2px; padding: 6px; }
{ "pile_set_name": "Github" }
# Chrome Extensions Archive: No updates since Feb 4. 2019 **In maintenance: disk is full ! (2 To)** The goal is to provide a complete archive of the chrome web store with version history. You can see the current status of what's archived and download the files here: [dam.io/chrome-extensions-archive/](http://dam.io/chrome-extensions-archive/) ## Installing the extensions To install an extension, go to `chrome://extensions/` and drop the file. To avoid the auto-update, [load it as an unpacked extension](http://stackoverflow.com/a/24577660/1075195) Files are named as `.zip` but they are the exact same `.crx` stored on the store. ## Running the scripts **scripts are python 3.5+ only** Install dependencies: `pip3 install -r req.txt` Create some folders and initialize some files: ``` mkdir data mkdir crawled mkdir crawled/sitemap mkdir crawled/pages mkdir crawled/crx mkdir crawled/tmp mkdir ../site mkdir ../site/chrome-extensions-archive mkdir ../site/chrome-extensions-archive/ext echo "{}" > data/not_in_sitemap.json ``` Crawling: - `crawl_sitemap.py`: gets you the list of all the extensions in `data/sitemap.json` - `crawl_crx.py`: use `data/sitemap.json` to download the crx Site & stats: - `scan_pages_history_to_big_list.py`: makes `data/PAGES.json` by scanning the pages you crawled - `crx_stats.py`: makes `data/crx_stats.json` (what's currently stored) - `make_site.py`: use `data/crx_stats.json` + `data/PAGES.json` to generate the site - `make_json_site.py`: `data/crx_stats.json` + `data/PAGES.json` to generate JSON Then I serve the files directly with nginx (see nginx.conf file for example) ## Helping out I have a few things in mind for the future: - diff of extensions versions as a web interface - malware/adware analysis - running an alternative web store (better search, firefox support,...) Don't hesitate to reach out (here on issues, [email protected] or @dam_io on twitter) To propose changes, just do a PR.
{ "pile_set_name": "Github" }
<h1><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/timezone','Live Helper Chat update');?></h1> <?php if (isset($updated) && $updated == 'done') : $msg = erTranslationClassLhTranslation::getInstance()->getTranslation('system/smtp','Settings updated'); ?> <?php include(erLhcoreClassDesign::designtpl('lhkernel/alert_success.tpl.php'));?> <?php endif; ?> <div class="row"> <div class="col-md-4"> <h3><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Your version')?> - <?php echo sprintf("%0.2f", erLhcoreClassUpdate::LHC_RELEASE/100);?></h3> <h3><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Current version')?> - <span class="text-success" id="recent-version">...</span></h3> <a class="btn btn-secondary btn-xs" rel="noreferrer" href="http://livehelperchat.com/news-5c.html" target="_blank"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','News')?></a> <a class="btn btn-secondary btn-xs" rel="noreferrer" href="http://livehelperchat.com/article/view/63" target="_blank"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Update instructions')?></a> </div> <div class="col-md-8"> <div id="status-db"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/timezone','Comparing current database structure, please wait...')?></div> </div> </div> <script> function updateDatabase() { $('#db-status-checked').hide(); $('#db-status-updating').show(); $.postJSON('<?php echo erLhcoreClassDesign::baseurl('system/update')?>/(action)/statusdbdoupdate',function(data){ $('#status-db').html(data.result); }); }; (function() { $.ajax({ url: 'https://livehelperchat.com/update/version', dataType: 'jsonp', jsonp: 'callback', jsonpCallback: 'jsonpCallbackLHC', success: function(data){ $('#recent-version').text((data.version/100).toFixed(2)); } }); $.postJSON('<?php echo erLhcoreClassDesign::baseurl('system/update')?>/(action)/statusdb',function(data){ $('#status-db').html(data.result); }); })(); </script>
{ "pile_set_name": "Github" }
""" This module contains useful utilities for GeoDjango. """ from django.contrib.gis.utils.ogrinfo import ogrinfo # NOQA from django.contrib.gis.utils.ogrinspect import mapping, ogrinspect # NOQA from django.contrib.gis.utils.srs import add_srs_entry # NOQA from django.contrib.gis.utils.wkt import precision_wkt # NOQA from django.core.exceptions import ImproperlyConfigured try: # LayerMapping requires DJANGO_SETTINGS_MODULE to be set, # so this needs to be in try/except. from django.contrib.gis.utils.layermapping import LayerMapping, LayerMapError # NOQA except ImproperlyConfigured: pass
{ "pile_set_name": "Github" }
/* * Copyright (C) 2013 Politecnico di Torino, Italy * TORSEC group -- http://security.polito.it * * Author: Roberto Sassu <[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, version 2 of the * License. * * File: ima_template_lib.h * Header for the library of supported template fields. */ #ifndef __LINUX_IMA_TEMPLATE_LIB_H #define __LINUX_IMA_TEMPLATE_LIB_H #include <linux/seq_file.h> #include "ima.h" #define ENFORCE_FIELDS 0x00000001 #define ENFORCE_BUFEND 0x00000002 void ima_show_template_digest(struct seq_file *m, enum ima_show_type show, struct ima_field_data *field_data); void ima_show_template_digest_ng(struct seq_file *m, enum ima_show_type show, struct ima_field_data *field_data); void ima_show_template_string(struct seq_file *m, enum ima_show_type show, struct ima_field_data *field_data); void ima_show_template_sig(struct seq_file *m, enum ima_show_type show, struct ima_field_data *field_data); int ima_parse_buf(void *bufstartp, void *bufendp, void **bufcurp, int maxfields, struct ima_field_data *fields, int *curfields, unsigned long *len_mask, int enforce_mask, char *bufname); int ima_eventdigest_init(struct ima_event_data *event_data, struct ima_field_data *field_data); int ima_eventname_init(struct ima_event_data *event_data, struct ima_field_data *field_data); int ima_eventdigest_ng_init(struct ima_event_data *event_data, struct ima_field_data *field_data); int ima_eventname_ng_init(struct ima_event_data *event_data, struct ima_field_data *field_data); int ima_eventsig_init(struct ima_event_data *event_data, struct ima_field_data *field_data); #endif /* __LINUX_IMA_TEMPLATE_LIB_H */
{ "pile_set_name": "Github" }
msgid "" msgstr "" "Project-Id-Version: red-discordbot\n" "POT-Creation-Date: 2020-05-21 12:08+0000\n" "Last-Translator: \n" "Language-Team: Afrikaans\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: redgettext 3.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: red-discordbot\n" "X-Crowdin-Project-ID: 289505\n" "X-Crowdin-Language: af\n" "X-Crowdin-File-ID: 51\n" "Language: af_ZA\n" #: redbot/cogs/audio/converters.py:33 msgid "\\nScope must be a valid version of one of the following:\\n​ ​ ​ ​ Global\\n​ ​ ​ ​ Guild\\n​ ​ ​ ​ User\\n" msgstr "" #: redbot/cogs/audio/converters.py:41 msgid "\\nAuthor must be a valid version of one of the following:\\n​ ​ ​ ​ User ID\\n​ ​ ​ ​ User Mention\\n​ ​ ​ ​ User Name#123\\n" msgstr "" #: redbot/cogs/audio/converters.py:49 msgid "\\nGuild must be a valid version of one of the following:\\n​ ​ ​ ​ Guild ID\\n​ ​ ​ ​ Exact guild name\\n" msgstr "" #: redbot/cogs/audio/converters.py:85 msgid "\\\"{arg}\\\" was not found. It must be the ID or complete name of a server which the bot can see." msgstr "" #: redbot/cogs/audio/converters.py:94 msgid "\\\"{arg}\\\" does not refer to a unique server. Please use the ID for the server you're trying to specify." msgstr "" #: redbot/cogs/audio/converters.py:125 msgid "\\\"{arg}\\\" was not found. It must be the ID or name or mention a user which the bot can see." msgstr "" #: redbot/cogs/audio/converters.py:134 msgid "\\\"{arg}\\\" does not refer to a unique server. Please use the ID for the server you're trying to specify." msgstr "" #: redbot/cogs/audio/converters.py:174 msgid "Could not match '{}' to a playlist." msgstr "" #: redbot/cogs/audio/converters.py:239 redbot/cogs/audio/converters.py:261 #: redbot/cogs/audio/converters.py:281 redbot/cogs/audio/converters.py:366 #: redbot/cogs/audio/converters.py:378 redbot/cogs/audio/converters.py:403 #: redbot/cogs/audio/converters.py:429 redbot/cogs/audio/converters.py:451 #: redbot/cogs/audio/converters.py:478 msgid "Nothing" msgstr "" #: redbot/cogs/audio/converters.py:259 msgid "You cannot use `--guild`" msgstr "" #: redbot/cogs/audio/converters.py:400 msgid "You cannot use `--to-server`" msgstr "" #: redbot/cogs/audio/converters.py:426 msgid "You cannot use `--from-server`" msgstr ""
{ "pile_set_name": "Github" }
/* * HA-JDBC: High-Availability JDBC * Copyright (C) 2013 Paul Ferraro * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.hajdbc.sql.io; import java.io.IOException; import java.io.OutputStream; import net.sf.hajdbc.Database; import net.sf.hajdbc.invocation.InvocationStrategies; import net.sf.hajdbc.invocation.Invoker; /** * Static proxy for OutputStreams * @author Paul Ferraro * @param <Z> connection source * @param <D> database * @param <P> parent type */ public class OutputStreamProxy<Z, D extends Database<Z>, P> extends OutputStream { private final OutputStreamProxyFactory<Z, D, P> factory; public OutputStreamProxy(OutputStreamProxyFactory<Z, D, P> factory) { this.factory = factory; } @Override public void write(final byte[] b, final int off, final int len) throws IOException { OutputStreamInvoker<Z, D> invoker = new OutputStreamInvoker<Z, D>() { @Override public Void invoke(D database, OutputStream output) throws IOException { output.write(b, off, len); return null; } }; InvocationStrategies.INVOKE_ON_EXISTING.invoke(this.factory, invoker); this.factory.record(invoker); } @Override public void write(final byte[] b) throws IOException { OutputStreamInvoker<Z, D> invoker = new OutputStreamInvoker<Z, D>() { @Override public Void invoke(D database, OutputStream output) throws IOException { output.write(b); return null; } }; InvocationStrategies.INVOKE_ON_EXISTING.invoke(this.factory, invoker); this.factory.record(invoker); } @Override public void write(final int b) throws IOException { OutputStreamInvoker<Z, D> invoker = new OutputStreamInvoker<Z, D>() { @Override public Void invoke(D database, OutputStream output) throws IOException { output.write(b); return null; } }; InvocationStrategies.INVOKE_ON_EXISTING.invoke(this.factory, invoker); this.factory.record(invoker); } @Override public void flush() throws IOException { OutputStreamInvoker<Z, D> invoker = new OutputStreamInvoker<Z, D>() { @Override public Void invoke(D database, OutputStream output) throws IOException { output.flush(); return null; } }; InvocationStrategies.INVOKE_ON_EXISTING.invoke(this.factory, invoker); this.factory.record(invoker); } @Override public void close() throws IOException { OutputStreamInvoker<Z, D> invoker = new OutputStreamInvoker<Z, D>() { @Override public Void invoke(D database, OutputStream output) throws IOException { output.close(); return null; } }; InvocationStrategies.INVOKE_ON_EXISTING.invoke(this.factory, invoker); this.factory.remove(); } private interface OutputStreamInvoker<Z, D extends Database<Z>> extends Invoker<Z, D, OutputStream, Void, IOException> { } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="questionnaire-lookupQuestionnaire"/> <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-lookupQuestionnaire"/> <name value="lookupQuestionnaire"/> <status value="draft"/> <date value="2013-07-04"/> <publisher value="HL7"/> <contact> <telecom> <system value="url"/> <value value="http://www.hl7.org"/> </telecom> </contact> <description value="For items of type reference, the reference can be populated either by picking an existing entity or by creating a new one. In the later case, this Questionnaire allows specifying the Questionnaire to use in creating the target instance. This can be direct (if the Reference is to a Questionnaire) or indirect via mapping if the Reference is to some other sort of resource."/> <fhirVersion value="1.9.0"/> <mapping> <identity value="rim"/> <uri value="http://hl7.org/v3"/> <name value="RIM Mapping"/> </mapping> <kind value="complex-type"/> <abstract value="false"/> <contextType value="resource"/> <context value="Questionnaire.item"/> <context value="Questionnaire.item.item"/> <contextInvariant value="type=&#39;reference&#39;"/> <type value="Extension"/> <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> <derivation value="constraint"/> <snapshot> <element id="Extension:lookupquestionnaire"> <path value="Extension"/> <short value="Questionnaire to populate a reference"/> <definition value="For items of type reference, the reference can be populated either by picking an existing entity or by creating a new one. In the later case, this Questionnaire allows specifying the Questionnaire to use in creating the target instance. This can be direct (if the Reference is to a Questionnaire) or indirect via mapping if the Reference is to some other sort of resource."/> <min value="0"/> <max value="1"/> <base> <path value="Extension"/> <min value="0"/> <max value="*"/> </base> <condition value="ele-1"/> <constraint> <key value="ele-1"/> <severity value="error"/> <human value="All FHIR elements must have a @value or children"/> <expression value="children().count() &gt; id.count()"/> <xpath value="@value|f:*|h:div"/> <source value="Element"/> </constraint> <constraint> <key value="ext-1"/> <severity value="error"/> <human value="Must have either extensions or value[x], not both"/> <expression value="extension.exists() != value.exists()"/> <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &#39;value&#39;)])"/> <source value="Extension"/> </constraint> <mapping> <identity value="rim"/> <map value="N/A (MIF-level)"/> </mapping> </element> <element id="Extension:lookupquestionnaire.id"> <path value="Extension.id"/> <representation value="xmlAttr"/> <short value="xml:id (or equivalent in JSON)"/> <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/> <min value="0"/> <max value="1"/> <base> <path value="Element.id"/> <min value="0"/> <max value="1"/> </base> <type> <code value="string"/> </type> <mapping> <identity value="rim"/> <map value="n/a"/> </mapping> </element> <element id="Extension:lookupquestionnaire.extension"> <path value="Extension.extension"/> <short value="Extension"/> <definition value="An Extension"/> <min value="0"/> <max value="0"/> <base> <path value="Element.extension"/> <min value="0"/> <max value="*"/> </base> <type> <code value="Extension"/> </type> </element> <element id="Extension:lookupquestionnaire.url"> <path value="Extension.url"/> <representation value="xmlAttr"/> <short value="identifies the meaning of the extension"/> <definition value="Source of the definition for the extension code - a logical name or a URL."/> <comment value="The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension."/> <min value="1"/> <max value="1"/> <base> <path value="Extension.url"/> <min value="1"/> <max value="1"/> </base> <type> <code value="uri"/> </type> <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-lookupQuestionnaire"/> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> <element id="Extension:lookupquestionnaire.valueUri"> <path value="Extension.valueUri"/> <short value="Value of extension"/> <definition value="Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)."/> <min value="0"/> <max value="1"/> <base> <path value="Extension.value[x]"/> <min value="0"/> <max value="1"/> </base> <type> <code value="uri"/> </type> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> </snapshot> <differential> <element id="Extension:lookupquestionnaire"> <path value="Extension"/> <short value="Questionnaire to populate a reference"/> <definition value="For items of type reference, the reference can be populated either by picking an existing entity or by creating a new one. In the later case, this Questionnaire allows specifying the Questionnaire to use in creating the target instance. This can be direct (if the Reference is to a Questionnaire) or indirect via mapping if the Reference is to some other sort of resource."/> <min value="0"/> <max value="1"/> <mapping> <identity value="rim"/> <map value="N/A (MIF-level)"/> </mapping> </element> <element id="Extension:lookupquestionnaire.extension"> <path value="Extension.extension"/> <max value="0"/> </element> <element id="Extension:lookupquestionnaire.url"> <path value="Extension.url"/> <type> <code value="uri"/> </type> <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-lookupQuestionnaire"/> </element> <element id="Extension:lookupquestionnaire.valueUri"> <path value="Extension.valueUri"/> <type> <code value="uri"/> </type> </element> </differential> </StructureDefinition>
{ "pile_set_name": "Github" }
package backoff import "time" // An Operation is executing by Retry() or RetryNotify(). // The operation will be retried using a backoff policy if it returns an error. type Operation func() error // Notify is a notify-on-error function. It receives an operation error and // backoff delay if the operation failed (with an error). // // NOTE that if the backoff policy stated to stop retrying, // the notify function isn't called. type Notify func(error, time.Duration) // Retry the operation o until it does not return error or BackOff stops. // o is guaranteed to be run at least once. // // If o returns a *PermanentError, the operation is not retried, and the // wrapped error is returned. // // Retry sleeps the goroutine for the duration returned by BackOff after a // failed operation returns. func Retry(o Operation, b BackOff) error { return RetryNotify(o, b, nil) } // RetryNotify calls notify function with the error and wait duration // for each failed attempt before sleep. func RetryNotify(operation Operation, b BackOff, notify Notify) error { var err error var next time.Duration var t *time.Timer cb := ensureContext(b) b.Reset() for { if err = operation(); err == nil { return nil } if permanent, ok := err.(*PermanentError); ok { return permanent.Err } if next = cb.NextBackOff(); next == Stop { return err } if notify != nil { notify(err, next) } if t == nil { t = time.NewTimer(next) defer t.Stop() } else { t.Reset(next) } select { case <-cb.Context().Done(): return err case <-t.C: } } } // PermanentError signals that the operation should not be retried. type PermanentError struct { Err error } func (e *PermanentError) Error() string { return e.Err.Error() } // Permanent wraps the given err in a *PermanentError. func Permanent(err error) *PermanentError { return &PermanentError{ Err: err, } }
{ "pile_set_name": "Github" }
# Acknowledgements This application makes use of the following third party libraries: ## AFNetworking Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## FMDB If you are using FMDB in your project, I'd love to hear about it. Let Gus know by sending an email to [email protected]. And if you happen to come across either Gus Mueller or Rob Ryan in a bar, you might consider purchasing a drink of their choosing if FMDB has been useful to you. Finally, and shortly, this is the MIT License. Copyright (c) 2008-2014 Flying Meat 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## GPUImage Copyright (c) 2012, Brad Larson, Ben Cochran, Hugues Lismonde, Keitaroh Kobayashi, Alaric Cole, Matthew Clark, Jacob Gundersen, Chris Williams. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. Neither the name of the GPUImage framework 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. ## IQKeyboardManager IQKeyboardManager license ========================= The MIT License (MIT) Copyright (c) 2013-14 Iftekhar Qurashi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## MBProgressHUD Copyright © 2009-2016 Matej Bukovinski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## MJExtension Copyright (c) 2013-2015 MJExtension (https://github.com/CoderMJLee/MJExtension) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## MJRefresh Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## SDWebImage Copyright (c) 2016 Olivier Poitrey [email protected] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Generated by CocoaPods - https://cocoapods.org
{ "pile_set_name": "Github" }
//===-------------- lib/Support/BranchProbability.cpp -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file implements Branch Probability class. // //===----------------------------------------------------------------------===// #include "llvm/Support/BranchProbability.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; raw_ostream &BranchProbability::print(raw_ostream &OS) const { return OS << N << " / " << D << " = " << format("%g%%", ((double)N / D) * 100.0); } void BranchProbability::dump() const { print(dbgs()) << '\n'; } static uint64_t scale(uint64_t Num, uint32_t N, uint32_t D) { assert(D && "divide by 0"); // Fast path for multiplying by 1.0. if (!Num || D == N) return Num; // Split Num into upper and lower parts to multiply, then recombine. uint64_t ProductHigh = (Num >> 32) * N; uint64_t ProductLow = (Num & UINT32_MAX) * N; // Split into 32-bit digits. uint32_t Upper32 = ProductHigh >> 32; uint32_t Lower32 = ProductLow & UINT32_MAX; uint32_t Mid32Partial = ProductHigh & UINT32_MAX; uint32_t Mid32 = Mid32Partial + (ProductLow >> 32); // Carry. Upper32 += Mid32 < Mid32Partial; // Check for overflow. if (Upper32 >= D) return UINT64_MAX; uint64_t Rem = (uint64_t(Upper32) << 32) | Mid32; uint64_t UpperQ = Rem / D; // Check for overflow. if (UpperQ > UINT32_MAX) return UINT64_MAX; Rem = ((Rem % D) << 32) | Lower32; uint64_t LowerQ = Rem / D; uint64_t Q = (UpperQ << 32) + LowerQ; // Check for overflow. return Q < LowerQ ? UINT64_MAX : Q; } uint64_t BranchProbability::scale(uint64_t Num) const { return ::scale(Num, N, D); } uint64_t BranchProbability::scaleByInverse(uint64_t Num) const { return ::scale(Num, D, N); }
{ "pile_set_name": "Github" }
//===- llvm/Analysis/DominanceFrontier.h - Dominator Frontiers --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines the DominanceFrontier class, which calculate and holds the // dominance frontier for a function. // // This should be considered deprecated, don't add any more uses of this data // structure. // //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H #define LLVM_ANALYSIS_DOMINANCEFRONTIER_H #include "llvm/Analysis/Dominators.h" #include <map> #include <set> namespace llvm { //===----------------------------------------------------------------------===// /// DominanceFrontierBase - Common base class for computing forward and inverse /// dominance frontiers for a function. /// class DominanceFrontierBase : public FunctionPass { public: typedef std::set<BasicBlock*> DomSetType; // Dom set for a bb typedef std::map<BasicBlock*, DomSetType> DomSetMapType; // Dom set map protected: DomSetMapType Frontiers; std::vector<BasicBlock*> Roots; const bool IsPostDominators; public: DominanceFrontierBase(char &ID, bool isPostDom) : FunctionPass(ID), IsPostDominators(isPostDom) {} /// getRoots - Return the root blocks of the current CFG. This may include /// multiple blocks if we are computing post dominators. For forward /// dominators, this will always be a single block (the entry node). /// inline const std::vector<BasicBlock*> &getRoots() const { return Roots; } /// isPostDominator - Returns true if analysis based of postdoms /// bool isPostDominator() const { return IsPostDominators; } virtual void releaseMemory() { Frontiers.clear(); } // Accessor interface: typedef DomSetMapType::iterator iterator; typedef DomSetMapType::const_iterator const_iterator; iterator begin() { return Frontiers.begin(); } const_iterator begin() const { return Frontiers.begin(); } iterator end() { return Frontiers.end(); } const_iterator end() const { return Frontiers.end(); } iterator find(BasicBlock *B) { return Frontiers.find(B); } const_iterator find(BasicBlock *B) const { return Frontiers.find(B); } iterator addBasicBlock(BasicBlock *BB, const DomSetType &frontier) { assert(find(BB) == end() && "Block already in DominanceFrontier!"); return Frontiers.insert(std::make_pair(BB, frontier)).first; } /// removeBlock - Remove basic block BB's frontier. void removeBlock(BasicBlock *BB) { assert(find(BB) != end() && "Block is not in DominanceFrontier!"); for (iterator I = begin(), E = end(); I != E; ++I) I->second.erase(BB); Frontiers.erase(BB); } void addToFrontier(iterator I, BasicBlock *Node) { assert(I != end() && "BB is not in DominanceFrontier!"); I->second.insert(Node); } void removeFromFrontier(iterator I, BasicBlock *Node) { assert(I != end() && "BB is not in DominanceFrontier!"); assert(I->second.count(Node) && "Node is not in DominanceFrontier of BB"); I->second.erase(Node); } /// compareDomSet - Return false if two domsets match. Otherwise /// return true; bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const { std::set<BasicBlock *> tmpSet; for (DomSetType::const_iterator I = DS2.begin(), E = DS2.end(); I != E; ++I) tmpSet.insert(*I); for (DomSetType::const_iterator I = DS1.begin(), E = DS1.end(); I != E; ) { BasicBlock *Node = *I++; if (tmpSet.erase(Node) == 0) // Node is in DS1 but not in DS2. return true; } if (!tmpSet.empty()) // There are nodes that are in DS2 but not in DS1. return true; // DS1 and DS2 matches. return false; } /// compare - Return true if the other dominance frontier base matches /// this dominance frontier base. Otherwise return false. bool compare(DominanceFrontierBase &Other) const { DomSetMapType tmpFrontiers; for (DomSetMapType::const_iterator I = Other.begin(), E = Other.end(); I != E; ++I) tmpFrontiers.insert(std::make_pair(I->first, I->second)); for (DomSetMapType::iterator I = tmpFrontiers.begin(), E = tmpFrontiers.end(); I != E; ) { BasicBlock *Node = I->first; const_iterator DFI = find(Node); if (DFI == end()) return true; if (compareDomSet(I->second, DFI->second)) return true; ++I; tmpFrontiers.erase(Node); } if (!tmpFrontiers.empty()) return true; return false; } /// print - Convert to human readable form /// virtual void print(raw_ostream &OS, const Module* = 0) const; /// dump - Dump the dominance frontier to dbgs(). void dump() const; }; //===------------------------------------- /// DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is /// used to compute a forward dominator frontiers. /// class DominanceFrontier : public DominanceFrontierBase { virtual void anchor(); public: static char ID; // Pass ID, replacement for typeid DominanceFrontier() : DominanceFrontierBase(ID, false) { initializeDominanceFrontierPass(*PassRegistry::getPassRegistry()); } BasicBlock *getRoot() const { assert(Roots.size() == 1 && "Should always have entry node!"); return Roots[0]; } virtual bool runOnFunction(Function &) { Frontiers.clear(); DominatorTree &DT = getAnalysis<DominatorTree>(); Roots = DT.getRoots(); assert(Roots.size() == 1 && "Only one entry block for forward domfronts!"); calculate(DT, DT[Roots[0]]); return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<DominatorTree>(); } const DomSetType &calculate(const DominatorTree &DT, const DomTreeNode *Node); }; } // End llvm namespace #endif
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>shiro-example</artifactId> <groupId>com.github.zhangkaitao</groupId> <version>1.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>shiro-example-chapter6</artifactId> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.9</version> <scope>test</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.3</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-core</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.25</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>0.2.23</version> </dependency> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache-core</artifactId> <version>2.6.6</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.0.0.RELEASE</version> </dependency> </dependencies> </project>
{ "pile_set_name": "Github" }
/* Area: ffi_call Purpose: Check structures. Limitations: none. PR: none. Originator: From the original ffitest.c */ /* { dg-do run } */ #include "ffitest.h" typedef struct { double d1; double d2; } test_structure_2; static test_structure_2 ABI_ATTR struct2(test_structure_2 ts) { ts.d1--; ts.d2--; return ts; } int main (void) { ffi_cif cif; ffi_type *args[MAX_ARGS]; void *values[MAX_ARGS]; test_structure_2 ts2_arg; ffi_type ts2_type; ffi_type *ts2_type_elements[3]; /* This is a hack to get a properly aligned result buffer */ test_structure_2 *ts2_result = (test_structure_2 *) malloc (sizeof(test_structure_2)); ts2_type.size = 0; ts2_type.alignment = 0; ts2_type.type = FFI_TYPE_STRUCT; ts2_type.elements = ts2_type_elements; ts2_type_elements[0] = &ffi_type_double; ts2_type_elements[1] = &ffi_type_double; ts2_type_elements[2] = NULL; args[0] = &ts2_type; values[0] = &ts2_arg; /* Initialize the cif */ CHECK(ffi_prep_cif(&cif, ABI_NUM, 1, &ts2_type, args) == FFI_OK); ts2_arg.d1 = 5.55; ts2_arg.d2 = 6.66; printf ("%g\n", ts2_arg.d1); printf ("%g\n", ts2_arg.d2); ffi_call(&cif, FFI_FN(struct2), ts2_result, values); printf ("%g\n", ts2_result->d1); printf ("%g\n", ts2_result->d2); CHECK(ts2_result->d1 == 5.55 - 1); CHECK(ts2_result->d2 == 6.66 - 1); free (ts2_result); exit(0); }
{ "pile_set_name": "Github" }
package check import ( "fmt" "io" "sync" ) // ----------------------------------------------------------------------- // Output writer manages atomic output writing according to settings. type outputWriter struct { m sync.Mutex writer io.Writer wroteCallProblemLast bool Stream bool Verbose bool } func newOutputWriter(writer io.Writer, stream, verbose bool) *outputWriter { return &outputWriter{writer: writer, Stream: stream, Verbose: verbose} } func (ow *outputWriter) Write(content []byte) (n int, err error) { ow.m.Lock() n, err = ow.writer.Write(content) ow.m.Unlock() return } func (ow *outputWriter) WriteCallStarted(label string, c *C) { if ow.Stream { header := renderCallHeader(label, c, "", "\n") ow.m.Lock() ow.writer.Write([]byte(header)) ow.m.Unlock() } } func (ow *outputWriter) WriteCallProblem(label string, c *C) { var prefix string if !ow.Stream { prefix = "\n-----------------------------------" + "-----------------------------------\n" } header := renderCallHeader(label, c, prefix, "\n\n") ow.m.Lock() ow.wroteCallProblemLast = true ow.writer.Write([]byte(header)) if !ow.Stream { c.logb.WriteTo(ow.writer) } ow.m.Unlock() } func (ow *outputWriter) WriteCallSuccess(label string, c *C) { if ow.Stream || (ow.Verbose && c.kind == testKd) { // TODO Use a buffer here. var suffix string if c.reason != "" { suffix = " (" + c.reason + ")" } if c.status() == succeededSt { suffix += "\t" + c.timerString() } suffix += "\n" if ow.Stream { suffix += "\n" } header := renderCallHeader(label, c, "", suffix) ow.m.Lock() // Resist temptation of using line as prefix above due to race. if !ow.Stream && ow.wroteCallProblemLast { header = "\n-----------------------------------" + "-----------------------------------\n" + header } ow.wroteCallProblemLast = false ow.writer.Write([]byte(header)) ow.m.Unlock() } } func renderCallHeader(label string, c *C, prefix, suffix string) string { pc := c.method.PC() return fmt.Sprintf("%s%s: %s: %s%s", prefix, label, niceFuncPath(pc), niceFuncName(pc), suffix) }
{ "pile_set_name": "Github" }
package me.saket.dank.ui.submission; import me.saket.dank.ui.submission.events.SubmissionChangeCommentSortClicked; import me.saket.dank.utils.DankSubmissionRequest; interface SubmissionUi { void showProgress(); void hideProgress(); void acceptRequest(DankSubmissionRequest lastRequest); void showChangeSortPopup(SubmissionChangeCommentSortClicked event, DankSubmissionRequest activeRequest); }
{ "pile_set_name": "Github" }
page 20037 "APIV1 - Sales Quotes" { APIVersion = 'v1.0'; Caption = 'salesQuotes', Locked = true; ChangeTrackingAllowed = true; DelayedInsert = true; EntityName = 'salesQuote'; EntitySetName = 'salesQuotes'; ODataKeyFields = Id; PageType = API; SourceTable = "Sales Quote Entity Buffer"; Extensible = false; layout { area(content) { repeater(Group) { field(id; Id) { Caption = 'id', Locked = true; Editable = false; trigger OnValidate() begin RegisterFieldSet(FIELDNO(Id)); end; } field(number; "No.") { Caption = 'number', Locked = true; Editable = false; trigger OnValidate() begin RegisterFieldSet(FIELDNO("No.")); end; } field(externalDocumentNumber; "External Document No.") { Caption = 'externalDocumentNumber', Locked = true; trigger OnValidate() begin RegisterFieldSet(FIELDNO("External Document No.")) end; } field(documentDate; "Document Date") { Caption = 'documentDate', Locked = true; trigger OnValidate() begin DocumentDateVar := "Document Date"; DocumentDateSet := TRUE; RegisterFieldSet(FIELDNO("Document Date")); end; } field(postingDate; "Posting Date") { Caption = 'postingDate', Locked = true; trigger OnValidate() begin PostingDateVar := "Posting Date"; PostingDateSet := TRUE; RegisterFieldSet(FIELDNO("Posting Date")); end; } field(dueDate; "Due Date") { Caption = 'dueDate', Locked = true; trigger OnValidate() begin DueDateVar := "Due Date"; DueDateSet := TRUE; RegisterFieldSet(FIELDNO("Due Date")); end; } field(customerId; "Customer Id") { Caption = 'customerId', Locked = true; trigger OnValidate() var O365SalesInvoiceMgmt: Codeunit "O365 Sales Invoice Mgmt"; begin IF NOT SellToCustomer.GetBySystemId("Customer Id") THEN ERROR(CouldNotFindSellToCustomerErr); O365SalesInvoiceMgmt.EnforceCustomerTemplateIntegrity(SellToCustomer); "Sell-to Customer No." := SellToCustomer."No."; RegisterFieldSet(FIELDNO("Customer Id")); RegisterFieldSet(FIELDNO("Sell-to Customer No.")); end; } field(contactId; "Contact Graph Id") { Caption = 'contactId', Locked = true; trigger OnValidate() var Contact: Record "Contact"; Customer: Record "Customer"; GraphIntContact: Codeunit "Graph Int. - Contact"; begin RegisterFieldSet(FIELDNO("Contact Graph Id")); IF "Contact Graph Id" = '' THEN ERROR(SellToContactIdHasToHaveValueErr); IF NOT GraphIntContact.FindOrCreateCustomerFromGraphContactSafe("Contact Graph Id", Customer, Contact) THEN EXIT; UpdateSellToCustomerFromSellToGraphContactId(Customer); IF Contact."Company No." = Customer."No." THEN BEGIN VALIDATE("Sell-to Contact No.", Contact."No."); VALIDATE("Sell-to Contact", Contact.Name); RegisterFieldSet(FIELDNO("Sell-to Contact No.")); RegisterFieldSet(FIELDNO("Sell-to Contact")); END; end; } field(customerNumber; "Sell-to Customer No.") { Caption = 'customerNumber', Locked = true; trigger OnValidate() var O365SalesInvoiceMgmt: Codeunit "O365 Sales Invoice Mgmt"; begin IF SellToCustomer."No." <> '' THEN BEGIN IF SellToCustomer."No." <> "Sell-to Customer No." THEN ERROR(SellToCustomerValuesDontMatchErr); EXIT; END; IF NOT SellToCustomer.GET("Sell-to Customer No.") THEN ERROR(CouldNotFindSellToCustomerErr); O365SalesInvoiceMgmt.EnforceCustomerTemplateIntegrity(SellToCustomer); "Customer Id" := SellToCustomer.SystemId; RegisterFieldSet(FIELDNO("Customer Id")); RegisterFieldSet(FIELDNO("Sell-to Customer No.")); end; } field(customerName; "Sell-to Customer Name") { Caption = 'customerName', Locked = true; Editable = false; } field(billToName; "Bill-to Name") { Caption = 'billToName', Locked = true; Editable = false; } field(billToCustomerId; "Bill-to Customer Id") { Caption = 'billToCustomerId', Locked = true; trigger OnValidate() var O365SalesInvoiceMgmt: Codeunit "O365 Sales Invoice Mgmt"; begin IF NOT BillToCustomer.GetBySystemId("Bill-to Customer Id") THEN ERROR(CouldNotFindBillToCustomerErr); O365SalesInvoiceMgmt.EnforceCustomerTemplateIntegrity(BillToCustomer); "Bill-to Customer No." := BillToCustomer."No."; RegisterFieldSet(FIELDNO("Bill-to Customer Id")); RegisterFieldSet(FIELDNO("Bill-to Customer No.")); end; } field(billToCustomerNumber; "Bill-to Customer No.") { Caption = 'billToCustomerNumber', Locked = true; trigger OnValidate() var O365SalesInvoiceMgmt: Codeunit "O365 Sales Invoice Mgmt"; begin IF BillToCustomer."No." <> '' THEN BEGIN IF BillToCustomer."No." <> "Bill-to Customer No." THEN ERROR(BillToCustomerValuesDontMatchErr); EXIT; END; IF NOT BillToCustomer.GET("Bill-to Customer No.") THEN ERROR(CouldNotFindBillToCustomerErr); O365SalesInvoiceMgmt.EnforceCustomerTemplateIntegrity(BillToCustomer); "Bill-to Customer Id" := BillToCustomer.SystemId; RegisterFieldSet(FIELDNO("Bill-to Customer Id")); RegisterFieldSet(FIELDNO("Bill-to Customer No.")); end; } field(shipToName; "Ship-to Name") { Caption = 'shipToName', Locked = true; trigger OnValidate() begin if xRec."Ship-to Name" <> "Ship-to Name" then begin "Ship-to Code" := ''; RegisterFieldSet(FIELDNO("Ship-to Code")); RegisterFieldSet(FIELDNO("Ship-to Name")); end; end; } field(shipToContact; "Ship-to Contact") { Caption = 'shipToContact', Locked = true; trigger OnValidate() begin if xRec."Ship-to Contact" <> "Ship-to Contact" then begin "Ship-to Code" := ''; RegisterFieldSet(FIELDNO("Ship-to Code")); RegisterFieldSet(FIELDNO("Ship-to Contact")); end; end; } field(sellingPostalAddress; SellingPostalAddressJSONText) { Caption = 'sellingPostalAddress', Locked = true; ODataEDMType = 'POSTALADDRESS'; ToolTip = 'Specifies the selling address of the Sales Invoice.'; trigger OnValidate() begin SellingPostalAddressSet := TRUE; end; } field(billingPostalAddress; BillingPostalAddressJSONText) { Caption = 'billingPostalAddress', Locked = true; ODataEDMType = 'POSTALADDRESS'; ToolTip = 'Specifies the billing address of the Sales Invoice.'; trigger OnValidate() begin BillingPostalAddressSet := TRUE; end; } field(shippingPostalAddress; ShippingPostalAddressJSONText) { Caption = 'shippingPostalAddress', Locked = true; ODataEDMType = 'POSTALADDRESS'; ToolTip = 'Specifies the shipping address of the Sales Invoice.'; trigger OnValidate() begin ShippingPostalAddressSet := TRUE; end; } field(currencyId; "Currency Id") { Caption = 'currencyId', Locked = true; trigger OnValidate() begin IF "Currency Id" = BlankGUID THEN "Currency Code" := '' ELSE BEGIN IF NOT Currency.GetBySystemId("Currency Id") THEN ERROR(CurrencyIdDoesNotMatchACurrencyErr); "Currency Code" := Currency.Code; END; RegisterFieldSet(FIELDNO("Currency Id")); RegisterFieldSet(FIELDNO("Currency Code")); end; } field(currencyCode; CurrencyCodeTxt) { Caption = 'currencyCode', Locked = true; trigger OnValidate() begin "Currency Code" := GraphMgtGeneralTools.TranslateCurrencyCodeToNAVCurrencyCode( LCYCurrencyCode, COPYSTR(CurrencyCodeTxt, 1, MAXSTRLEN(LCYCurrencyCode))); IF Currency.Code <> '' THEN BEGIN IF Currency.Code <> "Currency Code" THEN ERROR(CurrencyValuesDontMatchErr); EXIT; END; IF "Currency Code" = '' THEN "Currency Id" := BlankGUID ELSE BEGIN IF NOT Currency.GET("Currency Code") THEN ERROR(CurrencyCodeDoesNotMatchACurrencyErr); "Currency Id" := Currency.SystemId; END; RegisterFieldSet(FIELDNO("Currency Id")); RegisterFieldSet(FIELDNO("Currency Code")); end; } field(paymentTermsId; "Payment Terms Id") { Caption = 'paymentTermsId', Locked = true; trigger OnValidate() begin IF "Payment Terms Id" = BlankGUID THEN "Payment Terms Code" := '' ELSE BEGIN IF NOT PaymentTerms.GetBySystemId("Payment Terms Id") THEN ERROR(PaymentTermsIdDoesNotMatchAPaymentTermsErr); "Payment Terms Code" := PaymentTerms.Code; END; RegisterFieldSet(FIELDNO("Payment Terms Id")); RegisterFieldSet(FIELDNO("Payment Terms Code")); end; } field(shipmentMethodId; "Shipment Method Id") { Caption = 'shipmentMethodId', Locked = true; trigger OnValidate() begin IF "Shipment Method Id" = BlankGUID THEN "Shipment Method Code" := '' ELSE BEGIN IF NOT ShipmentMethod.GetBySystemId("Shipment Method Id") THEN ERROR(ShipmentMethodIdDoesNotMatchAShipmentMethodErr); "Shipment Method Code" := ShipmentMethod.Code; END; RegisterFieldSet(FIELDNO("Shipment Method Id")); RegisterFieldSet(FIELDNO("Shipment Method Code")); end; } field(salesperson; "Salesperson Code") { Caption = 'salesperson', Locked = true; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Salesperson Code")); end; } part(salesQuoteLines; 20045) { Caption = 'Lines', Locked = true; EntityName = 'salesQuoteLine'; EntitySetName = 'salesQuoteLines'; SubPageLink = "Document Id" = FIELD(Id); } part(pdfDocument; 5529) { Caption = 'PDF Document', Locked = true; EntityName = 'pdfDocument'; EntitySetName = 'pdfDocument'; SubPageLink = "Document Id" = FIELD(Id); } field(discountAmount; "Invoice Discount Amount") { Caption = 'discountAmount', Locked = true; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Invoice Discount Amount")); InvoiceDiscountAmount := "Invoice Discount Amount"; DiscountAmountSet := TRUE; end; } field(totalAmountExcludingTax; Amount) { Caption = 'totalAmountExcludingTax', Locked = true; Editable = false; } field(totalTaxAmount; "Total Tax Amount") { Caption = 'totalTaxAmount', Locked = true; Editable = false; ToolTip = 'Specifies the total tax amount for the sales invoice.'; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Total Tax Amount")); end; } field(totalAmountIncludingTax; "Amount Including VAT") { Caption = 'totalAmountIncludingTax', Locked = true; Editable = false; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Amount Including VAT")); end; } field(status; Status) { Caption = 'status', Locked = true; Editable = false; ToolTip = 'Specifies the status of the Sales Quote (Draft,Sent,Accepted).'; trigger OnValidate() begin RegisterFieldSet(FIELDNO(Status)); end; } field(sentDate; "Quote Sent to Customer") { Caption = 'sentDate', Locked = true; } field(validUntilDate; "Quote Valid Until Date") { Caption = 'validUntilDate', Locked = true; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Quote Valid Until Date")); end; } field(acceptedDate; "Quote Accepted Date") { Caption = 'acceptedDate', Locked = true; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Quote Accepted Date")); end; } field(lastModifiedDateTime; "Last Modified Date Time") { Caption = 'lastModifiedDateTime', Locked = true; Editable = false; } field(phoneNumber; "Sell-to Phone No.") { Caption = 'phoneNumber', Locked = true; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Sell-to Phone No.")); end; } field(email; "Sell-to E-Mail") { Caption = 'email', Locked = true; trigger OnValidate() begin RegisterFieldSet(FIELDNO("Sell-to E-Mail")); end; } } } } actions { } trigger OnAfterGetRecord() var GraphMgtSalesQuoteBuffer: Codeunit "Graph Mgt - Sales Quote Buffer"; begin SetCalculatedFields(); if HasWritePermission then GraphMgtSalesQuoteBuffer.RedistributeInvoiceDiscounts(Rec); end; trigger OnDeleteRecord(): Boolean var GraphMgtSalesQuoteBuffer: Codeunit "Graph Mgt - Sales Quote Buffer"; begin GraphMgtSalesQuoteBuffer.PropagateOnDelete(Rec); EXIT(FALSE); end; trigger OnInsertRecord(BelowxRec: Boolean): Boolean var GraphMgtSalesQuoteBuffer: Codeunit "Graph Mgt - Sales Quote Buffer"; begin CheckSellToCustomerSpecified(); ProcessSellingPostalAddressOnInsert(); ProcessBillingPostalAddressOnInsert(); ProcessShippingPostalAddressOnInsert(); GraphMgtSalesQuoteBuffer.PropagateOnInsert(Rec, TempFieldBuffer); SetDates(); UpdateDiscount(); SetCalculatedFields(); EXIT(FALSE); end; trigger OnModifyRecord(): Boolean var GraphMgtSalesQuoteBuffer: Codeunit "Graph Mgt - Sales Quote Buffer"; begin IF xRec.Id <> Id THEN ERROR(CannotChangeIDErr); ProcessSellingPostalAddressOnModify(); ProcessBillingPostalAddressOnModify(); ProcessShippingPostalAddressOnModify(); GraphMgtSalesQuoteBuffer.PropagateOnModify(Rec, TempFieldBuffer); UpdateDiscount(); SetCalculatedFields(); EXIT(FALSE); end; trigger OnNewRecord(BelowxRec: Boolean) begin ClearCalculatedFields(); end; trigger OnOpenPage() begin CheckPermissions(); end; var TempFieldBuffer: Record "Field Buffer" temporary; SellToCustomer: Record "Customer"; BillToCustomer: Record "Customer"; Currency: Record "Currency"; PaymentTerms: Record "Payment Terms"; ShipmentMethod: Record "Shipment Method"; GraphMgtGeneralTools: Codeunit "Graph Mgt - General Tools"; LCYCurrencyCode: Code[10]; SellingPostalAddressJSONText: Text; BillingPostalAddressJSONText: Text; ShippingPostalAddressJSONText: Text; CurrencyCodeTxt: Text; SellingPostalAddressSet: Boolean; BillingPostalAddressSet: Boolean; ShippingPostalAddressSet: Boolean; CouldNotFindSellToCustomerErr: Label 'The sell-to customer cannot be found.', Locked = true; CouldNotFindBillToCustomerErr: Label 'The bill-to customer cannot be found.', Locked = true; SellToContactIdHasToHaveValueErr: Label 'Sell-to contact Id must have a value set.', Locked = true; CannotChangeIDErr: Label 'The id cannot be changed.', Locked = true; SellToCustomerNotProvidedErr: Label 'A customerNumber or a customerId must be provided.', Locked = true; SellToCustomerValuesDontMatchErr: Label 'The sell-to customer values do not match to a specific Customer.', Locked = true; BillToCustomerValuesDontMatchErr: Label 'The bill-to customer values do not match to a specific Customer.', Locked = true; SalesQuotePermissionsErr: Label 'You do not have permissions to read Sales Quotes.'; CurrencyValuesDontMatchErr: Label 'The currency values do not match to a specific Currency.', Locked = true; CurrencyIdDoesNotMatchACurrencyErr: Label 'The "currencyId" does not match to a Currency.', Locked = true; CurrencyCodeDoesNotMatchACurrencyErr: Label 'The "currencyCode" does not match to a Currency.', Locked = true; PaymentTermsIdDoesNotMatchAPaymentTermsErr: Label 'The "paymentTermsId" does not match to a Payment Terms.', Locked = true; ShipmentMethodIdDoesNotMatchAShipmentMethodErr: Label 'The "shipmentMethodId" does not match to a Shipment Method.', Locked = true; DiscountAmountSet: Boolean; InvoiceDiscountAmount: Decimal; BlankGUID: Guid; DocumentDateSet: Boolean; DocumentDateVar: Date; PostingDateSet: Boolean; PostingDateVar: Date; DueDateSet: Boolean; DueDateVar: Date; CannotFindQuoteErr: Label 'The quote cannot be found.', Locked = true; HasWritePermission: Boolean; local procedure SetCalculatedFields() var GraphMgtSalesQuote: Codeunit "Graph Mgt - Sales Quote"; begin SellingPostalAddressJSONText := GraphMgtSalesQuote.SellToCustomerAddressToJSON(Rec); BillingPostalAddressJSONText := GraphMgtSalesQuote.BillToCustomerAddressToJSON(Rec); ShippingPostalAddressJSONText := GraphMgtSalesQuote.ShipToCustomerAddressToJSON(Rec); CurrencyCodeTxt := GraphMgtGeneralTools.TranslateNAVCurrencyCodeToCurrencyCode(LCYCurrencyCode, "Currency Code"); end; local procedure ClearCalculatedFields() begin CLEAR(SellingPostalAddressJSONText); CLEAR(BillingPostalAddressJSONText); CLEAR(ShippingPostalAddressJSONText); CLEAR(DiscountAmountSet); CLEAR(InvoiceDiscountAmount); TempFieldBuffer.DELETEALL(); end; local procedure RegisterFieldSet(FieldNo: Integer) var LastOrderNo: Integer; begin LastOrderNo := 1; IF TempFieldBuffer.FINDLAST() THEN LastOrderNo := TempFieldBuffer.Order + 1; CLEAR(TempFieldBuffer); TempFieldBuffer.Order := LastOrderNo; TempFieldBuffer."Table ID" := DATABASE::"Sales Quote Entity Buffer"; TempFieldBuffer."Field ID" := FieldNo; TempFieldBuffer.INSERT(); end; local procedure CheckSellToCustomerSpecified() begin IF ("Sell-to Customer No." = '') AND ("Customer Id" = BlankGUID) THEN ERROR(SellToCustomerNotProvidedErr); end; local procedure ProcessSellingPostalAddressOnInsert() var GraphMgtSalesQuote: Codeunit "Graph Mgt - Sales Quote"; begin IF NOT SellingPostalAddressSet THEN EXIT; GraphMgtSalesQuote.ParseSellToCustomerAddressFromJSON(SellingPostalAddressJSONText, Rec); RegisterFieldSet(FIELDNO("Sell-to Address")); RegisterFieldSet(FIELDNO("Sell-to Address 2")); RegisterFieldSet(FIELDNO("Sell-to City")); RegisterFieldSet(FIELDNO("Sell-to Country/Region Code")); RegisterFieldSet(FIELDNO("Sell-to Post Code")); RegisterFieldSet(FIELDNO("Sell-to County")); end; local procedure ProcessSellingPostalAddressOnModify() var GraphMgtSalesQuote: Codeunit "Graph Mgt - Sales Quote"; begin IF NOT SellingPostalAddressSet THEN EXIT; GraphMgtSalesQuote.ParseSellToCustomerAddressFromJSON(SellingPostalAddressJSONText, Rec); IF xRec."Sell-to Address" <> "Sell-to Address" THEN RegisterFieldSet(FIELDNO("Sell-to Address")); IF xRec."Sell-to Address 2" <> "Sell-to Address 2" THEN RegisterFieldSet(FIELDNO("Sell-to Address 2")); IF xRec."Sell-to City" <> "Sell-to City" THEN RegisterFieldSet(FIELDNO("Sell-to City")); IF xRec."Sell-to Country/Region Code" <> "Sell-to Country/Region Code" THEN RegisterFieldSet(FIELDNO("Sell-to Country/Region Code")); IF xRec."Sell-to Post Code" <> "Sell-to Post Code" THEN RegisterFieldSet(FIELDNO("Sell-to Post Code")); IF xRec."Sell-to County" <> "Sell-to County" THEN RegisterFieldSet(FIELDNO("Sell-to County")); end; local procedure ProcessBillingPostalAddressOnInsert() var GraphMgtSalesQuote: Codeunit "Graph Mgt - Sales Quote"; begin IF NOT BillingPostalAddressSet THEN EXIT; GraphMgtSalesQuote.ParseBillToCustomerAddressFromJSON(BillingPostalAddressJSONText, Rec); RegisterFieldSet(FIELDNO("Bill-to Address")); RegisterFieldSet(FIELDNO("Bill-to Address 2")); RegisterFieldSet(FIELDNO("Bill-to City")); RegisterFieldSet(FIELDNO("Bill-to Country/Region Code")); RegisterFieldSet(FIELDNO("Bill-to Post Code")); RegisterFieldSet(FIELDNO("Bill-to County")); end; local procedure ProcessBillingPostalAddressOnModify() var GraphMgtSalesQuote: Codeunit "Graph Mgt - Sales Quote"; begin IF NOT BillingPostalAddressSet THEN EXIT; GraphMgtSalesQuote.ParseBillToCustomerAddressFromJSON(BillingPostalAddressJSONText, Rec); IF xRec."Bill-to Address" <> "Bill-to Address" THEN RegisterFieldSet(FIELDNO("Bill-to Address")); IF xRec."Bill-to Address 2" <> "Bill-to Address 2" THEN RegisterFieldSet(FIELDNO("Bill-to Address 2")); IF xRec."Bill-to City" <> "Bill-to City" THEN RegisterFieldSet(FIELDNO("Bill-to City")); IF xRec."Bill-to Country/Region Code" <> "Bill-to Country/Region Code" THEN RegisterFieldSet(FIELDNO("Bill-to Country/Region Code")); IF xRec."Bill-to Post Code" <> "Bill-to Post Code" THEN RegisterFieldSet(FIELDNO("Bill-to Post Code")); IF xRec."Bill-to County" <> "Bill-to County" THEN RegisterFieldSet(FIELDNO("Bill-to County")); end; local procedure ProcessShippingPostalAddressOnInsert() var GraphMgtSalesQuote: Codeunit "Graph Mgt - Sales Quote"; begin if not ShippingPostalAddressSet then exit; GraphMgtSalesQuote.ParseShipToCustomerAddressFromJSON(ShippingPostalAddressJSONText, Rec); "Ship-to Code" := ''; RegisterFieldSet(FIELDNO("Ship-to Address")); RegisterFieldSet(FIELDNO("Ship-to Address 2")); RegisterFieldSet(FIELDNO("Ship-to City")); RegisterFieldSet(FIELDNO("Ship-to Country/Region Code")); RegisterFieldSet(FIELDNO("Ship-to Post Code")); RegisterFieldSet(FIELDNO("Ship-to County")); RegisterFieldSet(FIELDNO("Ship-to Code")); end; local procedure ProcessShippingPostalAddressOnModify() var GraphMgtSalesQuote: Codeunit "Graph Mgt - Sales Quote"; Changed: Boolean; begin if not ShippingPostalAddressSet then exit; GraphMgtSalesQuote.ParseShipToCustomerAddressFromJSON(ShippingPostalAddressJSONText, Rec); if xRec."Ship-to Address" <> "Ship-to Address" then begin RegisterFieldSet(FIELDNO("Ship-to Address")); Changed := true; end; if xRec."Ship-to Address 2" <> "Ship-to Address 2" then begin RegisterFieldSet(FIELDNO("Ship-to Address 2")); Changed := true; end; if xRec."Ship-to City" <> "Ship-to City" then begin RegisterFieldSet(FIELDNO("Ship-to City")); Changed := true; end; if xRec."Ship-to Country/Region Code" <> "Ship-to Country/Region Code" then begin RegisterFieldSet(FIELDNO("Ship-to Country/Region Code")); Changed := true; end; if xRec."Ship-to Post Code" <> "Ship-to Post Code" then begin RegisterFieldSet(FIELDNO("Ship-to Post Code")); Changed := true; end; if xRec."Ship-to County" <> "Ship-to County" then begin RegisterFieldSet(FIELDNO("Ship-to County")); Changed := true; end; if Changed then begin "Ship-to Code" := ''; RegisterFieldSet(FIELDNO("Ship-to Code")); end; end; local procedure UpdateSellToCustomerFromSellToGraphContactId(var Customer: Record Customer) var O365SalesInvoiceMgmt: Codeunit "O365 Sales Invoice Mgmt"; UpdateCustomer: Boolean; begin UpdateCustomer := "Sell-to Customer No." = ''; IF NOT UpdateCustomer THEN BEGIN TempFieldBuffer.RESET(); TempFieldBuffer.SETRANGE("Field ID", FIELDNO("Customer Id")); UpdateCustomer := NOT TempFieldBuffer.FINDFIRST(); TempFieldBuffer.RESET(); END; IF UpdateCustomer THEN BEGIN VALIDATE("Customer Id", Customer.SystemId); VALIDATE("Sell-to Customer No.", Customer."No."); RegisterFieldSet(FIELDNO("Customer Id")); RegisterFieldSet(FIELDNO("Sell-to Customer No.")); END; O365SalesInvoiceMgmt.EnforceCustomerTemplateIntegrity(Customer); end; local procedure CheckPermissions() var SalesHeader: Record "Sales Header"; begin SalesHeader.SETRANGE("Document Type", SalesHeader."Document Type"::Quote); IF NOT SalesHeader.READPERMISSION() THEN ERROR(SalesQuotePermissionsErr); HasWritePermission := SalesHeader.WRITEPERMISSION(); end; local procedure UpdateDiscount() var SalesHeader: Record "Sales Header"; GraphMgtSalesQuoteBuffer: Codeunit "Graph Mgt - Sales Quote Buffer"; SalesCalcDiscountByType: Codeunit "Sales - Calc Discount By Type"; begin IF NOT DiscountAmountSet THEN BEGIN GraphMgtSalesQuoteBuffer.RedistributeInvoiceDiscounts(Rec); EXIT; END; SalesHeader.GET(SalesHeader."Document Type"::Quote, "No."); SalesCalcDiscountByType.ApplyInvDiscBasedOnAmt(InvoiceDiscountAmount, SalesHeader); end; local procedure SetDates() var GraphMgtSalesQuoteBuffer: Codeunit "Graph Mgt - Sales Quote Buffer"; begin IF NOT (DueDateSet OR DocumentDateSet OR PostingDateSet) THEN EXIT; TempFieldBuffer.RESET(); TempFieldBuffer.DELETEALL(); IF DocumentDateSet THEN BEGIN "Document Date" := DocumentDateVar; RegisterFieldSet(FIELDNO("Document Date")); END; IF PostingDateSet THEN BEGIN "Posting Date" := PostingDateVar; RegisterFieldSet(FIELDNO("Posting Date")); END; IF DueDateSet THEN BEGIN "Due Date" := DueDateVar; RegisterFieldSet(FIELDNO("Due Date")); END; GraphMgtSalesQuoteBuffer.PropagateOnModify(Rec, TempFieldBuffer); FIND(); end; local procedure GetQuote(var SalesHeader: Record "Sales Header") begin IF NOT SalesHeader.GetBySystemId(Id) THEN ERROR(CannotFindQuoteErr); end; local procedure SetActionResponse(var ActionContext: WebServiceActionContext; var SalesHeader: Record "Sales Header") begin ActionContext.SetObjectType(ObjectType::Page); case SalesHeader."Document Type" of SalesHeader."Document Type"::Invoice: ActionContext.SetObjectId(Page::"APIV1 - Sales Invoices"); SalesHeader."Document Type"::Order: ActionContext.SetObjectId(Page::"APIV1 - Sales Orders"); SalesHeader."Document Type"::Quote: ActionContext.SetObjectId(Page::"APIV1 - Sales Quotes"); end; ActionContext.AddEntityKey(FieldNo(Id), SalesHeader.SystemId); ActionContext.SetResultCode(WebServiceActionResultCode::Deleted); end; [ServiceEnabled] [Scope('Cloud')] procedure MakeInvoice(var ActionContext: WebServiceActionContext) var SalesHeader: Record "Sales Header"; SalesQuoteToInvoice: Codeunit "Sales-Quote to Invoice"; begin GetQuote(SalesHeader); SalesHeader.SETRECFILTER(); SalesQuoteToInvoice.RUN(SalesHeader); SalesQuoteToInvoice.GetSalesInvoiceHeader(SalesHeader); SetActionResponse(ActionContext, SalesHeader); end; [ServiceEnabled] [Scope('Cloud')] procedure MakeOrder(var ActionContext: WebServiceActionContext) var SalesHeader: Record "Sales Header"; SalesQuoteToOrder: Codeunit "Sales-Quote to Order"; begin GetQuote(SalesHeader); SalesHeader.SETRECFILTER(); SalesQuoteToOrder.RUN(SalesHeader); SalesQuoteToOrder.GetSalesOrderHeader(SalesHeader); SetActionResponse(ActionContext, SalesHeader); end; [ServiceEnabled] [Scope('Cloud')] procedure Send(var ActionContext: WebServiceActionContext) var SalesHeader: Record "Sales Header"; APIV1SendSalesDocument: Codeunit "APIV1 - Send Sales Document"; begin GetQuote(SalesHeader); APIV1SendSalesDocument.SendQuote(SalesHeader); SetActionResponse(ActionContext, SalesHeader); end; }
{ "pile_set_name": "Github" }
/******************************************************************************* * Copyright (c) 2013 IBM Corporation and others. * 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: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.ws.jca.utils.metagen.internal; import java.io.File; import com.ibm.websphere.ras.annotation.Trivial; import com.ibm.ws.jca.utils.xml.ra.RaConnector; import com.ibm.ws.jca.utils.xml.wlp.ra.WlpRaConnector; /** * Used to hold RAR, ra.xml, wlp-ra.xml, and so on files for * a generator instance. */ @Trivial public class XmlFileSet { public File rarFile; public File raXmlFile; public File wlpRaXmlFile; public RaConnector parsedXml; public WlpRaConnector parsedWlpXml; public String rarRaXmlFilePath; public String rarWlpRaXmlFilePath; @Override public String toString() { StringBuilder sb = new StringBuilder("XmlFileSet{"); if (rarFile != null) sb.append("rarFile='").append(rarFile.getAbsolutePath()).append("' "); if (raXmlFile != null) sb.append("raXmlFile='").append(raXmlFile.getAbsolutePath()).append("' "); if (wlpRaXmlFile != null) sb.append("wlpRaXmlFile='").append(wlpRaXmlFile.getAbsolutePath()).append("' "); if (rarRaXmlFilePath != null) sb.append("rarRaXmlFilePath='").append(rarRaXmlFilePath).append("' "); if (rarWlpRaXmlFilePath != null) sb.append("wlpRaXmlFilePath='").append(rarWlpRaXmlFilePath).append("'"); sb.append('}'); return sb.toString(); } }
{ "pile_set_name": "Github" }
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control A"] pub ctrla: CTRLA, #[doc = "0x01 - Reference Control"] pub refctrl: REFCTRL, #[doc = "0x02 - Average Control"] pub avgctrl: AVGCTRL, #[doc = "0x03 - Sampling Time Control"] pub sampctrl: SAMPCTRL, #[doc = "0x04 - Control B"] pub ctrlb: CTRLB, _reserved5: [u8; 2usize], #[doc = "0x08 - Window Monitor Control"] pub winctrl: WINCTRL, _reserved6: [u8; 3usize], #[doc = "0x0c - Software Trigger"] pub swtrig: SWTRIG, _reserved7: [u8; 3usize], #[doc = "0x10 - Input Control"] pub inputctrl: INPUTCTRL, #[doc = "0x14 - Event Control"] pub evctrl: EVCTRL, _reserved9: [u8; 1usize], #[doc = "0x16 - Interrupt Enable Clear"] pub intenclr: INTENCLR, #[doc = "0x17 - Interrupt Enable Set"] pub intenset: INTENSET, #[doc = "0x18 - Interrupt Flag Status and Clear"] pub intflag: INTFLAG, #[doc = "0x19 - Status"] pub status: STATUS, #[doc = "0x1a - Result"] pub result: RESULT, #[doc = "0x1c - Window Monitor Lower Threshold"] pub winlt: WINLT, _reserved15: [u8; 2usize], #[doc = "0x20 - Window Monitor Upper Threshold"] pub winut: WINUT, _reserved16: [u8; 2usize], #[doc = "0x24 - Gain Correction"] pub gaincorr: GAINCORR, #[doc = "0x26 - Offset Correction"] pub offsetcorr: OFFSETCORR, #[doc = "0x28 - Calibration"] pub calib: CALIB, #[doc = "0x2a - Debug Control"] pub dbgctrl: DBGCTRL, } #[doc = "Control A\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrla](ctrla) module"] pub type CTRLA = crate::Reg<u8, _CTRLA>; #[allow(missing_docs)] #[doc(hidden)] pub struct _CTRLA; #[doc = "`read()` method returns [ctrla::R](ctrla::R) reader structure"] impl crate::Readable for CTRLA {} #[doc = "`write(|w| ..)` method takes [ctrla::W](ctrla::W) writer structure"] impl crate::Writable for CTRLA {} #[doc = "Control A"] pub mod ctrla; #[doc = "Reference Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [refctrl](refctrl) module"] pub type REFCTRL = crate::Reg<u8, _REFCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _REFCTRL; #[doc = "`read()` method returns [refctrl::R](refctrl::R) reader structure"] impl crate::Readable for REFCTRL {} #[doc = "`write(|w| ..)` method takes [refctrl::W](refctrl::W) writer structure"] impl crate::Writable for REFCTRL {} #[doc = "Reference Control"] pub mod refctrl; #[doc = "Average Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [avgctrl](avgctrl) module"] pub type AVGCTRL = crate::Reg<u8, _AVGCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _AVGCTRL; #[doc = "`read()` method returns [avgctrl::R](avgctrl::R) reader structure"] impl crate::Readable for AVGCTRL {} #[doc = "`write(|w| ..)` method takes [avgctrl::W](avgctrl::W) writer structure"] impl crate::Writable for AVGCTRL {} #[doc = "Average Control"] pub mod avgctrl; #[doc = "Sampling Time Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sampctrl](sampctrl) module"] pub type SAMPCTRL = crate::Reg<u8, _SAMPCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SAMPCTRL; #[doc = "`read()` method returns [sampctrl::R](sampctrl::R) reader structure"] impl crate::Readable for SAMPCTRL {} #[doc = "`write(|w| ..)` method takes [sampctrl::W](sampctrl::W) writer structure"] impl crate::Writable for SAMPCTRL {} #[doc = "Sampling Time Control"] pub mod sampctrl; #[doc = "Control B\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrlb](ctrlb) module"] pub type CTRLB = crate::Reg<u16, _CTRLB>; #[allow(missing_docs)] #[doc(hidden)] pub struct _CTRLB; #[doc = "`read()` method returns [ctrlb::R](ctrlb::R) reader structure"] impl crate::Readable for CTRLB {} #[doc = "`write(|w| ..)` method takes [ctrlb::W](ctrlb::W) writer structure"] impl crate::Writable for CTRLB {} #[doc = "Control B"] pub mod ctrlb; #[doc = "Window Monitor Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [winctrl](winctrl) module"] pub type WINCTRL = crate::Reg<u8, _WINCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _WINCTRL; #[doc = "`read()` method returns [winctrl::R](winctrl::R) reader structure"] impl crate::Readable for WINCTRL {} #[doc = "`write(|w| ..)` method takes [winctrl::W](winctrl::W) writer structure"] impl crate::Writable for WINCTRL {} #[doc = "Window Monitor Control"] pub mod winctrl; #[doc = "Software Trigger\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [swtrig](swtrig) module"] pub type SWTRIG = crate::Reg<u8, _SWTRIG>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SWTRIG; #[doc = "`read()` method returns [swtrig::R](swtrig::R) reader structure"] impl crate::Readable for SWTRIG {} #[doc = "`write(|w| ..)` method takes [swtrig::W](swtrig::W) writer structure"] impl crate::Writable for SWTRIG {} #[doc = "Software Trigger"] pub mod swtrig; #[doc = "Input Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [inputctrl](inputctrl) module"] pub type INPUTCTRL = crate::Reg<u32, _INPUTCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _INPUTCTRL; #[doc = "`read()` method returns [inputctrl::R](inputctrl::R) reader structure"] impl crate::Readable for INPUTCTRL {} #[doc = "`write(|w| ..)` method takes [inputctrl::W](inputctrl::W) writer structure"] impl crate::Writable for INPUTCTRL {} #[doc = "Input Control"] pub mod inputctrl; #[doc = "Event Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [evctrl](evctrl) module"] pub type EVCTRL = crate::Reg<u8, _EVCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _EVCTRL; #[doc = "`read()` method returns [evctrl::R](evctrl::R) reader structure"] impl crate::Readable for EVCTRL {} #[doc = "`write(|w| ..)` method takes [evctrl::W](evctrl::W) writer structure"] impl crate::Writable for EVCTRL {} #[doc = "Event Control"] pub mod evctrl; #[doc = "Interrupt Enable Clear\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenclr](intenclr) module"] pub type INTENCLR = crate::Reg<u8, _INTENCLR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _INTENCLR; #[doc = "`read()` method returns [intenclr::R](intenclr::R) reader structure"] impl crate::Readable for INTENCLR {} #[doc = "`write(|w| ..)` method takes [intenclr::W](intenclr::W) writer structure"] impl crate::Writable for INTENCLR {} #[doc = "Interrupt Enable Clear"] pub mod intenclr; #[doc = "Interrupt Enable Set\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenset](intenset) module"] pub type INTENSET = crate::Reg<u8, _INTENSET>; #[allow(missing_docs)] #[doc(hidden)] pub struct _INTENSET; #[doc = "`read()` method returns [intenset::R](intenset::R) reader structure"] impl crate::Readable for INTENSET {} #[doc = "`write(|w| ..)` method takes [intenset::W](intenset::W) writer structure"] impl crate::Writable for INTENSET {} #[doc = "Interrupt Enable Set"] pub mod intenset; #[doc = "Interrupt Flag Status and Clear\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intflag](intflag) module"] pub type INTFLAG = crate::Reg<u8, _INTFLAG>; #[allow(missing_docs)] #[doc(hidden)] pub struct _INTFLAG; #[doc = "`read()` method returns [intflag::R](intflag::R) reader structure"] impl crate::Readable for INTFLAG {} #[doc = "`write(|w| ..)` method takes [intflag::W](intflag::W) writer structure"] impl crate::Writable for INTFLAG {} #[doc = "Interrupt Flag Status and Clear"] pub mod intflag; #[doc = "Status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [status](status) module"] pub type STATUS = crate::Reg<u8, _STATUS>; #[allow(missing_docs)] #[doc(hidden)] pub struct _STATUS; #[doc = "`read()` method returns [status::R](status::R) reader structure"] impl crate::Readable for STATUS {} #[doc = "Status"] pub mod status; #[doc = "Result\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [result](result) module"] pub type RESULT = crate::Reg<u16, _RESULT>; #[allow(missing_docs)] #[doc(hidden)] pub struct _RESULT; #[doc = "`read()` method returns [result::R](result::R) reader structure"] impl crate::Readable for RESULT {} #[doc = "Result"] pub mod result; #[doc = "Window Monitor Lower Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [winlt](winlt) module"] pub type WINLT = crate::Reg<u16, _WINLT>; #[allow(missing_docs)] #[doc(hidden)] pub struct _WINLT; #[doc = "`read()` method returns [winlt::R](winlt::R) reader structure"] impl crate::Readable for WINLT {} #[doc = "`write(|w| ..)` method takes [winlt::W](winlt::W) writer structure"] impl crate::Writable for WINLT {} #[doc = "Window Monitor Lower Threshold"] pub mod winlt; #[doc = "Window Monitor Upper Threshold\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [winut](winut) module"] pub type WINUT = crate::Reg<u16, _WINUT>; #[allow(missing_docs)] #[doc(hidden)] pub struct _WINUT; #[doc = "`read()` method returns [winut::R](winut::R) reader structure"] impl crate::Readable for WINUT {} #[doc = "`write(|w| ..)` method takes [winut::W](winut::W) writer structure"] impl crate::Writable for WINUT {} #[doc = "Window Monitor Upper Threshold"] pub mod winut; #[doc = "Gain Correction\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gaincorr](gaincorr) module"] pub type GAINCORR = crate::Reg<u16, _GAINCORR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _GAINCORR; #[doc = "`read()` method returns [gaincorr::R](gaincorr::R) reader structure"] impl crate::Readable for GAINCORR {} #[doc = "`write(|w| ..)` method takes [gaincorr::W](gaincorr::W) writer structure"] impl crate::Writable for GAINCORR {} #[doc = "Gain Correction"] pub mod gaincorr; #[doc = "Offset Correction\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [offsetcorr](offsetcorr) module"] pub type OFFSETCORR = crate::Reg<u16, _OFFSETCORR>; #[allow(missing_docs)] #[doc(hidden)] pub struct _OFFSETCORR; #[doc = "`read()` method returns [offsetcorr::R](offsetcorr::R) reader structure"] impl crate::Readable for OFFSETCORR {} #[doc = "`write(|w| ..)` method takes [offsetcorr::W](offsetcorr::W) writer structure"] impl crate::Writable for OFFSETCORR {} #[doc = "Offset Correction"] pub mod offsetcorr; #[doc = "Calibration\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [calib](calib) module"] pub type CALIB = crate::Reg<u16, _CALIB>; #[allow(missing_docs)] #[doc(hidden)] pub struct _CALIB; #[doc = "`read()` method returns [calib::R](calib::R) reader structure"] impl crate::Readable for CALIB {} #[doc = "`write(|w| ..)` method takes [calib::W](calib::W) writer structure"] impl crate::Writable for CALIB {} #[doc = "Calibration"] pub mod calib; #[doc = "Debug Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dbgctrl](dbgctrl) module"] pub type DBGCTRL = crate::Reg<u8, _DBGCTRL>; #[allow(missing_docs)] #[doc(hidden)] pub struct _DBGCTRL; #[doc = "`read()` method returns [dbgctrl::R](dbgctrl::R) reader structure"] impl crate::Readable for DBGCTRL {} #[doc = "`write(|w| ..)` method takes [dbgctrl::W](dbgctrl::W) writer structure"] impl crate::Writable for DBGCTRL {} #[doc = "Debug Control"] pub mod dbgctrl;
{ "pile_set_name": "Github" }
# SPDX-License-Identifier: GPL-2.0 armada-y := armada_crtc.o armada_drv.o armada_fb.o armada_fbdev.o \ armada_gem.o armada_overlay.o armada_trace.o armada-y += armada_510.o armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o obj-$(CONFIG_DRM_ARMADA) := armada.o
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24.0dip" android:height="24.0dip" android:viewportHeight="24.0" android:viewportWidth="24.0"> <path android:fillAlpha="0.3" android:fillColor="@android:color/holo_blue_bright" android:pathData="M12.0100002289,21.489999771118164 L23.6399993896,7 C23.1900005341,6.65999984741,18.7099990845,3,12,3 C5.28000020981,3,0.810000002384,6.65999984741,0.360000014305,7 L11.9899997711,21.4899997711 L12,21.5 L12.0100002289,21.4899997711 Z"/> <path android:pathData="M0,0 L24,0 L24,24 L0,24 Z"/> <path android:fillColor="@android:color/holo_blue_bright" android:pathData="M3.52999997139,10.949999809265137 L11.9899997711,21.4899997712 L12,21.5000000001 L12.0100002289,21.4899997712 L20.4699993134,10.9499998093 C20.0400009155,10.6199998856,16.8099994659,8,12,8 C7.19000005722,8,3.96000003815,10.6199998856,3.52999997139,10.9499998093 Z"/> </vector>
{ "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. // //////////////////////////////////////////////////////////////////////////////// { "config": "royale", "compilerOptions": { "debug": false, "targets": ["JSRoyale"], "source-map": true, "html-template": "src/main/resources/jewel-example-index-template.html", "theme": "${royalelib}/themes/Jewel-Light-NoFlat-Primary-Blue-Theme/src/main/resources/defaults.css" }, "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions", "files": [ "src/main/royale/BE0007_Selecting_options_from_a_group_of_jewel_checkbox_controls.mxml" ] }
{ "pile_set_name": "Github" }
/* * Copyright © 2006 Intel Corporation * * 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 (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Authors: * Eric Anholt <[email protected]> * */ #ifndef _XF86MODES_H_ #define _XF86MODES_H_ #include <stddef.h> #include <string.h> #include <stdio.h> #include "xf86.h" #include "xorgVersion.h" #include "edid.h" #include "xf86Parser.h" #if XF86_MODES_RENAME #include "xf86Rename.h" #endif extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec * mode); extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec * mode); extern _X_EXPORT unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); extern _X_EXPORT int xf86ModeWidth(const DisplayModeRec * mode, Rotation rotation); extern _X_EXPORT int xf86ModeHeight(const DisplayModeRec * mode, Rotation rotation); extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec * pMode); extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode); extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec * pMode1, const DisplayModeRec * pMode2); extern _X_EXPORT void xf86PrintModeline(int scrnIndex, DisplayModePtr mode); extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); extern _X_EXPORT DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins); extern _X_EXPORT Bool xf86ModeIsReduced(const DisplayModeRec * mode); extern _X_EXPORT void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags); extern _X_EXPORT void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, int *min, int *max, int n_ranges); extern _X_EXPORT void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, int maxX, int maxY, int maxPitch); extern _X_EXPORT void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon); extern _X_EXPORT void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth); extern _X_EXPORT void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList); extern _X_EXPORT void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr * modeList, Bool verbose); extern _X_EXPORT DisplayModePtr xf86PruneDuplicateModes(DisplayModePtr modes); extern _X_EXPORT void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList); extern _X_EXPORT DisplayModePtr xf86GetMonitorModes(ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor); extern _X_EXPORT DisplayModePtr xf86GetDefaultModes(void); extern _X_EXPORT void xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC); #endif /* _XF86MODES_H_ */
{ "pile_set_name": "Github" }
<?php use_javascript(plugin_web_path('orangehrmRecruitmentPlugin', 'js/viewJobsSuccess')); ?> <style type="text/css"> #content { padding-top: 0; } pre { overflow: auto; white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ } #toggleJobList { float: right; margin: -2px 10px 0px 0px; font-size: 12px; } #toggleJobList span { text-decoration: underline; cursor: pointer; } .vacancyDescription, .vacancyShortDescription { display: none; line-height: 15px; margin-bottom: 10px; } .vacancyShortDescription { display: block; } .applyLink { display: none; } .vacancyTitle :hover { cursor: pointer; } .plusOrMinusmark { text-align: right; margin-top: 10px; padding-right: 3px; font-size: 12px; position: relative; top: 12px; right: 8px; } .plusMark, .minusMark { cursor: pointer; } .minusMark { display: none; } h3 { margin-bottom: 10px; } </style> <div id="jobPage"> <div class="box"> <div class="maincontent"> <div class="head"> <h1><?php echo __('Active Job Vacancies'); ?></h1> </div> <div class="inner"> <?php if (count($publishedVacancies) != 0): ?> <div id="toggleJobList"> <span id="expandJobList"><?php echo __('Expand all') ?></span> | <span id="collapsJobList"><?php echo __('Collapse all'); ?></span> </div> <?php foreach ($publishedVacancies as $vacancy): ?> <div class="plusOrMinusmark"> <span class="plusMark">[+]</span><span class="minusMark">[-]</span> </div> <div class="jobItem"> <div class="vacancyTitle"> <h3><?php echo $vacancy->getName(); ?></h3> </div> <pre class="vacancyShortDescription"><?php echo getShortDescription($vacancy->getDescription(), 250, "..."); ?></pre> <pre class="vacancyDescription"><?php echo $vacancy->getDescription(); ?></pre> <p class="borderBottom"> <input type="button" class="apply" name="applyButton" value="<?php echo __("Apply"); ?>" onmouseout="moutButton(this);" onmouseover="moverButton(this);" /> <a href="<?php echo public_path('index.php/recruitmentApply/applyVacancy/id/' . $vacancy->getId(), true); ?>" class="applyLink"></a> </p> </div> <?php endforeach; ?> <?php else: ?> <span class="noVacanciesMessage"><?php echo __('No active job vacancies to display'); ?></span> <?php endif; ?> </div> </div> </div> </div> <div id="footer"> <?php include_partial('global/copyright');?> </div> <?php /* * Get short description to show in default view in view job list * @param string $description full description * @param int $limit Number of characters show in short description * @param string $endString String added to end of the short description * @return string $description short description */ function getShortDescription($description, $limit, $endString) { if (strlen($description) > $limit) { $subString = substr($description, 0, $limit); $wordArray = explode(" ", $subString); $description = substr($subString, 0, -(strlen($wordArray[count($wordArray) - 1]) + 1)) . $endString; } return $description; }
{ "pile_set_name": "Github" }
/* eslint-disable func-names */ /** * Webpack's `externals` equivalent object, * listing dependencies that Frint packages use. */ import webpackRxJsExternals from './utils/webpackRxjsExternals'; export const rxjs = [webpackRxJsExternals()]; export const lodash = [ function (context, request, callback) { if (request.startsWith('lodash/')) { const subModule = request.split('/')[1]; return callback(null, { root: ['_', subModule], commonjs: request, commonjs2: request, amd: request, }); } return callback(); } ]; // full imports export const thirdParties = [{ 'lodash': { root: '_', commonjs: 'lodash', commonjs2: 'lodash', amd: 'lodash', }, }, { 'rxjs': { root: 'Rx', commonjs: 'rxjs', commonjs2: 'rxjs', amd: 'rxjs', }, }, { 'react': { root: 'React', commonjs: 'react', commonjs2: 'react', amd: 'react', }, }, { 'react-dom': { root: 'ReactDOM', commonjs: 'react-dom', commonjs2: 'react-dom', amd: 'react-dom' } }, { 'prop-types': { root: 'PropTypes', commonjs: 'prop-types', commonjs2: 'prop-types', amd: 'prop-types', } }]; export const frint = [{ 'frint': { root: 'Frint', commonjs: 'frint', commonjs2: 'frint', amd: 'frint' }, }, { 'frint-store': { root: 'FrintStore', commonjs: 'frint-store', commonjs2: 'frint-store', amd: 'frint-store' }, }, { 'frint-model': { root: 'FrintModel', commonjs: 'frint-model', commonjs2: 'frint-model', amd: 'frint-model' }, }, { 'frint-data': { root: 'FrintData', commonjs: 'frint-data', commonjs2: 'frint-data', amd: 'frint-data' }, }, { 'frint-react': { root: 'FrintReact', commonjs: 'frint-react', commonjs2: 'frint-react', amd: 'frint-react' }, }, { 'frint-router': { root: 'FrintRouter', commonjs: 'frint-router', commonjs2: 'frint-router', amd: 'frint-router' }, }, { 'frint-router-react': { root: 'FrintRouterReact', commonjs: 'frint-router-react', commonjs2: 'frint-router-react', amd: 'frint-router-react' } }]; export default rxjs .concat(lodash) .concat(thirdParties);
{ "pile_set_name": "Github" }
package sacloud // CDROM ISOイメージ(CDROM) type CDROM struct { *Resource // ID propName // 名称 propDescription // 説明 propAvailability // 有功状態 propSizeMB // サイズ(MB単位) propScope // スコープ propServiceClass // サービスクラス propStorageClass // ストレージクラス propStorage // ストレージ propIcon // アイコン propTags // タグ propCreatedAt // 作成日時 }
{ "pile_set_name": "Github" }
import os import sys if sys.version_info[0] == 2: _ENCODE = sys.getfilesystemencoding() def path_join(*args): bin_args = map(lambda a: a.decode(_ENCODE), args) return os.path.join(*bin_args).encode(_ENCODE) def str_join(s, l): bin_args = map(lambda a: a.decode(_ENCODE), l) b = s.decode(_ENCODE) return b.join(bin_args).encode(_ENCODE) logfile_open = open else: path_join = os.path.join str_join = str.join def logfile_open(*args): return open(*args, errors='replace')
{ "pile_set_name": "Github" }
/* Copyright 2014-2020 Go For It! developers * * This file is part of Go For It!. * * Go For It! is free software: you can redistribute it * and/or modify it under the terms of version 3 of the * GNU General Public License as published by the Free Software Foundation. * * Go For It! 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 Go For It!. If not, see http://www.gnu.org/licenses/. */ namespace GOFI { public KeyBindingSettings kbsettings; private SettingsManager settings = null; private ActivityLog activity_log = null; private ListManager list_manager = null; } errordomain GOFIParseError { TOO_FEW_ARGS, TOO_MANY_ARGS, BAD_VALUE, PARAM_NOT_UNIQUE } /** * The main application class that is responsible for initiating all * necessary steps to create a running instance of "Go For It!". */ class GOFI.Main : Gtk.Application { private TaskTimer task_timer; private MainWindow win; private static bool print_version = false; private static bool show_about_dialog = false; private static bool list_lists = false; private static string? logfile = null; private static string[] load_list = null; private void load_settings () { if (settings == null) { settings = new SettingsManager.load_from_key_file (); } } private void load_list_manager () { if (list_manager == null) { list_manager = new ListManager (); } } /** * Used to determine if a notification should be sent. */ private bool break_previously_active { get; set; default = false; } /** * Constructor of the Application class. */ public Main () { Object (application_id: GOFI.APP_ID, flags: ApplicationFlags.HANDLES_COMMAND_LINE); } public void new_window () { load_settings (); load_list_manager (); assert (list_manager != null); TodoListInfo? info = null; if (load_list != null) { info = list_manager.get_list_info (load_list[0], load_list[1]); if (info == null) { stdout.printf (_("Not a known list: %s"), new ListIdentifier( load_list[0], load_list[1] ).to_string () ); load_list = null; return; } load_list = null; } // Don't create a new window, if one already exists if (win != null) { if (info != null) { win.on_list_chosen (info); } win.show (); win.present (); return; } task_timer = new TaskTimer (); // Enable Notifications for the App Notify.init (GOFI.APP_NAME); setup_notifications (); kbsettings = new KeyBindingSettings (); if (info == null) { info = get_last_list_info (); } win = new MainWindow (this, task_timer, info); win.show_all (); } private TodoListInfo? get_last_list_info () { var last_loaded = settings.list_last_loaded; if (last_loaded != null) { var list = list_manager.get_list_info (last_loaded.provider, last_loaded.id); if (list != null) { return list; } } return null; } public void show_about (Gtk.Window? parent = null) { var dialog = new AboutDialog (parent); dialog.run (); } public override int command_line (ApplicationCommandLine command_line) { hold (); int res = _command_line (command_line); release (); return res; } /** * Removes arguments from args. This frees the args located at pos and * shrinks args. */ private static void remove_args (ref string[] args, int pos, int length) { for (int i = 0; i < length; i++) { args[pos+i] = null; } int to_move = args.length - pos - length; int old_length = args.length; if (to_move > 0) { args.move (pos+length, pos, to_move); } args.length = old_length - length; } /** * This function performs manual parsing of parameters that have multiple * arguments. OptionContext.parse_strv isn't able to do that at this time. */ private void multi_arg_parse (ref string[] args) throws GOFIParseError { int i = 0; for (; i < args.length; i++) { if (args[i] == "--load") { if (i+2 < args.length && args[i+1][0] != '-' && args[i+2][0] != '-') { if (i+3 != args.length && args[i+3][0] != '-') { throw new GOFIParseError.TOO_MANY_ARGS( "Too many arguments for --load: \"%s\"", args[i+3] ); } load_list = {args[i+1], args[i+2]}; remove_args (ref args, i ,3); break; } else { throw new GOFIParseError.TOO_FEW_ARGS("Missing arguments for --load"); } } } for (; i < args.length; i++) { if (args[i] == "--load") { throw new GOFIParseError.PARAM_NOT_UNIQUE( "Second --load parameter encountered!" + "\n" + "Only one list can be loaded at a time" ); } } } private int _command_line (ApplicationCommandLine command_line) { var context = new OptionContext (null); context.add_main_entries (entries, GOFI.EXEC_NAME); context.add_main_entries (get_dynamic_entries (), GOFI.EXEC_NAME); context.add_group (Gtk.get_option_group (true)); string[] args = command_line.get_arguments (); try { multi_arg_parse (ref args); context.parse_strv (ref args); } catch (Error e) { stdout.printf (_("%s: Error: %s") + "\n", GOFI.APP_NAME, e.message); return 0; } if (print_version) { stdout.printf ("%s %s\n", GOFI.APP_NAME, GOFI.APP_VERSION); stdout.printf ("Copyright 2014-2020 'Go For it!' Developers.\n"); } else if (show_about_dialog) { show_about (); } else if (list_lists) { load_settings (); load_list_manager (); stdout.printf (_("Lists (List type : List ID - List name)") + ":\n"); foreach (var info in list_manager.get_list_infos ()) { stdout.printf ("\"%s\" : \"%s\" - \"%s\"\n", info.provider_name, info.id, info.name); } } else { if (logfile != null) { // resolving ~, useful if --logfile=~/something is used // (The user probably doesn't mean that it wants to create a // folder called ~) // Doing this is probably non standard, but I think that its // better to be helpful than to confuse the user. if (logfile.get(0) == '~' && logfile.get(1) == '/') { logfile = Environment.get_home_dir () + logfile.offset(1); } activity_log = new ActivityLog (File.new_for_commandline_arg (logfile)); } else if (activity_log == null) { activity_log = new ActivityLog (null); } new_window (); } return 0; } const OptionEntry[] entries = { { "version", 'v', 0, OptionArg.NONE, out print_version, N_("Print version info and exit"), null }, { "about", 'a', 0, OptionArg.NONE, out show_about_dialog, N_("Show about dialog"), null }, { "logfile", 0, 0, OptionArg.FILENAME, out logfile, N_("CSV file to log activities to."), N_("FILE") }, { "list", 0, 0, OptionArg.NONE, out list_lists, N_("Show configured lists and exit"), null}, { null } }; private const string load_entry_descr = N_("Load the list specified by the list type and ID"); private string load_entry_name = "load" + " " + _("LIST-TYPE") + " " + _("LIST-ID"); private OptionEntry[] get_dynamic_entries () { return { OptionEntry () { long_name = load_entry_name, short_name = 0, flags = 0, arg = OptionArg.NONE, arg_data = null, description = load_entry_descr, arg_description = null }, OptionEntry () { // empty OptionEntry to null terminate list long_name = null, short_name = 0, flags = 0, arg = 0, arg_data = null, description = null, arg_description = null } }; } /** * Configures the emission of notifications when tasks/breaks are over */ private void setup_notifications () { task_timer.active_task_changed.connect (task_timer_activated); task_timer.timer_almost_over.connect (display_almost_over_notification); task_timer.task_duration_exceeded.connect (display_duration_exceeded); } private void task_timer_activated (TodoTask? task, bool break_active) { if (task == null) { return; } if (break_previously_active != break_active) { Notify.Notification notification; if (break_active) { notification = new Notify.Notification ( _("Take a Break"), _("Relax and stop thinking about your current task for a while") + " :-)", GOFI.EXEC_NAME); } else { notification = new Notify.Notification ( _("The Break is Over"), _("Your current task is") + ": " + task.description, GOFI.EXEC_NAME); } notification.set_hint ( "desktop-entry", new Variant.string (GOFI.APP_SYSTEM_NAME) ); try { notification.show (); } catch (GLib.Error err){ GLib.stderr.printf ( "Error in notify! (break_active notification)\n"); } } break_previously_active = break_active; } private void display_almost_over_notification (uint remaining_time) { Notify.Notification notification = new Notify.Notification ( _("Prepare for your break"), _("You have %s seconds left").printf (remaining_time.to_string ()), GOFI.EXEC_NAME ); notification.set_hint ( "desktop-entry", new Variant.string (GOFI.APP_SYSTEM_NAME) ); try { notification.show (); } catch (GLib.Error err){ GLib.stderr.printf ( "Error in notify! (remaining_time notification)\n"); } } private void display_duration_exceeded () { Notify.Notification notification = new Notify.Notification ( _("Task duration exceeded"), _("Consider switching to a different task"), GOFI.EXEC_NAME); try { notification.show (); } catch (GLib.Error err){ GLib.stderr.printf ( "Error in notify! (remaining_time notification)\n"); } } }
{ "pile_set_name": "Github" }
{ "accountLinkingWhitelistedDomains": null, "asin": "B01MEF6JVS", "averageRating": 3.3, "canDisable": true, "capabilities": null, "category": null, "description": "Ever want a quick tip to make your life better? Better Life provides exactly that. Listen to short, proven tips for better living whenever you want.", "enablement": null, "exampleInteractions": [ "Alexa start better life", "Alexa ask better life for a fact", "Alexa open better life" ], "firstReleaseDate": 1476763911.904, "homepageLinkText": null, "homepageLinkUrl": null, "id": "amzn1.ask.skill.d71b7423-28d9-4c2f-9b07-23358145d567", "imageAltText": "Better Life tips for modern living icon", "imageUrl": "https://github.com/dale3h/alexa-skills-list/raw/master/skills/B01MEF6JVS/skill_icon", "inAppPurchasingSupported": false, "launchPhrase": "better life", "name": "Better Life tips for modern living", "numberOfReviews": 5, "pamsPartnerId": null, "permissions": null, "privacyPolicyUrl": null, "shortDescription": "Better Life - tips for modern living", "skillTypes": null, "stage": "live", "termsOfUseUrl": null, "vendorId": "M7LOAMHE7R8YH", "vendorName": "Andy Roberts" }
{ "pile_set_name": "Github" }
.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/ .cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/ .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; } .cm-s-twilight .CodeMirror-guttermarker { color: white; } .cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; } .cm-s-twilight .CodeMirror-linenumber { color: #aaa; } .cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ .cm-s-twilight .cm-atom { color: #FC0; } .cm-s-twilight .cm-number { color: #ca7841; } /**/ .cm-s-twilight .cm-def { color: #8DA6CE; } .cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ .cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/ .cm-s-twilight .cm-operator { color: #cda869; } /**/ .cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ .cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ .cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/ .cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/ .cm-s-twilight .cm-builtin { color: #cda869; } /*?*/ .cm-s-twilight .cm-tag { color: #997643; } /**/ .cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ .cm-s-twilight .cm-header { color: #FF6400; } .cm-s-twilight .cm-hr { color: #AEAEAE; } .cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/ .cm-s-twilight .cm-error { border-bottom: 1px solid red; } .cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;} .cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
{ "pile_set_name": "Github" }
import { UPDATE_ORDER_BOOK, CLEAR_ORDER_BOOK } from "modules/orders/actions/update-order-book"; import { RESET_STATE } from "modules/app/actions/reset-state"; const DEFAULT_STATE = {}; /** * @param {Object} orderBooks * @param {Object} action */ export default function(orderBooks = DEFAULT_STATE, { type, data }) { switch (type) { case UPDATE_ORDER_BOOK: { const { marketId, outcome, orderTypeLabel, orderBook } = data; const marketOrderBook = orderBooks[marketId] || {}; const outcomeOrderBook = marketOrderBook[outcome] || {}; return { ...orderBooks, [marketId]: { ...marketOrderBook, [outcome]: { ...outcomeOrderBook, [orderTypeLabel]: { ...(outcomeOrderBook[orderTypeLabel] || {}), ...orderBook } } } }; } case CLEAR_ORDER_BOOK: { const { marketId, outcome, orderTypeLabel } = data; const marketOrderBook = orderBooks[marketId] || {}; const outcomeOrderBook = marketOrderBook[outcome] || {}; return { ...orderBooks, [marketId]: { ...marketOrderBook, [outcome]: { ...outcomeOrderBook, [orderTypeLabel]: {} } } }; } case RESET_STATE: return DEFAULT_STATE; default: return orderBooks; } }
{ "pile_set_name": "Github" }
import java.util.Objects; /** * 学生类 * * @author fraser * @date 2019/12/16 9:34 PM */ public class Student { private String name; private int age; @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Student student = (Student) o; return age == student.age && Objects.equals(name, student.name); } @Override public int hashCode() { return Objects.hash(name, age); } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "//www.w3.org/TR/html4/strict.dtd"> <HTML style="overflow:auto;"> <HEAD> <meta name="generator" content="JDiff v1.1.0"> <!-- Generated by the JDiff Javadoc doclet --> <!-- (http://www.jdiff.org) --> <meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared."> <meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet"> <TITLE> android.media.tv.TvInputInfo </TITLE> <link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" /> <link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" /> <noscript> <style type="text/css"> body{overflow:auto;} #body-content{position:relative; top:0;} #doc-content{overflow:visible;border-left:3px solid #666;} #side-nav{padding:0;} #side-nav .toggle-list ul {display:block;} #resize-packages-nav{border-bottom:3px solid #666;} </style> </noscript> <style type="text/css"> </style> </HEAD> <BODY> <!-- Start of nav bar --> <a name="top"></a> <div id="header" style="margin-bottom:0;padding-bottom:0;"> <div id="headerLeft"> <a href="../../../../index.html" tabindex="-1" target="_top"><img src="../../../../assets/images/bg_logo.png" alt="Android Developers" /></a> </div> <div id="headerRight"> <div id="headerLinks"> <!-- <img src="/assets/images/icon_world.jpg" alt="" /> --> <span class="text"> <!-- &nbsp;<a href="#">English</a> | --> <nobr><a href="//developer.android.com" target="_top">Android Developers</a> | <a href="//www.android.com" target="_top">Android.com</a></nobr> </span> </div> <div class="and-diff-id" style="margin-top:6px;margin-right:8px;"> <table class="diffspectable"> <tr> <td colspan="2" class="diffspechead">API Diff Specification</td> </tr> <tr> <td class="diffspec" style="padding-top:.25em">To Level:</td> <td class="diffvaluenew" style="padding-top:.25em">24</td> </tr> <tr> <td class="diffspec">From Level:</td> <td class="diffvalueold">23</td> </tr> <tr> <td class="diffspec">Generated</td> <td class="diffvalue">2016.06.13 13:31</td> </tr> </table> </div><!-- End and-diff-id --> <div class="and-diff-id" style="margin-right:8px;"> <table class="diffspectable"> <tr> <td class="diffspec" colspan="2"><a href="jdiff_statistics.html">Statistics</a> </tr> </table> </div> <!-- End and-diff-id --> </div> <!-- End headerRight --> </div> <!-- End header --> <div id="body-content" xstyle="padding:12px;padding-right:18px;"> <div id="doc-content" style="position:relative;"> <div id="mainBodyFluid"> <H2> Class android.media.tv.<A HREF="../../../../reference/android/media/tv/TvInputInfo.html" target="_top"><font size="+2"><code>TvInputInfo</code></font></A> </H2> <a NAME="constructors"></a> <a NAME="methods"></a> <p> <a NAME="Added"></a> <TABLE summary="Added Methods" WIDTH="100%"> <TR> <TH VALIGN="TOP" COLSPAN=2>Added Methods</FONT></TD> </TH> <TR BGCOLOR="#FFFFFF" CLASS="TableRowColor"> <TD VALIGN="TOP" WIDTH="25%"> <A NAME="android.media.tv.TvInputInfo.canRecord_added()"></A> <nobr><code>boolean</code>&nbsp;<A HREF="../../../../reference/android/media/tv/TvInputInfo.html#canRecord()" target="_top"><code>canRecord</code></A>()</nobr> </TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="#FFFFFF" CLASS="TableRowColor"> <TD VALIGN="TOP" WIDTH="25%"> <A NAME="android.media.tv.TvInputInfo.getExtras_added()"></A> <nobr><code>Bundle</code>&nbsp;<A HREF="../../../../reference/android/media/tv/TvInputInfo.html#getExtras()" target="_top"><code>getExtras</code></A>()</nobr> </TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="#FFFFFF" CLASS="TableRowColor"> <TD VALIGN="TOP" WIDTH="25%"> <A NAME="android.media.tv.TvInputInfo.getTunerCount_added()"></A> <nobr><code>int</code>&nbsp;<A HREF="../../../../reference/android/media/tv/TvInputInfo.html#getTunerCount()" target="_top"><code>getTunerCount</code></A>()</nobr> </TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="#FFFFFF" CLASS="TableRowColor"> <TD VALIGN="TOP" WIDTH="25%"> <A NAME="android.media.tv.TvInputInfo.isHidden_added(android.content.Context)"></A> <nobr><code>boolean</code>&nbsp;<A HREF="../../../../reference/android/media/tv/TvInputInfo.html#isHidden(android.content.Context)" target="_top"><code>isHidden</code></A>(<code>Context</code>)</nobr> </TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="#FFFFFF" CLASS="TableRowColor"> <TD VALIGN="TOP" WIDTH="25%"> <A NAME="android.media.tv.TvInputInfo.loadCustomLabel_added(android.content.Context)"></A> <nobr><code>CharSequence</code>&nbsp;<A HREF="../../../../reference/android/media/tv/TvInputInfo.html#loadCustomLabel(android.content.Context)" target="_top"><code>loadCustomLabel</code></A>(<code>Context</code>)</nobr> </TD> <TD>&nbsp;</TD> </TR> </TABLE> &nbsp; <a NAME="fields"></a> </div> <div id="footer"> <div id="copyright"> Except as noted, this content is licensed under <a href="//creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>. For details and restrictions, see the <a href="/license.html">Content License</a>. </div> <div id="footerlinks"> <p> <a href="//www.android.com/terms.html">Site Terms of Service</a> - <a href="//www.android.com/privacy.html">Privacy Policy</a> - <a href="//www.android.com/branding.html">Brand Guidelines</a> </p> </div> </div> <!-- end footer --> </div><!-- end doc-content --> </div> <!-- end body-content --> <script src="//www.google-analytics.com/ga.js" type="text/javascript"> </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-5831155-1"); pageTracker._setAllowAnchor(true); pageTracker._initData(); pageTracker._trackPageview(); } catch(e) {} </script> </BODY> </HTML>
{ "pile_set_name": "Github" }
# 时间计划 ![](https://raw.githubusercontent.com/ybhgenius/Documentation/master/images/波场主网上线后的指导方案/时间计划.png) ## 1.上线准备阶段 + 主网功能开发测试完成。 + 钱包产品开发测试完成。 + 区块链浏览器开发测试完成。 ## 2.主网测试期 + 主网上线后,保持稳定,数据不清零,6月1日至北6月24日(GMT+8)持续运行,在6月24日(GMT+8数据清零。 + 用户领测试币,主网测试。用户在指定链接领测试币,然后在波场钱包测试。社区开发者测试主网功能。 主网测试期:6月1日凌晨0点0分至6月24日23点59分(GMT+8)。主网测试期结束后,主网正式上线,创世区块在6月25日10点0分(GMT+8)正式启动。 ## 3.创世区块及币迁移阶段 1.波场创世区块在6月25日10点0分(GMT+8)正式启动。 2.币迁移: + 交易所: TRX的ERC20代币打给波场,波场打主网代币给交易所 + SR:候选人币迁移快速通道,可以确保第一时间申请成为候选人,并拥有一定数目的初始投票。 ## 4.超级代表竞选及奖励阶段 用户用钱包投票产生超级代表,超级代表负责打包交易出块并获得TRX奖励。 # 交易所指引 ![](https://raw.githubusercontent.com/ybhgenius/Documentation/master/images/波场主网上线后的指导方案/交易所指引.png) ## 1.禁止提币 6月21日-6月24日(GMT+8),禁止用户提币。 ## 2.禁止充币提币 6月25日(GMT+8)禁止用户充提币。 ## 3.TRX ERC20代币打给波场,波场将TRX打给交易所 交易所把TRX ERC20代币打给波场,波场销毁,将主网代币打给交易所。 ## 4.系统升级,支持充提主网代币 交易所升级系统,支持主网代币的钱包功能,下线TRX ERC20代币的功能。 ## 5.发公告恢复充提币功能 交易所确认没问题后,恢复TRX的充提币功能。 ## 6.指定交易所支持永久迁移 波场指定的永久支持迁移的交易所保留TRX ERC20代币的充值渠道,定期迁移成主网代币。 **注意** 1. 交易所不需要快照,不需要暂停TRX交易。 2. 注意代币迁移顺序。 3. 注意6月21日到6月24日(GMT+8)禁止提币,6月25日(GMT+8)禁止充提,6月26日(GMT+8)公告恢复。 4. 联系波场基金会获取主网代币。
{ "pile_set_name": "Github" }
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [email protected] so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ #pragma once #include "hphp/runtime/vm/jit/abi-regs.h" #include "hphp/runtime/vm/jit/phys-reg.h" #include "hphp/util/asm-x64.h" #include "hphp/vixl/a64/assembler-a64.h" #include "hphp/vixl/a64/constants-a64.h" namespace HPHP { namespace jit { struct Abi; namespace arm { /////////////////////////////////////////////////////////////////////////////// /* * Mirrors the API of abi.h. */ const Abi& abi(CodeKind kind = CodeKind::Trace); inline PhysReg rvmfp() { return vixl::x29; } inline PhysReg rvmsp() { return vixl::x28; } inline PhysReg rvmtl() { return vixl::x27; } inline PhysReg rsp() { return vixl::sp; } inline RegSet vm_regs_no_sp() { return rvmfp() | rvmtl(); } inline RegSet vm_regs_with_sp() { return vm_regs_no_sp() | rvmsp(); } inline RegSet cross_jit_save() { return vixl::x19 | vixl::x20 | vixl::x21 | vixl::x22 | vixl::x23 | vixl::x24 | vixl::x25 | vixl::x26 | vixl::x27 | vixl::x28 | vixl::d8 | vixl::d9 | vixl::d10 | vixl::d11 | vixl::d12 | vixl::d13 | vixl::d14 | vixl::d15; } inline PhysReg rret_data() { return vixl::x0; } inline PhysReg rret_type() { return vixl::x1; } PhysReg rret(size_t i = 0); PhysReg rret_simd(size_t i); PhysReg rarg(size_t i); PhysReg rarg_simd(size_t i); PhysReg rarg_ind_ret(size_t i); inline PhysReg rfp() { return vixl::x29; } inline PhysReg rlr() { return vixl::x30; } constexpr size_t num_arg_regs() { return 8; } constexpr size_t num_arg_regs_simd() { return 8; } constexpr size_t num_arg_regs_ind_ret() { return 1; } RegSet arg_regs(size_t n); RegSet arg_regs_simd(size_t n); RegSet arg_regs_ind_ret(size_t n); PhysReg r_svcreq_req(); PhysReg r_svcreq_stub(); PhysReg r_svcreq_sf(); PhysReg r_svcreq_arg(size_t i); /////////////////////////////////////////////////////////////////////////////// inline vixl::Register x2a(PhysReg x64reg) { always_assert(!x64reg.isSIMD()); return vixl::Register(vixl::CPURegister(x64reg)); } inline vixl::FPRegister x2f(PhysReg x64reg) { always_assert(x64reg.isSIMD()); return vixl::FPRegister(vixl::CPURegister(x64reg)); } inline vixl::VRegister x2v(PhysReg x64reg) { always_assert(x64reg.isSIMD()); auto const r = vixl::CPURegister(x64reg); return vixl::VRegister(r.code(), 128); } /* * ARM int meaning fp meaning * bit tests JIT mapping JIT meaning * ---------------------------------------------------------------------------- * eq equal equal * Z == 1 CC_E/CC_Z equal * ne not equal not equal or unordered * Z == 0 CC_NE/CC_NZ not equal * cs/hs carry set greater than, equal, or unordered * C == 1 CC_AE/CC_NB/CC_NC unsigned higher or same * cc/lo carry clear less than * C == 0 CC_B/CC_NAE unsigned lower * mi minus, negative less than * N == 1 CC_S minus (sign set) * pl plus, nonnegative greater than, equal, or unordered * N == 0 CC_NS plus (sign clear) * vs overflow unordered * V == 1 CC_O overflow set * vc no overflow ordered * V == 0 CC_NO overflow clear * hi unsigned higher greater than, or unordered * C == 1 && Z == 0 CC_A/CC_NBE unsigned higher * ls unsigned lower or same less than or equal * !(C == 1 && Z == 0) CC_BE/CC_NA unsigned lower or same * ge signed greater or equal greater than or equal * N == V CC_GE/CC_NL signed greater or equal * lt signed less than less than, or unordered * N != V CC_L/CC_NGE signed less than * gt signed greater than greater than * Z == 0 && N == V CC_G/CC_NLE signed greater than * le signed less than or equal less than, equal, or unordered * !(Z == 0 && N == V) CC_LE/CC_NG signed less or equal * al always (not used) always (not used) * any CC_P parity * nv not valid * any CC_NP no parity */ inline vixl::Condition convertCC(jit::ConditionCode cc) { assertx(cc >= 0 && cc <= 0xF); using namespace vixl; // We'll index into this array by the x64 condition code. constexpr vixl::Condition mapping[] = { vs, // overflow set vc, // overflow clear lo, // unsigned lower hs, // unsigned higher or same eq, // equal ne, // not equal ls, // unsigned lower or same hi, // unsigned higher mi, // minus (N set) pl, // plus (N clear) vs, // parity = 1, valid only for float conversion and comparison vc, // parity = 0 lt, // signed less than ge, // signed greater or equal le, // signed less or equal gt, // signed greater than }; return mapping[cc]; } inline jit::ConditionCode convertCC(vixl::Condition cc) { using namespace vixl; // We'll index into this array by the arm64 condition code. constexpr jit::ConditionCode mapping[] = { jit::CC_E, // equal jit::CC_NE, // not equal jit::CC_AE, // unsigned higher or same jit::CC_B, // unsigned lower jit::CC_S, // minus (N set) jit::CC_NS, // plus (N clear) jit::CC_O, // overflow set jit::CC_NO, // overflow clear jit::CC_A, // unsigned higher jit::CC_NA, // unsigned lower or same jit::CC_GE, // signed greater or equal jit::CC_L, // signed less than jit::CC_G, // signed greater than jit::CC_LE, // signed less or equal jit::CC_P, jit::CC_NP, // invalid. These are the parity flags. }; return mapping[cc]; } enum class StatusFlags : uint8_t { None = 0, V = 1, Z = 1 << 1, C = 1 << 2, N = 1 << 3, CZ = C | Z, NV = N | V, NZV = N | Z | V, NotC = N | Z | V, NotV = N | C | Z, All = N | C | Z | V, }; inline Vflags required_flags(jit::ConditionCode cc) { assertx(cc >= 0 && cc <= 0xF); // A jit cc is first converted to an ARM cc before using this mapping constexpr StatusFlags mapping[] = { StatusFlags::Z, // eq StatusFlags::Z, // ne StatusFlags::C, // hs StatusFlags::C, // lo StatusFlags::N, // mi StatusFlags::N, // pl StatusFlags::V, // vs StatusFlags::V, // vc StatusFlags::CZ, // hi StatusFlags::CZ, // ls StatusFlags::NV, // ge StatusFlags::NV, // lt StatusFlags::NZV, // gt StatusFlags::NZV, // le StatusFlags::None, // nv (invalid) StatusFlags::None, // al (invalid) }; return static_cast<Vflags>(mapping[convertCC(cc)]); } /////////////////////////////////////////////////////////////////////////////// inline vixl::Register svcReqArgReg(unsigned index) { // First arg holds the request number return x2a(rarg(index + 1)); } // x16 and x17 are vixl macroassembler temporaries const vixl::Register rVixlScratch0(vixl::x16); const vixl::Register rVixlScratch1(vixl::x17); // w18/x18 is used as assembler temporary. The 32-bit w18 is used // primarily to hold 32-bit branch targets. const vixl::Register rAsm(vixl::x18); const vixl::Register rAsm_w(vixl::w18); /////////////////////////////////////////////////////////////////////////////// }}}
{ "pile_set_name": "Github" }
/* * Copyright 2018, Yahoo Inc. * Copyright 2018, the original author or authors. * Licensed under the Apache License, Version 2.0 * See LICENSE file in project root for terms. */ package com.yahoo.elide.core; import static com.yahoo.elide.core.EntityBinding.EMPTY_BINDING; import com.yahoo.elide.Injector; import com.yahoo.elide.annotation.ComputedAttribute; import com.yahoo.elide.annotation.ComputedRelationship; import com.yahoo.elide.annotation.Exclude; import com.yahoo.elide.annotation.Include; import com.yahoo.elide.annotation.MappedInterface; import com.yahoo.elide.annotation.SecurityCheck; import com.yahoo.elide.annotation.SharePermission; import com.yahoo.elide.core.exceptions.HttpStatusException; import com.yahoo.elide.core.exceptions.InternalServerErrorException; import com.yahoo.elide.core.exceptions.InvalidAttributeException; import com.yahoo.elide.functions.LifeCycleHook; import com.yahoo.elide.security.checks.Check; import com.yahoo.elide.security.checks.prefab.Collections.AppendOnly; import com.yahoo.elide.security.checks.prefab.Collections.RemoveOnly; import com.yahoo.elide.security.checks.prefab.Common; import com.yahoo.elide.security.checks.prefab.Role; import com.yahoo.elide.utils.ClassScanner; import com.yahoo.elide.utils.coerce.CoerceUtil; import com.yahoo.elide.utils.coerce.converters.Serde; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import com.google.common.collect.Maps; import org.antlr.v4.runtime.tree.ParseTree; import org.apache.commons.lang3.StringUtils; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Queue; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Function; import java.util.stream.Collectors; import javax.persistence.AccessType; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.Transient; import javax.ws.rs.WebApplicationException; /** * Entity Dictionary maps JSON API Entity beans to/from Entity type names. * * @see Include#type */ @Slf4j @SuppressWarnings("static-method") public class EntityDictionary { protected final ConcurrentHashMap<String, Class<?>> bindJsonApiToEntity = new ConcurrentHashMap<>(); protected final ConcurrentHashMap<Class<?>, EntityBinding> entityBindings = new ConcurrentHashMap<>(); protected final CopyOnWriteArrayList<Class<?>> bindEntityRoots = new CopyOnWriteArrayList<>(); protected final ConcurrentHashMap<Class<?>, List<Class<?>>> subclassingEntities = new ConcurrentHashMap<>(); protected final BiMap<String, Class<? extends Check>> checkNames; protected final Injector injector; protected final Function<Class, Serde> serdeLookup ; public final static String REGULAR_ID_NAME = "id"; private final static ConcurrentHashMap<Class, String> SIMPLE_NAMES = new ConcurrentHashMap<>(); /** * Instantiate a new EntityDictionary with the provided set of checks. In addition all of the checks * in {@link com.yahoo.elide.security.checks.prefab} are mapped to {@code Prefab.CONTAINER.CHECK} * (e.g. {@code @ReadPermission(expression="Prefab.Role.All")} * or {@code @ReadPermission(expression="Prefab.Common.UpdateOnCreate")}) * @param checks a map that links the identifiers used in the permission expression strings * to their implementing classes */ public EntityDictionary(Map<String, Class<? extends Check>> checks) { this(checks, null); } /** * Instantiate a new EntityDictionary with the provided set of checks and an injection function. * In addition all of the checks * in {@link com.yahoo.elide.security.checks.prefab} are mapped * to {@code Prefab.CONTAINER.CHECK} * (e.g. {@code @ReadPermission(expression="Prefab.Role.All")} * or {@code @ReadPermission(expression="Prefab.Common.UpdateOnCreate")}) * @param checks a map that links the identifiers used in the permission expression strings * to their implementing classes * @param injector a function typically associated with a dependency injection framework that will * initialize Elide models. */ public EntityDictionary(Map<String, Class<? extends Check>> checks, Injector injector) { this(checks, injector, CoerceUtil::lookup); } public EntityDictionary(Map<String, Class<? extends Check>> checks, Injector injector, Function<Class, Serde> serdeLookup) { this.serdeLookup = serdeLookup; checkNames = Maps.synchronizedBiMap(HashBiMap.create(checks)); addPrefabCheck("Prefab.Role.All", Role.ALL.class); addPrefabCheck("Prefab.Role.None", Role.NONE.class); addPrefabCheck("Prefab.Collections.AppendOnly", AppendOnly.class); addPrefabCheck("Prefab.Collections.RemoveOnly", RemoveOnly.class); addPrefabCheck("Prefab.Common.UpdateOnCreate", Common.UpdateOnCreate.class); this.injector = injector; } private void addPrefabCheck(String alias, Class<? extends Check> checkClass) { if (checkNames.containsKey(alias) || checkNames.inverse().containsKey(checkClass)) { return; } checkNames.put(alias, checkClass); } private static Package getParentPackage(Package pkg) { String name = pkg.getName(); int idx = name.lastIndexOf('.'); return idx == -1 ? null : Package.getPackage(name.substring(0, idx)); } /** * Cache the simple name of the provided class. * @param cls the {@code Class} object to be checked * @return simple name */ public static String getSimpleName(Class<?> cls) { return SIMPLE_NAMES.computeIfAbsent(cls, key -> cls.getSimpleName()); } /** * Find an arbitrary method. * * @param entityClass the entity class * @param name the name * @param paramClass the param class * @return method method * @throws NoSuchMethodException the no such method exception */ public static Method findMethod(Class<?> entityClass, String name, Class<?>... paramClass) throws NoSuchMethodException { Method m = entityClass.getMethod(name, paramClass); int modifiers = m.getModifiers(); if (Modifier.isAbstract(modifiers) || m.isAnnotationPresent(Transient.class) && !m.isAnnotationPresent(ComputedAttribute.class) && !m.isAnnotationPresent(ComputedRelationship.class)) { throw new NoSuchMethodException(name); } return m; } /** * Returns an entity binding if the provided class has been bound in the dictionary. * Otherwise the behavior depends on whether the unbound class is an Entity or not. * If it is not an Entity, we return an EMPTY_BINDING. This preserves existing behavior for relationships * which are entities but not bound. Otherwise, we throw an exception - which also preserves behavior * for unbound non-entities. * @param entityClass * @return */ protected EntityBinding getEntityBinding(Class<?> entityClass) { if (isMappedInterface(entityClass)) { return EMPTY_BINDING; } //Common case of no inheritance. This lookup is a performance boost so we don't have to do reflection. EntityBinding binding = entityBindings.get(entityClass); if (binding != null) { return binding; } Class<?> declaredClass = lookupBoundClass(entityClass); if (declaredClass != null) { return entityBindings.get(declaredClass); } //Will throw an exception if entityClass is not an entity. lookupEntityClass(entityClass); return EMPTY_BINDING; } public boolean isMappedInterface(Class<?> interfaceClass) { return interfaceClass.isInterface() && interfaceClass.isAnnotationPresent(MappedInterface.class); } /** * Returns whether or not the ID field for a given model is generated by the persistence layer. * @param entityClass The model to lookup. * @return True if the ID field is generated. False otherwise. */ public boolean isIdGenerated(Class<?> entityClass) { return getEntityBinding(entityClass).isIdGenerated(); } /** * Returns the binding class for a given entity name. * * @param entityName entity name * @return binding class */ public Class<?> getEntityClass(String entityName) { return bindJsonApiToEntity.get(entityName); } /** * Returns the Include name for a given binding class. * * @param entityClass the entity class * @return binding class * @see Include */ public String getJsonAliasFor(Class<?> entityClass) { return getEntityBinding(entityClass).jsonApiType; } /** * Returns the Entity name for a given binding class. * * @param entityClass the entity class * @return binding class * @see Entity */ public String getEntityFor(Class<?> entityClass) { return getEntityBinding(entityClass).entityName; } /** * Determine if a given (entity class, permission) pair have any permissions defined. * * @param resourceClass the entity class * @param annotationClass the permission annotation * @return {@code true} if that permission is defined anywhere within the class */ public boolean entityHasChecksForPermission(Class<?> resourceClass, Class<? extends Annotation> annotationClass) { EntityBinding binding = getEntityBinding(resourceClass); return binding.entityPermissions.hasChecksForPermission(annotationClass); } /** * Gets the specified permission definition (if any) at the class level. * * @param resourceClass the entity to check * @param annotationClass the permission to look for * @return a {@code ParseTree} expressing the permissions, if one exists * or {@code null} if the permission is not specified at a class level */ public ParseTree getPermissionsForClass(Class<?> resourceClass, Class<? extends Annotation> annotationClass) { EntityBinding binding = getEntityBinding(resourceClass); return binding.entityPermissions.getClassChecksForPermission(annotationClass); } /** * Gets the specified permission definition (if any) at the class level. * * @param resourceClass the entity to check * @param field the field to inspect * @param annotationClass the permission to look for * @return a {@code ParseTree} expressing the permissions, if one exists * or {@code null} if the permission is not specified on that field */ public ParseTree getPermissionsForField(Class<?> resourceClass, String field, Class<? extends Annotation> annotationClass) { EntityBinding binding = getEntityBinding(resourceClass); return binding.entityPermissions.getFieldChecksForPermission(field, annotationClass); } /** * Returns the check mapped to a particular identifier. * * @param checkIdentifier the name from the expression string * @return the {@link Check} mapped to the identifier or {@code null} if the given identifer is unmapped */ public Class<? extends Check> getCheck(String checkIdentifier) { return checkNames.computeIfAbsent(checkIdentifier, cls -> { try { return Class.forName(checkIdentifier).asSubclass(Check.class); } catch (ClassNotFoundException | ClassCastException e) { throw new IllegalArgumentException( "Could not instantiate specified check '" + checkIdentifier + "'.", e); } }); } /** * Get inherited entity names for a particular entity. * * @param entityName Json alias name for entity * @return List of all inherited entity type names */ public List<String> getSubclassingEntityNames(String entityName) { return getSubclassingEntityNames(getEntityClass(entityName)); } /** * Get inherited entity names for a particular entity. * * @param entityClass Entity class * @return List of all inherited entity type names */ public List<String> getSubclassingEntityNames(Class entityClass) { List<Class<?>> entities = getSubclassingEntities(entityClass); return entities.stream().map(this::getJsonAliasFor).collect(Collectors.toList()); } /** * Get a list of inherited entities from a particular entity. * Namely, the list of entities inheriting from the provided class. * * @param entityName Json alias name for entity * @return List of all inherited entity types */ public List<Class<?>> getSubclassingEntities(String entityName) { return getSubclassingEntities(getEntityClass(entityName)); } /** * Get a list of inherited entities from a particular entity. * Namely, the list of entities inheriting from the provided class. * * @param entityClass Entity class * @return List of all inherited entity types */ public List<Class<?>> getSubclassingEntities(Class entityClass) { return subclassingEntities.computeIfAbsent(entityClass, unused -> entityBindings .keySet().stream() .filter(c -> c != entityClass && entityClass.isAssignableFrom(c)) .collect(Collectors.toList())); } /** * Fetch all entity names that the provided entity inherits from (i.e. all superclass entities down to, * but excluding Object). * * @param entityName Json alias name for entity * @return List of all super class entity json names */ public List<String> getSuperClassEntityNames(String entityName) { return getSuperClassEntityNames(getEntityClass(entityName)); } /** * Fetch all entity names that the provided entity inherits from (i.e. all superclass entities down to, * but excluding Object). * * @param entityClass Entity class * @return List of all super class entity json names */ public List<String> getSuperClassEntityNames(Class entityClass) { return getSuperClassEntities(entityClass).stream() .map(this::getJsonAliasFor) .collect(Collectors.toList()); } /** * Fetch all entity classes that the provided entity inherits from (i.e. all superclass entities down to, * but excluding Object). * * @param entityName Json alias name for entity * @return List of all super class entity classes */ public List<Class<?>> getSuperClassEntities(String entityName) { return getSuperClassEntities(getEntityClass(entityName)); } /** * Fetch all entity classes that provided entity inherits from (i.e. all superclass entities down to, * but excluding Object). * * @param entityClass Entity class * @return List of all super class entity classes */ public List<Class<?>> getSuperClassEntities(Class entityClass) { return getEntityBinding(entityClass).inheritedTypes.stream() .filter(entityBindings::containsKey) .collect(Collectors.toList()); } /** * Returns the friendly named mapped to this given check. * @param checkClass The class to lookup * @return the friendly name of the check. */ public String getCheckIdentifier(Class<? extends Check> checkClass) { String identifier = checkNames.inverse().get(checkClass); if (identifier == null) { return checkClass.getName(); } return identifier; } /** * Returns the name of the id field. * * @param entityClass Entity class * @return id field name */ public String getIdFieldName(Class<?> entityClass) { return getEntityBinding(entityClass).getIdFieldName(); } /** * Returns whether the entire entity uses Field or Property level access. * @param entityClass Entity Class * @return The JPA Access Type */ public AccessType getAccessType(Class<?> entityClass) { return getEntityBinding(entityClass).getAccessType(); } /** * Get all bindings. * * @return the bindings */ public Set<Class<?>> getBindings() { return entityBindings.keySet(); } /** * Get the check mappings. * @return a map of check mappings this dictionary knows about */ public Map<String, Class<? extends Check>> getCheckMappings() { return checkNames; } /** * Get the list of attribute names for an entity. * * @param entityClass entity name * @return List of attribute names for entity */ public List<String> getAttributes(Class<?> entityClass) { return getEntityBinding(entityClass).attributes; } /** * Get the Injector for this dictionary. * * @return Injector instance. */ public Injector getInjector() { return injector; } /** * Get the list of attribute names for an entity. * * @param entity entity instance * @return List of attribute names for entity */ public List<String> getAttributes(Object entity) { return getAttributes(entity.getClass()); } /** * Get the list of relationship names for an entity. * * @param entityClass entity name * @return List of relationship names for entity */ public List<String> getRelationships(Class<?> entityClass) { return getEntityBinding(entityClass).relationships; } /** * Get the list of relationship names for an entity. * * @param entity entity instance * @return List of relationship names for entity */ public List<String> getRelationships(Object entity) { return getRelationships(entity.getClass()); } /** * Get a list of elide-bound relationships. * * @param entityClass Entity class to find relationships for * @return List of elide-bound relationship names. */ public List<String> getElideBoundRelationships(Class<?> entityClass) { return getRelationships(entityClass).stream() .filter(relationName -> getBindings().contains(getParameterizedType(entityClass, relationName))) .collect(Collectors.toList()); } /** * Get a list of elide-bound relationships. * * @param entity Entity instance to find relationships for * @return List of elide-bound relationship names. */ public List<String> getElideBoundRelationships(Object entity) { return getElideBoundRelationships(entity.getClass()); } /** * Determine whether or not a method is request scopeable. * * @param entity Entity instance * @param method Method on entity to check * @return True if method accepts a RequestScope, false otherwise. */ public boolean isMethodRequestScopeable(Object entity, Method method) { return isMethodRequestScopeable(entity.getClass(), method); } /** * Determine whether or not a method is request scopeable. * * @param entityClass Entity to check * @param method Method on entity to check * @return True if method accepts a RequestScope, false otherwise. */ public boolean isMethodRequestScopeable(Class<?> entityClass, Method method) { return getEntityBinding(entityClass).requestScopeableMethods.getOrDefault(method, false); } /** * Get a list of all fields including both relationships and attributes. * * @param entityClass entity name * @return List of all fields. */ public List<String> getAllFields(Class<?> entityClass) { List<String> fields = new ArrayList<>(); List<String> attrs = getAttributes(entityClass); List<String> rels = getRelationships(entityClass); if (attrs != null) { fields.addAll(attrs); } if (rels != null) { fields.addAll(rels); } return fields; } /** * Get a list of all fields including both relationships and attributes. * * @param entity entity * @return List of all fields. */ public List<String> getAllFields(Object entity) { return getAllFields(entity.getClass()); } /** * Get the type of relationship from a relation. * * @param cls Entity class * @param relation Name of relationship field * @return Relationship type. RelationshipType.NONE if is none found. */ public RelationshipType getRelationshipType(Class<?> cls, String relation) { final ConcurrentHashMap<String, RelationshipType> types = getEntityBinding(cls).relationshipTypes; if (types == null) { return RelationshipType.NONE; } final RelationshipType type = types.get(relation); return (type == null) ? RelationshipType.NONE : type; } /** * If a relationship is bidirectional, returns the name of the peer relationship in the peer entity. * * @param cls the cls * @param relation the relation * @return relation inverse */ public String getRelationInverse(Class<?> cls, String relation) { final EntityBinding clsBinding = getEntityBinding(cls); final ConcurrentHashMap<String, String> mappings = clsBinding.relationshipToInverse; if (mappings != null) { final String mapping = mappings.get(relation); if (mapping != null && !"".equals(mapping)) { return mapping; } } /* * This could be the owning side of the relation. Let's see if the entity referenced in the relation * has a bidirectional reference that is mapped to the given relation. */ final Class<?> inverseType = getParameterizedType(cls, relation); final ConcurrentHashMap<String, String> inverseMappings = getEntityBinding(inverseType).relationshipToInverse; for (Map.Entry<String, String> inverseMapping : inverseMappings.entrySet()) { String inverseRelationName = inverseMapping.getKey(); String inverseMappedBy = inverseMapping.getValue(); if (relation.equals(inverseMappedBy) && getParameterizedType(inverseType, inverseRelationName).equals(clsBinding.entityClass)) { return inverseRelationName; } } return ""; } /** * Get the type of relationship from a relation. * * @param entity Entity instance * @param relation Name of relationship field * @return Relationship type. RelationshipType.NONE if is none found. */ public RelationshipType getRelationshipType(Object entity, String relation) { return getRelationshipType(entity.getClass(), relation); } /** * Get a type for a field on an entity. * <p> * If this method is called on a bean such as the following * <pre> * {@code * public class Address { * {@literal @}Id * private Long id * * private String street1; * * private String street2; * } * } * </pre> * then * <pre> * {@code * getType(Address.class, "id") = Long.class * getType(Address.class, "street1") = String.class * getType(Address.class, "street2") = String.class * } * </pre> * But if the ID field is not "id" and there is no such non-ID field called "id", i.e. * <pre> * {@code * public class Address { * {@literal @}Id * private Long surrogateKey * * private String street1; * * private String street2; * } * } * </pre> * then * <pre> * {@code * getType(Address.class, "id") = Long.class * getType(Address.class, "surrogateKey") = Long.class * getType(Address.class, "street1") = String.class * getType(Address.class, "street2") = String.class * } * </pre> * JSON-API spec does not allow "id" as non-ID field name. If, therefore, there is a non-ID field called "id", * calling this method has undefined behavior * * @param entityClass Entity class * @param identifier Identifier/Field to lookup type * @return Type of entity */ public Class<?> getType(Class<?> entityClass, String identifier) { if (identifier.equals(REGULAR_ID_NAME)) { return getEntityBinding(entityClass).getIdType(); } ConcurrentHashMap<String, Class<?>> fieldTypes = getEntityBinding(entityClass).fieldsToTypes; return fieldTypes == null ? null : fieldTypes.get(identifier); } /** * Get a type for a field on an entity. * * @param entity Entity instance * @param identifier Field to lookup type * @return Type of entity */ public Class<?> getType(Object entity, String identifier) { return getType(entity.getClass(), identifier); } /** * Retrieve the parameterized type for the given field. * * @param entityClass the entity class * @param identifier the identifier * @return Entity type for field otherwise null. */ public Class<?> getParameterizedType(Class<?> entityClass, String identifier) { return getParameterizedType(entityClass, identifier, 0); } /** * Retrieve the parameterized type for the given field. * * @param entityClass the entity class * @param identifier the identifier/field name * @param paramIndex the index of the parameterization * @return Entity type for field otherwise null. */ public Class<?> getParameterizedType(Class<?> entityClass, String identifier, int paramIndex) { ConcurrentHashMap<String, AccessibleObject> fieldOrMethods = getEntityBinding(entityClass).fieldsToValues; if (fieldOrMethods == null) { return null; } AccessibleObject fieldOrMethod = fieldOrMethods.get(identifier); if (fieldOrMethod == null) { return null; } return EntityBinding.getFieldType(entityClass, fieldOrMethod, Optional.of(paramIndex)); } /** * Retrieve the parameterized type for the given field. * * @param entity Entity instance * @param identifier Field to lookup * @return Entity type for field otherwise null. */ public Class<?> getParameterizedType(Object entity, String identifier) { return getParameterizedType(entity.getClass(), identifier); } /** * Retrieve the parameterized type for the given field. * * @param entity Entity instance * @param identifier Field to lookup * @param paramIndex the index of the parameterization * @return Entity type for field otherwise null. */ public Class<?> getParameterizedType(Object entity, String identifier, int paramIndex) { return getParameterizedType(entity.getClass(), identifier, paramIndex); } /** * Get the true field/method name from an alias. * * @param entityClass Entity name * @param alias Alias to convert * @return Real field/method name as a string. null if not found. */ public String getNameFromAlias(Class<?> entityClass, String alias) { ConcurrentHashMap<String, String> map = getEntityBinding(entityClass).aliasesToFields; if (map != null) { return map.get(alias); } return null; } /** * Get the true field/method name from an alias. * * @param entity Entity instance * @param alias Alias to convert * @return Real field/method name as a string. null if not found. */ public String getNameFromAlias(Object entity, String alias) { return getNameFromAlias(entity.getClass(), alias); } /** * Initialize an entity. * * @param <T> the type parameter * @param entity Entity to initialize */ public <T> void initializeEntity(T entity) { if (entity != null) { @SuppressWarnings("unchecked") Initializer<T> initializer = getEntityBinding(entity.getClass()).getInitializer(); if (initializer != null) { initializer.initialize(entity); } else if (injector != null) { injector.inject(entity); } } } /** * Bind a particular initializer to a class. * * @param <T> the type parameter * @param initializer Initializer to use for class * @param cls Class to bind initialization */ public <T> void bindInitializer(Initializer<T> initializer, Class<T> cls) { bindIfUnbound(cls); getEntityBinding(cls).setInitializer(initializer); } /** * Returns whether or not an entity is shareable. * * @param entityClass the entity type to check for the shareable permissions * @return true if entityClass is shareable. False otherwise. */ public boolean isShareable(Class<?> entityClass) { return getAnnotation(entityClass, SharePermission.class) != null && getAnnotation(entityClass, SharePermission.class).sharable(); } /** * Add given Entity bean to dictionary. * * @param cls Entity bean class */ public void bindEntity(Class<?> cls) { Class<?> declaredClass = lookupIncludeClass(cls); if (declaredClass == null) { log.trace("Missing include or excluded class {}", cls.getName()); return; } if (isClassBound(declaredClass)) { //Ignore duplicate bindings. return; } Include include = (Include) getFirstAnnotation(declaredClass, Arrays.asList(Include.class)); Entity entity = (Entity) getFirstAnnotation(declaredClass, Arrays.asList(Entity.class)); String name; if (entity == null || "".equals(entity.name())) { name = StringUtils.uncapitalize(cls.getSimpleName()); } else { name = entity.name(); } String type; if ("".equals(include.type())) { type = name; } else { type = include.type(); } bindJsonApiToEntity.put(type, declaredClass); entityBindings.put(declaredClass, new EntityBinding(this, declaredClass, type, name)); if (include.rootLevel()) { bindEntityRoots.add(declaredClass); } } /** * Return annotation from class, parents or package. * * @param record the record * @param annotationClass the annotation class * @param <A> genericClass * @return the annotation */ public <A extends Annotation> A getAnnotation(PersistentResource record, Class<A> annotationClass) { return getAnnotation(record.getResourceClass(), annotationClass); } /** * Return annotation from class, parents or package. * * @param recordClass the record class * @param annotationClass the annotation class * @param <A> genericClass * @return the annotation */ public <A extends Annotation> A getAnnotation(Class<?> recordClass, Class<A> annotationClass) { return getEntityBinding(recordClass).getAnnotation(annotationClass); } /** * Return annotation from class for provided method. * @param recordClass the record class * @param method the method * @param annotationClass the annotation class * @param <A> genericClass * @return the annotation */ public <A extends Annotation> A getMethodAnnotation(Class<?> recordClass, String method, Class<A> annotationClass) { return getEntityBinding(recordClass).getMethodAnnotation(annotationClass, method); } public <A extends Annotation> Collection<LifeCycleHook> getTriggers(Class<?> cls, Class<A> annotationClass, String fieldName) { return getEntityBinding(cls).getTriggers(annotationClass, fieldName); } public <A extends Annotation> Collection<LifeCycleHook> getTriggers(Class<?> cls, Class<A> annotationClass) { return getEntityBinding(cls).getTriggers(annotationClass); } /** * Return a single annotation from field or accessor method. * * @param entityClass the entity class * @param annotationClass given annotation type * @param identifier the identifier * @param <A> genericClass * @return annotation found */ public <A extends Annotation> A getAttributeOrRelationAnnotation(Class<?> entityClass, Class<A> annotationClass, String identifier) { AccessibleObject fieldOrMethod = getEntityBinding(entityClass).fieldsToValues.get(identifier); if (fieldOrMethod == null) { return null; } return fieldOrMethod.getAnnotation(annotationClass); } /** * Return multiple annotations from field or accessor method. * * @param <A> the type parameter * @param entityClass the entity class * @param annotationClass given annotation type * @param identifier the identifier * @return annotation found or null if none found */ public <A extends Annotation> A[] getAttributeOrRelationAnnotations(Class<?> entityClass, Class<A> annotationClass, String identifier) { AccessibleObject fieldOrMethod = getEntityBinding(entityClass).fieldsToValues.get(identifier); if (fieldOrMethod == null) { return null; } return fieldOrMethod.getAnnotationsByType(annotationClass); } /** * Return first matching annotation from class, parents or package. * * @param entityClass Entity class type * @param annotationClassList List of sought annotations * @return annotation found */ public static Annotation getFirstAnnotation(Class<?> entityClass, List<Class<? extends Annotation>> annotationClassList) { Annotation annotation = null; for (Class<?> cls = entityClass; annotation == null && cls != null; cls = cls.getSuperclass()) { for (Class<? extends Annotation> annotationClass : annotationClassList) { annotation = cls.getDeclaredAnnotation(annotationClass); if (annotation != null) { break; } } } // no class annotation, try packages for (Package pkg = entityClass.getPackage(); annotation == null && pkg != null; pkg = getParentPackage(pkg)) { for (Class<? extends Annotation> annotationClass : annotationClassList) { annotation = pkg.getDeclaredAnnotation(annotationClass); if (annotation != null) { break; } } } return annotation; } /** * Is root. * * @param entityClass the entity class * @return the boolean */ public boolean isRoot(Class<?> entityClass) { return bindEntityRoots.contains(entityClass); } /** * Gets id. * * @param value the value * @return the id */ public String getId(Object value) { if (value == null) { return null; } try { AccessibleObject idField = null; Class<?> valueClass = value.getClass(); for (; idField == null && valueClass != null; valueClass = valueClass.getSuperclass()) { try { idField = getEntityBinding(valueClass).getIdField(); } catch (NullPointerException e) { log.warn("Class: {} ID Field: {}", valueClass.getSimpleName(), idField); } } Class<?> idClass; Object idValue; if (idField instanceof Field) { idValue = ((Field) idField).get(value); idClass = ((Field) idField).getType(); } else if (idField instanceof Method) { idValue = ((Method) idField).invoke(value, (Object[]) null); idClass = ((Method) idField).getReturnType(); } else { return null; } Serde serde = serdeLookup.apply(idClass); if (serde != null) { return String.valueOf(serde.serialize(idValue)); } return String.valueOf(idValue); } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) { return null; } } /** * Returns type of id field. * * @param entityClass the entity class * @return ID type */ public Class<?> getIdType(Class<?> entityClass) { return getEntityBinding(entityClass).getIdType(); } /** * Returns annotations applied to the ID field. * * @param value the value * @return Collection of Annotations */ public Collection<Annotation> getIdAnnotations(Object value) { if (value == null) { return null; } AccessibleObject idField = getEntityBinding(value.getClass()).getIdField(); if (idField != null) { return Arrays.asList(idField.getDeclaredAnnotations()); } return Collections.emptyList(); } /** * Follow for this class or super-class for Entity annotation. * * @param objClass provided class * @return class with Entity annotation */ public Class<?> lookupEntityClass(Class<?> objClass) { Class<?> declaringClass = lookupAnnotationDeclarationClass(objClass, Entity.class); if (declaringClass != null) { return declaringClass; } throw new IllegalArgumentException("Unbound Entity " + objClass); } /** * Follow for this class or super-class for Include annotation. * * @param objClass provided class * @return class with Include annotation or */ public Class<?> lookupIncludeClass(Class<?> objClass) { Annotation first = getFirstAnnotation(objClass, Arrays.asList(Exclude.class, Include.class)); if (first instanceof Include) { return objClass; } return null; } /** * Search a class hierarchy to find the first instance of a declared annotation. * @param objClass The class to start searching. * @param annotationClass The annotation to search for. * @return The class which declares the annotation or null. */ public Class<?> lookupAnnotationDeclarationClass(Class<?> objClass, Class<? extends Annotation> annotationClass) { for (Class<?> cls = objClass; cls != null; cls = cls.getSuperclass()) { if (cls.getDeclaredAnnotation(annotationClass) != null) { return cls; } } return null; } /** * Return bound entity or null. * * @param objClass provided class * @return Bound class. */ public Class<?> lookupBoundClass(Class<?> objClass) { //Common case - we can avoid reflection by checking the map ... EntityBinding binding = entityBindings.getOrDefault(objClass, EMPTY_BINDING); if (binding != EMPTY_BINDING) { return binding.entityClass; } Class<?> declaredClass = lookupIncludeClass(objClass); if (declaredClass == null) { return null; } binding = entityBindings.getOrDefault(declaredClass, EMPTY_BINDING); if (binding != EMPTY_BINDING) { return binding.entityClass; } try { //Special Case for ORM proxied objects. If the class is a proxy, //and it is unbound, try the superclass. return lookupEntityClass(declaredClass.getSuperclass()); } catch (IllegalArgumentException e) { return null; } } /** * Return if the class has been bound or not. Only safe to call while binding an entity (does not consider * ORM proxy objects). * * @param objClass provided class * @return true if the class is already bound. */ private boolean isClassBound(Class<?> objClass) { return (entityBindings.getOrDefault(objClass, EMPTY_BINDING) != EMPTY_BINDING); } /** * Retrieve the accessible object for a field from a target object. * * @param target the object to get * @param fieldName the field name to get or invoke equivalent get method * @return the value */ public AccessibleObject getAccessibleObject(Object target, String fieldName) { return getAccessibleObject(target.getClass(), fieldName); } public boolean isComputed(Class<?> entityClass, String fieldName) { AccessibleObject fieldOrMethod = getAccessibleObject(entityClass, fieldName); if (fieldOrMethod == null) { return false; } return (fieldOrMethod.isAnnotationPresent(ComputedAttribute.class) || fieldOrMethod.isAnnotationPresent(ComputedRelationship.class)); } /** * Retrieve the accessible object for a field. * * @param targetClass the object to get * @param fieldName the field name to get or invoke equivalent get method * @return the value */ public AccessibleObject getAccessibleObject(Class<?> targetClass, String fieldName) { return getEntityBinding(targetClass).fieldsToValues.get(fieldName); } /** * Retrieve fields from an object containing a particular type. * * @param targetClass Class to search for fields * @param targetType Type of fields to find * @return Set containing field names */ public Set<String> getFieldsOfType(Class<?> targetClass, Class<?> targetType) { HashSet<String> fields = new HashSet<>(); for (String field : getAllFields(targetClass)) { if (getParameterizedType(targetClass, field).equals(targetType)) { fields.add(field); } } return fields; } public boolean isRelation(Class<?> entityClass, String relationName) { return getEntityBinding(entityClass).relationships.contains(relationName); } public boolean isAttribute(Class<?> entityClass, String attributeName) { return getEntityBinding(entityClass).attributes.contains(attributeName); } /** * Scan for security checks and automatically bind them to the dictionary. */ public void scanForSecurityChecks() { // Logic is based on https://github.com/illyasviel/elide-spring-boot/blob/master // /elide-spring-boot-autoconfigure/src/main/java/org/illyasviel/elide // /spring/boot/autoconfigure/ElideAutoConfiguration.java for (Class<?> cls : ClassScanner.getAnnotatedClasses(SecurityCheck.class)) { if (Check.class.isAssignableFrom(cls)) { SecurityCheck securityCheckMeta = cls.getAnnotation(SecurityCheck.class); log.debug("Register Elide Check [{}] with expression [{}]", cls.getCanonicalName(), securityCheckMeta.value()); checkNames.put(securityCheckMeta.value(), cls.asSubclass(Check.class)); } else { throw new IllegalStateException("Class annotated with SecurityCheck is not a Check"); } } } /** * Binds a lifecycle hook to a particular field or method in an entity. The hook will be called a * single time per request per field READ, CREATE, or UPDATE. * @param entityClass The entity that triggers the lifecycle hook. * @param annotationClass (OnReadPostCommit, OnUpdatePreSecurity, etc) * @param fieldOrMethodName The name of the field or method * @param callback The callback function to invoke. */ public void bindTrigger(Class<?> entityClass, Class<? extends Annotation> annotationClass, String fieldOrMethodName, LifeCycleHook callback) { bindIfUnbound(entityClass); getEntityBinding(entityClass).bindTrigger(annotationClass, fieldOrMethodName, callback); } /** * Binds a lifecycle hook to a particular entity class. The hook will either be called: * - A single time single time per request per class READ, CREATE, UPDATE, or DELETE. * - Multiple times per request per field READ, CREATE, or UPDATE. * * The behavior is determined by the value of the {@code allowMultipleInvocations} flag. * @param entityClass The entity that triggers the lifecycle hook. * @param annotationClass (OnReadPostCommit, OnUpdatePreSecurity, etc) * @param callback The callback function to invoke. * @param allowMultipleInvocations Should the same life cycle hook be invoked multiple times for multiple * CRUD actions on the same model. */ public void bindTrigger(Class<?> entityClass, Class<? extends Annotation> annotationClass, LifeCycleHook callback, boolean allowMultipleInvocations) { bindIfUnbound(entityClass); if (allowMultipleInvocations) { getEntityBinding(entityClass).bindTrigger(annotationClass, callback); } else { getEntityBinding(entityClass).bindTrigger(annotationClass, PersistentResource.CLASS_NO_FIELD, callback); } } /** * Binds a lifecycle hook to a particular entity class. The hook will be called a single time per request * per class READ, CREATE, UPDATE, or DELETE. * @param entityClass The entity that triggers the lifecycle hook. * @param annotationClass (OnReadPostCommit, OnUpdatePreSecurity, etc) * @param callback The callback function to invoke. */ public void bindTrigger(Class<?> entityClass, Class<? extends Annotation> annotationClass, LifeCycleHook callback) { bindTrigger(entityClass, annotationClass, callback, false); } /** * Returns true if the relationship cascades deletes and false otherwise. * @param targetClass The class which owns the relationship. * @param fieldName The relationship * @return true or false */ public boolean cascadeDeletes(Class<?> targetClass, String fieldName) { CascadeType [] cascadeTypes = getEntityBinding(targetClass).relationshipToCascadeTypes.getOrDefault(fieldName, new CascadeType[0]); for (CascadeType cascadeType : cascadeTypes) { if (cascadeType == CascadeType.ALL || cascadeType == CascadeType.REMOVE) { return true; } } return false; } /** * Walks the entity graph and performs a transform function on each element. * @param entities The roots of the entity graph. * @param transform The function to transform each entity class into a result. * @param <T> The result type. * @return The collection of results. */ public <T> List<T> walkEntityGraph(Set<Class<?>> entities, Function<Class<?>, T> transform) { ArrayList<T> results = new ArrayList<>(); Queue<Class<?>> toVisit = new ArrayDeque<>(entities); Set<Class<?>> visited = new HashSet<>(); while (! toVisit.isEmpty()) { Class<?> clazz = toVisit.remove(); results.add(transform.apply(clazz)); visited.add(clazz); for (String relationship : getElideBoundRelationships(clazz)) { Class<?> relationshipClass = getParameterizedType(clazz, relationship); if (lookupBoundClass(relationshipClass) == null) { /* The relationship hasn't been bound */ continue; } if (!visited.contains(relationshipClass)) { toVisit.add(relationshipClass); } } } return results; } /** * Returns whether or not a class is already bound. * @param cls * @return true if the class is bound. False otherwise. */ public boolean hasBinding(Class<?> cls) { return bindJsonApiToEntity.contains(cls); } /** * Invoke the get[fieldName] method on the target object OR get the field with the corresponding name. * @param target the object to get * @param fieldName the field name to get or invoke equivalent get method * @return the value */ public Object getValue(Object target, String fieldName, RequestScope scope) { AccessibleObject accessor = getAccessibleObject(target, fieldName); try { if (accessor instanceof Method) { // Pass RequestScope into @Computed fields if requested if (isMethodRequestScopeable(target, (Method) accessor)) { return ((Method) accessor).invoke(target, scope); } return ((Method) accessor).invoke(target); } if (accessor instanceof Field) { return ((Field) accessor).get(target); } } catch (IllegalAccessException e) { throw new InvalidAttributeException(fieldName, getJsonAliasFor(target.getClass()), e); } catch (InvocationTargetException e) { throw handleInvocationTargetException(e); } throw new InvalidAttributeException(fieldName, getJsonAliasFor(target.getClass())); } /** * Invoke the set[fieldName] method on the target object OR set the field with the corresponding name. * @param fieldName the field name to set or invoke equivalent set method * @param value the value to set */ public void setValue(Object target, String fieldName, Object value) { Class<?> targetClass = target.getClass(); String targetType = getJsonAliasFor(targetClass); String fieldAlias = fieldName; try { Class<?> fieldClass = getType(targetClass, fieldName); String realName = getNameFromAlias(target, fieldName); fieldAlias = (realName != null) ? realName : fieldName; String setMethod = "set" + StringUtils.capitalize(fieldAlias); Method method = EntityDictionary.findMethod(targetClass, setMethod, fieldClass); method.invoke(target, coerce(target, value, fieldAlias, fieldClass)); } catch (IllegalAccessException e) { throw new InvalidAttributeException(fieldAlias, targetType, e); } catch (InvocationTargetException e) { throw handleInvocationTargetException(e); } catch (IllegalArgumentException | NoSuchMethodException noMethod) { AccessibleObject accessor = getAccessibleObject(target, fieldAlias); if (accessor != null && accessor instanceof Field) { Field field = (Field) accessor; try { field.set(target, coerce(target, value, fieldAlias, field.getType())); } catch (IllegalAccessException noField) { throw new InvalidAttributeException(fieldAlias, targetType, noField); } } else { throw new InvalidAttributeException(fieldAlias, targetType); } } } /** * Handle an invocation target exception. * * @param e Exception the exception encountered while reflecting on an object's field * @return Equivalent runtime exception */ private static RuntimeException handleInvocationTargetException(InvocationTargetException e) { Throwable exception = e.getTargetException(); if (exception instanceof HttpStatusException || exception instanceof WebApplicationException) { return (RuntimeException) exception; } log.error("Caught an unexpected exception (rethrowing as internal server error)", e); return new InternalServerErrorException("Unexpected exception caught", e); } /** * Coerce provided value into expected class type. * * @param value provided value * @param fieldName the field name * @param fieldClass expected class type * @return coerced value */ public Object coerce(Object target, Object value, String fieldName, Class<?> fieldClass) { if (fieldClass != null && Collection.class.isAssignableFrom(fieldClass) && value instanceof Collection) { return coerceCollection(target, (Collection) value, fieldName, fieldClass); } if (fieldClass != null && Map.class.isAssignableFrom(fieldClass) && value instanceof Map) { return coerceMap(target, (Map<?, ?>) value, fieldName); } return CoerceUtil.coerce(value, fieldClass); } private Collection coerceCollection(Object target, Collection<?> values, String fieldName, Class<?> fieldClass) { Class<?> providedType = getParameterizedType(target, fieldName); // check if collection is of and contains the correct types if (fieldClass.isAssignableFrom(values.getClass())) { boolean valid = true; for (Object member : values) { if (member != null && !providedType.isAssignableFrom(member.getClass())) { valid = false; break; } } if (valid) { return values; } } ArrayList<Object> list = new ArrayList<>(values.size()); for (Object member : values) { list.add(CoerceUtil.coerce(member, providedType)); } if (Set.class.isAssignableFrom(fieldClass)) { return new LinkedHashSet<>(list); } return list; } private Map coerceMap(Object target, Map<?, ?> values, String fieldName) { Class<?> keyType = getParameterizedType(target, fieldName, 0); Class<?> valueType = getParameterizedType(target, fieldName, 1); // Verify the existing Map if (isValidParameterizedMap(values, keyType, valueType)) { return values; } LinkedHashMap<Object, Object> result = new LinkedHashMap<>(values.size()); for (Map.Entry<?, ?> entry : values.entrySet()) { result.put(CoerceUtil.coerce(entry.getKey(), keyType), CoerceUtil.coerce(entry.getValue(), valueType)); } return result; } private boolean isValidParameterizedMap(Map<?, ?> values, Class<?> keyType, Class<?> valueType) { for (Map.Entry<?, ?> entry : values.entrySet()) { Object key = entry.getKey(); Object value = entry.getValue(); if ((key != null && !keyType.isAssignableFrom(key.getClass())) || (value != null && !valueType.isAssignableFrom(value.getClass()))) { return false; } } return true; } /** * Binds the entity class if not yet bound. * @param entityClass the class to bind. */ private void bindIfUnbound(Class<?> entityClass) { if (! isClassBound(entityClass)) { bindEntity(entityClass); } } }
{ "pile_set_name": "Github" }
import * as Lint from "tslint"; import * as ts from "typescript"; import { failure } from "../util"; // Same functionality as https://github.com/palantir/tslint/pull/1654, but simpler implementation. // Remove when that PR is in. export class Rule extends Lint.Rules.AbstractRule { static metadata: Lint.IRuleMetadata = { ruleName: "no-useless-files", description: "Forbids files with no content.", optionsDescription: "Not configurable.", options: null, type: "functionality", typescriptOnly: false, }; static FAILURE_STRING = failure( Rule.metadata.ruleName, "File has no content."); apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { const { statements, referencedFiles, typeReferenceDirectives } = sourceFile; if (statements.length + referencedFiles.length + typeReferenceDirectives.length !== 0) { return []; } return [new Lint.RuleFailure(sourceFile, 0, 1, Rule.FAILURE_STRING, this.ruleName)]; } }
{ "pile_set_name": "Github" }
{{ partial "header.html" . }} <div class="main-container"> <section class="space--xs "> <div class="container"> <div class="row"> <div class="col-md-12"> <span class="h2 inline-block">Articles & News</span> <!-- <div class="typed-headline"> <span class="h2 inline-block">Hue helps you</span> <span class="h2 inline-block typed-text typed-text--cursor color--primary" data-typed-strings="discover insights.,write SQL.,visualize data."></span> </div> --> </div> </div> </div> </section> <section class="text-center space--xs "> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="masonry-filter-container d-flex align-items-center"> <span>Category:</span> <div class="masonry-filter-holder"> <div class="masonry__filters"> <ul> {{ $currentUrl := .URL }} {{if eq $currentUrl `/posts/`}} <li class="active"><a href="/posts">All Categories</a></li> {{else}} <li class="active">{{ .Title }}</li> <li><a href="/posts">All Categories</a></li> {{end}} {{ range $key, $value := .Site.Taxonomies.categories }} <li><a href="/categories/{{ $key | urlize }}">{{ $key | humanize }}</a> ({{ len $value }})</li> {{ end }} </ul> </div> </div> </div> <hr> </div> </div> </div> <!--end of container--> </section> {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} {{ range $paginator.Pages }} <section class="space--xs blog-article-wide"> <div class="container"> <div class="row cta cta--horizontal text-center-xs"> <div class="col-md-3"> <h4>{{ .Date.Format "02 January 2006" }}</h4> </div> <div class="col-md-6"> <a href="{{ .Permalink }}"> <p class="lead"> {{ .Title }} </p> </a> <p class="mt-2">{{ .Summary }}{{ if .Truncated }}&hellip;{{ end }}</p> {{ $read := .ReadingTime }} <span>{{ .ReadingTime }} minute{{ if gt $read 1 }}s{{ end }} read</span> - {{ $categories := .Params.categories }} {{ range $index, $element := $categories }} <a href="{{ "/categories/" | relLangURL }}{{ $element | urlize }}">{{ $element }}</a> {{ if (ne (add $index 1) (len $categories)) }} / {{ end }} {{ end }} </div> <div class="col-md-3 text-right text-center-xs"> <a class="btn type--uppercase" href="{{ .Permalink }}"> <span class="btn__text"> Read Article </span> </a> </div> </div> <!--end of row--> </div> <!--end of container--> </section> {{ end }} <section> <div class="container"> <div class="row"> <div class="col-md-12"> {{ $pag := $.Paginator }} {{ if gt $pag.TotalPages 1 }} <div class="pagination"> {{ with $pag.First }} <a class="pagination__prev" href="{{ .URL }}" title="First Page">&laquo;&laquo;</a> {{ end }} <!-- {{ if $pag.HasPrev }} <a class="pagination__prev ml-5" href="{{ $pag.Prev.URL }}" title="Previous Page">&laquo;</a> {{ end }} --> <ol> {{ $ellipsed := false }} {{ $shouldEllipse := false }} {{ range $pag.Pagers }} {{ $right := sub .TotalPages .PageNumber }} {{ $showNumber := or (le .PageNumber 3) (eq $right 0) }} {{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }} {{ if $showNumber }} {{ $ellipsed = false }} {{ $shouldEllipse = false }} {{ else }} {{ $shouldEllipse = not $ellipsed }} {{ $ellipsed = true }} {{ end }} {{ if $showNumber }} <li class="{{ if eq . $pag }}pagination__current{{ end }}"><a href="{{ .URL }}">{{ .PageNumber }}</a></li> {{ else if $shouldEllipse }} <li class="page-item disabled"><span aria-hidden="true">&nbsp;&hellip;&nbsp;</span></li> {{ end }} {{ end }} </ol> <!-- {{ if $pag.HasNext }} <a class="pagination__next mr-5" href="{{ $pag.Next.URL }}" title="Next Page">&raquo;</a> {{ end }} --> {{ with $pag.Last }} <a class="pagination__next" href="{{ .URL }}" title="Last Page">&raquo;&raquo;</a> {{ end }} </div> {{ end }} </div> </div> <!--end of row--> </div> <!--end of container--> </section> {{ partial "latest.html" . }} </div> {{ partial "footer.html" . }}
{ "pile_set_name": "Github" }
package lru import ( "fmt" "sync" "github.com/hashicorp/golang-lru/simplelru" ) const ( // Default2QRecentRatio is the ratio of the 2Q cache dedicated // to recently added entries that have only been accessed once. Default2QRecentRatio = 0.25 // Default2QGhostEntries is the default ratio of ghost // entries kept to track entries recently evicted Default2QGhostEntries = 0.50 ) // TwoQueueCache is a thread-safe fixed size 2Q cache. // 2Q is an enhancement over the standard LRU cache // in that it tracks both frequently and recently used // entries separately. This avoids a burst in access to new // entries from evicting frequently used entries. It adds some // additional tracking overhead to the standard LRU cache, and is // computationally about 2x the cost, and adds some metadata over // head. The ARCCache is similar, but does not require setting any // parameters. type TwoQueueCache struct { size int recentSize int recent simplelru.LRUCache frequent simplelru.LRUCache recentEvict simplelru.LRUCache lock sync.RWMutex } // New2Q creates a new TwoQueueCache using the default // values for the parameters. func New2Q(size int) (*TwoQueueCache, error) { return New2QParams(size, Default2QRecentRatio, Default2QGhostEntries) } // New2QParams creates a new TwoQueueCache using the provided // parameter values. func New2QParams(size int, recentRatio float64, ghostRatio float64) (*TwoQueueCache, error) { if size <= 0 { return nil, fmt.Errorf("invalid size") } if recentRatio < 0.0 || recentRatio > 1.0 { return nil, fmt.Errorf("invalid recent ratio") } if ghostRatio < 0.0 || ghostRatio > 1.0 { return nil, fmt.Errorf("invalid ghost ratio") } // Determine the sub-sizes recentSize := int(float64(size) * recentRatio) evictSize := int(float64(size) * ghostRatio) // Allocate the LRUs recent, err := simplelru.NewLRU(size, nil) if err != nil { return nil, err } frequent, err := simplelru.NewLRU(size, nil) if err != nil { return nil, err } recentEvict, err := simplelru.NewLRU(evictSize, nil) if err != nil { return nil, err } // Initialize the cache c := &TwoQueueCache{ size: size, recentSize: recentSize, recent: recent, frequent: frequent, recentEvict: recentEvict, } return c, nil } // Get looks up a key's value from the cache. func (c *TwoQueueCache) Get(key interface{}) (value interface{}, ok bool) { c.lock.Lock() defer c.lock.Unlock() // Check if this is a frequent value if val, ok := c.frequent.Get(key); ok { return val, ok } // If the value is contained in recent, then we // promote it to frequent if val, ok := c.recent.Peek(key); ok { c.recent.Remove(key) c.frequent.Add(key, val) return val, ok } // No hit return nil, false } // Add adds a value to the cache. func (c *TwoQueueCache) Add(key, value interface{}) { c.lock.Lock() defer c.lock.Unlock() // Check if the value is frequently used already, // and just update the value if c.frequent.Contains(key) { c.frequent.Add(key, value) return } // Check if the value is recently used, and promote // the value into the frequent list if c.recent.Contains(key) { c.recent.Remove(key) c.frequent.Add(key, value) return } // If the value was recently evicted, add it to the // frequently used list if c.recentEvict.Contains(key) { c.ensureSpace(true) c.recentEvict.Remove(key) c.frequent.Add(key, value) return } // Add to the recently seen list c.ensureSpace(false) c.recent.Add(key, value) return } // ensureSpace is used to ensure we have space in the cache func (c *TwoQueueCache) ensureSpace(recentEvict bool) { // If we have space, nothing to do recentLen := c.recent.Len() freqLen := c.frequent.Len() if recentLen+freqLen < c.size { return } // If the recent buffer is larger than // the target, evict from there if recentLen > 0 && (recentLen > c.recentSize || (recentLen == c.recentSize && !recentEvict)) { k, _, _ := c.recent.RemoveOldest() c.recentEvict.Add(k, nil) return } // Remove from the frequent list otherwise c.frequent.RemoveOldest() } // Len returns the number of items in the cache. func (c *TwoQueueCache) Len() int { c.lock.RLock() defer c.lock.RUnlock() return c.recent.Len() + c.frequent.Len() } // Keys returns a slice of the keys in the cache. // The frequently used keys are first in the returned slice. func (c *TwoQueueCache) Keys() []interface{} { c.lock.RLock() defer c.lock.RUnlock() k1 := c.frequent.Keys() k2 := c.recent.Keys() return append(k1, k2...) } // Remove removes the provided key from the cache. func (c *TwoQueueCache) Remove(key interface{}) { c.lock.Lock() defer c.lock.Unlock() if c.frequent.Remove(key) { return } if c.recent.Remove(key) { return } if c.recentEvict.Remove(key) { return } } // Purge is used to completely clear the cache. func (c *TwoQueueCache) Purge() { c.lock.Lock() defer c.lock.Unlock() c.recent.Purge() c.frequent.Purge() c.recentEvict.Purge() } // Contains is used to check if the cache contains a key // without updating recency or frequency. func (c *TwoQueueCache) Contains(key interface{}) bool { c.lock.RLock() defer c.lock.RUnlock() return c.frequent.Contains(key) || c.recent.Contains(key) } // Peek is used to inspect the cache value of a key // without updating recency or frequency. func (c *TwoQueueCache) Peek(key interface{}) (value interface{}, ok bool) { c.lock.RLock() defer c.lock.RUnlock() if val, ok := c.frequent.Peek(key); ok { return val, ok } return c.recent.Peek(key) }
{ "pile_set_name": "Github" }
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * @category Zend * @package Zend_XmlRpc * @subpackage Server * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Cache.php 23775 2011-03-01 17:25:24Z ralph $ */ /** Zend_Server_Cache */ require_once 'Zend/Server/Cache.php'; /** * Zend_XmlRpc_Server_Cache: cache Zend_XmlRpc_Server server definition * * @category Zend * @package Zend_XmlRpc * @subpackage Server * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Server_Cache extends Zend_Server_Cache { /** * @var array Skip system methods when caching XML-RPC server */ protected static $_skipMethods = array( 'system.listMethods', 'system.methodHelp', 'system.methodSignature', 'system.multicall', ); }
{ "pile_set_name": "Github" }
////////////////////////////////////////////////////////////////////////////// // // This file is part of the Corona game engine. // For overview and more information on licensing please refer to README.md // Home page: https://github.com/coronalabs/corona // Contact: [email protected] // ////////////////////////////////////////////////////////////////////////////// #ifndef _Rtt_CoronaViewRuntimeDelegate_H__ #define _Rtt_CoronaViewRuntimeDelegate_H__ #include "Rtt_RuntimeDelegatePlayer.h" // ---------------------------------------------------------------------------- @class CoronaView; @protocol CoronaRuntime; namespace Rtt { // ---------------------------------------------------------------------------- class CoronaViewRuntimeDelegate : public RuntimeDelegatePlayer { public: CoronaViewRuntimeDelegate( CoronaView *owner ); virtual ~CoronaViewRuntimeDelegate(); public: virtual void DidInitLuaLibraries( const Runtime& sender ) const; virtual bool HasDependencies( const Runtime& sender ) const; virtual void InitializeConfig( const Runtime& sender, lua_State *L ) const; virtual void DidLoadConfig( const Runtime& sender, lua_State *L ) const; protected: virtual id< CoronaRuntime > GetPluginContext() const; private: CoronaView *fOwner; // Weak ref }; // ---------------------------------------------------------------------------- } // namespace Rtt // ---------------------------------------------------------------------------- #endif // _Rtt_CoronaViewRuntimeDelegate_H__
{ "pile_set_name": "Github" }
<TextView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/tile_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_margin="@dimen/half_margin" android:background="@drawable/bg_rounded_rec" android:gravity="center" android:padding="@dimen/single_margin" android:textSize="@dimen/large_text" android:textStyle="bold" tools:test="8" />
{ "pile_set_name": "Github" }
import makeStyles from '@material-ui/core/styles/makeStyles'; import githubBtnStyles from './githubBtn.styles'; const useGithubBtnStyles = makeStyles(githubBtnStyles); export { githubBtnStyles, useGithubBtnStyles }; export { default } from './githubBtn.styles';
{ "pile_set_name": "Github" }
#include <glm/vector_relational.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> #include <glm/mat2x4.hpp> #include <glm/mat3x2.hpp> #include <glm/mat3x3.hpp> #include <glm/mat3x4.hpp> #include <glm/mat4x2.hpp> #include <glm/mat4x3.hpp> #include <glm/mat4x4.hpp> #include <vector> static bool test_operators() { glm::mat3x4 l(1.0f); glm::mat3x4 m(1.0f); glm::vec3 u(1.0f); glm::vec4 v(1.0f); float x = 1.0f; glm::vec4 a = m * u; glm::vec3 b = v * m; glm::mat3x4 n = x / m; glm::mat3x4 o = m / x; glm::mat3x4 p = x * m; glm::mat3x4 q = m * x; bool R = m != q; bool S = m == l; return (S && !R) ? 0 : 1; } int test_ctr() { int Error(0); #if(GLM_HAS_INITIALIZER_LISTS) glm::mat3x4 m0( glm::vec4(0, 1, 2, 3), glm::vec4(4, 5, 6, 7), glm::vec4(8, 9, 10, 11)); glm::mat3x4 m1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; glm::mat3x4 m2{ {0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}}; for(glm::length_t i = 0; i < m0.length(); ++i) Error += glm::all(glm::equal(m0[i], m2[i])) ? 0 : 1; for(glm::length_t i = 0; i < m1.length(); ++i) Error += glm::all(glm::equal(m1[i], m2[i])) ? 0 : 1; std::vector<glm::mat3x4> v1{ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} }; std::vector<glm::mat3x4> v2{ { { 0, 1, 2, 3}, { 4, 5, 6, 7}, { 8, 9, 10, 11} }, { { 0, 1, 2, 3}, { 4, 5, 6, 7}, { 8, 9, 10, 11} } }; #endif//GLM_HAS_INITIALIZER_LISTS return Error; } namespace cast { template<typename genType> int entry() { int Error = 0; genType A(1.0f); glm::mat3x4 B(A); glm::mat3x4 Identity(1.0f); for(glm::length_t i = 0, length = B.length(); i < length; ++i) Error += glm::all(glm::equal(B[i], Identity[i])) ? 0 : 1; return Error; } int test() { int Error = 0; Error += entry<glm::mat2x2>(); Error += entry<glm::mat2x3>(); Error += entry<glm::mat2x4>(); Error += entry<glm::mat3x2>(); Error += entry<glm::mat3x3>(); Error += entry<glm::mat3x4>(); Error += entry<glm::mat4x2>(); Error += entry<glm::mat4x3>(); Error += entry<glm::mat4x4>(); return Error; } }//namespace cast int test_size() { int Error = 0; Error += 48 == sizeof(glm::mat3x4) ? 0 : 1; Error += 96 == sizeof(glm::dmat3x4) ? 0 : 1; Error += glm::mat3x4().length() == 3 ? 0 : 1; Error += glm::dmat3x4().length() == 3 ? 0 : 1; Error += glm::mat3x4::length() == 3 ? 0 : 1; Error += glm::dmat3x4::length() == 3 ? 0 : 1; return Error; } int main() { int Error = 0; Error += cast::test(); Error += test_ctr(); Error += test_operators(); Error += test_size(); return Error; }
{ "pile_set_name": "Github" }
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xml import ( "bytes" "encoding" "errors" "fmt" "reflect" "strconv" "strings" ) // BUG(rsc): Mapping between XML elements and data structures is inherently flawed: // an XML element is an order-dependent collection of anonymous // values, while a data structure is an order-independent collection // of named values. // See package json for a textual representation more suitable // to data structures. // Unmarshal parses the XML-encoded data and stores the result in // the value pointed to by v, which must be an arbitrary struct, // slice, or string. Well-formed data that does not fit into v is // discarded. // // Because Unmarshal uses the reflect package, it can only assign // to exported (upper case) fields. Unmarshal uses a case-sensitive // comparison to match XML element names to tag values and struct // field names. // // Unmarshal maps an XML element to a struct using the following rules. // In the rules, the tag of a field refers to the value associated with the // key 'xml' in the struct field's tag (see the example above). // // * If the struct has a field of type []byte or string with tag // ",innerxml", Unmarshal accumulates the raw XML nested inside the // element in that field. The rest of the rules still apply. // // * If the struct has a field named XMLName of type Name, // Unmarshal records the element name in that field. // // * If the XMLName field has an associated tag of the form // "name" or "namespace-URL name", the XML element must have // the given name (and, optionally, name space) or else Unmarshal // returns an error. // // * If the XML element has an attribute whose name matches a // struct field name with an associated tag containing ",attr" or // the explicit name in a struct field tag of the form "name,attr", // Unmarshal records the attribute value in that field. // // * If the XML element has an attribute not handled by the previous // rule and the struct has a field with an associated tag containing // ",any,attr", Unmarshal records the attribute value in the first // such field. // // * If the XML element contains character data, that data is // accumulated in the first struct field that has tag ",chardata". // The struct field may have type []byte or string. // If there is no such field, the character data is discarded. // // * If the XML element contains comments, they are accumulated in // the first struct field that has tag ",comment". The struct // field may have type []byte or string. If there is no such // field, the comments are discarded. // // * If the XML element contains a sub-element whose name matches // the prefix of a tag formatted as "a" or "a>b>c", unmarshal // will descend into the XML structure looking for elements with the // given names, and will map the innermost elements to that struct // field. A tag starting with ">" is equivalent to one starting // with the field name followed by ">". // // * If the XML element contains a sub-element whose name matches // a struct field's XMLName tag and the struct field has no // explicit name tag as per the previous rule, unmarshal maps // the sub-element to that struct field. // // * If the XML element contains a sub-element whose name matches a // field without any mode flags (",attr", ",chardata", etc), Unmarshal // maps the sub-element to that struct field. // // * If the XML element contains a sub-element that hasn't matched any // of the above rules and the struct has a field with tag ",any", // unmarshal maps the sub-element to that struct field. // // * An anonymous struct field is handled as if the fields of its // value were part of the outer struct. // // * A struct field with tag "-" is never unmarshaled into. // // If Unmarshal encounters a field type that implements the Unmarshaler // interface, Unmarshal calls its UnmarshalXML method to produce the value from // the XML element. Otherwise, if the value implements // encoding.TextUnmarshaler, Unmarshal calls that value's UnmarshalText method. // // Unmarshal maps an XML element to a string or []byte by saving the // concatenation of that element's character data in the string or // []byte. The saved []byte is never nil. // // Unmarshal maps an attribute value to a string or []byte by saving // the value in the string or slice. // // Unmarshal maps an attribute value to an Attr by saving the attribute, // including its name, in the Attr. // // Unmarshal maps an XML element or attribute value to a slice by // extending the length of the slice and mapping the element or attribute // to the newly created value. // // Unmarshal maps an XML element or attribute value to a bool by // setting it to the boolean value represented by the string. Whitespace // is trimmed and ignored. // // Unmarshal maps an XML element or attribute value to an integer or // floating-point field by setting the field to the result of // interpreting the string value in decimal. There is no check for // overflow. Whitespace is trimmed and ignored. // // Unmarshal maps an XML element to a Name by recording the element // name. // // Unmarshal maps an XML element to a pointer by setting the pointer // to a freshly allocated value and then mapping the element to that value. // // A missing element or empty attribute value will be unmarshaled as a zero value. // If the field is a slice, a zero value will be appended to the field. Otherwise, the // field will be set to its zero value. func Unmarshal(data []byte, v interface{}) error { return NewDecoder(bytes.NewReader(data)).Decode(v) } // Decode works like Unmarshal, except it reads the decoder // stream to find the start element. func (d *Decoder) Decode(v interface{}) error { return d.DecodeElement(v, nil) } // DecodeElement works like Unmarshal except that it takes // a pointer to the start XML element to decode into v. // It is useful when a client reads some raw XML tokens itself // but also wants to defer to Unmarshal for some elements. func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error { val := reflect.ValueOf(v) if val.Kind() != reflect.Ptr { return errors.New("non-pointer passed to Unmarshal") } return d.unmarshal(val.Elem(), start) } // An UnmarshalError represents an error in the unmarshaling process. type UnmarshalError string func (e UnmarshalError) Error() string { return string(e) } // Unmarshaler is the interface implemented by objects that can unmarshal // an XML element description of themselves. // // UnmarshalXML decodes a single XML element // beginning with the given start element. // If it returns an error, the outer call to Unmarshal stops and // returns that error. // UnmarshalXML must consume exactly one XML element. // One common implementation strategy is to unmarshal into // a separate value with a layout matching the expected XML // using d.DecodeElement, and then to copy the data from // that value into the receiver. // Another common strategy is to use d.Token to process the // XML object one token at a time. // UnmarshalXML may not use d.RawToken. type Unmarshaler interface { UnmarshalXML(d *Decoder, start StartElement) error } // UnmarshalerAttr is the interface implemented by objects that can unmarshal // an XML attribute description of themselves. // // UnmarshalXMLAttr decodes a single XML attribute. // If it returns an error, the outer call to Unmarshal stops and // returns that error. // UnmarshalXMLAttr is used only for struct fields with the // "attr" option in the field tag. type UnmarshalerAttr interface { UnmarshalXMLAttr(attr Attr) error } // receiverType returns the receiver type to use in an expression like "%s.MethodName". func receiverType(val interface{}) string { t := reflect.TypeOf(val) if t.Name() != "" { return t.String() } return "(" + t.String() + ")" } // unmarshalInterface unmarshals a single XML element into val. // start is the opening tag of the element. func (d *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error { // Record that decoder must stop at end tag corresponding to start. d.pushEOF() d.unmarshalDepth++ err := val.UnmarshalXML(d, *start) d.unmarshalDepth-- if err != nil { d.popEOF() return err } if !d.popEOF() { return fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", receiverType(val), start.Name.Local) } return nil } // unmarshalTextInterface unmarshals a single XML element into val. // The chardata contained in the element (but not its children) // is passed to the text unmarshaler. func (d *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler) error { var buf []byte depth := 1 for depth > 0 { t, err := d.Token() if err != nil { return err } switch t := t.(type) { case CharData: if depth == 1 { buf = append(buf, t...) } case StartElement: depth++ case EndElement: depth-- } } return val.UnmarshalText(buf) } // unmarshalAttr unmarshals a single XML attribute into val. func (d *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error { if val.Kind() == reflect.Ptr { if val.IsNil() { val.Set(reflect.New(val.Type().Elem())) } val = val.Elem() } if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) { // This is an unmarshaler with a non-pointer receiver, // so it's likely to be incorrect, but we do what we're told. return val.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(unmarshalerAttrType) { return pv.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) } } // Not an UnmarshalerAttr; try encoding.TextUnmarshaler. if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { // This is an unmarshaler with a non-pointer receiver, // so it's likely to be incorrect, but we do what we're told. return val.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) } } if val.Type().Kind() == reflect.Slice && val.Type().Elem().Kind() != reflect.Uint8 { // Slice of element values. // Grow slice. n := val.Len() val.Set(reflect.Append(val, reflect.Zero(val.Type().Elem()))) // Recur to read element into slice. if err := d.unmarshalAttr(val.Index(n), attr); err != nil { val.SetLen(n) return err } return nil } if val.Type() == attrType { val.Set(reflect.ValueOf(attr)) return nil } return copyValue(val, []byte(attr.Value)) } var ( attrType = reflect.TypeOf(Attr{}) unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() unmarshalerAttrType = reflect.TypeOf((*UnmarshalerAttr)(nil)).Elem() textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() ) // Unmarshal a single XML element into val. func (d *Decoder) unmarshal(val reflect.Value, start *StartElement) error { // Find start element if we need it. if start == nil { for { tok, err := d.Token() if err != nil { return err } if t, ok := tok.(StartElement); ok { start = &t break } } } // Load value from interface, but only if the result will be // usefully addressable. if val.Kind() == reflect.Interface && !val.IsNil() { e := val.Elem() if e.Kind() == reflect.Ptr && !e.IsNil() { val = e } } if val.Kind() == reflect.Ptr { if val.IsNil() { val.Set(reflect.New(val.Type().Elem())) } val = val.Elem() } if val.CanInterface() && val.Type().Implements(unmarshalerType) { // This is an unmarshaler with a non-pointer receiver, // so it's likely to be incorrect, but we do what we're told. return d.unmarshalInterface(val.Interface().(Unmarshaler), start) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(unmarshalerType) { return d.unmarshalInterface(pv.Interface().(Unmarshaler), start) } } if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { return d.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler)) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { return d.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler)) } } var ( data []byte saveData reflect.Value comment []byte saveComment reflect.Value saveXML reflect.Value saveXMLIndex int saveXMLData []byte saveAny reflect.Value sv reflect.Value tinfo *typeInfo err error ) switch v := val; v.Kind() { default: return errors.New("unknown type " + v.Type().String()) case reflect.Interface: // TODO: For now, simply ignore the field. In the near // future we may choose to unmarshal the start // element on it, if not nil. return d.Skip() case reflect.Slice: typ := v.Type() if typ.Elem().Kind() == reflect.Uint8 { // []byte saveData = v break } // Slice of element values. // Grow slice. n := v.Len() v.Set(reflect.Append(val, reflect.Zero(v.Type().Elem()))) // Recur to read element into slice. if err := d.unmarshal(v.Index(n), start); err != nil { v.SetLen(n) return err } return nil case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.String: saveData = v case reflect.Struct: typ := v.Type() if typ == nameType { v.Set(reflect.ValueOf(start.Name)) break } sv = v tinfo, err = getTypeInfo(typ) if err != nil { return err } // Validate and assign element name. if tinfo.xmlname != nil { finfo := tinfo.xmlname if finfo.name != "" && finfo.name != start.Name.Local { return UnmarshalError("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">") } if finfo.xmlns != "" && finfo.xmlns != start.Name.Space { e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have " if start.Name.Space == "" { e += "no name space" } else { e += start.Name.Space } return UnmarshalError(e) } fv := finfo.value(sv, initNilPointers) if _, ok := fv.Interface().(Name); ok { fv.Set(reflect.ValueOf(start.Name)) } } // Assign attributes. for _, a := range start.Attr { handled := false any := -1 for i := range tinfo.fields { finfo := &tinfo.fields[i] switch finfo.flags & fMode { case fAttr: strv := finfo.value(sv, initNilPointers) if a.Name.Local == finfo.name && (finfo.xmlns == "" || finfo.xmlns == a.Name.Space) { if err := d.unmarshalAttr(strv, a); err != nil { return err } handled = true } case fAny | fAttr: if any == -1 { any = i } } } if !handled && any >= 0 { finfo := &tinfo.fields[any] strv := finfo.value(sv, initNilPointers) if err := d.unmarshalAttr(strv, a); err != nil { return err } } } // Determine whether we need to save character data or comments. for i := range tinfo.fields { finfo := &tinfo.fields[i] switch finfo.flags & fMode { case fCDATA, fCharData: if !saveData.IsValid() { saveData = finfo.value(sv, initNilPointers) } case fComment: if !saveComment.IsValid() { saveComment = finfo.value(sv, initNilPointers) } case fAny, fAny | fElement: if !saveAny.IsValid() { saveAny = finfo.value(sv, initNilPointers) } case fInnerXML: if !saveXML.IsValid() { saveXML = finfo.value(sv, initNilPointers) if d.saved == nil { saveXMLIndex = 0 d.saved = new(bytes.Buffer) } else { saveXMLIndex = d.savedOffset() } } } } } // Find end element. // Process sub-elements along the way. Loop: for { var savedOffset int if saveXML.IsValid() { savedOffset = d.savedOffset() } tok, err := d.Token() if err != nil { return err } switch t := tok.(type) { case StartElement: consumed := false if sv.IsValid() { consumed, err = d.unmarshalPath(tinfo, sv, nil, &t) if err != nil { return err } if !consumed && saveAny.IsValid() { consumed = true if err := d.unmarshal(saveAny, &t); err != nil { return err } } } if !consumed { if err := d.Skip(); err != nil { return err } } case EndElement: if saveXML.IsValid() { saveXMLData = d.saved.Bytes()[saveXMLIndex:savedOffset] if saveXMLIndex == 0 { d.saved = nil } } break Loop case CharData: if saveData.IsValid() { data = append(data, t...) } case Comment: if saveComment.IsValid() { comment = append(comment, t...) } } } if saveData.IsValid() && saveData.CanInterface() && saveData.Type().Implements(textUnmarshalerType) { if err := saveData.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { return err } saveData = reflect.Value{} } if saveData.IsValid() && saveData.CanAddr() { pv := saveData.Addr() if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { if err := pv.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { return err } saveData = reflect.Value{} } } if err := copyValue(saveData, data); err != nil { return err } switch t := saveComment; t.Kind() { case reflect.String: t.SetString(string(comment)) case reflect.Slice: t.Set(reflect.ValueOf(comment)) } switch t := saveXML; t.Kind() { case reflect.String: t.SetString(string(saveXMLData)) case reflect.Slice: if t.Type().Elem().Kind() == reflect.Uint8 { t.Set(reflect.ValueOf(saveXMLData)) } } return nil } func copyValue(dst reflect.Value, src []byte) (err error) { dst0 := dst if dst.Kind() == reflect.Ptr { if dst.IsNil() { dst.Set(reflect.New(dst.Type().Elem())) } dst = dst.Elem() } // Save accumulated data. switch dst.Kind() { case reflect.Invalid: // Probably a comment. default: return errors.New("cannot unmarshal into " + dst0.Type().String()) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: if len(src) == 0 { dst.SetInt(0) return nil } itmp, err := strconv.ParseInt(strings.TrimSpace(string(src)), 10, dst.Type().Bits()) if err != nil { return err } dst.SetInt(itmp) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: if len(src) == 0 { dst.SetUint(0) return nil } utmp, err := strconv.ParseUint(strings.TrimSpace(string(src)), 10, dst.Type().Bits()) if err != nil { return err } dst.SetUint(utmp) case reflect.Float32, reflect.Float64: if len(src) == 0 { dst.SetFloat(0) return nil } ftmp, err := strconv.ParseFloat(strings.TrimSpace(string(src)), dst.Type().Bits()) if err != nil { return err } dst.SetFloat(ftmp) case reflect.Bool: if len(src) == 0 { dst.SetBool(false) return nil } value, err := strconv.ParseBool(strings.TrimSpace(string(src))) if err != nil { return err } dst.SetBool(value) case reflect.String: dst.SetString(string(src)) case reflect.Slice: if len(src) == 0 { // non-nil to flag presence src = []byte{} } dst.SetBytes(src) } return nil } // unmarshalPath walks down an XML structure looking for wanted // paths, and calls unmarshal on them. // The consumed result tells whether XML elements have been consumed // from the Decoder until start's matching end element, or if it's // still untouched because start is uninteresting for sv's fields. func (d *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []string, start *StartElement) (consumed bool, err error) { recurse := false Loop: for i := range tinfo.fields { finfo := &tinfo.fields[i] if finfo.flags&fElement == 0 || len(finfo.parents) < len(parents) || finfo.xmlns != "" && finfo.xmlns != start.Name.Space { continue } for j := range parents { if parents[j] != finfo.parents[j] { continue Loop } } if len(finfo.parents) == len(parents) && finfo.name == start.Name.Local { // It's a perfect match, unmarshal the field. return true, d.unmarshal(finfo.value(sv, initNilPointers), start) } if len(finfo.parents) > len(parents) && finfo.parents[len(parents)] == start.Name.Local { // It's a prefix for the field. Break and recurse // since it's not ok for one field path to be itself // the prefix for another field path. recurse = true // We can reuse the same slice as long as we // don't try to append to it. parents = finfo.parents[:len(parents)+1] break } } if !recurse { // We have no business with this element. return false, nil } // The element is not a perfect match for any field, but one // or more fields have the path to this element as a parent // prefix. Recurse and attempt to match these. for { var tok Token tok, err = d.Token() if err != nil { return true, err } switch t := tok.(type) { case StartElement: consumed2, err := d.unmarshalPath(tinfo, sv, parents, &t) if err != nil { return true, err } if !consumed2 { if err := d.Skip(); err != nil { return true, err } } case EndElement: return true, nil } } } // Skip reads tokens until it has consumed the end element // matching the most recent start element already consumed. // It recurs if it encounters a start element, so it can be used to // skip nested structures. // It returns nil if it finds an end element matching the start // element; otherwise it returns an error describing the problem. func (d *Decoder) Skip() error { for { tok, err := d.Token() if err != nil { return err } switch tok.(type) { case StartElement: if err := d.Skip(); err != nil { return err } case EndElement: return nil } } }
{ "pile_set_name": "Github" }
package nucleus.example.util.adapters; import android.support.v7.widget.RecyclerView; import android.view.ViewGroup; import java.util.Collections; import java.util.List; import static java.util.Arrays.asList; public abstract class BaseRecyclerViewAdapter extends RecyclerView.Adapter<BaseViewHolder> { private final List<ViewHolderType> types; public BaseRecyclerViewAdapter(ViewHolderType... types) { this.types = Collections.unmodifiableList(asList(types)); } protected abstract List<?> getItems(); @Override public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return types.get(viewType).create(parent); } @Override public void onBindViewHolder(BaseViewHolder holder, int position) { holder.bind(getItems().get(position)); } @Override public int getItemViewType(int position) { Object item = getItems().get(position); for (int t = 0, size = types.size(); t < size; t++) { if (types.get(t).isOfItem(item)) return t; } throw new IllegalStateException("No view holder is registered for item: " + item + " at position: " + position); } @Override public int getItemCount() { return getItems().size(); } }
{ "pile_set_name": "Github" }
/////////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2019 F4EXB // // written by Edouard Griffiths // // // // 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 as 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 V3 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/>. // /////////////////////////////////////////////////////////////////////////////////// #ifndef _SDRGUI_DEVICESTREAMSELECTIONDIALOG_H_ #define _SDRGUI_DEVICESTREAMSELECTIONDIALOG_H_ #include <QDialog> #include "../../exports/export.h" namespace Ui { class DeviceStreamSelectionDialog; } class SDRGUI_API DeviceStreamSelectionDialog : public QDialog { Q_OBJECT public: explicit DeviceStreamSelectionDialog(QWidget *parent = nullptr); ~DeviceStreamSelectionDialog(); bool hasChanged() const { return m_hasChanged; } void setNumberOfStreams(int nbStreams); void setStreamIndex(int index); int getSelectedStreamIndex() const { return m_streamIndex; }; private slots: void accept(); private: Ui::DeviceStreamSelectionDialog *ui; bool m_hasChanged; int m_streamIndex; }; #endif // _SDRGUI_DEVICESTREAMSELECTIONDIALOG_H_
{ "pile_set_name": "Github" }
root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: daemon:*:12977:0:99999:7::: bin:*:12977:0:99999:7::: sys:*:12977:0:99999:7::: sync:*:12977:0:99999:7::: games:*:12977:0:99999:7::: man:*:12977:0:99999:7::: lp:*:12977:0:99999:7::: mail:*:12977:0:99999:7::: news:*:12977:0:99999:7::: uucp:*:12977:0:99999:7::: proxy:*:12977:0:99999:7::: www-data:*:12977:0:99999:7::: backup:*:12977:0:99999:7::: list:*:12977:0:99999:7::: irc:*:12977:0:99999:7::: gnats:*:12977:0:99999:7::: nobody:*:12977:0:99999:7::: Debian-exim:!:12977:0:99999:7::: foo:!:12977:0:99999:7:::
{ "pile_set_name": "Github" }
/** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (July 02 2010) * * @copyright * Copyright (C) 2004-2010 Alex Gorbatchev. * * @license * Dual licensed under the MIT and GPL licenses. */ .syntaxhighlighter { background-color: black !important; } .syntaxhighlighter .line.alt1 { background-color: black !important; } .syntaxhighlighter .line.alt2 { background-color: black !important; } .syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { background-color: #2a3133 !important; } .syntaxhighlighter .line.highlighted.number { color: white !important; } .syntaxhighlighter table caption { color: #d3d3d3 !important; } .syntaxhighlighter .gutter { color: #d3d3d3 !important; } .syntaxhighlighter .gutter .line { border-right: 3px solid #990000 !important; } .syntaxhighlighter .gutter .line.highlighted { background-color: #990000 !important; color: black !important; } .syntaxhighlighter.printing .line .content { border: none !important; } .syntaxhighlighter.collapsed { overflow: visible !important; } .syntaxhighlighter.collapsed .toolbar { color: #ebdb8d !important; background: black !important; border: 1px solid #990000 !important; } .syntaxhighlighter.collapsed .toolbar a { color: #ebdb8d !important; } .syntaxhighlighter.collapsed .toolbar a:hover { color: #ff7d27 !important; } .syntaxhighlighter .toolbar { color: white !important; background: #990000 !important; border: none !important; } .syntaxhighlighter .toolbar a { color: white !important; } .syntaxhighlighter .toolbar a:hover { color: #9ccff4 !important; } .syntaxhighlighter .plain, .syntaxhighlighter .plain a { color: #d3d3d3 !important; } .syntaxhighlighter .comments, .syntaxhighlighter .comments a { color: #ff7d27 !important; } .syntaxhighlighter .string, .syntaxhighlighter .string a { color: #ff9e7b !important; } .syntaxhighlighter .keyword { color: aqua !important; } .syntaxhighlighter .preprocessor { color: #aec4de !important; } .syntaxhighlighter .variable { color: #ffaa3e !important; } .syntaxhighlighter .value { color: #009900 !important; } .syntaxhighlighter .functions { color: #81cef9 !important; } .syntaxhighlighter .constants { color: #ff9e7b !important; } .syntaxhighlighter .script { font-weight: bold !important; color: aqua !important; background-color: none !important; } .syntaxhighlighter .color1, .syntaxhighlighter .color1 a { color: #ebdb8d !important; } .syntaxhighlighter .color2, .syntaxhighlighter .color2 a { color: #ff7d27 !important; } .syntaxhighlighter .color3, .syntaxhighlighter .color3 a { color: #aec4de !important; }
{ "pile_set_name": "Github" }
/* The PyObject_ memory family: high-level object memory interfaces. See pymem.h for the low-level PyMem_ family. */ #ifndef Py_OBJIMPL_H #define Py_OBJIMPL_H #include "pymem.h" #ifdef __cplusplus extern "C" { #endif /* BEWARE: Each interface exports both functions and macros. Extension modules should use the functions, to ensure binary compatibility across Python versions. Because the Python implementation is free to change internal details, and the macros may (or may not) expose details for speed, if you do use the macros you must recompile your extensions with each Python release. Never mix calls to PyObject_ memory functions with calls to the platform malloc/realloc/ calloc/free, or with calls to PyMem_. */ /* Functions and macros for modules that implement new object types. - PyObject_New(type, typeobj) allocates memory for a new object of the given type, and initializes part of it. 'type' must be the C structure type used to represent the object, and 'typeobj' the address of the corresponding type object. Reference count and type pointer are filled in; the rest of the bytes of the object are *undefined*! The resulting expression type is 'type *'. The size of the object is determined by the tp_basicsize field of the type object. - PyObject_NewVar(type, typeobj, n) is similar but allocates a variable-size object with room for n items. In addition to the refcount and type pointer fields, this also fills in the ob_size field. - PyObject_Del(op) releases the memory allocated for an object. It does not run a destructor -- it only frees the memory. PyObject_Free is identical. - PyObject_Init(op, typeobj) and PyObject_InitVar(op, typeobj, n) don't allocate memory. Instead of a 'type' parameter, they take a pointer to a new object (allocated by an arbitrary allocator), and initialize its object header fields. Note that objects created with PyObject_{New, NewVar} are allocated using the specialized Python allocator (implemented in obmalloc.c), if WITH_PYMALLOC is enabled. In addition, a special debugging allocator is used if PYMALLOC_DEBUG is also #defined. In case a specific form of memory management is needed (for example, if you must use the platform malloc heap(s), or shared memory, or C++ local storage or operator new), you must first allocate the object with your custom allocator, then pass its pointer to PyObject_{Init, InitVar} for filling in its Python- specific fields: reference count, type pointer, possibly others. You should be aware that Python no control over these objects because they don't cooperate with the Python memory manager. Such objects may not be eligible for automatic garbage collection and you have to make sure that they are released accordingly whenever their destructor gets called (cf. the specific form of memory management you're using). Unless you have specific memory management requirements, use PyObject_{New, NewVar, Del}. */ /* * Raw object memory interface * =========================== */ /* Functions to call the same malloc/realloc/free as used by Python's object allocator. If WITH_PYMALLOC is enabled, these may differ from the platform malloc/realloc/free. The Python object allocator is designed for fast, cache-conscious allocation of many "small" objects, and with low hidden memory overhead. PyObject_Malloc(0) returns a unique non-NULL pointer if possible. PyObject_Realloc(NULL, n) acts like PyObject_Malloc(n). PyObject_Realloc(p != NULL, 0) does not return NULL, or free the memory at p. Returned pointers must be checked for NULL explicitly; no action is performed on failure other than to return NULL (no warning it printed, no exception is set, etc). For allocating objects, use PyObject_{New, NewVar} instead whenever possible. The PyObject_{Malloc, Realloc, Free} family is exposed so that you can exploit Python's small-block allocator for non-object uses. If you must use these routines to allocate object memory, make sure the object gets initialized via PyObject_{Init, InitVar} after obtaining the raw memory. */ PyAPI_FUNC(void *) PyObject_Malloc(size_t); PyAPI_FUNC(void *) PyObject_Realloc(void *, size_t); PyAPI_FUNC(void) PyObject_Free(void *); /* Macros */ #ifdef WITH_PYMALLOC #ifdef PYMALLOC_DEBUG /* WITH_PYMALLOC && PYMALLOC_DEBUG */ PyAPI_FUNC(void *) _PyObject_DebugMalloc(size_t nbytes); PyAPI_FUNC(void *) _PyObject_DebugRealloc(void *p, size_t nbytes); PyAPI_FUNC(void) _PyObject_DebugFree(void *p); PyAPI_FUNC(void) _PyObject_DebugDumpAddress(const void *p); PyAPI_FUNC(void) _PyObject_DebugCheckAddress(const void *p); PyAPI_FUNC(void) _PyObject_DebugMallocStats(void); PyAPI_FUNC(void *) _PyObject_DebugMallocApi(char api, size_t nbytes); PyAPI_FUNC(void *) _PyObject_DebugReallocApi(char api, void *p, size_t nbytes); PyAPI_FUNC(void) _PyObject_DebugFreeApi(char api, void *p); PyAPI_FUNC(void) _PyObject_DebugCheckAddressApi(char api, const void *p); PyAPI_FUNC(void *) _PyMem_DebugMalloc(size_t nbytes); PyAPI_FUNC(void *) _PyMem_DebugRealloc(void *p, size_t nbytes); PyAPI_FUNC(void) _PyMem_DebugFree(void *p); #define PyObject_MALLOC _PyObject_DebugMalloc #define PyObject_Malloc _PyObject_DebugMalloc #define PyObject_REALLOC _PyObject_DebugRealloc #define PyObject_Realloc _PyObject_DebugRealloc #define PyObject_FREE _PyObject_DebugFree #define PyObject_Free _PyObject_DebugFree #else /* WITH_PYMALLOC && ! PYMALLOC_DEBUG */ #define PyObject_MALLOC PyObject_Malloc #define PyObject_REALLOC PyObject_Realloc #define PyObject_FREE PyObject_Free #endif #else /* ! WITH_PYMALLOC */ #define PyObject_MALLOC PyMem_MALLOC #define PyObject_REALLOC PyMem_REALLOC #define PyObject_FREE PyMem_FREE #endif /* WITH_PYMALLOC */ #define PyObject_Del PyObject_Free #define PyObject_DEL PyObject_FREE /* for source compatibility with 2.2 */ #define _PyObject_Del PyObject_Free /* * Generic object allocator interface * ================================== */ /* Functions */ PyAPI_FUNC(PyObject *) PyObject_Init(PyObject *, PyTypeObject *); PyAPI_FUNC(PyVarObject *) PyObject_InitVar(PyVarObject *, PyTypeObject *, Py_ssize_t); PyAPI_FUNC(PyObject *) _PyObject_New(PyTypeObject *); PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t); #define PyObject_New(type, typeobj) \ ( (type *) _PyObject_New(typeobj) ) #define PyObject_NewVar(type, typeobj, n) \ ( (type *) _PyObject_NewVar((typeobj), (n)) ) /* Macros trading binary compatibility for speed. See also pymem.h. Note that these macros expect non-NULL object pointers.*/ #define PyObject_INIT(op, typeobj) \ ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) #define PyObject_INIT_VAR(op, typeobj, size) \ ( Py_SIZE(op) = (size), PyObject_INIT((op), (typeobj)) ) #define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize ) /* _PyObject_VAR_SIZE returns the number of bytes (as size_t) allocated for a vrbl-size object with nitems items, exclusive of gc overhead (if any). The value is rounded up to the closest multiple of sizeof(void *), in order to ensure that pointer fields at the end of the object are correctly aligned for the platform (this is of special importance for subclasses of, e.g., str or long, so that pointers can be stored after the embedded data). Note that there's no memory wastage in doing this, as malloc has to return (at worst) pointer-aligned memory anyway. */ #if ((SIZEOF_VOID_P - 1) & SIZEOF_VOID_P) != 0 # error "_PyObject_VAR_SIZE requires SIZEOF_VOID_P be a power of 2" #endif #define _PyObject_VAR_SIZE(typeobj, nitems) \ (size_t) \ ( ( (typeobj)->tp_basicsize + \ (nitems)*(typeobj)->tp_itemsize + \ (SIZEOF_VOID_P - 1) \ ) & ~(SIZEOF_VOID_P - 1) \ ) #define PyObject_NEW(type, typeobj) \ ( (type *) PyObject_Init( \ (PyObject *) PyObject_MALLOC( _PyObject_SIZE(typeobj) ), (typeobj)) ) #define PyObject_NEW_VAR(type, typeobj, n) \ ( (type *) PyObject_InitVar( \ (PyVarObject *) PyObject_MALLOC(_PyObject_VAR_SIZE((typeobj),(n)) ),\ (typeobj), (n)) ) /* This example code implements an object constructor with a custom allocator, where PyObject_New is inlined, and shows the important distinction between two steps (at least): 1) the actual allocation of the object storage; 2) the initialization of the Python specific fields in this storage with PyObject_{Init, InitVar}. PyObject * YourObject_New(...) { PyObject *op; op = (PyObject *) Your_Allocator(_PyObject_SIZE(YourTypeStruct)); if (op == NULL) return PyErr_NoMemory(); PyObject_Init(op, &YourTypeStruct); op->ob_field = value; ... return op; } Note that in C++, the use of the new operator usually implies that the 1st step is performed automatically for you, so in a C++ class constructor you would start directly with PyObject_Init/InitVar */ /* * Garbage Collection Support * ========================== */ /* C equivalent of gc.collect(). */ PyAPI_FUNC(Py_ssize_t) PyGC_Collect(void); /* Test if a type has a GC head */ #define PyType_IS_GC(t) PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC) /* Test if an object has a GC head */ #define PyObject_IS_GC(o) (PyType_IS_GC(Py_TYPE(o)) && \ (Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o))) PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); #define PyObject_GC_Resize(type, op, n) \ ( (type *) _PyObject_GC_Resize((PyVarObject *)(op), (n)) ) /* for source compatibility with 2.2 */ #define _PyObject_GC_Del PyObject_GC_Del /* GC information is stored BEFORE the object structure. */ typedef union _gc_head { struct { union _gc_head *gc_next; union _gc_head *gc_prev; Py_ssize_t gc_refs; } gc; long double dummy; /* force worst-case alignment */ } PyGC_Head; extern PyGC_Head *_PyGC_generation0; #define _Py_AS_GC(o) ((PyGC_Head *)(o)-1) #define _PyGC_REFS_UNTRACKED (-2) #define _PyGC_REFS_REACHABLE (-3) #define _PyGC_REFS_TENTATIVELY_UNREACHABLE (-4) /* Tell the GC to track this object. NB: While the object is tracked the * collector it must be safe to call the ob_traverse method. */ #define _PyObject_GC_TRACK(o) do { \ PyGC_Head *g = _Py_AS_GC(o); \ if (g->gc.gc_refs != _PyGC_REFS_UNTRACKED) \ Py_FatalError("GC object already tracked"); \ g->gc.gc_refs = _PyGC_REFS_REACHABLE; \ g->gc.gc_next = _PyGC_generation0; \ g->gc.gc_prev = _PyGC_generation0->gc.gc_prev; \ g->gc.gc_prev->gc.gc_next = g; \ _PyGC_generation0->gc.gc_prev = g; \ } while (0); /* Tell the GC to stop tracking this object. * gc_next doesn't need to be set to NULL, but doing so is a good * way to provoke memory errors if calling code is confused. */ #define _PyObject_GC_UNTRACK(o) do { \ PyGC_Head *g = _Py_AS_GC(o); \ assert(g->gc.gc_refs != _PyGC_REFS_UNTRACKED); \ g->gc.gc_refs = _PyGC_REFS_UNTRACKED; \ g->gc.gc_prev->gc.gc_next = g->gc.gc_next; \ g->gc.gc_next->gc.gc_prev = g->gc.gc_prev; \ g->gc.gc_next = NULL; \ } while (0); /* True if the object is currently tracked by the GC. */ #define _PyObject_GC_IS_TRACKED(o) \ ((_Py_AS_GC(o))->gc.gc_refs != _PyGC_REFS_UNTRACKED) /* True if the object may be tracked by the GC in the future, or already is. This can be useful to implement some optimizations. */ #define _PyObject_GC_MAY_BE_TRACKED(obj) \ (PyObject_IS_GC(obj) && \ (!PyTuple_CheckExact(obj) || _PyObject_GC_IS_TRACKED(obj))) PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t); PyAPI_FUNC(PyObject *) _PyObject_GC_New(PyTypeObject *); PyAPI_FUNC(PyVarObject *) _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t); PyAPI_FUNC(void) PyObject_GC_Track(void *); PyAPI_FUNC(void) PyObject_GC_UnTrack(void *); PyAPI_FUNC(void) PyObject_GC_Del(void *); #define PyObject_GC_New(type, typeobj) \ ( (type *) _PyObject_GC_New(typeobj) ) #define PyObject_GC_NewVar(type, typeobj, n) \ ( (type *) _PyObject_GC_NewVar((typeobj), (n)) ) /* Utility macro to help write tp_traverse functions. * To use this macro, the tp_traverse function must name its arguments * "visit" and "arg". This is intended to keep tp_traverse functions * looking as much alike as possible. */ #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((PyObject *)(op), arg); \ if (vret) \ return vret; \ } \ } while (0) /* This is here for the sake of backwards compatibility. Extensions that * use the old GC API will still compile but the objects will not be * tracked by the GC. */ #define PyGC_HEAD_SIZE 0 #define PyObject_GC_Init(op) #define PyObject_GC_Fini(op) #define PyObject_AS_GC(op) (op) #define PyObject_FROM_GC(op) (op) /* Test if a type supports weak references */ #define PyType_SUPPORTS_WEAKREFS(t) \ (PyType_HasFeature((t), Py_TPFLAGS_HAVE_WEAKREFS) \ && ((t)->tp_weaklistoffset > 0)) #define PyObject_GET_WEAKREFS_LISTPTR(o) \ ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset)) #ifdef __cplusplus } #endif #endif /* !Py_OBJIMPL_H */
{ "pile_set_name": "Github" }
<?php return [ 'runtimeWidgets' => [ 'application.modules.contentblock.widgets.ContentBlock', 'application.modules.gallery.widgets.Gallery', ], ];
{ "pile_set_name": "Github" }
softing-y := softing_main.o softing_fw.o obj-$(CONFIG_CAN_SOFTING) += softing.o obj-$(CONFIG_CAN_SOFTING_CS) += softing_cs.o ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
{ "pile_set_name": "Github" }
var gulp = require('gulp'); var runSequence = require('run-sequence'); /** * Run all tasks needed for a build in defined order */ gulp.task('build', function(callback) { runSequence('delete', 'jekyll', [ 'styles', 'scripts', 'images', 'copy:fonts' ], 'base64', callback); });
{ "pile_set_name": "Github" }
The files in this directory and elsewhere which refer to this LICENCE file are part of JFFS2, the Journalling Flash File System v2. Copyright © 2001-2007 Red Hat, Inc. and others JFFS2 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. JFFS2 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 JFFS2; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. As a special exception, if other files instantiate templates or use macros or inline functions from these files, or you compile these files and link them with other works to produce a work based on these files, these files do not by themselves cause the resulting work to be covered by the GNU General Public License. However the source code for these files must still be made available in accordance with section (3) of the GNU General Public License. This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License.
{ "pile_set_name": "Github" }
#pylint: disable=missing-docstring #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html import vtk import mooseutils from .ExodusReader import ExodusReader from .. import utils from .. import base from .. import filters class ExodusSource(base.ChiggerSource): """ Object for visualizing 3D volumes from an ExodusReader object. See ExodusReader for details regarding the ExodusII file support provided. Inputs: reader[ExodusReader]: The reader object containing the ExodusII file desired to be open. **kwargs: see ChiggerSource """ FILTER_TYPES = [filters.ContourFilter, filters.ClipperFilterBase, filters.GeometryFilter, filters.TransformFilter, filters.TubeFilter, filters.RotationalExtrusionFilter] @staticmethod def getOptions(): opt = base.ChiggerSource.getOptions() # Variable opt.add('variable', "The nodal or elemental variable to render.", vtype=str) opt.add('component', -1, "The vector variable component to render (-1 plots the " " magnitude).", vtype=int, allow=[-1, 0, 1, 2]) # Subdomains/sidesets/nodesets opt.add('nodeset', None, "A list of nodeset ids or names to display, use [] to display all " "nodesets.", vtype=list) opt.add('boundary', None, "A list of boundary ids (sideset) ids or names to display, use " "[] to display all sidesets", vtype=list) opt.add('block', [], "A list of subdomain (block) ids or names to display, use [] to " "dislpay all blocks.", vtype=list) opt.add('representation', 'surface', "View volume representation.", allow=['surface', 'wireframe', 'points']) opt.add('range', "The range of data to display on the volume and colorbar; range takes " "precedence of min/max.", vtype=list) opt.add('min', "The minimum range.", vtype=float) opt.add('max', "The maximum range.", vtype=float) # Colormap opt += base.ColorMap.getOptions() return opt def __init__(self, reader, **kwargs): super(ExodusSource, self).__init__(**kwargs) if not isinstance(reader, ExodusReader): raise mooseutils.MooseException('The supplied reader must be a ' '"chigger.readers.ExodusReader", but a "{}" was ' 'provided.'.format(type(reader).__name__)) self.__reader = reader self.__current_variable = None self._colormap = base.ColorMap() self.__extract_indices = [] self.__vtkextractblock = vtk.vtkExtractBlock() self.__vtkextractblock.SetInputConnection(self.__reader.getVTKReader().GetOutputPort()) self._required_filters = [filters.GeometryFilter()] def getExodusReader(self): """ Return the ExodusReader object. """ return self.__reader def getCurrentVariableInformation(self): """ Return the chigger ExodusReader object. """ return self.__current_variable def getVTKSource(self): """ Returns the vtkExtractBlock object used for pulling subdomain/sideset/nodeset data from the reader. (override) Returns: vtk.vtkExtractBlock (see ChiggerFilterSourceBase) """ return self.__vtkextractblock def getBounds(self): """ Return the extents of the active data objects. """ self.checkUpdateState() bnds = [] for i in range(self.__vtkextractblock.GetOutput().GetNumberOfBlocks()): current = self.__vtkextractblock.GetOutput().GetBlock(i) if isinstance(current, vtk.vtkUnstructuredGrid): bnds.append(current.GetBounds()) elif isinstance(current, vtk.vtkMultiBlockDataSet): for j in range(current.GetNumberOfBlocks()): bnds.append(current.GetBlock(j).GetBounds()) return utils.get_bounds_min_max(*bnds) def getRange(self, local=False): """ Return range of the active variable and blocks. """ self.checkUpdateState() if self.__current_variable is None: return (None, None) elif not local: return self.__getRange() else: return self.__getLocalRange() def __getRange(self): """ Private version of range for the update method. """ component = self.getOption('component') pairs = [] for i in range(self.__vtkextractblock.GetOutput().GetNumberOfBlocks()): current = self.__vtkextractblock.GetOutput().GetBlock(i) if isinstance(current, vtk.vtkUnstructuredGrid): array = self.__getActiveArray(current) if array: pairs.append(array.GetRange(component)) elif isinstance(current, vtk.vtkMultiBlockDataSet): for j in range(current.GetNumberOfBlocks()): array = self.__getActiveArray(current.GetBlock(j)) if array: pairs.append(array.GetRange(component)) return utils.get_min_max(*pairs) def __getLocalRange(self): """ Determine the range of visible items. """ component = self.getOption('component') self.getVTKMapper().Update() # required to have up-to-date ranges data = self.getVTKMapper().GetInput() out = self.__getActiveArray(data) if out is not None: return out.GetRange(component) else: return [None, None] def __getActiveArray(self, data): """ Return the vtkArray for the current variable. Inputs: data[vtkUnstructuredGrid]: The VTK data object to extract array from. see __GetRange and __GetBounds """ name = self.__current_variable.name if self.__current_variable.object_type == ExodusReader.ELEMENTAL: for a in range(data.GetCellData().GetNumberOfArrays()): if data.GetCellData().GetArrayName(a) == name: return data.GetCellData().GetAbstractArray(a) elif self.__current_variable.object_type == ExodusReader.NODAL: for a in range(data.GetPointData().GetNumberOfArrays()): if data.GetPointData().GetArrayName(a) == name: return data.GetPointData().GetAbstractArray(a) else: raise mooseutils.MooseException('Unable to get the range for the ' 'variable "{}"'.format(self.__current_variable.name)) def needsUpdate(self): """ Indicates if this object needs its update method called. (override) This adds checking of the contained reader, if the reader needs updating then so does this class. """ needs_update = super(ExodusSource, self).needsUpdate() mooseutils.mooseDebug('ExodusSource.needsUpdate() = {}'.format(needs_update)) return needs_update or self.__reader.needsUpdate() def update(self, **kwargs): """ Updates this object based on the reader and specified options. Inputs: see ChiggerSource """ # Update the options, but do not call update from base class. See comment at end of this # method. self.setOptions(**kwargs) # Update the reader, if needed if self.__reader.needsUpdate(): self.__reader.update() # Enable all blocks (subdomains) if nothing is enabled block_info = self.__reader.getBlockInformation() for item in ['block', 'boundary', 'nodeset']: if self.isOptionValid(item) and self.getOption(item) == []: self.setOption(item, [item.name for item in \ block_info[getattr(ExodusReader, item.upper())].values()]) self.setNeedsUpdate(False) # this function does not need to update again def get_indices(option, vtk_type): """ Helper to populate vtkExtractBlock object from the selected blocks/sidesets/nodesets """ indices = [] if self.isOptionValid(option): blocks = self.getOption(option) for vtkid, item in block_info[vtk_type].items(): for name in blocks: if (item.name == str(name)) or (str(name) == vtkid): indices.append(item.multiblock_index) return indices extract_indices = get_indices('block', ExodusReader.BLOCK) extract_indices += get_indices('boundary', ExodusReader.SIDESET) extract_indices += get_indices('nodeset', ExodusReader.NODESET) if self.__extract_indices != extract_indices: self.__vtkextractblock.RemoveAllIndices() for index in extract_indices: self.__vtkextractblock.AddIndex(index) self.__extract_indices = extract_indices self.__vtkextractblock.Update() # Define the coloring to utilize for the object self.__updateVariable() # Representation if self.isOptionValid('representation'): func = 'SetRepresentationTo{}'.format(self.getOption('representation').title()) attr = getattr(self._vtkactor.GetProperty(), func) attr() # Without this the results can be less than ideal # (https://blog.kitware.com/what-is-interpolatescalarsbeforemapping-in-vtk/) self._vtkmapper.InterpolateScalarsBeforeMappingOn() # Call the base class method, this is done last because the reader and block extracting # needs to be in place before the filters can be applied super(ExodusSource, self).update() def __updateVariable(self): """ Method to update the active variable to display on the object. (private) """ def get_available_variables(): """ Returns a sting listing the available nodal and elemental variable names. """ nvars = self.__reader.getVariableInformation(var_types=[ExodusReader.NODAL]).keys() evars = self.__reader.getVariableInformation(var_types=[ExodusReader.ELEMENTAL]).keys() msg = ["Nodal:"] msg += [" " + var for var in nvars] msg += ["\nElemental:"] msg += [" " + var for var in evars] return ''.join(msg) # Define the active variable name available = self.__reader.getVariableInformation(var_types=[ExodusReader.NODAL, ExodusReader.ELEMENTAL]) # Case when no variable exists if not available: return default = available[list(available.keys())[0]] if not self.isOptionValid('variable'): varinfo = default else: var_name = self.getOption('variable') if var_name not in available: msg = "The variable '{}' provided does not exist, using '{}', available " \ "variables include:\n{}" mooseutils.mooseError(msg.format(var_name, default.name, get_available_variables())) varinfo = default else: varinfo = available[var_name] # Update vtkMapper to the correct data mode if varinfo.object_type == ExodusReader.ELEMENTAL: self._vtkmapper.SetScalarModeToUseCellFieldData() elif varinfo.object_type == ExodusReader.NODAL: self._vtkmapper.SetScalarModeToUsePointFieldData() else: raise mooseutils.MooseException('Unknown variable type, not sure how you made it here.') self.__current_variable = varinfo # Colormap if not self.isOptionValid('color'): self._colormap.setOptions(cmap=self.getOption('cmap'), cmap_reverse=self.getOption('cmap_reverse'), cmap_num_colors=self.getOption('cmap_num_colors')) self._vtkmapper.SelectColorArray(varinfo.name) self._vtkmapper.SetLookupTable(self._colormap()) self._vtkmapper.UseLookupTableScalarRangeOff() # Component component = -1 # Default component to utilize if not valid if self.isOptionValid('component'): component = self.getOption('component') if component == -1: self._vtkmapper.GetLookupTable().SetVectorModeToMagnitude() else: if component > varinfo.num_components: msg = 'Invalid component number ({}), the variable "{}" has {} components.' mooseutils.mooseError(msg.format(component, varinfo.name, varinfo.num_components)) self._vtkmapper.GetLookupTable().SetVectorModeToComponent() self._vtkmapper.GetLookupTable().SetVectorComponent(component) # Range if (self.isOptionValid('min') or self.isOptionValid('max')) and self.isOptionValid('range'): mooseutils.mooseError('Both a "min" and/or "max" options has been set along with the ' '"range" option, the "range" is being utilized, the others are ' 'ignored.') # Range rng = list(self.__getRange()) # Use range from all sources as the default if self.isOptionValid('range'): rng = self.getOption('range') else: if self.isOptionValid('min'): rng[0] = self.getOption('min') if self.isOptionValid('max'): rng[1] = self.getOption('max') if rng[0] > rng[1]: mooseutils.mooseDebug("Minimum range greater than maximum:", rng[0], ">", rng[1], ", the range/min/max settings are being ignored.") rng = list(self.__getRange()) self.getVTKMapper().SetScalarRange(rng) # Handle Elemental variables that are not everywhere on the domain varname = self.__current_variable.name block = self.getOption('block') if (self.__current_variable.object_type == ExodusReader.ELEMENTAL) and (block is not None): for i in range(self.__vtkextractblock.GetOutput().GetNumberOfBlocks()): if not hasattr(self.__vtkextractblock.GetOutput().GetBlock(i), 'GetNumberOfBlocks'): continue for j in range(self.__vtkextractblock.GetOutput().GetBlock(i).GetNumberOfBlocks()): blk = self.__vtkextractblock.GetOutput().GetBlock(i).GetBlock(j) if not blk.GetCellData().HasArray(varname): data = vtk.vtkDoubleArray() data.SetName(varname) data.SetNumberOfTuples(blk.GetCellData().GetArray(0).GetNumberOfTuples()) data.FillComponent(0, vtk.vtkMath.Nan()) blk.GetCellData().AddArray(data)
{ "pile_set_name": "Github" }
package ec2rolecreds_test import ( "fmt" "net/http" "net/http/httptest" "testing" "time" "github.com/stretchr/testify/assert" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" ) const credsRespTmpl = `{ "Code": "Success", "Type": "AWS-HMAC", "AccessKeyId" : "accessKey", "SecretAccessKey" : "secret", "Token" : "token", "Expiration" : "%s", "LastUpdated" : "2009-11-23T0:00:00Z" }` const credsFailRespTmpl = `{ "Code": "ErrorCode", "Message": "ErrorMsg", "LastUpdated": "2009-11-23T0:00:00Z" }` func initTestServer(expireOn string, failAssume bool) *httptest.Server { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.URL.Path == "/latest/meta-data/iam/security-credentials" { fmt.Fprintln(w, "RoleName") } else if r.URL.Path == "/latest/meta-data/iam/security-credentials/RoleName" { if failAssume { fmt.Fprintf(w, credsFailRespTmpl) } else { fmt.Fprintf(w, credsRespTmpl, expireOn) } } else { http.Error(w, "bad request", http.StatusBadRequest) } })) return server } func TestEC2RoleProvider(t *testing.T) { server := initTestServer("2014-12-16T01:51:37Z", false) defer server.Close() p := &ec2rolecreds.EC2RoleProvider{ Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}), } creds, err := p.Retrieve() assert.Nil(t, err, "Expect no error, %v", err) assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match") assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match") assert.Equal(t, "token", creds.SessionToken, "Expect session token to match") } func TestEC2RoleProviderFailAssume(t *testing.T) { server := initTestServer("2014-12-16T01:51:37Z", true) defer server.Close() p := &ec2rolecreds.EC2RoleProvider{ Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}), } creds, err := p.Retrieve() assert.Error(t, err, "Expect error") e := err.(awserr.Error) assert.Equal(t, "ErrorCode", e.Code()) assert.Equal(t, "ErrorMsg", e.Message()) assert.Nil(t, e.OrigErr()) assert.Equal(t, "", creds.AccessKeyID, "Expect access key ID to match") assert.Equal(t, "", creds.SecretAccessKey, "Expect secret access key to match") assert.Equal(t, "", creds.SessionToken, "Expect session token to match") } func TestEC2RoleProviderIsExpired(t *testing.T) { server := initTestServer("2014-12-16T01:51:37Z", false) defer server.Close() p := &ec2rolecreds.EC2RoleProvider{ Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}), } p.CurrentTime = func() time.Time { return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC) } assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.") _, err := p.Retrieve() assert.Nil(t, err, "Expect no error, %v", err) assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.") p.CurrentTime = func() time.Time { return time.Date(3014, 12, 15, 21, 26, 0, 0, time.UTC) } assert.True(t, p.IsExpired(), "Expect creds to be expired.") } func TestEC2RoleProviderExpiryWindowIsExpired(t *testing.T) { server := initTestServer("2014-12-16T01:51:37Z", false) defer server.Close() p := &ec2rolecreds.EC2RoleProvider{ Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}), ExpiryWindow: time.Hour * 1, } p.CurrentTime = func() time.Time { return time.Date(2014, 12, 15, 0, 51, 37, 0, time.UTC) } assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.") _, err := p.Retrieve() assert.Nil(t, err, "Expect no error, %v", err) assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.") p.CurrentTime = func() time.Time { return time.Date(2014, 12, 16, 0, 55, 37, 0, time.UTC) } assert.True(t, p.IsExpired(), "Expect creds to be expired.") } func BenchmarkEC3RoleProvider(b *testing.B) { server := initTestServer("2014-12-16T01:51:37Z", false) defer server.Close() p := &ec2rolecreds.EC2RoleProvider{ Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}), } _, err := p.Retrieve() if err != nil { b.Fatal(err) } b.ResetTimer() for i := 0; i < b.N; i++ { if _, err := p.Retrieve(); err != nil { b.Fatal(err) } } }
{ "pile_set_name": "Github" }
(function() {var implementors = {}; implementors['collections'] = []; if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })()
{ "pile_set_name": "Github" }
{% extends "xadmin/widgets/base.html" %} {% load i18n xadmin_tags %} {% load crispy_forms_tags %} {% block box_class %}{{block.super}} form-horizontal short_label fieldset{% endblock box_class %} {% block content %} <form class="exform quick-form widget-form" action="{{addurl}}" method="post" id="{{ widget.model_name }}_form">{% csrf_token %} {% crispy addform addhelper %} <div class="form-group row submit-line"> <div class="controls"> <div class="alert alert-success alert-dismissable" style="display: none;"> <button type="button" class="close" data-dismiss="alert">&times;</button> <strong>{% trans "Success" %}</strong> {% trans "Add success, click <a id='change-link'>edit</a> to edit." %} </div> <button type="submit" class="btn btn-primary"> {% trans "Quick Add" %} </button> </div> </div> </form> {% endblock content %}
{ "pile_set_name": "Github" }
/******************************************************************************* * Copyright (c) 2013-2015 Sierra Wireless and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * and Eclipse Distribution License v1.0 which accompany this distribution. * * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v20.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.html. * * Contributors: * Sierra Wireless - initial API and implementation *******************************************************************************/ package org.eclipse.leshan.server.demo.servlet.json; import java.lang.reflect.Type; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import org.eclipse.leshan.core.node.LwM2mMultipleResource; import org.eclipse.leshan.core.node.LwM2mNode; import org.eclipse.leshan.core.node.LwM2mObject; import org.eclipse.leshan.core.node.LwM2mObjectInstance; import org.eclipse.leshan.core.node.LwM2mResource; import org.eclipse.leshan.core.node.LwM2mSingleResource; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.JsonPrimitive; public class LwM2mNodeDeserializer implements JsonDeserializer<LwM2mNode> { @Override public LwM2mNode deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if (json == null) { return null; } LwM2mNode node; if (json.isJsonObject()) { JsonObject object = (JsonObject) json; Integer id = null; if (object.has("id")) { id = object.get("id").getAsInt(); } if (object.has("instances")) { if (id == null) { throw new JsonParseException("Missing id"); } JsonArray array = object.get("instances").getAsJsonArray(); LwM2mObjectInstance[] instances = new LwM2mObjectInstance[array.size()]; for (int i = 0; i < array.size(); i++) { instances[i] = context.deserialize(array.get(i), LwM2mNode.class); } node = new LwM2mObject(id, instances); } else if (object.has("resources")) { JsonArray array = object.get("resources").getAsJsonArray(); LwM2mResource[] resources = new LwM2mResource[array.size()]; for (int i = 0; i < array.size(); i++) { resources[i] = context.deserialize(array.get(i), LwM2mNode.class); } if (id == null) { node = new LwM2mObjectInstance(Arrays.asList(resources)); } else { node = new LwM2mObjectInstance(id, resources); } } else if (object.has("value")) { if (id == null) { throw new JsonParseException("Missing id"); } // single value resource JsonPrimitive val = object.get("value").getAsJsonPrimitive(); org.eclipse.leshan.core.model.ResourceModel.Type expectedType = getTypeFor(val); node = LwM2mSingleResource.newResource(id, deserializeValue(val, expectedType), expectedType); } else if (object.has("values")) { if (id == null) { throw new JsonParseException("Missing id"); } // multi-instances resource Map<Integer, Object> values = new HashMap<>(); org.eclipse.leshan.core.model.ResourceModel.Type expectedType = null; for (Entry<String, JsonElement> entry : object.get("values").getAsJsonObject().entrySet()) { JsonPrimitive pval = entry.getValue().getAsJsonPrimitive(); expectedType = getTypeFor(pval); values.put(Integer.valueOf(entry.getKey()), deserializeValue(pval, expectedType)); } // use string by default; if (expectedType == null) expectedType = org.eclipse.leshan.core.model.ResourceModel.Type.STRING; node = LwM2mMultipleResource.newResource(id, values, expectedType); } else { throw new JsonParseException("Invalid node element"); } } else { throw new JsonParseException("Invalid node element"); } return node; } private org.eclipse.leshan.core.model.ResourceModel.Type getTypeFor(JsonPrimitive val) { if (val.isBoolean()) return org.eclipse.leshan.core.model.ResourceModel.Type.BOOLEAN; if (val.isString()) return org.eclipse.leshan.core.model.ResourceModel.Type.STRING; if (val.isNumber()) { if (val.getAsDouble() == val.getAsLong()) { return org.eclipse.leshan.core.model.ResourceModel.Type.INTEGER; } else { return org.eclipse.leshan.core.model.ResourceModel.Type.FLOAT; } } // use string as default value return org.eclipse.leshan.core.model.ResourceModel.Type.STRING; } private Object deserializeValue(JsonPrimitive val, org.eclipse.leshan.core.model.ResourceModel.Type expectedType) { switch (expectedType) { case BOOLEAN: return val.getAsBoolean(); case STRING: return val.getAsString(); case INTEGER: return val.getAsLong(); case FLOAT: return val.getAsDouble(); case TIME: case OPAQUE: default: // TODO we need to better handle this. return val.getAsString(); } } }
{ "pile_set_name": "Github" }
/* * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * MultipleClassifiersCombiner.java * Copyright (C) 2004 University of Waikato, Hamilton, New Zealand * */ package weka.classifiers; import weka.core.Capabilities; import weka.core.Option; import weka.core.OptionHandler; import weka.core.Utils; import weka.core.Capabilities.Capability; import java.util.Enumeration; import java.util.Vector; /** * Abstract utility class for handling settings common to * meta classifiers that build an ensemble from multiple classifiers. * * @author Eibe Frank ([email protected]) * @version $Revision: 6041 $ */ public abstract class MultipleClassifiersCombiner extends AbstractClassifier { /** for serialization */ private static final long serialVersionUID = 2776436621129422119L; /** Array for storing the generated base classifiers. */ protected Classifier[] m_Classifiers = { new weka.classifiers.rules.ZeroR() }; /** * Returns an enumeration describing the available options * * @return an enumeration of all the available options */ public Enumeration listOptions() { Vector newVector = new Vector(1); newVector.addElement(new Option( "\tFull class name of classifier to include, followed\n" + "\tby scheme options. May be specified multiple times.\n" + "\t(default: \"weka.classifiers.rules.ZeroR\")", "B", 1, "-B <classifier specification>")); Enumeration enu = super.listOptions(); while (enu.hasMoreElements()) { newVector.addElement(enu.nextElement()); } return newVector.elements(); } /** * Parses a given list of options. Valid options are:<p> * * -B classifierstring <br> * Classifierstring should contain the full class name of a scheme * included for selection followed by options to the classifier * (required, option should be used once for each classifier).<p> * * @param options the list of options as an array of strings * @exception Exception if an option is not supported */ public void setOptions(String[] options) throws Exception { // Iterate through the schemes Vector classifiers = new Vector(); while (true) { String classifierString = Utils.getOption('B', options); if (classifierString.length() == 0) { break; } String [] classifierSpec = Utils.splitOptions(classifierString); if (classifierSpec.length == 0) { throw new IllegalArgumentException("Invalid classifier specification string"); } String classifierName = classifierSpec[0]; classifierSpec[0] = ""; classifiers.addElement(AbstractClassifier.forName(classifierName, classifierSpec)); } if (classifiers.size() == 0) { classifiers.addElement(new weka.classifiers.rules.ZeroR()); } Classifier [] classifiersArray = new Classifier [classifiers.size()]; for (int i = 0; i < classifiersArray.length; i++) { classifiersArray[i] = (Classifier) classifiers.elementAt(i); } setClassifiers(classifiersArray); super.setOptions(options); } /** * Gets the current settings of the Classifier. * * @return an array of strings suitable for passing to setOptions */ public String [] getOptions() { String [] superOptions = super.getOptions(); int current = 0; String[] options = new String [superOptions.length + m_Classifiers.length * 2]; for (int i = 0; i < m_Classifiers.length; i++) { options[current++] = "-B"; options[current++] = "" + getClassifierSpec(i); } System.arraycopy(superOptions, 0, options, current, superOptions.length); return options; } /** * Returns the tip text for this property * @return tip text for this property suitable for * displaying in the explorer/experimenter gui */ public String classifiersTipText() { return "The base classifiers to be used."; } /** * Sets the list of possible classifers to choose from. * * @param classifiers an array of classifiers with all options set. */ public void setClassifiers(Classifier [] classifiers) { m_Classifiers = classifiers; } /** * Gets the list of possible classifers to choose from. * * @return the array of Classifiers */ public Classifier [] getClassifiers() { return m_Classifiers; } /** * Gets a single classifier from the set of available classifiers. * * @param index the index of the classifier wanted * @return the Classifier */ public Classifier getClassifier(int index) { return m_Classifiers[index]; } /** * Gets the classifier specification string, which contains the class name of * the classifier and any options to the classifier * * @param index the index of the classifier string to retrieve, starting from * 0. * @return the classifier string, or the empty string if no classifier * has been assigned (or the index given is out of range). */ protected String getClassifierSpec(int index) { if (m_Classifiers.length < index) { return ""; } Classifier c = getClassifier(index); return c.getClass().getName() + " " + Utils.joinOptions(((OptionHandler)c).getOptions()); } /** * Returns combined capabilities of the base classifiers, i.e., the * capabilities all of them have in common. * * @return the capabilities of the base classifiers */ public Capabilities getCapabilities() { Capabilities result; int i; if (getClassifiers().length == 0) { result = new Capabilities(this); result.disableAll(); } else { result = (Capabilities) getClassifier(0).getCapabilities().clone(); for (i = 1; i < getClassifiers().length; i++) result.and(getClassifier(i).getCapabilities()); } // set dependencies for (Capability cap: Capability.values()) result.enableDependency(cap); result.setOwner(this); return result; } }
{ "pile_set_name": "Github" }
using System; using NetOffice; using NetOffice.Attributes; namespace NetOffice.WordApi.Enums { /// <summary> /// SupportByVersion Word 12, 14, 15, 16 /// </summary> ///<remarks> MSDN Online Documentation: http://msdn.microsoft.com/en-us/en-us/library/office/ff835537.aspx </remarks> [SupportByVersion("Word", 12,14,15,16)] [EntityType(EntityType.IsEnum)] public enum WdShapeSizeRelative { /// <summary> /// SupportByVersion Word 12, 14, 15, 16 /// </summary> /// <remarks>-999999</remarks> [SupportByVersion("Word", 12,14,15,16)] wdShapeSizeRelativeNone = -999999 } }
{ "pile_set_name": "Github" }
resolver: lts-9.10 extra-deps: # we need a custom version of hint # - hint-0.6.0 # diagrams and SVG - diagrams-core-1.4.0.1 - diagrams-lib-1.4.1.2 - diagrams-svg-1.4.1.1 - svg-builder-0.1.0.2 # Csound - wl-pprint-1.2.1 - csound-expression-dynamic-0.3.3 - csound-expression-opcodes-0.0.4.0 - csound-expression-typed-0.2.2.0 - temporal-media-0.6.3 - data-fix-0.2.0 - data-fix-cse-0.0.2 - csound-expression-5.3.2 - csound-catalog-0.7.3 - csound-sampler-0.0.9.0 - sharc-timbre-0.2 # port midi - PortMidi-0.2.0.0 # Threepenny-GUI for nice JavaScript experiments - file-embed-0.0.10.1 - threepenny-gui-0.8.2.0 - exceptions-0.10.0 - hint-0.8.0 packages: - hyper - hyper-extra - hyper-haskell-server # - location: # git: https://github.com/mvdan/hint # commit: f10e357d8249bc4b8a71e2c211bebc202549c765 # extra-dep: true # - location: lib/hint-0.4.2.3-patched # extra-dep: true
{ "pile_set_name": "Github" }
//! [Problem 70](https://projecteuler.net/problem=70) solver. #![warn( bad_style, unused, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results )] use integer::Integer; use prime::PrimeSet; use std::f64; fn compute(limit: u64) -> u64 { // n = \Pi_{k=1}^d p_k // n / phi(n) = 1 / \Pi_{k=1}^d (1 - 1/p_k) // => p^k / phi(p^k) = p / phi(p) // p is greater then n / phi(p) is less // // phi(p) = p - 1 (if p is prime) => phi(p) is not permutation of p // phi(p1 * p2) = (p1 - 1) * (p2 - 1) let ps = PrimeSet::new(); let mut min_n = 0; let mut min_n_phi = f64::INFINITY; for p1 in &ps { if p1 * p1 > limit { break; } for p2 in &ps { if p2 < p1 { continue; } let n = p1 * p2; if n > limit { break; } let phi = (p1 - 1) * (p2 - 1); let ds1 = n.into_digit_histogram(); let ds2 = phi.into_digit_histogram(); if ds1 != ds2 { continue; } let n_phi = (n as f64) / (phi as f64); if n_phi < min_n_phi { min_n_phi = n_phi; min_n = n; } } } min_n } fn solve() -> String { compute(10000000).to_string() } common::problem!("8319823", solve);
{ "pile_set_name": "Github" }
<testcase> <info> <keywords> HTTP HTTP GET FTP PASV FILE TFTP TFTP RRQ multiprotocol </keywords> </info> # # Server-side <reply> <data1 nocheck="yes"> HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT ETag: "21025-dc7-39462498" Accept-Ranges: bytes Content-Length: 6 Connection: close Content-Type: text/html Funny-head: yesyes -foo- </data1> <data2 nocheck="yes"> data to see that FTP works so does it? </data2> <data3 nocheck="yes"> a chunk of data returned to TFTP client </data3> </reply> # # Client-side <client> <server> http ftp file tftp </server> <name> HTTP GET followed by FTP RETR followed by FILE followed by TFTP RRQ then again in reverse order </name> <command> http://%HOSTIP:%HTTPPORT/20030001 ftp://%HOSTIP:%FTPPORT/20030002 file://localhost/%PWD/log/test2003.txt tftp://%HOSTIP:%TFTPPORT//20030003 tftp://%HOSTIP:%TFTPPORT//20030003 file://localhost/%PWD/log/test2003.txt ftp://%HOSTIP:%FTPPORT/20030002 http://%HOSTIP:%HTTPPORT/20030001 </command> <file name="log/test2003.txt"> foo bar bar foo moo </file> </client> # # Verify data after the test has been "shot" <verify> <strip> ^User-Agent:.* </strip> <protocol> GET /20030001 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* USER anonymous PASS [email protected] PWD EPSV TYPE I SIZE 20030002 RETR 20030002 opcode: 1 mode: octet tsize: 0 blksize: 512 timeout: 6 filename: /20030003 opcode: 1 mode: octet tsize: 0 blksize: 512 timeout: 6 filename: /20030003 EPSV SIZE 20030002 RETR 20030002 GET /20030001 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* QUIT </protocol> <stdout> HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT ETag: "21025-dc7-39462498" Accept-Ranges: bytes Content-Length: 6 Connection: close Content-Type: text/html Funny-head: yesyes -foo- data to see that FTP works so does it? foo bar bar foo moo a chunk of data returned to TFTP client a chunk of data returned to TFTP client foo bar bar foo moo data to see that FTP works so does it? HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT ETag: "21025-dc7-39462498" Accept-Ranges: bytes Content-Length: 6 Connection: close Content-Type: text/html Funny-head: yesyes -foo- </stdout> </verify> </testcase>
{ "pile_set_name": "Github" }
<?php namespace Kahlan\Plugin; use InvalidArgumentException; use Kahlan\Suite; use Kahlan\Analysis\Inspector; use Kahlan\Plugin\Stub\Method; class Stub { /** * Registered stubbed instance/class methods. * * @var array */ protected static $_registered = []; /** * The stub reference. * * @var mixed */ protected $_reference = null; /** * Method chain. * * @var Method[] */ protected $_chain = []; /** * Stubbed methods. * * @var Method[] */ protected $_methods = []; /** * Generic stubs. * * @var Method[] */ protected $_stubs = []; /** * Stub index counter. * * @var integer */ protected $_needToBePatched = false; /** * The Constructor. * * @param mixed $reference An instance or a fully-namespaced class name. */ public function __construct($reference) { $reference = $this->_reference($reference); $isString = is_string($reference); if ($isString) { if (!class_exists($reference)) { throw new InvalidArgumentException("Can't Stub the unexisting class `{$reference}`."); } $reference = ltrim($reference, '\\'); $reflection = Inspector::inspect($reference); } else { $reflection = Inspector::inspect(get_class($reference)); } if (!$reflection->isInternal()) { $this->_reference = $reference; return; } if (!$isString) { throw new InvalidArgumentException("Can't Stub built-in PHP instances, create a test double using `Double::instance()`."); } $this->_needToBePatched = true; return $this->_reference = $reference; } /** * Return the actual reference which must be used. * * @param mixed $reference An instance or a fully-namespaced class name. * @param mixed The reference or the monkey patched one if exist. */ protected function _reference($reference) { if (!is_string($reference)) { return $reference; } $pos = strrpos($reference, '\\'); if ($pos !== false) { $namespace = substr($reference, 0, $pos); $basename = substr($reference, $pos + 1); } else { $namespace = null; $basename = $reference; } $substitute = null; $reference = Monkey::patched($namespace, $basename, false, $substitute); return $substitute ?: $reference; } /** * Getd/Setd stubs for methods or get stubbed methods array. * * @param array $name An array of method names. * @return Method[] Return the array of stubbed methods. */ public function methods($name = []) { if (!func_num_args()) { return $this->_methods; } foreach ($name as $method => $returns) { if (is_callable($returns)) { $this->method($method, $returns); } elseif (is_array($returns)) { $stub = $this->method($method); call_user_func_array([$stub, 'andReturn'], $returns); } else { $error = "Stubbed method definition for `{$method}` must be a closure or an array of returned value(s)."; throw new InvalidArgumentException($error); } } } /** * Stubs a method. * * @param string $path Method name or array of stubs where key are method names and * values the stubs. * @param string $closure The stub implementation. * @return Method[] The created array of method instances. * @return Method The stubbed method instance. */ public function method($path, $closure = null) { if ($this->_needToBePatched) { $layer = Double::classname(); Monkey::patch($this->_reference, $layer); $this->_needToBePatched = false; $this->_reference = $layer; } $reference = $this->_reference; if (!$path) { throw new InvalidArgumentException("Method name can't be empty."); } $names = is_array($path) ? $path : [$path]; $this->_chain = []; $total = count($names); foreach ($names as $index => $name) { if (preg_match('/^::.*/', $name)) { $reference = is_object($reference) ? get_class($reference) : $reference; } $hash = Suite::hash($reference); if (!isset(static::$_registered[$hash])) { static::$_registered[$hash] = new static($reference); } $instance = static::$_registered[$hash]; if (is_object($reference)) { Suite::register(get_class($reference)); } else { Suite::register($reference); } if (!isset($instance->_methods[$name])) { $instance->_methods[$name] = []; $instance->_stubs[$name] = Double::instance(); } $method = new Method([ 'parent' => $this, 'reference' => $reference, 'name' => $name ]); $this->_chain[$name] = $method; array_unshift($instance->_methods[$name], $method); if ($index < $total - 1) { $reference = $instance->_stubs[$name]; $method->andReturn($instance->_stubs[$name]); } } $method = end($this->_chain); if ($closure) { $method->andRun($closure); } return $method; } /** * Set arguments requirement indexed by method name. * * @param mixed ... <0,n> Argument(s). * @return self */ public function where($requirements = []) { foreach ($requirements as $name => $args) { if (!isset($this->_chain[$name])) { throw new InvalidArgumentException("Unexisting `{$name}` as method as part of the chain definition."); } if (!is_array($args)) { throw new InvalidArgumentException("Argument requirements must be an arrays for `{$name}` method."); } call_user_func_array([$this->_chain[$name], 'with'], $args); } return $this; } /** * Stubs class methods. * * @param object|string $reference An instance or a fully-namespaced class name. * @return self The Stub instance. */ public static function on($reference) { $hash = Suite::hash($reference); if (isset(static::$_registered[$hash])) { return static::$_registered[$hash]; } return static::$_registered[$hash] = new static($reference); } /** * Finds a stub. * * @param mixed $references An instance or a fully namespaced class name. * or an array of that. * @param string $method The method name. * @param array $args The required arguments. * @return object|null Return the subbed method or `null` if not founded. */ public static function find($references, $method = null, $args = null) { $references = (array) $references; $stub = null; foreach ($references as $reference) { $hash = Suite::hash($reference); if (!isset(static::$_registered[$hash])) { continue; } $stubs = static::$_registered[$hash]->methods(); if (!isset($stubs[$method])) { continue; } foreach ($stubs[$method] as $stub) { $call['name'] = $method; $call['args'] = $args; if ($stub->match($call)) { return $stub; } } } return false; } /** * Checks if a stub has been registered for a hash * * @param mixed $hash An instance hash or a fully namespaced class name. * @return boolean|array */ public static function registered($hash = null) { if (!func_num_args()) { return array_keys(static::$_registered); } return isset(static::$_registered[$hash]); } /** * Clears the registered references. * * @param string $reference An instance or a fully namespaced class name or `null` to clear all. */ public static function reset($reference = null) { if ($reference === null) { static::$_registered = []; Suite::reset(); return; } unset(static::$_registered[Suite::hash($reference)]); } }
{ "pile_set_name": "Github" }
// Copyright 2013 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. #include "syzygy/integration_tests/integration_tests_dll.h" #include <windows.h> // NOLINT #include <stdint.h> #include "syzygy/integration_tests/asan_check_tests.h" #include "syzygy/integration_tests/asan_interceptors_tests.h" #include "syzygy/integration_tests/asan_page_protection_tests.h" #ifndef __clang__ #include "syzygy/integration_tests/bb_entry_tests.h" #include "syzygy/integration_tests/behavior_tests.h" #include "syzygy/integration_tests/coverage_tests.h" #include "syzygy/integration_tests/profile_tests.h" #endif // __clang__ #include "syzygy/integration_tests/deferred_free_tests.h" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) { return TRUE; } unsigned int CALLBACK EndToEndTest(testing::EndToEndTestId test) { switch (test) { #define DECLARE_END_TO_END_SWITCH_TABLE(enum_name, function_to_call) \ case testing::enum_name: { \ return function_to_call(); \ } END_TO_END_TEST_ID_TABLE(DECLARE_END_TO_END_SWITCH_TABLE) #undef DECLARE_END_TO_END_SWITCH_TABLE default: return 0; } }
{ "pile_set_name": "Github" }
--- id: 193 state: approved created: 2019-07-26 placement: category: polish order: 30 --- # Errors Error handling is an important part of designing simple and intuitive APIs. Consistent error handling allows developers to know how to expect to receive errors, and to reduce boilerplate by having common error-handling logic, rather than being expected to constantly add verbose error handling everywhere. ## Guidance Services **must** return a [`google.rpc.Status`][Status] message when an API error occurs, and **must** use the canonical error codes defined in [`google.rpc.Code`][Code]. More information about the particular codes is available in the [gRPC status code documentation][]. Error messages **should** help a reasonably technical user _understand_ and _resolve_ the issue, and **should not** assume that the user is an expert in your particular API. Additionally, error messages **must not** assume that the user will know anything about its underlying implementation. Error messages **should** be brief but actionable. Any extra information **should** be provided in the `details` field. If even more information is necessary, you **should** provide a link where a reader can get more information or ask questions to help resolve the issue. ### Details Google defines a set of [standard detail payloads][details] for error details, which cover most common needs for API errors. Services **should** use these standard details payloads when feasible. Structured details with machine-readable identifiers **must** be used if users will need to write code against a specific aspect of the error. Error message strings **may** change over time; however, if an error message does not have a machine-readable identifier _in addition to_ the `code` field, changing the error message **must** be considered a backwards-incompatible change. **Note:** The [`ErrorInfo`][ErrorInfo] message is the recommended way to send a machine-readable identifier. ### Localization Error messages **must** be in English. If a localized error message is also required, the service **should** use [`google.rpc.LocalizedMessage`][details] as the `details` field. ### Partial errors APIs **should not** support partial errors. Partial errors add significant complexity for users, because they usually sidestep the use of error codes, or move those error codes into the response message, where the user must write specialized error handling logic to address the problem. However, occasionally partial errors are necessary, particularly in bulk operations where it would be hostile to users to fail an entire large request because of a problem with a single entry. Methods that require partial errors **should** use [long-running operations][], and the method **should** put partial failure information in the metadata message. The errors themselves **must** still be represented with a [`google.rpc.Status`][Status] object. ## Further reading - For which error codes to retry, see [AIP-194](https://aip.dev/194). - For how to retry errors in client libraries, see [AIP-4221][]. ## Changelog - **2020-01-22**: Added a reference to the [`ErrorInfo`][ErrorInfo] message. - **2019-10-14**: Added guidance restricting error message mutability to if there is a machine-readable identifier present. - **2019-09-23**: Added guidance about error message strings being able to change. <!-- prettier-ignore-start --> [aip-4221]: ./client-libraries/4221.md [details]: https://github.com/googleapis/api-common-protos/blob/master/google/rpc/error_details.proto [ErrorInfo]: https://github.com/googleapis/api-common-protos/blob/master/google/rpc/error_details.proto#L111 [grpc status code documentation]: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md [Code]: https://github.com/googleapis/api-common-protos/blob/master/google/rpc/code.proto [Status]: https://github.com/googleapis/api-common-protos/blob/master/google/rpc/status.proto [long-running operations]: ./0151.md <!-- prettier-ignore-end -->
{ "pile_set_name": "Github" }
<Project> <PropertyGroup> <!-- These settings ensure that we don't have to manually increment version numbers after every release! If there's an AppVeyor tag, we always build with that tag name as the <Version>. This overwrites any <VersionPrefix> and <VersionSuffix> so the tag MUST have a SemVer-compatible name! Any non-official (non-tagged) build uses a fixed (high) <VersionPrefix> and an incrementing suffix. This ensures that people who want to reference a package from a regular build can do so by specifying the complete version (e.g. 99.99.99-b0014 or 99.99.99-*) which will always be higher than any official release and therefore will always take priority. --> <!-- Prefix for non-tagged (local/regular CI) builds --> <VersionPrefix>99.99.99</VersionPrefix> <!-- Suffix for loal builds --> <VersionSuffix>loc$([System.DateTime]::UtcNow.ToString('yyyyMMddHHmm'))</VersionSuffix> <!-- Suffix for regular AppVeyor builds --> <VersionSuffix Condition="'$(APPVEYOR_BUILD_NUMBER)' != ''">ci$([System.Int32]::Parse($(APPVEYOR_BUILD_NUMBER)).ToString('D4'))</VersionSuffix> <!-- Overwrite everything if there's an AppVeyor tag --> <Version Condition="'$(APPVEYOR_REPO_TAG_NAME)' != ''">$(APPVEYOR_REPO_TAG_NAME.TrimStart('v'))</Version> </PropertyGroup> </Project>
{ "pile_set_name": "Github" }
# <pre> # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to # [email protected] for general use in the future). # From Paul Eggert (2006-03-22): # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. # # Except where otherwise noted, Shanks & Pottenger is the source for # entries through 1990, and IATA SSIM is the source for entries afterwards. # # Earlier editions of these tables used the North American style (e.g. ARST and # ARDT for Argentine Standard and Daylight Time), but the following quote # suggests that it's better to use European style (e.g. ART and ARST). # I suggest the use of _Summer time_ instead of the more cumbersome # _daylight-saving time_. _Summer time_ seems to be in general use # in Europe and South America. # -- E O Cutler, _New York Times_ (1937-02-14), quoted in # H L Mencken, _The American Language: Supplement I_ (1960), p 466 # # Earlier editions of these tables also used the North American style # for time zones in Brazil, but this was incorrect, as Brazilians say # "summer time". Reinaldo Goulart, a Sao Paulo businessman active in # the railroad sector, writes (1999-07-06): # The subject of time zones is currently a matter of discussion/debate in # Brazil. Let's say that "the Brasilia time" is considered the # "official time" because Brasilia is the capital city. # The other three time zones are called "Brasilia time "minus one" or # "plus one" or "plus two". As far as I know there is no such # name/designation as "Eastern Time" or "Central Time". # So I invented the following (English-language) abbreviations for now. # Corrections are welcome! # std dst # -2:00 FNT FNST Fernando de Noronha # -3:00 BRT BRST Brasilia # -4:00 AMT AMST Amazon # -5:00 ACT ACST Acre ############################################################################### ############################################################################### # Argentina # From Bob Devine (1988-01-28): # Argentina: first Sunday in October to first Sunday in April since 1976. # Double Summer time from 1969 to 1974. Switches at midnight. # From U. S. Naval Observatory (1988-01-199): # ARGENTINA 3 H BEHIND UTC # From Hernan G. Otero (1995-06-26): # I am sending modifications to the Argentine time zone table... # AR was chosen because they are the ISO letters that represent Argentina. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Arg 1930 only - Dec 1 0:00 1:00 S Rule Arg 1931 only - Apr 1 0:00 0 - Rule Arg 1931 only - Oct 15 0:00 1:00 S Rule Arg 1932 1940 - Mar 1 0:00 0 - Rule Arg 1932 1939 - Nov 1 0:00 1:00 S Rule Arg 1940 only - Jul 1 0:00 1:00 S Rule Arg 1941 only - Jun 15 0:00 0 - Rule Arg 1941 only - Oct 15 0:00 1:00 S Rule Arg 1943 only - Aug 1 0:00 0 - Rule Arg 1943 only - Oct 15 0:00 1:00 S Rule Arg 1946 only - Mar 1 0:00 0 - Rule Arg 1946 only - Oct 1 0:00 1:00 S Rule Arg 1963 only - Oct 1 0:00 0 - Rule Arg 1963 only - Dec 15 0:00 1:00 S Rule Arg 1964 1966 - Mar 1 0:00 0 - Rule Arg 1964 1966 - Oct 15 0:00 1:00 S Rule Arg 1967 only - Apr 2 0:00 0 - Rule Arg 1967 1968 - Oct Sun>=1 0:00 1:00 S Rule Arg 1968 1969 - Apr Sun>=1 0:00 0 - Rule Arg 1974 only - Jan 23 0:00 1:00 S Rule Arg 1974 only - May 1 0:00 0 - Rule Arg 1988 only - Dec 1 0:00 1:00 S # # From Hernan G. Otero (1995-06-26): # These corrections were contributed by InterSoft Argentina S.A., # obtaining the data from the: # Talleres de Hidrografia Naval Argentina # (Argentine Naval Hydrography Institute) Rule Arg 1989 1993 - Mar Sun>=1 0:00 0 - Rule Arg 1989 1992 - Oct Sun>=15 0:00 1:00 S # # From Hernan G. Otero (1995-06-26): # From this moment on, the law that mandated the daylight saving # time corrections was derogated and no more modifications # to the time zones (for daylight saving) are now made. # # From Rives McDow (2000-01-10): # On October 3, 1999, 0:00 local, Argentina implemented daylight savings time, # which did not result in the switch of a time zone, as they stayed 9 hours # from the International Date Line. Rule Arg 1999 only - Oct Sun>=1 0:00 1:00 S # From Paul Eggert (2007-12-28): # DST was set to expire on March 5, not March 3, but since it was converted # to standard time on March 3 it's more convenient for us to pretend that # it ended on March 3. Rule Arg 2000 only - Mar 3 0:00 0 - # # From Peter Gradelski via Steffen Thorsen (2000-03-01): # We just checked with our Sao Paulo office and they say the government of # Argentina decided not to become one of the countries that go on or off DST. # So Buenos Aires should be -3 hours from GMT at all times. # # From Fabian L. Arce Jofre (2000-04-04): # The law that claimed DST for Argentina was derogated by President Fernando # de la Rua on March 2, 2000, because it would make people spend more energy # in the winter time, rather than less. The change took effect on March 3. # # From Mariano Absatz (2001-06-06): # one of the major newspapers here in Argentina said that the 1999 # Timezone Law (which never was effectively applied) will (would?) be # in effect.... The article is at # http://ar.clarin.com/diario/2001-06-06/e-01701.htm # ... The Law itself is "Ley No 25155", sanctioned on 1999-08-25, enacted # 1999-09-17, and published 1999-09-21. The official publication is at: # http://www.boletin.jus.gov.ar/BON/Primera/1999/09-Septiembre/21/PDF/BO21-09-99LEG.PDF # Regretfully, you have to subscribe (and pay) for the on-line version.... # # (2001-06-12): # the timezone for Argentina will not change next Sunday. # Apparently it will do so on Sunday 24th.... # http://ar.clarin.com/diario/2001-06-12/s-03501.htm # # (2001-06-25): # Last Friday (yes, the last working day before the date of the change), the # Senate annulled the 1999 law that introduced the changes later postponed. # http://www.clarin.com.ar/diario/2001-06-22/s-03601.htm # It remains the vote of the Deputies..., but it will be the same.... # This kind of things had always been done this way in Argentina. # We are still -03:00 all year round in all of the country. # # From Steffen Thorsen (2007-12-21): # A user (Leonardo Chaim) reported that Argentina will adopt DST.... # all of the country (all Zone-entries) are affected. News reports like # http://www.lanacion.com.ar/opinion/nota.asp?nota_id=973037 indicate # that Argentina will use DST next year as well, from October to # March, although exact rules are not given. # # From Jesper Norgaard Welen (2007-12-26) # The last hurdle of Argentina DST is over, the proposal was approved in # the lower chamber too (Deputados) with a vote 192 for and 2 against. # By the way thanks to Mariano Absatz and Daniel Mario Vega for the link to # the original scanned proposal, where the dates and the zero hours are # clear and unambiguous...This is the article about final approval: # <a href="http://www.lanacion.com.ar/politica/nota.asp?nota_id=973996"> # http://www.lanacion.com.ar/politica/nota.asp?nota_id=973996 # </a> # # From Paul Eggert (2007-12-22): # For dates after mid-2008, the following rules are my guesses and # are quite possibly wrong, but are more likely than no DST at all. # From Alexander Krivenyshev (2008-09-05): # As per message from Carlos Alberto Fonseca Arauz (Nicaragua), # Argentina will start DST on Sunday October 19, 2008. # # <a href="http://www.worldtimezone.com/dst_news/dst_news_argentina03.html"> # http://www.worldtimezone.com/dst_news/dst_news_argentina03.html # </a> # OR # <a href="http://www.impulsobaires.com.ar/nota.php?id=57832 (in spanish)"> # http://www.impulsobaires.com.ar/nota.php?id=57832 (in spanish) # </a> # From Rodrigo Severo (2008-10-06): # Here is some info available at a Gentoo bug related to TZ on Argentina's DST: # ... # ------- Comment #1 from [jmdocile] 2008-10-06 16:28 0000 ------- # Hi, there is a problem with timezone-data-2008e and maybe with # timezone-data-2008f # Argentinian law [Number] 25.155 is no longer valid. # <a href="http://www.infoleg.gov.ar/infolegInternet/anexos/60000-64999/60036/norma.htm"> # http://www.infoleg.gov.ar/infolegInternet/anexos/60000-64999/60036/norma.htm # </a> # The new one is law [Number] 26.350 # <a href="http://www.infoleg.gov.ar/infolegInternet/anexos/135000-139999/136191/norma.htm"> # http://www.infoleg.gov.ar/infolegInternet/anexos/135000-139999/136191/norma.htm # </a> # So there is no summer time in Argentina for now. # From Mariano Absatz (2008-10-20): # Decree 1693/2008 applies Law 26.350 for the summer 2008/2009 establishing DST in Argentina # From 2008-10-19 until 2009-03-15 # <a href="http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=16102008&pi=3&pf=4&s=0&sec=01"> # http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=16102008&pi=3&pf=4&s=0&sec=01 # </a> # # Decree 1705/2008 excepting 12 Provinces from applying DST in the summer 2008/2009: # Catamarca, La Rioja, Mendoza, Salta, San Juan, San Luis, La Pampa, Neuquen, Rio Negro, Chubut, Santa Cruz # and Tierra del Fuego # <a href="http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=17102008&pi=1&pf=1&s=0&sec=01"> # http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=17102008&pi=1&pf=1&s=0&sec=01 # </a> # # Press release 235 dated Saturday October 18th, from the Government of the Province of Jujuy saying # it will not apply DST either (even when it was not included in Decree 1705/2008) # <a href="http://www.jujuy.gov.ar/index2/partes_prensa/18_10_08/235-181008.doc"> # http://www.jujuy.gov.ar/index2/partes_prensa/18_10_08/235-181008.doc # </a> # From fullinet (2009-10-18): # As announced in # <a hef="http://www.argentina.gob.ar/argentina/portal/paginas.dhtml?pagina=356"> # http://www.argentina.gob.ar/argentina/portal/paginas.dhtml?pagina=356 # </a> # (an official .gob.ar) under title: "Sin Cambio de Hora" (english: "No hour change") # # "Por el momento, el Gobierno Nacional resolvio no modificar la hora # oficial, decision que estaba en estudio para su implementacion el # domingo 18 de octubre. Desde el Ministerio de Planificacion se anuncio # que la Argentina hoy, en estas condiciones meteorologicas, no necesita # la modificacion del huso horario, ya que 2009 nos encuentra con # crecimiento en la produccion y distribucion energetica." Rule Arg 2007 only - Dec 30 0:00 1:00 S Rule Arg 2008 2009 - Mar Sun>=15 0:00 0 - Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S # From Mariano Absatz (2004-05-21): # Today it was officially published that the Province of Mendoza is changing # its timezone this winter... starting tomorrow night.... # http://www.gobernac.mendoza.gov.ar/boletin/pdf/20040521-27158-normas.pdf # From Paul Eggert (2004-05-24): # It's Law No. 7,210. This change is due to a public power emergency, so for # now we'll assume it's for this year only. # # From Paul Eggert (2006-03-22): # <a href="http://www.spicasc.net/horvera.html"> # Hora de verano para la Republica Argentina (2003-06-08) # </a> says that standard time in Argentina from 1894-10-31 # to 1920-05-01 was -4:16:48.25. Go with this more-precise value # over Shanks & Pottenger. # # From Mariano Absatz (2004-06-05): # These media articles from a major newspaper mostly cover the current state: # http://www.lanacion.com.ar/04/05/27/de_604825.asp # http://www.lanacion.com.ar/04/05/28/de_605203.asp # # The following eight (8) provinces pulled clocks back to UTC-04:00 at # midnight Monday May 31st. (that is, the night between 05/31 and 06/01). # Apparently, all nine provinces would go back to UTC-03:00 at the same # time in October 17th. # # Catamarca, Chubut, La Rioja, San Juan, San Luis, Santa Cruz, # Tierra del Fuego, Tucuman. # # From Mariano Absatz (2004-06-14): # ... this weekend, the Province of Tucuman decided it'd go back to UTC-03:00 # yesterday midnight (that is, at 24:00 Saturday 12th), since the people's # annoyance with the change is much higher than the power savings obtained.... # # From Gwillim Law (2004-06-14): # http://www.lanacion.com.ar/04/06/10/de_609078.asp ... # "The time change in Tierra del Fuego was a conflicted decision from # the start. The government had decreed that the measure would take # effect on June 1, but a normative error forced the new time to begin # three days earlier, from a Saturday to a Sunday.... # Our understanding was that the change was originally scheduled to take place # on June 1 at 00:00 in Chubut, Santa Cruz, Tierra del Fuego (and some other # provinces). Sunday was May 30, only two days earlier. So the article # contains a contradiction. I would give more credence to the Saturday/Sunday # date than the "three days earlier" phrase, and conclude that Tierra del # Fuego set its clocks back at 2004-05-30 00:00. # # From Steffen Thorsen (2004-10-05): # The previous law 7210 which changed the province of Mendoza's time zone # back in May have been modified slightly in a new law 7277, which set the # new end date to 2004-09-26 (original date was 2004-10-17). # http://www.gobernac.mendoza.gov.ar/boletin/pdf/20040924-27244-normas.pdf # # From Mariano Absatz (2004-10-05): # San Juan changed from UTC-03:00 to UTC-04:00 at midnight between # Sunday, May 30th and Monday, May 31st. It changed back to UTC-03:00 # at midnight between Saturday, July 24th and Sunday, July 25th.... # http://www.sanjuan.gov.ar/prensa/archivo/000329.html # http://www.sanjuan.gov.ar/prensa/archivo/000426.html # http://www.sanjuan.gov.ar/prensa/archivo/000441.html # From Alex Krivenyshev (2008-01-17): # Here are articles that Argentina Province San Luis is planning to end DST # as earlier as upcoming Monday January 21, 2008 or February 2008: # # Provincia argentina retrasa reloj y marca diferencia con resto del pais # (Argentine Province delayed clock and mark difference with the rest of the # country) # <a href="http://cl.invertia.com/noticias/noticia.aspx?idNoticia=200801171849_EFE_ET4373&idtel"> # http://cl.invertia.com/noticias/noticia.aspx?idNoticia=200801171849_EFE_ET4373&idtel # </a> # # Es inminente que en San Luis atrasen una hora los relojes # (It is imminent in San Luis clocks one hour delay) # <a href="http://www.lagaceta.com.ar/vernotae.asp?id_nota=253414"> # http://www.lagaceta.com.ar/vernotae.asp?id_nota=253414 # </a> # # <a href="http://www.worldtimezone.net/dst_news/dst_news_argentina02.html"> # http://www.worldtimezone.net/dst_news/dst_news_argentina02.html # </a> # From Jesper Norgaard Welen (2008-01-18): # The page of the San Luis provincial government # <a href="http://www.sanluis.gov.ar/notas.asp?idCanal=0&id=22812"> # http://www.sanluis.gov.ar/notas.asp?idCanal=0&id=22812 # </a> # confirms what Alex Krivenyshev has earlier sent to the tz # emailing list about that San Luis plans to return to standard # time much earlier than the rest of the country. It also # confirms that upon request the provinces San Juan and Mendoza # refused to follow San Luis in this change. # # The change is supposed to take place Monday the 21.st at 0:00 # hours. As far as I understand it if this goes ahead, we need # a new timezone for San Luis (although there are also documented # independent changes in the southamerica file of San Luis in # 1990 and 1991 which has not been confirmed). # From Jesper Norgaard Welen (2008-01-25): # Unfortunately the below page has become defunct, about the San Luis # time change. Perhaps because it now is part of a group of pages "Most # important pages of 2008." # # You can use # <a href="http://www.sanluis.gov.ar/notas.asp?idCanal=8141&id=22834"> # http://www.sanluis.gov.ar/notas.asp?idCanal=8141&id=22834 # </a> # instead it seems. Or use "Buscador" from the main page of the San Luis # government, and fill in "huso" and click OK, and you will get 3 pages # from which the first one is identical to the above. # From Mariano Absatz (2008-01-28): # I can confirm that the Province of San Luis (and so far only that # province) decided to go back to UTC-3 effective midnight Jan 20th 2008 # (that is, Monday 21st at 0:00 is the time the clocks were delayed back # 1 hour), and they intend to keep UTC-3 as their timezone all year round # (that is, unless they change their mind any minute now). # # So we'll have to add yet another city to 'southamerica' (I think San # Luis city is the mos populated city in the Province, so it'd be # America/Argentina/San_Luis... of course I can't remember if San Luis's # history of particular changes goes along with Mendoza or San Juan :-( # (I only remember not being able to collect hard facts about San Luis # back in 2004, when these provinces changed to UTC-4 for a few days, I # mailed them personally and never got an answer). # From Paul Eggert (2008-06-30): # Unless otherwise specified, data are from Shanks & Pottenger through 1992, # from the IATA otherwise. As noted below, Shanks & Pottenger say that # America/Cordoba split into 6 subregions during 1991/1992, one of which # was America/San_Luis, but we haven't verified this yet so for now we'll # keep America/Cordoba a single region rather than splitting it into the # other 5 subregions. # From Mariano Absatz (2009-03-13): # Yesterday (with our usual 2-day notice) the Province of San Luis # decided that next Sunday instead of "staying" @utc-03:00 they will go # to utc-04:00 until the second Saturday in October... # # The press release is at # <a href="http://www.sanluis.gov.ar/SL/Paginas/NoticiaDetalle.asp?TemaId=1&InfoPrensaId=3102"> # http://www.sanluis.gov.ar/SL/Paginas/NoticiaDetalle.asp?TemaId=1&InfoPrensaId=3102 # </a> # (I couldn't find the decree, but # <a href="http://www.sanluis.gov.ar"> # www.sanluis.gov.ar # <a/> # is the official page for the Province Government). # # There's also a note in only one of the major national papers (La Nación) at # <a href="http://www.lanacion.com.ar/nota.asp?nota_id=1107912"> # http://www.lanacion.com.ar/nota.asp?nota_id=1107912 # </a> # # The press release says: # (...) anunció que el próximo domingo a las 00:00 los puntanos deberán # atrasar una hora sus relojes. # # A partir de entonces, San Luis establecerá el huso horario propio de # la Provincia. De esta manera, durante el periodo del calendario anual # 2009, el cambio horario quedará comprendido entre las 00:00 del tercer # domingo de marzo y las 24:00 del segundo sábado de octubre. # Quick&dirty translation # (...) announced that next Sunday, at 00:00, Puntanos (the San Luis # inhabitants) will have to turn back one hour their clocks # # Since then, San Luis will establish its own Province timezone. Thus, # during 2009, this timezone change will run from 00:00 the third Sunday # in March until 24:00 of the second Saturday in October. # From Mariano Absatz (2009-10-16): # ...the Province of San Luis is a case in itself. # # The Law at # <a href="http://www.diputadossanluis.gov.ar/diputadosasp/paginas/verNorma.asp?NormaID=276>" # http://www.diputadossanluis.gov.ar/diputadosasp/paginas/verNorma.asp?NormaID=276 # </a> # is ambiguous because establishes a calendar from the 2nd Sunday in # October at 0:00 thru the 2nd Saturday in March at 24:00 and the # complement of that starting on the 2nd Sunday of March at 0:00 and # ending on the 2nd Saturday of March at 24:00. # # This clearly breaks every time the 1st of March or October is a Sunday. # # IMHO, the "spirit of the Law" is to make the changes at 0:00 on the 2nd # Sunday of October and March. # # The problem is that the changes in the rest of the Provinces that did # change in 2007/2008, were made according to the Federal Law and Decrees # that did so on the 3rd Sunday of October and March. # # In fact, San Luis actually switched from UTC-4 to UTC-3 last Sunday # (October 11th) at 0:00. # # So I guess a new set of rules, besides "Arg", must be made and the last # America/Argentina/San_Luis entries should change to use these... # # I'm enclosing a patch that does what I say... regretfully, the San Luis # timezone must be called "WART/WARST" even when most of the time (like, # right now) WARST == ART... that is, since last Sunday, all the country # is using UTC-3, but in my patch, San Luis calls it "WARST" and the rest # of the country calls it "ART". # ... # From Alexander Krivenyshev (2010-04-09): # According to news reports from El Diario de la Republica Province San # Luis, Argentina (standard time UTC-04) will keep Daylight Saving Time # after April 11, 2010--will continue to have same time as rest of # Argentina (UTC-3) (no DST). # # Confirmaron la pr&oacute;rroga del huso horario de verano (Spanish) # <a href="http://www.eldiariodelarepublica.com/index.php?option=com_content&task=view&id=29383&Itemid=9"> # http://www.eldiariodelarepublica.com/index.php?option=com_content&task=view&id=29383&Itemid=9 # </a> # or (some English translation): # <a href="http://www.worldtimezone.com/dst_news/dst_news_argentina08.html"> # http://www.worldtimezone.com/dst_news/dst_news_argentina08.html # </a> # From Mariano Absatz (2010-04-12): # yes...I can confirm this...and given that San Luis keeps calling # UTC-03:00 "summer time", we should't just let San Luis go back to "Arg" # rules...San Luis is still using "Western ARgentina Time" and it got # stuck on Summer daylight savings time even though the summer is over. # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Buenos Aires (BA), Capital Federal (CF), Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May # Cordoba Mean Time -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 Arg AR%sT # # Cordoba (CB), Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), # Chaco (CC), Formosa (FM), Santiago del Estero (SE) # # Shanks & Pottenger also make the following claims, which we haven't verified: # - Formosa switched to -3:00 on 1991-01-07. # - Misiones switched to -3:00 on 1990-12-29. # - Chaco switched to -3:00 on 1991-01-04. # - Santiago del Estero switched to -4:00 on 1991-04-01, # then to -3:00 on 1991-04-26. # Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1991 Mar 3 -4:00 - WART 1991 Oct 20 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 Arg AR%sT # # Salta (SA), La Pampa (LP), Neuquen (NQ), Rio Negro (RN) Zone America/Argentina/Salta -4:21:40 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1991 Mar 3 -4:00 - WART 1991 Oct 20 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # # Tucuman (TM) Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1991 Mar 3 -4:00 - WART 1991 Oct 20 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 Jun 1 -4:00 - WART 2004 Jun 13 -3:00 Arg AR%sT # # La Rioja (LR) Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1991 Mar 1 -4:00 - WART 1991 May 7 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 Jun 1 -4:00 - WART 2004 Jun 20 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # # San Juan (SJ) Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1991 Mar 1 -4:00 - WART 1991 May 7 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 May 31 -4:00 - WART 2004 Jul 25 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # # Jujuy (JY) Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1990 Mar 4 -4:00 - WART 1990 Oct 28 -4:00 1:00 WARST 1991 Mar 17 -4:00 - WART 1991 Oct 6 -3:00 1:00 ARST 1992 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # # Catamarca (CT), Chubut (CH) Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1991 Mar 3 -4:00 - WART 1991 Oct 20 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 Jun 1 -4:00 - WART 2004 Jun 20 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # # Mendoza (MZ) Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1990 Mar 4 -4:00 - WART 1990 Oct 15 -4:00 1:00 WARST 1991 Mar 1 -4:00 - WART 1991 Oct 15 -4:00 1:00 WARST 1992 Mar 1 -4:00 - WART 1992 Oct 18 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 May 23 -4:00 - WART 2004 Sep 26 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # # San Luis (SL) Rule SanLuis 2008 2009 - Mar Sun>=8 0:00 0 - Rule SanLuis 2007 2009 - Oct Sun>=8 0:00 1:00 S Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1990 -3:00 1:00 ARST 1990 Mar 14 -4:00 - WART 1990 Oct 15 -4:00 1:00 WARST 1991 Mar 1 -4:00 - WART 1991 Jun 1 -3:00 - ART 1999 Oct 3 -4:00 1:00 WARST 2000 Mar 3 -3:00 - ART 2004 May 31 -4:00 - WART 2004 Jul 25 -3:00 Arg AR%sT 2008 Jan 21 -4:00 SanLuis WAR%sT # # Santa Cruz (SC) Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May # Cordoba Mean Time -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 Jun 1 -4:00 - WART 2004 Jun 20 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # # Tierra del Fuego, Antartida e Islas del Atlantico Sur (TF) Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May # Cordoba Mean Time -4:00 - ART 1930 Dec -4:00 Arg AR%sT 1969 Oct 5 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 May 30 -4:00 - WART 2004 Jun 20 -3:00 Arg AR%sT 2008 Oct 18 -3:00 - ART # Aruba # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Aruba -4:40:24 - LMT 1912 Feb 12 # Oranjestad -4:30 - ANT 1965 # Netherlands Antilles Time -4:00 - AST # Bolivia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/La_Paz -4:32:36 - LMT 1890 -4:32:36 - CMT 1931 Oct 15 # Calamarca MT -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST -4:00 - BOT # Bolivia Time # Brazil # From Paul Eggert (1993-11-18): # The mayor of Rio recently attempted to change the time zone rules # just in his city, in order to leave more summer time for the tourist trade. # The rule change lasted only part of the day; # the federal government refused to follow the city's rules, and business # was in a chaos, so the mayor backed down that afternoon. # From IATA SSIM (1996-02): # _Only_ the following states in BR1 observe DST: Rio Grande do Sul (RS), # Santa Catarina (SC), Parana (PR), Sao Paulo (SP), Rio de Janeiro (RJ), # Espirito Santo (ES), Minas Gerais (MG), Bahia (BA), Goias (GO), # Distrito Federal (DF), Tocantins (TO), Sergipe [SE] and Alagoas [AL]. # [The last three states are new to this issue of the IATA SSIM.] # From Gwillim Law (1996-10-07): # Geography, history (Tocantins was part of Goias until 1989), and other # sources of time zone information lead me to believe that AL, SE, and TO were # always in BR1, and so the only change was whether or not they observed DST.... # The earliest issue of the SSIM I have is 2/91. Each issue from then until # 9/95 says that DST is observed only in the ten states I quoted from 9/95, # along with Mato Grosso (MT) and Mato Grosso do Sul (MS), which are in BR2 # (UTC-4).... The other two time zones given for Brazil are BR3, which is # UTC-5, no DST, and applies only in the state of Acre (AC); and BR4, which is # UTC-2, and applies to Fernando de Noronha (formerly FN, but I believe it's # become part of the state of Pernambuco). The boundary between BR1 and BR2 # has never been clearly stated. They've simply been called East and West. # However, some conclusions can be drawn from another IATA manual: the Airline # Coding Directory, which lists close to 400 airports in Brazil. For each # airport it gives a time zone which is coded to the SSIM. From that # information, I'm led to conclude that the states of Amapa (AP), Ceara (CE), # Maranhao (MA), Paraiba (PR), Pernambuco (PE), Piaui (PI), and Rio Grande do # Norte (RN), and the eastern part of Para (PA) are all in BR1 without DST. # From Marcos Tadeu (1998-09-27): # <a href="http://pcdsh01.on.br/verao1.html"> # Brazilian official page # </a> # From Jesper Norgaard (2000-11-03): # [For an official list of which regions in Brazil use which time zones, see:] # http://pcdsh01.on.br/Fusbr.htm # http://pcdsh01.on.br/Fusbrhv.htm # From Celso Doria via David Madeo (2002-10-09): # The reason for the delay this year has to do with elections in Brazil. # # Unlike in the United States, elections in Brazil are 100% computerized and # the results are known almost immediately. Yesterday, it was the first # round of the elections when 115 million Brazilians voted for President, # Governor, Senators, Federal Deputies, and State Deputies. Nobody is # counting (or re-counting) votes anymore and we know there will be a second # round for the Presidency and also for some Governors. The 2nd round will # take place on October 27th. # # The reason why the DST will only begin November 3rd is that the thousands # of electoral machines used cannot have their time changed, and since the # Constitution says the elections must begin at 8:00 AM and end at 5:00 PM, # the Government decided to postpone DST, instead of changing the Constitution # (maybe, for the next elections, it will be possible to change the clock)... # From Rodrigo Severo (2004-10-04): # It's just the biannual change made necessary by the much hyped, supposedly # modern Brazilian eletronic voting machines which, apparently, can't deal # with a time change between the first and the second rounds of the elections. # From Steffen Thorsen (2007-09-20): # Brazil will start DST on 2007-10-14 00:00 and end on 2008-02-17 00:00: # http://www.mme.gov.br/site/news/detail.do;jsessionid=BBA06811AFCAAC28F0285210913513DA?newsId=13975 # From Paul Schulze (2008-06-24): # ...by law number 11.662 of April 24, 2008 (published in the "Diario # Oficial da Uniao"...) in Brazil there are changes in the timezones, # effective today (00:00am at June 24, 2008) as follows: # # a) The timezone UTC+5 is e[x]tinguished, with all the Acre state and the # part of the Amazonas state that had this timezone now being put to the # timezone UTC+4 # b) The whole Para state now is put at timezone UTC+3, instead of just # part of it, as was before. # # This change follows a proposal of senator Tiao Viana of Acre state, that # proposed it due to concerns about open television channels displaying # programs inappropriate to youths in the states that had the timezone # UTC+5 too early in the night. In the occasion, some more corrections # were proposed, trying to unify the timezones of any given state. This # change modifies timezone rules defined in decree 2.784 of 18 June, # 1913. # From Rodrigo Severo (2008-06-24): # Just correcting the URL: # <a href="https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=do&secao=1&pagina=1&data=25/04/2008"> # https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=do&secao=1&pagina=1&data=25/04/2008 # </a> # # As a result of the above Decree I believe the America/Rio_Branco # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall # be created to represent the...west side of the Para State. I # suggest this new timezone be called Santarem as the most # important/populated city in the affected area. # # This new timezone would be the same as the Rio_Branco timezone up to # the 2008/06/24 change which would be to UTC-3 instead of UTC-4. # From Alex Krivenyshev (2008-06-24): # This is a quick reference page for New and Old Brazil Time Zones map. # <a href="http://www.worldtimezone.com/brazil-time-new-old.php"> # http://www.worldtimezone.com/brazil-time-new-old.php # </a> # # - 4 time zones replaced by 3 time zones-eliminating time zone UTC- 05 # (state Acre and the part of the Amazonas will be UTC/GMT- 04) - western # part of Par state is moving to one timezone UTC- 03 (from UTC -04). # From Paul Eggert (2002-10-10): # The official decrees referenced below are mostly taken from # <a href="http://pcdsh01.on.br/DecHV.html"> # Decretos sobre o Horario de Verao no Brasil # </a>. # From Steffen Thorsen (2008-08-29): # As announced by the government and many newspapers in Brazil late # yesterday, Brazil will start DST on 2008-10-19 (need to change rule) and # it will end on 2009-02-15 (current rule for Brazil is fine). Based on # past years experience with the elections, there was a good chance that # the start was postponed to November, but it did not happen this year. # # It has not yet been posted to http://pcdsh01.on.br/DecHV.html # # An official page about it: # <a href="http://www.mme.gov.br/site/news/detail.do?newsId=16722"> # http://www.mme.gov.br/site/news/detail.do?newsId=16722 # </a> # Note that this link does not always work directly, but must be accessed # by going to # <a href="http://www.mme.gov.br/first"> # http://www.mme.gov.br/first # </a> # # One example link that works directly: # <a href="http://jornale.com.br/index.php?option=com_content&task=view&id=13530&Itemid=54"> # http://jornale.com.br/index.php?option=com_content&task=view&id=13530&Itemid=54 # (Portuguese) # </a> # # We have a written a short article about it as well: # <a href="http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html"> # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html # </a> # # From Alexander Krivenyshev (2011-10-04): # State Bahia will return to Daylight savings time this year after 8 years off. # The announcement was made by Governor Jaques Wagner in an interview to a # television station in Salvador. # In Portuguese: # <a href="http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html"> # http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html # </a> and # <a href="http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html"> # http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html # </a> # From Guilherme Bernardes Rodrigues (2011-10-07): # There is news in the media, however there is still no decree about it. # I just send a e-mail to Zulmira Brandão at # <a href="http://pcdsh01.on.br/">http://pcdsh01.on.br/</a> the # oficial agency about time in Brazil, and she confirmed that the old rule is # still in force. # From Guilherme Bernardes Rodrigues (2011-10-14) # It's official, the President signed a decree that includes Bahia in summer # time. # [ and in a second message (same day): ] # I found the decree. # # DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011 # Link : # <a href="http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6"> # http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6 # </a> # From Kelley Cook (2012-10-16): # The governor of state of Bahia in Brazil announced on Thursday that # due to public pressure, he is reversing the DST policy they implemented # last year and will not be going to Summer Time on October 21st.... # http://www.correio24horas.com.br/r/artigo/apos-pressoes-wagner-suspende-horario-de-verao-na-bahia # From Rodrigo Severo (2012-10-16): # Tocantins state will have DST. # http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01) # Decree <a href="http://pcdsh01.on.br/HV21896.htm">21,896</a> (1932-01-10) Rule Brazil 1931 only - Oct 3 11:00 1:00 S Rule Brazil 1932 1933 - Apr 1 0:00 0 - Rule Brazil 1932 only - Oct 3 0:00 1:00 S # Decree <a href="http://pcdsh01.on.br/HV23195.htm">23,195</a> (1933-10-10) # revoked DST. # Decree <a href="http://pcdsh01.on.br/HV27496.htm">27,496</a> (1949-11-24) # Decree <a href="http://pcdsh01.on.br/HV27998.htm">27,998</a> (1950-04-13) Rule Brazil 1949 1952 - Dec 1 0:00 1:00 S Rule Brazil 1950 only - Apr 16 1:00 0 - Rule Brazil 1951 1952 - Apr 1 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV32308.htm">32,308</a> (1953-02-24) Rule Brazil 1953 only - Mar 1 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV34724.htm">34,724</a> (1953-11-30) # revoked DST. # Decree <a href="http://pcdsh01.on.br/HV52700.htm">52,700</a> (1963-10-18) # established DST from 1963-10-23 00:00 to 1964-02-29 00:00 # in SP, RJ, GB, MG, ES, due to the prolongation of the drought. # Decree <a href="http://pcdsh01.on.br/HV53071.htm">53,071</a> (1963-12-03) # extended the above decree to all of the national territory on 12-09. Rule Brazil 1963 only - Dec 9 0:00 1:00 S # Decree <a href="http://pcdsh01.on.br/HV53604.htm">53,604</a> (1964-02-25) # extended summer time by one day to 1964-03-01 00:00 (start of school). Rule Brazil 1964 only - Mar 1 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV55639.htm">55,639</a> (1965-01-27) Rule Brazil 1965 only - Jan 31 0:00 1:00 S Rule Brazil 1965 only - Mar 31 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV57303.htm">57,303</a> (1965-11-22) Rule Brazil 1965 only - Dec 1 0:00 1:00 S # Decree <a href="http://pcdsh01.on.br/HV57843.htm">57,843</a> (1966-02-18) Rule Brazil 1966 1968 - Mar 1 0:00 0 - Rule Brazil 1966 1967 - Nov 1 0:00 1:00 S # Decree <a href="http://pcdsh01.on.br/HV63429.htm">63,429</a> (1968-10-15) # revoked DST. # Decree <a href="http://pcdsh01.on.br/HV91698.htm">91,698</a> (1985-09-27) Rule Brazil 1985 only - Nov 2 0:00 1:00 S # Decree 92,310 (1986-01-21) # Decree 92,463 (1986-03-13) Rule Brazil 1986 only - Mar 15 0:00 0 - # Decree 93,316 (1986-10-01) Rule Brazil 1986 only - Oct 25 0:00 1:00 S Rule Brazil 1987 only - Feb 14 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV94922.htm">94,922</a> (1987-09-22) Rule Brazil 1987 only - Oct 25 0:00 1:00 S Rule Brazil 1988 only - Feb 7 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV96676.htm">96,676</a> (1988-09-12) # except for the states of AC, AM, PA, RR, RO, and AP (then a territory) Rule Brazil 1988 only - Oct 16 0:00 1:00 S Rule Brazil 1989 only - Jan 29 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV98077.htm">98,077</a> (1989-08-21) # with the same exceptions Rule Brazil 1989 only - Oct 15 0:00 1:00 S Rule Brazil 1990 only - Feb 11 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV99530.htm">99,530</a> (1990-09-17) # adopted by RS, SC, PR, SP, RJ, ES, MG, GO, MS, DF. # Decree 99,629 (1990-10-19) adds BA, MT. Rule Brazil 1990 only - Oct 21 0:00 1:00 S Rule Brazil 1991 only - Feb 17 0:00 0 - # <a href="http://pcdsh01.on.br/HV1991.htm">Unnumbered decree</a> (1991-09-25) # adopted by RS, SC, PR, SP, RJ, ES, MG, BA, GO, MT, MS, DF. Rule Brazil 1991 only - Oct 20 0:00 1:00 S Rule Brazil 1992 only - Feb 9 0:00 0 - # <a href="http://pcdsh01.on.br/HV1992.htm">Unnumbered decree</a> (1992-10-16) # adopted by same states. Rule Brazil 1992 only - Oct 25 0:00 1:00 S Rule Brazil 1993 only - Jan 31 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV942.htm">942</a> (1993-09-28) # adopted by same states, plus AM. # Decree <a href="http://pcdsh01.on.br/HV1252.htm">1,252</a> (1994-09-22; # web page corrected 2004-01-07) adopted by same states, minus AM. # Decree <a href="http://pcdsh01.on.br/HV1636.htm">1,636</a> (1995-09-14) # adopted by same states, plus MT and TO. # Decree <a href="http://pcdsh01.on.br/HV1674.htm">1,674</a> (1995-10-13) # adds AL, SE. Rule Brazil 1993 1995 - Oct Sun>=11 0:00 1:00 S Rule Brazil 1994 1995 - Feb Sun>=15 0:00 0 - Rule Brazil 1996 only - Feb 11 0:00 0 - # Decree <a href="http://pcdsh01.on.br/HV2000.htm">2,000</a> (1996-09-04) # adopted by same states, minus AL, SE. Rule Brazil 1996 only - Oct 6 0:00 1:00 S Rule Brazil 1997 only - Feb 16 0:00 0 - # From Daniel C. Sobral (1998-02-12): # In 1997, the DS began on October 6. The stated reason was that # because international television networks ignored Brazil's policy on DS, # they bought the wrong times on satellite for coverage of Pope's visit. # This year, the ending date of DS was postponed to March 1 # to help dealing with the shortages of electric power. # # Decree 2,317 (1997-09-04), adopted by same states. Rule Brazil 1997 only - Oct 6 0:00 1:00 S # Decree <a href="http://pcdsh01.on.br/figuras/HV2495.JPG">2,495</a> # (1998-02-10) Rule Brazil 1998 only - Mar 1 0:00 0 - # Decree <a href="http://pcdsh01.on.br/figuras/Hv98.jpg">2,780</a> (1998-09-11) # adopted by the same states as before. Rule Brazil 1998 only - Oct 11 0:00 1:00 S Rule Brazil 1999 only - Feb 21 0:00 0 - # Decree <a href="http://pcdsh01.on.br/figuras/HV3150.gif">3,150</a> # (1999-08-23) adopted by same states. # Decree <a href="http://pcdsh01.on.br/DecHV99.gif">3,188</a> (1999-09-30) # adds SE, AL, PB, PE, RN, CE, PI, MA and RR. Rule Brazil 1999 only - Oct 3 0:00 1:00 S Rule Brazil 2000 only - Feb 27 0:00 0 - # Decree <a href="http://pcdsh01.on.br/DEC3592.htm">3,592</a> (2000-09-06) # adopted by the same states as before. # Decree <a href="http://pcdsh01.on.br/Dec3630.jpg">3,630</a> (2000-10-13) # repeals DST in PE and RR, effective 2000-10-15 00:00. # Decree <a href="http://pcdsh01.on.br/Dec3632.jpg">3,632</a> (2000-10-17) # repeals DST in SE, AL, PB, RN, CE, PI and MA, effective 2000-10-22 00:00. # Decree <a href="http://pcdsh01.on.br/figuras/HV3916.gif">3,916</a> # (2001-09-13) reestablishes DST in AL, CE, MA, PB, PE, PI, RN, SE. Rule Brazil 2000 2001 - Oct Sun>=8 0:00 1:00 S Rule Brazil 2001 2006 - Feb Sun>=15 0:00 0 - # Decree 4,399 (2002-10-01) repeals DST in AL, CE, MA, PB, PE, PI, RN, SE. # <a href="http://www.presidencia.gov.br/CCIVIL/decreto/2002/D4399.htm">4,399</a> Rule Brazil 2002 only - Nov 3 0:00 1:00 S # Decree 4,844 (2003-09-24; corrected 2003-09-26) repeals DST in BA, MT, TO. # <a href="http://www.presidencia.gov.br/CCIVIL/decreto/2003/D4844.htm">4,844</a> Rule Brazil 2003 only - Oct 19 0:00 1:00 S # Decree 5,223 (2004-10-01) reestablishes DST in MT. # <a href="http://www.planalto.gov.br/ccivil_03/_Ato2004-2006/2004/Decreto/D5223.htm">5,223</a> Rule Brazil 2004 only - Nov 2 0:00 1:00 S # Decree <a href="http://pcdsh01.on.br/DecHV5539.gif">5,539</a> (2005-09-19), # adopted by the same states as before. Rule Brazil 2005 only - Oct 16 0:00 1:00 S # Decree <a href="http://pcdsh01.on.br/DecHV5920.gif">5,920</a> (2006-10-03), # adopted by the same states as before. Rule Brazil 2006 only - Nov 5 0:00 1:00 S Rule Brazil 2007 only - Feb 25 0:00 0 - # Decree <a href="http://pcdsh01.on.br/DecHV6212.gif">6,212</a> (2007-09-26), # adopted by the same states as before. Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S # From Frederico A. C. Neves (2008-09-10): # Acording to this decree # <a href="http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm"> # http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm # </a> # [t]he DST period in Brazil now on will be from the 3rd Oct Sunday to the # 3rd Feb Sunday. There is an exception on the return date when this is # the Carnival Sunday then the return date will be the next Sunday... Rule Brazil 2008 max - Oct Sun>=15 0:00 1:00 S Rule Brazil 2008 2011 - Feb Sun>=15 0:00 0 - Rule Brazil 2012 only - Feb Sun>=22 0:00 0 - Rule Brazil 2013 2014 - Feb Sun>=15 0:00 0 - Rule Brazil 2015 only - Feb Sun>=22 0:00 0 - Rule Brazil 2016 2022 - Feb Sun>=15 0:00 0 - Rule Brazil 2023 only - Feb Sun>=22 0:00 0 - Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 - Rule Brazil 2026 only - Feb Sun>=22 0:00 0 - Rule Brazil 2027 2033 - Feb Sun>=15 0:00 0 - Rule Brazil 2034 only - Feb Sun>=22 0:00 0 - Rule Brazil 2035 2036 - Feb Sun>=15 0:00 0 - Rule Brazil 2037 only - Feb Sun>=22 0:00 0 - # From Arthur David Olson (2008-09-29): # The next is wrong in some years but is better than nothing. Rule Brazil 2038 max - Feb Sun>=15 0:00 0 - # The latest ruleset listed above says that the following states observe DST: # DF, ES, GO, MG, MS, MT, PR, RJ, RS, SC, SP. # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Fernando de Noronha (administratively part of PE) Zone America/Noronha -2:09:40 - LMT 1914 -2:00 Brazil FN%sT 1990 Sep 17 -2:00 - FNT 1999 Sep 30 -2:00 Brazil FN%sT 2000 Oct 15 -2:00 - FNT 2001 Sep 13 -2:00 Brazil FN%sT 2002 Oct 1 -2:00 - FNT # Other Atlantic islands have no permanent settlement. # These include Trindade and Martin Vaz (administratively part of ES), # Atol das Rocas (RN), and Penedos de Sao Pedro e Sao Paulo (PE). # Fernando de Noronha was a separate territory from 1942-09-02 to 1989-01-01; # it also included the Penedos. # # Amapa (AP), east Para (PA) # East Para includes Belem, Maraba, Serra Norte, and Sao Felix do Xingu. # The division between east and west Para is the river Xingu. # In the north a very small part from the river Javary (now Jari I guess, # the border with Amapa) to the Amazon, then to the Xingu. Zone America/Belem -3:13:56 - LMT 1914 -3:00 Brazil BR%sT 1988 Sep 12 -3:00 - BRT # # west Para (PA) # West Para includes Altamira, Oribidos, Prainha, Oriximina, and Santarem. Zone America/Santarem -3:38:48 - LMT 1914 -4:00 Brazil AM%sT 1988 Sep 12 -4:00 - AMT 2008 Jun 24 00:00 -3:00 - BRT # # Maranhao (MA), Piaui (PI), Ceara (CE), Rio Grande do Norte (RN), # Paraiba (PB) Zone America/Fortaleza -2:34:00 - LMT 1914 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1999 Sep 30 -3:00 Brazil BR%sT 2000 Oct 22 -3:00 - BRT 2001 Sep 13 -3:00 Brazil BR%sT 2002 Oct 1 -3:00 - BRT # # Pernambuco (PE) (except Atlantic islands) Zone America/Recife -2:19:36 - LMT 1914 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1999 Sep 30 -3:00 Brazil BR%sT 2000 Oct 15 -3:00 - BRT 2001 Sep 13 -3:00 Brazil BR%sT 2002 Oct 1 -3:00 - BRT # # Tocantins (TO) Zone America/Araguaina -3:12:48 - LMT 1914 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1995 Sep 14 -3:00 Brazil BR%sT 2003 Sep 24 -3:00 - BRT 2012 Oct 21 -3:00 Brazil BR%sT # # Alagoas (AL), Sergipe (SE) Zone America/Maceio -2:22:52 - LMT 1914 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1995 Oct 13 -3:00 Brazil BR%sT 1996 Sep 4 -3:00 - BRT 1999 Sep 30 -3:00 Brazil BR%sT 2000 Oct 22 -3:00 - BRT 2001 Sep 13 -3:00 Brazil BR%sT 2002 Oct 1 -3:00 - BRT # # Bahia (BA) # There are too many Salvadors elsewhere, so use America/Bahia instead # of America/Salvador. Zone America/Bahia -2:34:04 - LMT 1914 -3:00 Brazil BR%sT 2003 Sep 24 -3:00 - BRT 2011 Oct 16 -3:00 Brazil BR%sT 2012 Oct 21 -3:00 - BRT # # Goias (GO), Distrito Federal (DF), Minas Gerais (MG), # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR), # Santa Catarina (SC), Rio Grande do Sul (RS) Zone America/Sao_Paulo -3:06:28 - LMT 1914 -3:00 Brazil BR%sT 1963 Oct 23 00:00 -3:00 1:00 BRST 1964 -3:00 Brazil BR%sT # # Mato Grosso do Sul (MS) Zone America/Campo_Grande -3:38:28 - LMT 1914 -4:00 Brazil AM%sT # # Mato Grosso (MT) Zone America/Cuiaba -3:44:20 - LMT 1914 -4:00 Brazil AM%sT 2003 Sep 24 -4:00 - AMT 2004 Oct 1 -4:00 Brazil AM%sT # # Rondonia (RO) Zone America/Porto_Velho -4:15:36 - LMT 1914 -4:00 Brazil AM%sT 1988 Sep 12 -4:00 - AMT # # Roraima (RR) Zone America/Boa_Vista -4:02:40 - LMT 1914 -4:00 Brazil AM%sT 1988 Sep 12 -4:00 - AMT 1999 Sep 30 -4:00 Brazil AM%sT 2000 Oct 15 -4:00 - AMT # # east Amazonas (AM): Boca do Acre, Jutai, Manaus, Floriano Peixoto # The great circle line from Tabatinga to Porto Acre divides # east from west Amazonas. Zone America/Manaus -4:00:04 - LMT 1914 -4:00 Brazil AM%sT 1988 Sep 12 -4:00 - AMT 1993 Sep 28 -4:00 Brazil AM%sT 1994 Sep 22 -4:00 - AMT # # west Amazonas (AM): Atalaia do Norte, Boca do Maoco, Benjamin Constant, # Eirunepe, Envira, Ipixuna Zone America/Eirunepe -4:39:28 - LMT 1914 -5:00 Brazil AC%sT 1988 Sep 12 -5:00 - ACT 1993 Sep 28 -5:00 Brazil AC%sT 1994 Sep 22 -5:00 - ACT 2008 Jun 24 00:00 -4:00 - AMT # # Acre (AC) Zone America/Rio_Branco -4:31:12 - LMT 1914 -5:00 Brazil AC%sT 1988 Sep 12 -5:00 - ACT 2008 Jun 24 00:00 -4:00 - AMT # Chile # From Eduardo Krell (1995-10-19): # The law says to switch to DST at midnight [24:00] on the second SATURDAY # of October.... The law is the same for March and October. # (1998-09-29): # Because of the drought this year, the government decided to go into # DST earlier (saturday 9/26 at 24:00). This is a one-time change only ... # (unless there's another dry season next year, I guess). # From Julio I. Pacheco Troncoso (1999-03-18): # Because of the same drought, the government decided to end DST later, # on April 3, (one-time change). # From Oscar van Vlijmen (2006-10-08): # http://www.horaoficial.cl/cambio.htm # From Jesper Norgaard Welen (2006-10-08): # I think that there are some obvious mistakes in the suggested link # from Oscar van Vlijmen,... for instance entry 66 says that GMT-4 # ended 1990-09-12 while entry 67 only begins GMT-3 at 1990-09-15 # (they should have been 1990-09-15 and 1990-09-16 respectively), but # anyhow it clears up some doubts too. # From Paul Eggert (2006-12-27): # The following data for Chile and America/Santiago are from # <http://www.horaoficial.cl/horaof.htm> (2006-09-20), transcribed by # Jesper Norgaard Welen. The data for Pacific/Easter are from Shanks # & Pottenger, except with DST transitions after 1932 cloned from # America/Santiago. The pre-1980 Pacific/Easter data are dubious, # but we have no other source. # From German Poo-Caaman~o (2008-03-03): # Due to drought, Chile extends Daylight Time in three weeks. This # is one-time change (Saturday 3/29 at 24:00 for America/Santiago # and Saturday 3/29 at 22:00 for Pacific/Easter) # The Supreme Decree is located at # <a href="http://www.shoa.cl/servicios/supremo316.pdf"> # http://www.shoa.cl/servicios/supremo316.pdf # </a> # and the instructions for 2008 are located in: # <a href="http://www.horaoficial.cl/cambio.htm"> # http://www.horaoficial.cl/cambio.htm # </a>. # From Jose Miguel Garrido (2008-03-05): # ... # You could see the announces of the change on # <a href="http://www.shoa.cl/noticias/2008/04hora/hora.htm"> # http://www.shoa.cl/noticias/2008/04hora/hora.htm # </a>. # From Angel Chiang (2010-03-04): # Subject: DST in Chile exceptionally extended to 3 April due to earthquake # <a href="http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098"> # http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098 # </a> # (in Spanish, last paragraph). # # This is breaking news. There should be more information available later. # From Arthur Daivd Olson (2010-03-06): # Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch. # From Glenn Eychaner (2011-03-02): [[email protected]] # It appears that the Chilean government has decided to postpone the # change from summer time to winter time again, by three weeks to April # 2nd: # <a href="http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651"> # http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651 # </a> # # This is not yet reflected in the offical "cambio de hora" site, but # probably will be soon: # <a href="http://www.horaoficial.cl/cambio.htm"> # http://www.horaoficial.cl/cambio.htm # </a> # From Arthur David Olson (2011-03-02): # The emol.com article mentions a water shortage as the cause of the # postponement, which may mean that it's not a permanent change. # From Glenn Eychaner (2011-03-28): # The article: # <a href="http://diario.elmercurio.com/2011/03/28/_portada/_portada/noticias/7565897A-CA86-49E6-9E03-660B21A4883E.htm?id=3D{7565897A-CA86-49E6-9E03-660B21A4883E}"> # http://diario.elmercurio.com/2011/03/28/_portada/_portada/noticias/7565897A-CA86-49E6-9E03-660B21A4883E.htm?id=3D{7565897A-CA86-49E6-9E03-660B21A4883E} # </a> # # In English: # Chile's clocks will go back an hour this year on the 7th of May instead # of this Saturday. They will go forward again the 3rd Saturday in # August, not in October as they have since 1968. This is a pilot plan # which will be reevaluated in 2012. # From Mauricio Parada (2012-02-22), translated by Glenn Eychaner (2012-02-23): # As stated in the website of the Chilean Energy Ministry # http://www.minenergia.cl/ministerio/noticias/generales/gobierno-anuncia-fechas-de-cambio-de.html # The Chilean Government has decided to postpone the entrance into winter time # (to leave DST) from March 11 2012 to April 28th 2012. The decision has not # been yet formalized but it will within the next days. # Quote from the website communication: # # 6. For the year 2012, the dates of entry into winter time will be as follows: # a. Saturday April 28, 2012, clocks should go back 60 minutes; that is, at # 23:59:59, instead of passing to 0:00, the time should be adjusted to be 23:00 # of the same day. # b. Saturday, September 1, 2012, clocks should go forward 60 minutes; that is, # at 23:59:59, instead of passing to 0:00, the time should be adjusted to be # 01:00 on September 2. # # Note that...this is yet another "temporary" change that will be reevaluated # AGAIN in 2013. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Chile 1927 1932 - Sep 1 0:00 1:00 S Rule Chile 1928 1932 - Apr 1 0:00 0 - Rule Chile 1942 only - Jun 1 4:00u 0 - Rule Chile 1942 only - Aug 1 5:00u 1:00 S Rule Chile 1946 only - Jul 15 4:00u 1:00 S Rule Chile 1946 only - Sep 1 3:00u 0:00 - Rule Chile 1947 only - Apr 1 4:00u 0 - Rule Chile 1968 only - Nov 3 4:00u 1:00 S Rule Chile 1969 only - Mar 30 3:00u 0 - Rule Chile 1969 only - Nov 23 4:00u 1:00 S Rule Chile 1970 only - Mar 29 3:00u 0 - Rule Chile 1971 only - Mar 14 3:00u 0 - Rule Chile 1970 1972 - Oct Sun>=9 4:00u 1:00 S Rule Chile 1972 1986 - Mar Sun>=9 3:00u 0 - Rule Chile 1973 only - Sep 30 4:00u 1:00 S Rule Chile 1974 1987 - Oct Sun>=9 4:00u 1:00 S Rule Chile 1987 only - Apr 12 3:00u 0 - Rule Chile 1988 1989 - Mar Sun>=9 3:00u 0 - Rule Chile 1988 only - Oct Sun>=1 4:00u 1:00 S Rule Chile 1989 only - Oct Sun>=9 4:00u 1:00 S Rule Chile 1990 only - Mar 18 3:00u 0 - Rule Chile 1990 only - Sep 16 4:00u 1:00 S Rule Chile 1991 1996 - Mar Sun>=9 3:00u 0 - Rule Chile 1991 1997 - Oct Sun>=9 4:00u 1:00 S Rule Chile 1997 only - Mar 30 3:00u 0 - Rule Chile 1998 only - Mar Sun>=9 3:00u 0 - Rule Chile 1998 only - Sep 27 4:00u 1:00 S Rule Chile 1999 only - Apr 4 3:00u 0 - Rule Chile 1999 2010 - Oct Sun>=9 4:00u 1:00 S Rule Chile 2000 2007 - Mar Sun>=9 3:00u 0 - # N.B.: the end of March 29 in Chile is March 30 in Universal time, # which is used below in specifying the transition. Rule Chile 2008 only - Mar 30 3:00u 0 - Rule Chile 2009 only - Mar Sun>=9 3:00u 0 - Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S Rule Chile 2012 only - Apr Sun>=23 3:00u 0 - Rule Chile 2012 only - Sep Sun>=2 4:00u 1:00 S Rule Chile 2013 max - Mar Sun>=9 3:00u 0 - Rule Chile 2013 max - Oct Sun>=9 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santiago -4:42:46 - LMT 1890 -4:42:46 - SMT 1910 # Santiago Mean Time -5:00 - CLT 1916 Jul 1 # Chile Time -4:42:46 - SMT 1918 Sep 1 # Santiago Mean Time -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time -4:00 Chile CL%sT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter I Time -6:00 Chile EAS%sT # # Sala y Gomez Island is like Pacific/Easter. # Other Chilean locations, including Juan Fernandez Is, San Ambrosio, # San Felix, and Antarctic bases, are like America/Santiago. # Colombia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule CO 1992 only - May 3 0:00 1:00 S Rule CO 1993 only - Apr 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Bogota -4:56:20 - LMT 1884 Mar 13 -4:56:20 - BMT 1914 Nov 23 # Bogota Mean Time -5:00 CO CO%sT # Colombia Time # Malpelo, Providencia, San Andres # no information; probably like America/Bogota # Curacao # # From Paul Eggert (2006-03-22): # Shanks & Pottenger say that The Bottom and Philipsburg have been at # -4:00 since standard time was introduced on 1912-03-02; and that # Kralendijk and Rincon used Kralendijk Mean Time (-4:33:08) from # 1912-02-02 to 1965-01-01. The former is dubious, since S&P also say # Saba Island has been like Curacao. # This all predates our 1970 cutoff, though. # # By July 2007 Curacao and St Maarten are planned to become # associated states within the Netherlands, much like Aruba; # Bonaire, Saba and St Eustatius would become directly part of the # Netherlands as Kingdom Islands. This won't affect their time zones # though, as far as we know. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Curacao -4:35:44 - LMT 1912 Feb 12 # Willemstad -4:30 - ANT 1965 # Netherlands Antilles Time -4:00 - AST # From Arthur David Olson (2011-06-15): # At least for now, use links for places with new iso3166 codes. # The name "Lower Prince's Quarter" is both longer than fourteen charaters # and contains an apostrophe; use "Lower_Princes" below. Link America/Curacao America/Lower_Princes # Sint Maarten Link America/Curacao America/Kralendijk # Bonaire, Sint Estatius and Saba # Ecuador # # From Paul Eggert (2007-03-04): # Apparently Ecuador had a failed experiment with DST in 1992. # <http://midena.gov.ec/content/view/1261/208/> (2007-02-27) and # <http://www.hoy.com.ec/NoticiaNue.asp?row_id=249856> (2006-11-06) both # talk about "hora Sixto". Leave this alone for now, as we have no data. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guayaquil -5:19:20 - LMT 1890 -5:14:00 - QMT 1931 # Quito Mean Time -5:00 - ECT # Ecuador Time Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno -5:00 - ECT 1986 -6:00 - GALT # Galapagos Time # Falklands # From Paul Eggert (2006-03-22): # Between 1990 and 2000 inclusive, Shanks & Pottenger and the IATA agree except # the IATA gives 1996-09-08. Go with Shanks & Pottenger. # From Falkland Islands Government Office, London (2001-01-22) # via Jesper Norgaard: # ... the clocks revert back to Local Mean Time at 2 am on Sunday 15 # April 2001 and advance one hour to summer time at 2 am on Sunday 2 # September. It is anticipated that the clocks will revert back at 2 # am on Sunday 21 April 2002 and advance to summer time at 2 am on # Sunday 1 September. # From Rives McDow (2001-02-13): # # I have communicated several times with people there, and the last # time I had communications that was helpful was in 1998. Here is # what was said then: # # "The general rule was that Stanley used daylight saving and the Camp # did not. However for various reasons many people in the Camp have # started to use daylight saving (known locally as 'Stanley Time') # There is no rule as to who uses daylight saving - it is a matter of # personal choice and so it is impossible to draw a map showing who # uses it and who does not. Any list would be out of date as soon as # it was produced. This year daylight saving ended on April 18/19th # and started again on September 12/13th. I do not know what the rule # is, but can find out if you like. We do not change at the same time # as UK or Chile." # # I did have in my notes that the rule was "Second Saturday in Sep at # 0:00 until third Saturday in Apr at 0:00". I think that this does # not agree in some cases with Shanks; is this true? # # Also, there is no mention in the list that some areas in the # Falklands do not use DST. I have found in my communications there # that these areas are on the western half of East Falkland and all of # West Falkland. Stanley is the only place that consistently observes # DST. Again, as in other places in the world, the farmers don't like # it. West Falkland is almost entirely sheep farmers. # # I know one lady there that keeps a list of which farm keeps DST and # which doesn't each year. She runs a shop in Stanley, and says that # the list changes each year. She uses it to communicate to her # customers, catching them when they are home for lunch or dinner. # From Paul Eggert (2001-03-05): # For now, we'll just record the time in Stanley, since we have no # better info. # From Steffen Thorsen (2011-04-01): # The Falkland Islands will not turn back clocks this winter, but stay on # daylight saving time. # # One source: # <a href="http://www.falklandnews.com/public/story.cfm?get=5914&source=3"> # http://www.falklandnews.com/public/story.cfm?get=5914&source=3 # </a> # # We have gotten this confirmed by a clerk of the legislative assembly: # Normally the clocks revert to Local Mean Time (UTC/GMT -4 hours) on the # third Sunday of April at 0200hrs and advance to Summer Time (UTC/GMT -3 # hours) on the first Sunday of September at 0200hrs. # # IMPORTANT NOTE: During 2011, on a trial basis, the Falkland Islands # will not revert to local mean time, but clocks will remain on Summer # time (UTC/GMT - 3 hours) throughout the whole of 2011. Any long term # change to local time following the trial period will be notified. # # From Andrew Newman (2012-02-24) # A letter from Justin McPhee, Chief Executive, # Cable & Wireless Falkland Islands (dated 2012-02-22) # states... # The current Atlantic/Stanley entry under South America expects the # clocks to go back to standard Falklands Time (FKT) on the 15th April. # The database entry states that in 2011 Stanley was staying on fixed # summer time on a trial basis only. FIG need to contact IANA and/or # the maintainers of the database to inform them we're adopting # the same policy this year and suggest recommendations for future years. # # For now we will assume permanent summer time for the Falklands # until advised differently (to apply for 2012 and beyond, after the 2011 # experiment was apparently successful.) # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 S Rule Falk 1938 1942 - Mar Sun>=19 0:00 0 - Rule Falk 1939 only - Oct 1 0:00 1:00 S Rule Falk 1940 1942 - Sep lastSun 0:00 1:00 S Rule Falk 1943 only - Jan 1 0:00 0 - Rule Falk 1983 only - Sep lastSun 0:00 1:00 S Rule Falk 1984 1985 - Apr lastSun 0:00 0 - Rule Falk 1984 only - Sep 16 0:00 1:00 S Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 S Rule Falk 1986 2000 - Apr Sun>=16 0:00 0 - Rule Falk 2001 2010 - Apr Sun>=15 2:00 0 - Rule Falk 2001 2010 - Sep Sun>=1 2:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Stanley -3:51:24 - LMT 1890 -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time -4:00 Falk FK%sT 1983 May # Falkland Is Time -3:00 Falk FK%sT 1985 Sep 15 -4:00 Falk FK%sT 2010 Sep 5 02:00 -3:00 - FKST # French Guiana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Cayenne -3:29:20 - LMT 1911 Jul -4:00 - GFT 1967 Oct # French Guiana Time -3:00 - GFT # Guyana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown -3:45 - GBGT 1966 May 26 # Br Guiana Time -3:45 - GYT 1975 Jul 31 # Guyana Time -3:00 - GYT 1991 # IATA SSIM (1996-06) says -4:00. Assume a 1991 switch. -4:00 - GYT # Paraguay # From Paul Eggert (2006-03-22): # Shanks & Pottenger say that spring transitions are from 01:00 -> 02:00, # and autumn transitions are from 00:00 -> 23:00. Go with pre-1999 # editions of Shanks, and with the IATA, who say transitions occur at 00:00. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Para 1975 1988 - Oct 1 0:00 1:00 S Rule Para 1975 1978 - Mar 1 0:00 0 - Rule Para 1979 1991 - Apr 1 0:00 0 - Rule Para 1989 only - Oct 22 0:00 1:00 S Rule Para 1990 only - Oct 1 0:00 1:00 S Rule Para 1991 only - Oct 6 0:00 1:00 S Rule Para 1992 only - Mar 1 0:00 0 - Rule Para 1992 only - Oct 5 0:00 1:00 S Rule Para 1993 only - Mar 31 0:00 0 - Rule Para 1993 1995 - Oct 1 0:00 1:00 S Rule Para 1994 1995 - Feb lastSun 0:00 0 - Rule Para 1996 only - Mar 1 0:00 0 - # IATA SSIM (2000-02) says 1999-10-10; ignore this for now. # From Steffen Thorsen (2000-10-02): # I have three independent reports that Paraguay changed to DST this Sunday # (10-01). # # Translated by Gwillim Law (2001-02-27) from # <a href="http://www.diarionoticias.com.py/011000/nacional/naciona1.htm"> # Noticias, a daily paper in Asuncion, Paraguay (2000-10-01) # </a>: # Starting at 0:00 today, the clock will be set forward 60 minutes, in # fulfillment of Decree No. 7,273 of the Executive Power.... The time change # system has been operating for several years. Formerly there was a separate # decree each year; the new law has the same effect, but permanently. Every # year, the time will change on the first Sunday of October; likewise, the # clock will be set back on the first Sunday of March. # Rule Para 1996 2001 - Oct Sun>=1 0:00 1:00 S # IATA SSIM (1997-09) says Mar 1; go with Shanks & Pottenger. Rule Para 1997 only - Feb lastSun 0:00 0 - # Shanks & Pottenger say 1999-02-28; IATA SSIM (1999-02) says 1999-02-27, but # (1999-09) reports no date; go with above sources and Gerd Knops (2001-02-27). Rule Para 1998 2001 - Mar Sun>=1 0:00 0 - # From Rives McDow (2002-02-28): # A decree was issued in Paraguay (no. 16350) on 2002-02-26 that changed the # dst method to be from the first Sunday in September to the first Sunday in # April. Rule Para 2002 2004 - Apr Sun>=1 0:00 0 - Rule Para 2002 2003 - Sep Sun>=1 0:00 1:00 S # # From Jesper Norgaard Welen (2005-01-02): # There are several sources that claim that Paraguay made # a timezone rule change in autumn 2004. # From Steffen Thorsen (2005-01-05): # Decree 1,867 (2004-03-05) # From Carlos Raul Perasso via Jesper Norgaard Welen (2006-10-13) # <http://www.presidencia.gov.py/decretos/D1867.pdf> Rule Para 2004 2009 - Oct Sun>=15 0:00 1:00 S Rule Para 2005 2009 - Mar Sun>=8 0:00 0 - # From Carlos Raul Perasso (2010-02-18): # By decree number 3958 issued yesterday ( # <a href="http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf"> # http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf # </a> # ) # Paraguay changes its DST schedule, postponing the March rule to April and # modifying the October date. The decree reads: # ... # Art. 1. It is hereby established that from the second Sunday of the month of # April of this year (2010), the official time is to be set back 60 minutes, # and that on the first Sunday of the month of October, it is to be set # forward 60 minutes, in all the territory of the Paraguayan Republic. # ... Rule Para 2010 max - Oct Sun>=1 0:00 1:00 S Rule Para 2010 max - Apr Sun>=8 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Asuncion -3:50:40 - LMT 1890 -3:50:40 - AMT 1931 Oct 10 # Asuncion Mean Time -4:00 - PYT 1972 Oct # Paraguay Time -3:00 - PYT 1974 Apr -4:00 Para PY%sT # Peru # # <a href="news:[email protected]"> # From Evelyn C. Leeper via Mark Brader (2003-10-26):</a> # When we were in Peru in 1985-1986, they apparently switched over # sometime between December 29 and January 3 while we were on the Amazon. # # From Paul Eggert (2006-03-22): # Shanks & Pottenger don't have this transition. Assume 1986 was like 1987. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Peru 1938 only - Jan 1 0:00 1:00 S Rule Peru 1938 only - Apr 1 0:00 0 - Rule Peru 1938 1939 - Sep lastSun 0:00 1:00 S Rule Peru 1939 1940 - Mar Sun>=24 0:00 0 - Rule Peru 1986 1987 - Jan 1 0:00 1:00 S Rule Peru 1986 1987 - Apr 1 0:00 0 - Rule Peru 1990 only - Jan 1 0:00 1:00 S Rule Peru 1990 only - Apr 1 0:00 0 - # IATA is ambiguous for 1993/1995; go with Shanks & Pottenger. Rule Peru 1994 only - Jan 1 0:00 1:00 S Rule Peru 1994 only - Apr 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Lima -5:08:12 - LMT 1890 -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time? -5:00 Peru PE%sT # Peru Time # South Georgia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken -2:00 - GST # South Georgia Time # South Sandwich Is # uninhabited; scientific personnel have wintered # Suriname # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Paramaribo -3:40:40 - LMT 1911 -3:40:52 - PMT 1935 # Paramaribo Mean Time -3:40:36 - PMT 1945 Oct # The capital moved? -3:30 - NEGT 1975 Nov 20 # Dutch Guiana Time -3:30 - SRT 1984 Oct # Suriname Time -3:00 - SRT # Trinidad and Tobago # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2 -4:00 - AST # Uruguay # From Paul Eggert (1993-11-18): # Uruguay wins the prize for the strangest peacetime manipulation of the rules. # From Shanks & Pottenger: # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Whitman gives 1923 Oct 1; go with Shanks & Pottenger. Rule Uruguay 1923 only - Oct 2 0:00 0:30 HS Rule Uruguay 1924 1926 - Apr 1 0:00 0 - Rule Uruguay 1924 1925 - Oct 1 0:00 0:30 HS Rule Uruguay 1933 1935 - Oct lastSun 0:00 0:30 HS # Shanks & Pottenger give 1935 Apr 1 0:00 & 1936 Mar 30 0:00; go with Whitman. Rule Uruguay 1934 1936 - Mar Sat>=25 23:30s 0 - Rule Uruguay 1936 only - Nov 1 0:00 0:30 HS Rule Uruguay 1937 1941 - Mar lastSun 0:00 0 - # Whitman gives 1937 Oct 3; go with Shanks & Pottenger. Rule Uruguay 1937 1940 - Oct lastSun 0:00 0:30 HS # Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13, # and 1943 Apr 13 ``to present time''; go with Shanks & Pottenger. Rule Uruguay 1941 only - Aug 1 0:00 0:30 HS Rule Uruguay 1942 only - Jan 1 0:00 0 - Rule Uruguay 1942 only - Dec 14 0:00 1:00 S Rule Uruguay 1943 only - Mar 14 0:00 0 - Rule Uruguay 1959 only - May 24 0:00 1:00 S Rule Uruguay 1959 only - Nov 15 0:00 0 - Rule Uruguay 1960 only - Jan 17 0:00 1:00 S Rule Uruguay 1960 only - Mar 6 0:00 0 - Rule Uruguay 1965 1967 - Apr Sun>=1 0:00 1:00 S Rule Uruguay 1965 only - Sep 26 0:00 0 - Rule Uruguay 1966 1967 - Oct 31 0:00 0 - Rule Uruguay 1968 1970 - May 27 0:00 0:30 HS Rule Uruguay 1968 1970 - Dec 2 0:00 0 - Rule Uruguay 1972 only - Apr 24 0:00 1:00 S Rule Uruguay 1972 only - Aug 15 0:00 0 - Rule Uruguay 1974 only - Mar 10 0:00 0:30 HS Rule Uruguay 1974 only - Dec 22 0:00 1:00 S Rule Uruguay 1976 only - Oct 1 0:00 0 - Rule Uruguay 1977 only - Dec 4 0:00 1:00 S Rule Uruguay 1978 only - Apr 1 0:00 0 - Rule Uruguay 1979 only - Oct 1 0:00 1:00 S Rule Uruguay 1980 only - May 1 0:00 0 - Rule Uruguay 1987 only - Dec 14 0:00 1:00 S Rule Uruguay 1988 only - Mar 14 0:00 0 - Rule Uruguay 1988 only - Dec 11 0:00 1:00 S Rule Uruguay 1989 only - Mar 12 0:00 0 - Rule Uruguay 1989 only - Oct 29 0:00 1:00 S # Shanks & Pottenger say no DST was observed in 1990/1 and 1991/2, # and that 1992/3's DST was from 10-25 to 03-01. Go with IATA. Rule Uruguay 1990 1992 - Mar Sun>=1 0:00 0 - Rule Uruguay 1990 1991 - Oct Sun>=21 0:00 1:00 S Rule Uruguay 1992 only - Oct 18 0:00 1:00 S Rule Uruguay 1993 only - Feb 28 0:00 0 - # From Eduardo Cota (2004-09-20): # The uruguayan government has decreed a change in the local time.... # http://www.presidencia.gub.uy/decretos/2004091502.htm Rule Uruguay 2004 only - Sep 19 0:00 1:00 S # From Steffen Thorsen (2005-03-11): # Uruguay's DST was scheduled to end on Sunday, 2005-03-13, but in order to # save energy ... it was postponed two weeks.... # http://www.presidencia.gub.uy/_Web/noticias/2005/03/2005031005.htm Rule Uruguay 2005 only - Mar 27 2:00 0 - # From Eduardo Cota (2005-09-27): # http://www.presidencia.gub.uy/_Web/decretos/2005/09/CM%20119_09%2009%202005_00001.PDF # This means that from 2005-10-09 at 02:00 local time, until 2006-03-12 at # 02:00 local time, official time in Uruguay will be at GMT -2. Rule Uruguay 2005 only - Oct 9 2:00 1:00 S Rule Uruguay 2006 only - Mar 12 2:00 0 - # From Jesper Norgaard Welen (2006-09-06): # http://www.presidencia.gub.uy/_web/decretos/2006/09/CM%20210_08%2006%202006_00001.PDF Rule Uruguay 2006 max - Oct Sun>=1 2:00 1:00 S Rule Uruguay 2007 max - Mar Sun>=8 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 -3:44:44 - MMT 1920 May 1 # Montevideo MT -3:30 Uruguay UY%sT 1942 Dec 14 # Uruguay Time -3:00 Uruguay UY%sT # Venezuela # # From John Stainforth (2007-11-28): # ... the change for Venezuela originally expected for 2007-12-31 has # been brought forward to 2007-12-09. The official announcement was # published today in the "Gaceta Oficial de la Republica Bolivariana # de Venezuela, numero 38.819" (official document for all laws or # resolution publication) # http://www.globovision.com/news.php?nid=72208 # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Caracas -4:27:44 - LMT 1890 -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time? -4:30 - VET 1965 # Venezuela Time -4:00 - VET 2007 Dec 9 03:00 -4:30 - VET
{ "pile_set_name": "Github" }
{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## Word 2 Vec" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "\n", "filename=\"C:/Users/Madhu/Desktop/\"\n", "data = pd.read_csv(filename+'sentences.csv')" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style>\n", " .dataframe thead tr:only-child th {\n", " text-align: right;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: left;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>SentenceId</th>\n", " <th>EpisodeId</th>\n", " <th>Season</th>\n", " <th>Episode</th>\n", " <th>Sentence</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>0</th>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>Pilot</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", " <td>2</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>Scene One</td>\n", " </tr>\n", " <tr>\n", " <th>2</th>\n", " <td>3</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>[Title: The Year 2030]</td>\n", " </tr>\n", " <tr>\n", " <th>3</th>\n", " <td>4</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>Narrator: Kids, I'm going to tell you an incre...</td>\n", " </tr>\n", " <tr>\n", " <th>4</th>\n", " <td>5</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>Son: Are we being punished for something?</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " SentenceId EpisodeId Season Episode \\\n", "0 1 1 1 1 \n", "1 2 1 1 1 \n", "2 3 1 1 1 \n", "3 4 1 1 1 \n", "4 5 1 1 1 \n", "\n", " Sentence \n", "0 Pilot \n", "1 Scene One \n", "2 [Title: The Year 2030] \n", "3 Narrator: Kids, I'm going to tell you an incre... \n", "4 Son: Are we being punished for something? " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data.head()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "df= data.loc[data['Season']==1]\n", "df=df.fillna(\"(\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [], "source": [ "df['Character']=\"\"\n", "for sen,id in zip(df[\"Sentence\"],df[\"SentenceId\"]):\n", " \n", " if \"[\" is sen[0] or \"(\" is sen[0] or \"Scene\" in sen[0:5] or \":\" not in sen:\n", " df = df.drop(df[df['Sentence']==sen].index)\n", " \n", " else:\n", " value=\"\"\n", " for c in sen:\n", " if c==\":\":\n", " df.set_value(id-1, 'Sentence', sen[len(value)+1:])\n", " break\n", " \n", " else:\n", " value+=c\n", " \n", " \n", " if \"(\" in value:\n", " index=value.index(\"(\")\n", " value=value[:index-1]\n", " \n", " value=value.lower() \n", " #df.loc[df['Sentence'] == sen,'Character']=sen #setting the values\n", " df.set_value(id-1, 'Character', value)\n", "\n", "#re arrange the order \n", "df = df[['SentenceId','EpisodeId','Season','Episode','Character','Sentence']]" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style>\n", " .dataframe thead tr:only-child th {\n", " text-align: right;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: left;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>SentenceId</th>\n", " <th>EpisodeId</th>\n", " <th>Season</th>\n", " <th>Episode</th>\n", " <th>Character</th>\n", " <th>Sentence</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>3</th>\n", " <td>4</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>narrator</td>\n", " <td>Kids, I'm going to tell you an incredible sto...</td>\n", " </tr>\n", " <tr>\n", " <th>4</th>\n", " <td>5</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>son</td>\n", " <td>Are we being punished for something?</td>\n", " </tr>\n", " <tr>\n", " <th>5</th>\n", " <td>6</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>narrator</td>\n", " <td>No</td>\n", " </tr>\n", " <tr>\n", " <th>6</th>\n", " <td>7</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>daughter</td>\n", " <td>Yeah, is this going to take a while?</td>\n", " </tr>\n", " <tr>\n", " <th>7</th>\n", " <td>8</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>narrator</td>\n", " <td>Yes. (Kids are annoyed) Twenty-five years ago...</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " SentenceId EpisodeId Season Episode Character \\\n", "3 4 1 1 1 narrator \n", "4 5 1 1 1 son \n", "5 6 1 1 1 narrator \n", "6 7 1 1 1 daughter \n", "7 8 1 1 1 narrator \n", "\n", " Sentence \n", "3 Kids, I'm going to tell you an incredible sto... \n", "4 Are we being punished for something? \n", "5 No \n", "6 Yeah, is this going to take a while? \n", "7 Yes. (Kids are annoyed) Twenty-five years ago... " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df[:5]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEqCAYAAAACibeEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8VVW5//HPFxBBUbxwMdgCXsFbEOGlMtPsgmbhJTWi\nkxfKXxaleSlPVh4xj2WevBZqeUHzgGiWnMIUEdTygoAIlqJIKCQIooKGSsDz+2OODYvNvk3de821\n4Pt+vdZrzTnmWGs9a6291zPHmGOOqYjAzMysudoUHYCZmVUXJw4zM8vFicPMzHJx4jAzs1ycOMzM\nLBcnDjMzy8WJw1qdpMGS5hYdR6WS9IKkjzSy/TFJXylnTC1NUgdJIakmrd8s6XvNfGzVv/9NjRPH\nJk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6Uf+DRrhmq87olbHFZ9JD0D7EaV7aWZbSqcOKzqSOpdX7mH45qVhxOHmZnl4rmqzMwsFycO\nMzPLxYnDzMxyceIwM7NcnDjMzCyX/w8lKRLmlCG05gAAAABJRU5ErkJggg==\n", "text/plain": [ "<matplotlib.figure.Figure at 0x20303168da0>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# for labeling in plotting\n", "def autolabel(rects):\n", " for rect in rects:\n", " height = rect.get_height()\n", " ax.text(rect.get_x() + rect.get_width()/2., 1.02*height,\n", " '%d' % int(height),\n", " ha='center', va='bottom')\n", "\n", "topchar=df.Character.value_counts()[:7]\n", "labels=np.array(topchar.keys())\n", "values=np.array(topchar)\n", "ind=np.arange(len(labels))\n", "\n", "fig,ax=plt.subplots()\n", "rects=ax.bar(ind,values,color='g')\n", "ax.set_xticklabels(labels,rotation='vertical')\n", "ax.set_xticks(ind)\n", "ax.set_ylabel(\"Count\")\n", "ax.set_title(\"Top characters with most dialogs\")\n", "autolabel(rects)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [], "source": [ "#pre processing the text \n", "import re\n", "def normalize_text(text):\n", "\n", " text=text.lower()\n", " text = re.sub('((www\\.[^\\s]+)|(https?://[^\\s]+)|(pic\\.twitter\\.com/[^\\s]+))','', text)\n", " text = re.sub('@[^\\s]+','', text)\n", " text = re.sub('#([^\\s]+)', '', text)\n", " text = re.sub('[:;>?<=*+()&,\\-#!$%\\{˜|\\}\\[^_\\\\@\\]1234567890’‘]',' ', text)\n", " text = re.sub('[\\d]','', text)\n", " text = text.replace(\".\", '')\n", " text = text.replace(\"'\", '')\n", " text = text.replace(\"`\", '')\n", " text = text.replace(\"'s\", '')\n", " text = text.replace(\"/\", ' ')\n", " text = text.replace(\"\\\"\", ' ')\n", " text = text.replace(\"\\\\\", '')\n", " re.sub(' +', ' ', text)\n", " text=text.replace('\\n', ' ').replace('\\r', ' ').replace('\\t', ' ')\n", " #normalize some utf8 encoding\n", " text = text.replace(\"\\x9d\",'').replace(\"\\x8c\",'')\n", " text = text.replace(\"\\xa0\",'')\n", " text = text.replace(\"\\x9d\\x92\", '').replace(\"\\x9a\\xaa\\xf0\\x9f\\x94\\xb5\", '').replace(\"\\xf0\\x9f\\x91\\x8d\\x87\\xba\\xf0\\x9f\\x87\\xb8\", '').replace(\"\\x9f\",'').replace(\"\\x91\\x8d\",'')\n", " text = text.replace(\"\\xf0\\x9f\\x87\\xba\\xf0\\x9f\\x87\\xb8\",'').replace(\"\\xf0\",'').replace('\\xf0x9f','').replace(\"\\x9f\\x91\\x8d\",'').replace(\"\\x87\\xba\\x87\\xb8\",'')\n", " text = text.replace(\"\\xe2\\x80\\x94\",'').replace(\"\\x9d\\xa4\",'').replace(\"\\x96\\x91\",'').replace(\"\\xe1\\x91\\xac\\xc9\\x8c\\xce\\x90\\xc8\\xbb\\xef\\xbb\\x89\\xd4\\xbc\\xef\\xbb\\x89\\xc5\\xa0\\xc5\\xa0\\xc2\\xb8\",'')\n", " text = text.replace(\"\\xe2\\x80\\x99s\", \"\").replace(\"\\xe2\\x80\\x98\", '').replace(\"\\xe2\\x80\\x99\", '').replace(\"\\xe2\\x80\\x9c\", \"\").replace(\"\\xe2\\x80\\x9d\", \"\")\n", " text = text.replace(\"\\xe2\\x82\\xac\", \"\").replace(\"\\xc2\\xa3\", \"\").replace(\"\\xc2\\xa0\", \"\").replace(\"\\xc2\\xab\", \"\").replace(\"\\xf0\\x9f\\x94\\xb4\", \"\").replace(\"\\xf0\\x9f\\x87\\xba\\xf0\\x9f\\x87\\xb8\\xf0\\x9f\", \"\")\n", " text = re.sub(r\"\\b[a-z]\\b\", \"\", text)\n", " text=re.sub( '\\s+', ' ', text).strip()\n", " \n", " text=re.sub(r'\\.+', \".\", text)\n", " text=re.sub(r'\\.\\.+', ' ', text).replace('.', '')\n", " # Replace multiple dots with space\n", " text = re.sub('\\.\\.+', ' ', text) \n", " # Remove single dots\n", " text = re.sub('\\.', '', text)\n", " text = re.sub(r'\\.{2,}', ' ', text)\n", " text = re.sub(r'\\.{1}', '', text)\n", " \n", " return text" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [], "source": [ "sentences=df[\"Sentence\"].tolist()\n", "normalized_sentences=[]\n", "for sentence in sentences:\n", " norm_sent=normalize_text(sentence)\n", " normalized_sentences.append(norm_sent)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Word count [('you', 2061), ('the', 1585), ('to', 1537), ('and', 1027), ('it', 839)]\n" ] } ], "source": [ "import collections\n", "# sentences to words and count\n", "words=\" \".join(normalized_sentences).split() \n", "count= collections.Counter(words).most_common() \n", "print (\"Word count\", count[:5])" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Build dictionaries\n", "unique_words = [i[0] for i in count]\n", "dic = {w: i for i, w in enumerate(unique_words)} #dic, word -> id cats:0 dogs:1 ......\n", "voc_size = len(dic)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "5057" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "voc_size" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Sample data [198, 8, 42, 2, 125, 0, 77, 839, 185, 1] ['kids', 'im', 'going', 'to', 'tell', 'you', 'an', 'incredible', 'story', 'the']\n" ] } ], "source": [ "# Make indexed word data\n", "data = [dic[word] for word in words] #count rank for every word in words\n", "print('Sample data', data[:10], words[:10])" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Context pairs rank ids [[[198, 42], 8], [[8, 2], 42], [[42, 125], 2], [[2, 0], 125], [[125, 77], 0]]\n", "\n", "Context pairs words [[['kids', 'going'], 'im'], [['im', 'to'], 'going'], [['going', 'tell'], 'to'], [['to', 'you'], 'tell'], [['tell', 'an'], 'you']]\n" ] } ], "source": [ "# Let's make a training data for window size 1 for simplicity\n", "\n", "cbow_pairs = []\n", "for i in range(1, len(data)-1) :\n", " cbow_pairs.append([[data[i-1], data[i+1]], data[i]]);\n", " \n", "print('Context pairs rank ids', cbow_pairs[:5])\n", "print()\n", "\n", "cbow_pairs_words = []\n", "for i in range(1, len(words)-1) :\n", " cbow_pairs_words.append([[words[i-1], words[i+1]], words[i]]);\n", "print('Context pairs words', cbow_pairs_words[:5])" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "skip-gram pairs [[8, 198], [8, 42], [42, 8], [42, 2], [2, 42]]\n", "\n", "skip-gram pairs words [['im', 'kids'], ['im', 'going'], ['going', 'im'], ['going', 'to'], ['to', 'going']]\n" ] } ], "source": [ "# Let's make skip-gram pairs\n", "# (quick, the), (quick, brown), (brown, quick), (brown, fox), ...\n", "skip_gram_pairs=[]\n", "\n", "for c in cbow_pairs:\n", " skip_gram_pairs.append([c[1],c[0][0]])\n", " skip_gram_pairs.append([c[1],c[0][1]])\n", "print('skip-gram pairs', skip_gram_pairs[:5])\n", "print()\n", "skip_gram_pairs_words=[]\n", "for c in cbow_pairs_words:\n", " skip_gram_pairs_words.append([c[1],c[0][0]])\n", " skip_gram_pairs_words.append([c[1],c[0][1]])\n", "print('skip-gram pairs words', skip_gram_pairs_words[:5])" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Batches (x, y) ([51, 15, 281], [[1347], [11], [106]])\n" ] } ], "source": [ "def get_batch(size):\n", " assert size<len(skip_gram_pairs)\n", " X=[]\n", " Y=[]\n", " rdm = np.random.choice(range(len(skip_gram_pairs)),size,replace=False)\n", " \n", " for r in rdm:\n", " X.append(skip_gram_pairs[r][0])\n", " Y.append([skip_gram_pairs[r][1]])\n", " return X , Y\n", "\n", "# generate_batch test\n", "print ('Batches (x, y)', get_batch(3))" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": true }, "outputs": [], "source": [ "#tensor flow code\n", "import tensorflow as tf\n", "\n", "batch_size = 20\n", "embedding_size = 2\n", "num_sampled = 15 # Number of negative examples to sample.\n", "\n", "X= tf.placeholder(tf.int32,shape=[batch_size]) #inputs\n", "Y= tf.placeholder(tf.int32,shape=[batch_size,1]) #labels\n", "\n", "with tf.device(\"/cpu:0\"):\n", " # Look up embeddings for inputs.\n", " embeddings = tf.Variable(tf.random_uniform([voc_size,embedding_size],-1.0,1.0))\n", " embed = tf.nn.embedding_lookup(embeddings, X) # lookup table\n", " \n", "# Construct the variables for the NCE loss\n", "nce_weights = tf.Variable(tf.random_uniform([voc_size, embedding_size],-1.0, 1.0))\n", "nce_biases = tf.Variable(tf.zeros([voc_size]))\n", "\n", "# Compute the average NCE loss for the batch.\n", "# This does the magic:\n", "# tf.nn.nce_loss(weights, biases, inputs, labels, num_sampled, num_classes ...)\n", "# It automatically draws negative samples when we evaluate the loss.\n", "loss = tf.reduce_mean(tf.nn.nce_loss(nce_weights, nce_biases, Y, embed, num_sampled, voc_size))\n", "# Use the adam optimizer\n", "optimizer = tf.train.AdamOptimizer(1e-1).minimize(loss)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Loss at 0 67.6239\n", "Loss at 1000 27.5269\n", "Loss at 2000 11.6259\n", "Loss at 3000 8.19029\n", "Loss at 4000 4.84377\n", "Loss at 5000 5.21787\n", "Loss at 6000 5.9497\n", "Loss at 7000 5.17859\n", "Loss at 8000 7.05449\n", "Loss at 9000 4.89466\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/A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Pgn+Iqersrt4XkYeBOcBfNcA8W1U94fnbJCJluH8Cx8x//BC0QT1w42XLY4AT\noath3+ru+we5jbjuA0GI6T4AXbeBiDSKyChVbRCRUUBTgG14+0GtiFQAmUBIgr8N+4SRiNwDrAbm\nqWpbgHWSRGSw9zXwN9wXyOJCMG0A7AcmiMg4ERkILAZCOtMhmsV7HwhSvPeB7cDDntcPA1f9GhKR\noSKS4Hk9HJgJHAxVBSz4h9dmYDDun/HfiEgJgIjcICI7PeuMBPaKyLfAPuBDVf0oMtXtE922geeC\n8D+B3cAh4F1VrYlUhUNJROaLSD0wA/hQRHZ7yh3TB4Jpg3juAx7PA3eJyBHgLs8yIjJVRF7zrDMR\nqPL0g3LgeVUNWfC3O3yNMcaB7MzfGGMcyIK/McY4kAV/Y4xxIAv+xhjjQBb8jTHGgSz4G2OMA1nw\nN8YYB7Lgb4wxDvR/Z5RXJU0Q9egAAAAASUVORK5CYII=\n", "text/plain": [ "<matplotlib.figure.Figure at 0x2030ac33da0>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "epochs=10000\n", "with tf.Session() as sess:\n", " sess.run(tf.global_variables_initializer())\n", " \n", " for epoch in range(epochs):\n", " \n", " batch_inputs, batch_labels = get_batch(batch_size)\n", " _,loss_val=sess.run([optimizer,loss],feed_dict = {X : batch_inputs, Y : batch_labels })\n", " \n", " if epoch % 1000 == 0:\n", " print(\"Loss at \", epoch, loss_val) # Report the loss\n", " \n", " # Final embeddings are ready for you to use. Need to normalize for practical use\n", " trained_embeddings = embeddings.eval()\n", " \n", "\n", "import matplotlib.pyplot as plt\n", "# Show word2vec if dim is 2\n", "if trained_embeddings.shape[1] == 2:\n", " labels = unique_words[:50] # Show top 10 words\n", " for i, label in enumerate(labels):\n", " x, y = trained_embeddings[i,:]\n", " plt.scatter(x, y)\n", " plt.annotate(label, xy=(x, y), xytext=(5, 2),\n", " textcoords='offset points', ha='right', va='bottom')\n", " #plt.savefig(\"word2vec.png\")\n", " plt.show()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcV1X++PHXEdkEBRVNXAo1V1YBd0GNDKfcl9Sx1HHU\nmUoz++qU42io1VhZ2jL9HJ1Em9HRcRe10USdcE0QREVco1Q0NYMEAVnO7w/gkygICJ8FPu/n48ED\nPodz733f68f353LuWZTWGiGEENalhrkDEEIIYXqS/IUQwgpJ8hdCCCskyV8IIayQJH8hhLBCkvyF\nEMIKSfIXQggrJMlfCCGskCR/IYSwQjXNHUBJ3NzctIeHh7nDEEKIKiUmJuam1rpBafUsNvl7eHgQ\nHR1t7jBEBTg7O5OWllbm+itWrCA6OprPPvuMsLAwnJ2dmT59uhEjFKL6UUp9X5Z60uwjKiQnJ8fc\nIQghHoEkfyuVlJRE27ZtmTBhAl5eXowePZrdu3fTvXt3WrVqxbfffsu3335Lt27d6NChA926dePM\nmTNA/h368OHD6d+/P8888wxXr14lODgYPz8/vLy8iIqKMhxn1qxZ+Pr60qVLF3788UcAIiIi6Ny5\nMx06dODpp582lAshTEeSvxU7f/48U6dOJT4+nsTERFavXs3+/ftZuHAh7777Lm3btuWbb74hNjaW\nefPm8ec//9mw7aFDh1i5ciV79uxh9erVhIaGEhcXx/Hjx/Hz8wMgPT2dLl26cPz4cYKDg1m2bBkA\nPXr04PDhw8TGxjJy5Ejef/99s5y/ENbMYtv8hfE1b94cb29vADw9PQkJCUEphbe3N0lJSaSmpjJ2\n7FjOnTuHUors7GzDtn369KFevXoAdOzYkfHjx5Odnc2gQYMMyd/Ozo5+/foBEBAQwNdffw3A5cuX\nGTFiBFevXuXu3bs0b97clKcthEDu/K2avb294ecaNWoYXteoUYOcnBxmz55N7969OXnyJBEREWRm\nZhrqOzk5GX4ODg7mm2++oUmTJrz44ot8+eWXANja2qKUA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6obW+UNpGkvyNQGv99MN+\nr5QaC/QDQnQJfW211skF368rpTaR/6dulfuPXgnX4jLQ7J7XTYHkyovQNEq7DmXch1W8J8qgWrwn\n4OHXQin1o1LKXWt9VSnlDlwvYR+F74uLSql9QAeg1OQvzT4mppTqC7wBDNBa3ymhjpNSqnbhz8Az\n5D8Iq1bKci2Ao0ArpVRzpZQdMBIoc4+G6sJa3hNlZC3via3A2IKfxwIP/FWklKqrlLIv+NkN6A4k\nlGXnkvxN7zOgNvl/tscppZYAKKUaK6V2FNR5DNivlDoOfAts11r/1zzhGlWp16LggfBkYCdwGviP\n1vqUuQI2BqXUYKXUZaArsF0ptbOg3OreE2W5FtbwniiwAOijlDoH9Cl4jVIqUCn1j4I67YDogvfF\nXmCB1rpMyV9G+AohhBWSO38hhLBCkvyFEMIKSfIXQggrJMlfCCGskCR/IYSwQpL8hRDCCknyF0II\nKyTJXwghrND/B9TATECCnMIPAAAAAElFTkSuQmCC\n", "text/plain": [ "<matplotlib.figure.Figure at 0x2030b56e198>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import matplotlib.pyplot as plt\n", "# Show word2vec if dim is 2\n", "if trained_embeddings.shape[1] == 2:\n", " labels = unique_words[30:60] # Show top 10 words\n", " for i, label in enumerate(labels):\n", " x, y = trained_embeddings[i,:]\n", " plt.scatter(x, y)\n", " plt.annotate(label, xy=(x, y), xytext=(5, 2),\n", " textcoords='offset points', ha='right', va='bottom')\n", " #plt.savefig(\"word2vec.png\")\n", " plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.0" } }, "nbformat": 4, "nbformat_minor": 2 }
{ "pile_set_name": "Github" }
--- name: 📝 android 插件 api 的 bug about: IXmPluginHostActivity 或 XmPluginHostApi 相关 --- before issue:(不用回答) ### APK 请使用最新版apk验证是否已经修复了此问题? ### Check 文档了吗? ### 是否尝试搜索issue? --- #### 环境 插件 model 是什么 使用的哪个方法 请分享设备或绑定设备到 346378191,方便复现问题。 #### 现象 简单明了地描述一下实际的现象。 #### 期望 简单明了地描述一下期望的表现。 #### 其他的上下文/日志/截图 提供更多的上下文,有日志或者截图更好。 #### 尝试过的解决办法 尝试过哪些操作?
{ "pile_set_name": "Github" }
/// /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// /// Auto-generated by Stone, do not modify. /// #import <Foundation/Foundation.h> #import "DBSerializableProtocol.h" @class DBFILEPROPERTIESPropertyGroup; @class DBFILESCommitInfo; @class DBFILESWriteMode; NS_ASSUME_NONNULL_BEGIN #pragma mark - API Object /// /// The `CommitInfo` struct. /// /// This class implements the `DBSerializable` protocol (serialize and /// deserialize instance methods), which is required for all Obj-C SDK API route /// objects. /// @interface DBFILESCommitInfo : NSObject <DBSerializable, NSCopying> #pragma mark - Instance fields /// Path in the user's Dropbox to save the file. @property (nonatomic, readonly, copy) NSString *path; /// Selects what to do if the file already exists. @property (nonatomic, readonly) DBFILESWriteMode *mode; /// If there's a conflict, as determined by mode, have the Dropbox server try to /// autorename the file to avoid conflict. @property (nonatomic, readonly) NSNumber *autorename; /// The value to store as the clientModified timestamp. Dropbox automatically /// records the time at which the file was written to the Dropbox servers. It /// can also record an additional timestamp, provided by Dropbox desktop /// clients, mobile clients, and API apps of when the file was actually created /// or modified. @property (nonatomic, readonly, nullable) NSDate *clientModified; /// Normally, users are made aware of any file modifications in their Dropbox /// account via notifications in the client software. If true, this tells the /// clients that this modification shouldn't result in a user notification. @property (nonatomic, readonly) NSNumber *mute; /// List of custom properties to add to file. @property (nonatomic, readonly, nullable) NSArray<DBFILEPROPERTIESPropertyGroup *> *propertyGroups; /// Be more strict about how each WriteMode detects conflict. For example, /// always return a conflict error when mode = `update` in `DBFILESWriteMode` /// and the given "rev" doesn't match the existing file's "rev", even if the /// existing file has been deleted. @property (nonatomic, readonly) NSNumber *strictConflict; #pragma mark - Constructors /// /// Full constructor for the struct (exposes all instance variables). /// /// @param path Path in the user's Dropbox to save the file. /// @param mode Selects what to do if the file already exists. /// @param autorename If there's a conflict, as determined by mode, have the /// Dropbox server try to autorename the file to avoid conflict. /// @param clientModified The value to store as the clientModified timestamp. /// Dropbox automatically records the time at which the file was written to the /// Dropbox servers. It can also record an additional timestamp, provided by /// Dropbox desktop clients, mobile clients, and API apps of when the file was /// actually created or modified. /// @param mute Normally, users are made aware of any file modifications in /// their Dropbox account via notifications in the client software. If true, /// this tells the clients that this modification shouldn't result in a user /// notification. /// @param propertyGroups List of custom properties to add to file. /// @param strictConflict Be more strict about how each WriteMode detects /// conflict. For example, always return a conflict error when mode = `update` /// in `DBFILESWriteMode` and the given "rev" doesn't match the existing file's /// "rev", even if the existing file has been deleted. /// /// @return An initialized instance. /// - (instancetype)initWithPath:(NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups:(nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict; /// /// Convenience constructor (exposes only non-nullable instance variables with /// no default value). /// /// @param path Path in the user's Dropbox to save the file. /// /// @return An initialized instance. /// - (instancetype)initWithPath:(NSString *)path; - (instancetype)init NS_UNAVAILABLE; @end #pragma mark - Serializer Object /// /// The serialization class for the `CommitInfo` struct. /// @interface DBFILESCommitInfoSerializer : NSObject /// /// Serializes `DBFILESCommitInfo` instances. /// /// @param instance An instance of the `DBFILESCommitInfo` API object. /// /// @return A json-compatible dictionary representation of the /// `DBFILESCommitInfo` API object. /// + (nullable NSDictionary<NSString *, id> *)serialize:(DBFILESCommitInfo *)instance; /// /// Deserializes `DBFILESCommitInfo` instances. /// /// @param dict A json-compatible dictionary representation of the /// `DBFILESCommitInfo` API object. /// /// @return An instantiation of the `DBFILESCommitInfo` object. /// + (DBFILESCommitInfo *)deserialize:(NSDictionary<NSString *, id> *)dict; @end NS_ASSUME_NONNULL_END
{ "pile_set_name": "Github" }
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.06.11 at 10:33:54 AM PDT // package com.sun.identity.liberty.ws.common.jaxb.ac; /** * Java content class for KeySharingType complex type. * <p>The following schema fragment specifies the expected content contained within this java content object. (defined at file:/Users/allan/A-SVN/trunk/opensso/products/federation/library/xsd/liberty/lib-arch-authentication-context.xsd line 590) * <p> * <pre> * &lt;complexType name="KeySharingType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="sharing" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * */ public interface KeySharingType { /** * Gets the value of the sharing property. * */ boolean isSharing(); /** * Sets the value of the sharing property. * */ void setSharing(boolean value); }
{ "pile_set_name": "Github" }
/** * Copyright © 2019 同程艺龙 ([email protected]) * * 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.ly.train.flower.registry; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import com.ly.train.flower.common.core.config.FlowConfig; import com.ly.train.flower.common.logging.Logger; import com.ly.train.flower.common.logging.LoggerFactory; import com.ly.train.flower.common.util.StringUtil; import com.ly.train.flower.common.util.URL; import com.ly.train.flower.common.util.concurrent.NamedThreadFactory; import com.ly.train.flower.registry.config.ServiceInfo; /** * @author leeyazhou * */ public abstract class AbstractRegistry implements Registry { protected final Logger logger = LoggerFactory.getLogger(getClass()); protected final ConcurrentMap<String, ServiceInfo> serviceInfoCache = new ConcurrentHashMap<>(); protected final ConcurrentMap<String, FlowConfig> flowConfigCache = new ConcurrentHashMap<>(); private static final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("flower-registry")); protected final String infoRoot = "flower:info"; protected final String configRoot = "flower:config"; protected final URL url; public AbstractRegistry(URL url) { this.url = url; executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { try { doRegisterServiceInfos(); List<ServiceInfo> tt = doGetProvider(null); if (tt != null && !tt.isEmpty()) { for (ServiceInfo info : tt) { serviceInfoCache.put(info.getServiceMeta().getServiceClassName(), info); } } List<FlowConfig> t2 = doGetFlowConfig(null); if (t2 != null && !t2.isEmpty()) { for (FlowConfig info : t2) { if (StringUtil.isNotBlank(info.getFlowName())) { flowConfigCache.put(info.getFlowName(), info); } } } } catch (Exception e) { logger.error("", e); } } }, 5L, 3L, TimeUnit.SECONDS); } @Override public boolean register(ServiceInfo serviceInfo) { serviceInfoCache.putIfAbsent(serviceInfo.getServiceMeta().getServiceClassName(), serviceInfo); return doRegister(serviceInfo); } @Override public List<ServiceInfo> getProvider(ServiceInfo serviceInfo) { List<ServiceInfo> ret = doGetProvider(serviceInfo); if (ret != null) { for (ServiceInfo i : ret) { serviceInfoCache.put(i.getServiceMeta().getServiceClassName(), i); } } return new ArrayList<ServiceInfo>(serviceInfoCache.values()); } private void doRegisterServiceInfos() { for (Map.Entry<String, ServiceInfo> entry : serviceInfoCache.entrySet()) { doRegister(entry.getValue()); } } @Override public URL getUrl() { return url; } @Override public boolean registerFlowConfig(FlowConfig flowConfig) { flowConfigCache.put(flowConfig.getFlowName(), flowConfig); return doRegisterFlowConfig(flowConfig); } @Override public List<FlowConfig> getFlowConfig(FlowConfig flowConfig) { List<FlowConfig> ret = doGetFlowConfig(flowConfig); if (ret != null) { for (FlowConfig i : ret) { if (StringUtil.isNotBlank(i.getFlowName())) { flowConfigCache.put(i.getFlowName(), i); } } } return new ArrayList<FlowConfig>(flowConfigCache.values()); } public abstract boolean doRegister(ServiceInfo serviceInfo); public abstract List<ServiceInfo> doGetProvider(ServiceInfo serviceInfo); public abstract boolean doRegisterFlowConfig(FlowConfig flowConfig); public abstract List<FlowConfig> doGetFlowConfig(FlowConfig flowConfig); }
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!-- 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. --> <configuration> <property> <name>mapreduce.job.split.metainfo.maxsize</name> <value>-1</value> <description>The maximum permissible size of the split metainfo file. The JobTracker won't attempt to read split metainfo files bigger than the configured value. No limits if set to -1. </description> </property> <property> <name>mapreduce.map.maxattempts</name> <value>2</value> </property> <property> <name>mapreduce.map.output.compress</name> <value>true</value> <description>Compress map outputs</description> </property> <property> <name>mapreduce.map.output.compress.codec</name> <value>org.apache.hadoop.io.compress.SnappyCodec</value> <description>The compression codec to use for map outputs </description> </property> <property> <name>mapreduce.output.fileoutputformat.compress</name> <value>true</value> <description>Compress the output of a MapReduce job</description> </property> <property> <name>mapreduce.output.fileoutputformat.compress.codec</name> <value>org.apache.hadoop.io.compress.SnappyCodec</value> <description>The compression codec to use for job outputs </description> </property> <!-- <property> <name>mapreduce.output.fileoutputformat.compress.type</name> <value>BLOCK</value> <description>The compression type to use for job outputs</description> </property> --> <property> <name>mapreduce.job.max.split.locations</name> <value>2000</value> <description>No description</description> </property> <property> <name>dfs.replication</name> <value>2</value> <description>Block replication</description> </property> <!-- memory configuration for sandbox --> <property> <name>mapreduce.map.memory.mb</name> <value>384</value> </property> <property> <name>mapreduce.map.java.opts</name> <value>-Xmx350m</value> </property> <property> <name>mapreduce.task.io.sort.mb</name> <value>30</value> </property> <property> <name>mapreduce.reduce.memory.mb</name> <value>384</value> </property> <property> <name>mapreduce.reduce.java.opts</name> <value>-Xmx350m</value> </property> </configuration>
{ "pile_set_name": "Github" }
// Copyright (c) 2019 Uber Technologies, 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 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. import React from 'react'; import styled, {css} from 'styled-components'; import {media} from '../../styles'; const containerStyles = css` background: ${props => (props.isDark ? props.theme.darkBackgroundColor : 'white')}; color: ${props => (props.isDark ? 'white' : 'black')}; box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.1); border-radius: 4px; overflow: hidden; `; const VerticalContainer = styled.div` ${containerStyles} width: 576px; height: 475px; ${media.palm` width: 100%; height: auto; `}; `; const Content = styled.div` padding: ${props => props.theme.margins.medium}; ${media.palm` padding: ${props => props.theme.margins.small}; `}; `; const VerticalCardImage = styled.img` display: block; width: 100%; height: 320px; object-fit: cover; `; const Title = styled.div` display: flex; justify-content: flex-start; align-items: center; font-size: 16px; font-weight: 500; margin-bottom: 8px; `; const Description = styled.div` font-size: 14px; color: #888; margin-bottom: 8px; height: ${props => (props.size === 'small' ? '40px' : '80px')}; line-height: 1.5; `; export const VerticalCard = ({title, description, image, isDark}) => ( <VerticalContainer isDark={isDark}> <div> <VerticalCardImage src={image} /> </div> <Content> <Title>{title}</Title> <Description>{description}</Description> </Content> </VerticalContainer> );
{ "pile_set_name": "Github" }
using System; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; namespace Heavy.Web.Migrations { public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Albums", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Title = table.Column<string>(maxLength: 100, nullable: false), Artist = table.Column<string>(maxLength: 100, nullable: false), ReleaseDate = table.Column<DateTime>(type: "date", nullable: false), Price = table.Column<decimal>(type: "decimal(6,2)", nullable: false), CoverUrl = table.Column<string>(maxLength: 200, nullable: false) }, constraints: table => { table.PrimaryKey("PK_Albums", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Albums"); } } }
{ "pile_set_name": "Github" }
--- title: Payments sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-38/packages/expo-payments-stripe' --- import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; Expo includes support for payments through [Stripe](https://stripe.com/) and [Apple Pay](https://www.apple.com/apple-pay/) on iOS via ExpoKit, and Stripe on Android (plus Android Pay via ExpoKit). Need more help than what's on the page? The Payments module is largely based off [tipsi-stripe](https://github.com/tipsi/tipsi-stripe). The documentation and questions there may prove helpful. _Note_: (Android only) If you are using Expo client then the setup has already been done for you. ```js import { PaymentsStripe } from 'expo-payments-stripe'; ``` <PlatformsSection android ios simulator web={{ pending: 'https://github.com/expo/expo/issues/4046' }} /> ## Installation <InstallSection packageName="expo-payments-stripe" /> ## Compatibility The Payments module is currently only supported the bare workflow on iOS. If you have a managed workflow project, you'll need to [move to the bare workflow](../../bare/customizing/) in order to use this module on iOS. ## Setup If you haven't done payments with Stripe before, create an account with [Stripe](https://dashboard.stripe.com/register). After getting the account set up, navigate to the [Stripe API dashboard](https://dashboard.stripe.com/account/apikeys). Here, you'll need to make a note of the Publishable key and Secret key listed. ### Register hook in order to let Stripe process source authorization > You don't need to make this step if you're not going to use [sources](https://stripe.com/docs/mobile/ios/sources). For iOS, follow [Stripe instructions](https://stripe.com/docs/mobile/ios/sources#redirecting-your-customer). For Android, add the following code to your `AndroidManifest.xml`, replacing `your_scheme` with the URI scheme you're going to use when specifying return URL for payment process. ```xml ... <activity android:exported="true" android:launchMode="singleTask" android:name="expo.modules.payments.stripe.RedirectUriReceiver" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="your_scheme" /> </intent-filter> </activity> ... ``` Remember to use the same scheme as the one which was set in `Info.plist` file (only if you are also developing app for iOS). ## Importing Payments ```javascript import { PaymentsStripe as Stripe } from 'expo-payments-stripe'; ... Stripe.setOptionsAsync({ ... }); ... ``` ## Using the Payments SDK First, initialize the Payments module with your credentials: This `setOptionsAsync` method must put under the componentDidMount in android's production mode, unlike iOS that it works outside any component. ```javascript Stripe.setOptionsAsync({ publishableKey: 'PUBLISHABLE_KEY', // Your key androidPayMode: 'test', // [optional] used to set wallet environment (AndroidPay) merchantId: 'your_merchant_id', // [optional] used for payments with ApplePay }); ``` ### Creating token [Android, iOS] Creates token based on passed card params. **params** — An object with the following keys: | Key | Type | Description | | :-------------------- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | number (Required) | String | The card’s number | | expMonth (Required) | Number | The card’s expiration month | | expYear (Required) | Number | The card’s expiration year | | cvc | String | The card’s security code, found on the back | | name | String | The cardholder’s name | | addressLine1 | String | The first line of the billing address | | addressLine2 | String | The second line of the billing address | | addressCity | String | City of the billing address | | addressState | String | State of the billing address | | addressZip | String | Zip code of the billing address | | addressCountry | String | Country for the billing address | | brand (Android) | String | Brand of this card. Can be one of: **JCB ‖ American Express ‖ Visa ‖ Discover ‖ Diners Club ‖ MasterCard ‖ Unknown** | | last4 (Android) | String | last 4 digits of the card | | fingerprint (Android) | String | The card fingerprint | | funding (Android) | String | The funding type of the card. Can be one of: **debit ‖ credit ‖ prepaid ‖ unknown** | | country (Android) | String | ISO country code of the card itself | | currency | String | Three-letter ISO currency code representing the currency paid out to the bank account. This is only applicable when tokenizing debit cards to issue payouts to managed accounts. You should not set it otherwise. The card can then be used as a transfer destination for funds in this currency | ```js const params = { // mandatory number: '4242424242424242', expMonth: 11, expYear: 17, cvc: '223', // optional name: 'Test User', currency: 'usd', addressLine1: '123 Test Street', addressLine2: 'Apt. 5', addressCity: 'Test City', addressState: 'Test State', addressCountry: 'Test Country', addressZip: '55555', }; const token = await Stripe.createTokenWithCardAsync(params); // Client specific code // api.sendTokenToBackend(token) ``` > Remember to initialize the Payments module before creating token. ## Payment request with card form [Android, iOS] Launch `Add Card` view to accept payment. **options (iOS only)** — An object with the following keys: | Key | Type | Description | | :--------------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | | requiredBillingAddressFields | String | The billing address fields the user must fill out when prompted for their payment details. Can be one of: **full** or **zip** or not specify to disable | | prefilledInformation | Object | You can set this property to pre-fill any information you’ve already collected from your user | | managedAccountCurrency | String | Required to be able to add the card to an account (in all other cases, this parameter is not used). More info | | theme | Object | Can be used to visually style Stripe-provided UI | **options.prefilledInformation** — An object with the following keys: | Key | Type | Description | | :-------------: | :----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | shippingAddress | Object | The user’s shipping address. When set, the shipping address form will be filled with this address. The user will also have the option to fill their billing address using this address. | | billingAddress | Object | The user’s billing address. When set, the "add card" form will be filled with this address. The user will also have the option to fill their shipping address using this address. | **options.prefilledInformation.billingAddress** — An object with the following keys: | Key | Type | Description | | :--------- | :----- | :---------------------------------------------------------------------------------- | | name | String | The user’s full name (e.g. "Jane Doe") | | line1 | String | The first line of the user’s street address (e.g. "123 Fake St") | | line2 | String | The apartment, floor number, etc of the user’s street address (e.g. "Apartment 1A") | | city | String | The city in which the user resides (e.g. "San Francisco") | | state | String | The state in which the user resides (e.g. "CA") | | postalCode | String | The postal code in which the user resides (e.g. "90210") | | country | String | The ISO country code of the address (e.g. "US") | | phone | String | The phone number of the address (e.g. "8885551212") | | email | String | The email of the address (e.g. "[email protected]") | **options.theme** — An object with the following keys: | Key | Type | Description | | :----------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | primaryBackgroundColor | String | The primary background color of the theme | | secondaryBackgroundColor | String | The secondary background color of this theme | | primaryForegroundColor | String | The primary foreground color of this theme. This will be used as the text color for any important labels in a view with this theme (such as the text color for a text field that the user needs to fill out) | | secondaryForegroundColor | String | The secondary foreground color of this theme. This will be used as the text color for any supplementary labels in a view with this theme (such as the placeholder color for a text field that the user needs to fill out) | | accentColor | String | The accent color of this theme - it will be used for any buttons and other elements on a view that are important to highlight | | errorColor | String | The error color of this theme - it will be used for rendering any error messages or view | ### Example ```js const options = { requiredBillingAddressFields: 'full', prefilledInformation: { billingAddress: { name: 'Gunilla Haugeh', line1: 'Canary Place', line2: '3', city: 'Macon', state: 'Georgia', country: 'US', postalCode: '31217', }, }, }; const token = await stripe.paymentRequestWithCardFormAsync(options); // Client specific code // api.sendTokenToBackend(token) ``` ## Creating source [Android, iOS] Creates source object based on params. Sources are used to create payments for a variety of [payment methods](https://stripe.com/docs/sources) _NOTE_: For sources that require redirecting your customer to authorize the payment, you need to specify a return URL when you create the source. This allows your customer to be redirected back to your app after they authorize the payment. The prefix before ':' in your return URL should be the same as the scheme in your `info.plist` and `AndroidManifest.xml`. If You are not sure about this step look at above sections "Register hook in order to Stripe could process source authorization". _NOTE_: If you are using Expo client or an ejected Expo application, do not specify `returnURL`. `params` — An object with the following keys: **Depending on the type you need to provide different params. Check the STPSourceParams docs for reference** | Key | Type | Description | | :------------------ | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------- | | type (Required) | String | The type of the source to create. Can be one of: **bancontact ‖ bitcoin ‖ card ‖ griopay ‖ ideal ‖ sepaDebit ‖ sofort ‖ threeDSecure ‖ alipay** | | amount | Number | A positive number in the smallest currency unit representing the amount to charge the customer (e.g., 1099 for a €10.99 payment) | | name | String | The full name of the account holder | | returnURL | String | The URL the customer should be redirected to after they have successfully verified the payment | | statementDescriptor | String | A custom statement descriptor for the payment | | currency | String | The currency associated with the source. This is the currency for which the source will be chargeable once ready | | email | String | The customer’s email address | | bank | String | The customer’s bank | | iban | String | The IBAN number for the bank account you wish to debit | | addressLine1 | String | The bank account holder’s first address line (optional) | | city | String | The bank account holder’s city | | postalCode | String | The bank account holder’s postal code | | country | String | The bank account holder’s two-letter country code (sepaDebit) or the country code of the customer’s bank (sofort) | | card | String | The ID of the card source | ### Example ```js const params = { type: 'alipay', amount: 5, currency: 'EUR', returnURL: 'expaymentsstripe://stripe-redirect', }; const source = await stripe.createSourceWithParamsAsync(params); // Client specific code // api.sendSourceToBackend(source) ``` ## ApplePay [iOS] Remember: to use Apple Pay on a real device, you need to [set up apple pay first](#enabling-apple-pay-in-expokit). ### `openApplePaySetupAsync()` Opens the user interface to set up credit cards for Apple Pay. ### `canMakeApplePayPaymentsAsync([options]) -> Promise` Returns whether the user can make Apple Pay payments with specified options. If there are no configured payment cards, this method always returns `false`. Return `true` if the user can make Apple Pay payments through any of the specified networks; otherwise, `false`. **NOTE**: iOS Simulator always returns `true` ##### `options` | Key | Type | Description | | :------- | :------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | networks | Array[String] | Indicates whether the user can make Apple Pay payments through the specified network. Available networks: **american_express ‖ discover ‖ master_card ‖ visa**. If option does not specify we pass all available networks under the hood. | #### Example ```js import { PaymentsStripe as Stripe } from 'expo-payments-stripe'; await Stripe.canMakeApplePayPaymentsAsync(); ``` ```js import { PaymentsStripe as Stripe } from 'expo-payments-stripe'; await Stripe.canMakeApplePayPaymentsAsync(['american_express', 'discover']); ``` ### `deviceSupportsApplePayAsync() -> Promise` Returns whether the user can make Apple Pay payments. User may not be able to make payments for a variety of reasons. For example, this functionality may not be supported by their hardware, or it may be restricted by parental controls. Returns `true` if the device supports making payments; otherwise, `false`. _NOTE_: iOS Simulator always returns `true` ### `paymentRequestWithApplePayAsync(items, [options]) -> Promise` Launch the  Pay view to accept payment. ##### `items` — An array of object with the following keys: | Key | Type | Description | | :----- | :------- | :-------------------------------------------------------------------------- | | label | _String_ | A short, localized description of the item. | | amount | _String_ | The summary item’s amount. | | type | _String_ | The summary item’s type. Must be "pending" or "final". Defaults to "final". | **NOTE**: The final item should represent your company; it'll be prepended with the word "Pay" (i.e. "Pay Tipsi, Inc \$50") ##### `options` — An object with the following keys: | Key | Type | Description | | :---------------------------- | :------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | requiredBillingAddressFields | Array[String] | A bit field of billing address fields that you need in order to process the transaction. Array should contain one of: **all ‖ name ‖ email ‖ phone ‖ postal_address** or not specify to disable | | requiredShippingAddressFields | Array[String] | A bit field of shipping address fields that you need in order to process the transaction. Array should contain one of: **all ‖ name ‖ email ‖ phone ‖ postal_address** or not specify to disable | | shippingMethods | Array | An array of `shippingMethod` objects that describe the supported shipping methods. | | currencyCode | String | The three-letter ISO 4217 currency code. Default is **USD** | | countryCode | String | The two-letter code for the country where the payment will be processed. Default is **US** | | shippingType | String | An optional value that indicates how purchased items are to be shipped. Default is **shipping**. Available options are: **shipping ‖ delivery ‖ store_pickup ‖ service_pickup** | ##### `shippingMethod` — An object with the following keys: | Key | Type | Description | | :----- | :----- | :----------------------------------------------------------- | | id | String | A unique identifier for the shipping method, used by the app | | id | String | A short, localized description of the shipping method | | label | String | A unique identifier for the shipping method, used by the app | | detail | String | A user-readable description of the shipping method | | amount | String | The shipping method’s amount | #### Example ```js const items = [ { label: 'Whisky', amount: '50.00', }, { label: 'Tipsi, Inc', amount: '50.00', }, ]; const shippingMethods = [ { id: 'fedex', label: 'FedEX', detail: 'Test @ 10', amount: '10.00', }, ]; const options = { requiredBillingAddressFields: ['all'], requiredShippingAddressFields: ['phone', 'postal_address'], shippingMethods, }; const token = await stripe.paymentRequestWithApplePayAsync(items, options); ``` #### Token structure – `paymentRequestWithApplePayAsync` response `extra` — An object with the following keys | Key | Type | Description | | :-------------- | :----- | :--------------------------------- | | shippingMethod | Object | Selected shippingMethod object | | billingContact | Object | The user's billing contact object | | shippingContact | Object | The user's shipping contact object | `contact` — An object with the following keys | Key | Type | Description | | :----------------------- | :----- | :------------------------------------------------------- | | name | String | The contact’s name | | phoneNumber | String | The contact’s phone number | | emailAddress | String | The contact’s email address | | street | String | The street name in a postal address | | city | String | The city name in a postal address | | state | String | The state name in a postal address | | country | String | The country name in a postal address | | ISOCountryCode | String | The ISO country code for the country in a postal address | | postalCode | String | The postal code in a postal address | | supplementarySubLocality | String | The contact’s sublocality | ### `completeApplePayRequestAsync()/cancelApplePayRequestAsync() -> Promise` After `paymentRequestWithApplePayAsync` you should complete the operation by calling `completeApplePayRequestAsync` or cancel if an error occurred. This closes Apple Pay. (resolves to undefined, you do not need to store the Promise) ```js const items = [ { label: 'Whisky', amount: '50.00', }, { label: 'Tipsi, Inc', amount: '50.00', }, ]; const shippingMethods = [ { id: 'fedex', label: 'FedEX', detail: 'Test @ 10', amount: '10.00', }, ]; const options = { requiredBillingAddressFields: 'all', requiredShippingAddressFields: 'all', shippingMethods, }; try { const token = await stripe.paymentRequestWithApplePayAsync(items, options); // Client specific code // api.sendTokenToBackend(token) // You should complete the operation by calling stripe.completeApplePayRequestAsync(); } catch (error) { // Or cancel if an error occurred // stripe.cancelApplePayRequestAsync() } ``` ## AndroidPay Android Pay (also known as Google Pay) is currently only supported on ExpoKit apps. To add it to your app, add the following lines to your `AndroidManifest.xml` file, inside of the `<application>....</applicaton>` tags: ```xml <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" /> ``` ### `deviceSupportsAndroidPayAsync() -> Promise` Indicates whether or not the device supports AndroidPay. Returns a `Boolean` value. ```js import { PaymentsStripe as Stripe } from 'expo-payments-stripe'; await Stripe.deviceSupportsAndroidPayAsync(); ``` ### `canMakeAndroidPayPaymentsAsync() -> Promise` Indicates whether or not the device supports AndroidPay and user has existing payment method. Returns a `Boolean` value. ```js import { PaymentsStripe as Stripe } from 'expo-payments-stripe'; await Stripe.canMakeAndroidPayPaymentsAsync(); ``` ### `paymentRequestWithAndroidPayAsync(options) -> Promise` **options** — An object with the following keys: | Key | Type | Description | | :---------------------------------------- | :----- | :------------------------------------------------------------------------------------ | | total_price | String | Total price for items | | currency_code | String | Three-letter ISO currency code representing the currency paid out to the bank account | | shipping_address_required&nbsp;(Optional) | Bool | Is shipping address menu required? Default is **false** | | billing_address_required&nbsp;(Optional) | Bool | Is billing address menu required? Default is **false** | | line_items | Array | Array of purchased items. Each item contains **line_item** | **line_item** — An object with the following keys: | Key | Type | Description | | :------------ | :----- | :---------------------------------------- | | currency_code | String | Currency code string | | description | String | Short description that will shown to user | | total_price | String | Total order price | | unit_price | String | Price per unit | | quantity | String | Number of items | #### Example ```js const options = { total_price: '80.00', currency_code: 'USD', shipping_address_required: false, billing_address_required: true, shipping_countries: ['US', 'CA'], line_items: [ { currency_code: 'USD', description: 'Whisky', total_price: '50.00', unit_price: '50.00', quantity: '1', }, { currency_code: 'USD', description: 'Vine', total_price: '30.00', unit_price: '30.00', quantity: '1', }, ], }; const token = await stripe.paymentRequestWithAndroidPayAsync(options); // Client specific code // api.sendTokenToBackend(token) ``` Example of token: ``` { card: { currency: null, fingerprint: null, funding: "credit", brand: "MasterCard", number: null, addressState: null, country: "US", cvc: null, expMonth: 12, addressLine1: null, expYear: 2022, addressCountry: null, name: null, last4: "4448", addressLine2: null, addressCity: null, addressZip: null }, created: 1512322244000, used: false, extra: { email: "[email protected]", billingContact: { postalCode: "220019", name: "John Doe", locality: "NY", countryCode: "US", administrativeArea: "US", address1: "Time square 1/11" }, shippingContact: {} }, livemode: false, tokenId: "tok_1BV1IeDZwqOES60ZphBXBoDr" } ``` ## Structures of the objects ### The Token object A `token object` returned from submitting payment details to the Stripe API via: - `paymentRequestWithApplePayAsync` - `paymentRequestWithCardFormAsync` - `createTokenWithCardAsync` ##### `token` — an object with the following keys | Key | Type | Description | | :---------- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------- | | tokenId | String | The value of the token. You can store this value on your server and use it to make charges and customers | | created | Number | When the token was created | | livemode | Number | Whether or not this token was created in livemode. Will be 1 if you used your Live Publishable Key, and 0 if you used your Test Publishable Key | | card | Object | The credit card details object that were used to create the token | | bankAccount | Object | The external (bank) account details object that were used to create the token | | extra | Object | An additional information that method can provide | ##### `card` — an object with the following keys | Key | Type | Description | | :------------------------ | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | cardId | String | The Stripe ID for the card | | brand | String | The card’s brand. Can be one of: **JCB **‖ **American Express **‖ **Visa **‖ **Discover **‖ **Diners Club **‖ **MasterCard **‖ **Unknown** | | funding (iOS) | String | The card’s funding. Can be one of: **debit **‖ **credit **‖ **prepaid **‖ **unknown** | | last4 | String | The last 4 digits of the card | | dynamicLast4&nbsp;(iOS) | String | For cards made with Apple Pay, this refers to the last 4 digits of the Device Account Number for the tokenized card | | isApplePayCard&nbsp;(iOS) | Bool | Whether or not the card originated from Apple Pay | | expMonth | Number | The card’s expiration month. 1-indexed (i.e. 1 == January) | | expYear | Number | The card’s expiration year | | country | String | Two-letter ISO code representing the issuing country of the card | | currency | String | This is only applicable when tokenizing debit cards to issue payouts to managed accounts. The card can then be used as a transfer destination for funds in this currency | | name | String | The cardholder’s name | | addressLine1 | String | The cardholder’s first address line | | addressLine2 | String | The cardholder’s second address line | | addressCity | String | The cardholder’s city | | addressState | String | The cardholder’s state | | addressCountry | String | The cardholder’s country | | addressZip | String | The cardholder’s zip code | ##### `bankAccount` | Key | Type | Description | | :---------------- | :----- | :----------------------------------------------------------------- | | routingNumber | String | The routing number of this account | | accountNumber | String | The account number for this BankAccount. | | countryCode | String | The two-letter country code that this account was created in | | currency | String | The currency of this account | | accountHolderName | String | The account holder's name | | accountHolderType | String | the bank account type. Can be one of: **company **‖ **individual** | | fingerprint | String | The account fingerprint | | bankName | String | The name of bank | | last4 | String | The last four digits of the account number | #### Example ```js { tokenId: 'tok_19GCAQI5NuVQgnjeKNE32K0p', created: 1479236426, livemode: 0, card: { cardId: 'card_19GCAQI5NuVQgnjeRZizG4U3', brand: 'Visa', funding: 'credit', last4: '4242', expMonth: 4, expYear: 2024, country: 'US', name: 'Eugene Grissom', addressLine1: 'Green Street', addressLine2: '3380', addressCity: 'Nashville', addressState: 'Tennessee', addressCountry: 'US', addressZip: '37211', }, bankAccount: { bankName: 'STRIPE TEST BANK', accountHolderType: 'company', last4: '6789', accountHolderName: 'Test holder name', currency: 'usd', fingerprint: 'afghsajhaartkjasd', countryCode: 'US', accountNumber: '424542424', routingNumber: '110000000', }, } ``` ### The Source object A source object returned from creating a source (via `createSourceWithParamsAsync`) with the Stripe API. ##### `source` — an object with the following keys: | Key | Type | Description | | :--------------- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | | amount | Number | The amount associated with the source | | clientSecret | String | The client secret of the source. Used for client-side polling using a publishable key | | created | Number | When the source was created | | currency | String | The currency associated with the source | | flow | String | The authentication flow of the source. Can be one of: **none ‖ redirect ‖ verification ‖ receiver ‖ unknown** | | livemode | Bool | Whether or not this source was created in _livemode_. Will be _true_ if you used your Live Publishable Key, and _false_ if you used your Test Publishable Key | | metadata | Object | A set of key/value pairs associated with the source object | | owner | Object | Information about the owner of the payment instrument | | receiver | Object (Optional) | Information related to the receiver flow. Present if the source is a receiver | | redirect | Object (Optional) | Information related to the redirect flow. Present if the source is authenticated by a redirect | | status | String | The status of the source. Can be one of: **pending ‖ chargable ‖ consumed ‖ cancelled ‖ failed** | | type | String | The type of the source. Can be one of: **bancontact ‖ card ‖ griopay ‖ ideal ‖ sepaDebit ‖ sofort ‖ threeDSecure ‖ alipay ‖ unknown** | | usage | String | Whether this source should be reusable or not. Can be one of: **reusable ‖ single ‖ unknown** | | verification | Object (Optional) | Information related to the verification flow. Present if the source is authenticated by a verification | | details | Object | Information about the source specific to its type | | cardDetails | Object (Optional) | If this is a card source, this property contains information about the card | | sepaDebitDetails | Object (Optional) | If this is a SEPA Debit source, this property contains information about the sepaDebit | ##### `owner` | Key | Type | Description | | :-------------- | :---------------- | :----------------------------- | | address | Object (Optional) | Owner’s address | | email | String (Optional) | Owner’s email address | | name | String (Optional) | Owner’s full name | | phone | String (Optional) | Owner’s phone number | | verifiedAddress | Object (Optional) | Verified owner’s address | | verifiedEmail | String (Optional) | Verified owner’s email address | | verifiedName | String (Optional) | Verified owner’s full name | | verifiedPhone | String (Optional) | Verified owner’s phone number | ##### `receiver` | Key | Type | Description | | :------------- | :----- | :----------------------------------------------------------------------------------------------------------------------- | | address | Object | The address of the receiver source. This is the value that should be communicated to the customer to send their funds to | | amountCharged | Number | The total amount charged by you | | amountReceived | Number | The total amount received by the receiver source | | amountReturned | Number | The total amount that was returned to the customer | ##### `redirect` | Key | Type | Description | | :-------- | :----- | :------------------------------------------------------------------------------------------ | | returnURL | String | The URL you provide to redirect the customer to after they authenticated their payment | | status | String | The status of the redirect. Can be one of: **pending ‖ succeeded ‖ failed ‖ unknown** | | url | String | The URL provided to you to redirect a customer to as part of a redirect authentication flow | ##### `verification` | Key | Type | Description | | :---------------- | :----- | :------------------------------------------------------------------------------------------ | | attemptsRemaining | Number | The number of attempts remaining to authenticate the source object with a verification code | | status | String | The status of the verification. Can be one of: **pending ‖ succeeded ‖ failed ‖ unknown** | ##### `cardDetails` | Key | Type | Description | | :-------------- | :----- | :----------------------------------------------------------------------------------------------------------------------- | | last4 | String | The last 4 digits of the card | | expMonth | Number | The card’s expiration month. 1-indexed \(i.e. 1 == January\) | | expYear | Number | The card’s expiration year | | brand | String | The issuer of the card. Can be one of: **JCB ‖ American Express ‖ Visa ‖ Discover ‖ Diners Club ‖ MasterCard ‖ Unknown** | | funding \(iOS\) | String | The funding source for the card. Can be one of: **debit ‖ credit ‖ prepaid ‖ unknown** | | country | String | Two-letter ISO code representing the issuing country of the card | | threeDSecure | String | Whether 3D Secure is supported or required by the card. Can be one of: **required ‖ optional ‖ notSupported ‖ unknown** | ##### `sepaDebitDetails` | Key | Type | Description | | :--------------- | :----- | :--------------------------------------------------------------- | | last4 | String | The last 4 digits of the account number | | bankCode | String | The account’s bank code | | country | String | Two-letter ISO code representing the country of the bank account | | fingerprint | String | The account’s fingerprint | | mandateReference | String | The reference of the mandate accepted by your customer | | mandateURL | String | The details of the mandate accepted by your customer | # Example ```js { livemode: false, amount: 50, owner: {}, metadata: {}, clientSecret: 'src_client_secret_BLnXIZxZprDmdhw3zv12123L', details: { native_url: null, statement_descriptor: null }, type: 'alipay', redirect: { url: 'https://hooks.stripe.com/redirect/authenticate/src_1Az5vzE5aJKqY779Kes5s61m?client_secret=src_client_secret_BLnXIZxZprDmdhw3zv12123L', returnURL: 'example://stripe-redirect?redirect_merchant_name=example', status: 'succeeded' }, usage: 'single', created: 1504713563, flow: 'redirect', currency: 'euro', status: 'chargable', } ``` ## Enabling Apple Pay in ExpoKit If you want to use Apple Pay for payments, you'll need to set up your merchant ID in XCode first. Note that you do not need to go through this process to use the Payments module - you can still process payments with Stripe without going through the steps in this section. If you haven't already, set up an Apple Merchant ID via the [Apple Developer Portal](https://developer.apple.com/). Then, open the application in XCode and navigate to the capabilities tab. Enable Apple Pay and insert your merchant ID into the corresponding space. Note: Apple Pay can be used only for real world items (ex. appeal, car sharing, food) and not virtual goods. For more information about proper usage of Apple Pay, visit Apple's [Apple Pay guidelines](https://developer.apple.com/app-store/review/guidelines/#apple-pay) and [Acceptable Use](https://developer.apple.com/apple-pay/acceptable-use-guidelines-for-websites/).
{ "pile_set_name": "Github" }
'************************************************************************** ' 'Copyright (c) Microsoft Corporation. All rights reserved. 'THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 'ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 'IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 'PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. ' '************************************************************************** Imports Microsoft.VisualBasic Imports System Namespace Microsoft.Samples.VisualStudio.IDE.ToolWindow ''' <summary> ''' This class is used to expose the list of the IDs of the commands implemented ''' by the client package. This list of IDs must match the set of IDs defined inside the ''' BUTTONS section of the CTC file. ''' </summary> Friend Class PkgCmdId ' Define the list a set of public static members. Public Const cmdidPersistedWindow As Integer = &H2001 Public Const cmdidUiEventsWindow As Integer = &H2002 Public Const cmdidRefreshWindowsList As Integer = &H2003 ' Define the list of menus.(these include toolbars). Public Const IDM_MyToolbar As Integer = &H0101 End Class End Namespace
{ "pile_set_name": "Github" }
9
{ "pile_set_name": "Github" }
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. package language // NumCompactTags is the number of common tags. The maximum tag is // NumCompactTags-1. const NumCompactTags = 768 var specialTags = []Tag{ // 2 elements 0: {lang: 0xd7, region: 0x6e, script: 0x0, pVariant: 0x5, pExt: 0xe, str: "ca-ES-valencia"}, 1: {lang: 0x139, region: 0x135, script: 0x0, pVariant: 0x5, pExt: 0x5, str: "en-US-u-va-posix"}, } // Size: 72 bytes var coreTags = map[uint32]uint16{ 0x0: 0, // und 0x01600000: 3, // af 0x016000d2: 4, // af-NA 0x01600161: 5, // af-ZA 0x01c00000: 6, // agq 0x01c00052: 7, // agq-CM 0x02100000: 8, // ak 0x02100080: 9, // ak-GH 0x02700000: 10, // am 0x0270006f: 11, // am-ET 0x03a00000: 12, // ar 0x03a00001: 13, // ar-001 0x03a00023: 14, // ar-AE 0x03a00039: 15, // ar-BH 0x03a00062: 16, // ar-DJ 0x03a00067: 17, // ar-DZ 0x03a0006b: 18, // ar-EG 0x03a0006c: 19, // ar-EH 0x03a0006d: 20, // ar-ER 0x03a00097: 21, // ar-IL 0x03a0009b: 22, // ar-IQ 0x03a000a1: 23, // ar-JO 0x03a000a8: 24, // ar-KM 0x03a000ac: 25, // ar-KW 0x03a000b0: 26, // ar-LB 0x03a000b9: 27, // ar-LY 0x03a000ba: 28, // ar-MA 0x03a000c9: 29, // ar-MR 0x03a000e1: 30, // ar-OM 0x03a000ed: 31, // ar-PS 0x03a000f3: 32, // ar-QA 0x03a00108: 33, // ar-SA 0x03a0010b: 34, // ar-SD 0x03a00115: 35, // ar-SO 0x03a00117: 36, // ar-SS 0x03a0011c: 37, // ar-SY 0x03a00120: 38, // ar-TD 0x03a00128: 39, // ar-TN 0x03a0015e: 40, // ar-YE 0x04000000: 41, // ars 0x04300000: 42, // as 0x04300099: 43, // as-IN 0x04400000: 44, // asa 0x0440012f: 45, // asa-TZ 0x04800000: 46, // ast 0x0480006e: 47, // ast-ES 0x05800000: 48, // az 0x0581f000: 49, // az-Cyrl 0x0581f032: 50, // az-Cyrl-AZ 0x05857000: 51, // az-Latn 0x05857032: 52, // az-Latn-AZ 0x05e00000: 53, // bas 0x05e00052: 54, // bas-CM 0x07100000: 55, // be 0x07100047: 56, // be-BY 0x07500000: 57, // bem 0x07500162: 58, // bem-ZM 0x07900000: 59, // bez 0x0790012f: 60, // bez-TZ 0x07e00000: 61, // bg 0x07e00038: 62, // bg-BG 0x08200000: 63, // bh 0x0a000000: 64, // bm 0x0a0000c3: 65, // bm-ML 0x0a500000: 66, // bn 0x0a500035: 67, // bn-BD 0x0a500099: 68, // bn-IN 0x0a900000: 69, // bo 0x0a900053: 70, // bo-CN 0x0a900099: 71, // bo-IN 0x0b200000: 72, // br 0x0b200078: 73, // br-FR 0x0b500000: 74, // brx 0x0b500099: 75, // brx-IN 0x0b700000: 76, // bs 0x0b71f000: 77, // bs-Cyrl 0x0b71f033: 78, // bs-Cyrl-BA 0x0b757000: 79, // bs-Latn 0x0b757033: 80, // bs-Latn-BA 0x0d700000: 81, // ca 0x0d700022: 82, // ca-AD 0x0d70006e: 83, // ca-ES 0x0d700078: 84, // ca-FR 0x0d70009e: 85, // ca-IT 0x0db00000: 86, // ccp 0x0db00035: 87, // ccp-BD 0x0db00099: 88, // ccp-IN 0x0dc00000: 89, // ce 0x0dc00106: 90, // ce-RU 0x0df00000: 91, // cgg 0x0df00131: 92, // cgg-UG 0x0e500000: 93, // chr 0x0e500135: 94, // chr-US 0x0e900000: 95, // ckb 0x0e90009b: 96, // ckb-IQ 0x0e90009c: 97, // ckb-IR 0x0fa00000: 98, // cs 0x0fa0005e: 99, // cs-CZ 0x0fe00000: 100, // cu 0x0fe00106: 101, // cu-RU 0x10000000: 102, // cy 0x1000007b: 103, // cy-GB 0x10100000: 104, // da 0x10100063: 105, // da-DK 0x10100082: 106, // da-GL 0x10800000: 107, // dav 0x108000a4: 108, // dav-KE 0x10d00000: 109, // de 0x10d0002e: 110, // de-AT 0x10d00036: 111, // de-BE 0x10d0004e: 112, // de-CH 0x10d00060: 113, // de-DE 0x10d0009e: 114, // de-IT 0x10d000b2: 115, // de-LI 0x10d000b7: 116, // de-LU 0x11700000: 117, // dje 0x117000d4: 118, // dje-NE 0x11f00000: 119, // dsb 0x11f00060: 120, // dsb-DE 0x12400000: 121, // dua 0x12400052: 122, // dua-CM 0x12800000: 123, // dv 0x12b00000: 124, // dyo 0x12b00114: 125, // dyo-SN 0x12d00000: 126, // dz 0x12d00043: 127, // dz-BT 0x12f00000: 128, // ebu 0x12f000a4: 129, // ebu-KE 0x13000000: 130, // ee 0x13000080: 131, // ee-GH 0x13000122: 132, // ee-TG 0x13600000: 133, // el 0x1360005d: 134, // el-CY 0x13600087: 135, // el-GR 0x13900000: 136, // en 0x13900001: 137, // en-001 0x1390001a: 138, // en-150 0x13900025: 139, // en-AG 0x13900026: 140, // en-AI 0x1390002d: 141, // en-AS 0x1390002e: 142, // en-AT 0x1390002f: 143, // en-AU 0x13900034: 144, // en-BB 0x13900036: 145, // en-BE 0x1390003a: 146, // en-BI 0x1390003d: 147, // en-BM 0x13900042: 148, // en-BS 0x13900046: 149, // en-BW 0x13900048: 150, // en-BZ 0x13900049: 151, // en-CA 0x1390004a: 152, // en-CC 0x1390004e: 153, // en-CH 0x13900050: 154, // en-CK 0x13900052: 155, // en-CM 0x1390005c: 156, // en-CX 0x1390005d: 157, // en-CY 0x13900060: 158, // en-DE 0x13900061: 159, // en-DG 0x13900063: 160, // en-DK 0x13900064: 161, // en-DM 0x1390006d: 162, // en-ER 0x13900072: 163, // en-FI 0x13900073: 164, // en-FJ 0x13900074: 165, // en-FK 0x13900075: 166, // en-FM 0x1390007b: 167, // en-GB 0x1390007c: 168, // en-GD 0x1390007f: 169, // en-GG 0x13900080: 170, // en-GH 0x13900081: 171, // en-GI 0x13900083: 172, // en-GM 0x1390008a: 173, // en-GU 0x1390008c: 174, // en-GY 0x1390008d: 175, // en-HK 0x13900096: 176, // en-IE 0x13900097: 177, // en-IL 0x13900098: 178, // en-IM 0x13900099: 179, // en-IN 0x1390009a: 180, // en-IO 0x1390009f: 181, // en-JE 0x139000a0: 182, // en-JM 0x139000a4: 183, // en-KE 0x139000a7: 184, // en-KI 0x139000a9: 185, // en-KN 0x139000ad: 186, // en-KY 0x139000b1: 187, // en-LC 0x139000b4: 188, // en-LR 0x139000b5: 189, // en-LS 0x139000bf: 190, // en-MG 0x139000c0: 191, // en-MH 0x139000c6: 192, // en-MO 0x139000c7: 193, // en-MP 0x139000ca: 194, // en-MS 0x139000cb: 195, // en-MT 0x139000cc: 196, // en-MU 0x139000ce: 197, // en-MW 0x139000d0: 198, // en-MY 0x139000d2: 199, // en-NA 0x139000d5: 200, // en-NF 0x139000d6: 201, // en-NG 0x139000d9: 202, // en-NL 0x139000dd: 203, // en-NR 0x139000df: 204, // en-NU 0x139000e0: 205, // en-NZ 0x139000e6: 206, // en-PG 0x139000e7: 207, // en-PH 0x139000e8: 208, // en-PK 0x139000eb: 209, // en-PN 0x139000ec: 210, // en-PR 0x139000f0: 211, // en-PW 0x13900107: 212, // en-RW 0x13900109: 213, // en-SB 0x1390010a: 214, // en-SC 0x1390010b: 215, // en-SD 0x1390010c: 216, // en-SE 0x1390010d: 217, // en-SG 0x1390010e: 218, // en-SH 0x1390010f: 219, // en-SI 0x13900112: 220, // en-SL 0x13900117: 221, // en-SS 0x1390011b: 222, // en-SX 0x1390011d: 223, // en-SZ 0x1390011f: 224, // en-TC 0x13900125: 225, // en-TK 0x13900129: 226, // en-TO 0x1390012c: 227, // en-TT 0x1390012d: 228, // en-TV 0x1390012f: 229, // en-TZ 0x13900131: 230, // en-UG 0x13900133: 231, // en-UM 0x13900135: 232, // en-US 0x13900139: 233, // en-VC 0x1390013c: 234, // en-VG 0x1390013d: 235, // en-VI 0x1390013f: 236, // en-VU 0x13900142: 237, // en-WS 0x13900161: 238, // en-ZA 0x13900162: 239, // en-ZM 0x13900164: 240, // en-ZW 0x13c00000: 241, // eo 0x13c00001: 242, // eo-001 0x13e00000: 243, // es 0x13e0001f: 244, // es-419 0x13e0002c: 245, // es-AR 0x13e0003f: 246, // es-BO 0x13e00041: 247, // es-BR 0x13e00048: 248, // es-BZ 0x13e00051: 249, // es-CL 0x13e00054: 250, // es-CO 0x13e00056: 251, // es-CR 0x13e00059: 252, // es-CU 0x13e00065: 253, // es-DO 0x13e00068: 254, // es-EA 0x13e00069: 255, // es-EC 0x13e0006e: 256, // es-ES 0x13e00086: 257, // es-GQ 0x13e00089: 258, // es-GT 0x13e0008f: 259, // es-HN 0x13e00094: 260, // es-IC 0x13e000cf: 261, // es-MX 0x13e000d8: 262, // es-NI 0x13e000e2: 263, // es-PA 0x13e000e4: 264, // es-PE 0x13e000e7: 265, // es-PH 0x13e000ec: 266, // es-PR 0x13e000f1: 267, // es-PY 0x13e0011a: 268, // es-SV 0x13e00135: 269, // es-US 0x13e00136: 270, // es-UY 0x13e0013b: 271, // es-VE 0x14000000: 272, // et 0x1400006a: 273, // et-EE 0x14500000: 274, // eu 0x1450006e: 275, // eu-ES 0x14600000: 276, // ewo 0x14600052: 277, // ewo-CM 0x14800000: 278, // fa 0x14800024: 279, // fa-AF 0x1480009c: 280, // fa-IR 0x14e00000: 281, // ff 0x14e00052: 282, // ff-CM 0x14e00084: 283, // ff-GN 0x14e000c9: 284, // ff-MR 0x14e00114: 285, // ff-SN 0x15100000: 286, // fi 0x15100072: 287, // fi-FI 0x15300000: 288, // fil 0x153000e7: 289, // fil-PH 0x15800000: 290, // fo 0x15800063: 291, // fo-DK 0x15800076: 292, // fo-FO 0x15e00000: 293, // fr 0x15e00036: 294, // fr-BE 0x15e00037: 295, // fr-BF 0x15e0003a: 296, // fr-BI 0x15e0003b: 297, // fr-BJ 0x15e0003c: 298, // fr-BL 0x15e00049: 299, // fr-CA 0x15e0004b: 300, // fr-CD 0x15e0004c: 301, // fr-CF 0x15e0004d: 302, // fr-CG 0x15e0004e: 303, // fr-CH 0x15e0004f: 304, // fr-CI 0x15e00052: 305, // fr-CM 0x15e00062: 306, // fr-DJ 0x15e00067: 307, // fr-DZ 0x15e00078: 308, // fr-FR 0x15e0007a: 309, // fr-GA 0x15e0007e: 310, // fr-GF 0x15e00084: 311, // fr-GN 0x15e00085: 312, // fr-GP 0x15e00086: 313, // fr-GQ 0x15e00091: 314, // fr-HT 0x15e000a8: 315, // fr-KM 0x15e000b7: 316, // fr-LU 0x15e000ba: 317, // fr-MA 0x15e000bb: 318, // fr-MC 0x15e000be: 319, // fr-MF 0x15e000bf: 320, // fr-MG 0x15e000c3: 321, // fr-ML 0x15e000c8: 322, // fr-MQ 0x15e000c9: 323, // fr-MR 0x15e000cc: 324, // fr-MU 0x15e000d3: 325, // fr-NC 0x15e000d4: 326, // fr-NE 0x15e000e5: 327, // fr-PF 0x15e000ea: 328, // fr-PM 0x15e00102: 329, // fr-RE 0x15e00107: 330, // fr-RW 0x15e0010a: 331, // fr-SC 0x15e00114: 332, // fr-SN 0x15e0011c: 333, // fr-SY 0x15e00120: 334, // fr-TD 0x15e00122: 335, // fr-TG 0x15e00128: 336, // fr-TN 0x15e0013f: 337, // fr-VU 0x15e00140: 338, // fr-WF 0x15e0015f: 339, // fr-YT 0x16900000: 340, // fur 0x1690009e: 341, // fur-IT 0x16d00000: 342, // fy 0x16d000d9: 343, // fy-NL 0x16e00000: 344, // ga 0x16e00096: 345, // ga-IE 0x17e00000: 346, // gd 0x17e0007b: 347, // gd-GB 0x19000000: 348, // gl 0x1900006e: 349, // gl-ES 0x1a300000: 350, // gsw 0x1a30004e: 351, // gsw-CH 0x1a300078: 352, // gsw-FR 0x1a3000b2: 353, // gsw-LI 0x1a400000: 354, // gu 0x1a400099: 355, // gu-IN 0x1a900000: 356, // guw 0x1ab00000: 357, // guz 0x1ab000a4: 358, // guz-KE 0x1ac00000: 359, // gv 0x1ac00098: 360, // gv-IM 0x1b400000: 361, // ha 0x1b400080: 362, // ha-GH 0x1b4000d4: 363, // ha-NE 0x1b4000d6: 364, // ha-NG 0x1b800000: 365, // haw 0x1b800135: 366, // haw-US 0x1bc00000: 367, // he 0x1bc00097: 368, // he-IL 0x1be00000: 369, // hi 0x1be00099: 370, // hi-IN 0x1d100000: 371, // hr 0x1d100033: 372, // hr-BA 0x1d100090: 373, // hr-HR 0x1d200000: 374, // hsb 0x1d200060: 375, // hsb-DE 0x1d500000: 376, // hu 0x1d500092: 377, // hu-HU 0x1d700000: 378, // hy 0x1d700028: 379, // hy-AM 0x1e100000: 380, // id 0x1e100095: 381, // id-ID 0x1e700000: 382, // ig 0x1e7000d6: 383, // ig-NG 0x1ea00000: 384, // ii 0x1ea00053: 385, // ii-CN 0x1f500000: 386, // io 0x1f800000: 387, // is 0x1f80009d: 388, // is-IS 0x1f900000: 389, // it 0x1f90004e: 390, // it-CH 0x1f90009e: 391, // it-IT 0x1f900113: 392, // it-SM 0x1f900138: 393, // it-VA 0x1fa00000: 394, // iu 0x20000000: 395, // ja 0x200000a2: 396, // ja-JP 0x20300000: 397, // jbo 0x20700000: 398, // jgo 0x20700052: 399, // jgo-CM 0x20a00000: 400, // jmc 0x20a0012f: 401, // jmc-TZ 0x20e00000: 402, // jv 0x21000000: 403, // ka 0x2100007d: 404, // ka-GE 0x21200000: 405, // kab 0x21200067: 406, // kab-DZ 0x21600000: 407, // kaj 0x21700000: 408, // kam 0x217000a4: 409, // kam-KE 0x21f00000: 410, // kcg 0x22300000: 411, // kde 0x2230012f: 412, // kde-TZ 0x22700000: 413, // kea 0x2270005a: 414, // kea-CV 0x23400000: 415, // khq 0x234000c3: 416, // khq-ML 0x23900000: 417, // ki 0x239000a4: 418, // ki-KE 0x24200000: 419, // kk 0x242000ae: 420, // kk-KZ 0x24400000: 421, // kkj 0x24400052: 422, // kkj-CM 0x24500000: 423, // kl 0x24500082: 424, // kl-GL 0x24600000: 425, // kln 0x246000a4: 426, // kln-KE 0x24a00000: 427, // km 0x24a000a6: 428, // km-KH 0x25100000: 429, // kn 0x25100099: 430, // kn-IN 0x25400000: 431, // ko 0x254000aa: 432, // ko-KP 0x254000ab: 433, // ko-KR 0x25600000: 434, // kok 0x25600099: 435, // kok-IN 0x26a00000: 436, // ks 0x26a00099: 437, // ks-IN 0x26b00000: 438, // ksb 0x26b0012f: 439, // ksb-TZ 0x26d00000: 440, // ksf 0x26d00052: 441, // ksf-CM 0x26e00000: 442, // ksh 0x26e00060: 443, // ksh-DE 0x27400000: 444, // ku 0x28100000: 445, // kw 0x2810007b: 446, // kw-GB 0x28a00000: 447, // ky 0x28a000a5: 448, // ky-KG 0x29100000: 449, // lag 0x2910012f: 450, // lag-TZ 0x29500000: 451, // lb 0x295000b7: 452, // lb-LU 0x2a300000: 453, // lg 0x2a300131: 454, // lg-UG 0x2af00000: 455, // lkt 0x2af00135: 456, // lkt-US 0x2b500000: 457, // ln 0x2b50002a: 458, // ln-AO 0x2b50004b: 459, // ln-CD 0x2b50004c: 460, // ln-CF 0x2b50004d: 461, // ln-CG 0x2b800000: 462, // lo 0x2b8000af: 463, // lo-LA 0x2bf00000: 464, // lrc 0x2bf0009b: 465, // lrc-IQ 0x2bf0009c: 466, // lrc-IR 0x2c000000: 467, // lt 0x2c0000b6: 468, // lt-LT 0x2c200000: 469, // lu 0x2c20004b: 470, // lu-CD 0x2c400000: 471, // luo 0x2c4000a4: 472, // luo-KE 0x2c500000: 473, // luy 0x2c5000a4: 474, // luy-KE 0x2c700000: 475, // lv 0x2c7000b8: 476, // lv-LV 0x2d100000: 477, // mas 0x2d1000a4: 478, // mas-KE 0x2d10012f: 479, // mas-TZ 0x2e900000: 480, // mer 0x2e9000a4: 481, // mer-KE 0x2ed00000: 482, // mfe 0x2ed000cc: 483, // mfe-MU 0x2f100000: 484, // mg 0x2f1000bf: 485, // mg-MG 0x2f200000: 486, // mgh 0x2f2000d1: 487, // mgh-MZ 0x2f400000: 488, // mgo 0x2f400052: 489, // mgo-CM 0x2ff00000: 490, // mk 0x2ff000c2: 491, // mk-MK 0x30400000: 492, // ml 0x30400099: 493, // ml-IN 0x30b00000: 494, // mn 0x30b000c5: 495, // mn-MN 0x31b00000: 496, // mr 0x31b00099: 497, // mr-IN 0x31f00000: 498, // ms 0x31f0003e: 499, // ms-BN 0x31f000d0: 500, // ms-MY 0x31f0010d: 501, // ms-SG 0x32000000: 502, // mt 0x320000cb: 503, // mt-MT 0x32500000: 504, // mua 0x32500052: 505, // mua-CM 0x33100000: 506, // my 0x331000c4: 507, // my-MM 0x33a00000: 508, // mzn 0x33a0009c: 509, // mzn-IR 0x34100000: 510, // nah 0x34500000: 511, // naq 0x345000d2: 512, // naq-NA 0x34700000: 513, // nb 0x347000da: 514, // nb-NO 0x34700110: 515, // nb-SJ 0x34e00000: 516, // nd 0x34e00164: 517, // nd-ZW 0x35000000: 518, // nds 0x35000060: 519, // nds-DE 0x350000d9: 520, // nds-NL 0x35100000: 521, // ne 0x35100099: 522, // ne-IN 0x351000db: 523, // ne-NP 0x36700000: 524, // nl 0x36700030: 525, // nl-AW 0x36700036: 526, // nl-BE 0x36700040: 527, // nl-BQ 0x3670005b: 528, // nl-CW 0x367000d9: 529, // nl-NL 0x36700116: 530, // nl-SR 0x3670011b: 531, // nl-SX 0x36800000: 532, // nmg 0x36800052: 533, // nmg-CM 0x36a00000: 534, // nn 0x36a000da: 535, // nn-NO 0x36c00000: 536, // nnh 0x36c00052: 537, // nnh-CM 0x36f00000: 538, // no 0x37500000: 539, // nqo 0x37600000: 540, // nr 0x37a00000: 541, // nso 0x38000000: 542, // nus 0x38000117: 543, // nus-SS 0x38700000: 544, // ny 0x38900000: 545, // nyn 0x38900131: 546, // nyn-UG 0x39000000: 547, // om 0x3900006f: 548, // om-ET 0x390000a4: 549, // om-KE 0x39500000: 550, // or 0x39500099: 551, // or-IN 0x39800000: 552, // os 0x3980007d: 553, // os-GE 0x39800106: 554, // os-RU 0x39d00000: 555, // pa 0x39d05000: 556, // pa-Arab 0x39d050e8: 557, // pa-Arab-PK 0x39d33000: 558, // pa-Guru 0x39d33099: 559, // pa-Guru-IN 0x3a100000: 560, // pap 0x3b300000: 561, // pl 0x3b3000e9: 562, // pl-PL 0x3bd00000: 563, // prg 0x3bd00001: 564, // prg-001 0x3be00000: 565, // ps 0x3be00024: 566, // ps-AF 0x3c000000: 567, // pt 0x3c00002a: 568, // pt-AO 0x3c000041: 569, // pt-BR 0x3c00004e: 570, // pt-CH 0x3c00005a: 571, // pt-CV 0x3c000086: 572, // pt-GQ 0x3c00008b: 573, // pt-GW 0x3c0000b7: 574, // pt-LU 0x3c0000c6: 575, // pt-MO 0x3c0000d1: 576, // pt-MZ 0x3c0000ee: 577, // pt-PT 0x3c000118: 578, // pt-ST 0x3c000126: 579, // pt-TL 0x3c400000: 580, // qu 0x3c40003f: 581, // qu-BO 0x3c400069: 582, // qu-EC 0x3c4000e4: 583, // qu-PE 0x3d400000: 584, // rm 0x3d40004e: 585, // rm-CH 0x3d900000: 586, // rn 0x3d90003a: 587, // rn-BI 0x3dc00000: 588, // ro 0x3dc000bc: 589, // ro-MD 0x3dc00104: 590, // ro-RO 0x3de00000: 591, // rof 0x3de0012f: 592, // rof-TZ 0x3e200000: 593, // ru 0x3e200047: 594, // ru-BY 0x3e2000a5: 595, // ru-KG 0x3e2000ae: 596, // ru-KZ 0x3e2000bc: 597, // ru-MD 0x3e200106: 598, // ru-RU 0x3e200130: 599, // ru-UA 0x3e500000: 600, // rw 0x3e500107: 601, // rw-RW 0x3e600000: 602, // rwk 0x3e60012f: 603, // rwk-TZ 0x3eb00000: 604, // sah 0x3eb00106: 605, // sah-RU 0x3ec00000: 606, // saq 0x3ec000a4: 607, // saq-KE 0x3f300000: 608, // sbp 0x3f30012f: 609, // sbp-TZ 0x3fa00000: 610, // sd 0x3fa000e8: 611, // sd-PK 0x3fc00000: 612, // sdh 0x3fd00000: 613, // se 0x3fd00072: 614, // se-FI 0x3fd000da: 615, // se-NO 0x3fd0010c: 616, // se-SE 0x3ff00000: 617, // seh 0x3ff000d1: 618, // seh-MZ 0x40100000: 619, // ses 0x401000c3: 620, // ses-ML 0x40200000: 621, // sg 0x4020004c: 622, // sg-CF 0x40800000: 623, // shi 0x40857000: 624, // shi-Latn 0x408570ba: 625, // shi-Latn-MA 0x408dc000: 626, // shi-Tfng 0x408dc0ba: 627, // shi-Tfng-MA 0x40c00000: 628, // si 0x40c000b3: 629, // si-LK 0x41200000: 630, // sk 0x41200111: 631, // sk-SK 0x41600000: 632, // sl 0x4160010f: 633, // sl-SI 0x41c00000: 634, // sma 0x41d00000: 635, // smi 0x41e00000: 636, // smj 0x41f00000: 637, // smn 0x41f00072: 638, // smn-FI 0x42200000: 639, // sms 0x42300000: 640, // sn 0x42300164: 641, // sn-ZW 0x42900000: 642, // so 0x42900062: 643, // so-DJ 0x4290006f: 644, // so-ET 0x429000a4: 645, // so-KE 0x42900115: 646, // so-SO 0x43100000: 647, // sq 0x43100027: 648, // sq-AL 0x431000c2: 649, // sq-MK 0x4310014d: 650, // sq-XK 0x43200000: 651, // sr 0x4321f000: 652, // sr-Cyrl 0x4321f033: 653, // sr-Cyrl-BA 0x4321f0bd: 654, // sr-Cyrl-ME 0x4321f105: 655, // sr-Cyrl-RS 0x4321f14d: 656, // sr-Cyrl-XK 0x43257000: 657, // sr-Latn 0x43257033: 658, // sr-Latn-BA 0x432570bd: 659, // sr-Latn-ME 0x43257105: 660, // sr-Latn-RS 0x4325714d: 661, // sr-Latn-XK 0x43700000: 662, // ss 0x43a00000: 663, // ssy 0x43b00000: 664, // st 0x44400000: 665, // sv 0x44400031: 666, // sv-AX 0x44400072: 667, // sv-FI 0x4440010c: 668, // sv-SE 0x44500000: 669, // sw 0x4450004b: 670, // sw-CD 0x445000a4: 671, // sw-KE 0x4450012f: 672, // sw-TZ 0x44500131: 673, // sw-UG 0x44e00000: 674, // syr 0x45000000: 675, // ta 0x45000099: 676, // ta-IN 0x450000b3: 677, // ta-LK 0x450000d0: 678, // ta-MY 0x4500010d: 679, // ta-SG 0x46100000: 680, // te 0x46100099: 681, // te-IN 0x46400000: 682, // teo 0x464000a4: 683, // teo-KE 0x46400131: 684, // teo-UG 0x46700000: 685, // tg 0x46700124: 686, // tg-TJ 0x46b00000: 687, // th 0x46b00123: 688, // th-TH 0x46f00000: 689, // ti 0x46f0006d: 690, // ti-ER 0x46f0006f: 691, // ti-ET 0x47100000: 692, // tig 0x47600000: 693, // tk 0x47600127: 694, // tk-TM 0x48000000: 695, // tn 0x48200000: 696, // to 0x48200129: 697, // to-TO 0x48a00000: 698, // tr 0x48a0005d: 699, // tr-CY 0x48a0012b: 700, // tr-TR 0x48e00000: 701, // ts 0x49400000: 702, // tt 0x49400106: 703, // tt-RU 0x4a400000: 704, // twq 0x4a4000d4: 705, // twq-NE 0x4a900000: 706, // tzm 0x4a9000ba: 707, // tzm-MA 0x4ac00000: 708, // ug 0x4ac00053: 709, // ug-CN 0x4ae00000: 710, // uk 0x4ae00130: 711, // uk-UA 0x4b400000: 712, // ur 0x4b400099: 713, // ur-IN 0x4b4000e8: 714, // ur-PK 0x4bc00000: 715, // uz 0x4bc05000: 716, // uz-Arab 0x4bc05024: 717, // uz-Arab-AF 0x4bc1f000: 718, // uz-Cyrl 0x4bc1f137: 719, // uz-Cyrl-UZ 0x4bc57000: 720, // uz-Latn 0x4bc57137: 721, // uz-Latn-UZ 0x4be00000: 722, // vai 0x4be57000: 723, // vai-Latn 0x4be570b4: 724, // vai-Latn-LR 0x4bee3000: 725, // vai-Vaii 0x4bee30b4: 726, // vai-Vaii-LR 0x4c000000: 727, // ve 0x4c300000: 728, // vi 0x4c30013e: 729, // vi-VN 0x4c900000: 730, // vo 0x4c900001: 731, // vo-001 0x4cc00000: 732, // vun 0x4cc0012f: 733, // vun-TZ 0x4ce00000: 734, // wa 0x4cf00000: 735, // wae 0x4cf0004e: 736, // wae-CH 0x4e500000: 737, // wo 0x4e500114: 738, // wo-SN 0x4f200000: 739, // xh 0x4fb00000: 740, // xog 0x4fb00131: 741, // xog-UG 0x50900000: 742, // yav 0x50900052: 743, // yav-CM 0x51200000: 744, // yi 0x51200001: 745, // yi-001 0x51800000: 746, // yo 0x5180003b: 747, // yo-BJ 0x518000d6: 748, // yo-NG 0x51f00000: 749, // yue 0x51f38000: 750, // yue-Hans 0x51f38053: 751, // yue-Hans-CN 0x51f39000: 752, // yue-Hant 0x51f3908d: 753, // yue-Hant-HK 0x52800000: 754, // zgh 0x528000ba: 755, // zgh-MA 0x52900000: 756, // zh 0x52938000: 757, // zh-Hans 0x52938053: 758, // zh-Hans-CN 0x5293808d: 759, // zh-Hans-HK 0x529380c6: 760, // zh-Hans-MO 0x5293810d: 761, // zh-Hans-SG 0x52939000: 762, // zh-Hant 0x5293908d: 763, // zh-Hant-HK 0x529390c6: 764, // zh-Hant-MO 0x5293912e: 765, // zh-Hant-TW 0x52f00000: 766, // zu 0x52f00161: 767, // zu-ZA } // Total table size 4676 bytes (4KiB); checksum: 17BE3673
{ "pile_set_name": "Github" }
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !gccgo #include "textflag.h" TEXT ·use(SB),NOSPLIT,$0 RET
{ "pile_set_name": "Github" }
(function(compodoc) { var MAX_RESULTS = 15, MAX_DESCRIPTION_SIZE = 500, usePushState = (typeof history.pushState !== 'undefined'), // DOM Elements $body = $('body'), $searchResults, $searchInput, $searchList, $searchTitle, $searchResultsCount, $searchQuery, $mainContainer, $xsMenu; // Throttle search function throttle(fn, wait) { var timeout; return function() { var ctx = this, args = arguments; if (!timeout) { timeout = setTimeout(function() { timeout = undefined; fn.apply(ctx, args); }, wait); } }; } function displayResults(res) { var noResults = res.count == 0; var groups = {}; $searchResults.toggleClass('no-results', noResults); // Clear old results $searchList.empty(); // Display title for research $searchResultsCount.text(res.count); $searchQuery.text(res.query); // Group result by context res.results.forEach(function(res) { var context = res.title.split(' - ')[0]; if (typeof groups[context] === 'undefined') { groups[context] = { results: [res] } } else { groups[context].results.push(res) } }); var sortedGroups = Object.keys(groups).sort(); for (var i = 0; i < sortedGroups.length; i++) { var property = sortedGroups[i]; var $li = $('<li>', { 'class': 'search-results-group' }); var finalPropertyLabel = ''; var propertyLabels = property.split('-'); if (propertyLabels.length === 2 && propertyLabels[0] !== 'miscellaneous' && propertyLabels[0] !== 'additional') { finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' - ' + propertyLabels[1].charAt(0).toUpperCase() + propertyLabels[1].substring(1) + ' (' + groups[property].results.length + ')'; } else if (propertyLabels[0] === 'additional') { finalPropertyLabel = 'Additional pages' + ' (' + groups[property].results.length + ')' } else { finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' (' + groups[property].results.length + ')' } var $groupTitle = $('<h3>', { 'text': finalPropertyLabel }); $groupTitle.appendTo($li); var $ulResults = $('<ul>', { 'class': 'search-results-list' }) groups[property].results.forEach(function(res) { var link = ''; var $liResult = $('<li>', { 'class': 'search-results-item' }); switch (COMPODOC_CURRENT_PAGE_DEPTH) { case 0: link = './'; break; case 1: case 2: case 3: case 4: case 5: link = '../'.repeat(COMPODOC_CURRENT_PAGE_DEPTH); break; }; var finalResLabel = res.title.split(' - ')[1].charAt(0).toUpperCase() + res.title.split(' - ')[1].substring(1); var $link = $('<a>', { 'href': link + res.url, 'text': finalResLabel }); $link.appendTo($liResult); $liResult.appendTo($ulResults); }); $ulResults.appendTo($li); $li.appendTo($searchList); } } function launchSearch(q) { $body.addClass('with-search'); if ($xsMenu.css('display') === 'block') { $mainContainer.css('height', 'calc(100% - 100px)'); $mainContainer.css('margin-top', '100px'); } throttle(compodoc.search.query(q, 0, MAX_RESULTS) .then(function(results) { displayResults(results); }), 1000); } function closeSearch() { $body.removeClass('with-search'); if ($xsMenu.css('display') === 'block') { $mainContainer.css('height', 'calc(100% - 50px)'); $mainContainer.css('margin-top', '50px'); } } function bindMenuButton() { document.getElementById('btn-menu').addEventListener('click', function() { if ($xsMenu.css('display') === 'none') { $body.removeClass('with-search'); $mainContainer.css('height', 'calc(100% - 50px)'); $mainContainer.css('margin-top', '50px'); } $.each($searchInputs, function(index, item){ var item = $(item); item.val(''); }); }); } function bindSearch() { // Bind DOM $searchInputs = $('#book-search-input input'); $searchResults = $('.search-results'); $searchList = $searchResults.find('.search-results-list'); $searchTitle = $searchResults.find('.search-results-title'); $searchResultsCount = $searchTitle.find('.search-results-count'); $searchQuery = $searchTitle.find('.search-query'); $mainContainer = $('.container-fluid'); $xsMenu = $('.xs-menu'); // Launch query based on input content function handleUpdate(item) { var q = item.val(); if (q.length == 0) { closeSearch(); window.location.href = window.location.href.replace(window.location.search, ''); } else { launchSearch(q); } } // Detect true content change in search input var propertyChangeUnbound = false; $.each($searchInputs, function(index, item){ var item = $(item); // HTML5 (IE9 & others) item.on('input', function(e) { // Unbind propertychange event for IE9+ if (!propertyChangeUnbound) { $(this).unbind('propertychange'); propertyChangeUnbound = true; } handleUpdate($(this)); }); // Workaround for IE < 9 item.on('propertychange', function(e) { if (e.originalEvent.propertyName == 'value') { handleUpdate($(this)); } }); // Push to history on blur item.on('blur', function(e) { // Update history state if (usePushState) { var uri = updateQueryString('q', $(this).val()); if ($(this).val() !== '') { history.pushState({ path: uri }, null, uri); } } }); }); } function launchSearchFromQueryString() { var q = getParameterByName('q'); if (q && q.length > 0) { // Update search inputs $.each($searchInputs, function(index, item){ var item = $(item); item.val(q) }); // Launch search launchSearch(q); } } compodoc.addEventListener(compodoc.EVENTS.SEARCH_READY, function(event) { bindSearch(); bindMenuButton(); launchSearchFromQueryString(); }); function getParameterByName(name) { var url = window.location.href; name = name.replace(/[\[\]]/g, '\\$&'); var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, ' ')); } function updateQueryString(key, value) { value = encodeURIComponent(value); var url = window.location.href; var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'), hash; if (re.test(url)) { if (typeof value !== 'undefined' && value !== null) return url.replace(re, '$1' + key + '=' + value + '$2$3'); else { hash = url.split('#'); url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, ''); if (typeof hash[1] !== 'undefined' && hash[1] !== null) url += '#' + hash[1]; return url; } } else { if (typeof value !== 'undefined' && value !== null) { var separator = url.indexOf('?') !== -1 ? '&' : '?'; hash = url.split('#'); url = hash[0] + separator + key + '=' + value; if (typeof hash[1] !== 'undefined' && hash[1] !== null) url += '#' + hash[1]; return url; } else return url; } } })(compodoc);
{ "pile_set_name": "Github" }
/* * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ #ifdef AWS_MULTI_FRAMEWORK #import <AWSRuntime/AmazonServiceRequest.h> #else #import "../AmazonServiceRequest.h" #endif #import "SNSRequest.h" #import "SNSListSubscriptionsRequest.h" /** * List Subscriptions Request Marshaller */ @interface SNSListSubscriptionsRequestMarshaller:NSObject { } +(AmazonServiceRequest *)createRequest:(SNSListSubscriptionsRequest *)listSubscriptionsRequest; @end
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> <year>2018</year><year>2020</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> 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. </legalnotice> <title>Socket Usage</title> <prepared>Micael Karlberg</prepared> <docno></docno> <date>2018-07-17</date> <rev>PA1</rev> <file>socket_usage.xml</file> </header> <section> <title>Introduction</title> <p>The socket interface (module) is basically a "thin" layer on top of the OS socket interface. It is assumed that, unless you have special needs, gen_[tcp|udp|sctp] should be sufficent (when they become available). </p> <p>Note that just because we have a documented and described option, it does <em>not</em> mean that the OS supports it. So its recommended that the user reads the platform specific documentation for the option used. </p> <section> <title>Asynchronous calls</title> <p>Some functions allow for an <i>asynchronous</i> call (<seeerl marker="socket#accept_async"><c>accept/2</c></seeerl>, <seeerl marker="socket#connect_async"><c>connect/3</c></seeerl>, <seeerl marker="socket#recv_async"><c>recv/3,4</c></seeerl>, <seeerl marker="socket#recvfrom_async"><c>recvfrom/3,4</c></seeerl>, <seeerl marker="socket#recvmsg_async"><c>recvmsg/2,3,5</c></seeerl>, <seeerl marker="socket#send_async"><c>send/3,4</c></seeerl>, <seeerl marker="socket#sendmsg_async"><c>sendmsg/3,4</c></seeerl> and <seeerl marker="socket#sendto_async"><c>sendto/4,5</c></seeerl>). This is achieved by setting the <c>Timeout</c> argument to <c>nowait</c>. For instance, if calling the <seeerl marker="socket#recv_async"><c>recv/3</c></seeerl> function with Timeout set to <c>nowait</c> (i.e. <c>recv(Sock, 0, nowait)</c>) when there is actually nothing to read, it will return with <c>{select, </c> <seetype marker="socket#select_info"><c>SelectInfo</c></seetype><c>}</c> (<c>SelectInfo</c> contains the <seetype marker="socket#select_handle"><c>SelectHandle</c></seetype>). When data eventually arrives a 'select message' will be sent to the caller:</p> <taglist> <!-- NOTE THAT THE EMPTY TAG IS INTENTIONAL --> <tag></tag> <item><c>{'$socket', socket(), select, SelectHandle}</c></item> </taglist> <p>The caller can then make another call to the recv function and now expect data.</p> <p>Note that all other users are <em>locked out</em> until the 'current user' has called the function (recv in this case). So either immediately call the function or <seemfa marker="socket#cancel/2"><c>cancel</c></seemfa>. </p> <p>The user must also be prepared to receive an abort message: </p> <taglist> <!-- NOTE THAT THE EMPTY TAG IS INTENTIONAL --> <tag></tag> <item><c>{'$socket', socket(), abort, Info}</c></item> </taglist> <p>If the operation is aborted for whatever reason (e.g. if the socket is closed "by someone else"). The <c>Info</c> part contains the abort reason (in this case that the socket has been closed <c>Info = {SelectHandle, closed}</c>). </p> <p>The general form of the 'socket' message is: </p> <taglist> <!-- NOTE THAT THE EMPTY TAG IS INTENTIONAL --> <tag></tag> <item><c>{'$socket', Sock :: socket(), Tag :: atom(), Info :: term()}</c></item> </taglist> <p>Where the format of <c>Info</c> is a function of <c>Tag</c>:</p> <table> <row> <cell><em>Tag</em></cell> <cell><em>Info value type</em></cell> </row> <row> <cell>select</cell> <cell>select_handle()</cell> </row> <row> <cell>abort</cell> <cell>{select_handle(), Reason :: term()}</cell> </row> <tcaption>socket message info value type</tcaption> </table> <p>The <c>select_handle()</c> is the same as was returned in the <seetype marker="socket#select_info"><c>SelectInfo</c></seetype>. </p> </section> </section> <section> <title>Socket Registry</title> <p>The <em>socket registry</em> is how we keep track of sockets. There are two functions that can be used for interaction: <seemfa marker="socket#number_of/0"><c>socket:number_of/0</c></seemfa> and <seemfa marker="socket#which_sockets/1"><c>socket:which_sockets/1</c></seemfa>. </p> <p>In systems which create and delete <em>many</em> sockets dynamically, it (the socket registry) could become a bottleneck. For such systems, there are a couple of ways to control the use of the socket registry. </p> <p>Firstly, its possible to effect the global default value when building OTP from source with the two configure options:</p> <code type="none">--enable-esock-socket-registry (default) | --disable-esock-socket-registry</code> <p>Second, its possible to effect the global default value by setting the environment variable <c>ESOCK_USE_SOCKET_REGISTRY</c> (boolean) before starting the erlang. </p> <p>Third, its possible to alter the global default value in runtime by calling the function <seemfa marker="socket#use_registry/1"><c>use_registry/1</c></seemfa>.</p> <p>And finally, its possible to override the global default when creating a socket (with <seemfa marker="socket#open/2"><c>open/2</c></seemfa> and <seemfa marker="socket#open/4"><c>open/4</c></seemfa>) by providing the attribute <c>use_registry</c> (boolean) in the their <c>Opts</c> argument (which effects <em>that</em> specific socket).</p> </section> <section> <marker id="socket_options"></marker> <title>Socket Options</title> <p>Options for level <c>otp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>assoc_id</cell> <cell>integer()</cell> <cell>no</cell> <cell>yes</cell> <cell>type = seqpacket, protocol = sctp, is an association</cell> </row> <row> <cell>debug</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>iow</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>controlling_process</cell> <cell>pid()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rcvbuf</cell> <cell>default | pos_integer() | {pos_integer(), pos_ineteger()}</cell> <cell>yes</cell> <cell>yes</cell> <cell>'default' only valid for set. The tuple form is only valid for type 'stream' and protocol 'tcp'.</cell> </row> <row> <cell>rcvctrlbuf</cell> <cell>default | pos_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>default only valid for set</cell> </row> <row> <cell>sndctrlbuf</cell> <cell>default | pos_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>default only valid for set</cell> </row> <row> <cell>fd</cell> <cell>integer()</cell> <cell>no</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>use_registry</cell> <cell>boolean()</cell> <cell>no</cell> <cell>yes</cell> <cell>the value is set when the socket is created, by a call to <seemfa marker="socket#open/2"><c>open/2</c></seemfa> or <seemfa marker="socket#open/4"><c>open/4</c></seemfa>.</cell> </row> <tcaption>option levels</tcaption> </table> <p>Options for level <c>socket</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>acceptconn</cell> <cell>boolean()</cell> <cell>no</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>bindtodevice</cell> <cell>string()</cell> <cell>yes</cell> <cell>yes</cell> <cell>Before Linux 3.8, this socket option could be set, but not get. Only works for some socket types (e.g. <c>inet</c>). If empty value is set, the binding is removed.</cell> </row> <row> <cell>broadcast</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram</cell> </row> <row> <cell>debug</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>may require admin capability</cell> </row> <row> <cell>domain</cell> <cell>domain()</cell> <cell>no</cell> <cell>yes</cell> <cell><em>Not</em> on FreeBSD (for instance)</cell> </row> <row> <cell>dontroute</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>keepalive</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>linger</cell> <cell>abort | linger()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>oobinline</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>peek_off</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>domain = local (unix). Currently disabled due to a possible infinite loop when calling recv([peek]) the second time. </cell> </row> <row> <cell>priority</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>protocol</cell> <cell>protocol()</cell> <cell>no</cell> <cell>yes</cell> <cell><em>Not</em> on (some) Darwin (for instance)</cell> </row> <row> <cell>rcvbuf</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rcvlowat</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rcvtimeo</cell> <cell>timeval()</cell> <cell>yes</cell> <cell>yes</cell> <cell> This option is not normally supported (see why below). OTP has to be explicitly built with the <c>--enable-esock-rcvsndtime</c> configure option for this to be available. Since our implementation is <em>nonblocking</em>, its unknown if and how this option works, or even if it may cause malfunctions. Therefor, we do not recommend setting this option. Instead, use the <c>Timeout</c> argument to, for instance, the <seemfa marker="socket#recv/3"><c>recv/3</c></seemfa> function. </cell> </row> <row> <cell>reuseaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>reuseport</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>domain = inet | inet6</cell> </row> <row> <cell>sndbuf</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>sndlowat</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>not changeable on Linux</cell> </row> <row> <cell>sndtimeo</cell> <cell>timeval()</cell> <cell>yes</cell> <cell>yes</cell> <cell> This option is not normally supported (see why below). OTP has to be explicitly built with the <c>--enable-esock-rcvsndtime</c> configure option for this to be available. Since our implementation is <em>nonblocking</em>, its unknown if and how this option works, or even if it may cause malfunctions. Therefor, we do not recommend setting this option. Instead, use the <c>Timeout</c> argument to, for instance, the <seemfa marker="socket#send/3"><c>send/3</c></seemfa> function. </cell> </row> <row> <cell>timestamp</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>type</cell> <cell>type()</cell> <cell>no</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>socket options</tcaption> </table> <p>Options for level <c>ip</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>add_membership</cell> <cell>ip_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>add_source_membership</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>block_source</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>drop_membership</cell> <cell>ip_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>drop_source_membership</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>freebind</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>hdrincl</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>minttl</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>msfilter</cell> <cell>null | ip_msfilter()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>mtu</cell> <cell>integer()</cell> <cell>no</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>mtu_discover</cell> <cell>ip_pmtudisc()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_all</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_if</cell> <cell>any | ip4_address()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_loop</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_ttl</cell> <cell>uint8()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>nodefrag</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>pktinfo</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram</cell> </row> <row> <cell>recvdstaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram</cell> </row> <row> <cell>recverr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recvif</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw</cell> </row> <row> <cell>recvopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type =/= stream</cell> </row> <row> <cell>recvorigdstaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recvttl</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type =/= stream</cell> </row> <row> <cell>retopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type =/= stream</cell> </row> <row> <cell>router_alert</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>sendsrcaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>tos</cell> <cell>ip_tos()</cell> <cell>yes</cell> <cell>yes</cell> <cell>some high-priority levels may require superuser capability</cell> </row> <row> <cell>transparent</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>requires admin capability</cell> </row> <row> <cell>ttl</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>unblock_source</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <tcaption>ip options</tcaption> </table> <p>Options for level <c>ipv6</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>addrform</cell> <cell>inet</cell> <cell>yes</cell> <cell>no</cell> <cell>allowed only for IPv6 sockets that are connected and bound to a v4-mapped-on-v6 address</cell> </row> <row> <cell>add_membership</cell> <cell>ipv6_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>authhdr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, obsolete?</cell> </row> <row> <cell>drop_membership</cell> <cell>ipv6_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>dstopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>flowinfo</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>hoplimit</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms (e.g. FreeBSD) is used to set in order to get <c>hoplimit</c> as a control message heeader. On others (e.g. Linux), <c>recvhoplimit</c> is set in order to get <c>hoplimit</c>. </cell> </row> <row> <cell>hopopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>mtu</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>Get: Only after the socket has been connected</cell> </row> <row> <cell>mtu_discover</cell> <cell>ipv6_pmtudisc()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_hops</cell> <cell>default | uint8()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_if</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw</cell> </row> <row> <cell>multicast_loop</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recverr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recvhoplimit</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms (e.g. Linux), <c>recvhoplimit</c> is set in order to get <c>hoplimit</c></cell> </row> <row> <cell>recvpktinfo | pktinfo</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms (e.g. FreeBSD) is used to set in order to get <c>hoplimit</c> as a control message heeader. On others (e.g. Linux), <c>recvhoplimit</c> is set in order to get <c>hoplimit</c>. </cell> </row> <row> <cell>recvtclass</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms is used to set (=true) in order to get the <c>tclass</c> control message heeader. On others, <c>tclass</c> is set in order to get <c>tclass</c> control message heeader. </cell> </row> <row> <cell>router_alert</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>rthdr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>tclass</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms is used to set (=true) in order to get the <c>tclass</c> control message heeader. On others, <c>recvtclass</c> is set in order to get <c>tclass</c> control message heeader. </cell> </row> <row> <cell>unicast_hops</cell> <cell>default | uint8()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>v6only</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <tcaption>ipv6 options</tcaption> </table> <p>Options for level <c>tcp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>congestion</cell> <cell>string()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>maxseg</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>Set not allowed on all platforms.</cell> </row> <row> <cell>nodelay</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>tcp options</tcaption> </table> <p>Options for level <c>udp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>cork</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>udp options</tcaption> </table> <p>Options for level <c>sctp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>associnfo</cell> <cell>sctp_assocparams()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>autoclose</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>disable_fragments</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>events</cell> <cell>sctp_event_subscribe()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>initmsg</cell> <cell>sctp_initmsg()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>maxseg</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>nodelay</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rtoinfo</cell> <cell>sctp_rtoinfo()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>sctp options</tcaption> </table> </section> </chapter>
{ "pile_set_name": "Github" }
@SQ SN:1 LN:249250621 @SQ SN:2 LN:243199373 @PG ID:p1 PN:myProg CL:"myProg 123" VN:1.0.0 @PG ID:p2 PN:myProg CL:"myProg 456" VN:1.0.0 PP:p1 simread:1:26472783:false 16 1 26472784 60 75M * 0 0 GTATAAGAGCAGCCTTATTCCTATTTATAATCAGGGTGAAACACCTGTGCCAATGCCAAGACAGGGGTGCCAAGA * NM:i:0 AS:i:75 XS:i:0 simread:1:240997787:true 0 1 240997788 60 75M * 0 0 CTTTATTTTTATTTTTAAGGTTTTTTTTGTTTGTTTGTTTTGAGATGGAGTCTCGCTCCACCGCCCAGACTGGAG * NM:i:0 AS:i:75 XS:i:39 simread:1:189606653:true 0 2 189606654 60 75M * 0 0 TGTATCTTCCTCCCCTGCTGTATGTTTCCTGCCCTCAAACATCACACTCCACGTTCTTCAGCTTTAGGACTTGGA * NM:i:0 AS:i:75 XS:i:0
{ "pile_set_name": "Github" }
// Icon Sizes // ------------------------- /* makes the font 33% larger relative to the icon container */ .#{$fa-css-prefix}-lg { font-size: (4em / 3); line-height: (3em / 4); vertical-align: -15%; } .#{$fa-css-prefix}-2x { font-size: 2em; } .#{$fa-css-prefix}-3x { font-size: 3em; } .#{$fa-css-prefix}-4x { font-size: 4em; } .#{$fa-css-prefix}-5x { font-size: 5em; }
{ "pile_set_name": "Github" }
import { Search } from '@destinyitemmanager/dim-api-types'; import { saveSearch, searchDeleted, searchUsed } from 'app/dim-api/basic-actions'; import { recentSearchesSelector } from 'app/dim-api/selectors'; import { Loading } from 'app/dim-ui/Loading'; import Sheet from 'app/dim-ui/Sheet'; import UserGuideLink from 'app/dim-ui/UserGuideLink'; import { t } from 'app/i18next-t'; import { isPhonePortraitSelector } from 'app/shell/selectors'; import { RootState, ThunkDispatchProp } from 'app/store/types'; import clsx from 'clsx'; import { useCombobox } from 'downshift'; import _ from 'lodash'; import React, { Suspense, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, } from 'react'; import ReactDOM from 'react-dom'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { AppIcon, closeIcon, disabledIcon, faClock, helpIcon, moveDownIcon, moveUpIcon, searchIcon, starIcon, starOutlineIcon, unTrackedIcon, } from '../shell/icons'; import createAutocompleter, { SearchItem, SearchItemType } from './autocomplete'; import HighlightedText from './HighlightedText'; import { canonicalizeQuery, parseQuery } from './query-parser'; import { searchConfigSelector } from './search-config'; import './search-filter.scss'; import styles from './SearchBar.m.scss'; const searchItemIcons: { [key in SearchItemType]: string } = { [SearchItemType.Recent]: faClock, [SearchItemType.Saved]: starIcon, [SearchItemType.Suggested]: unTrackedIcon, // TODO: choose a real icon [SearchItemType.Autocomplete]: searchIcon, // TODO: choose a real icon [SearchItemType.Help]: helpIcon, }; interface ProvidedProps { /** Placeholder text when nothing has been typed */ placeholder: string; /** Is this the main search bar in the header? It behaves somewhat differently. */ mainSearchBar?: boolean; /** Whether to autofocus this on mount */ autoFocus?: boolean; /** A fake property that can be used to force the "live" query to be replaced with the one from props */ searchQueryVersion?: number; /** The search query to fill in the input. This is used only initially, or when searchQueryVersion changes */ searchQuery?: string; /** Children are used as optional extra action buttons only when there is a query. */ children?: React.ReactChild; /** Fired whenever the query changes (already debounced) */ onQueryChanged(query: string): void; /** Fired whenever the query has been cleared */ onClear?(): void; } interface StoreProps { recentSearches: Search[]; isPhonePortrait: boolean; autocompleter: (query: string, caretIndex: number, recentSearches: Search[]) => SearchItem[]; } type Props = ProvidedProps & StoreProps & ThunkDispatchProp; const autoCompleterSelector = createSelector(searchConfigSelector, createAutocompleter); function mapStateToProps() { let prevSearchQueryVersion: number | undefined; let prevSearchQuery: string | undefined; return ( state: RootState, { searchQuery, searchQueryVersion }: ProvidedProps ): StoreProps & { searchQuery?: string } => { // This is a hack that prevents `searchQuery` from changing if `searchQueryVersion` // doesn't change, so we don't trigger an update. let manipulatedSearchQuery = prevSearchQuery; if (searchQueryVersion != prevSearchQueryVersion) { manipulatedSearchQuery = searchQuery; prevSearchQuery = searchQuery; prevSearchQueryVersion = searchQueryVersion; } return { recentSearches: recentSearchesSelector(state), isPhonePortrait: isPhonePortraitSelector(state), autocompleter: autoCompleterSelector(state), searchQuery: manipulatedSearchQuery, }; }; } const LazyFilterHelp = React.lazy( () => import(/* webpackChunkName: "filter-help" */ './FilterHelp') ); // TODO: break filter autocomplete into its own object/helpers... with tests /** An interface for interacting with the search filter through a ref */ export interface SearchFilterRef { /** Switch focus to the filter field */ focusFilterInput(): void; /** Clear the filter field */ clearFilter(): void; } /** * A reusable, autocompleting item search input. This is an uncontrolled input that * announces its query has changed only after some delay. This is the new version of the component * that offers a browser-style autocompleting search bar with history. * * TODO: Should this be the main search bar only, or should it also work for item picker, etc? */ function SearchBar( { searchQueryVersion, searchQuery, mainSearchBar, placeholder, children, autoFocus, onQueryChanged, onClear, dispatch, autocompleter, recentSearches, isPhonePortrait, }: Props, ref: React.Ref<SearchFilterRef> ) { const [liveQuery, setLiveQuery] = useState(''); const [filterHelpOpen, setFilterHelpOpen] = useState(false); const inputElement = useRef<HTMLInputElement>(null); // eslint-disable-next-line react-hooks/exhaustive-deps const debouncedUpdateQuery = useCallback( _.debounce((query: string) => { onQueryChanged(query); }, 500), [onQueryChanged] ); const lastBlurQuery = useRef<string>(); const onBlur = () => { if (liveQuery && liveQuery !== lastBlurQuery.current) { // save this to the recent searches only on blur // we use the ref to only fire if the query changed since the last blur dispatch(searchUsed(liveQuery)); lastBlurQuery.current = liveQuery; } }; // Is the current search saved? const canonical = liveQuery ? canonicalizeQuery(parseQuery(liveQuery)) : ''; const saved = canonical ? recentSearches.find((s) => s.query === canonical)?.saved : false; const toggleSaved = () => { // TODO: keep track of the last search, if you search for something more narrow immediately after then replace? dispatch(saveSearch({ query: liveQuery, saved: !saved })); }; const items = useMemo( () => autocompleter( liveQuery, inputElement.current?.selectionStart || liveQuery.length, recentSearches ), [autocompleter, liveQuery, recentSearches] ); // useCombobox from Downshift manages the state of the dropdown const { isOpen, getToggleButtonProps, getMenuProps, getInputProps, getLabelProps, getComboboxProps, highlightedIndex, getItemProps, setInputValue, reset, openMenu, closeMenu, } = useCombobox<SearchItem>({ items, initialIsOpen: isPhonePortrait && mainSearchBar, defaultHighlightedIndex: liveQuery ? 0 : -1, itemToString: (i) => i?.query || '', onSelectedItemChange: ({ selectedItem }) => { if (selectedItem) { // Handle selecting the special "help" item if (selectedItem.type === SearchItemType.Help) { setFilterHelpOpen(true); closeMenu(); } } }, onInputValueChange: ({ inputValue }) => { setLiveQuery(inputValue || ''); debouncedUpdateQuery(inputValue || ''); }, }); const onFocus = () => { if (!liveQuery && !isOpen && !autoFocus) { openMenu(); } }; const clearFilter = useCallback(() => { debouncedUpdateQuery(''); reset(); onClear?.(); }, [onClear, reset, debouncedUpdateQuery]); // Reset live query when search version changes useEffect(() => { if (searchQuery !== undefined && (searchQueryVersion || 0) > 0) { setInputValue(searchQuery); } // This should only happen when the query version changes // eslint-disable-next-line react-hooks/exhaustive-deps }, [searchQueryVersion]); const deleteSearch = useCallback( (e: React.MouseEvent, item: SearchItem) => { e.stopPropagation(); dispatch(searchDeleted(item.query)); }, [dispatch] ); // Add some methods for refs to use useImperativeHandle( ref, () => ({ focusFilterInput: () => { inputElement.current?.focus(); }, clearFilter, }), [clearFilter] ); // Setting this ref's value allows us to set the cursor position to a specific index on the next render const selectionRef = useRef<number>(); useLayoutEffect(() => { if (selectionRef.current !== undefined && inputElement.current) { inputElement.current.setSelectionRange(selectionRef.current, selectionRef.current); selectionRef.current = undefined; } }); // Implement tab completion on the tab key. If the highlighted item is an autocomplete suggestion, // accept it. Otherwise, we scan from the beginning to find the first autocomplete suggestion and // accept that. If there's nothing to accept, the tab key does its normal thing, which is to switch // focus. The tabAutocompleteItem is computed as part of render so we can offer keyboard help. const tabAutocompleteItem = highlightedIndex > 0 && items[highlightedIndex]?.type === SearchItemType.Autocomplete ? items[highlightedIndex] : items.find((s) => s.type === SearchItemType.Autocomplete && s.query !== liveQuery); const onKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => { if (e.key === 'Tab' && !e.altKey && tabAutocompleteItem) { e.preventDefault(); setInputValue(tabAutocompleteItem.query); if (tabAutocompleteItem.highlightRange) { selectionRef.current = tabAutocompleteItem.highlightRange[1]; } } else if (e.key === 'Home' || e.key === 'End') { // Disable the use of Home/End to select items in the menu // https://github.com/downshift-js/downshift/issues/1162 (e.nativeEvent as any).preventDownshiftDefault = true; } else if ( (e.key === 'Delete' || e.key === 'Backspace') && e.shiftKey && highlightedIndex >= 0 && items[highlightedIndex]?.query && items[highlightedIndex]?.type === SearchItemType.Recent ) { e.preventDefault(); dispatch(searchDeleted(items[highlightedIndex].query)); } }; return ( <div className={clsx('search-filter', styles.searchBar, { [styles.open]: isOpen })} role="search" enterkeyhint="search" {...getComboboxProps()} > <AppIcon icon={searchIcon} className="search-bar-icon" {...getLabelProps()} /> <input {...getInputProps({ onBlur, onFocus, onKeyDown, ref: inputElement, className: 'filter-input', autoComplete: 'off', autoCorrect: 'off', autoCapitalize: 'off', spellCheck: false, autoFocus, placeholder, type: 'text', name: 'filter', })} /> {liveQuery.length > 0 && children} {liveQuery.length > 0 && ( <button type="button" className={clsx('filter-bar-button', styles.saveSearchButton)} onClick={toggleSaved} title={t('Header.SaveSearch')} > <AppIcon icon={saved ? starIcon : starOutlineIcon} /> </button> )} {(liveQuery.length > 0 || (isPhonePortrait && mainSearchBar)) && ( <button type="button" className="filter-bar-button" onClick={clearFilter} title={t('Header.Clear')} > <AppIcon icon={disabledIcon} /> </button> )} <button type="button" className={clsx('filter-bar-button', styles.openButton)} {...getToggleButtonProps()} aria-label="toggle menu" > <AppIcon icon={isOpen ? moveUpIcon : moveDownIcon} /> </button> {filterHelpOpen && ReactDOM.createPortal( <Sheet onClose={() => setFilterHelpOpen(false)} header={ <> <h1>{t('Header.Filters')}</h1> <UserGuideLink topic="Item_Search" /> </> } sheetClassName="filterHelp" freezeInitialHeight={true} > <Suspense fallback={<Loading message={t('Loading.FilterHelp')} />}> <LazyFilterHelp /> </Suspense> </Sheet>, document.body )} <ul {...getMenuProps()} className={styles.menu}> {isOpen && items.map((item, index) => ( <li className={clsx(styles.menuItem, { [styles.highlightedItem]: highlightedIndex === index, })} key={`${item.type}${item.query}`} {...getItemProps({ item, index })} > <Row highlighted={highlightedIndex === index} item={item} isPhonePortrait={isPhonePortrait} isTabAutocompleteItem={item === tabAutocompleteItem} onClick={deleteSearch} /> </li> ))} </ul> </div> ); } export default connect<StoreProps>(mapStateToProps, null, null, { forwardRef: true })( React.forwardRef(SearchBar) ); const Row = React.memo( ({ highlighted, item, isPhonePortrait, isTabAutocompleteItem, onClick, }: { highlighted: boolean; item: SearchItem; isPhonePortrait: boolean; isTabAutocompleteItem: boolean; onClick(e: React.MouseEvent, item: SearchItem); }) => ( <> <AppIcon className={styles.menuItemIcon} icon={searchItemIcons[item.type]} /> <span className={styles.menuItemQuery}> {item.type === SearchItemType.Help ? ( t('Header.FilterHelpMenuItem') ) : item.highlightRange ? ( <HighlightedText text={item.query} startIndex={item.highlightRange[0]} endIndex={item.highlightRange[1]} className={styles.textHighlight} /> ) : ( item.query )} </span> <span className={styles.menuItemHelp} /> {!isPhonePortrait && isTabAutocompleteItem && ( <span className={styles.keyHelp}>{t('Hotkey.Tab')}</span> )} {!isPhonePortrait && highlighted && ( <span className={styles.keyHelp}>{t('Hotkey.Enter')}</span> )} {(item.type === SearchItemType.Recent || item.type === SearchItemType.Saved) && ( <button type="button" className={styles.deleteIcon} onClick={(e) => onClick(e, item)} title={t('Header.DeleteSearch')} > <AppIcon icon={closeIcon} /> </button> )} </> ) );
{ "pile_set_name": "Github" }
/-- This set of tests checks UTF-8 support with the DFA matching functionality of pcre_dfa_exec(), excluding Unicode property support. The -dfa flag must be used with pcretest when running it. --/ < forbid W /\x{100}ab/8 \x{100}ab /a\x{100}*b/8 ab a\x{100}b a\x{100}\x{100}b /a\x{100}+b/8 a\x{100}b a\x{100}\x{100}b *** Failers ab /\bX/8 Xoanon +Xoanon \x{300}Xoanon *** Failers YXoanon /\BX/8 YXoanon *** Failers Xoanon +Xoanon \x{300}Xoanon /X\b/8 X+oanon ZX\x{300}oanon FAX *** Failers Xoanon /X\B/8 Xoanon *** Failers X+oanon ZX\x{300}oanon FAX /[^a]/8 abcd a\x{100} /^[abc\x{123}\x{400}-\x{402}]{2,3}\d/8 ab99 \x{123}\x{123}45 \x{400}\x{401}\x{402}6 *** Failers d99 \x{123}\x{122}4 \x{400}\x{403}6 \x{400}\x{401}\x{402}\x{402}6 /a.b/8 acb a\x7fb a\x{100}b *** Failers a\nb /a(.{3})b/8 a\x{4000}xyb a\x{4000}\x7fyb a\x{4000}\x{100}yb *** Failers a\x{4000}b ac\ncb /a(.*?)(.)/ a\xc0\x88b /a(.*?)(.)/8 a\x{100}b /a(.*)(.)/ a\xc0\x88b /a(.*)(.)/8 a\x{100}b /a(.)(.)/ a\xc0\x92bcd /a(.)(.)/8 a\x{240}bcd /a(.?)(.)/ a\xc0\x92bcd /a(.?)(.)/8 a\x{240}bcd /a(.??)(.)/ a\xc0\x92bcd /a(.??)(.)/8 a\x{240}bcd /a(.{3})b/8 a\x{1234}xyb a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b *** Failers a\x{1234}b ac\ncb /a(.{3,})b/8 a\x{1234}xyb a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b *** Failers a\x{1234}b /a(.{3,}?)b/8 a\x{1234}xyb a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b *** Failers a\x{1234}b /a(.{3,5})b/8 a\x{1234}xyb a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b axbxxbcdefghijb axxxxxbcdefghijb *** Failers a\x{1234}b axxxxxxbcdefghijb /a(.{3,5}?)b/8 a\x{1234}xyb a\x{1234}\x{4321}yb a\x{1234}\x{4321}\x{3412}b axxxxbcdefghijb a\x{1234}\x{4321}\x{3412}\x{3421}b axbxxbcdefghijb axxxxxbcdefghijb *** Failers a\x{1234}b axxxxxxbcdefghijb /^[a\x{c0}]/8 *** Failers \x{100} /(?<=aXb)cd/8 aXbcd /(?<=a\x{100}b)cd/8 a\x{100}bcd /(?<=a\x{100000}b)cd/8 a\x{100000}bcd /(?:\x{100}){3}b/8 \x{100}\x{100}\x{100}b *** Failers \x{100}\x{100}b /\x{ab}/8 \x{ab} \xc2\xab *** Failers \x00{ab} /(?<=(.))X/8 WXYZ \x{256}XYZ *** Failers XYZ /[^a]+/8g bcd \x{100}aY\x{256}Z /^[^a]{2}/8 \x{100}bc /^[^a]{2,}/8 \x{100}bcAa /^[^a]{2,}?/8 \x{100}bca /[^a]+/8ig bcd \x{100}aY\x{256}Z /^[^a]{2}/8i \x{100}bc /^[^a]{2,}/8i \x{100}bcAa /^[^a]{2,}?/8i \x{100}bca /\x{100}{0,0}/8 abcd /\x{100}?/8 abcd \x{100}\x{100} /\x{100}{0,3}/8 \x{100}\x{100} \x{100}\x{100}\x{100}\x{100} /\x{100}*/8 abce \x{100}\x{100}\x{100}\x{100} /\x{100}{1,1}/8 abcd\x{100}\x{100}\x{100}\x{100} /\x{100}{1,3}/8 abcd\x{100}\x{100}\x{100}\x{100} /\x{100}+/8 abcd\x{100}\x{100}\x{100}\x{100} /\x{100}{3}/8 abcd\x{100}\x{100}\x{100}XX /\x{100}{3,5}/8 abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX /\x{100}{3,}/8O abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX /(?<=a\x{100}{2}b)X/8 Xyyya\x{100}\x{100}bXzzz /\D*/8O aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /\D*/8O \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} /\D/8 1X2 1\x{100}2 />\S/8 > >X Y > >\x{100} Y /\d/8 \x{100}3 /\s/8 \x{100} X /\D+/8 12abcd34 *** Failers 1234 /\D{2,3}/8 12abcd34 12ab34 *** Failers 1234 12a34 /\D{2,3}?/8 12abcd34 12ab34 *** Failers 1234 12a34 /\d+/8 12abcd34 *** Failers /\d{2,3}/8 12abcd34 1234abcd *** Failers 1.4 /\d{2,3}?/8 12abcd34 1234abcd *** Failers 1.4 /\S+/8 12abcd34 *** Failers \ \ /\S{2,3}/8 12abcd34 1234abcd *** Failers \ \ /\S{2,3}?/8 12abcd34 1234abcd *** Failers \ \ />\s+</8 12> <34 *** Failers />\s{2,3}</8 ab> <cd ab> <ce *** Failers ab> <cd />\s{2,3}?</8 ab> <cd ab> <ce *** Failers ab> <cd /\w+/8 12 34 *** Failers +++=*! /\w{2,3}/8 ab cd abcd ce *** Failers a.b.c /\w{2,3}?/8 ab cd abcd ce *** Failers a.b.c /\W+/8 12====34 *** Failers abcd /\W{2,3}/8 ab====cd ab==cd *** Failers a.b.c /\W{2,3}?/8 ab====cd ab==cd *** Failers a.b.c /[\x{100}]/8 \x{100} Z\x{100} \x{100}Z *** Failers /[Z\x{100}]/8 Z\x{100} \x{100} \x{100}Z *** Failers /[\x{100}\x{200}]/8 ab\x{100}cd ab\x{200}cd *** Failers /[\x{100}-\x{200}]/8 ab\x{100}cd ab\x{200}cd ab\x{111}cd *** Failers /[z-\x{200}]/8 ab\x{100}cd ab\x{200}cd ab\x{111}cd abzcd ab|cd *** Failers /[Q\x{100}\x{200}]/8 ab\x{100}cd ab\x{200}cd Q? *** Failers /[Q\x{100}-\x{200}]/8 ab\x{100}cd ab\x{200}cd ab\x{111}cd Q? *** Failers /[Qz-\x{200}]/8 ab\x{100}cd ab\x{200}cd ab\x{111}cd abzcd ab|cd Q? *** Failers /[\x{100}\x{200}]{1,3}/8 ab\x{100}cd ab\x{200}cd ab\x{200}\x{100}\x{200}\x{100}cd *** Failers /[\x{100}\x{200}]{1,3}?/8 ab\x{100}cd ab\x{200}cd ab\x{200}\x{100}\x{200}\x{100}cd *** Failers /[Q\x{100}\x{200}]{1,3}/8 ab\x{100}cd ab\x{200}cd ab\x{200}\x{100}\x{200}\x{100}cd *** Failers /[Q\x{100}\x{200}]{1,3}?/8 ab\x{100}cd ab\x{200}cd ab\x{200}\x{100}\x{200}\x{100}cd *** Failers /(?<=[\x{100}\x{200}])X/8 abc\x{200}X abc\x{100}X *** Failers X /(?<=[Q\x{100}\x{200}])X/8 abc\x{200}X abc\x{100}X abQX *** Failers X /(?<=[\x{100}\x{200}]{3})X/8 abc\x{100}\x{200}\x{100}X *** Failers abc\x{200}X X /[^\x{100}\x{200}]X/8 AX \x{150}X \x{500}X *** Failers \x{100}X \x{200}X /[^Q\x{100}\x{200}]X/8 AX \x{150}X \x{500}X *** Failers \x{100}X \x{200}X QX /[^\x{100}-\x{200}]X/8 AX \x{500}X *** Failers \x{100}X \x{150}X \x{200}X /[z-\x{100}]/8i z Z \x{100} *** Failers \x{102} y /[\xFF]/ >\xff< /[\xff]/8 >\x{ff}< /[^\xFF]/ XYZ /[^\xff]/8 XYZ \x{123} /^[ac]*b/8 xb /^[ac\x{100}]*b/8 xb /^[^x]*b/8i xb /^[^x]*b/8 xb /^\d*b/8 xb /(|a)/g8 catac a\x{256}a /^\x{85}$/8i \x{85} /^abc./mgx8<any> abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK /abc.$/mgx8<any> abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9 /^a\Rb/8<bsr_unicode> a\nb a\rb a\r\nb a\x0bb a\x0cb a\x{85}b a\x{2028}b a\x{2029}b ** Failers a\n\rb /^a\R*b/8<bsr_unicode> ab a\nb a\rb a\r\nb a\x0bb a\x0c\x{2028}\x{2029}b a\x{85}b a\n\rb a\n\r\x{85}\x0cb /^a\R+b/8<bsr_unicode> a\nb a\rb a\r\nb a\x0bb a\x0c\x{2028}\x{2029}b a\x{85}b a\n\rb a\n\r\x{85}\x0cb ** Failers ab /^a\R{1,3}b/8<bsr_unicode> a\nb a\n\rb a\n\r\x{85}b a\r\n\r\nb a\r\n\r\n\r\nb a\n\r\n\rb a\n\n\r\nb ** Failers a\n\n\n\rb a\r /\h+\V?\v{3,4}/8O \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a /\V?\v{3,4}/8O \x20\x{a0}X\x0a\x0b\x0c\x0d\x0a /\h+\V?\v{3,4}/8O >\x09\x20\x{a0}X\x0a\x0a\x0a< /\V?\v{3,4}/8O >\x09\x20\x{a0}X\x0a\x0a\x0a< /\H\h\V\v/8 X X\x0a X\x09X\x0b ** Failers \x{a0} X\x0a /\H*\h+\V?\v{3,4}/8O \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a \x09\x20\x{a0}\x0a\x0b\x0c ** Failers \x09\x20\x{a0}\x0a\x0b /\H\h\V\v/8 \x{3001}\x{3000}\x{2030}\x{2028} X\x{180e}X\x{85} ** Failers \x{2009} X\x0a /\H*\h+\V?\v{3,4}/8O \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a \x09\x20\x{202f}\x0a\x0b\x0c ** Failers \x09\x{200a}\x{a0}\x{2028}\x0b /a\Rb/I8<bsr_anycrlf> a\rb a\nb a\r\nb ** Failers a\x{85}b a\x0bb /a\Rb/I8<bsr_unicode> a\rb a\nb a\r\nb a\x{85}b a\x0bb ** Failers a\x{85}b\<bsr_anycrlf> a\x0bb\<bsr_anycrlf> /a\R?b/I8<bsr_anycrlf> a\rb a\nb a\r\nb ** Failers a\x{85}b a\x0bb /a\R?b/I8<bsr_unicode> a\rb a\nb a\r\nb a\x{85}b a\x0bb ** Failers a\x{85}b\<bsr_anycrlf> a\x0bb\<bsr_anycrlf> /X/8f<any> A\x{1ec5}ABCXYZ /abcd*/8 xxxxabcd\P xxxxabcd\P\P /abcd*/i8 xxxxabcd\P xxxxabcd\P\P XXXXABCD\P XXXXABCD\P\P /abc\d*/8 xxxxabc1\P xxxxabc1\P\P /abc[de]*/8 xxxxabcde\P xxxxabcde\P\P /\bthe cat\b/8 the cat\P the cat\P\P /ab\Cde/8 abXde /(?<=ab\Cde)X/8 /./8<CRLF> \r\P \r\P\P /.{2,3}/8<CRLF> \r\P \r\P\P \r\r\P \r\r\P\P \r\r\r\P \r\r\r\P\P /.{2,3}?/8<CRLF> \r\P \r\P\P \r\r\P \r\r\P\P \r\r\r\P \r\r\r\P\P /[^\x{100}]/8 \x{100}\x{101}X /[^\x{100}]+/8 \x{100}\x{101}X /-- End of testinput9 --/
{ "pile_set_name": "Github" }
-----BEGIN CERTIFICATE----- MIIDyzCCArOgAwIBAgIHBHKzevbk7DANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE BhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExEjAQBgNVBAcMCUxvcyBHYXRvczEU MBIGA1UECgwLTmV0ZmxpeCBJbmMxLTArBgNVBAsMJFBsYXRmb3JtIFNlY3VyaXR5 ICgxMjUyMDE0OTIxOTQxNTk0KTEbMBkGA1UEAwwSTG9jYWwgUm9vdCBmb3IgODA1 MB4XDTIwMDcxNDAzMTU1NFoXDTIxMDcxNDAzMDk0NFowgZ0xCzAJBgNVBAYTAlVT MRMwEQYDVQQIDApDYWxpZm9ybmlhMRIwEAYDVQQHDAlMb3MgR2F0b3MxFDASBgNV BAoMC05ldGZsaXggSW5jMS0wKwYDVQQLDCRQbGF0Zm9ybSBTZWN1cml0eSAoMTI1 MjAxNTA5NDUzODQ2MykxIDAeBgNVBAMMF0ludGVybWVkaWF0ZSBDQSBmb3IgODA1 MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyGEreKwwOPdI4VETKOxu DJpd1i/xIjzYYbTTcsBU3fee1a1VfkY+SKD4tHxrVHraXQJ6iDh8jQIRIPuPr/kg z7poXUnTrI/S2n+3aiFJexfZk+qkLzqiKc29QXXnkJUxJv0pjFprtkLlztNUgSg1 DyksRzrxA9n0V9tm7MO+zUDIUIbgp5h64N85NLbRqhLtlcC0TCTEOl5HVNZnHho1 SXYGi93p/+ztH2e423d4vgSReXjK0/fkCBSuGACu6WUpXgjC02fxmps31vGYrG92 JODvfOMYWruL2n2YkRfc0eUeoZTvprn6ZpWD5nphF7/UwuoWTtErHLZMKlv+sXrD PQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAs ycRpVXjW7Rg8lT84r0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EjAQBgNVBAcMCUxvcyBH YXRvczEUMBIGA1UECgwLTmV0ZmxpeCBJbmMxLTArBgNVBAsMJFBsYXRmb3JtIFNl Y3VyaXR5ICgxMjUxNjQ1MDA4NDUxNjU2KTEmMCQGA1UEAwwdTmFtZSBDb25zdHJh aW50cyBUZXN0IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB AQCiIhD8HJBlLveXSen5+3nyOOA4HM8H/SDGR7ufNeSHmkdSh7s4fm4pmzNEpDz7 UVv403NnSqE4PsunMx5H7OK8C0E6vUmOIGRmHvSxHbP7bleko4SR9jJ7T3RU1HpJ BYESszrbAvoYEwpyUI6a20bmokAHOgU/BN1SIyMzacVVwhDmmQOcDc37SUSCFKen Clavf1vgtt15SE3oZF7GN8M4SSF/8aKcypt3xaGE0HvRVu9JRBDjIU7GMLcYnWV3 /6UC1GuwgvA9sEGS857kOcwt5V5vF8FHrfXv63/1QcOyWXuGL2oHUqwuKP9lTgkc LZUdXczvLrtW1dxtg05tU6VDAgMBAAGjEzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJ KoZIhvcNAQELBQADggEBAErEOumWJjc7bgQQmnviDl075fnYHidlY5SkjdwFcSCK ZSolT8z7xvtpW10mbM8msvzNreLmNBASEiP7NlI4bxZpQJ1RJ1tR0ybe2cD0171A 23/1kza49x+3IorUwQZrRSAksBpNqggMbmgqy3lMlNy8V2EtmO2I/4C5nsN8/uys j6JmeEcJFa7rr4YgYsDZwosIOX7XQDy3Xb7rJEmLpRs+VmjbgsT/0ncqkfLqDJ5+ UtBofdpGTqCk+0rJf1sVDEtZp/wYo1236W5AAAeWrFlM7ht3CZdQCBsoV4pZ5m6h 2+oC85m5hDidnH5/0Er88jR9kHxdM5dJNOU+vdY/XpA= -----END CERTIFICATE-----
{ "pile_set_name": "Github" }
Materials: 1 "red middle" 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.898039 0.898039 0.898039 1.000000 0.000000 0.000000 0.000000 1.000000 12.799999 1.000000 "_mine ani tex.ini" ""
{ "pile_set_name": "Github" }
import { EntryPoint, EntryPointComponent, EnvironmentProviderOptions, IEnvironmentProvider } from './EntryPointTypes'; export type EntryPointContainerProps< TEntryPointParams, TPreloadedQueries, TPreloadedEntryPoints, TRuntimeProps, TExtraProps > = Readonly< Readonly<{ entryPoint: EntryPoint< TEntryPointParams, EntryPointComponent<TPreloadedQueries, TPreloadedEntryPoints, TRuntimeProps, TExtraProps> >; entryPointParams: TEntryPointParams; environmentProvider?: IEnvironmentProvider<EnvironmentProviderOptions>; props: TRuntimeProps; }> >; export function LazyLoadEntryPointContainer< TEntryPointParams extends {}, TPreloadedQueries extends {}, TPreloadedEntryPoints extends {}, TRuntimeProps extends {}, TExtraProps >({ entryPoint, entryPointParams, props, environmentProvider, }: EntryPointContainerProps< // tslint:disable-next-line no-unnecessary-generics TEntryPointParams, // tslint:disable-next-line no-unnecessary-generics TPreloadedQueries, // tslint:disable-next-line no-unnecessary-generics TPreloadedEntryPoints, // tslint:disable-next-line no-unnecessary-generics TRuntimeProps, // tslint:disable-next-line no-unnecessary-generics TExtraProps >): JSX.Element;
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="9,00" Name="libfguid" ProjectGUID="{95F707BA-7F1D-4EE0-BDC1-71AC6BEF7048}" RootNamespace="libfguid" TargetFrameworkVersion="131072" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="4" CharacterSet="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror" PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID" RuntimeLibrary="2" WarningLevel="4" CompileAs="1" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)\$(ProjectName).lib" ModuleDefinitionFile="" IgnoreAllDefaultLibraries="false" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="VSDebug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="4" CharacterSet="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror" PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID" BasicRuntimeChecks="3" SmallerTypeCheck="true" RuntimeLibrary="3" WarningLevel="4" DebugInformationFormat="3" CompileAs="1" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLibrarianTool" OutputFile="$(OutDir)\$(ProjectName).lib" ModuleDefinitionFile="" IgnoreAllDefaultLibraries="false" /> <Tool Name="VCALinkTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File RelativePath="..\..\libfguid\libfguid_error.c" > </File> <File RelativePath="..\..\libfguid\libfguid_identifier.c" > </File> <File RelativePath="..\..\libfguid\libfguid_support.c" > </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > <File RelativePath="..\..\libfguid\libfguid_definitions.h" > </File> <File RelativePath="..\..\libfguid\libfguid_error.h" > </File> <File RelativePath="..\..\libfguid\libfguid_extern.h" > </File> <File RelativePath="..\..\libfguid\libfguid_identifier.h" > </File> <File RelativePath="..\..\libfguid\libfguid_libcerror.h" > </File> <File RelativePath="..\..\libfguid\libfguid_support.h" > </File> <File RelativePath="..\..\libfguid\libfguid_types.h" > </File> <File RelativePath="..\..\libfguid\libfguid_unused.h" > </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" > </Filter> </Files> <Globals> </Globals> </VisualStudioProject>
{ "pile_set_name": "Github" }
import itertools import numpy import six from chainer.backends import cuda from chainer.utils.conv import get_conv_outsize from chainer.utils import conv_nd_kernel def as_tuple(x, n): if hasattr(x, '__getitem__'): assert len(x) == n return tuple(x) return (x,) * n def im2col_nd_cpu(img, ksize, stride, pad, pval=0, cover_all=False, dilate=1): n, c = img.shape[0:2] # (n, c, d_1, d_2, ..., d_N) dims = img.shape[2:] ndim = len(dims) dilate = as_tuple(dilate, ndim) assert ndim == len(ksize) == len(stride) == len(pad) outs = tuple(get_conv_outsize(d, k, s, p, cover_all, di) for (d, k, s, p, di) in zip(dims, ksize, stride, pad, dilate)) assert all(out > 0 for out in outs), 'Output sizes should be positive.' # Pad around image. pad_width = ((0, 0), (0, 0)) + tuple( (p, p + s - 1) for (s, p) in zip(stride, pad)) img = numpy.pad(img, pad_width, mode='constant', constant_values=(pval,)) # Make patch array with which we will compute correlation with filter. # shape: (n, c, k_1, k_2, ..., k_N, out_1, out_2, ..., out_N) shape = (n, c) + ksize + outs col = numpy.ndarray(shape, dtype=img.dtype) # Fill the patch array. colon = slice(None) for kxs in itertools.product(*[six.moves.range(k) for k in ksize]): # col[:, :, kx_1, kx_2, ..., kx_N, :, :, ..., :] col_index = (colon, colon) + kxs + (colon,) * ndim # img[:, :, kx_1:kx_lim_1:s_1, ..., kx_N:kx_lim_N:s_N] kx_dilate = tuple(kx * di for (kx, di) in zip(kxs, dilate)) kx_lims = tuple(kx_di + s * out for (kx_di, s, out) in zip(kx_dilate, stride, outs)) img_index = (colon, colon) + tuple( slice(kx_di, kx_lim, s) for (kx_di, kx_lim, s) in zip(kx_dilate, kx_lims, stride)) col[col_index] = img[img_index] return col def im2col_nd_gpu(img, ksize, stride, pad, cover_all=False, dilate=1): n, c = img.shape[0:2] # (n, c, d_1, d_2, ..., d_N) dims = img.shape[2:] ndim = len(dims) dilate = as_tuple(dilate, ndim) assert ndim == len(ksize) == len(stride) == len(pad) outs = tuple(get_conv_outsize(d, k, s, p, cover_all, di) for (d, k, s, p, di) in zip(dims, ksize, stride, pad, dilate)) assert all(out > 0 for out in outs), 'Output sizes should be positive.' # col_shape: (n, c, k_1, k_2, ..., k_N, out_1, out_2, ..., out_N) shape = (n, c) + ksize + outs col = cuda.cupy.empty(shape, dtype=img.dtype) in_params, out_params, operation, name = \ conv_nd_kernel.Im2colNDKernel.generate(ndim) cuda.elementwise(in_params, out_params, operation, name)( img.reduced_view(), *(dims + outs + ksize + stride + pad + dilate + (col,))) return col def im2col_nd(img, ksize, stride, pad, cover_all=False, dilate=1): fn = im2col_nd_gpu if isinstance(img, cuda.ndarray) else im2col_nd_cpu return fn(img, ksize, stride, pad, cover_all=cover_all, dilate=dilate) def col2im_nd_cpu(col, stride, pad, dims, dilate=1): n, c = col.shape[:2] # (n, c, kx_1, ..., kx_N, out_1, ..., out_N) mid = (len(col.shape) - 2) // 2 + 2 ksize = col.shape[2:mid] outs = col.shape[mid:] colon = slice(None) ndim = len(outs) dilate = as_tuple(dilate, ndim) assert len(ksize) == len(stride) == len(pad) == len(dims) == ndim # Image with padded size. img_shape = (n, c) + tuple(d + 2 * p + s - 1 for (d, p, s) in zip(dims, pad, stride)) img = numpy.zeros(img_shape, dtype=col.dtype) for kxs in itertools.product(*[six.moves.range(k) for k in ksize]): # (:, :, kx_1:kx_lim_1:s_1, ..., kx_N:kx_lim_N:s_N) kx_dilate = tuple(kx * di for (kx, di) in zip(kxs, dilate)) kx_lims = tuple(kx_di + s * out for (kx_di, s, out) in zip(kx_dilate, stride, outs)) img_index = (colon, colon) + tuple( slice(kx_di, kx_lim, s) for (kx_di, kx_lim, s) in zip(kx_dilate, kx_lims, stride)) # (:, :, kx_1, kx_2, ..., kx_N, :, :, ..., :) col_index = (colon, colon) + kxs + (colon,) * len(outs) img[img_index] += col[col_index] # (:, :, p_1:d_1 + p_1, p_2:d_2 + p_2, ..., p_N:d_N + p_N] img_index = (colon, colon) + tuple( slice(p, d + p) for (p, d) in zip(pad, dims)) return img[img_index] def col2im_nd_gpu(col, stride, pad, dims, dilate=1): n, c = col.shape[:2] # (n, c, k_1, ..., k_N, out_1, ..., out_N) mid = (len(col.shape) - 2) // 2 + 2 ksize = col.shape[2:mid] outs = col.shape[mid:] ndim = len(dims) dilate = as_tuple(dilate, ndim) assert len(outs) == len(ksize) == len(stride) == len(pad) == ndim img_shape = (n, c) + dims # (n, c, d_1, d_2, ..., d_N) img = cuda.cupy.empty(img_shape, dtype=col.dtype) in_params, out_params, operation, name = \ conv_nd_kernel.Col2imNDKernel.generate(ndim) cuda.elementwise(in_params, out_params, operation, name)( col.reduced_view(), *(dims + outs + ksize + stride + pad + dilate + (img,))) return img def col2im_nd(col, stride, pad, dims, dilate=1): fn = col2im_nd_gpu if isinstance(col, cuda.ndarray) else col2im_nd_cpu return fn(col, stride, pad, dims, dilate)
{ "pile_set_name": "Github" }
@model Page<RuleListDto> @{ ViewData["Title"] = "自动回复"; Layout = "~/Views/Shared/_LayoutJQ.cshtml"; } @section scripts{ <script> $(function () { $('.jquery-pager').pager({ currentPageName: 'PageIndex', pageSizeName: 'PageSize' }); $('#Rule_Index_2').click(function () { utils.menu.open({ dataUrl: '/Weixin/Rule/Show', menuName: '新增规则', }); }); $('a[name=editrule]').click(function () { var id = $(this).attr('data-id'); utils.menu.open({ dataUrl: '/Weixin/Rule/Show?id=' + id, menuName: '编辑规则', }); }); }); </script> } <div class="wrapper-content"> <div class="row"> <div class="ibox"> <div class="ibox-title text-right"> @await Component.InvokeAsync("Menu") </div> <div class="ibox-content"> <div class="full-height-scroll"> <div class="table-responsive"> <table class="table table-striped table-hover table-bordered"> <thead> <tr> <th class="w50"><input type="checkbox" id="ms_checkall" class="i-checks" /></th> <th class="w200">规则名称</th> <th class="w200">规则类型</th> <th class="w200">规则接收请求类型</th> <th class="w200">规则响应消息类型</th> <th>关键词</th> <th class="w100 text-center">操作</th> </tr> </thead> <tbody> @foreach (var item in Model.Items) { <tr> <td> <input type="checkbox" class="i-checks" value="@item.Id" /> </td> <td>@item.RuleName</td> <td> @(((WxRuleType)item.RuleType).GetDescription()) </td> <td> @(((RequestMsgType)item.RequestMsgType).GetDescription()) </td> <td> @(((ResponseMsgType)item.ResponseMsgType).GetDescription()) </td> <td>@item.Keywords</td> <td class="text-center"><a name="editrule" data-id="@item.Id">编辑</a></td> </tr> } </tbody> </table> </div> </div> <div class="jquery-pager" data-pageindex="@Model.PageIndex" data-pagesize="@Model.PageSize" data-datacount="@Model.TotalItems"></div> </div> </div> </div> </div>
{ "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 org.apache.flink.table.codegen.calls import org.apache.flink.api.common.typeinfo.TypeInformation import org.apache.flink.table.codegen.CodeGenUtils._ import org.apache.flink.table.codegen.{CodeGenerator, GeneratedExpression} import org.apache.flink.table.typeutils.TypeCheckUtils trait CallGenerator { def generate( codeGenerator: CodeGenerator, operands: Seq[GeneratedExpression]) : GeneratedExpression } object CallGenerator { /** * Generates a call with a single result statement. */ def generateCallIfArgsNotNull( nullCheck: Boolean, returnType: TypeInformation[_], operands: Seq[GeneratedExpression]) (call: (Seq[String]) => String) : GeneratedExpression = { generateCallWithStmtIfArgsNotNull(nullCheck, returnType, operands) { (terms) => (None, call(terms)) } } /** * Generates a call with auxiliary statements and result expression. */ def generateCallWithStmtIfArgsNotNull( nullCheck: Boolean, returnType: TypeInformation[_], operands: Seq[GeneratedExpression]) (call: (Seq[String]) => (Option[String], String)) : GeneratedExpression = { val resultTerm = newName("result") val nullTerm = newName("isNull") val resultTypeTerm = primitiveTypeTermForTypeInfo(returnType) val defaultValue = primitiveDefaultValue(returnType) val (auxiliaryStmt, result) = call(operands.map(_.resultTerm)) val nullTermCode = if ( nullCheck && isReference(returnType) && !TypeCheckUtils.isTemporal(returnType)) { s""" |$nullTerm = ($resultTerm == null); """.stripMargin } else { "" } val resultCode = if (nullCheck && operands.nonEmpty) { s""" |${operands.map(_.code).mkString("\n")} |boolean $nullTerm = ${operands.map(_.nullTerm).mkString(" || ")}; |$resultTypeTerm $resultTerm = $defaultValue; |if (!$nullTerm) { | ${auxiliaryStmt.getOrElse("")} | $resultTerm = $result; | $nullTermCode |} |""".stripMargin } else if (nullCheck && operands.isEmpty) { s""" |${operands.map(_.code).mkString("\n")} |boolean $nullTerm = false; |${auxiliaryStmt.getOrElse("")} |$resultTypeTerm $resultTerm = $result; |$nullTermCode |""".stripMargin } else{ s""" |boolean $nullTerm = false; |${operands.map(_.code).mkString("\n")} |${auxiliaryStmt.getOrElse("")} |$resultTypeTerm $resultTerm = $result; |""".stripMargin } GeneratedExpression(resultTerm, nullTerm, resultCode, returnType) } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <title>@ViewBag.Title</title> @Html.GetCommonScriptsAndStyles() @Html.LoadStylesAndScripts(Html.Action("GetBlogTheme", "Blog").ToString()) </head> <body> @Html.Partial("AdminLinks") <!-- end #header-wrapper --> <div id="header"> <div id="logo"> @Html.Action("Logo", "Blog") <p>@Html.Action("BlogCaption","Blog")</p> </div> <div id="menu"> @Html.Action("Pages", "ViewPage") <img id="more-pages" src="@Url.Content("~/Content/Images/arrow.png")" alt="more pages" /> </div> <!-- end #menu --> </div> <!-- end #header --> <hr /> <div id="wrapper"> <!-- end #logo --> <div id="slideshow"> <!-- start --> <div id="foobar"> <div id="slides"> <div class="viewer"> <div class="reel"> <div class="slide"><img src="/Themes/RacetrackPlaya/images/img04.jpg" width="960" height="335" alt="" /></div> <div class="slide"><img src="/Themes/RacetrackPlaya/images/img07.jpg" width="960" height="335" alt="" /></div> <div class="slide"><img src="/Themes/RacetrackPlaya/images/img08.jpg" width="960" height="335" alt="" /></div> </div> </div> <div class="nav"><span><a href="#" class="previous">Previous</a></span> <span><a href="#" class="next">Next</a></span></div> </div> </div> <script type="text/javascript"> $('#foobar').slidertron({ viewerSelector: '.viewer', reelSelector: '.viewer .reel', slidesSelector: '.viewer .reel .slide', navPreviousSelector: '.previous', navNextSelector: '.next', navFirstSelector: '.first', navLastSelector: '.last' }); </script> <!-- end --> </div> </div> <div id="page"> <div id="page-bgtop"> <div id="pagecontent"> @RenderBody() </div> <!-- end #content --> <div style="clear: both;">&nbsp;</div> </div> <!-- end #page --> </div> <div id="footer"> @Html.Action("BlogFooter", "Blog") @Html.Partial("SocialFeatures") </div> <!-- end #footer --> </body> </html>
{ "pile_set_name": "Github" }
; Copyright (c) 2009-2018 ARM Limited. All rights reserved. ; ; SPDX-License-Identifier: Apache-2.0 ; ; 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 ; ; 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. ; ; NOTICE: This file has been modified by Nordic Semiconductor ASA. ; The modules in this file are included in the libraries, and may be replaced ; by any user-defined modules that define the PUBLIC symbol _program_start or ; a user defined start symbol. ; To override the cstartup defined in the library, simply add your modified ; version to the workbench project. ; ; The vector table is normally located at address 0. ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. ; The name "__vector_table" has special meaning for C-SPY: ; it is where the SP start value is found, and the NVIC vector ; table register (VTOR) is initialized to this address if != 0. MODULE ?cstartup #if defined(__STARTUP_CONFIG) #include "startup_config.h" #ifndef __STARTUP_CONFIG_STACK_ALIGNEMENT #define __STARTUP_CONFIG_STACK_ALIGNEMENT 3 #endif SECTION CSTACK:DATA:NOROOT(__STARTUP_CONFIG_STACK_ALIGNEMENT) DS8 __STARTUP_CONFIG_STACK_SIZE SECTION HEAP:DATA:NOROOT(3) DS8 __STARTUP_CONFIG_HEAP_SIZE #else ;; Stack size default : Defined in *.icf (linker file). Can be modified inside EW. ;; Heap size default : Defined in *.icf (linker file). Can be modified inside EW. ;; Forward declaration of sections. SECTION CSTACK:DATA:NOROOT(3) #endif SECTION .intvec:CODE:NOROOT(2) EXTERN __iar_program_start EXTERN SystemInit PUBLIC __vector_table PUBLIC __Vectors PUBLIC __Vectors_End PUBLIC __Vectors_Size DATA __vector_table DCD sfe(CSTACK) DCD Reset_Handler DCD NMI_Handler DCD HardFault_Handler DCD MemoryManagement_Handler DCD BusFault_Handler DCD UsageFault_Handler DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD SVC_Handler DCD DebugMon_Handler DCD 0 ; Reserved DCD PendSV_Handler DCD SysTick_Handler ; External Interrupts DCD POWER_CLOCK_IRQHandler DCD RADIO_IRQHandler DCD UARTE0_UART0_IRQHandler DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler DCD NFCT_IRQHandler DCD GPIOTE_IRQHandler DCD SAADC_IRQHandler DCD TIMER0_IRQHandler DCD TIMER1_IRQHandler DCD TIMER2_IRQHandler DCD RTC0_IRQHandler DCD TEMP_IRQHandler DCD RNG_IRQHandler DCD ECB_IRQHandler DCD CCM_AAR_IRQHandler DCD WDT_IRQHandler DCD RTC1_IRQHandler DCD QDEC_IRQHandler DCD COMP_LPCOMP_IRQHandler DCD SWI0_EGU0_IRQHandler DCD SWI1_EGU1_IRQHandler DCD SWI2_EGU2_IRQHandler DCD SWI3_EGU3_IRQHandler DCD SWI4_EGU4_IRQHandler DCD SWI5_EGU5_IRQHandler DCD TIMER3_IRQHandler DCD TIMER4_IRQHandler DCD PWM0_IRQHandler DCD PDM_IRQHandler DCD 0 ; Reserved DCD 0 ; Reserved DCD MWU_IRQHandler DCD PWM1_IRQHandler DCD PWM2_IRQHandler DCD SPIM2_SPIS2_SPI2_IRQHandler DCD RTC2_IRQHandler DCD I2S_IRQHandler DCD FPU_IRQHandler DCD USBD_IRQHandler DCD UARTE1_IRQHandler DCD QSPI_IRQHandler DCD CRYPTOCELL_IRQHandler DCD 0 ; Reserved DCD 0 ; Reserved DCD PWM3_IRQHandler DCD 0 ; Reserved DCD SPIM3_IRQHandler DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved __Vectors_End __Vectors EQU __vector_table __Vectors_Size EQU __Vectors_End - __Vectors ; Default handlers. THUMB PUBWEAK Reset_Handler SECTION .text:CODE:REORDER:NOROOT(2) Reset_Handler LDR R0, =SystemInit BLX R0 LDR R0, =__iar_program_start BX R0 ; Dummy exception handlers PUBWEAK NMI_Handler SECTION .text:CODE:REORDER:NOROOT(1) NMI_Handler B . PUBWEAK HardFault_Handler SECTION .text:CODE:REORDER:NOROOT(1) HardFault_Handler B . PUBWEAK MemoryManagement_Handler SECTION .text:CODE:REORDER:NOROOT(1) MemoryManagement_Handler B . PUBWEAK BusFault_Handler SECTION .text:CODE:REORDER:NOROOT(1) BusFault_Handler B . PUBWEAK UsageFault_Handler SECTION .text:CODE:REORDER:NOROOT(1) UsageFault_Handler B . PUBWEAK SVC_Handler SECTION .text:CODE:REORDER:NOROOT(1) SVC_Handler B . PUBWEAK DebugMon_Handler SECTION .text:CODE:REORDER:NOROOT(1) DebugMon_Handler B . PUBWEAK PendSV_Handler SECTION .text:CODE:REORDER:NOROOT(1) PendSV_Handler B . PUBWEAK SysTick_Handler SECTION .text:CODE:REORDER:NOROOT(1) SysTick_Handler B . ; Dummy interrupt handlers PUBWEAK POWER_CLOCK_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) POWER_CLOCK_IRQHandler B . PUBWEAK RADIO_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RADIO_IRQHandler B . PUBWEAK UARTE0_UART0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) UARTE0_UART0_IRQHandler B . PUBWEAK SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler B . PUBWEAK SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler B . PUBWEAK NFCT_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) NFCT_IRQHandler B . PUBWEAK GPIOTE_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) GPIOTE_IRQHandler B . PUBWEAK SAADC_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SAADC_IRQHandler B . PUBWEAK TIMER0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER0_IRQHandler B . PUBWEAK TIMER1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER1_IRQHandler B . PUBWEAK TIMER2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER2_IRQHandler B . PUBWEAK RTC0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RTC0_IRQHandler B . PUBWEAK TEMP_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TEMP_IRQHandler B . PUBWEAK RNG_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RNG_IRQHandler B . PUBWEAK ECB_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) ECB_IRQHandler B . PUBWEAK CCM_AAR_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) CCM_AAR_IRQHandler B . PUBWEAK WDT_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) WDT_IRQHandler B . PUBWEAK RTC1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RTC1_IRQHandler B . PUBWEAK QDEC_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) QDEC_IRQHandler B . PUBWEAK COMP_LPCOMP_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) COMP_LPCOMP_IRQHandler B . PUBWEAK SWI0_EGU0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI0_EGU0_IRQHandler B . PUBWEAK SWI1_EGU1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI1_EGU1_IRQHandler B . PUBWEAK SWI2_EGU2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI2_EGU2_IRQHandler B . PUBWEAK SWI3_EGU3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI3_EGU3_IRQHandler B . PUBWEAK SWI4_EGU4_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI4_EGU4_IRQHandler B . PUBWEAK SWI5_EGU5_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI5_EGU5_IRQHandler B . PUBWEAK TIMER3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER3_IRQHandler B . PUBWEAK TIMER4_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER4_IRQHandler B . PUBWEAK PWM0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM0_IRQHandler B . PUBWEAK PDM_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PDM_IRQHandler B . PUBWEAK MWU_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) MWU_IRQHandler B . PUBWEAK PWM1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM1_IRQHandler B . PUBWEAK PWM2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM2_IRQHandler B . PUBWEAK SPIM2_SPIS2_SPI2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM2_SPIS2_SPI2_IRQHandler B . PUBWEAK RTC2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RTC2_IRQHandler B . PUBWEAK I2S_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) I2S_IRQHandler B . PUBWEAK FPU_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) FPU_IRQHandler B . PUBWEAK USBD_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) USBD_IRQHandler B . PUBWEAK UARTE1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) UARTE1_IRQHandler B . PUBWEAK QSPI_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) QSPI_IRQHandler B . PUBWEAK CRYPTOCELL_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) CRYPTOCELL_IRQHandler B . PUBWEAK PWM3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM3_IRQHandler B . PUBWEAK SPIM3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM3_IRQHandler B . END
{ "pile_set_name": "Github" }
## 提交挖宝行动案例文件夹命名格式: 华为云账号 + 案例描述 (文件夹里包含数据+代码+设计文档) ## 提交的案例将遵循本社区的LICENSE协议Apache2.0共享 ### 挖宝行动详情描述: ### 挖宝行动详情描述: https://bbs.huaweicloud.com/forum/thread-24461-1-1.html
{ "pile_set_name": "Github" }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`NewTabLink handles children 1`] = ` <StyledLinkBase className="insights-link" href="test" target="_blank" > link text </StyledLinkBase> `; exports[`NewTabLink renders content with custom className 1`] = ` <StyledLinkBase className="insights-link custom-class" href="test" target="_blank" /> `; exports[`NewTabLink renders content without custom className 1`] = ` <StyledLinkBase className="insights-link" href="test" target="_blank" /> `;
{ "pile_set_name": "Github" }