text:
html{
    -webkit-filter:invert(100%);
    -moz-filter:invert(100%);
    -o-filter:invert(100%);
    -ms-filter:invert(100%);
}

iframe{
    -webkit-filter:invert(100%);
    -moz-filter:invert(100%);
    -o-filter:invert(100%);
    -ms-filter:invert(100%);
}

body {
    margin: 0px;
    padding: 0px;
    height: 100%;
    font-family: verdana, sans-serif;
    font-size: 75%;
}

div.top {
    position: fixed;
    font-size: 80%;
    top: 0px;
    left: 0px;
    right: 0px;
    margin: 0px;
    padding: 0px;
    margin: 0px;
    vertical-align: middle;
    height: 25px;
    background: url('/new_images/top_bar_bg.png') repeat-x;
    box-shadow: 0px 2px 3px #969696;
    -webkit-box-shadow: 0px 2px 3px #969696;
    z-index: 2;
}

div.bottom {
    position: fixed;
    font-size: 80%;
    bottom: 0px;
    left: 0px;
    right: 0px;
    margin: 0px;
    padding: 0px;
    margin-top: 5px;
    vertical-align: middle;
    height: 25px;
    background: url('/new_images/top_bar_bg.png') repeat-x;
    box-shadow: 0px -2px 3px #969696;
    -webkit-box-shadow: 0px -2px 3px #969696;
    z-index: 2;
}

div.bottom span.left {
    float: left;
    height: 25px;
    width: auto;
    border-left: 1px solid #333;
    border-right: 1px solid #bbb;
    margin: 0px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 5px;
    color: #ddd;
    text-shadow: #111 1px 1px 1px;
    vertical-align: middle;
    text-align: center;
}

div.bottom span.right {
    float: right;
    height: 25px;
    width: auto;
    border-left: 1px solid #bbb;
    border-right: 1px solid #333;
    margin: 0px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 5px;
    color: #ddd;
    text-shadow: #111 1px 1px 1px;
    vertical-align: middle;
    text-align: center;
}

div.left {
    display: inline;
    position: fixed;
    top: 25px;
    left: 0px;
    margin: 0px;
    padding: 0px;
    width: 145px;
    height: auto;
    z-index: 1;
    box-shadow: 2px 2px 3px #969696;
    -webkit-box-shadow: 2px 2px 3px #969696;
}

div.right {
    position: absolute;
    top: 25px;
    left: 0px;
    right: 0px;
    bottom: 30px;
    padding: 0px;
    margin: 0px;
}

div.logo {
    width: 145px;
    height: 150px;
    background: #dfdfdf url('/new_images/menu_item_shadow.png') repeat-y;
    border-bottom: 1px solid #dfdfdf;
    padding: 0px;
    margin: 0px;
}

img.login_logo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 60%;
    left: 0;
    width: 145px;
    height: 150px;
    margin: auto;
}

div.logo a img {
    border: 0px;
}

div.navigation {
    display: none;
    top: 0px;
    left: 0px;
    width: 145px;
    background: #dfdfdf
    border-right: 1px solid #dfdfdf;
    padding: 0px;
    margin: 0px;
    z-index: 1;
}

div.top_item button.nav_menu_button {
    padding-left: 2px;
    padding-right: 2px;
    border: 1px solid #aaa;
    background: transparent;
    color: #ddd;
    width: 20px;
    text-shadow: #111 1px 1px 1px;
    cursor: pointer;
}

li.mmenu_item span {
    color: #3399FF;
    cursor: default;
    display: inline;
    font-weight: bold;
    margin-left: 0px;
    padding: 10px 5px 5px 5px;
    width: 145px;
    text-decoration: none;
    vertical-align: middle;
}

span.nav-menu-icon {
    background: center center no-repeat transparent;
    padding-top: 2px;
    margin-top: 5px;
    display: block;
    width: 18px;
    height: 18px;
    background: url('/images/preferences.png') no-repeat;
    background-size: 15px 15px;
}

#nav-menu li a {
    margin-left: 20px;
}

#nav-menu li a.add {
    margin-left: 10px;
}

#nav-menu li span {
    margin-left: 20px;
}

span.search-menu-icon {
    background: center center no-repeat transparent;
    padding-top: 2px;
    margin-top: 5px;
    display: block;
    width: 18px;
    height: 18px;
    background: url('/images/search_magnifier.png') no-repeat;
    background-size: 15px 15px;
}

#search-menu li {
    display: block;
    padding: 10px 0px 0px 20px;
}

#search-menu li form {
    padding: 0px 0px 10px 20px;
}

.mmenu a {
    color: #3399FF;
    cursor: pointer;
    display: inline;
    font-weight: bold;
    padding: 10px 5px 5px 10px;
    text-decoration: none;
    vertical-align: middle;
}

.mmenu a.add {
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
    display: inline-block;
    float: left;
    width: 10px;
    line-height: 10px;
    height: 10px;
    padding: 2px 5px 2px 0px;
    margin: -28px 0px 0px -5px;
    z-index: 2;
}

.mmenu a:hover {
    color: #3399FF;
}

div.top div.top_item {
    float: left;
    height: 25px;
    width: auto;
    border-left: 1px solid #333;
    border-right: 1px solid #bbb;
    margin: 0px;
    padding-left: 5px;
    padding-right: 5px;
}

span.favorites_icon_inactive {
    margin-top: 3px;
}

span.favorites_icon_active {
    margin-top: 3px;
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
}
div#favorites_results {
    position: absolute;
    margin-left: -6px;
    top: 25px;
    height: 250px;
    min-width: 300px;
    max-width: 550px;
    padding: 0px 5px 5px 10px;
    overflow-y: scroll;
    overflow-x: hidden;
    background: #464646;
}

div#favorites_results table {
    width: 100%;
    font-size: 9pt;
}

div#favorites_results a { height: 25px; }
div#favorites_results a:link { color: #FFFFFF}
div#favorites_results a:visited { color: #FFFFFF }

span.clipboard_icon_empty {
    margin-top: 3px;
}

span.clipboard_icon_full {
    margin-top: 3px;
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
}

div.top div.top_item p {
    color: #ddd;
    text-shadow: #111 1px 1px 1px;
    margin-top: 5px;
    vertical-align: middle;
    text-align: center;
}

div.top div.top_item p a,div.top div.top_item p a:visited,div.top div.top_item p a:active,div.top div.top_item p a:hover {
    color: #3399ff;
    text-decoration: none;
    display: inline;
}

div.search {
    float: right;
    width: auto;
    height: 25px;
    border-left: 1px solid #bbb;
    border-right: 1px solid #bbb;
    margin: 0px;
    padding-left: 5px;
    padding-right: 5px;
    vertical-align: middle;
    text-align: center;
}

div.search button.asearch {
    padding-left: 2px;
    padding-right: 2px;
    border: 1px solid #aaa;
    background: transparent;
    color: #ddd;
    width: 20px;
    text-shadow: #111 1px 1px 1px;
    cursor: pointer;
}

#help_overlay_container {
    float: right;
}

span.help_overlay_icon {
    margin-top: 1px;
    padding-left: 2px;
    padding-right: 2px;
    width: 15px;
    height: 20px;
    display: block;
    background: url('/images/help.png');
    background-size: 18px 18px;
    cursor: pointer;
}

div.top div.top_item span.login {
    border: 1px solid #aaa;
    color: #ddd;
    text-shadow: #111 1px 1px 1px;
    margin-top: 3px;
    padding: 2px;
    vertical-align: middle;
    text-align: center;
    display: block;
    cursor: pointer;
}

div.top div.top_item span.notify_enable {
    margin-top: 4px;
    color: #000;
}

div.top div.top_item span.notify_disable {
    margin-top: 4px;
}

div.top div.top_item span.ui-icon-delete-stored-cookie {
    margin-top: -15px;
    float: right;
}

span.notify_email_disable {
    margin-top: 4px;
}

div.login_form {
    position: absolute;
    z-index: 2;
    top: 25px;
    left: 0px;
    width: 220px;
    display: none;
    border: 1px solid #bbb;
    background: #464646;
    color: #bbb;
    text-shadow: #111 1px 1px 1px;
    padding: 10px 10px 10px 10px;
}

.login_submit_button {
    margin-left: -100px;
    margin-top: 2px;
    padding-left: 2px;
    padding-right: 2px;
    border: 1px solid #aaa;
    background: transparent;
    color: #606060;
    height: 30px;
    padding-bottom: 2px;
    cursor: pointer;
    font-size: medium;
}
.login_submit_button.disabled {
    color: #FFF;
    background: #DDD;
}

div.advanced_search_container {
    position: absolute;
    z-index: 2;
    top: 25px;
    right: 0px;
    width: 220px;
    height: 500px;
    display: none;
    border: 1px solid #bbb;
    background: #464646;
    color: #bbb;
    text-shadow: #111 1px 1px 1px;
    padding: 5px 10px 5px 10px;
    overflow: hidden;
}

div.advanced_search {
    width: 248px;
    height: 500px;
    background: #464646;
    color: #bbb;
    text-shadow: #111 1px 1px 1px;
    overflow: auto;
}

div.notifications {
    position: relative;
    z-index: 3;
    top: 5px;
    left: 0px;
    width: 400px;
    display: none;
    border: 1px solid #bbb;
    background: #464646;
    color: #bbb;
    text-shadow: #111 1px 1px 1px;
    padding: 10px 10px 10px 10px;
    max-height: 300px;
    overflow-y: auto;
}

div.notifications a,div.notifications a:visited,div.notifications a:active,div.notifications a:hover {
    color: #3399ff;
    text-decoration: none;
    display: block;
}

div.notifications table {
    table-layout: fixed;
    width: 100%;
    border-spacing: 0px 2px;
}

div.notifications table tr td {
    word-wrap: normal;
}

div.notifications table tr td.delete_icon {
    width: 25px;
}

div.notifications table tr td.notification_value {
    width: 255px;
    padding-right: 5px;
}

div.notifications table tr td.notification_date {
    width: 70px;
    text-align: float-right;
}

div.notifications table tr td.go_icon {
    width: 25px;
}

div.notifications table a.delete_notification {
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
}

div.notifications table a.go_to_notification {
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
    display: block;
    float: right;
}

div.top div.top_item span.subscription_link_enable {
    margin-top: 4px;
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
    color: #000;
}

div.top div.top_item span.subscription_link_disable {
    margin-top: 4px;
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
}

span.subscription_link_enable {
    background-image: url('/css/images/ui-icons_70b2e1_256x240.png');
}

span.subscription_link_disable {
}

.textbox {
    width: 221px;
    background: transparent url('/new_images/textbox_bg.jpg') no-repeat;
    color : #747862;
    height: 20px;
    border: 0px;
    padding: 0px;
    margin-bottom: 3px;
    margin-top: 2px;
}

.selectbox {
    width: 221px;
    background: white url('/new_images/textbox_bg.jpg') no-repeat;
    color : #747862;
    height: 20px;
    border: 0px;
    padding: 2px 0px;
    margin-bottom: 3px;
    margin-top: 2px;
}

.inputbutton {
    margin-top: 2px;
    padding-left: 2px;
    padding-right: 2px;
    border: 1px solid #aaa;
    background: transparent;
    color: #ddd;
    text-shadow: #111 1px 1px 1px;
    cursor: pointer;
}

.mini_button {
    margin: 0px;
    padding-top: 0px;
    padding-left: 1px;
    padding-right: 1px;
    padding-bottom: 2px;
    border: 1px solid #aaa;
    background: transparent;
    color: #606060;
    height: 17px;
    cursor: pointer;
}

.form_submit_button {
    margin-top: 2px;
    padding-left: 2px;
    padding-right: 2px;
    border: 1px solid #aaa;
    background: transparent;
    color: #606060;
    height: 23px;
    padding-bottom: 2px;
    cursor: pointer;
}

div.content {
    position: fixed;
    top: 25px;
    left: 5px;
    right: 0px;
    bottom: 25px;
    padding: 10px;
    margin: 0px;
    overflow-y: scroll;
}

div.content a {
    color: #3366ff;
    cursor: pointer;
    font-weight: normal;
    margin-left: 0px;
    text-decoration: none;
}

span.horizontal_menu {
    margin: 10px auto;
    display: table;
    width: auto;
}

span.horizontal_menu ul.hmenu {
    margin: 0px;
    padding: 0px;
    border: 1px solid #dfdfdf;
    display: inline-block;
    height: 20px;
    width: auto;
}

span.horizontal_menu ul.hmenu li.right {
    border-right: 0px;
}

span.horizontal_menu ul.hmenu li {
    display: inline;
    list-style: none;
    float: left;
    border-right: 1px solid #dfdfdf;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 3px;
    height: 17px;
    vertical-align: middle;
    text-align: center;
    background-color: #f1f1f1;
    background-image: -moz-linear-gradient(top, #f9f9f9,#f1f1f1);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#f9f9f9),color-stop(1,#f1f1f1));
}

span.horizontal_menu ul.hmenu li:hover {
    background-color: #ddd;
    background-image: -moz-linear-gradient(top, #eee,#ddd);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#eee),color-stop(1,#ddd));
}

div.content_box {
    margin-bottom: 10px;
    padding: 0px;
    border: 1px solid #dfdfdf;
    display: block;
}

div.content_details {
    display: inline-block;
    width: 75%;
}

h3.titleheader {
    margin: 0px;
    padding: 0px 0px 0px 2px;
    color: #464646;
    background-color: #f1f1f1;
    background-image: -moz-linear-gradient(top, #f9f9f9,#f1f1f1);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#f9f9f9),color-stop(1,#f1f1f1));
    display: block;
    border-bottom: 1px solid #bbb;
    height: 20px;
}

h3 span.title {
    float: left;
    color: #464646;
    text-shadow: white 0px 1px 0px;
    font-weight: normal;
    font-size: 14px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 0px;
    margin: 0px;
    height: 20px;
    text-shadow: #f0f0f0 1px 1px 1px;
    display: inline;
    border-right: 1px solid #aaa;
}

h3 span.info {
    float: middle;
    color: #464646;
    text-shadow: white 0px 1px 0px;
    font-weight: normal;
    font-size: 14px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 0px;
    height: 20px;
    text-shadow: #f0f0f0 1px 1px 1px;
    display: inline;
}

h3 span.pagination {
    float: right;
    color: #464646;
    text-shadow: white 0px 1px 0px;
    font-weight: normal;
    font-size: 14px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 0px;
    height: 20px;
    text-shadow: #f0f0f0 1px 1px 1px;
    display: inline;
}

h3 span.pagination a.left {
    float: left;
    display: inline;
    padding-left: 5px;
    border-left: 1px solid #aaa;
    vertical-align: middle;
    display: block;
    height: 20px;
    margin-right: 5px;
}

h3 span.pagination a.right {
    float: right;
    display: inline;
    padding-left: 5px;
    border-left: 1px solid #aaa;
    display: block;
    height: 20px;
}

h3.titlefooter {
    margin: 0px;
    padding: 0px 0px 0px 2px;
    color: #464646;
    background-color: #f1f1f1;
    background-image: -moz-linear-gradient(top, #f9f9f9,#f1f1f1);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#f9f9f9),color-stop(1,#f1f1f1));
    display: block;
    border-top: 1px solid #bbb;
    height: 20px;
}

div.content_body {
    color: #333;
    background-color: #f5f5f5;
    background-image: -moz-linear-gradient(top, #f9f9f9,#f5f5f5);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#f9f9f9),color-stop(1,#f5f5f5));
}

div.form_results {
    display: none;
    font-weight: bold;
    font-size: 100%;
    background-color: #eee;
    border: 1px solid #dfdfdf;
    color: #333;
    max-width: 350px;
    word-break: break-word;
    margin: 0 auto;
}

div.tabnav {
    display: none;
    margin-bottom: 35px;
}

table.chart {
    border: 1px solid #dfdfdf;
    background-color: #f9f9f9;
    background-image: -moz-linear-gradient(top, #f9f9f9,#f5f5f5);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#f9f9f9),color-stop(1,#f5f5f5));
    padding: 0px;
    margin: 0px;
    width: 100%;
    border-spacing: 0px;
    border-collapse: collapse;
}

table.chart thead {
    display: table-header-group;
    vertical-align: middle;
    border: 1px 0px 1px 1px solid #aaa;
    background-color: #f9f9f9;
    background-image: -moz-linear-gradient(top, #f9f9f9,#f1f1f1);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#f9f9f9),color-stop(1,#f1f1f1));
    color: #333;
    font-size: 12px;
    font-weight: normal;
}

table.chart thead th {
    background-color: #f5f5f5;
    padding-top: 2px;
    word-wrap: break-word;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-weight: bold;
    font-size: 11px;
}

table.chart tbody {
    display: table-row-group;
    vertical-align: left;
    border: 1px 0px 1px 1px solid #aaa;
    color: #333;
}

table.chart tbody tr {
    background-color: #f9f9f9;
    padding-top: 2px;
    word-wrap: break-word;
    display: table-row;
    border-top: 1px solid #ddd;
    font-weight: normal;
    font-size: 12px;
}

table.chart tbody tr:hover td {
    background-color: #eee;
}

table.chart tbody td {
    background-color: #f9f9f9;
    padding: 2px;
    border-top: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-weight: normal;
    font-size: 11px;
    color : #606060;
    max-width: 500px;
}

table.chart tbody td.key {
    background-color: #eee;
}

table.chart tbody td span {
    float: right;
    display: inline;
}

table.chart tbody td a {
    color: #3366ff;
    text-decoration: none;
    display: inline;
}

table.vertical {
}

table.vertical tr {
    border: 1px solid #dfdfdf;
    background-color: #f9f9f9;
    background-image: -moz-linear-gradient(top, #f9f9f9,#f5f5f5);
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,#f9f9f9),color-stop(1,#f5f5f5));
    padding: 0px;
    margin: 0px;
    width: 100%;
}

table.vertical tr td.key {
    font-weight: bold;
    background-color: #eee;
    border: 1px solid #dfdfdf;
    width: 120px;
}

table.vertical tbody td {
    max-width: 500px;
    word-wrap: break-word;
    word-break: break-all;
    table-layout: fixed;
}

table.vertical tbody tr > td:last-of-type:hover {
    background-color: #eee;
}

table.vertical tbody td a {
    color: #3366ff;
    text-decoration: none;
    display: inline;
}

table.vertical tbody td a.ui-icon {
    display: block;
}

table.comment_table {
    border-spacing: 0px 5px;
    padding: 5px;
}

table.comment_table tr td.key {
    text-align: center;
    vertical-align: middle;
}

table.comment_table tr td.key a,table.comment_table tr td.key a:hover,table.comment_table tr td.key a:active,table.comment_table tr td.key a:visited {
    color: #3399ff;
    text-decoration: none;
}

table.comment_table tr td:first-child {
}

table.comment_table tr.comment_row td:first-child {
    border-width: 1px 0px 1px 1px;
    border-style: solid;
    border-color: #dfdfdf;
    border-right: 1px solid #dfdfdf;
}

table.comment_table tr.notification_row td:first-child {
    border-width: 1px 0px 1px 1px;
    border-style: solid;
    border-color: #3399ff;
    border-right: 1px solid #dfdfdf;
    background: #c6c6c6;
}

table.comment_table tr.comment_row td:last-child {
    border-width: 1px 1px 1px 0px;
    border-style: solid;
    border-color: #dfdfdf;
}

table.comment_table tr.notification_row td:last-child {
    border-width: 1px 1px 1px 0px;
    border-style: solid;
    border-color: #3399ff;
}

table.comment_table tr td:last-child {
}

table.comment_table tr td div.comment_body {
    padding: 5px;
    width: 100%;
    overflow: auto;
}

table.comment_table tr td div.comment_body span.comment {
    width: 90%;
    float: left;
    word-break: break-word;
    height: auto;
}

table.comment_table tr td div.comment_body span.comment_button {
    float: right;
    padding-right: 5px;
    border-left: 1px solid #dfdfdf;
}

table.comment_table tr td div.comment_body span.parent_analyst {
    display: none;
}

table.comment_table tr td div.comment_body span.parent_date {
    display: none;
}

table.comment_table tr td div.comment_body span.url_key {
    display: none;
}

table.comment_table tr td div.comment_info {
    font-size: 90%;
    border: 1px solid #dfdfdf;
    background-color: #eee;
    padding: 0px;
    margin: 0px;
}

table.comment_table tr td div.comment_info span.comment_in_reply_to {
    float: right;
}

table.form {
}

table.form tr {
    border: 1px solid #dfdfdf;
    padding: 0px;
    margin: 0px;
    width: auto;
    height: 25px;
}

table.form tbody tr th {
    font-weight: bold;
    font-size: 100%;
    background-color: #eee;
    border: 1px solid #dfdfdf;
    height: 25px;
    text-align: right;
}

table.form tbody tr td {
    font-weight: bold;
    background-color: #eee;
    border: 1px solid #dfdfdf;
    text-align: left;
    color: #3366ff;
    text-decoration: none;
    display: block;
    height: auto;
}

table.form tbody tr td ul {
    list-style: none;
    display: inline-block;
    height: 25px;
    margin: 0px;
    padding: 0px;
}

table.form tbody tr td ul li {
    list-style: none;
    display: inline;
    float: left;
    height: 25px;
}

table.form tbody tr td textarea {
    color : #747862;
    border: 0px;
    padding-left: 5px;
    margin-right: 2px;
    margin-bottom: 2px;
    margin-top: 2px;
}

table.form tbody tr td select {
    background: white url('/new_images/textbox_bg.jpg') no-repeat;
    color : #747862;
    height: 20px;
    border: 0px;
    width: 230px;
    padding-left: 5px;
    padding-top: 3px;
    margin-right: 2px;
    margin-bottom: 3px;
    margin-top: 2px;
}

table.form tbody tr td select[multiple] {
    height: auto;
    background: white;
    width: 275px;
}

table.form tbody tr td input[type="text"] {
    background: transparent url('/new_images/textbox_bg.jpg') no-repeat;
    color : #747862;
    height: 20px;
    border: 0px;
    width: 221px;
    padding-left: 5px;
    margin-right: 2px;
    margin-bottom: 2px;
    margin-top: 2px;
}

table.form tbody tr td input[type="checkbox"] {
    margin-bottom: 6px;
    margin-top: 6px;
}

table.relationship_listing tr td.relationship_spacer {
    background-color: #eee;
    height: 5px;
}

table.object_listing tr td.object_spacer {
    background-color: #eee;
    height: 5px;
}

.content_box form {
    display: table;
}

ul.decimal_leading_zero {
    list-style: decimal-leading-zero;
}

li.no_style {
    margin-left: 0px;
    padding-left: 0px;
}

pre {
    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+ */
    font-family: "Courier New", "Courier", "mono";
}

.tooltip_edit:hover {
    cursor: pointer;
    text-decoration: underline;
}

.edit_underline:hover {
	cursor: pointer;
	text-decoration: underline;
}

.tooltip_edit {
    color: #fff;
    height: 27px;
}

.edit:hover {
    background-color: yellow;
}

.edit {
    color: #36f;
}

.highlight { background-color: yellow }

tr.required {
    font-weight: bold;
    color: #3399ff;
}

div.qtip-container {
    cursor: pointer;
    float: left;
}

div.qtip-body {
    display: none;
}

span.add_button {
    padding-top: 3px;
    padding-bottom: 1px;
    border-left: 1px solid #bbb;
    border-right: 1px solid #bbb;
}

span.add_button a {
 display: inline-block;
}

span.bulk_add_button {
    padding-top: 3px;
    padding-bottom: 1px;
    border-left: 1px solid #bbb;
    border-right: 1px solid #bbb;
}

span.bulk_add_button a {
 display: inline-block;
}

.collapsible {
 cursor: pointer;
}

span.activity_options {
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #dfdfdf;
    display: block;
}

span#object_value {
    float: left;
}

span#object_value:hover {
    text-decoration: underline;
}

span#source_name:hover {
    text-decoration: underline;
}

span#source_method:hover {
    text-decoration: underline;
}

span#source_reference:hover {
    text-decoration: underline;
}

table#object_listing_header {
    border-collapse: collapse;
    border: 0px;
    border-spacing: 0px;
    table-layout: fixed;
    width: 100%;
}

table#object_listing_table {
    border-collapse: collapse;
    border: 0px;
    border-spacing: 0px;
    table-layout: fixed;
    width: 100%;
}

table#object_listing_header thead {
    border-collapse: collapse;
    border: 0px;
    border-spacing: 0px;
}

table#object_listing_table thead {
    border-collapse: collapse;
    border: 0px;
    border-spacing: 0px;
}

table#object_listing_table tbody {
    border-collapse: collapse;
    border: 0px;
    border-spacing: 0px;
}

table#object_listing_table tbody tr {
    border-collapse: collapse;
    border: 0px;
    border-bottom: 1px solid #ddd;
    border-spacing: 0px;
}

table#object_listing_table tbody tr:last-child {
    border-collapse: collapse;
    border: 0px;
    border-spacing: 0px;
}

table#object_listing_table tbody td {
    border-collapse: collapse;
    border-top: 0px;
    border-spacing: 0px;
    word-wrap: break-word;
}

table#object_listing_table tbody td div.object_value {
    border-collapse: collapse;
    border-top: 0px;
    border-spacing: 0px;
    word-wrap: break-word;
    display: inline-block;
    width: 80%;
    text-overflow: ellipsis;
    float: left;
}

table#object_listing_table tbody td div.object_value a span {
    border-collapse: collapse;
    border-top: 0px;
    border-spacing: 0px;
    word-wrap: break-word;
    display: table-cell;
    width: 100%;
    float: left;
}

table#object_listing_table tbody td div.object_value_icon {
    border-collapse: collapse;
    border-top: 0px;
    border-spacing: 0px;
    word-wrap: break-word;
    display: inline-block;
    width: 40px;
    float: right;
}

div.download_file {
    display: inline-block;
    float: right;
}

div.edit_object_value {
    display: inline-block;
    float: right;
}

#id_yaml_data {
    font-family: monospace;
}

table.services td.available {
    background: #99ff99;
    }

table.services td.misconfigured{
    background: #ffff99;
}

table.services td.unavailable{
    background: #ff9999;
}

span.missing_binary {
    float: right;
    background-image: url('/css/images/ui-icons_cc0000_256x240.png');
    width: 15px;
    height: 10px;
    padding-top: 2px;
    margin-top: 1px;
}

.logo_thumb {
    margin-top: 2px;
    cursor: pointer;
}

span.campaign_nav_icon {
    display: inline-block;
    background-image: url('/new_images/STIX/STIX_Campaign.png');
    background-size: 100%;
    width: 21px;
    height: 21px;
    margin-top: 2px;
}

span.email_nav_icon {
    display: inline-block;
    background-image: url('/new_images/STIX/STIX_ExploitTarget.png');
    background-size: 100%;
    width: 21px;
    height: 21px;
    margin-top: 2px;
}

span.event_nav_icon {
    display: inline-block;
    background-image: url('/new_images/STIX/STIX_Incident.png');
    background-size: 100%;
    width: 21px;
    height: 21px;
    margin-top: 2px;
}

span.indicator_nav_icon {
    display: inline-block;
    background-image: url('/new_images/STIX/STIX_Indicator.png');
    background-size: 100%;
    width: 21px;
    height: 21px;
    margin-top: 2px;
}

span.pcap_nav_icon {
    display: inline-block;
    background-image: url('/new_images/STIX/STIX_ThreatActor.png');
    background-size: 100%;
    width: 21px;
    height: 21px;
    margin-top: 2px;
}

span.sample_nav_icon {
    display: inline-block;
    background-image: url('/new_images/STIX/STIX_Course_of_Action.png');
    background-size: 100%;
    width: 21px;
    height: 21px;
    margin-top: 2px;
}

a.nav_icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    text-decoration: none;
}

a.nav_icon:hover {
    width: 20px;
    height: 20px;
    display: inline-block;
    text-decoration: none;
}

.login_box {
    position: absolute;
    top: 200px;
    right: 0;
    bottom: 0;
    left: 0;
    width: 650px;
    height: 300px;
    margin: auto;
    text-align: center;
}

.reset_link {
    margin-top: 2px;
    margin-right: 4px;
    padding-top: 2px;
    padding-left: 2px;
    padding-right: 2px;
    border: 1px solid #aaa;
    background: transparent;
    color: #606060;
    height: 19px;
    cursor: pointer;
    font-size: 90%;
    float: right;
}

.reset_password {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 100px;
    margin-top: -100px;
    margin-left: -175px;
    /*text-align: center;*/
}

div#detail_floaters {
    float: right;
    width: 23%;
    display: inline-block;
}

div.buckets {
    width: 100%;
}

button.details_options_button {
    padding-top: 3px;
    height: 30px;
    font-size: 14pt;
}

button.details_options_button :last-child {
    padding-top: 2px;
}

div.details_options {
    width: 100%;
    margin-bottom: 10px;
}

ul#bucket_list {
    margin: 5px 5px 5px 5px;
}

.message {
    border: 0px;
    padding: 0px;
    margin: 0px;
}

.message a:active, .message a:hover {
    text-decoration: underline;
    display: inline-block;
}

span.edit_releasability {
    width: 100%;
    text-align: center;
    float: left;
    color: #3366ff;
}

span.edit_releasability:hover {
    cursor: pointer;
}

tr.expand-child:hover td {
    background-color: #ddd;
}

a.splunk_link {
    display: inline-block;
    float: right;
    border-left: 1px solid #bbb;
    margin-left: 5px;
    padding-left: 5px;
}

span.edit_header_value {
    display: inline-block;
    float: right;
    border-left: 1px solid #bbb;
    margin-left: 5px;
    padding-left: 2px;
}

span.header_value {
    display: inline-block;
}

span.enabled {
    float: left;
    color: blue;
    text-align: left;
    cursor: pointer;
}

div.line_table_container {
    max-height: 500px;
    overflow: scroll;
}

table.line_table {
    border-spacing: 0;
    width: 100%;
    background-color: #fff;
}

table.line_table tr.file_line {
    line-height: 15px;
    height: 15px;
    max-height: 15px;
    padding: 0px;
    margin: 0px;
}

table.line_table tr.file_line:hover {
    background-color: #F7BE81;
}

td.add_highlight {
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    border-right: 1px solid #bbb;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

td.line_num {
    width: 20px;
    min-width: 20px;
    max-width: 35px;
    border-right: 1px solid #bbb;
    text-align: left;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

span.line_number {
    line-height: 15px;
    height: 15px;
    max-height: 15px;
    padding: 0px 5px 0px 5px;
    margin: 0px;
    text-align: center;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

td.line_pre {
    line-height: 15px;
    height: 15px;
    width: 93%;
    min-width: 93%;
    max-width: 93%;
    max-height: 15px;
    padding: 0px 5px 0px 5px;
    margin: 0px;
    border: 0px;
}

td.line_pre pre {
    display: inline-block;
    padding: 0px;
    margin: 0px;
    line-height: 15px;
    height: 15px;
    max-height: 15px;
}

a#add_inline_comment {
    display: none;
    min-width: 15px;
    max-width: 15px;
    min-height: 15px;
    max-height: 15px;
    background-color: #fff;
    border-radius: 50%;
    border: 1px solid #FA8258;
}

table.inline_comment_contents {
    border: 1px solid #ccc;
    min-width: 100%;
    margin: 5px 0px 5px -1px;
    background-color: #81DAF5;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

tr.inline_comment {
    padding: 0px;
    margin: 0px;
}

td.ic_username {
    border-right: 1px solid #555;
    min-width: 70px;
    max-width: 70px;
}

td.ic_comment {
    border-right: 1px solid #555;
}

td.ic_date {
    text-align: right;
    border-right: 1px solid #555;
    padding-right: 4px;
    min-width: 70px;
    max-width: 70px;
}

a#reply_inline_comment {
    min-width: 15px;
    max-width: 15px;
    min-height: 15px;
    max-height: 15px;
    background-color: #fff;
    border-radius: 50%;
    border: 1px solid #FA8258;
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>XLabs: XLabs.Platform.Services.Media.MediaPicker Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

XLabs

Cross-platform reusable C# libraries

Main Page

Packages

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

Public Member Functions |
Static Public Member Functions |
Properties |
List of all members

XLabs.Platform.Services.Media.MediaPicker Class Reference

Class MediaPicker.
 More...

Inheritance diagram for XLabs.Platform.Services.Media.MediaPicker:

  <map id="XLabs.Platform.Services.Media.MediaPicker_map" name="XLabs.Platform.Services.Media.MediaPicker_map">
<area href="interface_x_labs_1_1_platform_1_1_services_1_1_media_1_1_i_media_picker.html" title="Interface IMediaPicker " alt="XLabs.Platform.Services.Media.IMediaPicker" shape="rect" coords="0,0,269,24"/>
<area href="interface_x_labs_1_1_platform_1_1_services_1_1_media_1_1_i_media_picker.html" title="Interface IMediaPicker " alt="XLabs.Platform.Services.Media.IMediaPicker" shape="rect" coords="279,0,548,24"/>
<area href="interface_x_labs_1_1_platform_1_1_services_1_1_media_1_1_i_media_picker.html" title="Interface IMediaPicker " alt="XLabs.Platform.Services.Media.IMediaPicker" shape="rect" coords="558,0,827,24"/>
</map>

Public Member Functions

 	MediaPicker ()

 	Initializes a new instance of the MediaPicker class.  More...

Task< MediaFile > 	SelectPhotoAsync (CameraMediaStorageOptions options)

 	Select a picture from library.  More...

Task< MediaFile > 	TakePhotoAsync (CameraMediaStorageOptions options)

 	Takes the picture.  More...

Task< MediaFile > 	SelectVideoAsync (VideoMediaStorageOptions options)

 	Selects the video asynchronous.  More...

Task< MediaFile > 	TakeVideoAsync (VideoMediaStorageOptions options)

 	Takes the video asynchronous.  More...

 	MediaPicker ()

 	Initializes a new instance of the MediaPicker class.  More...

Task< MediaFile > 	SelectPhotoAsync (CameraMediaStorageOptions options)

 	Select a picture from library.  More...

Task< MediaFile > 	TakePhotoAsync (CameraMediaStorageOptions options)

 	Takes the picture.  More...

Task< MediaFile > 	SelectVideoAsync (VideoMediaStorageOptions options)

 	Selects the video asynchronous.  More...

Task< MediaFile > 	TakeVideoAsync (VideoMediaStorageOptions options)

 	Takes the video asynchronous.  More...

 	MediaPicker ()

 	Initializes a new instance of the MediaPicker class.  More...

Task< MediaFile > 	SelectPhotoAsync (CameraMediaStorageOptions options)

 	Select a picture from library.  More...

Task< MediaFile > 	TakePhotoAsync (CameraMediaStorageOptions options)

 	Takes the picture.  More...

Task< MediaFile > 	SelectVideoAsync (VideoMediaStorageOptions options)

 	Selects the video asynchronous.  More...

Task< MediaFile > 	TakeVideoAsync (VideoMediaStorageOptions options)

 	Takes the video asynchronous.  More...

Static Public Member Functions

static void 	ResizeBasedOnPixelDimension (int?maxPixelDimension, int currentWidth, int currentHeight, out int targetWidth, out int targetHeight)

 	Calcualtes the target height and width of the image based on the max pixel dimension.  More...

Properties

bool 	IsCameraAvailable [get]

 	Gets a value indicating whether this instance is camera available.  More...

bool 	IsPhotosSupported [get]

 	Gets a value indicating whether this instance is photos supported.  More...

bool 	IsVideosSupported [get]

 	Gets a value indicating whether this instance is videos supported.  More...

EventHandler< MediaPickerArgs > 	OnMediaSelected [get, set]

 	Gets or sets the event that fires when media has been selected.  More...

EventHandler< MediaPickerErrorArgs > 	OnError [get, set]

 	Gets or sets the on error.  More...

 Properties inherited from XLabs.Platform.Services.Media.IMediaPicker

bool 	IsCameraAvailable [get]

 	Gets a value indicating whether this instance is camera available.  More...

bool 	IsPhotosSupported [get]

 	Gets a value indicating whether this instance is photos supported.  More...

bool 	IsVideosSupported [get]

 	Gets a value indicating whether this instance is videos supported.  More...

EventHandler< MediaPickerArgs > 	OnMediaSelected [get, set]

 	Event the fires when media has been selected  More...

EventHandler< MediaPickerErrorArgs > 	OnError [get, set]

 	Gets or sets the on error.  More...

Detailed Description

Class MediaPicker.

Constructor & Destructor Documentation

          XLabs.Platform.Services.Media.MediaPicker.MediaPicker
          (
          	)

Initializes a new instance of the MediaPicker class.

          XLabs.Platform.Services.Media.MediaPicker.MediaPicker
          (
          	)

Initializes a new instance of the MediaPicker class.

          XLabs.Platform.Services.Media.MediaPicker.MediaPicker
          (
          	)

Initializes a new instance of the MediaPicker class.

Member Function Documentation

          static void XLabs.Platform.Services.Media.MediaPicker.ResizeBasedOnPixelDimension
          (
          int?
          maxPixelDimension,

          int
          currentWidth,

          int
          currentHeight,

          out int
          targetWidth,

          out int
          targetHeight

          )

static

Calcualtes the target height and width of the image based on the max pixel dimension.

Parameters

maxPixelDimension	The maximum pixel dimension ratio (used to resize the image).

currentWidth	Current Width of the image.

currentHeight	Current Height of the image.

targetWidth	Target Width of the image.

targetHeight	Target Height of the image.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.SelectPhotoAsync
          (
          CameraMediaStorageOptions
          options	)

Select a picture from library.

Parameters

options	The storage options.

Returns

Task with a return type of MediaFile.

Exceptions

System.NotSupportedException	Throws an exception if feature is not supported.

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.SelectPhotoAsync
          (
          CameraMediaStorageOptions
          options	)

Select a picture from library.

Parameters

options	The storage options.

Returns

Task<IMediaFile>.

Exceptions

NotSupportedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.SelectPhotoAsync
          (
          CameraMediaStorageOptions
          options	)

Select a picture from library.

Parameters

options	The storage options.

Returns

Task<IMediaFile>.

Exceptions

InvalidOperationException	Only one operation can be active at at time

System.NotImplementedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.SelectVideoAsync
          (
          VideoMediaStorageOptions
          options	)

Selects the video asynchronous.

Parameters

options	Video storage options.

Returns

Task with a return type of MediaFile.

Exceptions

System.NotSupportedException	Throws an exception if feature is not supported.

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.SelectVideoAsync
          (
          VideoMediaStorageOptions
          options	)

Selects the video asynchronous.

Parameters

options	The options.

Returns

Task<IMediaFile>.

Exceptions

NotSupportedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.SelectVideoAsync
          (
          VideoMediaStorageOptions
          options	)

Selects the video asynchronous.

Parameters

options	The options.

Returns

Task<IMediaFile>.

Exceptions

NotImplementedException

System.NotImplementedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.TakePhotoAsync
          (
          CameraMediaStorageOptions
          options	)

Takes the picture.

Parameters

options	The storage options.

Returns

Task with a return type of MediaFile.

Exceptions

System.NotSupportedException	Throws an exception if feature is not supported.

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.TakePhotoAsync
          (
          CameraMediaStorageOptions
          options	)

Takes the picture.

Parameters

options	The storage options.

Returns

Task<IMediaFile>.

Exceptions

NotSupportedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.TakePhotoAsync
          (
          CameraMediaStorageOptions
          options	)

Takes the picture.

Parameters

options	The storage options.

Returns

Task<IMediaFile>.

Exceptions

InvalidOperationException	Only one operation can be active at a time

System.NotImplementedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.TakeVideoAsync
          (
          VideoMediaStorageOptions
          options	)

Takes the video asynchronous.

Parameters

options	The options.

Returns

Task with a return type of MediaFile.

Exceptions

System.NotSupportedException	Throws an exception if feature is not supported.

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.TakeVideoAsync
          (
          VideoMediaStorageOptions
          options	)

Takes the video asynchronous.

Parameters

options	The options.

Returns

Task<IMediaFile>.

Exceptions

NotImplementedException

System.NotImplementedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

          Task<MediaFile> XLabs.Platform.Services.Media.MediaPicker.TakeVideoAsync
          (
          VideoMediaStorageOptions
          options	)

Takes the video asynchronous.

Parameters

options	The options.

Returns

Task<IMediaFile>.

Exceptions

NotSupportedException

Implements XLabs.Platform.Services.Media.IMediaPicker.

Property Documentation

          bool XLabs.Platform.Services.Media.MediaPicker.IsCameraAvailable

get

Gets a value indicating whether this instance is camera available.

true if this instance is camera available; otherwise, false.

          bool XLabs.Platform.Services.Media.MediaPicker.IsPhotosSupported

get

Gets a value indicating whether this instance is photos supported.

true if this instance is photos supported; otherwise, false.

          bool XLabs.Platform.Services.Media.MediaPicker.IsVideosSupported

get

Gets a value indicating whether this instance is videos supported.

true if this instance is videos supported; otherwise, false.

          EventHandler< MediaPickerErrorArgs > XLabs.Platform.Services.Media.MediaPicker.OnError

getset

Gets or sets the on error.

The on error.

          EventHandler< MediaPickerArgs > XLabs.Platform.Services.Media.MediaPicker.OnMediaSelected

getset

Gets or sets the event that fires when media has been selected.

Event the fires when media has been selected

The on photo selected.

The documentation for this class was generated from the following file:

F:/Projects/Xamarin-Forms-Labs/src/Platform/XLabs.Platform.Droid/Services/Media/MediaPicker.cs

XLabs

Platform

Services

Media

MediaPicker

Generated by

     1.8.10

redpajama_set_name: RedPajamaGithub


text:
package org.jibx.binding.util;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * Array with reverse mapping from values to indices. This operates as the
 * combination of an array with ordinary int indices and a hashmap from values
 * back to the corresponding index position. Values are assured to be unique.
 *
 * @author Dennis M. Sosnoski
 */
public class ArrayMap
{
    /** Array of values. */
    private ArrayList m_array;

    /** Map from values to indices. */
    private HashMap m_map;

    /**
     * Default constructor.
     */
    public ArrayMap() {
        m_array = new ArrayList();
        m_map = new HashMap();
    }

    /**
     * Constructor with initial capacity supplied.
     *
     * @param size initial capacity for array map
     */
    public ArrayMap(int size) {
        m_array = new ArrayList(size);
        m_map = new HashMap(size);
    }

    /**
     * Get value for index. The index must be within the valid range (from 0 to
     * one less than the number of values present).
     *
     * @param index number to be looked up
     * @return value at that index position
     */
    public Object get(int index) {
        return m_array.get(index);
    }

    /**
     * Find existing object. If the supplied value object is present in the
     * array map its index position is returned.
     *
     * @param obj value to be found
     * @return index number assigned to value, or <code>-1</code> if not found
     */
    public int find(Object obj) {
        Integer index = (Integer)m_map.get(obj);
        if (index == null) {
            return -1;
        } else {
            return index.intValue();
        }
    }

    /**
     * Add object. If the supplied value object is already present in the array
     * map the existing index position is returned.
     *
     * @param obj value to be added
     * @return index number assigned to value
     */
    public int findOrAdd(Object obj) {
        Integer index = (Integer)m_map.get(obj);
        if (index == null) {
            index = IntegerCache.getInteger(m_array.size());
            m_map.put(obj, index);
            m_array.add(obj);
        }
        return index.intValue();
    }

    /**
     * Get count of values present.
     *
     * @return number of values in array map
     */
    public int size() {
        return m_array.size();
    }
}


text:
from __future__ import unicode_literals

import shutil
import signal
import sys
import traceback
import uuid
from difflib import SequenceMatcher as SM
from inspect import getmodule
from operator import itemgetter
from os import makedirs
from os.path import exists, expanduser, isfile

import dbus
import gobject
from dbus.exceptions import DBusException
from dbus.mainloop.glib import DBusGMainLoop
from youtube_dl import YoutubeDL

# configs
home = expanduser("~")
MUSIC_FOLDER_ABSOLUTE_PATH = home + '/Music'

class MyLogger(object):
    def debug(self, msg):
        pass

    def warning(self, msg):
        pass

    def error(self, msg):
        print(msg)

def yt_hook(d):
    if d['status'] == 'downloading':
        print '\r' + 'Download:' + d['filename'].split('-')[-1][:-4], d['_percent_str'], d['_speed_str'],
        sys.stdout.flush()

def spotify_grabber(metadata):
    title = metadata['xesam:title']
    album = metadata['xesam:album']
    artist = metadata['xesam:artist']

    if isinstance(title, dbus.Array):
        title = title[0]
    if isinstance(album, dbus.Array):
        album = album[0]
    if isinstance(artist, dbus.Array):
        artist = artist[0]
    print '----- spotify info -----'
    print 'Title: ' + title
    print 'Artist: ' + artist
    print 'Album: ' + album
    print '------------------------'
    return {
        'title': str(title.encode('ascii', 'ignore')),
        'album': str(album.encode('ascii', 'ignore')),
        'artist': str(artist.encode('ascii', 'ignore'))
    }

def youtube_grabber(music_data):
    query_url = 'https://www.youtube.com/results?search_query=' + \
        music_data.get('artist') + '+' + music_data.get('title') + '+%23music'
    yt_opts = {
        'logger': MyLogger()
    }

    with YoutubeDL(yt_opts) as ydl:
        result = ydl.extract_info(query_url, download=False, process=False)

    list_entries = []
    for entry in result['entries']:
        if not (type(entry) == dict and entry.get('title', None) is not None):
            continue
        if 'full album' in entry['title']:
            entry['ratio'] = 0.01
        else:
            entry['ratio'] = SM(None, music_data.get(
                'artist') + ' - ' + music_data.get('title'), entry['title']).ratio()

        list_entries.append(entry)

    ordered_list = sorted(list_entries, key=itemgetter('ratio'), reverse=True)

    for i in range(len(ordered_list)):
        print '----- youtube downloading -----'
        print 'Title: ' + ordered_list[i]["title"]
        print 'URL: ' + ordered_list[i]["url"]
        print 'attempt to download %s' % (i + 1)
        result = youtube_downloader(
            ordered_list[i]["title"], ordered_list[i]["url"], music_data)
        if result:
            return
    print 'Sorry, downloadable videos for this music was not found'

def youtube_downloader(video_title, video_url, music_data):
    output_folder_path = '%s/%s/%s' % (MUSIC_FOLDER_ABSOLUTE_PATH,
                                       music_data.get('artist'), music_data.get('album'))
    output_file_path = '%s/%s.mp3' % (output_folder_path, video_title)
    temp_file_path = '/tmp/%s-%s.%s' % (uuid.uuid4(), video_title, '%(ext)s')

    # check if file already exists
    if isfile(output_file_path):
        print "Music alread downloaded: %s" % output_file_path
        return True

    # create folder if needed
    if not exists(output_folder_path):
        makedirs(output_folder_path)

    yt_opts = {
        'format': 'bestaudio/best',
        'outtmpl': temp_file_path,
        'extractaudio': True,
        'noplaylist': True,
        'postprocessors': [
            {
                'key': 'FFmpegExtractAudio',
                'preferredcodec': 'mp3',
                'preferredquality': '192',

            },
            {
                'key': 'FFmpegMetadata'

            }
        ],
        'logger': MyLogger(),
        'progress_hooks': [yt_hook],
    }

    with YoutubeDL(yt_opts) as ydl:
        result = ydl.download([video_url])

    if result == 0:
        temp_file_path = temp_file_path.replace('.%(ext)s', ".mp3")
        if isfile(temp_file_path):
            shutil.move(temp_file_path, output_file_path)
        else:
            print 'Error: File was not downloaded...'
            return False

    print '\n' + music_data.get('title') + '\'s download finished =) '
    return True

def get_playing_now(session_bus):
    spotify_bus = session_bus.get_object(
        "org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2")
    spotify_properties = dbus.Interface(
        spotify_bus, "org.freedesktop.DBus.Properties")
    metadata = spotify_properties.Get(
        "org.mpris.MediaPlayer2.Player", "Metadata")
    spotify_handler(metadata)

def spotify_handler(*args):
    print '----- DOWNLOAD STARTED - To exit Ctrl-C -----'
    try:
        metadata = args[1]["Metadata"]
    except:
        metadata = args[0]

    music_data = spotify_grabber(metadata)
    if music_data["title"] and music_data["album"] and music_data["artist"]:
        youtube_grabber(music_data)
    else:
        print 'title, artist or album information is missing...'
    print '------------- DOWNLOAD FINISHED -------------'

def worker():
    signal.signal(signal.SIGINT, signal.SIG_IGN)

def main():
    DBusGMainLoop(set_as_default=True)
    session_bus = dbus.SessionBus()
    try:
        # look for spotify signals (new music starts)
        session_bus.add_signal_receiver(
            spotify_handler,
            'PropertiesChanged',
            None,
            'org.mpris.MediaPlayer2.spotify',
            '/org/mpris/MediaPlayer2'
        )

        # if theres a music playing now, download it
        get_playing_now(session_bus)
    except (KeyboardInterrupt, SystemExit):
        print 'bye'
        sys.exit(666)
    except DBusException:
        print 'Seems like spotify is not running =/'
        print 'Bye!'
        sys.exit(666)
    except Exception as e:
        print e

    loop = gobject.MainLoop()
    loop.run()

if __name__ == '__main__':
    main()


text:
package com.isecpartners.android.jdwp.connection;

import java.io.IOException;
import java.util.Map;

import org.apache.log4j.Logger;

import com.isecpartners.android.jdwp.common.Message;
import com.sun.jdi.VMDisconnectedException;
import com.sun.jdi.VirtualMachine;
import com.sun.jdi.connect.AttachingConnector;
import com.sun.jdi.connect.Connector;
import com.sun.jdi.connect.Connector.Argument;
import com.sun.jdi.connect.IllegalConnectorArgumentsException;
import com.sun.jdi.connect.VMStartException;

public class AttachingConnection extends AbstractConnection {
	private final static org.apache.log4j.Logger LOGGER = Logger
			.getLogger(AttachingConnection.class.getName());

	public AttachingConnection(Connector connector,
			Map<String, ? extends Argument> args) {
		super(connector, args);
		AttachingConnection.LOGGER.info("creating AttachingConnection");
		AttachingConnection.LOGGER.info(args);
	}

	@Override
	public void connect() throws IllegalConnectorArgumentsException,
			IOException, VMDisconnectedException, VMStartException {
		AttachingConnection.LOGGER.info("AttachingConnection connect() called");
		AttachingConnector conn = (AttachingConnector) this.getConnector();
		VirtualMachine vm = conn.attach(this.getConnectorArgs());
		this.setVM(vm);
		AttachingConnection.LOGGER.info("connected!");

		try {
			this.sendMessage(new Message(Message.Type.CONNECTED, vm.description()));
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public void disconnect() {
		AttachingConnection.LOGGER.info("disconnecting: TODO not implemented");
		this.getVM().dispose();
	}

}


text:
package com.amazonaws.eclipse.core.telemetry;

import static com.amazonaws.eclipse.core.telemetry.internal.Constants.JAVA_PREFERENCE_NODE_FOR_AWS_TOOLKIT_FOR_ECLIPSE;
import static com.amazonaws.eclipse.core.telemetry.internal.Constants.MOBILE_ANALYTICS_CLIENT_ID_PREF_STORE_KEY;

import java.util.Locale;
import java.util.UUID;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;

import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.preference.IPreferenceStore;
import org.osgi.framework.Bundle;
import com.amazonaws.annotation.Immutable;
import com.amazonaws.eclipse.core.AwsToolkitCore;
import com.amazonaws.eclipse.core.telemetry.internal.Constants;
import com.amazonaws.util.StringUtils;

/**
 * Container for all the data required in the x-amz-client-context header.
 *
 * @see http://docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html#putEvents-request-client-context-header
 */
@Immutable
public class ClientContextConfig {
    private final String envPlatformName;
    private final String envPlatformVersion;
    private final String eclipseVersion;
    private final String envLocale;
    private final String clientId;
    private final String version;

    public static final ClientContextConfig PROD_CONFIG = new ClientContextConfig(
            _getSystemOsName(), _getSystemOsVersion(),
            _getSystemLocaleCountry(), getOrGenerateClientId());

    public static final ClientContextConfig TEST_CONFIG = new ClientContextConfig(
            _getSystemOsName(), _getSystemOsVersion(),
            _getSystemLocaleCountry(), getOrGenerateClientId());

    private ClientContextConfig(String envPlatformName, String envPlatformVersion, String envLocale, String clientId) {
        this.eclipseVersion = eclipseVersion();
        this.version = getPluginVersion();
        this.envPlatformName = envPlatformName;
        this.envPlatformVersion = envPlatformVersion;
        this.envLocale = envLocale;
        this.clientId = clientId;
    }

    private String eclipseVersion() {
        try {
            Bundle bundle = Platform.getBundle("org.eclipse.platform");
            return bundle.getVersion().toString();
        } catch (Exception e) {
            return "Unknown";
        }
    }

    private String getPluginVersion() {
        try {
            Bundle bundle = Platform.getBundle("com.amazonaws.eclipse.core");
            return bundle.getVersion().toString();
        } catch (Exception e) {
            return "Unknown";
        }
    }

    public String getEnvPlatformName() {
        return envPlatformName;
    }

    public String getEnvPlatformVersion() {
        return envPlatformVersion;
    }

    public String getEnvLocale() {
        return envLocale;
    }

    public String getClientId() {
        return clientId;
    }

	public String getVersion() {
		return version;
	}

	public String getEclipseVersion() {
		return eclipseVersion;
	}

    private static String _getSystemOsName() {
        try {
            String osName = System.getProperty("os.name");
            if (osName == null) {
                return null;
            }

            osName = osName.toLowerCase();

            if (osName.startsWith("windows")) {
                return Constants.CLIENT_CONTEXT_ENV_PLATFORM_WINDOWS;
            }
            if (osName.startsWith("mac")) {
                return Constants.CLIENT_CONTEXT_ENV_PLATFORM_MACOS;
            }
            if (osName.startsWith("linux")) {
                return Constants.CLIENT_CONTEXT_ENV_PLATFORM_LINUX;
            }

            AwsToolkitCore.getDefault().logInfo("Unknown OS name: " + osName);
            return null;

        } catch (Exception e) {
            return null;
        }
    }

    private static String _getSystemOsVersion() {
        try {
            return System.getProperty("os.version");
        } catch (Exception e) {
            return null;
        }
    }

    private static String _getSystemLocaleCountry() {
        try {
            return Locale.getDefault().getDisplayCountry(Locale.US);
        } catch (Exception e) {
            return null;
        }
    }

    public static String getOrGenerateClientId() {
        // This is the Java preferences scope
        Preferences awsToolkitNode = Preferences.userRoot().node(JAVA_PREFERENCE_NODE_FOR_AWS_TOOLKIT_FOR_ECLIPSE);
        String clientId = awsToolkitNode.get(MOBILE_ANALYTICS_CLIENT_ID_PREF_STORE_KEY, null);

        if (!StringUtils.isNullOrEmpty(clientId)) {
            return clientId;
        }

        // This is an installation scope PreferenceStore.
        IEclipsePreferences eclipsePreferences = ConfigurationScope.INSTANCE.getNode(
                AwsToolkitCore.getDefault().getBundle().getSymbolicName());
        clientId = eclipsePreferences.get(MOBILE_ANALYTICS_CLIENT_ID_PREF_STORE_KEY, null);

        if (StringUtils.isNullOrEmpty(clientId)) {
            // This is an instance scope PreferenceStore.
            IPreferenceStore store = AwsToolkitCore.getDefault().getPreferenceStore();
            clientId = store.getString(MOBILE_ANALYTICS_CLIENT_ID_PREF_STORE_KEY);
        }

        if (StringUtils.isNullOrEmpty(clientId)) {
            // Generate a GUID as the client id and persist it in the preference store
            clientId = UUID.randomUUID().toString();
        }

        awsToolkitNode.put(MOBILE_ANALYTICS_CLIENT_ID_PREF_STORE_KEY, clientId);

        try {
            awsToolkitNode.flush();
        } catch (BackingStoreException e) {
            // Silently fails if exception occurs when flushing the client id.
        }
        return clientId;
    }
}


text:
using FmbLib;
using System;
using System.IO;
using FezEngine.Structure;
using Microsoft.Xna.Framework.Content;
using System.Collections.Generic;

namespace FmbLib.TypeHandlers.Fez {
	public class SkyHandler : TypeHandler<Sky> {

		public override object Read(BinaryReader reader, bool xnb) {
			Sky obj = new Sky();

			obj.Name = reader.ReadString();
			obj.Background = reader.ReadString();
			obj.WindSpeed = reader.ReadSingle();
			obj.Density = reader.ReadSingle();
			obj.FogDensity = reader.ReadSingle();
			obj.Layers = FmbUtil.ReadObject<List<SkyLayer>>(reader, xnb);
			obj.Clouds = FmbUtil.ReadObject<List<string>>(reader, xnb);
			obj.Shadows = FmbUtil.ReadObject<string>(reader, xnb);
			obj.Stars = FmbUtil.ReadObject<string>(reader, xnb);
			obj.CloudTint = FmbUtil.ReadObject<string>(reader, xnb);
			obj.VerticalTiling = reader.ReadBoolean();
			obj.HorizontalScrolling = reader.ReadBoolean();
			obj.LayerBaseHeight = reader.ReadSingle();
			obj.InterLayerVerticalDistance = reader.ReadSingle();
			obj.InterLayerHorizontalDistance = reader.ReadSingle();
			obj.HorizontalDistance = reader.ReadSingle();
			obj.VerticalDistance = reader.ReadSingle();
			obj.LayerBaseSpacing = reader.ReadSingle();
			obj.WindParallax = reader.ReadSingle();
			obj.WindDistance = reader.ReadSingle();
			obj.CloudsParallax = reader.ReadSingle();
			obj.ShadowOpacity = reader.ReadSingle();
			obj.FoliageShadows = reader.ReadBoolean();
			obj.NoPerFaceLayerXOffset = reader.ReadBoolean();
			obj.LayerBaseXOffset = reader.ReadSingle();

			return obj;
		}

		public override void Write(BinaryWriter writer, object obj_) {
			Sky obj = (Sky) obj_;

			writer.Write(obj.Name);
			writer.Write(obj.Background);
			writer.Write(obj.WindSpeed);
			writer.Write(obj.Density);
			writer.Write(obj.FogDensity);
			FmbUtil.WriteObject(writer, obj.Layers);
			FmbUtil.WriteObject(writer, obj.Clouds);
			FmbUtil.WriteObject(writer, obj.Shadows);
			FmbUtil.WriteObject(writer, obj.Stars);
			FmbUtil.WriteObject(writer, obj.CloudTint);
			writer.Write(obj.VerticalTiling);
			writer.Write(obj.HorizontalScrolling);
			writer.Write(obj.LayerBaseHeight);
			writer.Write(obj.InterLayerVerticalDistance);
			writer.Write(obj.InterLayerHorizontalDistance);
			writer.Write(obj.HorizontalDistance);
			writer.Write(obj.VerticalDistance);
			writer.Write(obj.LayerBaseSpacing);
			writer.Write(obj.WindParallax);
			writer.Write(obj.WindDistance);
			writer.Write(obj.CloudsParallax);
			writer.Write(obj.ShadowOpacity);
			writer.Write(obj.FoliageShadows);
			writer.Write(obj.NoPerFaceLayerXOffset);
			writer.Write(obj.LayerBaseXOffset);
		}
	}
}


text:
using namespace std;

#include "interleaving_string.h"

bool InterleavingString::isInterleave(const string& s1,
                                      const string& s2,
                                      const string& s3) {
  if (s1.length() + s2.length() != s3.length())
    return false;

  // [0, n]
  init(s1.length() + 1, s2.length() + 1);

  return isInterleaveSub(s1, 0, s2, 0, s3);
}

bool InterleavingString::isInterleaveSub(const string& s1, size_t x_index,
                                         const string& s2, size_t y_index,
                                         const string& s3) {
  assert(x_index <= s1.length() && y_index <= s2.length() &&
         (s1.length() + s2.length() == s3.length()));

  size_t z_index = x_index + y_index;

  if (z_index == s3.length())
    return true;

  VisitState value = interleaving_matrix_[y_index][x_index];
  if (value != VisitState::Init) {
    return value == VisitState::Success;
  }

  interleaving_matrix_[y_index][x_index] = VisitState::Fail;

  if (x_index < s1.length() &&
      s3[z_index] == s1[x_index] &&
      isInterleaveSub(s1, x_index + 1, s2, y_index, s3)) {
    interleaving_matrix_[y_index][x_index] = VisitState::Success;
    return true;
  }

  if (y_index < s2.length() &&
      s3[z_index] == s2[y_index] &&
      isInterleaveSub(s1, x_index, s2, y_index + 1, s3)) {
    interleaving_matrix_[y_index][x_index] = VisitState::Success;
    return true;
  }

  return false;
}

void InterleavingString::init(size_t x_length, size_t y_length) {
  vector<VisitState> vec(x_length, VisitState::Init);
  interleaving_matrix_.resize(y_length, vec);
}


text:
package io.tracee.contextlogger.connector.http;

import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.AsyncHttpClientConfig;

public interface AsyncHttpClientProvider {

	AsyncHttpClient provideHttpClient(AsyncHttpClientConfig config);

}


text:
module Arbetsformedlingen
  CompanySchema = Dry::Validation.Params do
    configure do
      config.type_specs = true
      config.messages_file = File.expand_path('../../../config/locales/errors.yml', __dir__)

      predicates(Predicates)
    end

    required(:name, Types::StrippedString).filled
    required(:cin, Types::CIN).filled(:str?, :cin?)

    optional(:description, Types::StrippedString).filled

    required(:address).schema do
      required(:municipality, Types::Municipality).filled(:municipality?)
      required(:country_code, Types::Country).filled(:str?, :country_code?)
      required(:street, Types::StrippedString).filled
      required(:city, Types::StrippedString).filled
      required(:zip, Types::Zip).filled(:str?, :zip?)
    end
  end

  class Company < Model
    def initialize(hash)
      super(CompanySchema.call(hash))
    end

    def to_h
      hash = super
      address = hash.fetch(:address)
      hash[:address][:full_address] = [
        address.fetch(:street),
        address.fetch(:zip),
        address.fetch(:city),
      ].join(', ')
      hash[:cin_arbetsformedlingen] = cin_arbetsformedlingen(hash.fetch(:cin))
      hash
    end

    # Formats a Company Identification Number the way Arbetsformedlingen likes it
    def cin_arbetsformedlingen(cin)
      String.new(cin.dup).
        delete('-').
        insert(6, '-').
        insert(0, '46-')
    end
  end
end


text:
package hu.kazocsaba.memento;
/**
 * Thrown when a memento property was accessed as a different type than
 * as it was set.
 * @author Kazó Csaba
 *
 */
public class TypeMismatchException extends MementoFormatException {
    private static final long serialVersionUID = 28614353283745L;

	public TypeMismatchException() {}

	public TypeMismatchException(String message) {
		super(message);
	}

	public TypeMismatchException(Throwable cause) {
		super(cause);
	}

	public TypeMismatchException(String message, Throwable cause) {
		super(message, cause);
	}

}


text:
hapi-ustream-api
================

Hapi plugin for ustream api integration


text:
Watson is basically Inbox by Gmail, but nicely packaged for your desktop with advanced fetures. Built entirely using Node.js, electron and web awesomeness.

## Installation

Right now the only way to run Watson is to build from source. Packages for Windows, OS X and linux coming soon.

*Note: Watson requires that you have a working Installation of Nodejs on your system, and that it is on your PATH.*

```
$ git clone https://github.com/saq1610/Watson.git
$ cd Watson/
$ npm install
$ npm start
```
## TODO
- Cross Platform Packages
- Native notifications.
- Better Desktop Environment integration
- Reduce Footprint
- Get *Real* Graphics.

## License

MIT © [Saqeef Iqbal](https://github.com/saq1610)


text:
<?php

namespace NamespaceTest;

class Book
        extends \Activerecord\Model
{

    static $belongs_to = [[
    'parent_book',
    'class_name' => '\NamespaceTest\Book'],
        [
            'parent_book_2',
            'class_name' => 'Book'],
        [
            'parent_book_3',
            'class_name' => '\Book'],
    ];
    static $has_many = [[
    'pages',
    'class_name' => '\NamespaceTest\SubNamespaceTest\Page'],
        [
            'pages_2',
            'class_name' => 'SubNamespaceTest\Page']];

}


text:
<!DOCTYPE HTML>

<title>ShadowVisualizer.VisualizerSource</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Robolectric 4.9-SNAPSHOT |

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Package org.robolectric.shadows

Interface ShadowVisualizer.VisualizerSource

Enclosing class:

ShadowVisualizer

public static interface ShadowVisualizer.VisualizerSource

Provides underlying data for the ShadowVisualizer. The default implementations are
 there only to help tests to run when they don't need to verify specific behaviour, otherwise
 tests should probably override these and provide some specific implementation that allows them
 to verify the functionality needed.

Method Summary

All Methods Instance Methods Default Methods

Modifier and Type
Method
Description

default int
getFft(byte[] fft)

default int
getPeakRms(Visualizer.MeasurementPeakRms measurement)

default int
getSamplingRate()

default int
getWaveForm(byte[] waveform)

default void
release()

Method Detail

getSamplingRate

default int getSamplingRate()

getWaveForm

default int getWaveForm(byte[] waveform)

getFft

default int getFft(byte[] fft)

getPeakRms

default int getPeakRms(Visualizer.MeasurementPeakRms measurement)

release

default void release()

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Robolectric 4.9-SNAPSHOT |

All Classes

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
"""sci_analysis module: data
Functions:
    is_vector: test if the passed array_like argument is a sci_analysis Vector object.
    is_data: test if the passed array_like argument is a sci_analysis Data object.
"""

def is_data(obj):
    """
    Test if the passed array_like argument is a sci_analysis Data object.

    Parameters
    ----------
    obj : object
        The input object.

    Returns
    -------
    test result : bool
        The test result of whether seq is a sci_analysis Data object or not.
    """
    return isinstance(obj, Data)

class Data(object):
    """
    The super class used by all objects representing data for analysis
    in sci_analysis. All analysis classes should expect the data provided through
    arguments to be a descendant of this class.

    Data members are data_type, data and name. data_type is used for identifying
    the container class. The data member stores the data provided through an
    argument. The name member is an optional name for the Data object.
    """

    def __init__(self, v=None, n=None):
        """
        Sets the data and name members.

        Parameters
        ----------
        v : array_like
            The input object
        n : str
            The name of the Data object
        """
        self._values = v
        self._name = n

    def is_empty(self):
        """
        Tests if this Data object's data member equals 'None' and returns the result.

        Returns
        -------
        test result : bool
            The result of whether self._values is set or not
        """
        return self._values is None

    @property
    def data(self):
        return self._values

    @property
    def name(self):
        return self._name

    def __repr__(self):
        """
        Prints the Data object using the same representation as its data member.

        Returns
        -------
        output : str
            The string representation of the encapsulated data.
        """
        return self._values.__repr__()

    def __len__(self):
        """Returns the length of the data member. If data is not defined, 0 is returned. If the data member is a scalar
        value, 1 is returned.

        Returns
        -------
        length : int
            The length of the encapsulated data.
        """
        if self._values is not None:
            try:
                return len(self._values)
            except TypeError:
                return 1
        else:
            return 0

    def __getitem__(self, item):
        """
        Gets the value of the data member at index item and returns it.

        Parameters
        ----------
        item : int
            An index of the encapsulating data.

        Returns
        -------
        value : object
            The value of the encapsulated data at the specified index, otherwise None if no such index exists.
        """
        try:
            return self._values[item]
        except (IndexError, AttributeError):
            return None

    def __contains__(self, item):
        """
        Tests whether the encapsulated data contains the specified index or not.

        Parameters
        ----------
        item : int
            An index of the encapsulating data.

        Returns
        -------
        test result : bool
            The test result of whether item is a valid index of the encapsulating data or not.
        """
        try:
            return item in self._values
        except AttributeError:
            return None

    def __iter__(self):
        """
        Give this Data object the iterative behavior of its encapsulated data.

        Returns
        -------
        itr :iterator
            An iterator based on the encapsulated sequence.
        """
        return self._values.__iter__()


text:
function compute_min_levenshtein_distance(res, query) {
  var ldist = new Array();

  $.each(res, function(i, r) {
    var lev = window.Levenshtein;
    var english = r.english.join('/').substring(0, 32);

    var l_hanzi = Math.abs(lev.get(query, r.hanzi));
    var l_pinyin = Math.abs(lev.get(query, r.pinyin));
    var l_english = Math.abs(lev.get(query, english));
    var min_ldist = Math.min(l_hanzi, l_pinyin, l_english);

    ldist.push({ min_ldist: min_ldist, res_index: i });
  })

  return ldist;
}


text:
export BERT_DIR=/path/to/bert/uncased_L-24_H-1024_A-16
export GLUE_DIR=/path/to/glue
export TASK_NAME="MNLI"
export WIKI103_DIR=/directory/to/store/wikitext103/
export EXTRACTION_DATA=/path/to/extraction/dataset/
export VICTIM_MODEL=/path/to/victim/model/checkpoint
export OUTPUT_DIR=/path/to/output/extracted/model/checkpoints

# Task-specific variables

if ["$TASK_NAME" = "MNLI"]; then
  # For pairwise input tasks (like MNLI), select random_ed_k_uniform
  DATA_SCHEME="random_ed_k_uniform"
  DEV_FILE_NAME="dev_matched.tsv"
else:
  # For single input tasks (like SST-2), select random_uniform
  DATA_SCHEME="random_uniform"
  DEV_FILE_NAME="dev.tsv"
fi

# STEP 1
# Preprocess wikitext103. This is a one-time step, can be ignored once preprocessed.

# Make sure you have downloaded and extracted the *raw* WikiText103 dataset from
# https://s3.amazonaws.com/research.metamind.io/wikitext/wikitext-103-raw-v1.zip
python -m language.bert_extraction.steal_bert_classifier.utils.wiki103_sentencize \
  --wiki103_raw=$WIKI103_DIR/wiki.train.raw \
  --output_path=$WIKI103_DIR/wikitext103-sentences.txt

# STEP 2
# Build the RANDOM set of queries to extract the model
# By default, this script generates datasets identical in size as $GLUE_DIR/$TASK_NAME/train.tsv
# For custom dataset sizes, use the flags --dataset_size and --augmentations
python -m language.bert_extraction.steal_bert_classifier.data_generation.preprocess_random \
  --input_path $GLUE_DIR/$TASK_NAME/train.tsv \
  --output_path $EXTRACTION_DATA/new_train_sents.tsv \
  --task_name $TASK_NAME \
  --scheme $DATA_SCHEME \
  --ed1_changes 3 \
  --thief_dataset $WIKI103_DIR/wikitext103-sentences.txt \
  --vocab_mode full_corpus_top_10000

# STEP 3
# Run the victim model classifier in inference mode to get outputs for the queries
python -m language.bert_extraction.steal_bert_classifier.models.run_classifier \
  --task_name=$TASK_NAME \
  --exp_name="query_victim" \
  --do_train=false \
  --do_eval=false \
  --do_predict=true \
  --do_lower_case=true \
  --predict_input_file=$EXTRACTION_DATA/new_train_sents.tsv \
  --predict_output_file=$EXTRACTION_DATA/new_train_distill_results.tsv \
  --vocab_file=$BERT_DIR/vocab.txt \
  --bert_config_file=$BERT_DIR/bert_config.json \
  --init_checkpoint=$BERT_DIR/bert_model.ckpt \
  --max_seq_length=128 \
  --output_dir=$VICTIM_MODEL

# STEP 4.1
# Combine the queries with the outputs of the victim model
# For using the argmax outputs instead of soft probabilities, use --split="train_argmax"
# Use models/run_classifier_distillation.py even with the argmax case, since the
# script outputs a dataset uses one-hot soft probabilities
python -m language.bert_extraction.steal_bert_classifier.utils.preprocess_distill_input \
  --task_name=$TASK_NAME \
  --sents_path=$EXTRACTION_DATA/new_train_sents.tsv \
  --probs_path=$EXTRACTION_DATA/new_train_distill_results.tsv \
  --output_path=$EXTRACTION_DATA/train.tsv \
  --split_type="train"

# STEP 4.2
# Convert the original dev file to contain one-hot soft probability vectors
python -m language.bert_extraction.steal_bert_classifier.utils.preprocess_distill_input \
  --task_name=$TASK_NAME \
  --sents_path=$GLUE_DIR/$TASK_NAME/$DEV_FILE_NAME \
  --output_path=$EXTRACTION_DATA/$DEV_FILE_NAME \
  --split_type="dev"

# STEP 5
# Train the extracted model on the extracted data
# You can modify the $BERT_DIR variable to run the experiments in the mismatched architecture section
python -m language.bert_extraction.steal_bert_classifier.models.run_classifier_distillation \
  --task_name=$TASK_NAME \
  --exp_name="train_extracted_model" \
  --do_train=true \
  --do_eval=true \
  --do_lower_case=true \
  --save_checkpoints_steps=5000 \
  --data_dir=$EXTRACTION_DATA \
  --vocab_file=$BERT_DIR/vocab.txt \
  --bert_config_file=$BERT_DIR/bert_config.json \
  --init_checkpoint=$BERT_DIR/bert_model.ckpt \
  --max_seq_length=128 \
  --train_batch_size=32 \
  --learning_rate=3e-5 \
  --num_train_epochs=3.0 \
  --output_dir=$OUTPUT_DIR


text:
external help file: Microsoft.Azure.Commands.Compute.dll-Help.xml
Module Name: AzureRM.Compute
ms.assetid: 45F35BDD-969E-4521-9E8D-3499A15434A6
online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.compute/get-azurermvmextensionimagetype
schema: 2.0.0
---

# Get-AzureRmVMExtensionImageType

## SYNOPSIS
Gets the type of an Azure extension.

## SYNTAX

```
Get-AzureRmVMExtensionImageType -Location <String> -PublisherName <String>
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

## DESCRIPTION
The **Get-AzureRmVMExtensionImageType** cmdlet gets the type of an Azure extension.

## EXAMPLES

### Example 1: Get an extension image type
```
PS C:\> Get-AzureRmVMExtensionImageType -Location "Central US" -PublisherName "Fabrikam"
```

This command gets the extension image type for the specified publisher and location.

## PARAMETERS

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Location
Specifies the location of an extension.
This cmdlet gets the type for an extension at the location that this parameter specifies.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -PublisherName
Specifies the name of a publisher of an extension.
To obtain an extension publisher, use the Get-AzureRmVMImagePublisher cmdlet.
This cmdlet gets the type for an extension from the publisher that this parameter specifies.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

## OUTPUTS

### Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineExtensionImageType

## NOTES

## RELATED LINKS

[Get-AzureRmVMExtensionImage](./Get-AzureRmVMExtensionImage.md)

[Get-AzureRmVMImagePublisher](./Get-AzureRmVMImagePublisher.md)


text:
<?php

/*
 * Created by tpay.com
 */

namespace tpayLibs\src\_class_tpay\Utilities;

use Exception;

/**
 * Class TException
 *
 * @package tpay
 */
class TException extends Exception
{
    /**
     * @param string $message error message
     * @param int $code error code
     */
    public function __construct($message, $code = 0)
    {
        $message .= ' in file ' . $this->getFile() . ' line: ' . $this->getLine();
        Util::log('TException', $message . "\n\n" . $this->getTraceAsString());
        $this->message = $code . ' : ' . $message;

        return $code . ' : ' . $message;
    }
}


text:
import * as React from 'react';
import * as strings from 'ReactDatatableWebPartStrings';
import { isImageUrl, isNullOrUndefined } from '../../../shared/utilities/utilities';
import { Link } from '@material-ui/core';
import { Image, IImageProps, ImageFit } from 'office-ui-fabric-react/lib/Image';
import styles from '../ExportListItemsToCSV/ExportListItemsToCSV.module.scss';

interface IImageOrLinkProps {
    url: string;
    description: string;
}

export function RenderImageOrLink(props: IImageOrLinkProps) {

    const [isImage, setIsImage] = React.useState<boolean>();
    let { url, description } = props;

    React.useEffect(() => {
        isImageUrl(url).then(response => {
            setIsImage(response);
        });
    }, [props]);

    return <>
        {
            !isNullOrUndefined(isImage) && (
                isImage ? (
                    <Image
                        src={url}
                        alt={description}
                        height={50}
                        width={50}
                        onClick={() => window.location.href =  url }
                        imageFit={ImageFit.cover}
                    />
                ) :
                    (
                        <Link href={url} target="_blank">{description}</Link>
                    )
            )
        }
    </>;

}