code stringlengths 3 1.01M | repo_name stringlengths 5 116 | path stringlengths 3 311 | language stringclasses 30 values | license stringclasses 15 values | size int64 3 1.01M |
|---|---|---|---|---|---|
//NOT_CREATE_META_DATA
#ifndef __SOC_NORMAL_MAPPING_H__
#define __SOC_NORMAL_MAPPING_H__
float3 UnpackNormal(float3 normalMapXYZ, float3 normal, float3 tangent)
{
float3 binormal = normalize( cross(normal, tangent) );
float3x3 TBN = float3x3(normalize(tangent), normalize(binormal), normalize(normal));
float3 tangentNormal = normalize(normalMapXYZ * 2.0f - 1.0f);
return mul(TBN, tangentNormal);
}
#endif
| Jin02/SOCEngine | SOCEngine/SOCEngine/ShaderCodes/NormalMapping.h | C | mit | 415 |
import re
osm = open("stops.txt", 'r', encoding="utf-8")
bugs = open("BAD-STOPS.txt", 'r', encoding="utf-8")
still = open("BUGS-NOT-IN-OSM.txt", 'w')
bugi = []
for line in bugs:
line = line.split(' ')
bugi.append(line[0])
print(len(bugi))
for line in osm:
line = line.split(',')
if line[0].isnumeric():
stop_nr = line[0]
if stop_nr in bugi:
bugi.remove(stop_nr)
for item in bugi:
still.write(item)
still.write("\n")
osm.close()
bugs.close()
still.close()
print(len(bugi))
| javnik36/ZTMtoGTFS | bugs_checker_osm.py | Python | mit | 547 |
<html>
<head>
<title>User agent detail - Opera/8.01 (Windows 98; U; xx)</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
<h5 class="header light">
Opera/8.01 (Windows 98; U; xx)
</h5>
</div>
</div>
<div class="section">
<table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Source result (test suite)</th></tr><tr><td>whichbrowser/parser<br /><small>/tests/data/desktop/browser-opera.yaml</small></td><td>Opera 8.01</td><td>Windows 98</td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-test">Detail</a>
<!-- Modal Structure -->
<div id="modal-test" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Testsuite result detail</h4>
<p><pre><code class="php">Array
(
[headers] => User-Agent: Opera/8.01 (Windows 98; U; xx)
[result] => Array
(
[browser] => Array
(
[name] => Opera
[version] => 8.01
[type] => browser
)
[os] => Array
(
[name] => Windows
[version] => Array
(
[value] => 4.1
[alias] => 98
)
)
[device] => Array
(
[type] => desktop
)
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapPhp<br /><small>6012</small></td><td>Opera 8.01</td><td>Presto 1.0</td><td>Win98 98</td><td style="border-left: 1px solid #555"></td><td>Windows Desktop</td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.014</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-215ac98d-ccf8-4615-916e-5a819d6a59c9">Detail</a>
<!-- Modal Structure -->
<div id="modal-215ac98d-ccf8-4615-916e-5a819d6a59c9" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapPhp result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^opera\/8\.01.*\(.*windows 98.*\).*$/
[browser_name_pattern] => opera/8.01*(*windows 98*)*
[parent] => Opera 8.01
[comment] => Opera 8.01
[browser] => Opera
[browser_type] => Browser
[browser_bits] => 32
[browser_maker] => Opera Software ASA
[browser_modus] => unknown
[version] => 8.01
[majorver] => 8
[minorver] => 01
[platform] => Win98
[platform_version] => 98
[platform_description] => Windows 98
[platform_bits] => 32
[platform_maker] => Microsoft Corporation
[alpha] =>
[beta] =>
[win16] =>
[win32] => 1
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[javascript] => 1
[vbscript] =>
[javaapplets] =>
[activexcontrols] =>
[ismobiledevice] =>
[istablet] =>
[issyndicationreader] =>
[crawler] =>
[cssversion] => 3
[aolversion] => 0
[device_name] => Windows Desktop
[device_maker] => Various
[device_type] => Desktop
[device_pointing_method] => mouse
[device_code_name] => Windows Desktop
[device_brand_name] => unknown
[renderingengine_name] => Presto
[renderingengine_version] => 1.0
[renderingengine_description] => For Opera 7 and above, Macromedia Dreamweaver MX and MX 2004 (Mac), and Adobe Creative Suite 2.
[renderingengine_maker] => Opera Software ASA
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>DonatjUAParser<br /><small>v0.5.0</small></td><td>Opera 8.01</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661">Detail</a>
<!-- Modal Structure -->
<div id="modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] => Windows
[browser] => Opera
[version] => 8.01
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>NeutrinoApiCom<br /><small></small></td><td>Opera 8.01</td><td><i class="material-icons">close</i></td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop-browser</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.18502</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc">Detail</a>
<!-- Modal Structure -->
<div id="modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>NeutrinoApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[mobile_screen_height] => 0
[is_mobile] =>
[type] => desktop-browser
[mobile_brand] =>
[mobile_model] =>
[version] => 8.01
[is_android] =>
[browser_name] => Opera
[operating_system_family] => Windows
[operating_system_version] => 98
[is_ios] =>
[producer] => Opera Software ASA.
[operating_system] => Windows 98
[mobile_screen_width] => 0
[mobile_browser] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>PiwikDeviceDetector<br /><small>3.5.2</small></td><td>Opera 8.01</td><td>Presto </td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.007</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-21638055-738d-46ba-a1b1-f5114bc26475">Detail</a>
<!-- Modal Structure -->
<div id="modal-21638055-738d-46ba-a1b1-f5114bc26475" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>PiwikDeviceDetector result detail</h4>
<p><pre><code class="php">Array
(
[client] => Array
(
[type] => browser
[name] => Opera
[short_name] => OP
[version] => 8.01
[engine] => Presto
)
[operatingSystem] => Array
(
[name] => Windows
[short_name] => WIN
[version] => 98
[platform] =>
)
[device] => Array
(
[brand] =>
[brandName] =>
[model] =>
[device] => 0
[deviceName] => desktop
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] =>
[isTablet] =>
[isTV] =>
[isDesktop] => 1
[isMobile] =>
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.0</small></td><td>Opera 8.01</td><td><i class="material-icons">close</i></td><td>Windows 98</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c">Detail</a>
<!-- Modal Structure -->
<div id="modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>SinergiBrowserDetector result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Sinergi\BrowserDetector\Browser Object
(
[userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Opera/8.01 (Windows 98; U; xx)
)
[name:Sinergi\BrowserDetector\Browser:private] => Opera
[version:Sinergi\BrowserDetector\Browser:private] => 8.01
[isRobot:Sinergi\BrowserDetector\Browser:private] =>
[isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
)
[operatingSystem] => Sinergi\BrowserDetector\Os Object
(
[name:Sinergi\BrowserDetector\Os:private] => Windows
[version:Sinergi\BrowserDetector\Os:private] => 98
[isMobile:Sinergi\BrowserDetector\Os:private] =>
[userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Opera/8.01 (Windows 98; U; xx)
)
)
[device] => Sinergi\BrowserDetector\Device Object
(
[name:Sinergi\BrowserDetector\Device:private] => unknown
[userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Opera/8.01 (Windows 98; U; xx)
)
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UAParser<br /><small>v3.4.5</small></td><td>Opera 8.1</td><td><i class="material-icons">close</i></td><td>Windows 98 </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.01</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b">Detail</a>
<!-- Modal Structure -->
<div id="modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">UAParser\Result\Client Object
(
[ua] => UAParser\Result\UserAgent Object
(
[major] => 8
[minor] => 01
[patch] =>
[family] => Opera
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] =>
[minor] =>
[patch] =>
[patchMinor] =>
[family] => Windows 98
)
[device] => UAParser\Result\Device Object
(
[brand] =>
[model] =>
[family] => Other
)
[originalUserAgent] => Opera/8.01 (Windows 98; U; xx)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentStringCom<br /><small></small></td><td>Opera 8.01</td><td><i class="material-icons">close</i></td><td>Windows 98 </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.08201</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4">Detail</a>
<!-- Modal Structure -->
<div id="modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentStringCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[agent_type] => Browser
[agent_name] => Opera
[agent_version] => 8.01
[os_type] => Windows
[os_name] => Windows 98
[os_versionName] =>
[os_versionNumber] =>
[os_producer] =>
[os_producerURL] =>
[linux_distibution] => Null
[agent_language] =>
[agent_languageTag] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small></td><td>Opera 8.1</td><td> </td><td>Windows </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.40604</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-9795f66f-7271-430e-973a-a5c0e14dc35a">Detail</a>
<!-- Modal Structure -->
<div id="modal-9795f66f-7271-430e-973a-a5c0e14dc35a" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhatIsMyBrowserCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[operating_system_name] => Windows
[simple_sub_description_string] =>
[simple_browser_string] => Opera 8 on Windows 98
[browser_version] => 8
[extra_info] => Array
(
)
[operating_platform] =>
[extra_info_table] => Array
(
)
[layout_engine_name] =>
[detected_addons] => Array
(
)
[operating_system_flavour_code] =>
[hardware_architecture] =>
[operating_system_flavour] =>
[operating_system_frameworks] => Array
(
)
[browser_name_code] => opera
[operating_system_version] => 98
[simple_operating_platform_string] =>
[is_abusive] =>
[layout_engine_version] =>
[browser_capabilities] => Array
(
)
[operating_platform_vendor_name] =>
[operating_system] => Windows 98
[operating_system_version_full] =>
[operating_platform_code] =>
[browser_name] => Opera
[operating_system_name_code] => windows
[user_agent] => Opera/8.01 (Windows 98; U; xx)
[browser_version_full] => 8.1
[browser] => Opera 8
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhichBrowser<br /><small>2.0.10</small></td><td>Opera 8.01</td><td> </td><td>Windows 98</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.015</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4">Detail</a>
<!-- Modal Structure -->
<div id="modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Opera
[version] => 8.01
[type] => browser
)
[os] => Array
(
[name] => Windows
[version] => Array
(
[value] => 4.1
[alias] => 98
)
)
[device] => Array
(
[type] => desktop
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Woothee<br /><small>v1.2.0</small></td><td>Opera 8.01</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>pc</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3f285ff5-314b-4db4-9948-54572e92e7b6">Detail</a>
<!-- Modal Structure -->
<div id="modal-3f285ff5-314b-4db4-9948-54572e92e7b6" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Woothee result detail</h4>
<p><pre><code class="php">Array
(
[name] => Opera
[vendor] => Opera
[version] => 8.01
[category] => pc
[os] => Windows 98
[os_version] => 98
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Opera 8.52</td><td><i class="material-icons">close</i></td><td>Windows XP</td><td style="border-left: 1px solid #555"></td><td></td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.013</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-1a1aee36-7ce7-4111-a391-8e2c501f1532">Detail</a>
<!-- Modal Structure -->
<div id="modal-1a1aee36-7ce7-4111-a391-8e2c501f1532" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => false
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => true
[is_largescreen] => true
[is_mobile] => false
[is_robot] => false
[is_smartphone] => false
[is_touchscreen] => false
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => false
[is_html_preferred] => true
[advertised_device_os] => Windows
[advertised_device_os_version] => XP
[advertised_browser] => Opera
[advertised_browser_version] => 8.52
[complete_device_name] => Opera Software Opera
[form_factor] => Desktop
[is_phone] => false
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Opera Software
[model_name] => Opera
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => false
[device_claims_web_support] => true
[has_qwerty_keyboard] => true
[can_skip_aligned_link_row] => true
[uaprof] =>
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] => Desktop
[mobile_browser] => Opera
[mobile_browser_version] => 8.0
[device_os_version] =>
[pointing_method] => mouse
[release_date] => 2005_april
[marketing_name] =>
[model_extra_info] =>
[nokia_feature_pack] => 0
[can_assign_phone_number] => false
[is_tablet] => false
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => false
[built_in_back_button_support] => false
[card_title_support] => false
[softkey_support] => false
[table_support] => false
[numbered_menus] => false
[menu_with_select_element_recommended] => false
[menu_with_list_of_links_recommended] => false
[icons_on_menu_items_support] => false
[break_list_of_links_with_br_element_recommended] => false
[access_key_support] => false
[wrap_mode_support] => false
[times_square_mode_support] => false
[deck_prefetch_support] => false
[elective_forms_recommended] => false
[wizards_recommended] => false
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => false
[wml_make_phone_call_string] => none
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => true
[xhtml_honors_bgcolor] => true
[xhtml_supports_forms_in_table] => true
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => false
[xhtml_select_as_dropdown] => true
[xhtml_select_as_radiobutton] => true
[xhtml_select_as_popup] => true
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => false
[xhtml_supports_inline_input] => false
[xhtml_supports_monospace_font] => false
[xhtml_supports_table_for_layout] => false
[xhtml_supports_css_cell_table_coloring] => false
[xhtml_format_as_css_property] => false
[xhtml_format_as_attribute] => false
[xhtml_nowrap_mode] => false
[xhtml_marquee_as_css_property] => false
[xhtml_readable_background_color1] => #FFFFFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => false
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => utf8
[opwv_xhtml_extensions_support] => false
[xhtml_make_phone_call_string] => none
[xhtmlmp_preferred_mime_type] => text/html
[xhtml_table_support] => false
[xhtml_send_sms_string] => none
[xhtml_send_mms_string] => none
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => true
[xhtml_supports_iframe] => full
[xhtml_avoid_accesskeys] => true
[xhtml_can_embed_video] => play_and_stop
[ajax_support_javascript] => true
[ajax_manipulate_css] => true
[ajax_support_getelementbyid] => true
[ajax_support_inner_html] => true
[ajax_xhr_type] => standard
[ajax_manipulate_dom] => true
[ajax_support_events] => true
[ajax_support_event_listener] => true
[ajax_preferred_geoloc_api] => none
[xhtml_support_level] => 4
[preferred_markup] => html_web_4_0
[wml_1_1] => false
[wml_1_2] => false
[wml_1_3] => false
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => false
[html_wi_imode_html_1] => false
[html_wi_imode_html_2] => false
[html_wi_imode_html_3] => false
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => false
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => false
[html_web_3_2] => true
[html_web_4_0] => true
[voicexml] => false
[multipart_support] => false
[total_cache_disable_support] => false
[time_to_live_support] => false
[resolution_width] => 800
[resolution_height] => 600
[columns] => 120
[max_image_width] => 800
[max_image_height] => 600
[rows] => 200
[physical_screen_width] => 400
[physical_screen_height] => 400
[dual_orientation] => false
[density_class] => 1.0
[wbmp] => false
[bmp] => true
[epoc_bmp] => false
[gif_animated] => true
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => false
[transparent_png_index] => false
[svgt_1_1] => true
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => false
[webp_lossless_support] => false
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => true
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => false
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 3200
[wifi] => true
[sdio] => false
[vpn] => false
[has_cellular_radio] => false
[max_deck_size] => 100000
[max_url_length_in_requests] => 128
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => false
[inline_support] => false
[oma_support] => false
[ringtone] => false
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => false
[ringtone_midi_polyphonic] => false
[ringtone_imelody] => false
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => false
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => false
[ringtone_mp3] => false
[ringtone_spmidi] => false
[ringtone_qcelp] => false
[ringtone_voices] => 1
[ringtone_df_size_limit] => 0
[ringtone_directdownload_size_limit] => 0
[ringtone_inline_size_limit] => 0
[ringtone_oma_size_limit] => 0
[wallpaper] => false
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => none
[wallpaper_wbmp] => false
[wallpaper_bmp] => false
[wallpaper_gif] => false
[wallpaper_jpg] => false
[wallpaper_png] => false
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 2
[wallpaper_df_size_limit] => 0
[wallpaper_directdownload_size_limit] => 0
[wallpaper_inline_size_limit] => 0
[wallpaper_oma_size_limit] => 0
[screensaver] => false
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => none
[screensaver_wbmp] => false
[screensaver_bmp] => false
[screensaver_gif] => false
[screensaver_jpg] => false
[screensaver_png] => false
[screensaver_greyscale] => false
[screensaver_colors] => 2
[screensaver_df_size_limit] => 0
[screensaver_directdownload_size_limit] => 0
[screensaver_inline_size_limit] => 0
[screensaver_oma_size_limit] => 0
[picture] => false
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => none
[picture_wbmp] => false
[picture_bmp] => false
[picture_gif] => false
[picture_jpg] => false
[picture_png] => false
[picture_greyscale] => false
[picture_colors] => 2
[picture_df_size_limit] => 0
[picture_directdownload_size_limit] => 0
[picture_inline_size_limit] => 0
[picture_oma_size_limit] => 0
[video] => false
[oma_v_1_0_forwardlock] => false
[oma_v_1_0_combined_delivery] => false
[oma_v_1_0_separate_delivery] => false
[streaming_video] => false
[streaming_3gpp] => false
[streaming_mp4] => false
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => -1
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => -1
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => -1
[streaming_acodec_amr] => none
[streaming_acodec_aac] => none
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => none
[wap_push_support] => false
[connectionless_service_indication] => false
[connectionless_service_load] => false
[connectionless_cache_operation] => false
[connectionoriented_unconfirmed_service_indication] => false
[connectionoriented_unconfirmed_service_load] => false
[connectionoriented_unconfirmed_cache_operation] => false
[connectionoriented_confirmed_service_indication] => false
[connectionoriented_confirmed_service_load] => false
[connectionoriented_confirmed_cache_operation] => false
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => false
[j2me_cldc_1_0] => false
[j2me_cldc_1_1] => false
[j2me_midp_1_0] => false
[j2me_midp_2_0] => false
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => false
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => false
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => false
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 0
[j2me_max_jar_size] => 0
[j2me_storage_size] => 0
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 0
[j2me_screen_height] => 0
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 0
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => false
[j2me_wav] => false
[j2me_amr] => false
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 0
[j2me_right_softkey_code] => 0
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => false
[sender] => false
[mms_max_size] => 0
[mms_max_height] => 0
[mms_max_width] => 0
[built_in_recorder] => false
[built_in_camera] => false
[mms_jpeg_baseline] => false
[mms_jpeg_progressive] => false
[mms_gif_static] => false
[mms_gif_animated] => false
[mms_png] => false
[mms_bmp] => false
[mms_wbmp] => false
[mms_amr] => false
[mms_wav] => false
[mms_midi_monophonic] => false
[mms_midi_polyphonic] => false
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => false
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => false
[mms_vcalendar] => false
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => false
[mms_mp4] => false
[mms_3gpp] => false
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => false
[ems_variablesizedpictures] => false
[ems_imelody] => false
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => false
[siemens_logo_width] => 101
[siemens_logo_height] => 29
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => false
[wav] => false
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => false
[midi_polyphonic] => false
[sp_midi] => false
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => false
[au] => false
[amr] => false
[awb] => false
[aac] => false
[mp3] => false
[voices] => 1
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => true
[css_supports_width_as_percentage] => true
[css_border_image] => none
[css_rounded_corners] => none
[css_gradient] => none
[css_spriting] => true
[css_gradient_linear] => none
[is_transcoder] => false
[transcoder_ua_header] => user-agent
[rss_support] => false
[pdf_support] => true
[progressive_download] => true
[playback_vcodec_h263_0] => -1
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => -1
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => -1
[playback_real_media] => none
[playback_3gpp] => false
[playback_3g2] => false
[playback_mp4] => false
[playback_mov] => false
[playback_acodec_amr] => none
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => false
[html_preferred_dtd] => html4
[viewport_supported] => false
[viewport_width] =>
[viewport_userscalable] =>
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => none
[image_inlining] => true
[is_smarttv] => false
[is_console] => false
[nfc_support] => false
[ux_full_desktop] => true
[jqm_grade] => A
[is_sencha_touch_ok] => true
[controlcap_is_smartphone] => default
[controlcap_is_ios] => default
[controlcap_is_android] => default
[controlcap_is_robot] => default
[controlcap_is_app] => default
[controlcap_advertised_device_os] => default
[controlcap_advertised_device_os_version] => default
[controlcap_advertised_browser] => default
[controlcap_advertised_browser_version] => default
[controlcap_is_windows_phone] => default
[controlcap_is_full_desktop] => default
[controlcap_is_largescreen] => default
[controlcap_is_mobile] => default
[controlcap_is_touchscreen] => default
[controlcap_is_wml_preferred] => default
[controlcap_is_xhtmlmp_preferred] => default
[controlcap_is_html_preferred] => default
[controlcap_form_factor] => default
[controlcap_complete_device_name] => default
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr></table>
</div>
<div class="section">
<h1 class="header center orange-text">About this comparison</h1>
<div class="row center">
<h5 class="header light">
The primary goal of this project is simple<br />
I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br />
<br />
The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br />
<br />
You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br />
<br />
The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a>
</h5>
</div>
</div>
<div class="card">
<div class="card-content">
Comparison created <i>2016-02-13 13:28:25</i> | by
<a href="https://github.com/ThaDafinser">ThaDafinser</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script>
<script>
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
</script>
</body>
</html> | ThaDafinser/UserAgentParserComparison | v4/user-agent-detail/2d/d9/2dd9599c-96c8-4931-ac2a-b6b272828605.html | HTML | mit | 45,262 |
package dextrous.app.hack.ai.cedric.activity;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | DextrousInc/Cedric | app/src/test/java/dextrous/app/hack/ai/cedric/cedric/ExampleUnitTest.java | Java | mit | 329 |
# encoding: utf-8
require_relative 'multi_part_dashboard_updater'
require_relative 'ci_build_status_updater'
require_relative 'bigtuna_ci_project_status_reader'
require_relative 'hours_logged_updater'
require_relative 'freckle_hours_logged_reader'
require_relative 'exception_printing'
updater = MultiPartDashboardUpdater.new
threads = {
:update_build_status => ExceptionPrinting::ThreadBuilder.new_thread do
updater.update_part(:build_status) do |updater|
build_status_updater = CiBuildStatusUpdater.new(BigtunaCiProjectStatusReader.new)
build_status_updater.update(updater)
end
end,
:update_hours => ExceptionPrinting::ThreadBuilder.new_thread do
updater.update_part(:hours) do |updater|
hours_updater = HoursLoggedUpdater.new(FreckleHoursLoggedReader.new)
hours_updater.update(updater)
end
end,
}
threads.each_value(&:join)
| NeomindLabs/neomind-dashboard-public | lib/update_multi_part_dashboard_once.rb | Ruby | mit | 856 |
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_filter :configure_permitted_parameters, if: :devise_controller?
before_filter :set_search
def set_search
if params[:q].present? && params[:q]["found_time"].present?
search_time = params[:q]["found_time"]
params[:q]["found_time_gteq"] = (search_time.to_date-3).to_s
params[:q]["found_time_lteq"] = (search_time.to_date+7).to_s
end
@q = Item.ransack(params[:q])
end
def login_required
if current_user.blank?
respond_to do |format|
format.html {
authenticate_user!
}
format.js {
render :partial => "common/not_logined"
}
format.all {
head(:unauthorized)
}
end
end
end
protected
def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) << [:name,:fb_id,:token]
devise_parameter_sanitizer.for(:account_update) << [:name]
end
end
| motephyr/lostfound | app/controllers/application_controller.rb | Ruby | mit | 1,109 |
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
{% include 'partials/head.html' %}
<style>
.navbar-wrapper{
margin-bottom: -90px; /* Negative margin to pull up carousel. 90px is roughly margins and height of navbar. */
}
</style>
</head>
<body>
{% set navbar_inverse=true %}
{% include 'partials/navigation/navigation.html' %}
<!-- Carousel
================================================== -->
<div id="myCarousel" class="carousel slide carousel-frontpage carousel-shuffle">
<div class="carousel-inner">
<div class="item active" style="background-image: url('/render/w1200-c16:9-q80/index/wallpaper.jpg');">
<div class="container" style="height:100%;">
<div class="carousel-caption">
<h2 class="featurette-heading" style="color:white">{{ page.name | upper}}</h2>
<p class="lead">{{ page.tagline | lower}}</p>
<!-- <a class="btn btn-inverse btn-large" href="{{ page.site_root }}lab">Learn more about the lab »</a>-->
</div>
</div>
</div>
{% for child in page.root %}
{% if child.children %}
{% for child in child.children | reverse%}
{% if "Featured" in child.tags %}
<div class="item">
<img src="{{ resize_path( child.thumb.url, '1920', '', '16:9', 80) }}" alt="{% if child.thumb.description %} {{ child.thumb.description }} {% endif %}" class="vertical-center gray">
<div class="container">
<div class="carousel-caption">
<h2 class="featurette-heading" style="color:white;">{{ child.title }}</h2><br/>
<p class="lead">{{ child.date | date("Y") }}</p><br/>
<a class="btn btn-large" href="{{ child.url }}">{% if child.html %}Watch the video {% else %}See more{% endif %} »</a>
</div>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div><!-- /.carousel-inner -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
</div><!-- /.carousel -->
<!-- Marketing messaging and featurettes
================================================== -->
<!-- Wrap the rest of the page in another container to center all the content. -->
<div class="container marketing">
<!-- Three columns of text below the carousel -->
<div class="row">
<div class="span4" class="iconContainer" id="containerWork">
<!-- <canvas width="140" height="140" id="iconWork" data-processing-sources="/processing/iconWork/iconWork.pde" ></canvas>-->
<p><a href="{{ page.site_root }}{{ page.column1url }}"><img src="/content/index/æ-logo_BW-20.png" alt="Æ Logo" height="200" width="200"></a></p>
</div>
<div class="span4">
<!-- <script type="application/processing" src="/processing/iconLab/iconLab.pde">
</script><canvas width="140" height="140"></canvas>
--> {{ page.column2text }}
<p><a class="btn" href="{{ page.site_root }}{{ page.column2url }}">{{ page.column2button }} »</a></p>
</div>
<div class="span4" class="iconContainer" id="containerMe">
<!-- <canvas width="140" height="140" id="iconMe" data-processing-sources="/processing/iconMe/iconMe.pde" ></canvas>
--> {{ page.column3text }}
<p><a class="btn" href="{{ page.site_root }}{{ page.column3url }}">{{ page.column3button }} »</a></p>
</div>
</div><!-- /.row -->
<hr class="featurette-divider">
<!-- /END THE FEATURETTES -->
{% include 'partials/footer.html' %}
<script type="application/javascript">
$(document).ready(function() {
function setProcessingFocus(sketch,focus){
var sketch = Processing.getInstanceById($(sketch).children('canvas').attr('id'));
if(focus){
sketch.setParentFocused();
} else {
sketch.setParentBlurred();
}
}
$('#containerWork').mouseenter(function(){
setProcessingFocus(this, true);
});
$('#containerWork').mouseleave(function(){
setProcessingFocus(this, false);
});
$('#containerMe').mouseenter(function(){
setProcessingFocus(this, true);
});
$('#containerMe').mouseleave(function(){
setProcessingFocus(this, false);
});
});
</script>
</body>
</html>
| adaptiveenvironments/stacey | templates/default.html | HTML | mit | 4,837 |
package com.bugsnag.mazerunnerplainspring;
import com.bugsnag.Bugsnag;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@Service
public class ScheduledTaskService {
@Value("${RUN_SCHEDULED_TASK:false}")
private boolean throwException;
private volatile boolean exceptionSent = false;
@Scheduled(fixedDelay = 3000)
public void doSomething() {
if (throwException && !exceptionSent) {
// Add some thread meta data
Bugsnag.addThreadMetaData("thread", "key1", "should be cleared from meta data");
Bugsnag.clearThreadMetaData();
Bugsnag.addThreadMetaData("thread", "key2", "should be included in meta data");
exceptionSent = true;
throw new RuntimeException("Unhandled exception from ScheduledTaskService");
}
}
}
| bugsnag/bugsnag-java | features/fixtures/mazerunnerplainspring/src/main/java/com.bugsnag.mazerunnerplainspring/ScheduledTaskService.java | Java | mit | 943 |
/**
* Created by sh on 15/7/6.
*/
"use strict";
var type = require("../type");
exports.parse = function (object, define, addition) {
return type.dataParse(object, {type: Object, contents: String}, addition);
}; | LightCircle/LightCore | lib/db/mongo/operator/$rename.js | JavaScript | mit | 218 |
/**
* Created with JetBrains WebStorm.
* User: gbox3d
* Date: 13. 3. 30.
* Time: 오후 3:35
* version : 0.8
* it is parts of pig2d engine
* this engine is base on html5 css3
최종수정 2015.11.5
- 배경적용안되는 버그 수정, 2015.11.5
*/
Pig2d = {
version : '1.0.0'
};
/////////////////////
///model
Pig2d.model = Backbone.Model.extend({
initialize: function() {
var element = document.createElement('div');
var name = this.get('name');
if(name != undefined) {
element.setAttribute('id',name);
}
//2.3 이전 버전을 위한
if(element.classList != undefined) {
element.classList.add('pig2d-node');
}
else {
$(element).addClass('pig2d-node');
}
this.attributes.element = element;
this.attributes.update_signal = 'none';
this.attributes.translation = new gbox3d.core.Vect2d(0,0);
this.attributes.scale = new gbox3d.core.Vect2d(1,1);
//this.attributes.matrix = mat2d.create();
//this.attributes.matrix = new WebKitCSSMatrix();
this.attributes.flipX = false;
this.attributes.flipY = false;
this.attributes.cssupdate = true;
this.attributes.cancelTransition = false;
this.attributes.offset = {
x:0,
y:0
};
},
defaults: {
rotation : 0
},
getPosition : function() {
//if(decompose == true) {
//행렬분해후 적용
// this.decomposeCssMatrix(this.getCssMatrix());
//}
return this.attributes.translation;
},
getRotation : function() {
return this.attributes.rotation;
},
setPosition : function(x,y) {
this.attributes.translation.set(x,y);
return this;
},
setRotation : function(angle) {
this.attributes.rotation = angle;
return this;
},
rotate : function(angle_delata) {
this.attributes.rotation += angle_delata;
return this;
},
setScale : function(x,y) {
this.attributes.scale.set(x,y);
return this;
},
getScale : function() {
return this.attributes.scale;
},
translate: function () {
var v1 = new gbox3d.core.Vect2d();
var center = new gbox3d.core.Vect2d(0,0);
return function ( distance, axis ) {
// axis is assumed to be normalized
v1.copy( axis );
v1.multiply( distance );
v1.rotate( gbox3d.core.degToRad(-this.attributes.rotation),center);
if(this.attributes.flipX) {
v1.X *= -1;
}
if(this.attributes.flipY) {
v1.Y *= -1;
}
this.attributes.translation.addToThis( v1 );
return this;
};
}(),
show : function(visible) {
this.get('element').style.visibility = visible ? 'inherit' : 'hidden';
},
isVisible : function() {
return (this.get('element').style.visibility == 'hidden') ? false : true;
},
/////////////////////
////행렬관련
//////////////////
getCssMatrix : function() {
var el = this.get('element');
var computedStyle = window.getComputedStyle(el);
var trans = computedStyle.getPropertyValue('-webkit-transform');
var cssmat = new WebKitCSSMatrix(trans);
return cssmat;
},
//주어진 행렬을 분해하여 노드변환값에 역적용하기
decomposeCssMatrix : function(cssmat) {
//var cssmat = this.getCssMatrix();
//이동변환 얻기
this.attributes.translation.X = cssmat.e;
this.attributes.translation.Y = cssmat.f;
//스케일 얻기
var scalex = Math.sqrt(cssmat.a*cssmat.a + cssmat.b*cssmat.b);
var scaley = Math.sqrt(cssmat.c*cssmat.c + cssmat.d*cssmat.d);
this.attributes.scale.X = scalex;
this.attributes.scale.Y = scaley;
//회전 얻기
var angle = Math.round(Math.atan2(cssmat.b/scalex, cssmat.a/scalex) * (180/Math.PI));
this.attributes.rotation = angle;
},
getDecomposePosition : function() {
var cssmat = this.getCssMatrix();
return new gbox3d.core.Vect2d(cssmat.e,cssmat.f);
},
////////////// animator
setupTransition : function(param) {
var element = this.get('element');
element.style.WebkitTransition = '';
this.attributes.TransitionEndCallBack = param.TransitionEndCallBack;
if(this.attributes._TransitionEndCallBack != undefined) {
element.removeEventListener('webkitTransitionEnd',this.attributes._TransitionEndCallBack);
}
this.attributes._TransitionEndCallBack = function(event) {
if(this.attributes.cancelTransition == true) {
this.attributes.cancelTransition = false;
}
else {
this.attributes.cssupdate = true;
element.style.WebkitTransition = '';
if(this.attributes.TransitionEndCallBack != undefined) {
this.attributes.TransitionEndCallBack.apply(this);
}
}
//이밴트 전달 금지
event.cancelBubble = true;
event.stopPropagation();
}.bind(this);
element.addEventListener('webkitTransitionEnd',this.attributes._TransitionEndCallBack,false);
// if(param.timing_function != undefined) {
// element.style.webkitTransitionTimingFunction = 'linear';
// }
return this;
},
transition : function(param) {
var element = this.get('element');
param.timing_function = param.timing_function ? param.timing_function : 'linear';
if(element.style.WebkitTransition !== '')
return;
if(param.position != undefined) {
if(param.position.X == this.attributes.translation.X && param.position.Y == this.attributes.translation.Y ) {
}
else {
if(element.style.WebkitTransition === '') {
element.style.WebkitTransition = '-webkit-transform ' + param.time + 's ' + param.timing_function;
this.setPosition(param.position.X,param.position.Y);
}
}
}
if(param.rotation != undefined) {
if(param.rotation == this.attributes.rotation) {
}
else {
if(element.style.WebkitTransition === '') {
element.style.WebkitTransition = '-webkit-transform ' + param.time + 's '+ param.timing_function;
}
this.setRotation(param.rotation);
}
}
if(param.scale != undefined) {
if(param.scale.X == this.attributes.scale.X && param.scale.Y == this.attributes.scale.Y) {
}
else {
if(element.style.WebkitTransition === '') {
element.style.WebkitTransition = '-webkit-transform ' + param.time + 's ' + param.timing_function;
}
this.setScale(param.scale.X,param.scale.Y);
}
}
},
stopTransition : function(param) {
this.attributes.update_signal = 'stop_transition';
this.attributes.cancelTransition = true;
return this;
},
clearTransition : function() {
var el = this.get('element');
el.removeEventListener('webkitTransitionEnd',this.attributes._TransitionEndCallBack);
this.attributes.update_signal = 'stop_transition';
},
////////////////////
updateCSS : function() {
//if(this.attributes.cssupdate == false) return;
var el = this.get('element');
switch (this.attributes.update_signal) {
case 'none':
(function() {
//오브잭트변환값을 앨리먼트쪽으로 갱신해주기
if(this.attributes.cssupdate == true) {
var trans = this.attributes.translation;
var rot = this.attributes.rotation;
var scalex = this.attributes.scale.X;
var scaley = this.attributes.scale.Y;
//반전 적용
if(this.attributes.flipX) {
scaley = -scaley;
}
if(this.attributes.flipY) {
scalex = -scalex;
}
var css_val = 'translate(' + trans.X + 'px,' + trans.Y +'px) ' +
'rotate(' + rot + 'deg) ' +
'scale(' + scalex + ',' + scaley + ')';
//브라우져 호환성을 위한 코드
el.style.WebkitTransform = css_val;
el.style.MozTransform = css_val;
el.style.oTransform = css_val;
el.style.transform = css_val;
//트랜지션 상태이면 css를 더이상 업데이트 못하게 한다
if(el.style.WebkitTransition !== '') {
this.attributes.cssupdate = false;
}
}
else {
//현재 트랜지션 상태이므로 트래지션 취소는 무효화 된다.
this.attributes.cancelTransition = false;
}
}).bind(this)();
break;
case 'stop_transition':
(function() {
//행렬분해후 적용
this.decomposeCssMatrix(this.getCssMatrix());
el.style.WebkitTransition = '';
this.attributes.update_signal = 'none';
this.attributes.cssupdate = true;
this.updateCSS();
}).bind(this)();
break;
}
return this;
},
///////////////////////////////////////////
setupCssAnimation : function(option) {
var element = this.get('element');
element.style.WebkitAnimationName = option.name;
element.style.WebkitAnimationDuration = option.duration;
if(option.timing_function) {
element.style.WebkitAnimationTimingFunction = option.timing_function;
}
if(option.delay) {
element.style.WebkitAnimationDelay = option.delay;
}
if(option.direction) {
element.style.WebkitAnimationDirection = option.direction;
}
if(option.iteration_count) {
element.style.WebkitAnimationIterationCount = option.iteration_count;
}
element.style.WebkitAnimationPlayState = 'running';
this.attributes.CssAnimationEndCallBack = option.EndCallBack;
if(this.attributes._CssAnimationEndCallBack != undefined) {
element.removeEventListener('webkitAnimationEnd',this.attributes._CssAnimationEndCallBack);
}
this.attributes._CssAnimationEndCallBack = function(event) {
element.style.WebkitAnimation = '';
if(this.attributes.CssAnimationEndCallBack != undefined) {
this.attributes.CssAnimationEndCallBack.apply(this);
}
//이밴트 전달 금지
event.cancelBubble = true;
event.stopPropagation();
}.bind(this);
element.addEventListener('webkitAnimationEnd',this.attributes._CssAnimationEndCallBack,false);
return this;
},
//////////////////////////
//노드에서 완전히 제거할때 사용됨
destroy : function() {
var el = this.get('element');
//el.removeEventListener('webkitTransitionEnd');
this.clearTransition();
el.parentNode.removeChild(el);
},
clone : function() {
var model = Backbone.Model.prototype.clone.call(this);
// console.log(model);
model.set("element",this.get('element').cloneNode(true));
return model;
}
});
//end of base model
//////////////////////
Pig2d.SpriteModel = Pig2d.model.extend({
initialize: function(param) {
Pig2d.model.prototype.initialize.call(this);
this.attributes.currentFrame = 0;
//애니메이션 타이머 핸들
this.attributes.animationHID = null;
var sheet = document.createElement('canvas');
sheet.classList.add('pig2d-sheet');
sheet.style.position = 'absolute';
this.get('element').appendChild(sheet);
this.set('sheet',sheet);
this.set('sheetCTX',sheet.getContext('2d'));
this.attributes.currentTick = 0;
this.attributes.scaler = 1;
if(this.attributes.data.canvas_size) {
sheet.width = this.attributes.data.canvas_size.width;
sheet.height = this.attributes.data.canvas_size.height;
}
//캔버스 클리어 일부 삼성폰들은 초기화를 안할경우 잔상이 생긴다.
//this.get('sheetCTX').clearRect(0,0,sheet.width,sheet.height);
//this.setFrame(-1);
//this.attributes.AnimationStatus = 'ready';
},
setScaler : function(scale) {
this.attributes.scaler = scale;
if(this.attributes.data.canvas_size) {
var sheet = this.get('sheet');
this.attributes.data.canvas_size.width *= scale;
this.attributes.data.canvas_size.height *= scale;
sheet.width = this.attributes.data.canvas_size.width;
sheet.height = this.attributes.data.canvas_size.height;
}
},
changeDress : function(param) {
this.attributes.imgObj = param.texture;
this.attributes.data = param.animation;
var sheet = this.get('sheet');
if(this.attributes.data.canvas_size) {
sheet.width = this.attributes.data.canvas_size.width;
sheet.height = this.attributes.data.canvas_size.height;
}
this.setFrame(this.attributes.currentFrame);
},
clone : function() {
var model = Backbone.Model.prototype.clone.call(this);
console.log('SpriteModel clone');
//model.set("element",this.get('element').cloneNode(true));
return model;
},
updateCSS : function (deltaTime) {
deltaTime = deltaTime || 0;
this.applyAnimation(deltaTime);
return Pig2d.model.prototype.updateCSS.call(this);
},
//////////////////////////////////////////////
//애니메이션 관련 기능
//////////////////////////////////////////////
setFrame : function(index) {
//프레임 노드 얻기
var imgObj = this.attributes.imgObj;
if(this.attributes.data.frames.length <= index) {
console.log('error exeed frame number : ' + index + ',' + this.attributes.data.frames.length);
index = 0;
}
if(imgObj != undefined) {
this.set('currentFrame',index);
var sheet = this.attributes.sheet;
var ctx = this.attributes.sheetCTX;
/*
공백프레임을 만든 이유 :
일부 폰들(삼성폰)에서 캔버스를 처음생성한후 맨처음 랜더링된 이미지가 지워지지않고 남아 있는 현상들이 발생함
그래서 캔버스처음생성할때(changeDress,createSprite)할때는 반드시 공백프레임을 화면에 한번출력을 해주어야함
*/
if(index < 0) { //공프레임 이면..
if(this.attributes.data.canvas_size) {
sheet.width = this.attributes.data.canvas_size.width;
sheet.height = this.attributes.data.canvas_size.height;
ctx.clearRect(0,0,this.attributes.data.canvas_size.width,this.attributes.data.canvas_size.height);
}
}
else {
var frame = this.attributes.data.frames[this.attributes.currentFrame];
//console.log(this.attributes.currentFrame);
var sheet_data = frame.sheets[0];
var scaler = this.attributes.scaler;
if(this.attributes.data.canvas_size) {
ctx.clearRect(0,0,this.attributes.data.canvas_size.width,this.attributes.data.canvas_size.height);
//sheet.width = 1;
//sheet.width = this.attributes.data.canvas_size.width;
}
else {
sheet.width = sheet_data.width;
sheet.height = sheet_data.height;
}
var offsetX = sheet_data.centerOffset.x;
var offsetY = sheet_data.centerOffset.y;
var destW = sheet_data.width;
var destH = sheet_data.height;
var cutx = -sheet_data.bp_x;
var cuty = -sheet_data.bp_y;
var srcW = sheet_data.width;
var srcH = sheet_data.height;
if(scaler < 1.0) {
offsetX *= scaler;
offsetY *= scaler;
destW *= scaler;
destH *= scaler;
}
sheet.style.webkitTransform = "translate(" + offsetX + "px," + offsetY + "px)";
ctx.drawImage(
imgObj,
cutx,cuty,srcW,srcH,
0,0,destW,destH
);
}
}
return this;
},
/////////////////////////////////////////////
/////new animation system////////////////////
/////////////////////////////////////////////
setupAnimation : function(param) {
param = param ? param : {};
this.attributes.startFrame = param.startFrame ? param.startFrame : 0 ;
this.attributes.endFrame = param.endFrame ? param.endFrame : (this.get('data').frames.length-1);
if(param.isAnimationLoop !== undefined) {
this.attributes.isAnimationLoop = param.isAnimationLoop;
}
else {
this.attributes.isAnimationLoop = true;
}
this.attributes.AnimationEndCallback = param.AnimationEndCallback;
this.attributes.AnimationStatus = param.AnimationStatus ? param.AnimationStatus : 'stop';
this.setFrame(this.attributes.startFrame);
},
applyAnimation : function(delataTick) {
if(this.attributes.AnimationStatus == 'play') {
this.attributes.currentTick += delataTick;
var frameindex = this.attributes.currentFrame;
var Ani_data = this.get('data');
var delay = 300;
if(frameindex >= 0) {
delay = Ani_data.frames[frameindex].delay / 1000;
}
//var delay = Ani_data.frames[frameindex].delay / 1000;
if(this.attributes.currentTick > delay) {
this.attributes.currentTick = 0;
++frameindex;
if(frameindex > this.attributes.endFrame) {//마지막 프레임이면
if(this.attributes.isAnimationLoop) {
frameindex = this.attributes.startFrame;
this.setFrame(frameindex);
}
else {
this.attributes.AnimationStatus = 'stop';
frameindex = this.attributes.endFrame;
}
if(this.attributes.AnimationEndCallback != undefined) {
this.attributes.AnimationEndCallback.bind(this)();
}
}
else {
this.setFrame(frameindex);
}
}
}
else if(this.attributes.AnimationStatus == 'ready') {
this.setFrame(-1);
this.attributes.AnimationStatus = 'play';
this.attributes.currentFrame = this.attributes.startFrame;
}
},
stopAnimation : function() {
this.attributes.AnimationStatus = 'stop';
},
////////////////////////
destroy : function() {
//this.stop_animate();
//슈퍼 클래싱
Pig2d.model.prototype.destroy.call(this);
}
});
//end of sprite model
///////////////////////
//////////////////node//
/////////////////////////
Pig2d.node = Backbone.Model.extend({
initialize: function() {
this.attributes.children = this.attributes.chiledren = new Array();
// _.bindAll(this,"update","clone");
},
traverse : function(callback,param) {
callback.bind(this)(param);
for(var index = 0;index < this.attributes.chiledren.length;index++ ) {
this.attributes.chiledren[index].traverse(callback,param);
}
},
update: function(applyChild,deltaTime) {
this.get('model').updateCSS(deltaTime);
if( applyChild == true) {
for(var index = 0;index < this.attributes.chiledren.length;index++ ) {
this.attributes.chiledren[index].update(applyChild,deltaTime);
}
}
return this;
},
clone : function() {
//딥 클로닝
var node = Backbone.Model.prototype.clone.call(this);
if(node.get('model')) {
var model = node.get('model').clone();
node.set({model:model});
}
var chiledren = this.get('chiledren');
for(var i=0;i<chiledren.length;i++) {
node.add(chiledren[i].clone());
}
return node;
},
findByName : function(name) {
if(name == this.attributes.name) return this;
for(var index in this.attributes.chiledren ) {
var obj = this.attributes.chiledren[index].findByName(name);
if(obj != null)
return obj;
}
return null;
},
findByID : function(cid) {
if(cid == this.cid) return this;
for(var index in this.attributes.chiledren ) {
var obj = this.attributes.chiledren[index].findByID(cid);
if(obj != null)
return obj;
}
return null;
},
add : function(child_node,parents) {
if(parents == undefined || parents == null) {
parents = this;
}
parents.get('chiledren').push(child_node);
//child_node.setParent(parents);
//모델이 존재하면
if(parents.get('model')) {
var par_el = parents.get('model').get('element');
var child_el = child_node.get('model').get('element');
}
par_el.appendChild(child_el);
child_node.attributes.parent = parents;
return this;
},
//부모노드 바꾸기
setParent : function(parent) {
var old_parent = this.get('parent');
var chiledren = old_parent.get('chiledren');
for(var i= chiledren.length-1;i >= 0;i--) {
if(chiledren[i] === this) {
chiledren.splice(i,1);
parent.add(this);
}
}
},
removeChild : function(node) {
for(var i= this.attributes.chiledren.length-1;i >= 0;i--) {
var _node = this.attributes.chiledren[i];
if(_node === node) {
this.attributes.chiledren.splice(i,1);
node.get('model').destroy();
return true;
}
else {
_node.removeChild(node); //자식노드까지 검사
}
}
return false;
},
removeChildAll : function() {
for(var i= this.attributes.chiledren.length-1;i >= 0;i--) {
this.removeChild(this.attributes.chiledren[i]);
}
return false;
},
show : function(visible) {
//console.log(this.get('model').get('element'));
//this.get('model').get('element').style.visibility = visible ? 'inherit' : 'hidden';
this.get('model').show(visible);
},
isVisible : function() {
//return (this.get('model').get('element').style.visibility == 'hidden') ? false : true;
return this.get('model').isVisible();
}
});
//end of node
///////////////
///
Pig2d.SceneManager = Backbone.Model.extend({
initialize: function(param) {
var rootNode = new Pig2d.node(
{
model : new Pig2d.model({
name : 'root_' + (new Date()).getTime() + '_'
})
}
);
rootNode.get('model').setPosition(0,0);
//this.attributes.container.append(rootNode.get('model').get('element'));
var rootElement = rootNode.get('model').get('element');
//console.log(rootElement);
if(param.window_size != undefined) {
rootElement.style.overflow = 'hidden';
rootElement.style.width = param.window_size.width + 'px' ;
rootElement.style.height = param.window_size.height + 'px' ;
}
if(param.bkg_color != undefined) {
//2015.11.5 수정 ,배경적용안되는 버그 수정
this.attributes.container.style.backgroundColor = param.bkg_color;
}
this.attributes.container.appendChild(rootElement);
this.attributes.rootNode = rootNode;
},
getRootNode : function() {
return this.attributes.rootNode;
},
updateAll : function(deltaTime) {
deltaTime = deltaTime ? deltaTime : 0.01;
this.attributes.rootNode.update(true,deltaTime);
},
add : function(node,parent) {
if(parent == undefined) {
this.attributes.rootNode.add(node);
}
else {
parent.add(node);
}
},
addImageNode : function(param) {
//var node = Pig2d.util.createImage(param.img_info);
//this.add(node,param.parent);
var center_x = param.center ? param.center.x : 0;
var center_y = param.center ? param.center.y : 0;
var node = Pig2d.util.createDummy();
var imgObj = new Image();
imgObj.onload = function(evt) {
//console.log(this.width);
imgObj.style.position = 'absolute';
imgObj.style.left = -this.width/2 + parseInt(center_x) + 'px';
imgObj.style.top = -this.height/2 + parseInt(center_y) + 'px';
var element = node.get('model').get('element');
element.appendChild(imgObj);
node.get('model').set('imgObj', imgObj);
if(param.onload) {
param.onload(node);
}
}
imgObj.src = param.src;
this.add(node,param.parent);
return node;
},
addSpriteSceneNode : function(param) {
var node = Pig2d.util.createSprite(param.spr_info);
node.show(true);
this.add(node,param.parent);
return node;
}
});
//end of scene manager
| gbox3d/pig2d | from_old/libs/pig2d/js/node2d.js | JavaScript | mit | 27,176 |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
/* Body style, for the entire document */
body {
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}
/* Header1 style, used for the main title */
h1 {
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}
/* Header2 style, used for "Overview" and other sections */
h2 {
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}
/* Header3 style, used for sub-sections, such as project name */
h3 {
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}
h4 {
font-weight: normal;
font-size: 12pt;
margin: 0;
padding: 0 0 0 0;
background-color: transparent;
}
/* Color all hyperlinks one color */
a {
color: #1382CE;
}
/* Paragraph text (for longer informational messages) */
p {
font-size: 10pt;
}
/* Table styles */
table {
border-spacing: 0 0;
border-collapse: collapse;
font-size: 10pt;
}
table th {
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}
table td {
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}
.NoBreakingChanges {
color: darkgreen;
font-weight:bold;
}
.FewBreakingChanges {
color: orange;
font-weight:bold;
}
.ManyBreakingChanges {
color: red;
font-weight:bold;
}
.BreakDetails {
margin-left: 30px;
}
.CompatMessage {
font-style: italic;
font-size: 10pt;
}
.GoodMessage {
color: darkgreen;
}
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink {
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}
.localLink:hover {
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}
/* Center text, used in the over views cells that contain message level counts */
.textCentered {
text-align: center;
}
/* The message cells in message tables should take up all avaliable space */
.messageCell {
width: 100%;
}
/* Padding around the content after the h1 */
#content {
padding: 0px 12px 12px 12px;
}
/* The overview table expands to width, with a max width of 97% */
#overview table {
width: auto;
max-width: 75%;
}
/* The messages tables are always 97% width */
#messages table {
width: 97%;
}
/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded {
min-width: 18px;
min-height: 18px;
background-repeat: no-repeat;
background-position: center;
}
/* Success icon encoded */
.IconSuccessEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==);
}
/* Information icon encoded */
.IconInfoEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}
/* Warning icon encoded */
.IconWarningEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}
/* Error icon encoded */
.IconErrorEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style>
</head>
<body>
<h1 _locid="PortabilityReport">.NET Portability Report</h1>
<div id="content">
<div id="submissionId" style="font-size:8pt;">
<p>
<i>
Submission Id
4cc28334-e4e5-4689-9e1e-0e063728ec35
</i>
</p>
</div>
<h2 _locid="SummaryTitle">
<a name="Portability Summary"></a>Portability Summary
</h2>
<div id="summary">
<table>
<tbody>
<tr>
<th>Assembly</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
</tr>
<tr>
<td><strong><a href="#NetTopologySuite.IO.MsSqlSpatial">NetTopologySuite.IO.MsSqlSpatial</a></strong></td>
<td class="text-center">96.88 %</td>
<td class="text-center">96.88 %</td>
<td class="text-center">100.00 %</td>
<td class="text-center">96.88 %</td>
</tr>
</tbody>
</table>
</div>
<div id="details">
<a name="NetTopologySuite.IO.MsSqlSpatial"><h3>NetTopologySuite.IO.MsSqlSpatial</h3></a>
<table>
<tbody>
<tr>
<th>Target type</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
<th>Recommended changes</th>
</tr>
<tr>
<td>System.IO.BinaryReader</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use Dispose instead</td>
</tr>
<tr>
<td style="padding-left:2em">Close</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use Dispose instead</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.IO.BinaryWriter</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use Dispose instead</td>
</tr>
<tr>
<td style="padding-left:2em">Close</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use Dispose instead</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p>
<a href="#Portability Summary">Back to Summary</a>
</p>
</div>
</div>
</body>
</html> | kuhlenh/port-to-core | Reports/ne/nettopologysuite.io.mssqlspatial.1.13.2/NetTopologySuite.IO.MsSqlSpatial-net403-client.html | HTML | mit | 12,963 |
export interface IChoice<T> {
value: T,
label?: string
}
export class Choice<T> implements IChoice<T> {
private _label;
constructor(public value: T, label?: string) {
this._label = label;
}
get label(): string {
return this._label || String(this.value);
}
toJs(): object {
return {
label: this.label,
value: this.value
}
}
fromJs(obj): Choice<T> {
return new Choice(obj.value, obj.label);
}
} | matitalatina/randommet-app2 | src/randomizer/models/choice.ts | TypeScript | mit | 451 |
gulp-stack [![NPM version][npm-image]][npm-url] [![Dependency Status][depstat-image]][depstat-url]
===========================
A [gulp][gulp] stack for angular development.
* It reduces your gulp source-code tremendously
* Works out of the box with the Angular Best Practise app structure.
* Is highly configurable.
Installation
---------------
```shell
npm install --save-dev gulp-stack
```
Example
---------------
Then, add it to your `gulpfile.js`:
```javascript
var gulp = require('gulp-stack').gulp();
```
API
--------------
//TODO
License
------------
[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) Lukas Eipert - 2014
[gulp]: https://github.com/gulpjs/gulp
[npm-url]: https://npmjs.org/package/gulp-stack
[npm-image]: https://badge.fury.io/js/gulp-stack.png
[depstat-url]: https://david-dm.org/leipert/gulp-stack
[depstat-image]: https://david-dm.org/leipert/gulp-stack.png
| leipert/gulp-stack | README.md | Markdown | mit | 908 |
CC = g++
CPPFLAGS = -I/usr/include/libxml2 -I../alglib/cpp/src
CFLAGS = -Wall -Wextra -pedantic -ffloat-store -std=c++0x
LDFLAGS = -lm -lxml2 -lpthread -L../alglib/cpp/lib -lalglib
NVCC = nvcc
CUDA_LINK = link.o
CUDA_ARCH = -arch=sm_20
NVCCFLAGS = -lineinfo -Xcompiler -rdynamic $(CUDA_ARCH) -dc \
--ptxas-options=-v -prec-sqrt=true -prec-div=true \
-ccbin=`which g++` -I$(CULA_INC_PATH)
CUDA_LDFLAGS := $(LDFLAGS) -lcudart -lcula_lapack -lcublas
LIBS =
CUDA_LIBS = $(LIBS) -L"$(CUDA_INSTALL_PATH)/lib64" -L"$(CULA_LIB_PATH_64)"
TARGETS = ap
MAIN = main.c.o
SEP_MAIN = se-performance.c.o
OBJECTS = graph.c.o gexfparser.c.o pipeline.c.o
OBJECTS_SEQ = vector.c.o force-atlas-2.c.o util.c.o \
smoothening.c.o pca.cpp.o vector-average.c.o break-edges.c.o \
connected-component.c.o pipeline.c.o timer.c.o
OBJECTS_PAR = vector.o force-atlas-2.o cuda-stream.o util.o \
smoothening.o pca.o test-pca.o test-util.o \
vector-average.o break-edges.o connected-component.o timer.o
%.c.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
%.cpp.o: %.cpp
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
%.o: %.cu
$(NVCC) $(NVCCFLAGS) -c $< -o $@
all: seq
seq-debug: CFLAGS += -DDEBUG -g
seq-debug: seq
seq: $(MAIN) $(OBJECTS) $(OBJECTS_SEQ)
$(CC) -o $(TARGETS) $(CFLAGS) $^ $(LDFLAGS)
par-debug: NVCCFLAGS += -DDEBUG -G -g
par-debug: CFLAGS += -DDEBUG -g
par-debug: par
par: $(MAIN) $(OBJECTS_PAR) $(OBJECTS)
$(NVCC) $(CUDA_ARCH) $(OBJECTS_PAR) -dlink -o $(CUDA_LINK)
$(CC) -rdynamic -o $(TARGETS) $(CUDA_LINK) $^ $(CUDA_LIBS) $(CUDA_LDFLAGS)
sep: $(SEP_MAIN) $(OBJECTS_PAR) $(OBJECTS)
$(NVCC) $(CUDA_ARCH) $(OBJECTS_PAR) -dlink -o $(CUDA_LINK)
$(CC) -rdynamic -o $(TARGETS) $(CUDA_LINK) $^ $(CUDA_LIBS) $(CUDA_LDFLAGS)
clean:
rm -rf *.o
rm -rf *.cuo
rm -rf $(TARGETS)
| DSRC-GPU/Accelerated-Pipeline | src/Makefile | Makefile | mit | 1,800 |
/**
* @author Iftikhar Ul Hassan
* @date 4/10/17.
*/
const util = require('../util');
module.exports = function (length) {
length = length || 21;
var isValid;
var kidNumber;
do {
kidNumber = util.generateRandomNumber(0, 9, length) + "";
var controlDigit = kidNumber.charAt(kidNumber.length - 1);
isValid = parseInt(controlDigit, 10) === util.mod11(kidNumber) || parseInt(controlDigit, 10) === util.luhnValue(kidNumber);
} while (!isValid);
return kidNumber;
}; | khiftikhar/random-no | lib/no/kid.js | JavaScript | mit | 518 |
FROM ruby:2.4
MAINTAINER thinkbot@outlook.de
ENV VERSION=0.9.9
RUN gem install caboose-cms --version ${VERSION} --no-format-exec
WORKDIR /tmp
ENTRYPOINT ["caboose"]
CMD ["--help"]
| docker-rubygem/caboose-cms | Dockerfile | Dockerfile | mit | 185 |
using System;
using System.Globalization;
using System.Linq;
using Nancy.Markdown.Blog.Example.Models;
using Nancy.Responses.Negotiation;
namespace Nancy.Markdown.Blog.Example
{
public class BlogModule : NancyModule
{
public BlogModule(IBlogModel model)
{
Get["blog/"] = p => ShowBlog(model, 0);
Get["blog/posts/{index:int}"] = p => ShowBlog(model, p.index) ?? 404;
Get["blog/post/{year:int}/{month:int}/{day:int}/{slug}"] = p => ShowPost(model, p.year, p.month, p.day, p.slug) ?? 404;
Get["blog/archive"] = p => ShowArchive(model);
Get["blog/rss"] = p => model.Blog.Rss();
}
private Negotiator ShowBlog(IBlogModel model, int index)
{
const int postsToShow = 3;
var posts = model.Blog.Posts.Skip(index).Take(postsToShow);
if (!posts.Any()) return null;
var prev = index - postsToShow;
var next = index + postsToShow;
Func<int, string> link = p => string.Format("{0}/posts/{1}", model.Blog.BaseUri, p);
ViewBag.Title = model.Blog.Title;
ViewBag.Posts = posts;
ViewBag.Prev = (prev == 0)
? model.Blog.BaseUri.ToString()
: (prev > 0) ? link(prev) : string.Empty;
ViewBag.Next = next < model.Blog.Posts.Count() ? link(next) : string.Empty;
SetCommonBlogProperties(model);
return View[model.Blog];
}
private Negotiator ShowPost(IBlogModel model, int year, int month, int day, string slug)
{
var post = model.Blog.Posts
.FirstOrDefault(p =>
year == p.Created.Year &&
month == p.Created.Month &&
day == p.Created.Day &&
slug.Equals(p.Slug, StringComparison.InvariantCultureIgnoreCase));
if (post == null) return null;
var prev = model.Blog.PreviousPost(post);
var next = model.Blog.NextPost(post);
ViewBag.Title = post.Title;
ViewBag.Posts = new[] {post};
ViewBag.Prev = prev != null ? prev.PermaLink : string.Empty;
ViewBag.Next = next != null ? next.PermaLink : string.Empty;
SetCommonBlogProperties(model);
return View[model.Blog];
}
private void SetCommonBlogProperties(IBlogModel model)
{
ViewBag.DisablePrev = DisableButton(ViewBag.Prev);
ViewBag.DisableNext = DisableButton(ViewBag.Next);
ViewBag.RecentPosts = model.Blog.Posts.Take(7);
ViewBag.PostCount = model.Blog.Posts.Count().ToString("n0");
}
private static string DisableButton(string link)
{
return string.IsNullOrEmpty(link) ? "disabled" : "";
}
private Negotiator ShowArchive(IBlogModel model)
{
return View["archive", model.Blog.Posts
.GroupBy(post => post.Created.Year)
.ToDictionary(yg => yg.Key, yg => yg
.GroupBy(mg => mg.Created.Month)
.OrderByDescending(mg => mg.Key)
.ToDictionary(
mg => CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(mg.Key),
mg => mg.OrderByDescending(d => d.Created)))
];
}
private static string Visibility(string link)
{
return string.IsNullOrEmpty(link) ? "hidden" : "visible";
}
}
} | mike-ward/Nancy.Markdown.Blog | Nancy.Blog.Example/Modules/BlogModule.cs | C# | mit | 3,565 |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['assets/magnific.js', 'assets/jquery-vimeothumb.js'],
dest: 'magnific_popup/blocks/magnific_popup/magnific/magnific-combined-1.0.0.js'
}
},
uglify: {
options: {
// the banner is inserted at the top of the output
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'magnific_popup/blocks/magnific_popup/magnific/magnific-combined-1.0.0.min.js': ['<%= concat.dist.dest %>']
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['concat', 'uglify']);
}; | cdowdy/concrete5-Magnific-Popup | Gruntfile.js | JavaScript | mit | 870 |
# A Simple App
This tiny application is meant to provide a quick start of the basics of re-frame.
A detailed source code walk-through is provided in the docs:
https://github.com/Day8/re-frame/blob/master/docs/CodeWalkthrough.md
All the code is in one namespace: `/src/simple/core.cljs`.
### Run It And Change It
Steps:
1. Check out the re-frame repo
2. Get a command line
3. `cd` to the root of this sub project (where this README exists)
4. run "`lein do clean, figwheel`" to compile the app and start up figwheel hot-reloading,
5. open `http://localhost:3449/example.html` to see the app
While step 4 is running, any changes you make to the ClojureScript
source files (in `src`) will be re-compiled and reflected in the running
page immediately.
### Production Version
Run "`lein do clean, with-profile prod compile`" to compile an optimised
version, and then open `resources/public/example.html` in a browser.
| martinklepsch/re-frame | examples/simple/README.md | Markdown | mit | 932 |
<?php
/* WebProfilerBundle:Profiler:toolbar_js.html.twig */
class __TwigTemplate_edc7bb8386dce46e7650508d642c6fb091dcf9d450b879e2a638850d86d616dd extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
);
}
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
echo "<div id=\"sfwdt";
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "\" class=\"sf-toolbar\" style=\"display: none\"></div>
";
// line 2
$this->env->loadTemplate("@WebProfiler/Profiler/base_js.html.twig")->display($context);
// line 3
echo "<script>/*<![CDATA[*/
(function () {
";
// line 5
if (("top" == (isset($context["position"]) ? $context["position"] : $this->getContext($context, "position")))) {
// line 6
echo " var sfwdt = document.getElementById('sfwdt";
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "');
document.body.insertBefore(
document.body.removeChild(sfwdt),
document.body.firstChild
);
";
}
// line 12
echo "
Sfjs.load(
'sfwdt";
// line 14
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "',
'";
// line 15
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_wdt", array("token" => (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")))), "html", null, true);
echo "',
function(xhr, el) {
el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';
if (el.style.display == 'none') {
return;
}
if (Sfjs.getPreference('toolbar/displayState') == 'none') {
document.getElementById('sfToolbarMainContent-";
// line 24
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "').style.display = 'none';
document.getElementById('sfToolbarClearer-";
// line 25
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "').style.display = 'none';
document.getElementById('sfMiniToolbar-";
// line 26
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "').style.display = 'block';
} else {
document.getElementById('sfToolbarMainContent-";
// line 28
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "').style.display = 'block';
document.getElementById('sfToolbarClearer-";
// line 29
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "').style.display = 'block';
document.getElementById('sfMiniToolbar-";
// line 30
echo twig_escape_filter($this->env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
echo "').style.display = 'none';
}
Sfjs.renderAjaxRequests();
/* Handle toolbar-info position */
var toolbarBlocks = document.getElementsByClassName('sf-toolbar-block');
for (var i = 0; i < toolbarBlocks.length; i += 1) {
toolbarBlocks[i].onmouseover = function () {
var toolbarInfo = this.getElementsByClassName('sf-toolbar-info')[0];
var pageWidth = document.body.clientWidth;
var elementWidth = toolbarInfo.offsetWidth;
var leftValue = (elementWidth + this.offsetLeft) - pageWidth;
var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth;
/* Reset right and left value, useful on window resize */
toolbarInfo.style.right = '';
toolbarInfo.style.left = '';
if (leftValue > 0 && rightValue > 0) {
toolbarInfo.style.right = (rightValue * -1) + 'px';
} else if (leftValue < 0) {
toolbarInfo.style.left = 0;
} else {
toolbarInfo.style.right = '-1px';
}
};
}
},
function(xhr) {
if (xhr.status !== 0) {
confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\\n\\nDo you want to open the profiler?') && (window.location = '";
// line 61
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")))), "html", null, true);
echo "');
}
},
{'maxTries': 5}
);
})();
/*]]>*/</script>
";
}
public function getTemplateName()
{
return "WebProfilerBundle:Profiler:toolbar_js.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 117 => 61, 83 => 30, 79 => 29, 75 => 28, 70 => 26, 66 => 25, 62 => 24, 50 => 15, 46 => 14, 42 => 12, 32 => 6, 30 => 5, 26 => 3, 24 => 2, 19 => 1,);
}
}
| bhupendrakanojiya/mediapackage | app/cache/dev/twig/ed/c7/bb8386dce46e7650508d642c6fb091dcf9d450b879e2a638850d86d616dd.php | PHP | mit | 6,454 |
package models
import (
"time"
)
type ComputeVersion struct {
Versions []ComputeVersionValue `json:"versions"`
}
type ComputeVersionValue struct {
Id string `json:"id"`
Status string `json:"status"`
Updated time.Time `json:"updated"`
}
| raben/conoha | lib/models/ComputeVersion.go | GO | mit | 255 |
// Package serviceconsumermanagement provides access to the Service Consumer Management API.
//
// See https://cloud.google.com/service-consumer-management/docs/overview
//
// Usage example:
//
// import "google.golang.org/api/serviceconsumermanagement/v1"
// ...
// serviceconsumermanagementService, err := serviceconsumermanagement.New(oauthHttpClient)
package serviceconsumermanagement // import "google.golang.org/api/serviceconsumermanagement/v1"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
context "golang.org/x/net/context"
ctxhttp "golang.org/x/net/context/ctxhttp"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "serviceconsumermanagement:v1"
const apiName = "serviceconsumermanagement"
const apiVersion = "v1"
const basePath = "https://serviceconsumermanagement.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
func New(client *http.Client) (*APIService, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &APIService{client: client, BasePath: basePath}
s.Operations = NewOperationsService(s)
s.Services = NewServicesService(s)
return s, nil
}
type APIService struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Operations *OperationsService
Services *ServicesService
}
func (s *APIService) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewOperationsService(s *APIService) *OperationsService {
rs := &OperationsService{s: s}
return rs
}
type OperationsService struct {
s *APIService
}
func NewServicesService(s *APIService) *ServicesService {
rs := &ServicesService{s: s}
rs.TenancyUnits = NewServicesTenancyUnitsService(s)
return rs
}
type ServicesService struct {
s *APIService
TenancyUnits *ServicesTenancyUnitsService
}
func NewServicesTenancyUnitsService(s *APIService) *ServicesTenancyUnitsService {
rs := &ServicesTenancyUnitsService{s: s}
return rs
}
type ServicesTenancyUnitsService struct {
s *APIService
}
// AddTenantProjectRequest: Request to add a newly created and
// configured tenant project to a tenancy
// unit.
type AddTenantProjectRequest struct {
// ProjectConfig: Configuration of the new tenant project that will be
// added to tenancy unit
// resources.
ProjectConfig *TenantProjectConfig `json:"projectConfig,omitempty"`
// Tag: Tag of the added project. Must be less than 128 characters.
// Required.
Tag string `json:"tag,omitempty"`
// ForceSendFields is a list of field names (e.g. "ProjectConfig") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ProjectConfig") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AddTenantProjectRequest) MarshalJSON() ([]byte, error) {
type NoMethod AddTenantProjectRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Api: Api is a light-weight descriptor for an API
// Interface.
//
// Interfaces are also described as "protocol buffer services" in some
// contexts,
// such as by the "service" keyword in a .proto file, but they are
// different
// from API Services, which represent a concrete implementation of an
// interface
// as opposed to simply a description of methods and bindings. They are
// also
// sometimes simply referred to as "APIs" in other contexts, such as the
// name of
// this message itself. See
// https://cloud.google.com/apis/design/glossary for
// detailed terminology.
type Api struct {
// Methods: The methods of this interface, in unspecified order.
Methods []*Method `json:"methods,omitempty"`
// Mixins: Included interfaces. See Mixin.
Mixins []*Mixin `json:"mixins,omitempty"`
// Name: The fully qualified name of this interface, including package
// name
// followed by the interface's simple name.
Name string `json:"name,omitempty"`
// Options: Any metadata attached to the interface.
Options []*Option `json:"options,omitempty"`
// SourceContext: Source context for the protocol buffer service
// represented by this
// message.
SourceContext *SourceContext `json:"sourceContext,omitempty"`
// Syntax: The source syntax of the service.
//
// Possible values:
// "SYNTAX_PROTO2" - Syntax `proto2`.
// "SYNTAX_PROTO3" - Syntax `proto3`.
Syntax string `json:"syntax,omitempty"`
// Version: A version string for this interface. If specified, must have
// the form
// `major-version.minor-version`, as in `1.10`. If the minor version
// is
// omitted, it defaults to zero. If the entire version field is empty,
// the
// major version is derived from the package name, as outlined below. If
// the
// field is not empty, the version in the package name will be verified
// to be
// consistent with what is provided here.
//
// The versioning schema uses [semantic
// versioning](http://semver.org) where the major version
// number
// indicates a breaking change and the minor version an
// additive,
// non-breaking change. Both version numbers are signals to users
// what to expect from different versions, and should be
// carefully
// chosen based on the product plan.
//
// The major version is also reflected in the package name of
// the
// interface, which must end in `v<major-version>`, as
// in
// `google.feature.v1`. For major versions 0 and 1, the suffix can
// be omitted. Zero major versions must only be used for
// experimental, non-GA interfaces.
//
Version string `json:"version,omitempty"`
// ForceSendFields is a list of field names (e.g. "Methods") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Methods") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Api) MarshalJSON() ([]byte, error) {
type NoMethod Api
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AuthProvider: Configuration for an anthentication provider, including
// support for
// [JSON Web Token
// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32)
// .
type AuthProvider struct {
// Audiences: The list of
// JWT
// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
// token-32#section-4.1.3).
// that are allowed to access. A JWT containing any of these audiences
// will
// be accepted. When this setting is absent, only JWTs with
// audience
// "https://Service_name/API_name"
// will be accepted. For example, if no audiences are in the
// setting,
// LibraryService API will only accept JWTs with the following
// audience
// "https://library-example.googleapis.com/google.example.librar
// y.v1.LibraryService".
//
// Example:
//
// audiences: bookstore_android.apps.googleusercontent.com,
// bookstore_web.apps.googleusercontent.com
Audiences string `json:"audiences,omitempty"`
// AuthorizationUrl: Redirect URL if JWT token is required but no
// present or is expired.
// Implement authorizationUrl of securityDefinitions in OpenAPI spec.
AuthorizationUrl string `json:"authorizationUrl,omitempty"`
// Id: The unique identifier of the auth provider. It will be referred
// to by
// `AuthRequirement.provider_id`.
//
// Example: "bookstore_auth".
Id string `json:"id,omitempty"`
// Issuer: Identifies the principal that issued the JWT.
// See
// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#sec
// tion-4.1.1
// Usually a URL or an email address.
//
// Example: https://securetoken.google.com
// Example: 1234567-compute@developer.gserviceaccount.com
Issuer string `json:"issuer,omitempty"`
// JwksUri: URL of the provider's public key set to validate signature
// of the JWT. See
// [OpenID
// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#
// ProviderMetadata).
// Optional if the key set document:
// - can be retrieved from
// [OpenID
// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
//
// of the issuer.
// - can be inferred from the email domain of the issuer (e.g. a Google
// service account).
//
// Example: https://www.googleapis.com/oauth2/v1/certs
JwksUri string `json:"jwksUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Audiences") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Audiences") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AuthProvider) MarshalJSON() ([]byte, error) {
type NoMethod AuthProvider
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AuthRequirement: User-defined authentication requirements, including
// support for
// [JSON Web Token
// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32)
// .
type AuthRequirement struct {
// Audiences: NOTE: This will be deprecated soon, once
// AuthProvider.audiences is
// implemented and accepted in all the runtime components.
//
// The list of
// JWT
// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
// token-32#section-4.1.3).
// that are allowed to access. A JWT containing any of these audiences
// will
// be accepted. When this setting is absent, only JWTs with
// audience
// "https://Service_name/API_name"
// will be accepted. For example, if no audiences are in the
// setting,
// LibraryService API will only accept JWTs with the following
// audience
// "https://library-example.googleapis.com/google.example.librar
// y.v1.LibraryService".
//
// Example:
//
// audiences: bookstore_android.apps.googleusercontent.com,
// bookstore_web.apps.googleusercontent.com
Audiences string `json:"audiences,omitempty"`
// ProviderId: id from authentication provider.
//
// Example:
//
// provider_id: bookstore_auth
ProviderId string `json:"providerId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Audiences") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Audiences") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AuthRequirement) MarshalJSON() ([]byte, error) {
type NoMethod AuthRequirement
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Authentication: `Authentication` defines the authentication
// configuration for an API.
//
// Example for an API targeted for external use:
//
// name: calendar.googleapis.com
// authentication:
// providers:
// - id: google_calendar_auth
// jwks_uri: https://www.googleapis.com/oauth2/v1/certs
// issuer: https://securetoken.google.com
// rules:
// - selector: "*"
// requirements:
// provider_id: google_calendar_auth
type Authentication struct {
// Providers: Defines a set of authentication providers that a service
// supports.
Providers []*AuthProvider `json:"providers,omitempty"`
// Rules: A list of authentication rules that apply to individual API
// methods.
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*AuthenticationRule `json:"rules,omitempty"`
// ForceSendFields is a list of field names (e.g. "Providers") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Providers") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Authentication) MarshalJSON() ([]byte, error) {
type NoMethod Authentication
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AuthenticationRule: Authentication rules for the service.
//
// By default, if a method has any authentication requirements, every
// request
// must include a valid credential matching one of the
// requirements.
// It's an error to include more than one kind of credential in a
// single
// request.
//
// If a method doesn't have any auth requirements, request credentials
// will be
// ignored.
type AuthenticationRule struct {
// AllowWithoutCredential: If true, the service accepts API keys without
// any other credential.
AllowWithoutCredential bool `json:"allowWithoutCredential,omitempty"`
// Oauth: The requirements for OAuth credentials.
Oauth *OAuthRequirements `json:"oauth,omitempty"`
// Requirements: Requirements for additional authentication providers.
Requirements []*AuthRequirement `json:"requirements,omitempty"`
// Selector: Selects the methods to which this rule applies.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "AllowWithoutCredential") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AllowWithoutCredential")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AuthenticationRule) MarshalJSON() ([]byte, error) {
type NoMethod AuthenticationRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AuthorizationConfig: Configuration of authorization.
//
// This section determines the authorization provider, if unspecified,
// then no
// authorization check will be done.
//
// Example:
//
// experimental:
// authorization:
// provider: firebaserules.googleapis.com
type AuthorizationConfig struct {
// Provider: The name of the authorization provider, such
// as
// firebaserules.googleapis.com.
Provider string `json:"provider,omitempty"`
// ForceSendFields is a list of field names (e.g. "Provider") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Provider") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AuthorizationConfig) MarshalJSON() ([]byte, error) {
type NoMethod AuthorizationConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AuthorizationRule: Authorization rule for API services.
//
// It specifies the permission(s) required for an API element for the
// overall
// API request to succeed. It is typically used to mark request message
// fields
// that contain the name of the resource and indicates the permissions
// that
// will be checked on that resource.
//
// For example:
//
// package google.storage.v1;
//
// message CopyObjectRequest {
// string source = 1 [
// (google.api.authz).permissions = "storage.objects.get"];
//
// string destination = 2 [
// (google.api.authz).permissions =
// "storage.objects.create,storage.objects.update"];
// }
type AuthorizationRule struct {
// Permissions: The required permissions. The acceptable values vary
// depend on the
// authorization system used. For Google APIs, it should be a
// comma-separated
// Google IAM permission values. When multiple permissions are listed,
// the
// semantics is not defined by the system. Additional documentation
// must
// be provided manually.
Permissions string `json:"permissions,omitempty"`
// Selector: Selects the API elements to which this rule applies.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g. "Permissions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Permissions") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AuthorizationRule) MarshalJSON() ([]byte, error) {
type NoMethod AuthorizationRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Backend: `Backend` defines the backend configuration for a service.
type Backend struct {
// Rules: A list of API backend rules that apply to individual API
// methods.
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*BackendRule `json:"rules,omitempty"`
// ForceSendFields is a list of field names (e.g. "Rules") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Rules") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Backend) MarshalJSON() ([]byte, error) {
type NoMethod Backend
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BackendRule: A backend rule provides configuration for an individual
// API element.
type BackendRule struct {
// Address: The address of the API backend.
Address string `json:"address,omitempty"`
// Deadline: The number of seconds to wait for a response from a
// request. The default
// deadline for gRPC is infinite (no deadline) and HTTP requests is 5
// seconds.
Deadline float64 `json:"deadline,omitempty"`
// MinDeadline: Minimum deadline in seconds needed for this method.
// Calls having deadline
// value lower than this will be rejected.
MinDeadline float64 `json:"minDeadline,omitempty"`
// Selector: Selects the methods to which this rule applies.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g. "Address") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Address") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BackendRule) MarshalJSON() ([]byte, error) {
type NoMethod BackendRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *BackendRule) UnmarshalJSON(data []byte) error {
type NoMethod BackendRule
var s1 struct {
Deadline gensupport.JSONFloat64 `json:"deadline"`
MinDeadline gensupport.JSONFloat64 `json:"minDeadline"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Deadline = float64(s1.Deadline)
s.MinDeadline = float64(s1.MinDeadline)
return nil
}
// Billing: Billing related configuration of the service.
//
// The following example shows how to configure monitored resources and
// metrics
// for billing:
//
// monitored_resources:
// - type: library.googleapis.com/branch
// labels:
// - key: /city
// description: The city where the library branch is located
// in.
// - key: /name
// description: The name of the branch.
// metrics:
// - name: library.googleapis.com/book/borrowed_count
// metric_kind: DELTA
// value_type: INT64
// billing:
// consumer_destinations:
// - monitored_resource: library.googleapis.com/branch
// metrics:
// - library.googleapis.com/book/borrowed_count
type Billing struct {
// ConsumerDestinations: Billing configurations for sending metrics to
// the consumer project.
// There can be multiple consumer destinations per service, each one
// must have
// a different monitored resource type. A metric can be used in at
// most
// one consumer destination.
ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "ConsumerDestinations") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ConsumerDestinations") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Billing) MarshalJSON() ([]byte, error) {
type NoMethod Billing
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BillingConfig: Describes billing configuration for a new tenant
// project.
type BillingConfig struct {
// BillingAccount: Name of the billing account.
// For example `billingAccounts/012345-567890-ABCDEF`.
BillingAccount string `json:"billingAccount,omitempty"`
// ForceSendFields is a list of field names (e.g. "BillingAccount") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BillingAccount") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *BillingConfig) MarshalJSON() ([]byte, error) {
type NoMethod BillingConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BillingDestination: Configuration of a specific billing destination
// (Currently only support
// bill against consumer project).
type BillingDestination struct {
// Metrics: Names of the metrics to report to this billing
// destination.
// Each name must be defined in Service.metrics section.
Metrics []string `json:"metrics,omitempty"`
// MonitoredResource: The monitored resource type. The type must be
// defined in
// Service.monitored_resources section.
MonitoredResource string `json:"monitoredResource,omitempty"`
// ForceSendFields is a list of field names (e.g. "Metrics") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Metrics") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BillingDestination) MarshalJSON() ([]byte, error) {
type NoMethod BillingDestination
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CancelOperationRequest: The request message for
// Operations.CancelOperation.
type CancelOperationRequest struct {
}
// Context: `Context` defines which contexts an API
// requests.
//
// Example:
//
// context:
// rules:
// - selector: "*"
// requested:
// - google.rpc.context.ProjectContext
// - google.rpc.context.OriginContext
//
// The above specifies that all methods in the API
// request
// `google.rpc.context.ProjectContext`
// and
// `google.rpc.context.OriginContext`.
//
// Available context types are defined in
// package
// `google.rpc.context`.
//
// This also provides mechanism to whitelist any protobuf message
// extension that
// can be sent in grpc metadata using
// “x-goog-ext-<extension_id>-bin”
// and
// “x-goog-ext-<extension_id>-jspb” format. For example, list any
// service
// specific protobuf types that can appear in grpc metadata as follows
// in your
// yaml file:
//
// Example:
//
// context:
// rules:
// - selector:
// "google.example.library.v1.LibraryService.CreateBook"
// allowed_request_extensions:
// - google.foo.v1.NewExtension
// allowed_response_extensions:
// - google.foo.v1.NewExtension
//
// You can also specify extension ID instead of fully qualified
// extension name
// here.
type Context struct {
// Rules: A list of RPC context rules that apply to individual API
// methods.
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*ContextRule `json:"rules,omitempty"`
// ForceSendFields is a list of field names (e.g. "Rules") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Rules") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Context) MarshalJSON() ([]byte, error) {
type NoMethod Context
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ContextRule: A context rule provides information about the context
// for an individual API
// element.
type ContextRule struct {
// AllowedRequestExtensions: A list of full type names or extension IDs
// of extensions allowed in grpc
// side channel from client to backend.
AllowedRequestExtensions []string `json:"allowedRequestExtensions,omitempty"`
// AllowedResponseExtensions: A list of full type names or extension IDs
// of extensions allowed in grpc
// side channel from backend to client.
AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"`
// Provided: A list of full type names of provided contexts.
Provided []string `json:"provided,omitempty"`
// Requested: A list of full type names of requested contexts.
Requested []string `json:"requested,omitempty"`
// Selector: Selects the methods to which this rule applies.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "AllowedRequestExtensions") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AllowedRequestExtensions")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ContextRule) MarshalJSON() ([]byte, error) {
type NoMethod ContextRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Control: Selects and configures the service controller used by the
// service. The
// service controller handles features like abuse, quota, billing,
// logging,
// monitoring, etc.
type Control struct {
// Environment: The service control environment to use. If empty, no
// control plane
// feature (like quota and billing) will be enabled.
Environment string `json:"environment,omitempty"`
// ForceSendFields is a list of field names (e.g. "Environment") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Environment") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Control) MarshalJSON() ([]byte, error) {
type NoMethod Control
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CreateTenancyUnitRequest: Request to create a tenancy unit for a
// consumer of a service.
type CreateTenancyUnitRequest struct {
// TenancyUnitId: Optional producer provided identifier of the tenancy
// unit.
// Must be no longer than 40 characters and preferably URI friendly.
// If it is not provided, a UID for the tenancy unit will be auto
// generated.
// It must be unique across a service.
// If the tenancy unit already exists for the service and consumer
// pair,
// `CreateTenancyUnit` will return the existing tenancy unit if the
// provided
// identifier is identical or empty, otherwise the call will fail.
TenancyUnitId string `json:"tenancyUnitId,omitempty"`
// ForceSendFields is a list of field names (e.g. "TenancyUnitId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "TenancyUnitId") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CreateTenancyUnitRequest) MarshalJSON() ([]byte, error) {
type NoMethod CreateTenancyUnitRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomError: Customize service error responses. For example, list
// any service
// specific protobuf types that can appear in error detail lists
// of
// error responses.
//
// Example:
//
// custom_error:
// types:
// - google.foo.v1.CustomError
// - google.foo.v1.AnotherError
type CustomError struct {
// Rules: The list of custom error rules that apply to individual API
// messages.
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*CustomErrorRule `json:"rules,omitempty"`
// Types: The list of custom error detail types, e.g.
// 'google.foo.v1.CustomError'.
Types []string `json:"types,omitempty"`
// ForceSendFields is a list of field names (e.g. "Rules") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Rules") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomError) MarshalJSON() ([]byte, error) {
type NoMethod CustomError
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomErrorRule: A custom error rule.
type CustomErrorRule struct {
// IsErrorType: Mark this message as possible payload in error response.
// Otherwise,
// objects of this type will be filtered when they appear in error
// payload.
IsErrorType bool `json:"isErrorType,omitempty"`
// Selector: Selects messages to which this rule applies.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g. "IsErrorType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IsErrorType") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomErrorRule) MarshalJSON() ([]byte, error) {
type NoMethod CustomErrorRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CustomHttpPattern: A custom pattern is used for defining custom HTTP
// verb.
type CustomHttpPattern struct {
// Kind: The name of this custom HTTP verb.
Kind string `json:"kind,omitempty"`
// Path: The path matched by this custom verb.
Path string `json:"path,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CustomHttpPattern) MarshalJSON() ([]byte, error) {
type NoMethod CustomHttpPattern
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Documentation: `Documentation` provides the information for
// describing a service.
//
// Example:
// <pre><code>documentation:
// summary: >
// The Google Calendar API gives access
// to most calendar features.
// pages:
// - name: Overview
// content: (== include google/foo/overview.md ==)
// - name: Tutorial
// content: (== include google/foo/tutorial.md ==)
// subpages;
// - name: Java
// content: (== include google/foo/tutorial_java.md ==)
// rules:
// - selector: google.calendar.Calendar.Get
// description: >
// ...
// - selector: google.calendar.Calendar.Put
// description: >
// ...
// </code></pre>
// Documentation is provided in markdown syntax. In addition to
// standard markdown features, definition lists, tables and fenced
// code blocks are supported. Section headers can be provided and
// are
// interpreted relative to the section nesting of the context where
// a documentation fragment is embedded.
//
// Documentation from the IDL is merged with documentation defined
// via the config at normalization time, where documentation provided
// by config rules overrides IDL provided.
//
// A number of constructs specific to the API platform are supported
// in documentation text.
//
// In order to reference a proto element, the following
// notation can be
// used:
// <pre><code>[fully.qualified.proto.name][]</code></pre>
// T
// o override the display text used for the link, this can be
// used:
// <pre><code>[display
// text][fully.qualified.proto.name]</code></pre>
// Text can be excluded from doc using the following
// notation:
// <pre><code>(-- internal comment --)</code></pre>
//
// A few directives are available in documentation. Note that
// directives must appear on a single line to be properly
// identified. The `include` directive includes a markdown file from
// an external source:
// <pre><code>(== include path/to/file ==)</code></pre>
// The `resource_for` directive marks a message to be the resource of
// a collection in REST view. If it is not specified, tools attempt
// to infer the resource from the operations in a
// collection:
// <pre><code>(== resource_for v1.shelves.books
// ==)</code></pre>
// The directive `suppress_warning` does not directly affect
// documentation
// and is documented together with service config validation.
type Documentation struct {
// DocumentationRootUrl: The URL to the root of documentation.
DocumentationRootUrl string `json:"documentationRootUrl,omitempty"`
// Overview: Declares a single overview page. For
// example:
// <pre><code>documentation:
// summary: ...
// overview: (== include overview.md ==)
// </code></pre>
// This is a shortcut for the following declaration (using pages
// style):
// <pre><code>documentation:
// summary: ...
// pages:
// - name: Overview
// content: (== include overview.md ==)
// </code></pre>
// Note: you cannot specify both `overview` field and `pages` field.
Overview string `json:"overview,omitempty"`
// Pages: The top level pages for the documentation set.
Pages []*Page `json:"pages,omitempty"`
// Rules: A list of documentation rules that apply to individual API
// elements.
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*DocumentationRule `json:"rules,omitempty"`
// Summary: A short summary of what the service does. Can only be
// provided by
// plain text.
Summary string `json:"summary,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "DocumentationRootUrl") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DocumentationRootUrl") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Documentation) MarshalJSON() ([]byte, error) {
type NoMethod Documentation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DocumentationRule: A documentation rule provides information about
// individual API elements.
type DocumentationRule struct {
// DeprecationDescription: Deprecation description of the selected
// element(s). It can be provided if an
// element is marked as `deprecated`.
DeprecationDescription string `json:"deprecationDescription,omitempty"`
// Description: Description of the selected API(s).
Description string `json:"description,omitempty"`
// Selector: The selector is a comma-separated list of patterns. Each
// pattern is a
// qualified name of the element which may end in "*", indicating a
// wildcard.
// Wildcards are only allowed at the end and for a whole component of
// the
// qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar".
// To
// specify a default for all applicable elements, the whole pattern
// "*"
// is used.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "DeprecationDescription") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeprecationDescription")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *DocumentationRule) MarshalJSON() ([]byte, error) {
type NoMethod DocumentationRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated
// empty messages in your APIs. A typical example is to use it as the
// request
// or the response type of an API method. For instance:
//
// service Foo {
// rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty);
// }
//
// The JSON representation for `Empty` is empty JSON object `{}`.
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// Endpoint: `Endpoint` describes a network endpoint that serves a set
// of APIs.
// A service may expose any number of endpoints, and all endpoints share
// the
// same service configuration, such as quota configuration and
// monitoring
// configuration.
//
// Example service configuration:
//
// name: library-example.googleapis.com
// endpoints:
// # Below entry makes 'google.example.library.v1.Library'
// # API be served from endpoint address
// library-example.googleapis.com.
// # It also allows HTTP OPTIONS calls to be passed to the
// backend, for
// # it to decide whether the subsequent cross-origin request is
// # allowed to proceed.
// - name: library-example.googleapis.com
// allow_cors: true
type Endpoint struct {
// Aliases: DEPRECATED: This field is no longer supported. Instead of
// using aliases,
// please specify multiple google.api.Endpoint for each of the
// intended
// aliases.
//
// Additional names that this endpoint will be hosted on.
Aliases []string `json:"aliases,omitempty"`
// AllowCors:
// Allowing
// [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sh
// aring), aka
// cross-domain traffic, would allow the backends served from this
// endpoint to
// receive and respond to HTTP OPTIONS requests. The response will be
// used by
// the browser to determine whether the subsequent cross-origin request
// is
// allowed to proceed.
AllowCors bool `json:"allowCors,omitempty"`
// Features: The list of features enabled on this endpoint.
Features []string `json:"features,omitempty"`
// Name: The canonical name of this endpoint.
Name string `json:"name,omitempty"`
// Target: The specification of an Internet routable address of API
// frontend that will
// handle requests to this [API
// Endpoint](https://cloud.google.com/apis/design/glossary).
// It should be either a valid IPv4 address or a fully-qualified domain
// name.
// For example, "8.8.8.8" or "myservice.appspot.com".
Target string `json:"target,omitempty"`
// ForceSendFields is a list of field names (e.g. "Aliases") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Aliases") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Endpoint) MarshalJSON() ([]byte, error) {
type NoMethod Endpoint
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Enum: Enum type definition.
type Enum struct {
// Enumvalue: Enum value definitions.
Enumvalue []*EnumValue `json:"enumvalue,omitempty"`
// Name: Enum type name.
Name string `json:"name,omitempty"`
// Options: Protocol buffer options.
Options []*Option `json:"options,omitempty"`
// SourceContext: The source context.
SourceContext *SourceContext `json:"sourceContext,omitempty"`
// Syntax: The source syntax.
//
// Possible values:
// "SYNTAX_PROTO2" - Syntax `proto2`.
// "SYNTAX_PROTO3" - Syntax `proto3`.
Syntax string `json:"syntax,omitempty"`
// ForceSendFields is a list of field names (e.g. "Enumvalue") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Enumvalue") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Enum) MarshalJSON() ([]byte, error) {
type NoMethod Enum
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// EnumValue: Enum value definition.
type EnumValue struct {
// Name: Enum value name.
Name string `json:"name,omitempty"`
// Number: Enum value number.
Number int64 `json:"number,omitempty"`
// Options: Protocol buffer options.
Options []*Option `json:"options,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *EnumValue) MarshalJSON() ([]byte, error) {
type NoMethod EnumValue
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Experimental: Experimental service configuration. These configuration
// options can
// only be used by whitelisted users.
type Experimental struct {
// Authorization: Authorization configuration.
Authorization *AuthorizationConfig `json:"authorization,omitempty"`
// ForceSendFields is a list of field names (e.g. "Authorization") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Authorization") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Experimental) MarshalJSON() ([]byte, error) {
type NoMethod Experimental
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Field: A single field of a message type.
type Field struct {
// Cardinality: The field cardinality.
//
// Possible values:
// "CARDINALITY_UNKNOWN" - For fields with unknown cardinality.
// "CARDINALITY_OPTIONAL" - For optional fields.
// "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only.
// "CARDINALITY_REPEATED" - For repeated fields.
Cardinality string `json:"cardinality,omitempty"`
// DefaultValue: The string value of the default value of this field.
// Proto2 syntax only.
DefaultValue string `json:"defaultValue,omitempty"`
// JsonName: The field JSON name.
JsonName string `json:"jsonName,omitempty"`
// Kind: The field type.
//
// Possible values:
// "TYPE_UNKNOWN" - Field type unknown.
// "TYPE_DOUBLE" - Field type double.
// "TYPE_FLOAT" - Field type float.
// "TYPE_INT64" - Field type int64.
// "TYPE_UINT64" - Field type uint64.
// "TYPE_INT32" - Field type int32.
// "TYPE_FIXED64" - Field type fixed64.
// "TYPE_FIXED32" - Field type fixed32.
// "TYPE_BOOL" - Field type bool.
// "TYPE_STRING" - Field type string.
// "TYPE_GROUP" - Field type group. Proto2 syntax only, and
// deprecated.
// "TYPE_MESSAGE" - Field type message.
// "TYPE_BYTES" - Field type bytes.
// "TYPE_UINT32" - Field type uint32.
// "TYPE_ENUM" - Field type enum.
// "TYPE_SFIXED32" - Field type sfixed32.
// "TYPE_SFIXED64" - Field type sfixed64.
// "TYPE_SINT32" - Field type sint32.
// "TYPE_SINT64" - Field type sint64.
Kind string `json:"kind,omitempty"`
// Name: The field name.
Name string `json:"name,omitempty"`
// Number: The field number.
Number int64 `json:"number,omitempty"`
// OneofIndex: The index of the field type in `Type.oneofs`, for message
// or enumeration
// types. The first type has index 1; zero means the type is not in the
// list.
OneofIndex int64 `json:"oneofIndex,omitempty"`
// Options: The protocol buffer options.
Options []*Option `json:"options,omitempty"`
// Packed: Whether to use alternative packed wire representation.
Packed bool `json:"packed,omitempty"`
// TypeUrl: The field type URL, without the scheme, for message or
// enumeration
// types. Example: "type.googleapis.com/google.protobuf.Timestamp".
TypeUrl string `json:"typeUrl,omitempty"`
// ForceSendFields is a list of field names (e.g. "Cardinality") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Cardinality") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Field) MarshalJSON() ([]byte, error) {
type NoMethod Field
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Http: Defines the HTTP configuration for an API service. It contains
// a list of
// HttpRule, each specifying the mapping of an RPC method
// to one or more HTTP REST API methods.
type Http struct {
// FullyDecodeReservedExpansion: When set to true, URL path parmeters
// will be fully URI-decoded except in
// cases of single segment matches in reserved expansion, where "%2F"
// will be
// left encoded.
//
// The default behavior is to not decode RFC 6570 reserved characters in
// multi
// segment matches.
FullyDecodeReservedExpansion bool `json:"fullyDecodeReservedExpansion,omitempty"`
// Rules: A list of HTTP configuration rules that apply to individual
// API methods.
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*HttpRule `json:"rules,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "FullyDecodeReservedExpansion") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "FullyDecodeReservedExpansion") to include in API requests with the
// JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Http) MarshalJSON() ([]byte, error) {
type NoMethod Http
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// HttpRule: `HttpRule` defines the mapping of an RPC method to one or
// more HTTP
// REST API methods. The mapping specifies how different portions of the
// RPC
// request message are mapped to URL path, URL query parameters,
// and
// HTTP request body. The mapping is typically specified as
// an
// `google.api.http` annotation on the RPC method,
// see "google/api/annotations.proto" for details.
//
// The mapping consists of a field specifying the path template
// and
// method kind. The path template can refer to fields in the
// request
// message, as in the example below which describes a REST GET
// operation on a resource collection of messages:
//
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http).get =
// "/v1/messages/{message_id}/{sub.subfield}";
// }
// }
// message GetMessageRequest {
// message SubMessage {
// string subfield = 1;
// }
// string message_id = 1; // mapped to the URL
// SubMessage sub = 2; // `sub.subfield` is url-mapped
// }
// message Message {
// string text = 1; // content of the resource
// }
//
// The same http annotation can alternatively be expressed inside
// the
// `GRPC API Configuration` YAML file.
//
// http:
// rules:
// - selector: <proto_package_name>.Messaging.GetMessage
// get: /v1/messages/{message_id}/{sub.subfield}
//
// This definition enables an automatic, bidrectional mapping of
// HTTP
// JSON to RPC. Example:
//
// HTTP | RPC
// -----|-----
// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456"
// sub: SubMessage(subfield: "foo"))`
//
// In general, not only fields but also field paths can be
// referenced
// from a path pattern. Fields mapped to the path pattern cannot
// be
// repeated and must have a primitive (non-message) type.
//
// Any fields in the request message which are not bound by the
// path
// pattern automatically become (optional) HTTP query
// parameters. Assume the following definition of the request
// message:
//
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http).get = "/v1/messages/{message_id}";
// }
// }
// message GetMessageRequest {
// message SubMessage {
// string subfield = 1;
// }
// string message_id = 1; // mapped to the URL
// int64 revision = 2; // becomes a parameter
// SubMessage sub = 3; // `sub.subfield` becomes a parameter
// }
//
//
// This enables a HTTP JSON to RPC mapping as below:
//
// HTTP | RPC
// -----|-----
// `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
// `GetMessage(message_id: "123456" revision: 2 sub:
// SubMessage(subfield: "foo"))`
//
// Note that fields which are mapped to HTTP parameters must have
// a
// primitive type or a repeated primitive type. Message types are
// not
// allowed. In the case of a repeated type, the parameter can
// be
// repeated in the URL, as in `...?param=A¶m=B`.
//
// For HTTP method kinds which allow a request body, the `body`
// field
// specifies the mapping. Consider a REST update method on the
// message resource collection:
//
//
// service Messaging {
// rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
// option (google.api.http) = {
// put: "/v1/messages/{message_id}"
// body: "message"
// };
// }
// }
// message UpdateMessageRequest {
// string message_id = 1; // mapped to the URL
// Message message = 2; // mapped to the body
// }
//
//
// The following HTTP JSON to RPC mapping is enabled, where
// the
// representation of the JSON in the request body is determined
// by
// protos JSON encoding:
//
// HTTP | RPC
// -----|-----
// `PUT /v1/messages/123456 { "text": "Hi!" }` |
// `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
//
// The special name `*` can be used in the body mapping to define
// that
// every field not bound by the path template should be mapped to
// the
// request body. This enables the following alternative definition
// of
// the update method:
//
// service Messaging {
// rpc UpdateMessage(Message) returns (Message) {
// option (google.api.http) = {
// put: "/v1/messages/{message_id}"
// body: "*"
// };
// }
// }
// message Message {
// string message_id = 1;
// string text = 2;
// }
//
//
// The following HTTP JSON to RPC mapping is enabled:
//
// HTTP | RPC
// -----|-----
// `PUT /v1/messages/123456 { "text": "Hi!" }` |
// `UpdateMessage(message_id: "123456" text: "Hi!")`
//
// Note that when using `*` in the body mapping, it is not possible
// to
// have HTTP parameters, as all fields not bound by the path end in
// the body. This makes this option more rarely used in practice
// of
// defining REST APIs. The common usage of `*` is in custom
// methods
// which don't use the URL at all for transferring data.
//
// It is possible to define multiple HTTP methods for one RPC by
// using
// the `additional_bindings` option. Example:
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http) = {
// get: "/v1/messages/{message_id}"
// additional_bindings {
// get: "/v1/users/{user_id}/messages/{message_id}"
// }
// };
// }
// }
// message GetMessageRequest {
// string message_id = 1;
// string user_id = 2;
// }
//
//
// This enables the following two alternative HTTP JSON to
// RPC
// mappings:
//
// HTTP | RPC
// -----|-----
// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me"
// message_id: "123456")`
//
// # Rules for HTTP mapping
//
// The rules for mapping HTTP path, query parameters, and body fields
// to the request message are as follows:
//
// 1. The `body` field specifies either `*` or a field path, or is
// omitted. If omitted, it indicates there is no HTTP request
// body.
// 2. Leaf fields (recursive expansion of nested messages in the
// request) can be classified into three types:
// (a) Matched in the URL template.
// (b) Covered by body (if body is `*`, everything except (a)
// fields;
// else everything under the body field)
// (c) All other fields.
// 3. URL query parameters found in the HTTP request are mapped to (c)
// fields.
// 4. Any body sent with an HTTP request can contain only (b)
// fields.
//
// The syntax of the path template is as follows:
//
// Template = "/" Segments [ Verb ] ;
// Segments = Segment { "/" Segment } ;
// Segment = "*" | "**" | LITERAL | Variable ;
// Variable = "{" FieldPath [ "=" Segments ] "}" ;
// FieldPath = IDENT { "." IDENT } ;
// Verb = ":" LITERAL ;
//
// The syntax `*` matches a single path segment. The syntax `**` matches
// zero
// or more path segments, which must be the last part of the path except
// the
// `Verb`. The syntax `LITERAL` matches literal text in the path.
//
// The syntax `Variable` matches part of the URL path as specified by
// its
// template. A variable template must not contain other variables. If a
// variable
// matches a single path segment, its template may be omitted, e.g.
// `{var}`
// is equivalent to `{var=*}`.
//
// If a variable contains exactly one path segment, such as "{var}"
// or
// "{var=*}", when such a variable is expanded into a URL path, all
// characters
// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up
// in the
// Discovery Document as `{var}`.
//
// If a variable contains one or more path segments, such as
// "{var=foo/*}"
// or "{var=**}", when such a variable is expanded into a URL path,
// all
// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such
// variables
// show up in the Discovery Document as `{+var}`.
//
// NOTE: While the single segment variable matches the semantics of
// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
// Simple String Expansion, the multi segment variable **does not**
// match
// RFC 6570 Reserved Expansion. The reason is that the Reserved
// Expansion
// does not expand special characters like `?` and `#`, which would
// lead
// to invalid URLs.
//
// NOTE: the field paths in variables and in the `body` must not refer
// to
// repeated fields or map fields.
type HttpRule struct {
// AdditionalBindings: Additional HTTP bindings for the selector. Nested
// bindings must
// not contain an `additional_bindings` field themselves (that is,
// the nesting may only be one level deep).
AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"`
// Authorizations: Specifies the permission(s) required for an API
// element for the overall
// API request to succeed. It is typically used to mark request message
// fields
// that contain the name of the resource and indicates the permissions
// that
// will be checked on that resource.
Authorizations []*AuthorizationRule `json:"authorizations,omitempty"`
// Body: The name of the request field whose value is mapped to the HTTP
// body, or
// `*` for mapping all fields not captured by the path pattern to the
// HTTP
// body. NOTE: the referred field must not be a repeated field and must
// be
// present at the top-level of request message type.
Body string `json:"body,omitempty"`
// Custom: The custom pattern is used for specifying an HTTP method that
// is not
// included in the `pattern` field, such as HEAD, or "*" to leave
// the
// HTTP method unspecified for this rule. The wild-card rule is
// useful
// for services that provide content to Web (HTML) clients.
Custom *CustomHttpPattern `json:"custom,omitempty"`
// Delete: Used for deleting a resource.
Delete string `json:"delete,omitempty"`
// Get: Used for listing and getting information about resources.
Get string `json:"get,omitempty"`
// MediaDownload: Use this only for Scotty Requests. Do not use this for
// bytestream methods.
// For media support, add instead [][google.bytestream.RestByteStream]
// as an
// API to your configuration.
MediaDownload *MediaDownload `json:"mediaDownload,omitempty"`
// MediaUpload: Use this only for Scotty Requests. Do not use this for
// media support using
// Bytestream, add instead
// [][google.bytestream.RestByteStream] as an API to your
// configuration for Bytestream methods.
MediaUpload *MediaUpload `json:"mediaUpload,omitempty"`
// Patch: Used for updating a resource.
Patch string `json:"patch,omitempty"`
// Post: Used for creating a resource.
Post string `json:"post,omitempty"`
// Put: Used for updating a resource.
Put string `json:"put,omitempty"`
// ResponseBody: Optional. The name of the response field whose value is
// mapped to the HTTP
// body of response. Other response fields are ignored. When
// not set, the response message will be used as HTTP body of response.
ResponseBody string `json:"responseBody,omitempty"`
// RestCollection: DO NOT USE. This is an experimental field.
//
// Optional. The REST collection name is by default derived from the
// URL
// pattern. If specified, this field overrides the default collection
// name.
// Example:
//
// rpc AddressesAggregatedList(AddressesAggregatedListRequest)
// returns (AddressesAggregatedListResponse) {
// option (google.api.http) = {
// get: "/v1/projects/{project_id}/aggregated/addresses"
// rest_collection: "projects.addresses"
// };
// }
//
// This method has the automatically derived collection
// name
// "projects.aggregated". Because, semantically, this rpc is actually
// an
// operation on the "projects.addresses" collection, the
// `rest_collection`
// field is configured to override the derived collection name.
RestCollection string `json:"restCollection,omitempty"`
// RestMethodName: DO NOT USE. This is an experimental field.
//
// Optional. The rest method name is by default derived from the
// URL
// pattern. If specified, this field overrides the default method
// name.
// Example:
//
// rpc CreateResource(CreateResourceRequest)
// returns (CreateResourceResponse) {
// option (google.api.http) = {
// post: "/v1/resources",
// body: "resource",
// rest_method_name: "insert"
// };
// }
//
// This method has the automatically derived rest method name
// "create", but for backwards compatibility with apiary, it is
// specified as
// insert.
RestMethodName string `json:"restMethodName,omitempty"`
// Selector: Selects methods to which this rule applies.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g. "AdditionalBindings")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdditionalBindings") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *HttpRule) MarshalJSON() ([]byte, error) {
type NoMethod HttpRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// LabelDescriptor: A description of a label.
type LabelDescriptor struct {
// Description: A human-readable description for the label.
Description string `json:"description,omitempty"`
// Key: The label key.
Key string `json:"key,omitempty"`
// ValueType: The type of data that can be assigned to the label.
//
// Possible values:
// "STRING" - A variable-length string. This is the default.
// "BOOL" - Boolean; true or false.
// "INT64" - A 64-bit signed integer.
ValueType string `json:"valueType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
type NoMethod LabelDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListOperationsResponse: The response message for
// Operations.ListOperations.
type ListOperationsResponse struct {
// NextPageToken: The standard List next-page token.
NextPageToken string `json:"nextPageToken,omitempty"`
// Operations: A list of operations that matches the specified filter in
// the request.
Operations []*Operation `json:"operations,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListOperationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListTenancyUnitsResponse: Response for the list request.
type ListTenancyUnitsResponse struct {
// NextPageToken: Pagination token for large results.
NextPageToken string `json:"nextPageToken,omitempty"`
// TenancyUnits: Tenancy units matching the request.
TenancyUnits []*TenancyUnit `json:"tenancyUnits,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListTenancyUnitsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListTenancyUnitsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// LogDescriptor: A description of a log type. Example in YAML format:
//
// - name: library.googleapis.com/activity_history
// description: The history of borrowing and returning library
// items.
// display_name: Activity
// labels:
// - key: /customer_id
// description: Identifier of a library customer
type LogDescriptor struct {
// Description: A human-readable description of this log. This
// information appears in
// the documentation and can contain details.
Description string `json:"description,omitempty"`
// DisplayName: The human-readable name for this log. This information
// appears on
// the user interface and should be concise.
DisplayName string `json:"displayName,omitempty"`
// Labels: The set of labels that are available to describe a specific
// log entry.
// Runtime requests that contain labels not specified here
// are
// considered invalid.
Labels []*LabelDescriptor `json:"labels,omitempty"`
// Name: The name of the log. It must be less than 512 characters long
// and can
// include the following characters: upper- and lower-case
// alphanumeric
// characters [A-Za-z0-9], and punctuation characters including
// slash, underscore, hyphen, period [/_-.].
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *LogDescriptor) MarshalJSON() ([]byte, error) {
type NoMethod LogDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Logging: Logging configuration of the service.
//
// The following example shows how to configure logs to be sent to
// the
// producer and consumer projects. In the example, the
// `activity_history`
// log is sent to both the producer and consumer projects, whereas
// the
// `purchase_history` log is only sent to the producer project.
//
// monitored_resources:
// - type: library.googleapis.com/branch
// labels:
// - key: /city
// description: The city where the library branch is located
// in.
// - key: /name
// description: The name of the branch.
// logs:
// - name: activity_history
// labels:
// - key: /customer_id
// - name: purchase_history
// logging:
// producer_destinations:
// - monitored_resource: library.googleapis.com/branch
// logs:
// - activity_history
// - purchase_history
// consumer_destinations:
// - monitored_resource: library.googleapis.com/branch
// logs:
// - activity_history
type Logging struct {
// ConsumerDestinations: Logging configurations for sending logs to the
// consumer project.
// There can be multiple consumer destinations, each one must have
// a
// different monitored resource type. A log can be used in at most
// one consumer destination.
ConsumerDestinations []*LoggingDestination `json:"consumerDestinations,omitempty"`
// ProducerDestinations: Logging configurations for sending logs to the
// producer project.
// There can be multiple producer destinations, each one must have
// a
// different monitored resource type. A log can be used in at most
// one producer destination.
ProducerDestinations []*LoggingDestination `json:"producerDestinations,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "ConsumerDestinations") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ConsumerDestinations") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Logging) MarshalJSON() ([]byte, error) {
type NoMethod Logging
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// LoggingDestination: Configuration of a specific logging destination
// (the producer project
// or the consumer project).
type LoggingDestination struct {
// Logs: Names of the logs to be sent to this destination. Each name
// must
// be defined in the Service.logs section. If the log name is
// not a domain scoped name, it will be automatically prefixed with
// the service name followed by "/".
Logs []string `json:"logs,omitempty"`
// MonitoredResource: The monitored resource type. The type must be
// defined in the
// Service.monitored_resources section.
MonitoredResource string `json:"monitoredResource,omitempty"`
// ForceSendFields is a list of field names (e.g. "Logs") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Logs") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *LoggingDestination) MarshalJSON() ([]byte, error) {
type NoMethod LoggingDestination
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MediaDownload: Defines the Media configuration for a service in case
// of a download.
// Use this only for Scotty Requests. Do not use this for media support
// using
// Bytestream, add instead [][google.bytestream.RestByteStream] as an
// API to
// your configuration for Bytestream methods.
type MediaDownload struct {
// CompleteNotification: A boolean that determines whether a
// notification for the completion of a
// download should be sent to the backend.
CompleteNotification bool `json:"completeNotification,omitempty"`
// DownloadService: DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING
// IS REMOVED.
//
// Specify name of the download service if one is used for download.
DownloadService string `json:"downloadService,omitempty"`
// Dropzone: Name of the Scotty dropzone to use for the current API.
Dropzone string `json:"dropzone,omitempty"`
// Enabled: Whether download is enabled.
Enabled bool `json:"enabled,omitempty"`
// MaxDirectDownloadSize: Optional maximum acceptable size for direct
// download.
// The size is specified in bytes.
MaxDirectDownloadSize int64 `json:"maxDirectDownloadSize,omitempty,string"`
// UseDirectDownload: A boolean that determines if direct download from
// ESF should be used for
// download of this media.
UseDirectDownload bool `json:"useDirectDownload,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "CompleteNotification") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CompleteNotification") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *MediaDownload) MarshalJSON() ([]byte, error) {
type NoMethod MediaDownload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MediaUpload: Defines the Media configuration for a service in case of
// an upload.
// Use this only for Scotty Requests. Do not use this for media support
// using
// Bytestream, add instead [][google.bytestream.RestByteStream] as an
// API to
// your configuration for Bytestream methods.
type MediaUpload struct {
// CompleteNotification: A boolean that determines whether a
// notification for the completion of an
// upload should be sent to the backend. These notifications will not be
// seen
// by the client and will not consume quota.
CompleteNotification bool `json:"completeNotification,omitempty"`
// Dropzone: Name of the Scotty dropzone to use for the current API.
Dropzone string `json:"dropzone,omitempty"`
// Enabled: Whether upload is enabled.
Enabled bool `json:"enabled,omitempty"`
// MaxSize: Optional maximum acceptable size for an upload.
// The size is specified in bytes.
MaxSize int64 `json:"maxSize,omitempty,string"`
// MimeTypes: An array of mimetype patterns. Esf will only accept
// uploads that match one
// of the given patterns.
MimeTypes []string `json:"mimeTypes,omitempty"`
// ProgressNotification: Whether to receive a notification for progress
// changes of media upload.
ProgressNotification bool `json:"progressNotification,omitempty"`
// StartNotification: Whether to receive a notification on the start of
// media upload.
StartNotification bool `json:"startNotification,omitempty"`
// UploadService: DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING
// IS REMOVED.
//
// Specify name of the upload service if one is used for upload.
UploadService string `json:"uploadService,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "CompleteNotification") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CompleteNotification") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *MediaUpload) MarshalJSON() ([]byte, error) {
type NoMethod MediaUpload
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Method: Method represents a method of an API interface.
type Method struct {
// Name: The simple name of this method.
Name string `json:"name,omitempty"`
// Options: Any metadata attached to the method.
Options []*Option `json:"options,omitempty"`
// RequestStreaming: If true, the request is streamed.
RequestStreaming bool `json:"requestStreaming,omitempty"`
// RequestTypeUrl: A URL of the input message type.
RequestTypeUrl string `json:"requestTypeUrl,omitempty"`
// ResponseStreaming: If true, the response is streamed.
ResponseStreaming bool `json:"responseStreaming,omitempty"`
// ResponseTypeUrl: The URL of the output message type.
ResponseTypeUrl string `json:"responseTypeUrl,omitempty"`
// Syntax: The source syntax of this method.
//
// Possible values:
// "SYNTAX_PROTO2" - Syntax `proto2`.
// "SYNTAX_PROTO3" - Syntax `proto3`.
Syntax string `json:"syntax,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Method) MarshalJSON() ([]byte, error) {
type NoMethod Method
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MetricDescriptor: Defines a metric type and its schema. Once a metric
// descriptor is created,
// deleting or altering it stops data collection and makes the metric
// type's
// existing data unusable.
type MetricDescriptor struct {
// Description: A detailed description of the metric, which can be used
// in documentation.
Description string `json:"description,omitempty"`
// DisplayName: A concise name for the metric, which can be displayed in
// user interfaces.
// Use sentence case without an ending period, for example "Request
// count".
// This field is optional but it is recommended to be set for any
// metrics
// associated with user-visible concepts, such as Quota.
DisplayName string `json:"displayName,omitempty"`
// Labels: The set of labels that can be used to describe a
// specific
// instance of this metric type. For example,
// the
// `appengine.googleapis.com/http/server/response_latencies` metric
// type has a label for the HTTP response code, `response_code`, so
// you can look at latencies for successful responses or just
// for responses that failed.
Labels []*LabelDescriptor `json:"labels,omitempty"`
// Metadata: Optional. Metadata which can be used to guide usage of the
// metric.
Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"`
// MetricKind: Whether the metric records instantaneous values, changes
// to a value, etc.
// Some combinations of `metric_kind` and `value_type` might not be
// supported.
//
// Possible values:
// "METRIC_KIND_UNSPECIFIED" - Do not use this default value.
// "GAUGE" - An instantaneous measurement of a value.
// "DELTA" - The change in a value during a time interval.
// "CUMULATIVE" - A value accumulated over a time interval.
// Cumulative
// measurements in a time series should have the same start time
// and increasing end times, until an event resets the cumulative
// value to zero and sets a new start time for the following
// points.
MetricKind string `json:"metricKind,omitempty"`
// Name: The resource name of the metric descriptor.
Name string `json:"name,omitempty"`
// Type: The metric type, including its DNS name prefix. The type is
// not
// URL-encoded. All user-defined metric types have the DNS
// name
// `custom.googleapis.com` or `external.googleapis.com`. Metric types
// should
// use a natural hierarchical grouping. For example:
//
// "custom.googleapis.com/invoice/paid/amount"
// "external.googleapis.com/prometheus/up"
// "appengine.googleapis.com/http/server/response_latencies"
Type string `json:"type,omitempty"`
// Unit: The unit in which the metric value is reported. It is only
// applicable
// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`.
// The
// supported units are a subset of [The Unified Code for Units
// of
// Measure](http://unitsofmeasure.org/ucum.html) standard:
//
// **Basic units (UNIT)**
//
// * `bit` bit
// * `By` byte
// * `s` second
// * `min` minute
// * `h` hour
// * `d` day
//
// **Prefixes (PREFIX)**
//
// * `k` kilo (10**3)
// * `M` mega (10**6)
// * `G` giga (10**9)
// * `T` tera (10**12)
// * `P` peta (10**15)
// * `E` exa (10**18)
// * `Z` zetta (10**21)
// * `Y` yotta (10**24)
// * `m` milli (10**-3)
// * `u` micro (10**-6)
// * `n` nano (10**-9)
// * `p` pico (10**-12)
// * `f` femto (10**-15)
// * `a` atto (10**-18)
// * `z` zepto (10**-21)
// * `y` yocto (10**-24)
// * `Ki` kibi (2**10)
// * `Mi` mebi (2**20)
// * `Gi` gibi (2**30)
// * `Ti` tebi (2**40)
//
// **Grammar**
//
// The grammar also includes these connectors:
//
// * `/` division (as an infix operator, e.g. `1/s`).
// * `.` multiplication (as an infix operator, e.g. `GBy.d`)
//
// The grammar for a unit is as follows:
//
// Expression = Component { "." Component } { "/" Component } ;
//
// Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
// | Annotation
// | "1"
// ;
//
// Annotation = "{" NAME "}" ;
//
// Notes:
//
// * `Annotation` is just a comment if it follows a `UNIT` and is
// equivalent to `1` if it is used alone. For examples,
// `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
// * `NAME` is a sequence of non-blank printable ASCII characters not
// containing '{' or '}'.
// * `1` represents dimensionless value 1, such as in `1/s`.
// * `%` represents dimensionless value 1/100, and annotates values
// giving
// a percentage.
Unit string `json:"unit,omitempty"`
// ValueType: Whether the measurement is an integer, a floating-point
// number, etc.
// Some combinations of `metric_kind` and `value_type` might not be
// supported.
//
// Possible values:
// "VALUE_TYPE_UNSPECIFIED" - Do not use this default value.
// "BOOL" - The value is a boolean.
// This value type can be used only if the metric kind is `GAUGE`.
// "INT64" - The value is a signed 64-bit integer.
// "DOUBLE" - The value is a double precision floating point number.
// "STRING" - The value is a text string.
// This value type can be used only if the metric kind is `GAUGE`.
// "DISTRIBUTION" - The value is a `Distribution`.
// "MONEY" - The value is money.
ValueType string `json:"valueType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
type NoMethod MetricDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MetricDescriptorMetadata: Additional annotations that can be used to
// guide the usage of a metric.
type MetricDescriptorMetadata struct {
// IngestDelay: The delay of data points caused by ingestion. Data
// points older than this
// age are guaranteed to be ingested and available to be read,
// excluding
// data loss due to errors.
IngestDelay string `json:"ingestDelay,omitempty"`
// LaunchStage: The launch stage of the metric definition.
//
// Possible values:
// "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value.
// "EARLY_ACCESS" - Early Access features are limited to a closed
// group of testers. To use
// these features, you must sign up in advance and sign a Trusted
// Tester
// agreement (which includes confidentiality provisions). These features
// may
// be unstable, changed in backward-incompatible ways, and are
// not
// guaranteed to be released.
// "ALPHA" - Alpha is a limited availability test for releases before
// they are cleared
// for widespread use. By Alpha, all significant design issues are
// resolved
// and we are in the process of verifying functionality. Alpha
// customers
// need to apply for access, agree to applicable terms, and have
// their
// projects whitelisted. Alpha releases don’t have to be feature
// complete,
// no SLAs are provided, and there are no technical support obligations,
// but
// they will be far enough along that customers can actually use them
// in
// test environments or for limited-use tests -- just like they would
// in
// normal production cases.
// "BETA" - Beta is the point at which we are ready to open a release
// for any
// customer to use. There are no SLA or technical support obligations in
// a
// Beta release. Products will be complete from a feature perspective,
// but
// may have some open outstanding issues. Beta releases are suitable
// for
// limited production use cases.
// "GA" - GA features are open to all developers and are considered
// stable and
// fully qualified for production use.
// "DEPRECATED" - Deprecated features are scheduled to be shut down
// and removed. For more
// information, see the “Deprecation Policy” section of our [Terms
// of
// Service](https://cloud.google.com/terms/)
// and the [Google Cloud Platform Subject to the
// Deprecation
// Policy](https://cloud.google.com/terms/deprecation) documentation.
LaunchStage string `json:"launchStage,omitempty"`
// SamplePeriod: The sampling period of metric data points. For metrics
// which are written
// periodically, consecutive data points are stored at this time
// interval,
// excluding data loss due to errors. Metrics with a higher granularity
// have
// a smaller sampling period.
SamplePeriod string `json:"samplePeriod,omitempty"`
// ForceSendFields is a list of field names (e.g. "IngestDelay") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IngestDelay") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) {
type NoMethod MetricDescriptorMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MetricRule: Bind API methods to metrics. Binding a method to a metric
// causes that
// metric's configured quota behaviors to apply to the method call.
type MetricRule struct {
// MetricCosts: Metrics to update when the selected methods are called,
// and the associated
// cost applied to each metric.
//
// The key of the map is the metric name, and the values are the
// amount
// increased for the metric against which the quota limits are
// defined.
// The value must not be negative.
MetricCosts map[string]string `json:"metricCosts,omitempty"`
// Selector: Selects the methods to which this rule applies.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g. "MetricCosts") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "MetricCosts") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MetricRule) MarshalJSON() ([]byte, error) {
type NoMethod MetricRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Mixin: Declares an API Interface to be included in this interface.
// The including
// interface must redeclare all the methods from the included interface,
// but
// documentation and options are inherited as follows:
//
// - If after comment and whitespace stripping, the documentation
// string of the redeclared method is empty, it will be inherited
// from the original method.
//
// - Each annotation belonging to the service config (http,
// visibility) which is not set in the redeclared method will be
// inherited.
//
// - If an http annotation is inherited, the path pattern will be
// modified as follows. Any version prefix will be replaced by the
// version of the including interface plus the root path if
// specified.
//
// Example of a simple mixin:
//
// package google.acl.v1;
// service AccessControl {
// // Get the underlying ACL object.
// rpc GetAcl(GetAclRequest) returns (Acl) {
// option (google.api.http).get = "/v1/{resource=**}:getAcl";
// }
// }
//
// package google.storage.v2;
// service Storage {
// // rpc GetAcl(GetAclRequest) returns (Acl);
//
// // Get a data record.
// rpc GetData(GetDataRequest) returns (Data) {
// option (google.api.http).get = "/v2/{resource=**}";
// }
// }
//
// Example of a mixin configuration:
//
// apis:
// - name: google.storage.v2.Storage
// mixins:
// - name: google.acl.v1.AccessControl
//
// The mixin construct implies that all methods in `AccessControl`
// are
// also declared with same name and request/response types in
// `Storage`. A documentation generator or annotation processor will
// see the effective `Storage.GetAcl` method after
// inherting
// documentation and annotations as follows:
//
// service Storage {
// // Get the underlying ACL object.
// rpc GetAcl(GetAclRequest) returns (Acl) {
// option (google.api.http).get = "/v2/{resource=**}:getAcl";
// }
// ...
// }
//
// Note how the version in the path pattern changed from `v1` to
// `v2`.
//
// If the `root` field in the mixin is specified, it should be
// a
// relative path under which inherited HTTP paths are placed. Example:
//
// apis:
// - name: google.storage.v2.Storage
// mixins:
// - name: google.acl.v1.AccessControl
// root: acls
//
// This implies the following inherited HTTP annotation:
//
// service Storage {
// // Get the underlying ACL object.
// rpc GetAcl(GetAclRequest) returns (Acl) {
// option (google.api.http).get =
// "/v2/acls/{resource=**}:getAcl";
// }
// ...
// }
type Mixin struct {
// Name: The fully qualified name of the interface which is included.
Name string `json:"name,omitempty"`
// Root: If non-empty specifies a path under which inherited HTTP
// paths
// are rooted.
Root string `json:"root,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Mixin) MarshalJSON() ([]byte, error) {
type NoMethod Mixin
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MonitoredResourceDescriptor: An object that describes the schema of a
// MonitoredResource object using a
// type name and a set of labels. For example, the monitored
// resource
// descriptor for Google Compute Engine VM instances has a type
// of
// "gce_instance" and specifies the use of the labels "instance_id"
// and
// "zone" to identify particular VM instances.
//
// Different APIs can support different monitored resource types. APIs
// generally
// provide a `list` method that returns the monitored resource
// descriptors used
// by the API.
type MonitoredResourceDescriptor struct {
// Description: Optional. A detailed description of the monitored
// resource type that might
// be used in documentation.
Description string `json:"description,omitempty"`
// DisplayName: Optional. A concise name for the monitored resource type
// that might be
// displayed in user interfaces. It should be a Title Cased Noun
// Phrase,
// without any article or other determiners. For example,
// "Google Cloud SQL Database".
DisplayName string `json:"displayName,omitempty"`
// Labels: Required. A set of labels used to describe instances of this
// monitored
// resource type. For example, an individual Google Cloud SQL database
// is
// identified by values for the labels "database_id" and "zone".
Labels []*LabelDescriptor `json:"labels,omitempty"`
// Name: Optional. The resource name of the monitored resource
// descriptor:
// "projects/{project_id}/monitoredResourceDescriptors/{type
// }" where
// {type} is the value of the `type` field in this object
// and
// {project_id} is a project ID that provides API-specific context
// for
// accessing the type. APIs that do not use project information can use
// the
// resource name format "monitoredResourceDescriptors/{type}".
Name string `json:"name,omitempty"`
// Type: Required. The monitored resource type. For example, the
// type
// "cloudsql_database" represents databases in Google Cloud SQL.
// The maximum length of this value is 256 characters.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
type NoMethod MonitoredResourceDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Monitoring: Monitoring configuration of the service.
//
// The example below shows how to configure monitored resources and
// metrics
// for monitoring. In the example, a monitored resource and two metrics
// are
// defined. The `library.googleapis.com/book/returned_count` metric is
// sent
// to both producer and consumer projects, whereas
// the
// `library.googleapis.com/book/overdue_count` metric is only sent to
// the
// consumer project.
//
// monitored_resources:
// - type: library.googleapis.com/branch
// labels:
// - key: /city
// description: The city where the library branch is located
// in.
// - key: /name
// description: The name of the branch.
// metrics:
// - name: library.googleapis.com/book/returned_count
// metric_kind: DELTA
// value_type: INT64
// labels:
// - key: /customer_id
// - name: library.googleapis.com/book/overdue_count
// metric_kind: GAUGE
// value_type: INT64
// labels:
// - key: /customer_id
// monitoring:
// producer_destinations:
// - monitored_resource: library.googleapis.com/branch
// metrics:
// - library.googleapis.com/book/returned_count
// consumer_destinations:
// - monitored_resource: library.googleapis.com/branch
// metrics:
// - library.googleapis.com/book/returned_count
// - library.googleapis.com/book/overdue_count
type Monitoring struct {
// ConsumerDestinations: Monitoring configurations for sending metrics
// to the consumer project.
// There can be multiple consumer destinations, each one must have
// a
// different monitored resource type. A metric can be used in at
// most
// one consumer destination.
ConsumerDestinations []*MonitoringDestination `json:"consumerDestinations,omitempty"`
// ProducerDestinations: Monitoring configurations for sending metrics
// to the producer project.
// There can be multiple producer destinations, each one must have
// a
// different monitored resource type. A metric can be used in at
// most
// one producer destination.
ProducerDestinations []*MonitoringDestination `json:"producerDestinations,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "ConsumerDestinations") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ConsumerDestinations") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Monitoring) MarshalJSON() ([]byte, error) {
type NoMethod Monitoring
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MonitoringDestination: Configuration of a specific monitoring
// destination (the producer project
// or the consumer project).
type MonitoringDestination struct {
// Metrics: Names of the metrics to report to this monitoring
// destination.
// Each name must be defined in Service.metrics section.
Metrics []string `json:"metrics,omitempty"`
// MonitoredResource: The monitored resource type. The type must be
// defined in
// Service.monitored_resources section.
MonitoredResource string `json:"monitoredResource,omitempty"`
// ForceSendFields is a list of field names (e.g. "Metrics") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Metrics") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MonitoringDestination) MarshalJSON() ([]byte, error) {
type NoMethod MonitoringDestination
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// OAuthRequirements: OAuth scopes are a way to define data and
// permissions on data. For example,
// there are scopes defined for "Read-only access to Google Calendar"
// and
// "Access to Cloud Platform". Users can consent to a scope for an
// application,
// giving it permission to access that data on their behalf.
//
// OAuth scope specifications should be fairly coarse grained; a user
// will need
// to see and understand the text description of what your scope
// means.
//
// In most cases: use one or at most two OAuth scopes for an entire
// family of
// products. If your product has multiple APIs, you should probably be
// sharing
// the OAuth scope across all of those APIs.
//
// When you need finer grained OAuth consent screens: talk with your
// product
// management about how developers will use them in practice.
//
// Please note that even though each of the canonical scopes is enough
// for a
// request to be accepted and passed to the backend, a request can still
// fail
// due to the backend requiring additional scopes or permissions.
type OAuthRequirements struct {
// CanonicalScopes: The list of publicly documented OAuth scopes that
// are allowed access. An
// OAuth token containing any of these scopes will be
// accepted.
//
// Example:
//
// canonical_scopes: https://www.googleapis.com/auth/calendar,
// https://www.googleapis.com/auth/calendar.read
CanonicalScopes string `json:"canonicalScopes,omitempty"`
// ForceSendFields is a list of field names (e.g. "CanonicalScopes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CanonicalScopes") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *OAuthRequirements) MarshalJSON() ([]byte, error) {
type NoMethod OAuthRequirements
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Operation: This resource represents a long-running operation that is
// the result of a
// network API call.
type Operation struct {
// Done: If the value is `false`, it means the operation is still in
// progress.
// If `true`, the operation is completed, and either `error` or
// `response` is
// available.
Done bool `json:"done,omitempty"`
// Error: The error result of the operation in case of failure or
// cancellation.
Error *Status `json:"error,omitempty"`
// Metadata: Service-specific metadata associated with the operation.
// It typically
// contains progress information and common metadata such as create
// time.
// Some services might not provide such metadata. Any method that
// returns a
// long-running operation should document the metadata type, if any.
Metadata googleapi.RawMessage `json:"metadata,omitempty"`
// Name: The server-assigned name, which is only unique within the same
// service that
// originally returns it. If you use the default HTTP mapping,
// the
// `name` should have the format of `operations/some/unique/name`.
Name string `json:"name,omitempty"`
// Response: The normal response of the operation in case of success.
// If the original
// method returns no data on success, such as `Delete`, the response
// is
// `google.protobuf.Empty`. If the original method is
// standard
// `Get`/`Create`/`Update`, the response should be the resource. For
// other
// methods, the response should have the type `XxxResponse`, where
// `Xxx`
// is the original method name. For example, if the original method
// name
// is `TakeSnapshot()`, the inferred response type
// is
// `TakeSnapshotResponse`.
Response googleapi.RawMessage `json:"response,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Done") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Done") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Operation) MarshalJSON() ([]byte, error) {
type NoMethod Operation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Option: A protocol buffer option, which can be attached to a message,
// field,
// enumeration, etc.
type Option struct {
// Name: The option's name. For protobuf built-in options (options
// defined in
// descriptor.proto), this is the short name. For example,
// "map_entry".
// For custom options, it should be the fully-qualified name. For
// example,
// "google.api.http".
Name string `json:"name,omitempty"`
// Value: The option's value packed in an Any message. If the value is a
// primitive,
// the corresponding wrapper type defined in
// google/protobuf/wrappers.proto
// should be used. If the value is an enum, it should be stored as an
// int32
// value using the google.protobuf.Int32Value type.
Value googleapi.RawMessage `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Option) MarshalJSON() ([]byte, error) {
type NoMethod Option
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Page: Represents a documentation page. A page can contain subpages to
// represent
// nested documentation set structure.
type Page struct {
// Content: The Markdown content of the page. You can use <code>(==
// include {path} ==)</code>
// to include content from a Markdown file.
Content string `json:"content,omitempty"`
// Name: The name of the page. It will be used as an identity of the
// page to
// generate URI of the page, text of the link to this page in
// navigation,
// etc. The full page name (start from the root page name to this
// page
// concatenated with `.`) can be used as reference to the page in
// your
// documentation. For example:
// <pre><code>pages:
// - name: Tutorial
// content: (== include tutorial.md ==)
// subpages:
// - name: Java
// content: (== include tutorial_java.md
// ==)
// </code></pre>
// You can reference `Java` page using Markdown reference link
// syntax:
// `Java`.
Name string `json:"name,omitempty"`
// Subpages: Subpages of this page. The order of subpages specified here
// will be
// honored in the generated docset.
Subpages []*Page `json:"subpages,omitempty"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Page) MarshalJSON() ([]byte, error) {
type NoMethod Page
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// PolicyBinding: Translates to IAM Policy bindings (without auditing at
// this level)
type PolicyBinding struct {
// Members: Uses the same format as in IAM policy.
// `member` must include both prefix and ID. For example,
// `user:{emailId}`,
// `serviceAccount:{emailId}`, `group:{emailId}`.
Members []string `json:"members,omitempty"`
// Role: Role.
// (https://cloud.google.com/iam/docs/understanding-roles)
// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Role string `json:"role,omitempty"`
// ForceSendFields is a list of field names (e.g. "Members") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Members") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *PolicyBinding) MarshalJSON() ([]byte, error) {
type NoMethod PolicyBinding
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Quota: Quota configuration helps to achieve fairness and budgeting in
// service
// usage.
//
// The quota configuration works this way:
// - The service configuration defines a set of metrics.
// - For API calls, the quota.metric_rules maps methods to metrics with
// corresponding costs.
// - The quota.limits defines limits on the metrics, which will be used
// for
// quota checks at runtime.
//
// An example quota configuration in yaml format:
//
// quota:
//
// - name: apiWriteQpsPerProject
// metric: library.googleapis.com/write_calls
// unit: "1/min/{project}" # rate limit for consumer projects
// values:
// STANDARD: 10000
//
//
// # The metric rules bind all methods to the read_calls metric,
// # except for the UpdateBook and DeleteBook methods. These two
// methods
// # are mapped to the write_calls metric, with the UpdateBook
// method
// # consuming at twice rate as the DeleteBook method.
// metric_rules:
// - selector: "*"
// metric_costs:
// library.googleapis.com/read_calls: 1
// - selector: google.example.library.v1.LibraryService.UpdateBook
// metric_costs:
// library.googleapis.com/write_calls: 2
// - selector: google.example.library.v1.LibraryService.DeleteBook
// metric_costs:
// library.googleapis.com/write_calls: 1
//
// Corresponding Metric definition:
//
// metrics:
// - name: library.googleapis.com/read_calls
// display_name: Read requests
// metric_kind: DELTA
// value_type: INT64
//
// - name: library.googleapis.com/write_calls
// display_name: Write requests
// metric_kind: DELTA
// value_type: INT64
type Quota struct {
// Limits: List of `QuotaLimit` definitions for the service.
Limits []*QuotaLimit `json:"limits,omitempty"`
// MetricRules: List of `MetricRule` definitions, each one mapping a
// selected method to one
// or more metrics.
MetricRules []*MetricRule `json:"metricRules,omitempty"`
// ForceSendFields is a list of field names (e.g. "Limits") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Limits") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Quota) MarshalJSON() ([]byte, error) {
type NoMethod Quota
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// QuotaLimit: `QuotaLimit` defines a specific limit that applies over a
// specified duration
// for a limit type. There can be at most one limit for a duration and
// limit
// type combination defined within a `QuotaGroup`.
type QuotaLimit struct {
// DefaultLimit: Default number of tokens that can be consumed during
// the specified
// duration. This is the number of tokens assigned when a
// client
// application developer activates the service for his/her
// project.
//
// Specifying a value of 0 will block all requests. This can be used if
// you
// are provisioning quota to selected consumers and blocking
// others.
// Similarly, a value of -1 will indicate an unlimited quota. No
// other
// negative values are allowed.
//
// Used by group-based quotas only.
DefaultLimit int64 `json:"defaultLimit,omitempty,string"`
// Description: Optional. User-visible, extended description for this
// quota limit.
// Should be used only when more context is needed to understand this
// limit
// than provided by the limit's display name (see: `display_name`).
Description string `json:"description,omitempty"`
// DisplayName: User-visible display name for this limit.
// Optional. If not set, the UI will provide a default display name
// based on
// the quota configuration. This field can be used to override the
// default
// display name generated from the configuration.
DisplayName string `json:"displayName,omitempty"`
// Duration: Duration of this limit in textual notation. Example:
// "100s", "24h", "1d".
// For duration longer than a day, only multiple of days is supported.
// We
// support only "100s" and "1d" for now. Additional support will be
// added in
// the future. "0" indicates indefinite duration.
//
// Used by group-based quotas only.
Duration string `json:"duration,omitempty"`
// FreeTier: Free tier value displayed in the Developers Console for
// this limit.
// The free tier is the number of tokens that will be subtracted from
// the
// billed amount when billing is enabled.
// This field can only be set on a limit with duration "1d", in a
// billable
// group; it is invalid on any other limit. If this field is not set,
// it
// defaults to 0, indicating that there is no free tier for this
// service.
//
// Used by group-based quotas only.
FreeTier int64 `json:"freeTier,omitempty,string"`
// MaxLimit: Maximum number of tokens that can be consumed during the
// specified
// duration. Client application developers can override the default
// limit up
// to this maximum. If specified, this value cannot be set to a value
// less
// than the default limit. If not specified, it is set to the default
// limit.
//
// To allow clients to apply overrides with no upper bound, set this to
// -1,
// indicating unlimited maximum quota.
//
// Used by group-based quotas only.
MaxLimit int64 `json:"maxLimit,omitempty,string"`
// Metric: The name of the metric this quota limit applies to. The quota
// limits with
// the same metric will be checked together during runtime. The metric
// must be
// defined within the service config.
Metric string `json:"metric,omitempty"`
// Name: Name of the quota limit.
//
// The name must be provided, and it must be unique within the service.
// The
// name can only include alphanumeric characters as well as '-'.
//
// The maximum length of the limit name is 64 characters.
Name string `json:"name,omitempty"`
// Unit: Specify the unit of the quota limit. It uses the same syntax
// as
// Metric.unit. The supported unit kinds are determined by the
// quota
// backend system.
//
// Here are some examples:
// * "1/min/{project}" for quota per minute per project.
//
// Note: the order of unit components is insignificant.
// The "1" at the beginning is required to follow the metric unit
// syntax.
Unit string `json:"unit,omitempty"`
// Values: Tiered limit values. You must specify this as a key:value
// pair, with an
// integer value that is the maximum number of requests allowed for
// the
// specified unit. Currently only STANDARD is supported.
Values map[string]string `json:"values,omitempty"`
// ForceSendFields is a list of field names (e.g. "DefaultLimit") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DefaultLimit") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *QuotaLimit) MarshalJSON() ([]byte, error) {
type NoMethod QuotaLimit
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RemoveTenantProjectRequest: Request message to remove tenant project
// resource from the tenancy unit.
type RemoveTenantProjectRequest struct {
// Tag: Tag of the resource within the tenancy unit.
Tag string `json:"tag,omitempty"`
// ForceSendFields is a list of field names (e.g. "Tag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Tag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *RemoveTenantProjectRequest) MarshalJSON() ([]byte, error) {
type NoMethod RemoveTenantProjectRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SearchTenancyUnitsResponse: Response for the search query.
type SearchTenancyUnitsResponse struct {
// NextPageToken: Pagination token for large results.
NextPageToken string `json:"nextPageToken,omitempty"`
// TenancyUnits: Tenancy Units matching the request.
TenancyUnits []*TenancyUnit `json:"tenancyUnits,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SearchTenancyUnitsResponse) MarshalJSON() ([]byte, error) {
type NoMethod SearchTenancyUnitsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Service: `Service` is the root object of Google service configuration
// schema. It
// describes basic information about a service, such as the name and
// the
// title, and delegates other aspects to sub-sections. Each sub-section
// is
// either a proto message or a repeated proto message that configures
// a
// specific aspect, such as auth. See each proto message definition for
// details.
//
// Example:
//
// type: google.api.Service
// config_version: 3
// name: calendar.googleapis.com
// title: Google Calendar API
// apis:
// - name: google.calendar.v3.Calendar
// authentication:
// providers:
// - id: google_calendar_auth
// jwks_uri: https://www.googleapis.com/oauth2/v1/certs
// issuer: https://securetoken.google.com
// rules:
// - selector: "*"
// requirements:
// provider_id: google_calendar_auth
type Service struct {
// Apis: A list of API interfaces exported by this service. Only the
// `name` field
// of the google.protobuf.Api needs to be provided by the
// configuration
// author, as the remaining fields will be derived from the IDL during
// the
// normalization process. It is an error to specify an API interface
// here
// which cannot be resolved against the associated IDL files.
Apis []*Api `json:"apis,omitempty"`
// Authentication: Auth configuration.
Authentication *Authentication `json:"authentication,omitempty"`
// Backend: API backend configuration.
Backend *Backend `json:"backend,omitempty"`
// Billing: Billing configuration.
Billing *Billing `json:"billing,omitempty"`
// ConfigVersion: The semantic version of the service configuration. The
// config version
// affects the interpretation of the service configuration. For
// example,
// certain features are enabled by default for certain config
// versions.
// The latest config version is `3`.
ConfigVersion int64 `json:"configVersion,omitempty"`
// Context: Context configuration.
Context *Context `json:"context,omitempty"`
// Control: Configuration for the service control plane.
Control *Control `json:"control,omitempty"`
// CustomError: Custom error configuration.
CustomError *CustomError `json:"customError,omitempty"`
// Documentation: Additional API documentation.
Documentation *Documentation `json:"documentation,omitempty"`
// Endpoints: Configuration for network endpoints. If this is empty,
// then an endpoint
// with the same name as the service is automatically generated to
// service all
// defined APIs.
Endpoints []*Endpoint `json:"endpoints,omitempty"`
// Enums: A list of all enum types included in this API service.
// Enums
// referenced directly or indirectly by the `apis` are
// automatically
// included. Enums which are not referenced but shall be
// included
// should be listed here by name. Example:
//
// enums:
// - name: google.someapi.v1.SomeEnum
Enums []*Enum `json:"enums,omitempty"`
// Experimental: Experimental configuration.
Experimental *Experimental `json:"experimental,omitempty"`
// Http: HTTP configuration.
Http *Http `json:"http,omitempty"`
// Id: A unique ID for a specific instance of this message, typically
// assigned
// by the client for tracking purpose. If empty, the server may choose
// to
// generate one instead.
Id string `json:"id,omitempty"`
// Logging: Logging configuration.
Logging *Logging `json:"logging,omitempty"`
// Logs: Defines the logs used by this service.
Logs []*LogDescriptor `json:"logs,omitempty"`
// Metrics: Defines the metrics used by this service.
Metrics []*MetricDescriptor `json:"metrics,omitempty"`
// MonitoredResources: Defines the monitored resources used by this
// service. This is required
// by the Service.monitoring and Service.logging configurations.
MonitoredResources []*MonitoredResourceDescriptor `json:"monitoredResources,omitempty"`
// Monitoring: Monitoring configuration.
Monitoring *Monitoring `json:"monitoring,omitempty"`
// Name: The DNS address at which this service is available,
// e.g. `calendar.googleapis.com`.
Name string `json:"name,omitempty"`
// ProducerProjectId: The Google project that owns this service.
ProducerProjectId string `json:"producerProjectId,omitempty"`
// Quota: Quota configuration.
Quota *Quota `json:"quota,omitempty"`
// SourceInfo: Output only. The source information for this
// configuration if available.
SourceInfo *SourceInfo `json:"sourceInfo,omitempty"`
// SystemParameters: System parameter configuration.
SystemParameters *SystemParameters `json:"systemParameters,omitempty"`
// SystemTypes: A list of all proto message types included in this API
// service.
// It serves similar purpose as [google.api.Service.types], except
// that
// these types are not needed by user-defined APIs. Therefore, they will
// not
// show up in the generated discovery doc. This field should only be
// used
// to define system APIs in ESF.
SystemTypes []*Type `json:"systemTypes,omitempty"`
// Title: The product title for this service.
Title string `json:"title,omitempty"`
// Types: A list of all proto message types included in this API
// service.
// Types referenced directly or indirectly by the `apis`
// are
// automatically included. Messages which are not referenced but
// shall be included, such as types used by the `google.protobuf.Any`
// type,
// should be listed here by name. Example:
//
// types:
// - name: google.protobuf.Int32
Types []*Type `json:"types,omitempty"`
// Usage: Configuration controlling usage of this service.
Usage *Usage `json:"usage,omitempty"`
// ForceSendFields is a list of field names (e.g. "Apis") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Apis") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Service) MarshalJSON() ([]byte, error) {
type NoMethod Service
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ServiceAccountConfig: Describes service account configuration for the
// tenant project.
type ServiceAccountConfig struct {
// AccountId: ID of the IAM service account to be created in tenant
// project.
// The email format of the service account will
// be
// "<account-id>@<tenant-project-id>.iam.gserviceaccount.com".
// This account id has to be unique within tenant project and
// producers
// have to guarantee it. And it must be 6-30 characters long, and
// matches the
// regular expression `[a-z]([-a-z0-9]*[a-z0-9])`.
AccountId string `json:"accountId,omitempty"`
// TenantProjectRoles: Roles for the associated service account for the
// tenant project.
TenantProjectRoles []string `json:"tenantProjectRoles,omitempty"`
// ForceSendFields is a list of field names (e.g. "AccountId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccountId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ServiceAccountConfig) MarshalJSON() ([]byte, error) {
type NoMethod ServiceAccountConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SourceContext: `SourceContext` represents information about the
// source of a
// protobuf element, like the file in which it is defined.
type SourceContext struct {
// FileName: The path-qualified name of the .proto file that contained
// the associated
// protobuf element. For example:
// "google/protobuf/source_context.proto".
FileName string `json:"fileName,omitempty"`
// ForceSendFields is a list of field names (e.g. "FileName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FileName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SourceContext) MarshalJSON() ([]byte, error) {
type NoMethod SourceContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SourceInfo: Source information used to create a Service Config
type SourceInfo struct {
// SourceFiles: All files used during config generation.
SourceFiles []googleapi.RawMessage `json:"sourceFiles,omitempty"`
// ForceSendFields is a list of field names (e.g. "SourceFiles") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "SourceFiles") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SourceInfo) MarshalJSON() ([]byte, error) {
type NoMethod SourceInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Status: The `Status` type defines a logical error model that is
// suitable for different
// programming environments, including REST APIs and RPC APIs. It is
// used by
// [gRPC](https://github.com/grpc). The error model is designed to
// be:
//
// - Simple to use and understand for most users
// - Flexible enough to meet unexpected needs
//
// # Overview
//
// The `Status` message contains three pieces of data: error code, error
// message,
// and error details. The error code should be an enum value
// of
// google.rpc.Code, but it may accept additional error codes if needed.
// The
// error message should be a developer-facing English message that
// helps
// developers *understand* and *resolve* the error. If a localized
// user-facing
// error message is needed, put the localized message in the error
// details or
// localize it in the client. The optional error details may contain
// arbitrary
// information about the error. There is a predefined set of error
// detail types
// in the package `google.rpc` that can be used for common error
// conditions.
//
// # Language mapping
//
// The `Status` message is the logical representation of the error
// model, but it
// is not necessarily the actual wire format. When the `Status` message
// is
// exposed in different client libraries and different wire protocols,
// it can be
// mapped differently. For example, it will likely be mapped to some
// exceptions
// in Java, but more likely mapped to some error codes in C.
//
// # Other uses
//
// The error model and the `Status` message can be used in a variety
// of
// environments, either with or without APIs, to provide a
// consistent developer experience across different
// environments.
//
// Example uses of this error model include:
//
// - Partial errors. If a service needs to return partial errors to the
// client,
// it may embed the `Status` in the normal response to indicate the
// partial
// errors.
//
// - Workflow errors. A typical workflow has multiple steps. Each step
// may
// have a `Status` message for error reporting.
//
// - Batch operations. If a client uses batch request and batch
// response, the
// `Status` message should be used directly inside batch response,
// one for
// each error sub-response.
//
// - Asynchronous operations. If an API call embeds asynchronous
// operation
// results in its response, the status of those operations should
// be
// represented directly using the `Status` message.
//
// - Logging. If some API errors are stored in logs, the message
// `Status` could
// be used directly after any stripping needed for security/privacy
// reasons.
type Status struct {
// Code: The status code, which should be an enum value of
// google.rpc.Code.
Code int64 `json:"code,omitempty"`
// Details: A list of messages that carry the error details. There is a
// common set of
// message types for APIs to use.
Details []googleapi.RawMessage `json:"details,omitempty"`
// Message: A developer-facing error message, which should be in
// English. Any
// user-facing error message should be localized and sent in
// the
// google.rpc.Status.details field, or localized by the client.
Message string `json:"message,omitempty"`
// ForceSendFields is a list of field names (e.g. "Code") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Code") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Status) MarshalJSON() ([]byte, error) {
type NoMethod Status
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SystemParameter: Define a parameter's name and location. The
// parameter may be passed as either
// an HTTP header or a URL query parameter, and if both are passed the
// behavior
// is implementation-dependent.
type SystemParameter struct {
// HttpHeader: Define the HTTP header name to use for the parameter. It
// is case
// insensitive.
HttpHeader string `json:"httpHeader,omitempty"`
// Name: Define the name of the parameter, such as "api_key" . It is
// case sensitive.
Name string `json:"name,omitempty"`
// UrlQueryParameter: Define the URL query parameter name to use for the
// parameter. It is case
// sensitive.
UrlQueryParameter string `json:"urlQueryParameter,omitempty"`
// ForceSendFields is a list of field names (e.g. "HttpHeader") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "HttpHeader") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SystemParameter) MarshalJSON() ([]byte, error) {
type NoMethod SystemParameter
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SystemParameterRule: Define a system parameter rule mapping system
// parameter definitions to
// methods.
type SystemParameterRule struct {
// Parameters: Define parameters. Multiple names may be defined for a
// parameter.
// For a given method call, only one of them should be used. If
// multiple
// names are used the behavior is implementation-dependent.
// If none of the specified names are present the behavior
// is
// parameter-dependent.
Parameters []*SystemParameter `json:"parameters,omitempty"`
// Selector: Selects the methods to which this rule applies. Use '*' to
// indicate all
// methods in all APIs.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// ForceSendFields is a list of field names (e.g. "Parameters") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Parameters") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SystemParameterRule) MarshalJSON() ([]byte, error) {
type NoMethod SystemParameterRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SystemParameters: ### System parameter configuration
//
// A system parameter is a special kind of parameter defined by the
// API
// system, not by an individual API. It is typically mapped to an HTTP
// header
// and/or a URL query parameter. This configuration specifies which
// methods
// change the names of the system parameters.
type SystemParameters struct {
// Rules: Define system parameters.
//
// The parameters defined here will override the default
// parameters
// implemented by the system. If this field is missing from the
// service
// config, default system parameters will be used. Default system
// parameters
// and names is implementation-dependent.
//
// Example: define api key for all methods
//
// system_parameters
// rules:
// - selector: "*"
// parameters:
// - name: api_key
// url_query_parameter: api_key
//
//
// Example: define 2 api key names for a specific method.
//
// system_parameters
// rules:
// - selector: "/ListShelves"
// parameters:
// - name: api_key
// http_header: Api-Key1
// - name: api_key
// http_header: Api-Key2
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*SystemParameterRule `json:"rules,omitempty"`
// ForceSendFields is a list of field names (e.g. "Rules") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Rules") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SystemParameters) MarshalJSON() ([]byte, error) {
type NoMethod SystemParameters
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TenancyUnit: Representation of a tenancy unit.
type TenancyUnit struct {
// Consumer: @OutputOnly Cloud resource name of the consumer of this
// service.
// For example 'projects/123456'.
Consumer string `json:"consumer,omitempty"`
// CreateTime: @OutputOnly The time this tenancy unit was created.
CreateTime string `json:"createTime,omitempty"`
// Name: Globally unique identifier of this tenancy
// unit
// "services/{service}/{collection id}/{resource
// id}/tenancyUnits/{unit}"
Name string `json:"name,omitempty"`
// Service: @OutputOnly Google Cloud API name of the service owning this
// tenancy unit.
// For example 'serviceconsumermanagement.googleapis.com'.
Service string `json:"service,omitempty"`
// TenantResources: Resources constituting the tenancy unit.
// There can be at most 512 tenant resources in a tenancy unit.
TenantResources []*TenantResource `json:"tenantResources,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Consumer") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Consumer") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TenancyUnit) MarshalJSON() ([]byte, error) {
type NoMethod TenancyUnit
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TenantProjectConfig: This structure defines a tenant project to be
// added to the specified tenancy
// unit and its initial configuration and properties. A project lien
// will be
// created for the tenant project to prevent the tenant project from
// being
// deleted accidentally. The lien will be deleted as part of tenant
// project
// removal.
type TenantProjectConfig struct {
// BillingConfig: Billing account properties. Billing account must be
// specified.
BillingConfig *BillingConfig `json:"billingConfig,omitempty"`
// Folder: Folder where project in this tenancy unit must be
// located
// This folder must have been previously created with proper
// permissions for the caller to create and configure a project in
// it.
// Valid folder resource names have the format
// `folders/{folder_number}`
// (for example, `folders/123456`).
Folder string `json:"folder,omitempty"`
// Labels: Labels that will be applied to this project.
Labels map[string]string `json:"labels,omitempty"`
// ServiceAccountConfig: Configuration for IAM service account on tenant
// project.
ServiceAccountConfig *ServiceAccountConfig `json:"serviceAccountConfig,omitempty"`
// Services: Google Cloud API names of services that will be activated
// on this project
// during provisioning. If any of these services can not be
// activated,
// request will fail.
// For example: 'compute.googleapis.com','cloudfunctions.googleapis.com'
Services []string `json:"services,omitempty"`
// TenantProjectPolicy: Describes ownership and policies for the new
// tenant project. Required.
TenantProjectPolicy *TenantProjectPolicy `json:"tenantProjectPolicy,omitempty"`
// ForceSendFields is a list of field names (e.g. "BillingConfig") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BillingConfig") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TenantProjectConfig) MarshalJSON() ([]byte, error) {
type NoMethod TenantProjectConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TenantProjectPolicy: Describes policy settings that need to be
// applied to a newly
// created tenant project.
type TenantProjectPolicy struct {
// PolicyBindings: Policy bindings to be applied to the tenant project,
// in addition to the
// 'roles/owner' role granted to the Service Consumer Management
// service
// account.
// At least one binding must have the role `roles/owner`. Among the list
// of
// members for `roles/owner`, at least one of them must be either `user`
// or
// `group` type.
PolicyBindings []*PolicyBinding `json:"policyBindings,omitempty"`
// ForceSendFields is a list of field names (e.g. "PolicyBindings") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PolicyBindings") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *TenantProjectPolicy) MarshalJSON() ([]byte, error) {
type NoMethod TenantProjectPolicy
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TenantResource: Resource constituting the TenancyUnit.
type TenantResource struct {
// Resource: @OutputOnly Identifier of the tenant resource.
// For cloud projects, it is in the form 'projects/{number}'.
// For example 'projects/123456'.
Resource string `json:"resource,omitempty"`
// Status: Status of tenant resource.
//
// Possible values:
// "STATUS_UNSPECIFIED" - Unspecified status is the default unset
// value.
// "PENDING_CREATE" - Creation of the tenant resource is ongoing.
// "ACTIVE" - Active resource.
// "PENDING_DELETE" - Deletion of the resource is ongoing.
// "FAILED" - Tenant resource creation or deletion has failed.
Status string `json:"status,omitempty"`
// Tag: Unique per single tenancy unit.
Tag string `json:"tag,omitempty"`
// ForceSendFields is a list of field names (e.g. "Resource") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Resource") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TenantResource) MarshalJSON() ([]byte, error) {
type NoMethod TenantResource
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Type: A protocol buffer message type.
type Type struct {
// Fields: The list of fields.
Fields []*Field `json:"fields,omitempty"`
// Name: The fully qualified message name.
Name string `json:"name,omitempty"`
// Oneofs: The list of types appearing in `oneof` definitions in this
// type.
Oneofs []string `json:"oneofs,omitempty"`
// Options: The protocol buffer options.
Options []*Option `json:"options,omitempty"`
// SourceContext: The source context.
SourceContext *SourceContext `json:"sourceContext,omitempty"`
// Syntax: The source syntax.
//
// Possible values:
// "SYNTAX_PROTO2" - Syntax `proto2`.
// "SYNTAX_PROTO3" - Syntax `proto3`.
Syntax string `json:"syntax,omitempty"`
// ForceSendFields is a list of field names (e.g. "Fields") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Fields") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Type) MarshalJSON() ([]byte, error) {
type NoMethod Type
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Usage: Configuration controlling usage of a service.
type Usage struct {
// ProducerNotificationChannel: The full resource name of a channel used
// for sending notifications to the
// service producer.
//
// Google Service Management currently only supports
// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a
// notification
// channel. To use Google Cloud Pub/Sub as the channel, this must be the
// name
// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name
// format
// documented in https://cloud.google.com/pubsub/docs/overview.
ProducerNotificationChannel string `json:"producerNotificationChannel,omitempty"`
// Requirements: Requirements that must be satisfied before a consumer
// project can use the
// service. Each requirement is of the form
// <service.name>/<requirement-id>;
// for example 'serviceusage.googleapis.com/billing-enabled'.
Requirements []string `json:"requirements,omitempty"`
// Rules: A list of usage rules that apply to individual API
// methods.
//
// **NOTE:** All service configuration rules follow "last one wins"
// order.
Rules []*UsageRule `json:"rules,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "ProducerNotificationChannel") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "ProducerNotificationChannel") to include in API requests with the
// JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Usage) MarshalJSON() ([]byte, error) {
type NoMethod Usage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UsageRule: Usage configuration rules for the service.
//
// NOTE: Under development.
//
//
// Use this rule to configure unregistered calls for the service.
// Unregistered
// calls are calls that do not contain consumer project
// identity.
// (Example: calls that do not contain an API key).
// By default, API methods do not allow unregistered calls, and each
// method call
// must be identified by a consumer project identity. Use this rule
// to
// allow/disallow unregistered calls.
//
// Example of an API that wants to allow unregistered calls for entire
// service.
//
// usage:
// rules:
// - selector: "*"
// allow_unregistered_calls: true
//
// Example of a method that wants to allow unregistered calls.
//
// usage:
// rules:
// - selector:
// "google.example.library.v1.LibraryService.CreateBook"
// allow_unregistered_calls: true
type UsageRule struct {
// AllowUnregisteredCalls: If true, the selected method allows
// unregistered calls, e.g. calls
// that don't identify any user or application.
AllowUnregisteredCalls bool `json:"allowUnregisteredCalls,omitempty"`
// Selector: Selects the methods to which this rule applies. Use '*' to
// indicate all
// methods in all APIs.
//
// Refer to selector for syntax details.
Selector string `json:"selector,omitempty"`
// SkipServiceControl: If true, the selected method should skip service
// control and the control
// plane features, such as quota and billing, will not be
// available.
// This flag is used by Google Cloud Endpoints to bypass checks for
// internal
// methods, such as service health check methods.
SkipServiceControl bool `json:"skipServiceControl,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "AllowUnregisteredCalls") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AllowUnregisteredCalls")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *UsageRule) MarshalJSON() ([]byte, error) {
type NoMethod UsageRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// method id "serviceconsumermanagement.operations.cancel":
type OperationsCancelCall struct {
s *APIService
name string
canceloperationrequest *CancelOperationRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Cancel: Starts asynchronous cancellation on a long-running operation.
// The server
// makes a best effort to cancel the operation, but success is
// not
// guaranteed. If the server doesn't support this method, it
// returns
// `google.rpc.Code.UNIMPLEMENTED`. Clients can
// use
// Operations.GetOperation or
// other methods to check whether the cancellation succeeded or whether
// the
// operation completed despite cancellation. On successful
// cancellation,
// the operation is not deleted; instead, it becomes an operation
// with
// an Operation.error value with a google.rpc.Status.code of
// 1,
// corresponding to `Code.CANCELLED`.
func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.canceloperationrequest = canceloperationrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *OperationsCancelCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.operations.cancel" call.
// Exactly one of *Empty or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Empty{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
// "flatPath": "v1/operations/{operationsId}:cancel",
// "httpMethod": "POST",
// "id": "serviceconsumermanagement.operations.cancel",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The name of the operation resource to be cancelled.",
// "location": "path",
// "pattern": "^operations/.+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}:cancel",
// "request": {
// "$ref": "CancelOperationRequest"
// },
// "response": {
// "$ref": "Empty"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "serviceconsumermanagement.operations.delete":
type OperationsDeleteCall struct {
s *APIService
name string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Deletes a long-running operation. This method indicates that
// the client is
// no longer interested in the operation result. It does not cancel
// the
// operation. If the server doesn't support this method, it
// returns
// `google.rpc.Code.UNIMPLEMENTED`.
func (r *OperationsService) Delete(name string) *OperationsDeleteCall {
c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *OperationsDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.operations.delete" call.
// Exactly one of *Empty or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Empty{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
// "flatPath": "v1/operations/{operationsId}",
// "httpMethod": "DELETE",
// "id": "serviceconsumermanagement.operations.delete",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The name of the operation resource to be deleted.",
// "location": "path",
// "pattern": "^operations/.+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}",
// "response": {
// "$ref": "Empty"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "serviceconsumermanagement.operations.get":
type OperationsGetCall struct {
s *APIService
name string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Gets the latest state of a long-running operation. Clients can
// use this
// method to poll the operation result at intervals as recommended by
// the API
// service.
func (r *OperationsService) Get(name string) *OperationsGetCall {
c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *OperationsGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.operations.get" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
// "flatPath": "v1/operations/{operationsId}",
// "httpMethod": "GET",
// "id": "serviceconsumermanagement.operations.get",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The name of the operation resource.",
// "location": "path",
// "pattern": "^operations/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}",
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "serviceconsumermanagement.operations.list":
type OperationsListCall struct {
s *APIService
name string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Lists operations that match the specified filter in the
// request. If the
// server doesn't support this method, it returns
// `UNIMPLEMENTED`.
//
// NOTE: the `name` binding allows API services to override the
// binding
// to use different resource name schemes, such as `users/*/operations`.
// To
// override the binding, API services can add a binding such
// as
// "/v1/{name=users/*}/operations" to their service configuration.
// For backwards compatibility, the default name includes the
// operations
// collection id, however overriding users must ensure the name
// binding
// is the parent resource, without the operations collection id.
func (r *OperationsService) List(name string) *OperationsListCall {
c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
return c
}
// Filter sets the optional parameter "filter": The standard list
// filter.
func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
c.urlParams_.Set("filter", filter)
return c
}
// PageSize sets the optional parameter "pageSize": The standard list
// page size.
func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken": The standard list
// page token.
func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *OperationsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.operations.list" call.
// Exactly one of *ListOperationsResponse or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *ListOperationsResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &ListOperationsResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
// "flatPath": "v1/operations",
// "httpMethod": "GET",
// "id": "serviceconsumermanagement.operations.list",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "filter": {
// "description": "The standard list filter.",
// "location": "query",
// "type": "string"
// },
// "name": {
// "description": "The name of the operation's parent resource.",
// "location": "path",
// "pattern": "^operations$",
// "required": true,
// "type": "string"
// },
// "pageSize": {
// "description": "The standard list page size.",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "The standard list page token.",
// "location": "query",
// "type": "string"
// }
// },
// "path": "v1/{+name}",
// "response": {
// "$ref": "ListOperationsResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
// method id "serviceconsumermanagement.services.search":
type ServicesSearchCall struct {
s *APIService
parent string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Search: Search tenancy units for a service.
func (r *ServicesService) Search(parent string) *ServicesSearchCall {
c := &ServicesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
return c
}
// PageSize sets the optional parameter "pageSize": The maximum number
// of results returned by this request. Currently, the
// default maximum is set to 1000. If page_size is not provided or the
// size
// provided is a number larger than 1000, it will be automatically set
// to
// 1000.
func (c *ServicesSearchCall) PageSize(pageSize int64) *ServicesSearchCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken": The continuation
// token, which is used to page through large result sets.
// To get the next page of results, set this parameter to the value
// of
// `nextPageToken` from the previous response.
func (c *ServicesSearchCall) PageToken(pageToken string) *ServicesSearchCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
// Query sets the optional parameter "query": Set a query `{expression}`
// for querying tenancy units. Your `{expression}`
// must be in the format: `field_name=literal_string`. The `field_name`
// is the
// name of the field you want to compare. Supported fields
// are
// `tenant_resources.tag` and `tenant_resources.resource`.
//
// For example, to search tenancy units that contain at least one
// tenant
// resource with given tag 'xyz', use query
// `tenant_resources.tag=xyz`.
// To search tenancy units that contain at least one tenant resource
// with
// given resource name 'projects/123456', use
// query
// `tenant_resources.resource=projects/123456`.
//
// Multiple expressions can be joined with `AND`s. Tenancy units must
// match
// all expressions to be included in the result set. For
// example,
// `tenant_resources.tag=xyz AND
// tenant_resources.resource=projects/123456`
func (c *ServicesSearchCall) Query(query string) *ServicesSearchCall {
c.urlParams_.Set("query", query)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *ServicesSearchCall) Fields(s ...googleapi.Field) *ServicesSearchCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *ServicesSearchCall) IfNoneMatch(entityTag string) *ServicesSearchCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ServicesSearchCall) Context(ctx context.Context) *ServicesSearchCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *ServicesSearchCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ServicesSearchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:search")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.services.search" call.
// Exactly one of *SearchTenancyUnitsResponse or error will be non-nil.
// Any non-2xx status code is an error. Response headers are in either
// *SearchTenancyUnitsResponse.ServerResponse.Header or (if a response
// was returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *ServicesSearchCall) Do(opts ...googleapi.CallOption) (*SearchTenancyUnitsResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &SearchTenancyUnitsResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Search tenancy units for a service.",
// "flatPath": "v1/services/{servicesId}:search",
// "httpMethod": "GET",
// "id": "serviceconsumermanagement.services.search",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "pageSize": {
// "description": "The maximum number of results returned by this request. Currently, the\ndefault maximum is set to 1000. If page_size is not provided or the size\nprovided is a number larger than 1000, it will be automatically set to\n1000.\n\nOptional.",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.\n\nOptional.",
// "location": "query",
// "type": "string"
// },
// "parent": {
// "description": "Service for which search is performed.\nservices/{service}\n{service} the name of a service, for example 'service.googleapis.com'.",
// "location": "path",
// "pattern": "^services/[^/]+$",
// "required": true,
// "type": "string"
// },
// "query": {
// "description": "Set a query `{expression}` for querying tenancy units. Your `{expression}`\nmust be in the format: `field_name=literal_string`. The `field_name` is the\nname of the field you want to compare. Supported fields are\n`tenant_resources.tag` and `tenant_resources.resource`.\n\nFor example, to search tenancy units that contain at least one tenant\nresource with given tag 'xyz', use query `tenant_resources.tag=xyz`.\nTo search tenancy units that contain at least one tenant resource with\ngiven resource name 'projects/123456', use query\n`tenant_resources.resource=projects/123456`.\n\nMultiple expressions can be joined with `AND`s. Tenancy units must match\nall expressions to be included in the result set. For example,\n`tenant_resources.tag=xyz AND tenant_resources.resource=projects/123456`\n\nOptional.",
// "location": "query",
// "type": "string"
// }
// },
// "path": "v1/{+parent}:search",
// "response": {
// "$ref": "SearchTenancyUnitsResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ServicesSearchCall) Pages(ctx context.Context, f func(*SearchTenancyUnitsResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
// method id "serviceconsumermanagement.services.tenancyUnits.addProject":
type ServicesTenancyUnitsAddProjectCall struct {
s *APIService
parent string
addtenantprojectrequest *AddTenantProjectRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// AddProject: Add a new tenant project to the tenancy unit.
// There can be at most 512 tenant projects in a tenancy unit.
// If there are previously failed `AddTenantProject` calls, you might
// need to
// call `RemoveTenantProject` first to clean them before you can make
// another
// `AddTenantProject` with the same tag.
// Operation<response: Empty>.
func (r *ServicesTenancyUnitsService) AddProject(parent string, addtenantprojectrequest *AddTenantProjectRequest) *ServicesTenancyUnitsAddProjectCall {
c := &ServicesTenancyUnitsAddProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
c.addtenantprojectrequest = addtenantprojectrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *ServicesTenancyUnitsAddProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsAddProjectCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ServicesTenancyUnitsAddProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsAddProjectCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *ServicesTenancyUnitsAddProjectCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ServicesTenancyUnitsAddProjectCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtenantprojectrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:addProject")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.services.tenancyUnits.addProject" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ServicesTenancyUnitsAddProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Add a new tenant project to the tenancy unit.\nThere can be at most 512 tenant projects in a tenancy unit.\nIf there are previously failed `AddTenantProject` calls, you might need to\ncall `RemoveTenantProject` first to clean them before you can make another\n`AddTenantProject` with the same tag.\nOperation\u003cresponse: Empty\u003e.",
// "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:addProject",
// "httpMethod": "POST",
// "id": "serviceconsumermanagement.services.tenancyUnits.addProject",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "parent": {
// "description": "Name of the tenancy unit.",
// "location": "path",
// "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+parent}:addProject",
// "request": {
// "$ref": "AddTenantProjectRequest"
// },
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "serviceconsumermanagement.services.tenancyUnits.create":
type ServicesTenancyUnitsCreateCall struct {
s *APIService
parent string
createtenancyunitrequest *CreateTenancyUnitRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Create: Creates a tenancy unit with no tenant resources.
func (r *ServicesTenancyUnitsService) Create(parent string, createtenancyunitrequest *CreateTenancyUnitRequest) *ServicesTenancyUnitsCreateCall {
c := &ServicesTenancyUnitsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
c.createtenancyunitrequest = createtenancyunitrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *ServicesTenancyUnitsCreateCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsCreateCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ServicesTenancyUnitsCreateCall) Context(ctx context.Context) *ServicesTenancyUnitsCreateCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *ServicesTenancyUnitsCreateCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ServicesTenancyUnitsCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.createtenancyunitrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tenancyUnits")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.services.tenancyUnits.create" call.
// Exactly one of *TenancyUnit or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *TenancyUnit.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ServicesTenancyUnitsCreateCall) Do(opts ...googleapi.CallOption) (*TenancyUnit, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &TenancyUnit{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Creates a tenancy unit with no tenant resources.",
// "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits",
// "httpMethod": "POST",
// "id": "serviceconsumermanagement.services.tenancyUnits.create",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "parent": {
// "description": "services/{service}/{collection id}/{resource id}\n{collection id} is the cloud resource collection type representing the\nservice consumer, for example 'projects', or 'organizations'.\n{resource id} is the consumer numeric id, such as project number: '123456'.\n{service} the name of a service, for example 'service.googleapis.com'.\nEnabled service binding using the new tenancy unit.",
// "location": "path",
// "pattern": "^services/[^/]+/[^/]+/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+parent}/tenancyUnits",
// "request": {
// "$ref": "CreateTenancyUnitRequest"
// },
// "response": {
// "$ref": "TenancyUnit"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "serviceconsumermanagement.services.tenancyUnits.delete":
type ServicesTenancyUnitsDeleteCall struct {
s *APIService
name string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Delete a tenancy unit. Before the tenancy unit is deleted,
// there should be
// no tenant resources in it.
// Operation<response: Empty>.
func (r *ServicesTenancyUnitsService) Delete(name string) *ServicesTenancyUnitsDeleteCall {
c := &ServicesTenancyUnitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *ServicesTenancyUnitsDeleteCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ServicesTenancyUnitsDeleteCall) Context(ctx context.Context) *ServicesTenancyUnitsDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *ServicesTenancyUnitsDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ServicesTenancyUnitsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.services.tenancyUnits.delete" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ServicesTenancyUnitsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Delete a tenancy unit. Before the tenancy unit is deleted, there should be\nno tenant resources in it.\nOperation\u003cresponse: Empty\u003e.",
// "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}",
// "httpMethod": "DELETE",
// "id": "serviceconsumermanagement.services.tenancyUnits.delete",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "Name of the tenancy unit to be deleted.",
// "location": "path",
// "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}",
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "serviceconsumermanagement.services.tenancyUnits.list":
type ServicesTenancyUnitsListCall struct {
s *APIService
parent string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Find the tenancy unit for a service and consumer.
// This method should not be used in producers' runtime path, for
// example
// finding the tenant project number when creating VMs. Producers
// should
// persist the tenant project information after the project is created.
func (r *ServicesTenancyUnitsService) List(parent string) *ServicesTenancyUnitsListCall {
c := &ServicesTenancyUnitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
return c
}
// Filter sets the optional parameter "filter": Filter expression over
// tenancy resources field.
func (c *ServicesTenancyUnitsListCall) Filter(filter string) *ServicesTenancyUnitsListCall {
c.urlParams_.Set("filter", filter)
return c
}
// PageSize sets the optional parameter "pageSize": The maximum number
// of results returned by this request.
func (c *ServicesTenancyUnitsListCall) PageSize(pageSize int64) *ServicesTenancyUnitsListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken": The continuation
// token, which is used to page through large result sets.
// To get the next page of results, set this parameter to the value
// of
// `nextPageToken` from the previous response.
func (c *ServicesTenancyUnitsListCall) PageToken(pageToken string) *ServicesTenancyUnitsListCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *ServicesTenancyUnitsListCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *ServicesTenancyUnitsListCall) IfNoneMatch(entityTag string) *ServicesTenancyUnitsListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ServicesTenancyUnitsListCall) Context(ctx context.Context) *ServicesTenancyUnitsListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *ServicesTenancyUnitsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ServicesTenancyUnitsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tenancyUnits")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.services.tenancyUnits.list" call.
// Exactly one of *ListTenancyUnitsResponse or error will be non-nil.
// Any non-2xx status code is an error. Response headers are in either
// *ListTenancyUnitsResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *ServicesTenancyUnitsListCall) Do(opts ...googleapi.CallOption) (*ListTenancyUnitsResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &ListTenancyUnitsResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Find the tenancy unit for a service and consumer.\nThis method should not be used in producers' runtime path, for example\nfinding the tenant project number when creating VMs. Producers should\npersist the tenant project information after the project is created.",
// "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits",
// "httpMethod": "GET",
// "id": "serviceconsumermanagement.services.tenancyUnits.list",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "filter": {
// "description": "Filter expression over tenancy resources field. Optional.",
// "location": "query",
// "type": "string"
// },
// "pageSize": {
// "description": "The maximum number of results returned by this request.",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.",
// "location": "query",
// "type": "string"
// },
// "parent": {
// "description": "Service and consumer. Required.\nservices/{service}/{collection id}/{resource id}\n{collection id} is the cloud resource collection type representing the\nservice consumer, for example 'projects', or 'organizations'.\n{resource id} is the consumer numeric id, such as project number: '123456'.\n{service} the name of a service, for example 'service.googleapis.com'.",
// "location": "path",
// "pattern": "^services/[^/]+/[^/]+/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+parent}/tenancyUnits",
// "response": {
// "$ref": "ListTenancyUnitsResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ServicesTenancyUnitsListCall) Pages(ctx context.Context, f func(*ListTenancyUnitsResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
// method id "serviceconsumermanagement.services.tenancyUnits.removeProject":
type ServicesTenancyUnitsRemoveProjectCall struct {
s *APIService
name string
removetenantprojectrequest *RemoveTenantProjectRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// RemoveProject: Removes specified project resource identified by
// tenant resource tag.
// It will remove project lien with 'TenantManager' origin if that was
// added.
// It will then attempt to delete the project.
// If that operation fails, this method fails.
// Operation<response: Empty>.
func (r *ServicesTenancyUnitsService) RemoveProject(name string, removetenantprojectrequest *RemoveTenantProjectRequest) *ServicesTenancyUnitsRemoveProjectCall {
c := &ServicesTenancyUnitsRemoveProjectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.removetenantprojectrequest = removetenantprojectrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *ServicesTenancyUnitsRemoveProjectCall) Fields(s ...googleapi.Field) *ServicesTenancyUnitsRemoveProjectCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *ServicesTenancyUnitsRemoveProjectCall) Context(ctx context.Context) *ServicesTenancyUnitsRemoveProjectCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *ServicesTenancyUnitsRemoveProjectCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ServicesTenancyUnitsRemoveProjectCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetenantprojectrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:removeProject")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "serviceconsumermanagement.services.tenancyUnits.removeProject" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *ServicesTenancyUnitsRemoveProjectCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Removes specified project resource identified by tenant resource tag.\nIt will remove project lien with 'TenantManager' origin if that was added.\nIt will then attempt to delete the project.\nIf that operation fails, this method fails.\nOperation\u003cresponse: Empty\u003e.",
// "flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:removeProject",
// "httpMethod": "POST",
// "id": "serviceconsumermanagement.services.tenancyUnits.removeProject",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "Name of the tenancy unit.\nSuch as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.",
// "location": "path",
// "pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+name}:removeProject",
// "request": {
// "$ref": "RemoveTenantProjectRequest"
// },
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
| skuid/helm-value-store | vendor/google.golang.org/api/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go | GO | mit | 236,387 |
<div class="its container">
<its-breadcrumb breadcrumbs="home" active="Contact"></its-breadcrumb>
<div class="row">
<div class="col-lg-8 map-container">
<iframe width="100%" height="400px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" allowfullscreen src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2955.041765749127!2d-88.25407838441073!3d42.21355197919702!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x880f0caf5b80b131%3A0x9f38d11319c5f727!2s500+Cary+Algonquin+Rd%2C+Cary%2C+IL+60013!5e0!3m2!1sen!2sus!4v1489723440333"></iframe>
</div>
<div class="col-lg-4">
<h3>{{ 'contact.details' | translate }}</h3>
<p>
{{ (dataService.observableDataMap.get('contact') | async)?.address }}
<br>{{ (dataService.observableDataMap.get('contact') | async)?.city }}, {{ (dataService.observableDataMap.get('contact') | async)?.state }} {{ (dataService.observableDataMap.get('contact') | async)?.zip }}
<br>
</p>
<p [innerHTML]="(dataService.observableDataMap.get('contact') | async)?.phone"></p>
<p [innerHTML]="(dataService.observableDataMap.get('contact') | async)?.email"></p>
<p [innerHTML]="(dataService.observableDataMap.get('contact') | async)?.hours"></p>
</div>
</div>
<hr/>
<div class="alert alert-success alert-dismissible" role="alert" *ngIf="notification === 'welcome'">
{{ 'contact.notification.welcome' | translate }}
</div>
<div class="alert alert-success alert-dismissible" role="alert" *ngIf="notification === 'success'">
<p [innerHTML]="'contact.notification.success' | translate"></p>
</div>
<div class="alert alert-danger alert-dismissible" role="alert" *ngIf="notification === 'error'">
<p [innerHTML]="'contact.notification.error' | translate"></p>
</div>
<div id="message" class="row">
<div class="col-lg-8">
<h3>{{ 'contact.message' | translate }}</h3>
<form id="contactForm" name="sendMessage" [formGroup]="form" (ngSubmit)="submitForm(form.value)" novalidate>
<div class="control-group form-group" [ngClass]="{ 'has-success': form.controls['name'].valid, 'has-danger': !form.controls['name'].valid && form.controls['name'].touched }">
<div class="controls">
<label>{{ 'contact.form.name.label' | translate }}</label>
<input type="text" class="form-control" id="name" name="name" [formControl]="form.controls['name']" [ngClass]="{ 'form-control-success': form.controls['name'].valid, 'form-control-danger': !form.controls['name'].valid }">
<small class="form-text text-muted">{{ 'contact.form.name.help' | translate }}</small>
<div class="form-control-feedback" *ngIf="form.controls['name'].hasError('required') && form.controls['name'].touched">{{ 'contact.form.name.validation.required' | translate }}</div>
<div class="form-control-feedback" *ngIf="form.controls['name'].hasError('minlength') && form.controls['name'].touched">{{ 'contact.form.name.validation.minLength' | translate }}</div>
<div class="form-control-feedback" *ngIf="form.controls['name'].hasError('maxlength') && form.controls['name'].touched">{{ 'contact.form.name.validation.maxLength' | translate }}</div>
</div>
</div>
<div class="control-group form-group" [ngClass]="{ 'has-success': form.controls['phone'].valid, 'has-danger': !form.controls['phone'].valid && form.controls['phone'].touched }">
<div class="controls">
<label>{{ 'contact.form.phone.label' | translate }}</label>
<input type="tel" class="form-control" id="phone" name="phone" [formControl]="form.controls['phone']" [ngClass]="{ 'form-control-success': form.controls['phone'].valid, 'form-control-danger': !form.controls['phone'].valid }">
<div class="form-control-feedback" *ngIf="form.controls['phone'].hasError('required') && form.controls['phone'].touched">{{ 'contact.form.phone.validation.required' | translate }}</div>
<div class="form-control-feedback" *ngIf="form.controls['phone'].hasError('pattern') && form.controls['phone'].touched">{{ 'contact.form.phone.validation.pattern' | translate }}</div>
</div>
</div>
<div class="control-group form-group" [ngClass]="{ 'has-success': form.controls['email'].valid, 'has-danger': !form.controls['email'].valid && form.controls['email'].touched }">
<div class="controls">
<label>{{ 'contact.form.email.label' | translate }}</label>
<input type="email" class="form-control" id="email" name="email" [formControl]="form.controls['email']" [ngClass]="{ 'form-control-success': form.controls['email'].valid, 'form-control-danger': !form.controls['email'].valid }">
<div class="form-control-feedback" *ngIf="form.controls['email'].hasError('required') && form.controls['email'].touched">{{ 'contact.form.email.validation.required' | translate }}</div>
<div class="form-control-feedback" *ngIf="form.controls['email'].hasError('pattern') && form.controls['email'].touched">{{ 'contact.form.email.validation.pattern' | translate }}</div>
</div>
</div>
<div class="control-group form-group" [ngClass]="{ 'has-success': form.controls['message'].valid, 'has-danger': !form.controls['message'].valid && form.controls['message'].touched }">
<div class="controls">
<label>{{ 'contact.form.message.label' | translate }}</label>
<textarea rows="10" cols="100" class="its form-control" id="message" name="message" [formControl]="form.controls['message']" [ngClass]="{ 'form-control-success': form.controls['message'].valid, 'form-control-danger': !form.controls['message'].valid }" maxlength="999"></textarea>
<small class="form-text text-muted">{{ 'contact.form.message.help' | translate }}</small>
<div class="form-control-feedback" *ngIf="form.controls['message'].hasError('required') && form.controls['message'].touched">{{ 'contact.form.message.validation.required' | translate }}</div>
<div class="form-control-feedback" *ngIf="form.controls['message'].hasError('minlength') && form.controls['message'].touched">{{ 'contact.form.message.validation.minLength' | translate }}</div>
<div class="form-control-feedback" *ngIf="form.controls['message'].hasError('maxlength') && form.controls['message'].touched">{{ 'contact.form.message.validation.maxLength' | translate }}</div>
</div>
</div>
<div id="success"></div>
<button type="submit" class="btn btn-primary pull-right" [disabled]="!form.valid">{{ 'contact.form.submit' | translate }}</button>
</form>
</div>
</div>
</div>
| wellingWilliam/its-universal | src/app/contact/contact.component.html | HTML | mit | 6,754 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>测试页面_fis3 base</title>
<link rel="stylesheet" href="modules/css/common.scss">
<link rel="stylesheet" href="modules/css/test.less">
</head>
<body>
<div class="container">
<h1>测试页面</h1>
</div>
<script src="lib/mod.js"></script>
<script>
require.async('modules/app/test-npm.es');
</script>
</body>
</html>
| yanhaijing/fis3-base | test-npm.html | HTML | mit | 441 |
/**
* The MIT License
* Copyright (c) 2011 Kuali Mobility Team
*
* 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.
*/
package org.kuali.mobility.bus.dao.helper;
import java.io.InputStream;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.thoughtworks.xstream.XStream;
public class BusStopNameUtil {
public static Logger LOG = LoggerFactory.getLogger(BusStopNameUtil.class);
private String busStopNameMappingFile;
private List<UMBusStopName> busStopNames;
public BusStopNameUtil() {
}
@SuppressWarnings("unchecked")
public void loadStopNames() {
LOG.debug("Preparing to load bus stop name mappings from " + getBusStopNameMappingFile());
XStream xstream = new XStream();
xstream.processAnnotations(UMBusStopNames.class);
xstream.processAnnotations(UMBusStopName.class);
InputStream stream = this.getClass().getClassLoader().getResourceAsStream(getBusStopNameMappingFile());
UMBusStopNames stopnames = null;
try {
stopnames = (UMBusStopNames) xstream.fromXML(stream);
this.setBusStopNames(stopnames.getStopnames());
LOG.debug("Loaded " + getBusStopNames().size() + " bus stopnames ");
} catch (Exception e) {
LOG.error(e.getLocalizedMessage(), e);
}
}
public String updateBusStopName(String name) {
String stopName = new String();
if (null != name) {
for (UMBusStopName sn : this.getBusStopNames()) {
LOG.debug("N1 [" + sn.getName1() + "] N2 [" + sn.getName2() + "]");
if (sn.getName1().equalsIgnoreCase(name)) {
stopName = sn.getName2();
break;
} else {
stopName = name;
}
}
} else {
stopName = name;
}
return stopName;
}
public List<UMBusStopName> getBusStopNames() {
if (busStopNames == null || busStopNames.isEmpty()) {
LOG.debug("Bus Stop name mappings are not loaded. Attempting to load them.");
loadStopNames();
}
return busStopNames;
}
public void setBusStopNames(List<UMBusStopName> busStopNames) {
this.busStopNames = busStopNames;
}
/**
* @return the busStopNameMappingFile
*/
public String getBusStopNameMappingFile() {
return busStopNameMappingFile;
}
/**
* @param busStopNameMappingFile the busStopNameMappingFile to set
*/
public void setBusStopNameMappingFile(String mappingFile) {
this.busStopNameMappingFile = mappingFile;
}
}
| tamerman/mobile-starting-framework | bus/impl/src/main/java/org/kuali/mobility/bus/dao/helper/BusStopNameUtil.java | Java | mit | 3,351 |
<header>
<div class="header-content">
<div class="header-content-inner">
<form>
<input type="hidden" id="idea_id" value="<?php if(isset($ideagen)){ echo $ideagen->idea_id;}else{echo 0;}?>"/>
<div class="col-sm-4 text-center">
<img src = "<?php echo base_url();?>assets/img/ideagen.png" style = " width: 1000px; height: 550px; ">
<div class="col-md-2" style="position:absolute; right: 20px;
top: 1px; width: 350px; height: 100px;" >
<div class="form-group">
<label for="Idea Generation" data-toggle="tooltip" data-placement="bottom" title = "The process of constructing through the idea, innovating the concept, developing the process, and bringing the concept to reality."><font color="Black">
<h3><b>Idea Generation</b></h3></font></label>
</div>
</div>
<div class="col-md-5" style="position:absolute; left: 504px;
top: 68px; width: 500px; " >
<div class="form-group">
<label for="Problem" data-toggle="tooltip" data-placement="bottom" title = "What problem you have recognized needs solving?">
<font color="Black">Problem</font></label>
<textarea class="form-control" rows="9" id="problem" style = "resize: none;" placeholder="example"><?php if(isset($ideagen)){echo $ideagen->problem;}else{}?></textarea>
</div>
</div>
<div class=" col-md-5" style="position:absolute; left: 21px;
top: 68px; width: 500px;" >
<div class="form-group">
<label for="people" data-toggle="tooltip" data-placement="bottom" title = "Who are the people involved in the problem?">
<font color="Black">People</font></label>
<textarea class="form-control" rows="9" id="people" style = "resize: none;" placeholder ="Ex. Startup founder" disabled><?php if(isset($ideagen)){echo $ideagen->people;}?></textarea>
</div>
</div>
<div class=" col-md-5" style="position:absolute; left: 21px;
top: 305px; width: 500px; " >
<div class="form-group">
<label for="behavior" data-toggle="tooltip" data-placement="bottom" title = "What are the behavior of the people who encounter the problem?">
<font color="Black">Behavior</font></label>
<textarea class="form-control" rows="9" id="behavior" style = "resize: none;" placeholder="example" disabled><?php if(isset($ideagen)){echo $ideagen->behavior;}?></textarea>
</div>
</div>
<div class="col-md-5" style="position:absolute; left: 504px;
top: 305px; width: 500px; " >
<div class="form-group">
<label for="solution" data-toggle="tooltip" data-placement="bottom" title = "What belief must you have that can solve the problem?">
<font color="Black">Solution</font></label>
<textarea class="form-control" rows="9" id="solution" style = "resize: none;" placeholder="example" disabled><?php if(isset($ideagen)){echo $ideagen->solution;}?></textarea>
</div>
</div>
</div>
<div style="position:absolute; left: 85%;
top: 250px; width: 200px;">
<button type="button" style="color:black; width: 100px; height:50px; display:none;" id="ideagen">Next</button>
</div>
</div>
</form>
</div>
</div>
</header>
<script type="text/javascript">
window.onload = function (){
var people = $('#people').val();
var problem = $('#problem').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
if(people != ''){
$('#people').prop("disabled",false);
}
else if(behavior != ''){
$('#behavior').prop("disabled",false);
}
else if(solution != ''){
$('#solution').prop("disabled",false);
}
else if(people !='' && behavior != '' && solution != '' && problem !=''){
$('#ideagen').show();
}
};
$('#problem').focus();
$('#problem').on('change',function(){
if($('#idea_id').val() !=0 ){
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
var idea_id = $('#idea_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution,
'idea_id' : idea_id
};
var url = "<?php echo base_url();?>Web/updatePitchDeck/updateIdeaGen/";
$.post(url,{data:ideagen},function(result){
// console.log(result);
});
// window.location.href = "<?php echo base_url()?>Web/Web/create";
$('#people').prop("disabled",false);
$('#people').focus();
}
else{
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
// var idea_id = $('#ideagen_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution
};
var url = "<?php echo base_url();?>Web/PitchDeck/addIdeaGen";
$.post(url,{data:ideagen},function(result){
console.log(result);
});
window.location.href = "<?php echo base_url()?>Web/Web/create";
$('#people').prop("disabled",false);
$('#people').focus();
}
});
$('#people').on('change',function(){
if($('#idea_id').val() !=0 ){
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
var idea_id = $('#idea_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution,
'idea_id' : idea_id
};
var url = "<?php echo base_url();?>Web/updatePitchDeck/updateIdeaGen/";
$.post(url,{data:ideagen},function(result){
// console.log(result);
});
// window.location.href = "<?php echo base_url()?>Web/validationboard";
$('#behavior').prop("disabled",false);
$('#behavior').focus();
}
else{
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
// var idea_id = $('#ideagen_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution
};
var url = "<?php echo base_url();?>Web/PitchDeck/addIdeaGen";
$.post(url,{data:ideagen},function(result){
console.log(result);
});
//window.location.href = "<?php echo base_url()?>Web/validationboard";
$('#behavior').prop("disabled",false);
$('#behavior').focus();
}
});
$('#behavior').on('change',function(){
if($('#idea_id').val() !=0 ){
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
var idea_id = $('#idea_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution,
'idea_id' : idea_id
};
var url = "<?php echo base_url();?>Web/updatePitchDeck/updateIdeaGen/";
$.post(url,{data:ideagen},function(result){
// console.log(result);
});
// window.location.href = "<?php echo base_url()?>Web/validationboard";
$('#solution').prop("disabled",false);
$('#solution').focus();
}
else{
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
// var idea_id = $('#ideagen_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution
};
var url = "<?php echo base_url();?>Web/PitchDeck/addIdeaGen";
$.post(url,{data:ideagen},function(result){
console.log(result);
});
//window.location.href = "<?php echo base_url()?>Web/validationboard";
$('#solution').prop("disabled",false);
$('#solution').focus();
}
});
$('#solution').on('change',function(){
if($('#idea_id').val() !=0 ){
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
var idea_id = $('#idea_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution,
'idea_id' : idea_id
};
var url = "<?php echo base_url();?>Web/updatePitchDeck/updateIdeaGen/";
$.post(url,{data:ideagen},function(result){
// console.log(result);
});
// window.location.href = "<?php echo base_url()?>Web/create";
$('#ideagen').show();
}
else{
var problem = $('#problem').val();
var people = $('#people').val();
var behavior = $('#behavior').val();
var solution = $('#solution').val();
// var idea_id = $('#ideagen_id').val();
var ideagen = {
'problem': problem,
'people' : people,
'behavior':behavior,
'solution':solution
};
var url = "<?php echo base_url();?>Web/PitchDeck/addIdeaGen";
$.post(url,{data:ideagen},function(result){
console.log(result);
});
//window.location.href = "<?php echo base_url()?>Web/validationboard";
$('#ideagen').show();
$('#ideagen').focus();
}
});
</script>
| jLKisni/PitchItUp | application/modules/Web/views/create.php | PHP | mit | 11,677 |
#ifndef IS_SUBSEQUENCE_HPP_
#define IS_SUBSEQUENCE_HPP_
#include <string>
using namespace std;
class IsSubsequence {
public:
bool isSubsequence(string s, string t);
};
#endif // IS_SUBSEQUENCE_HPP_ | yanzhe-chen/leetcode | include/IsSubsequence.hpp | C++ | mit | 205 |
/*
This example reads from the default PCM device
and writes to standard output for 5 seconds of data.
To compile:
gcc recorder.c -o recorder -lasound
*/
/* Use the newer ALSA API */
#define ALSA_PCM_NEW_HW_PARAMS_API
#include <alsa/asoundlib.h>
int main() {
long loops;
int rc;
int size;
snd_pcm_t *handle;
snd_pcm_hw_params_t *params;
unsigned int val;
int dir;
snd_pcm_uframes_t frames;
char *buffer;
/* Open PCM device for recording (capture). */
rc = snd_pcm_open(&handle, "default",
SND_PCM_STREAM_CAPTURE, 0);
if (rc < 0) {
fprintf(stderr,
"unable to open pcm device: %s\n",
snd_strerror(rc));
exit(1);
}
/* Allocate a hardware parameters object. */
snd_pcm_hw_params_alloca(¶ms);
/* Fill it in with default values. */
snd_pcm_hw_params_any(handle, params);
/* Set the desired hardware parameters. */
/* Interleaved mode */
snd_pcm_hw_params_set_access(handle, params,
SND_PCM_ACCESS_RW_INTERLEAVED);
/* Signed 16-bit little-endian format */
snd_pcm_hw_params_set_format(handle, params,
SND_PCM_FORMAT_S16_LE);
/* Two channels (stereo) */
snd_pcm_hw_params_set_channels(handle, params, 2);
/* 44100 bits/second sampling rate (CD quality) */
val = 44100;
snd_pcm_hw_params_set_rate_near(handle, params,
&val, &dir);
/* Set period size to 32 frames. */
frames = 32;
snd_pcm_hw_params_set_period_size_near(handle,
params, &frames, &dir);
/* Write the parameters to the driver */
rc = snd_pcm_hw_params(handle, params);
if (rc < 0) {
fprintf(stderr,
"unable to set hw parameters: %s\n",
snd_strerror(rc));
exit(1);
}
/* Use a buffer large enough to hold one period */
snd_pcm_hw_params_get_period_size(params,
&frames, &dir);
size = frames * 4; /* 2 bytes/sample, 2 channels */
buffer = (char *) malloc(size);
/* We want to loop for 5 seconds */
snd_pcm_hw_params_get_period_time(params,
&val, &dir);
loops = 5000000 / val;
while (loops > 0) {
loops--;
rc = snd_pcm_readi(handle, buffer, frames);
if (rc == -EPIPE) {
/* EPIPE means overrun */
fprintf(stderr, "overrun occurred\n");
snd_pcm_prepare(handle);
} else if (rc < 0) {
fprintf(stderr,
"error from read: %s\n",
snd_strerror(rc));
} else if (rc != (int)frames) {
fprintf(stderr, "short read, read %d frames\n", rc);
}
rc = write(1, buffer, size);
if (rc != size)
fprintf(stderr,
"short write: wrote %d bytes\n", rc);
}
snd_pcm_drain(handle);
snd_pcm_close(handle);
free(buffer);
return 0;
}
| RTEP13/rtep-spectrum-analyser | project/source/software/alsa_test/recorder.c | C | mit | 2,859 |
---
uid: SolidEdgeFramework.RoutingSlip.ReturnWhenDone
summary:
remarks: If True, the document is returned to the originator. Once routing is in progress, the ReturnWhenDone property becomes read-only.
---
| SolidEdgeCommunity/docs | docfx_project/apidoc/SolidEdgeFramework.RoutingSlip.ReturnWhenDone.md | Markdown | mit | 210 |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<link rel="shortcut icon" type="image/x-icon" href="../../../../favicon.ico" />
<title>JarOutputStream - Android SDK | Android Developers</title>
<!-- STYLESHEETS -->
<link rel="stylesheet"
href="http://fonts.googleapis.com/css?family=Roboto+Condensed">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
title="roboto">
<link href="../../../../assets/css/default.css?v=7" rel="stylesheet" type="text/css">
<!-- FULLSCREEN STYLESHEET -->
<link href="../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen"
type="text/css">
<!-- JAVASCRIPT -->
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="../../../../assets/js/android_3p-bundle.js" type="text/javascript"></script>
<script type="text/javascript">
var toRoot = "../../../../";
var metaTags = [];
var devsite = false;
</script>
<script src="../../../../assets/js/docs.js?v=6" type="text/javascript"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-5831155-1', 'android.com');
ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker);
ga('send', 'pageview');
ga('universal.send', 'pageview'); // Send page view for new tracker.
</script>
</head>
<body class="gc-documentation
develop reference" itemscope itemtype="http://schema.org/Article">
<div id="doc-api-level" class="1" style="display:none"></div>
<a name="top"></a>
<a name="top"></a>
<!-- dialog to prompt lang pref change when loaded from hardcoded URL
<div id="langMessage" style="display:none">
<div>
<div class="lang en">
<p>You requested a page in English, would you like to proceed with this language setting?</p>
</div>
<div class="lang es">
<p>You requested a page in Spanish (Español), would you like to proceed with this language setting?</p>
</div>
<div class="lang ja">
<p>You requested a page in Japanese (日本語), would you like to proceed with this language setting?</p>
</div>
<div class="lang ko">
<p>You requested a page in Korean (한국어), would you like to proceed with this language setting?</p>
</div>
<div class="lang ru">
<p>You requested a page in Russian (Русский), would you like to proceed with this language setting?</p>
</div>
<div class="lang zh-cn">
<p>You requested a page in Simplified Chinese (简体中文), would you like to proceed with this language setting?</p>
</div>
<div class="lang zh-tw">
<p>You requested a page in Traditional Chinese (繁體中文), would you like to proceed with this language setting?</p>
</div>
<a href="#" class="button yes" onclick="return false;">
<span class="lang en">Yes</span>
<span class="lang es">Sí</span>
<span class="lang ja">Yes</span>
<span class="lang ko">Yes</span>
<span class="lang ru">Yes</span>
<span class="lang zh-cn">是的</span>
<span class="lang zh-tw">没有</span>
</a>
<a href="#" class="button" onclick="$('#langMessage').hide();return false;">
<span class="lang en">No</span>
<span class="lang es">No</span>
<span class="lang ja">No</span>
<span class="lang ko">No</span>
<span class="lang ru">No</span>
<span class="lang zh-cn">没有</span>
<span class="lang zh-tw">没有</span>
</a>
</div>
</div> -->
<!-- Header -->
<div id="header-wrapper">
<div class="dac-header" id="header">
<div class="dac-header-inner">
<a class="dac-nav-toggle" data-dac-toggle-nav href="javascript:;" title="Open navigation">
<span class="dac-nav-hamburger">
<span class="dac-nav-hamburger-top"></span>
<span class="dac-nav-hamburger-mid"></span>
<span class="dac-nav-hamburger-bot"></span>
</span>
</a>
<a class="dac-header-logo" href="../../../../index.html">
<img class="dac-header-logo-image" src="../../../../assets/images/android_logo.png"
srcset="../../../../assets/images/android_logo@2x.png 2x"
width="32" height="36" alt="Android" /> Developers
</a>
<ul class="dac-header-crumbs">
<li class="dac-header-crumbs-item"><span class="dac-header-crumbs-link current ">JarOutputStream - Android SDK</a></li>
</ul>
<div class="dac-header-search" id="search-container">
<div class="dac-header-search-inner">
<div class="dac-sprite dac-search dac-header-search-btn" id="search-btn"></div>
<form class="dac-header-search-form" onsubmit="return submit_search()">
<input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
onkeydown="return search_changed(event, true, '../../../../')"
onkeyup="return search_changed(event, false, '../../../../')"
class="dac-header-search-input" placeholder="Search" />
<a class="dac-header-search-close hide" id="search-close">close</a>
</form>
</div><!-- end dac-header-search-inner -->
</div><!-- end dac-header-search -->
<div class="search_filtered_wrapper">
<div class="suggest-card reference no-display">
<ul class="search_filtered">
</ul>
</div>
<div class="suggest-card develop no-display">
<ul class="search_filtered">
</ul>
<div class="child-card guides no-display">
</div>
<div class="child-card training no-display">
</div>
<div class="child-card samples no-display">
</div>
</div>
<div class="suggest-card design no-display">
<ul class="search_filtered">
</ul>
</div>
<div class="suggest-card distribute no-display">
<ul class="search_filtered">
</ul>
</div>
</div>
<a class="dac-header-console-btn" href="https://play.google.com/apps/publish/">
<span class="dac-sprite dac-google-play"></span>
<span class="dac-visible-desktop-inline">Developer</span>
Console
</a>
</div><!-- end header-wrap.wrap -->
</div><!-- end header -->
<div id="searchResults" class="wrap" style="display:none;">
<h2 id="searchTitle">Results</h2>
<div id="leftSearchControl" class="search-control">Loading...</div>
</div>
</div> <!--end header-wrapper -->
<!-- Navigation-->
<nav class="dac-nav">
<div class="dac-nav-dimmer" data-dac-toggle-nav></div>
<ul class="dac-nav-list" data-dac-nav>
<li class="dac-nav-item dac-nav-head">
<a class="dac-nav-link dac-nav-logo" data-dac-toggle-nav href="javascript:;" title="Close navigation">
<img class="dac-logo-image" src="../../../../assets/images/android_logo.png"
srcset="../../../../assets/images/android_logo@2x.png 2x"
width="32" height="36" alt="Android" /> Developers
</a>
</li>
<li class="dac-nav-item home">
<a class="dac-nav-link dac-visible-mobile-block" href="../../../../index.html">Home</a>
<ul class="dac-nav-secondary about">
<li class="dac-nav-item about">
<a class="dac-nav-link" href="../../../../about/index.html">Android</a>
</li>
<li class="dac-nav-item wear">
<a class="dac-nav-link" href="../../../../wear/index.html">Wear</a>
</li>
<li class="dac-nav-item tv">
<a class="dac-nav-link" href="../../../../tv/index.html">TV</a>
</li>
<li class="dac-nav-item auto">
<a class="dac-nav-link" href="../../../../auto/index.html">Auto</a>
</li>
</ul>
</li>
<li class="dac-nav-item design">
<a class="dac-nav-link" href="../../../../design/index.html"
zh-tw-lang="設計"
zh-cn-lang="设计"
ru-lang="Проектирование"
ko-lang="디자인"
ja-lang="設計"
es-lang="Diseñar">Design</a>
</li>
<li class="dac-nav-item develop">
<a class="dac-nav-link" href="../../../../develop/index.html"
zh-tw-lang="開發"
zh-cn-lang="开发"
ru-lang="Разработка"
ko-lang="개발"
ja-lang="開発"
es-lang="Desarrollar">Develop</a>
<ul class="dac-nav-secondary develop">
<li class="dac-nav-item training">
<a class="dac-nav-link" href="../../../../training/index.html"
zh-tw-lang="訓練課程"
zh-cn-lang="培训"
ru-lang="Курсы"
ko-lang="교육"
ja-lang="トレーニング"
es-lang="Capacitación">Training</a>
</li>
<li class="dac-nav-item guide">
<a class="dac-nav-link" href="../../../../guide/index.html"
zh-tw-lang="API 指南"
zh-cn-lang="API 指南"
ru-lang="Руководства по API"
ko-lang="API 가이드"
ja-lang="API ガイド"
es-lang="Guías de la API">API Guides</a>
</li>
<li class="dac-nav-item reference">
<a class="dac-nav-link" href="../../../../reference/packages.html"
zh-tw-lang="參考資源"
zh-cn-lang="参考"
ru-lang="Справочник"
ko-lang="참조문서"
ja-lang="リファレンス"
es-lang="Referencia">Reference</a>
</li>
<li class="dac-nav-item tools">
<a class="dac-nav-link" href="../../../../sdk/index.html"
zh-tw-lang="相關工具"
zh-cn-lang="工具"
ru-lang="Инструменты"
ko-lang="도구"
ja-lang="ツール"
es-lang="Herramientas">Tools</a></li>
<li class="dac-nav-item google">
<a class="dac-nav-link" href="../../../../google/index.html">Google Services</a>
</li>
<li class="dac-nav-item preview">
<a class="dac-nav-link" href="../../../../preview/index.html">Preview</a>
</li>
</ul>
</li>
<li class="dac-nav-item distribute">
<a class="dac-nav-link" href="../../../../distribute/googleplay/index.html"
zh-tw-lang="發佈"
zh-cn-lang="分发"
ru-lang="Распространение"
ko-lang="배포"
ja-lang="配布"
es-lang="Distribuir">Distribute</a>
<ul class="dac-nav-secondary distribute">
<li class="dac-nav-item googleplay">
<a class="dac-nav-link" href="../../../../distribute/googleplay/index.html">Google Play</a></li>
<li class="dac-nav-item essentials">
<a class="dac-nav-link" href="../../../../distribute/essentials/index.html">Essentials</a></li>
<li class="dac-nav-item users">
<a class="dac-nav-link" href="../../../../distribute/users/index.html">Get Users</a></li>
<li class="dac-nav-item engage">
<a class="dac-nav-link" href="../../../../distribute/engage/index.html">Engage & Retain</a></li>
<li class="dac-nav-item monetize">
<a class="dac-nav-link" href="../../../../distribute/monetize/index.html">Earn</a>
</li>
<li class="dac-nav-item analyze">
<a class="dac-nav-link" href="../../../../distribute/analyze/index.html">Analyze</a>
</li>
<li class="dac-nav-item stories">
<a class="dac-nav-link" href="../../../../distribute/stories/index.html">Stories</a>
</li>
</ul>
</li>
</ul>
</nav>
<!-- end navigation-->
<div class="wrap clearfix" id="body-content"><div class="cols">
<div class="col-4 dac-hidden-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
<div id="devdoc-nav">
<div id="api-nav-header">
<div id="api-level-toggle">
<label for="apiLevelCheckbox" class="disabled"
title="Select your target API level to dim unavailable APIs">API level: </label>
<div class="select-wrapper">
<select id="apiLevelSelector">
<!-- option elements added by buildApiLevelSelector() -->
</select>
</div>
</div><!-- end toggle -->
<div id="api-nav-title">Android APIs</div>
</div><!-- end nav header -->
<script>
var SINCE_DATA = [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23' ];
buildApiLevelSelector();
</script>
<div id="swapper">
<div id="nav-panels">
<div id="resize-packages-nav">
<div id="packages-nav" class="scroll-pane">
<ul>
<li class="api apilevel-1">
<a href="../../../../reference/android/package-summary.html">android</a></li>
<li class="api apilevel-4">
<a href="../../../../reference/android/accessibilityservice/package-summary.html">android.accessibilityservice</a></li>
<li class="api apilevel-5">
<a href="../../../../reference/android/accounts/package-summary.html">android.accounts</a></li>
<li class="api apilevel-11">
<a href="../../../../reference/android/animation/package-summary.html">android.animation</a></li>
<li class="api apilevel-16">
<a href="../../../../reference/android/annotation/package-summary.html">android.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/app/package-summary.html">android.app</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/android/app/admin/package-summary.html">android.app.admin</a></li>
<li class="api apilevel-23">
<a href="../../../../reference/android/app/assist/package-summary.html">android.app.assist</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/android/app/backup/package-summary.html">android.app.backup</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/app/job/package-summary.html">android.app.job</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/app/usage/package-summary.html">android.app.usage</a></li>
<li class="api apilevel-3">
<a href="../../../../reference/android/appwidget/package-summary.html">android.appwidget</a></li>
<li class="api apilevel-5">
<a href="../../../../reference/android/bluetooth/package-summary.html">android.bluetooth</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/bluetooth/le/package-summary.html">android.bluetooth.le</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/content/package-summary.html">android.content</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/content/pm/package-summary.html">android.content.pm</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/content/res/package-summary.html">android.content.res</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/database/package-summary.html">android.database</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/database/sqlite/package-summary.html">android.database.sqlite</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/databinding/package-summary.html">android.databinding</a></li>
<li class="api apilevel-11">
<a href="../../../../reference/android/drm/package-summary.html">android.drm</a></li>
<li class="api apilevel-4">
<a href="../../../../reference/android/gesture/package-summary.html">android.gesture</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/graphics/package-summary.html">android.graphics</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/graphics/drawable/package-summary.html">android.graphics.drawable</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/graphics/drawable/shapes/package-summary.html">android.graphics.drawable.shapes</a></li>
<li class="api apilevel-19">
<a href="../../../../reference/android/graphics/pdf/package-summary.html">android.graphics.pdf</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/hardware/package-summary.html">android.hardware</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/hardware/camera2/package-summary.html">android.hardware.camera2</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/hardware/camera2/params/package-summary.html">android.hardware.camera2.params</a></li>
<li class="api apilevel-17">
<a href="../../../../reference/android/hardware/display/package-summary.html">android.hardware.display</a></li>
<li class="api apilevel-23">
<a href="../../../../reference/android/hardware/fingerprint/package-summary.html">android.hardware.fingerprint</a></li>
<li class="api apilevel-16">
<a href="../../../../reference/android/hardware/input/package-summary.html">android.hardware.input</a></li>
<li class="api apilevel-12">
<a href="../../../../reference/android/hardware/usb/package-summary.html">android.hardware.usb</a></li>
<li class="api apilevel-3">
<a href="../../../../reference/android/inputmethodservice/package-summary.html">android.inputmethodservice</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/location/package-summary.html">android.location</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/media/package-summary.html">android.media</a></li>
<li class="api apilevel-9">
<a href="../../../../reference/android/media/audiofx/package-summary.html">android.media.audiofx</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/media/browse/package-summary.html">android.media.browse</a></li>
<li class="api apilevel-14">
<a href="../../../../reference/android/media/effect/package-summary.html">android.media.effect</a></li>
<li class="api apilevel-23">
<a href="../../../../reference/android/media/midi/package-summary.html">android.media.midi</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/media/projection/package-summary.html">android.media.projection</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/media/session/package-summary.html">android.media.session</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/media/tv/package-summary.html">android.media.tv</a></li>
<li class="api apilevel-12">
<a href="../../../../reference/android/mtp/package-summary.html">android.mtp</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/net/package-summary.html">android.net</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/net/http/package-summary.html">android.net.http</a></li>
<li class="api apilevel-16">
<a href="../../../../reference/android/net/nsd/package-summary.html">android.net.nsd</a></li>
<li class="api apilevel-12">
<a href="../../../../reference/android/net/rtp/package-summary.html">android.net.rtp</a></li>
<li class="api apilevel-9">
<a href="../../../../reference/android/net/sip/package-summary.html">android.net.sip</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/net/wifi/package-summary.html">android.net.wifi</a></li>
<li class="api apilevel-14">
<a href="../../../../reference/android/net/wifi/p2p/package-summary.html">android.net.wifi.p2p</a></li>
<li class="api apilevel-16">
<a href="../../../../reference/android/net/wifi/p2p/nsd/package-summary.html">android.net.wifi.p2p.nsd</a></li>
<li class="api apilevel-9">
<a href="../../../../reference/android/nfc/package-summary.html">android.nfc</a></li>
<li class="api apilevel-19">
<a href="../../../../reference/android/nfc/cardemulation/package-summary.html">android.nfc.cardemulation</a></li>
<li class="api apilevel-10">
<a href="../../../../reference/android/nfc/tech/package-summary.html">android.nfc.tech</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/opengl/package-summary.html">android.opengl</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/os/package-summary.html">android.os</a></li>
<li class="api apilevel-9">
<a href="../../../../reference/android/os/storage/package-summary.html">android.os.storage</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/preference/package-summary.html">android.preference</a></li>
<li class="api apilevel-19">
<a href="../../../../reference/android/print/package-summary.html">android.print</a></li>
<li class="api apilevel-19">
<a href="../../../../reference/android/print/pdf/package-summary.html">android.print.pdf</a></li>
<li class="api apilevel-19">
<a href="../../../../reference/android/printservice/package-summary.html">android.printservice</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/provider/package-summary.html">android.provider</a></li>
<li class="api apilevel-11">
<a href="../../../../reference/android/renderscript/package-summary.html">android.renderscript</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/sax/package-summary.html">android.sax</a></li>
<li class="api apilevel-14">
<a href="../../../../reference/android/security/package-summary.html">android.security</a></li>
<li class="api apilevel-23">
<a href="../../../../reference/android/security/keystore/package-summary.html">android.security.keystore</a></li>
<li class="api apilevel-22">
<a href="../../../../reference/android/service/carrier/package-summary.html">android.service.carrier</a></li>
<li class="api apilevel-23">
<a href="../../../../reference/android/service/chooser/package-summary.html">android.service.chooser</a></li>
<li class="api apilevel-17">
<a href="../../../../reference/android/service/dreams/package-summary.html">android.service.dreams</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/service/media/package-summary.html">android.service.media</a></li>
<li class="api apilevel-18">
<a href="../../../../reference/android/service/notification/package-summary.html">android.service.notification</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/service/restrictions/package-summary.html">android.service.restrictions</a></li>
<li class="api apilevel-14">
<a href="../../../../reference/android/service/textservice/package-summary.html">android.service.textservice</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/service/voice/package-summary.html">android.service.voice</a></li>
<li class="api apilevel-7">
<a href="../../../../reference/android/service/wallpaper/package-summary.html">android.service.wallpaper</a></li>
<li class="api apilevel-3">
<a href="../../../../reference/android/speech/package-summary.html">android.speech</a></li>
<li class="api apilevel-4">
<a href="../../../../reference/android/speech/tts/package-summary.html">android.speech.tts</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/annotation/package-summary.html">android.support.annotation</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/app/recommendation/package-summary.html">android.support.app.recommendation</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/customtabs/package-summary.html">android.support.customtabs</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/design/package-summary.html">android.support.design</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/design/widget/package-summary.html">android.support.design.widget</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/multidex/package-summary.html">android.support.multidex</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/percent/package-summary.html">android.support.percent</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v13/app/package-summary.html">android.support.v13.app</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v14/preference/package-summary.html">android.support.v14.preference</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v17/leanback/package-summary.html">android.support.v17.leanback</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v17/leanback/app/package-summary.html">android.support.v17.leanback.app</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v17/leanback/database/package-summary.html">android.support.v17.leanback.database</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v17/leanback/graphics/package-summary.html">android.support.v17.leanback.graphics</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v17/leanback/system/package-summary.html">android.support.v17.leanback.system</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v17/leanback/widget/package-summary.html">android.support.v17.leanback.widget</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v17/preference/package-summary.html">android.support.v17.preference</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/accessibilityservice/package-summary.html">android.support.v4.accessibilityservice</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/animation/package-summary.html">android.support.v4.animation</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/app/package-summary.html">android.support.v4.app</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/content/package-summary.html">android.support.v4.content</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/content/pm/package-summary.html">android.support.v4.content.pm</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/content/res/package-summary.html">android.support.v4.content.res</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/database/package-summary.html">android.support.v4.database</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/graphics/package-summary.html">android.support.v4.graphics</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/graphics/drawable/package-summary.html">android.support.v4.graphics.drawable</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/hardware/display/package-summary.html">android.support.v4.hardware.display</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/hardware/fingerprint/package-summary.html">android.support.v4.hardware.fingerprint</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/media/package-summary.html">android.support.v4.media</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/media/session/package-summary.html">android.support.v4.media.session</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/net/package-summary.html">android.support.v4.net</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/os/package-summary.html">android.support.v4.os</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/print/package-summary.html">android.support.v4.print</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/provider/package-summary.html">android.support.v4.provider</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/text/package-summary.html">android.support.v4.text</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/util/package-summary.html">android.support.v4.util</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/view/package-summary.html">android.support.v4.view</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/view/accessibility/package-summary.html">android.support.v4.view.accessibility</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/view/animation/package-summary.html">android.support.v4.view.animation</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v4/widget/package-summary.html">android.support.v4.widget</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/app/package-summary.html">android.support.v7.app</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/appcompat/package-summary.html">android.support.v7.appcompat</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/cardview/package-summary.html">android.support.v7.cardview</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/graphics/package-summary.html">android.support.v7.graphics</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/graphics/drawable/package-summary.html">android.support.v7.graphics.drawable</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/gridlayout/package-summary.html">android.support.v7.gridlayout</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/media/package-summary.html">android.support.v7.media</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/mediarouter/package-summary.html">android.support.v7.mediarouter</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/preference/package-summary.html">android.support.v7.preference</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/recyclerview/package-summary.html">android.support.v7.recyclerview</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/util/package-summary.html">android.support.v7.util</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/view/package-summary.html">android.support.v7.view</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/widget/package-summary.html">android.support.v7.widget</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/widget/helper/package-summary.html">android.support.v7.widget.helper</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v7/widget/util/package-summary.html">android.support.v7.widget.util</a></li>
<li class="api apilevel-">
<a href="../../../../reference/android/support/v8/renderscript/package-summary.html">android.support.v8.renderscript</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/system/package-summary.html">android.system</a></li>
<li class="api apilevel-21">
<a href="../../../../reference/android/telecom/package-summary.html">android.telecom</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/telephony/package-summary.html">android.telephony</a></li>
<li class="api apilevel-5">
<a href="../../../../reference/android/telephony/cdma/package-summary.html">android.telephony.cdma</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/telephony/gsm/package-summary.html">android.telephony.gsm</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/test/package-summary.html">android.test</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/test/mock/package-summary.html">android.test.mock</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/test/suitebuilder/package-summary.html">android.test.suitebuilder</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/test/suitebuilder/annotation/package-summary.html">android.test.suitebuilder.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/text/package-summary.html">android.text</a></li>
<li class="api apilevel-3">
<a href="../../../../reference/android/text/format/package-summary.html">android.text.format</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/text/method/package-summary.html">android.text.method</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/text/style/package-summary.html">android.text.style</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/text/util/package-summary.html">android.text.util</a></li>
<li class="api apilevel-19">
<a href="../../../../reference/android/transition/package-summary.html">android.transition</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/util/package-summary.html">android.util</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/view/package-summary.html">android.view</a></li>
<li class="api apilevel-4">
<a href="../../../../reference/android/view/accessibility/package-summary.html">android.view.accessibility</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/view/animation/package-summary.html">android.view.animation</a></li>
<li class="api apilevel-3">
<a href="../../../../reference/android/view/inputmethod/package-summary.html">android.view.inputmethod</a></li>
<li class="api apilevel-14">
<a href="../../../../reference/android/view/textservice/package-summary.html">android.view.textservice</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/webkit/package-summary.html">android.webkit</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/android/widget/package-summary.html">android.widget</a></li>
<li class="api apilevel-">
<a href="../../../../reference/com/android/internal/backup/package-summary.html">com.android.internal.backup</a></li>
<li class="api apilevel-">
<a href="../../../../reference/com/android/internal/logging/package-summary.html">com.android.internal.logging</a></li>
<li class="api apilevel-">
<a href="../../../../reference/com/android/internal/os/package-summary.html">com.android.internal.os</a></li>
<li class="api apilevel-">
<a href="../../../../reference/com/android/internal/statusbar/package-summary.html">com.android.internal.statusbar</a></li>
<li class="api apilevel-">
<a href="../../../../reference/com/android/internal/widget/package-summary.html">com.android.internal.widget</a></li>
<li class="api apilevel-">
<a href="../../../../reference/com/android/test/runner/package-summary.html">com.android.test.runner</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/dalvik/annotation/package-summary.html">dalvik.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/dalvik/bytecode/package-summary.html">dalvik.bytecode</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/dalvik/system/package-summary.html">dalvik.system</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/awt/font/package-summary.html">java.awt.font</a></li>
<li class="api apilevel-3">
<a href="../../../../reference/java/beans/package-summary.html">java.beans</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/io/package-summary.html">java.io</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/lang/package-summary.html">java.lang</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/lang/annotation/package-summary.html">java.lang.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/lang/ref/package-summary.html">java.lang.ref</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/lang/reflect/package-summary.html">java.lang.reflect</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/math/package-summary.html">java.math</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/net/package-summary.html">java.net</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/nio/package-summary.html">java.nio</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/nio/channels/package-summary.html">java.nio.channels</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/nio/channels/spi/package-summary.html">java.nio.channels.spi</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/nio/charset/package-summary.html">java.nio.charset</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/nio/charset/spi/package-summary.html">java.nio.charset.spi</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/security/package-summary.html">java.security</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/security/acl/package-summary.html">java.security.acl</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/security/cert/package-summary.html">java.security.cert</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/security/interfaces/package-summary.html">java.security.interfaces</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/security/spec/package-summary.html">java.security.spec</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/sql/package-summary.html">java.sql</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/text/package-summary.html">java.text</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/package-summary.html">java.util</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/concurrent/package-summary.html">java.util.concurrent</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/concurrent/atomic/package-summary.html">java.util.concurrent.atomic</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/concurrent/locks/package-summary.html">java.util.concurrent.locks</a></li>
<li class="selected api apilevel-1">
<a href="../../../../reference/java/util/jar/package-summary.html">java.util.jar</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/logging/package-summary.html">java.util.logging</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/prefs/package-summary.html">java.util.prefs</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/regex/package-summary.html">java.util.regex</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/java/util/zip/package-summary.html">java.util.zip</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/crypto/package-summary.html">javax.crypto</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/crypto/interfaces/package-summary.html">javax.crypto.interfaces</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/crypto/spec/package-summary.html">javax.crypto.spec</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/microedition/khronos/egl/package-summary.html">javax.microedition.khronos.egl</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/microedition/khronos/opengles/package-summary.html">javax.microedition.khronos.opengles</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/net/package-summary.html">javax.net</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/net/ssl/package-summary.html">javax.net.ssl</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/security/auth/package-summary.html">javax.security.auth</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/security/auth/callback/package-summary.html">javax.security.auth.callback</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/security/auth/login/package-summary.html">javax.security.auth.login</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/security/auth/x500/package-summary.html">javax.security.auth.x500</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/security/cert/package-summary.html">javax.security.cert</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/sql/package-summary.html">javax.sql</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/xml/package-summary.html">javax.xml</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/datatype/package-summary.html">javax.xml.datatype</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/namespace/package-summary.html">javax.xml.namespace</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/javax/xml/parsers/package-summary.html">javax.xml.parsers</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/transform/package-summary.html">javax.xml.transform</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/transform/dom/package-summary.html">javax.xml.transform.dom</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/transform/sax/package-summary.html">javax.xml.transform.sax</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/transform/stream/package-summary.html">javax.xml.transform.stream</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/validation/package-summary.html">javax.xml.validation</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/javax/xml/xpath/package-summary.html">javax.xml.xpath</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/junit/framework/package-summary.html">junit.framework</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/junit/runner/package-summary.html">junit.runner</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/apache/http/conn/package-summary.html">org.apache.http.conn</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/apache/http/conn/scheme/package-summary.html">org.apache.http.conn.scheme</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/apache/http/conn/ssl/package-summary.html">org.apache.http.conn.ssl</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/apache/http/params/package-summary.html">org.apache.http.params</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/json/package-summary.html">org.json</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/w3c/dom/package-summary.html">org.w3c.dom</a></li>
<li class="api apilevel-8">
<a href="../../../../reference/org/w3c/dom/ls/package-summary.html">org.w3c.dom.ls</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/xml/sax/package-summary.html">org.xml.sax</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/xml/sax/ext/package-summary.html">org.xml.sax.ext</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/xml/sax/helpers/package-summary.html">org.xml.sax.helpers</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/xmlpull/v1/package-summary.html">org.xmlpull.v1</a></li>
<li class="api apilevel-1">
<a href="../../../../reference/org/xmlpull/v1/sax2/package-summary.html">org.xmlpull.v1.sax2</a></li>
</ul><br/>
</div> <!-- end packages-nav -->
</div> <!-- end resize-packages -->
<div id="classes-nav" class="scroll-pane">
<ul>
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/Pack200.Packer.html">Pack200.Packer</a></li>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/Pack200.Unpacker.html">Pack200.Unpacker</a></li>
</ul>
</li>
<li><h2>Classes</h2>
<ul>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/Attributes.html">Attributes</a></li>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/Attributes.Name.html">Attributes.Name</a></li>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/JarEntry.html">JarEntry</a></li>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/JarFile.html">JarFile</a></li>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/JarInputStream.html">JarInputStream</a></li>
<li class="selected api apilevel-1"><a href="../../../../reference/java/util/jar/JarOutputStream.html">JarOutputStream</a></li>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/Manifest.html">Manifest</a></li>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/Pack200.html">Pack200</a></li>
</ul>
</li>
<li><h2>Exceptions</h2>
<ul>
<li class="api apilevel-1"><a href="../../../../reference/java/util/jar/JarException.html">JarException</a></li>
</ul>
</li>
</ul><br/>
</div><!-- end classes -->
</div><!-- end nav-panels -->
<div id="nav-tree" style="display:none" class="scroll-pane">
<div id="tree-list"></div>
</div><!-- end nav-tree -->
</div><!-- end swapper -->
<div id="nav-swap">
<a class="fullscreen">fullscreen</a>
<a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>
</div>
</div> <!-- end devdoc-nav -->
</div> <!-- end side-nav -->
<script type="text/javascript">
// init fullscreen based on user pref
var fullscreen = readCookie("fullscreen");
if (fullscreen != 0) {
if (fullscreen == "false") {
toggleFullscreen(false);
} else {
toggleFullscreen(true);
}
}
// init nav version for mobile
if (isMobile) {
swapNav(); // tree view should be used on mobile
$('#nav-swap').hide();
} else {
chooseDefaultNav();
if ($("#nav-tree").is(':visible')) {
init_default_navtree("../../../../");
}
}
// scroll the selected page into view
$(document).ready(function() {
scrollIntoView("packages-nav");
scrollIntoView("classes-nav");
});
</script>
<div class="col-12" id="doc-col">
<div id="api-info-block">
<div class="sum-details-links">
Summary:
<a href="#inhconstants">Inherited Constants</a>
| <a href="#inhfields">Inherited Fields</a>
| <a href="#pubctors">Ctors</a>
| <a href="#pubmethods">Methods</a>
| <a href="#inhmethods">Inherited Methods</a>
| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
</div><!-- end sum-details-links -->
<div class="api-level">
Added in <a href="../../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a>
</div>
</div><!-- end api-info-block -->
<!-- ======== START OF CLASS DATA ======== -->
<div id="jd-header">
public
class
<h1 itemprop="name">JarOutputStream</h1>
extends <a href="../../../../reference/java/util/zip/ZipOutputStream.html">ZipOutputStream</a><br/>
</div><!-- end header -->
<div id="naMessage"></div>
<div id="jd-content" class="api apilevel-1">
<table class="jd-inheritance-table">
<tr>
<td colspan="6" class="jd-inheritance-class-cell"><a href="../../../../reference/java/lang/Object.html">java.lang.Object</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="5" class="jd-inheritance-class-cell"><a href="../../../../reference/java/io/OutputStream.html">java.io.OutputStream</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="4" class="jd-inheritance-class-cell"><a href="../../../../reference/java/io/FilterOutputStream.html">java.io.FilterOutputStream</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="3" class="jd-inheritance-class-cell"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html">java.util.zip.DeflaterOutputStream</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="2" class="jd-inheritance-class-cell"><a href="../../../../reference/java/util/zip/ZipOutputStream.html">java.util.zip.ZipOutputStream</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="1" class="jd-inheritance-class-cell">java.util.jar.JarOutputStream</td>
</tr>
</table>
<div class="jd-descr">
<h2>Class Overview</h2>
<p itemprop="articleBody">The <code>JarOutputStream</code> is used to write data in the <code>JarFile</code>
format to an arbitrary output stream
</p>
</div><!-- jd-descr -->
<div class="jd-descr">
<h2>Summary</h2>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<table id="inhconstants" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Constants</div></th></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-java.util.zip.ZipOutputStream" class="jd-expando-trigger closed"
><img id="inherited-constants-java.util.zip.ZipOutputStream-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From class
<a href="../../../../reference/java/util/zip/ZipOutputStream.html">java.util.zip.ZipOutputStream</a>
<div id="inherited-constants-java.util.zip.ZipOutputStream">
<div id="inherited-constants-java.util.zip.ZipOutputStream-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-constants-java.util.zip.ZipOutputStream-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENATT">CENATT</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENATX">CENATX</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENCOM">CENCOM</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENCRC">CENCRC</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENDSK">CENDSK</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENEXT">CENEXT</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENFLG">CENFLG</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENHDR">CENHDR</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENHOW">CENHOW</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENLEN">CENLEN</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENNAM">CENNAM</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENOFF">CENOFF</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENSIG">CENSIG</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENSIZ">CENSIZ</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENTIM">CENTIM</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENVEM">CENVEM</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#CENVER">CENVER</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#DEFLATED">DEFLATED</a></td>
<td class="jd-descrcol" width="100%">
Indicates deflated entries.
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#ENDCOM">ENDCOM</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#ENDHDR">ENDHDR</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#ENDOFF">ENDOFF</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#ENDSIG">ENDSIG</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#ENDSIZ">ENDSIZ</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#ENDSUB">ENDSUB</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#ENDTOT">ENDTOT</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#EXTCRC">EXTCRC</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#EXTHDR">EXTHDR</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#EXTLEN">EXTLEN</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#EXTSIG">EXTSIG</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#EXTSIZ">EXTSIZ</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCCRC">LOCCRC</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCEXT">LOCEXT</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCFLG">LOCFLG</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCHDR">LOCHDR</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCHOW">LOCHOW</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCLEN">LOCLEN</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCNAM">LOCNAM</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">long</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCSIG">LOCSIG</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCSIZ">LOCSIZ</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCTIM">LOCTIM</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class="alt-color api apilevel-21" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#LOCVER">LOCVER</a></td>
<td class="jd-descrcol" width="100%">
</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#STORED">STORED</a></td>
<td class="jd-descrcol" width="100%">
Indicates uncompressed entries.
</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
<!-- =========== FIELD SUMMARY =========== -->
<table id="inhfields" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Fields</div></th></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-fields-java.util.zip.DeflaterOutputStream" class="jd-expando-trigger closed"
><img id="inherited-fields-java.util.zip.DeflaterOutputStream-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From class
<a href="../../../../reference/java/util/zip/DeflaterOutputStream.html">java.util.zip.DeflaterOutputStream</a>
<div id="inherited-fields-java.util.zip.DeflaterOutputStream">
<div id="inherited-fields-java.util.zip.DeflaterOutputStream-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-fields-java.util.zip.DeflaterOutputStream-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
protected
byte[]</nobr></td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#buf">buf</a></td>
<td class="jd-descrcol" width="100%">
The buffer for the data to be written to.
</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
protected
<a href="../../../../reference/java/util/zip/Deflater.html">Deflater</a></nobr></td>
<td class="jd-linkcol"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#def">def</a></td>
<td class="jd-descrcol" width="100%">
The deflater used.
</td>
</tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-fields-java.io.FilterOutputStream" class="jd-expando-trigger closed"
><img id="inherited-fields-java.io.FilterOutputStream-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From class
<a href="../../../../reference/java/io/FilterOutputStream.html">java.io.FilterOutputStream</a>
<div id="inherited-fields-java.io.FilterOutputStream">
<div id="inherited-fields-java.io.FilterOutputStream-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-fields-java.io.FilterOutputStream-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
protected
<a href="../../../../reference/java/io/OutputStream.html">OutputStream</a></nobr></td>
<td class="jd-linkcol"><a href="../../../../reference/java/io/FilterOutputStream.html#out">out</a></td>
<td class="jd-descrcol" width="100%">
The target output stream for this filter stream.
</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/jar/JarOutputStream.html#JarOutputStream(java.io.OutputStream, java.util.jar.Manifest)">JarOutputStream</a></span>(<a href="../../../../reference/java/io/OutputStream.html">OutputStream</a> os, <a href="../../../../reference/java/util/jar/Manifest.html">Manifest</a> manifest)</nobr>
<div class="jd-descrdiv">
Constructs a new <code>JarOutputStream</code> using an output stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/jar/JarOutputStream.html#JarOutputStream(java.io.OutputStream)">JarOutputStream</a></span>(<a href="../../../../reference/java/io/OutputStream.html">OutputStream</a> os)</nobr>
<div class="jd-descrdiv">
Constructs a new <code>JarOutputStream</code> using an arbitrary output
stream.
</div>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/jar/JarOutputStream.html#putNextEntry(java.util.zip.ZipEntry)">putNextEntry</a></span>(<a href="../../../../reference/java/util/zip/ZipEntry.html">ZipEntry</a> ze)</nobr>
<div class="jd-descrdiv">
Writes the specified ZIP entry to the underlying stream.
</div>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="inhmethods" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Methods</div></th></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.util.zip.ZipOutputStream" class="jd-expando-trigger closed"
><img id="inherited-methods-java.util.zip.ZipOutputStream-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../../reference/java/util/zip/ZipOutputStream.html">java.util.zip.ZipOutputStream</a>
<div id="inherited-methods-java.util.zip.ZipOutputStream">
<div id="inherited-methods-java.util.zip.ZipOutputStream-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.util.zip.ZipOutputStream-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#close()">close</a></span>()</nobr>
<div class="jd-descrdiv">
Closes the current <code>ZipEntry</code>, if any, and the underlying output
stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#closeEntry()">closeEntry</a></span>()</nobr>
<div class="jd-descrdiv">
Closes the current <code>ZipEntry</code>.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#finish()">finish</a></span>()</nobr>
<div class="jd-descrdiv">
Indicates that all entries have been written to the stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#putNextEntry(java.util.zip.ZipEntry)">putNextEntry</a></span>(<a href="../../../../reference/java/util/zip/ZipEntry.html">ZipEntry</a> ze)</nobr>
<div class="jd-descrdiv">
Writes entry information to the underlying stream.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#setComment(java.lang.String)">setComment</a></span>(<a href="../../../../reference/java/lang/String.html">String</a> comment)</nobr>
<div class="jd-descrdiv">
Sets the comment associated with the file being written.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#setLevel(int)">setLevel</a></span>(int level)</nobr>
<div class="jd-descrdiv">
Sets the <a href="Deflater.html#compression_level">compression level</a> to be used
for writing entry data.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#setMethod(int)">setMethod</a></span>(int method)</nobr>
<div class="jd-descrdiv">
Sets the default compression method to be used when a <code>ZipEntry</code> doesn't
explicitly specify a method.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/ZipOutputStream.html#write(byte[], int, int)">write</a></span>(byte[] buffer, int offset, int byteCount)</nobr>
<div class="jd-descrdiv">
Writes data for the current entry to the underlying stream.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.util.zip.DeflaterOutputStream" class="jd-expando-trigger closed"
><img id="inherited-methods-java.util.zip.DeflaterOutputStream-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../../reference/java/util/zip/DeflaterOutputStream.html">java.util.zip.DeflaterOutputStream</a>
<div id="inherited-methods-java.util.zip.DeflaterOutputStream">
<div id="inherited-methods-java.util.zip.DeflaterOutputStream-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.util.zip.DeflaterOutputStream-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#close()">close</a></span>()</nobr>
<div class="jd-descrdiv">
Writes any unwritten compressed data to the underlying stream, the closes
all underlying streams.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#deflate()">deflate</a></span>()</nobr>
<div class="jd-descrdiv">
Compress the data in the input buffer and write it to the underlying
stream.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#finish()">finish</a></span>()</nobr>
<div class="jd-descrdiv">
Writes any unwritten data to the underlying stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#flush()">flush</a></span>()</nobr>
<div class="jd-descrdiv">
Flushes the underlying stream.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#write(byte[], int, int)">write</a></span>(byte[] buffer, int offset, int byteCount)</nobr>
<div class="jd-descrdiv">
Compresses <code>byteCount</code> bytes of data from <code>buf</code> starting at
<code>offset</code> and writes it to the underlying stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/util/zip/DeflaterOutputStream.html#write(int)">write</a></span>(int i)</nobr>
<div class="jd-descrdiv">
Writes one byte to the target stream.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.io.FilterOutputStream" class="jd-expando-trigger closed"
><img id="inherited-methods-java.io.FilterOutputStream-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../../reference/java/io/FilterOutputStream.html">java.io.FilterOutputStream</a>
<div id="inherited-methods-java.io.FilterOutputStream">
<div id="inherited-methods-java.io.FilterOutputStream-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.io.FilterOutputStream-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/FilterOutputStream.html#close()">close</a></span>()</nobr>
<div class="jd-descrdiv">
Closes this stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/FilterOutputStream.html#flush()">flush</a></span>()</nobr>
<div class="jd-descrdiv">
Ensures that all pending data is sent out to the target stream.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/FilterOutputStream.html#write(byte[], int, int)">write</a></span>(byte[] buffer, int offset, int length)</nobr>
<div class="jd-descrdiv">
Writes <code>count</code> bytes from the byte array <code>buffer</code> starting at
<code>offset</code> to the target stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/FilterOutputStream.html#write(int)">write</a></span>(int oneByte)</nobr>
<div class="jd-descrdiv">
Writes one byte to the target stream.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.io.OutputStream" class="jd-expando-trigger closed"
><img id="inherited-methods-java.io.OutputStream-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../../reference/java/io/OutputStream.html">java.io.OutputStream</a>
<div id="inherited-methods-java.io.OutputStream">
<div id="inherited-methods-java.io.OutputStream-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.io.OutputStream-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/OutputStream.html#close()">close</a></span>()</nobr>
<div class="jd-descrdiv">
Closes this stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/OutputStream.html#flush()">flush</a></span>()</nobr>
<div class="jd-descrdiv">
Flushes this stream.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/OutputStream.html#write(byte[], int, int)">write</a></span>(byte[] buffer, int offset, int count)</nobr>
<div class="jd-descrdiv">
Writes <code>count</code> bytes from the byte array <code>buffer</code> starting at
position <code>offset</code> to this stream.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/OutputStream.html#write(byte[])">write</a></span>(byte[] buffer)</nobr>
<div class="jd-descrdiv">
Equivalent to <code>write(buffer, 0, buffer.length)</code>.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/OutputStream.html#write(int)">write</a></span>(int oneByte)</nobr>
<div class="jd-descrdiv">
Writes a single byte to this stream.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../../reference/java/lang/Object.html">java.lang.Object</a>
<div id="inherited-methods-java.lang.Object">
<div id="inherited-methods-java.lang.Object-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#clone()">clone</a></span>()</nobr>
<div class="jd-descrdiv">
Creates and returns a copy of this <code>Object</code>.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#equals(java.lang.Object)">equals</a></span>(<a href="../../../../reference/java/lang/Object.html">Object</a> o)</nobr>
<div class="jd-descrdiv">
Compares this instance with the specified object and indicates if they
are equal.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#finalize()">finalize</a></span>()</nobr>
<div class="jd-descrdiv">
Invoked when the garbage collector has detected that this instance is no longer reachable.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../../reference/java/lang/Class.html">Class</a><?></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#getClass()">getClass</a></span>()</nobr>
<div class="jd-descrdiv">
Returns the unique instance of <code><a href="../../../../reference/java/lang/Class.html">Class</a></code> that represents this
object's class.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#hashCode()">hashCode</a></span>()</nobr>
<div class="jd-descrdiv">
Returns an integer hash code for this object.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#notify()">notify</a></span>()</nobr>
<div class="jd-descrdiv">
Causes a thread which is waiting on this object's monitor (by means of
calling one of the <code>wait()</code> methods) to be woken up.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#notifyAll()">notifyAll</a></span>()</nobr>
<div class="jd-descrdiv">
Causes all threads which are waiting on this object's monitor (by means
of calling one of the <code>wait()</code> methods) to be woken up.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#toString()">toString</a></span>()</nobr>
<div class="jd-descrdiv">
Returns a string containing a concise, human-readable description of this
object.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#wait()">wait</a></span>()</nobr>
<div class="jd-descrdiv">
Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#wait(long, int)">wait</a></span>(long millis, int nanos)</nobr>
<div class="jd-descrdiv">
Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the
specified timeout expires.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/Object.html#wait(long)">wait</a></span>(long millis)</nobr>
<div class="jd-descrdiv">
Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the
specified timeout expires.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.io.Closeable" class="jd-expando-trigger closed"
><img id="inherited-methods-java.io.Closeable-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../../reference/java/io/Closeable.html">java.io.Closeable</a>
<div id="inherited-methods-java.io.Closeable">
<div id="inherited-methods-java.io.Closeable-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.io.Closeable-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/Closeable.html#close()">close</a></span>()</nobr>
<div class="jd-descrdiv">
Closes the object and release any system resources it holds.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.io.Flushable" class="jd-expando-trigger closed"
><img id="inherited-methods-java.io.Flushable-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../../reference/java/io/Flushable.html">java.io.Flushable</a>
<div id="inherited-methods-java.io.Flushable">
<div id="inherited-methods-java.io.Flushable-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.io.Flushable-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/io/Flushable.html#flush()">flush</a></span>()</nobr>
<div class="jd-descrdiv">
Flushes the object by writing out any buffered data to the underlying
output.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.AutoCloseable" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.AutoCloseable-trigger"
src="../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../../reference/java/lang/AutoCloseable.html">java.lang.AutoCloseable</a>
<div id="inherited-methods-java.lang.AutoCloseable">
<div id="inherited-methods-java.lang.AutoCloseable-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.lang.AutoCloseable-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../reference/java/lang/AutoCloseable.html#close()">close</a></span>()</nobr>
<div class="jd-descrdiv">
Closes the object and release any system resources it holds.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
</table>
</div><!-- jd-descr (summary) -->
<!-- Details -->
<!-- XML Attributes -->
<!-- Enum Values -->
<!-- Constants -->
<!-- Fields -->
<!-- Public ctors -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<h2>Public Constructors</h2>
<A NAME="JarOutputStream(java.io.OutputStream, java.util.jar.Manifest)"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
public
</span>
<span class="sympad">JarOutputStream</span>
<span class="normal">(<a href="../../../../reference/java/io/OutputStream.html">OutputStream</a> os, <a href="../../../../reference/java/util/jar/Manifest.html">Manifest</a> manifest)</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Constructs a new <code>JarOutputStream</code> using an output stream. The
content of the <code>Manifest</code> must match the JAR entry information
written subsequently to the stream.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>os</td>
<td>the <code>OutputStream</code> to write to</td>
</tr>
<tr>
<th>manifest</td>
<td>the <code>Manifest</code> to output for this JAR file.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="../../../../reference/java/io/IOException.html">IOException</a></td>
<td>if an error occurs creating the <code>JarOutputStream</code>.
</td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="JarOutputStream(java.io.OutputStream)"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
public
</span>
<span class="sympad">JarOutputStream</span>
<span class="normal">(<a href="../../../../reference/java/io/OutputStream.html">OutputStream</a> os)</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Constructs a new <code>JarOutputStream</code> using an arbitrary output
stream.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>os</td>
<td>the <code>OutputStream</code> to write to.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="../../../../reference/java/io/IOException.html">IOException</a></td>
<td>if an error occurs creating the <code>JarOutputStream</code>.
</td>
</tr>
</table>
</div>
</div>
</div>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->
<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->
<h2>Public Methods</h2>
<A NAME="putNextEntry(java.util.zip.ZipEntry)"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
public
void
</span>
<span class="sympad">putNextEntry</span>
<span class="normal">(<a href="../../../../reference/java/util/zip/ZipEntry.html">ZipEntry</a> ze)</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Writes the specified ZIP entry to the underlying stream. The previous
entry is closed if it is still open.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>ze</td>
<td>the <code>ZipEntry</code> to write to.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<tr>
<th><a href="../../../../reference/java/io/IOException.html">IOException</a></td>
<td>if an error occurs writing to the entry.</td>
</tr>
</table>
</div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">See Also</h5>
<ul class="nolist"><li><code><a href="../../../../reference/java/util/zip/ZipEntry.html">ZipEntry</a></code></li>
</ul>
</div>
</div>
</div>
<!-- ========= METHOD DETAIL ======== -->
<!-- ========= END OF CLASS DATA ========= -->
<A NAME="navbar_top"></A>
</div> <!-- jd-content -->
<div class="wrap">
<div class="dac-footer">
<div class="cols dac-footer-main">
<div class="col-1of2">
<a class="dac-footer-getnews" data-modal-toggle="newsletter" href="javascript:;">Get news & tips <span
class="dac-fab dac-primary"><i class="dac-sprite dac-mail"></i></span></a>
</div>
<div class="col-1of2 dac-footer-reachout">
<div class="dac-footer-contact">
<a class="dac-footer-contact-link" href="http://android-developers.blogspot.com/">Blog</a>
<a class="dac-footer-contact-link" href="/support.html">Support</a>
</div>
<div class="dac-footer-social">
<a class="dac-fab dac-footer-social-link" href="https://www.youtube.com/user/androiddevelopers"><i class="dac-sprite dac-youtube"></i></a>
<a class="dac-fab dac-footer-social-link" href="https://plus.google.com/+AndroidDevelopers"><i class="dac-sprite dac-gplus"></i></a>
<a class="dac-fab dac-footer-social-link" href="https://twitter.com/AndroidDev"><i class="dac-sprite dac-twitter"></i></a>
</div>
</div>
</div>
<hr class="dac-footer-separator"/>
<p class="dac-footer-copyright">
Except as noted, this content is licensed under <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
For details and restrictions, see the <a href="../../../../license.html">
Content License</a>.
</p>
<p class="dac-footer-build">
Android 6.0 r1 —
<script src="../../../../timestamp.js" type="text/javascript"></script>
<script>document.write(BUILD_TIMESTAMP)</script>
</p>
<p class="dac-footer-links">
<a href="/about/index.html">About Android</a>
<a href="/auto/index.html">Auto</a>
<a href="/tv/index.html">TV</a>
<a href="/wear/index.html">Wear</a>
<a href="/legal.html">Legal</a>
<span id="language" class="locales">
<select name="language" onchange="changeLangPref(this.value, true)">
<option value="en" selected="selected">English</option>
<option value="es">Español</option>
<option value="ja">日本語</option>
<option value="ko">한국어</option>
<option value="pt-br">Português Brasileiro</option>
<option value="ru">Русский</option>
<option value="zh-cn">中文(简体)</option>
<option value="zh-tw">中文(繁體)</option>
</select>
</span>
</p>
</div>
</div> <!-- end footer -->
<div data-modal="newsletter" data-newsletter data-swap class="dac-modal newsletter">
<div class="dac-modal-container">
<div class="dac-modal-window">
<header class="dac-modal-header">
<button class="dac-modal-header-close" data-modal-toggle><i class="dac-sprite dac-close"></i></button>
<div class="dac-swap" data-swap-container>
<section class="dac-swap-section dac-active dac-down">
<h2 class="norule dac-modal-header-title">Get the latest Android developer news and tips that will help you find success on Google Play.</h2>
<p class="dac-modal-header-subtitle">* Required Fields</p>
</section>
<section class="dac-swap-section dac-up">
<h2 class="norule dac-modal-header-title">Hooray!</h2>
</section>
</div>
</header>
<div class="dac-swap" data-swap-container>
<section class="dac-swap-section dac-active dac-left">
<form action="https://docs.google.com/forms/d/1QgnkzbEJIDu9lMEea0mxqWrXUJu0oBCLD7ar23V0Yys/formResponse" class="dac-form" method="post" target="dac-newsletter-iframe">
<section class="dac-modal-content">
<fieldset class="dac-form-fieldset">
<div class="cols">
<div class="col-1of2 newsletter-leftCol">
<div class="dac-form-input-group">
<label for="newsletter-full-name" class="dac-form-floatlabel">Full name</label>
<input type="text" class="dac-form-input" name="entry.1357890476" id="newsletter-full-name" required>
<span class="dac-form-required">*</span>
</div>
<div class="dac-form-input-group">
<label for="newsletter-email" class="dac-form-floatlabel">Email address</label>
<input type="email" class="dac-form-input" name="entry.472100832" id="newsletter-email" required>
<span class="dac-form-required">*</span>
</div>
</div>
<div class="col-1of2 newsletter-rightCol">
<div class="dac-form-input-group">
<label for="newsletter-company" class="dac-form-floatlabel">Company / developer name</label>
<input type="text" class="dac-form-input" name="entry.1664780309" id="newsletter-company">
</div>
<div class="dac-form-input-group">
<label for="newsletter-play-store" class="dac-form-floatlabel">One of your Play Store app URLs</label>
<input type="url" class="dac-form-input" name="entry.47013838" id="newsletter-play-store" required>
<span class="dac-form-required">*</span>
</div>
</div>
</div>
</fieldset>
<fieldset class="dac-form-fieldset">
<div class="cols">
<div class="col-1of2 newsletter-leftCol">
<legend class="dac-form-legend">Which best describes your business:<span class="dac-form-required">*</span>
</legend>
<div class="dac-form-radio-group">
<input type="radio" value="Apps" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-app" required>
<label for="newsletter-business-type-app" class="dac-form-radio-button"></label>
<label for="newsletter-business-type-app" class="dac-form-label">Apps</label>
</div>
<div class="dac-form-radio-group">
<input type="radio" value="Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-games" required>
<label for="newsletter-business-type-games" class="dac-form-radio-button"></label>
<label for="newsletter-business-type-games" class="dac-form-label">Games</label>
</div>
<div class="dac-form-radio-group">
<input type="radio" value="Apps and Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-appsgames" required>
<label for="newsletter-business-type-appsgames" class="dac-form-radio-button"></label>
<label for="newsletter-business-type-appsgames" class="dac-form-label">Apps & Games</label>
</div>
</div>
<div class="col-1of2 newsletter-rightCol newsletter-checkboxes">
<div class="dac-form-radio-group">
<div class="dac-media">
<div class="dac-media-figure">
<input type="checkbox" class="dac-form-checkbox" name="entry.732309842" id="newsletter-add" required value="Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.">
<label for="newsletter-add" class="dac-form-checkbox-button"></label>
</div>
<div class="dac-media-body">
<label for="newsletter-add" class="dac-form-label dac-form-aside">Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.<span class="dac-form-required">*</span></label>
</div>
</div>
</div>
<div class="dac-form-radio-group">
<div class="dac-media">
<div class="dac-media-figure">
<input type="checkbox" class="dac-form-checkbox" name="entry.2045036090" id="newsletter-terms" required value="I acknowledge that the information provided in this form will be subject to Google's privacy policy (https://www.google.com/policies/privacy/).">
<label for="newsletter-terms" class="dac-form-checkbox-button"></label>
</div>
<div class="dac-media-body">
<label for="newsletter-terms" class="dac-form-label dac-form-aside">I acknowledge that the information provided in this form will be subject to <a href="https://www.google.com/policies/privacy/">Google's privacy policy</a>.<span class="dac-form-required">*</span></label>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</section>
<footer class="dac-modal-footer">
<div class="cols">
<div class="col-2of5">
</div>
</div>
<button type="submit" value="Submit" class="dac-fab dac-primary dac-large dac-modal-action"><i class="dac-sprite dac-arrow-right"></i></button>
</footer>
</form>
</section>
<section class="dac-swap-section dac-right">
<div class="dac-modal-content">
<p class="newsletter-success-message">
You have successfully signed up for the latest Android developer news and tips.
</p>
</div>
</section>
</div>
</div>
</div>
</div> <!-- end footer -->
</div><!-- end doc-content -->
</div> <!-- end .cols -->
</div> <!-- end body-content -->
</body>
</html>
| anas-ambri/androidcompat | docs/java/util/jar/JarOutputStream.html | HTML | mit | 116,139 |
using System;
using System.Collections;
using System.Runtime.Remoting;
using System.Windows;
using Common;
namespace DESClient
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public static IDES IDes;
private App()
{
RemotingConfiguration.Configure("DESClient.exe.config", false);
IDes = (IDES) RemoteNew.New(typeof (IDES));
}
private class RemoteNew
{
private static Hashtable _types;
private static void InitTypeTable()
{
_types = new Hashtable();
foreach (var entry in RemotingConfiguration.GetRegisteredWellKnownClientTypes())
_types.Add(entry.ObjectType, entry);
}
public static object New(Type type)
{
if (_types == null)
InitTypeTable();
var entry = (WellKnownClientTypeEntry) _types[type];
if (entry == null)
throw new RemotingException("Type not found!");
return RemotingServices.Connect(type, entry.ObjectUrl);
}
}
}
} | jpdias/DiginoteExchangeSystem | DESClient/App.xaml.cs | C# | mit | 1,242 |
'use strict';
// ==================================
//
// Load modules.
//
// ==================================
var config = require('../config.js');
var gulp = require('gulp');
// ==================================
//
// Fonts
//
// ==================================
gulp.task('fonts', function () {
gulp.src([config.fonts.src])
.pipe(gulp.dest(config.fonts.dest));
});
| Futoshi0620/jet-penguin | www/wordpress/wp-content/themes/jet-penguin/gulp/tasks/fonts.js | JavaScript | mit | 381 |
<?php
/**
* PlugintdSubpage form.
*
* @package ##PROJECT_NAME##
* @subpackage filter
* @author ##AUTHOR_NAME##
* @version SVN: $Id: sfDoctrineFormFilterPluginTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
abstract class PlugintdSubpageFormFilter extends BasetdSubpageFormFilter
{
}
| Symfony-Plugins/tdCorePlugin | lib/filter/doctrine/PlugintdSubpageFormFilter.class.php | PHP | mit | 313 |
<?php
/*
* 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
* OWNER 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.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>.
*/
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/psr-0-final-proposal?pli=1
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
* $classLoader = new SplClassLoader('Doctrine\Common', '/path/to/doctrine');
* $classLoader->register();
*
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman S. Borschel <roman@code-factory.org>
* @author Matthew Weier O'Phinney <matthew@zend.com>
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
* @author Fabien Potencier <fabien.potencier@symfony-project.org>
*
*
* Taken on August 15th, 2014 from:
*
* https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
* https://gist.github.com/jwage/221634
*/
class SplClassLoader
{
private $_fileExtension = '.php';
private $_namespace;
private $_includePath;
private $_namespaceSeparator = '\\';
/**
* Creates a new <tt>SplClassLoader</tt> that loads classes of the
* specified namespace.
*
* @param string $ns The namespace to use.
*/
public function __construct($ns = null, $includePath = null)
{
$this->_namespace = $ns;
$this->_includePath = $includePath;
}
/**
* Sets the namespace separator used by classes in the namespace of this class loader.
*
* @param string $sep The separator to use.
*/
public function setNamespaceSeparator($sep)
{
$this->_namespaceSeparator = $sep;
}
/**
* Gets the namespace seperator used by classes in the namespace of this class loader.
*
* @return void
*/
public function getNamespaceSeparator()
{
return $this->_namespaceSeparator;
}
/**
* Sets the base include path for all class files in the namespace of this class loader.
*
* @param string $includePath
*/
public function setIncludePath($includePath)
{
$this->_includePath = $includePath;
}
/**
* Gets the base include path for all class files in the namespace of this class loader.
*
* @return string $includePath
*/
public function getIncludePath()
{
return $this->_includePath;
}
/**
* Sets the file extension of class files in the namespace of this class loader.
*
* @param string $fileExtension
*/
public function setFileExtension($fileExtension)
{
$this->_fileExtension = $fileExtension;
}
/**
* Gets the file extension of class files in the namespace of this class loader.
*
* @return string $fileExtension
*/
public function getFileExtension()
{
return $this->_fileExtension;
}
/**
* Installs this class loader on the SPL autoload stack.
*/
public function register()
{
spl_autoload_register(array($this, 'loadClass'));
}
/**
* Uninstalls this class loader from the SPL autoloader stack.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $className The name of the class to load.
* @return void
*/
public function loadClass($className)
{
if (null === $this->_namespace || $this->_namespace.$this->_namespaceSeparator === substr($className, 0, strlen($this->_namespace.$this->_namespaceSeparator))) {
$fileName = '';
$namespace = '';
if (false !== ($lastNsPos = strripos($className, $this->_namespaceSeparator))) {
$namespace = substr($className, 0, $lastNsPos);
$className = substr($className, $lastNsPos + 1);
$fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
}
$fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension;
require ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName;
}
}
} | SaltTechnology/salt-payment-client-php | lib/SplClassLoader.php | PHP | mit | 5,314 |
<?php
$bench = true; // true = dump result | false = skip dump
$time_round = 4;
$tstart = microtime(true);
/*******************************************
* SFAPI v.: 1.1 example
*******************************************
* info@superfaktura.sk
*******************************************/
DEFINE('SFAPI_EMAIL', 'example@example.com'); // LOGIN EMAIL TO SUPERFAKTURA
DEFINE('SFAPI_KEY', 'apikey'); // SFAPI KEY
DEFINE('SFAPI_MODULE', 'API'); // TITLE OF MODULE FE. 'WOOCOMMERCE MODULE'
DEFINE('SFAPI_APPTITLE', 'Example API application'); // TITLE OF YOUR APPLICATION FE. 'SUPERFAKTURA.SK'
DEFINE('COMPANY_ID', 1); // COMPANY_ID (optional)
require_once('../SFAPIclient/SFAPIclient.php');
// Create and init SFAPIclient
$api = new SFAPIclient(SFAPI_EMAIL, SFAPI_KEY, SFAPI_APPTITLE, SFAPI_MODULE, COMPANY_ID);
/***********************************************
* Example; create new invoice
***********************************************/
// 1) set Client
$api->setClient(array(
'name' => 'Example s.r.o.', // Client name
'phone' => '+421000000000', // Client phone
'email' => 'exampleclient@example.com' // Client email
));
// 2) set Invoice
$api->setInvoice(array(
'name' => 'Invoice example', // Invoice name
'variable' => '123456', // Variable
'due' => date('Y-m-d', strtotime("+20 day")), // Due date
'already_paid' => true // If true invoice is paid
));
// 3) add new Invioce item
$api->addItem(array(
'name' => 'Example item', // Invoice item name
'descriptions' => 'Description of "Example item"', // Invoice item description
'unit_price' => 20, // Unit price without vat
'tax' => 20, // Vat
'quantity' => 5, // Quantity
'discount' => 50, // Invoice item discount in %
'discount_description' => 'Discount 50% COUPON: AA11BB22CC33'
));
// 4) save data
$response = $api->save();
if (!empty($bench)) {
_debug($response, 'Create new invoice example');
}
/********************************************
* Example; create new expense
********************************************/
// 1) Reset data
$api->resetData();
// 2) Set new Expense
$api->setExpense(array(
'name' => 'Example expense', // Expense name
'variable' => 123456, // Variable
'amount' => 100, // Price no vat
'vat' => 20, // Vat
'already_paid' => true // Expense is allready paid
));
// 3) Save Expense
$response = $api->save();
if (!empty($bench)) {
_debug($response, 'Create new expense example');
}
/********************************************
* Example; edit invoice
********************************************/
$invoice_id = 0; // existing invoice id; Invoice->id
if (!empty($invoice_id)) {
// 1) Do not update Client
$api->setClient(array());
// 2) Set invoice data to update
$api->setInvoice(array(
'id' => $invoice_id,
'name' => 'Example invoice "EDIT EXAMPLE"',
'comment' => 'Example comment "EDIT EXAMPLE"',
'variable' => 333
));
// 3) Add new InvoiceItem
$api->addItem(array(
'name' => 'New example item',
'description' => 'Example item created from edit',
'unit_price' => round(M_PI, 2),
'quantity' => 2
));
// 4) Update invoice data
$response = $api->edit();
if (!empty($bench)) {
_debug($response, 'Edit invoice example');
}
}
/*********************************************
* Example; editing example expense
*********************************************/
$expense_id = 0;
if (!empty($expense_id)) {
// 1) Set new Client
$api->setClient(array(
'name' => 'Example client (test)',
'ico' => mt_rand(10000000, 99999999),
'dic' => '012345678',
'email' => 'mynewexampleclient@example.com'
));
// 2) Set Expense data to update
$api->setExpense(array(
'id' => $expense_id,
'name' => 'Expense example EDIT',
'amount' => round(M_E * 100),
'currency' => 'CZK'
));
// 3) Update Expense data
$response = $api->edit();
if (!empty($bench)) {
_debug($response, 'Edit expense example');
}
}
/********************************************
* Example; send invoice by email
* , post
********************************************/
if (!empty($invoice_id)) {
$response = $api->sendInvoiceEmail(array(
'invoice_id' => $invoice_id,
'to' => 'diamonjohn@gmail.com',
'cc' => array(
'example2@example.com',
'example3@example.com'
),
'bcc' => array(
'example4@example.com'
)
// , 'subject' => 'From API'
// , 'body' => 'Ostra faktura test'
));
if (!empty($bench)) {
_debug($response, 'Send email example');
}
$send_invoice_post = false;
if ($send_invoice_post) {
$response = $api->sendInvoicePost(array(
'invoice_id' => $invoice_id,
/*
// uncomment to set custom delivery address
'delivery_address' => 'Address 333',
'delivery_city' => 'MyCity',
'delivery_zip' => '94911',
'delivery_country' => 'Slovenska republika'
*/
));
if (!empty($bench)) {
_debug($response, 'Send invoice post');
}
}
}
/*******************************************
* Example; update invoice item
*******************************************/
$invoice_item_id = 0; // set to your item id; belongs to invoice
if (!empty($invoice_id) && !empty($invoice_item_id)) {
// 1) Empty client, do not update
$api->setClient(array());
// 2) Set invoice id
$api->setInvoice(array(
'id' => $invoice_id
));
// 3) Set item
$api->addItem(array(
'id' => $invoice_item_id,
'name' => '*Edited invoice item.',
'unit_price' => round(M_E * 1000, 2),
'quantity' => round(M_PI)
));
// 4) Update expense data
$response = $api->edit();
if (!empty($bench)) {
_debug($response, 'Update invoice item');
}
}
/*******************************************
* Example; pay invoice
*******************************************/
if (!empty($invoice_id)) {
// 1) Add Inovice payment
$response = $api->payInvoice($invoice_id, 333);
if (!empty($bench)) {
_debug($response, 'Add invoice payment');
}
}
/*******************************************
* Example; pay expense
*******************************************/
if (!empty($expense_id)) {
// 1) Add Expense payment
$response = $api->payExpense($expense_id, 333);
if (!empty($bench)) {
_debug($response, 'Add expense payment.');
}
}
/*******************************************
* Example; create new stock item
*******************************************/
// 1) Add new stock item
$response = $api->addStockItem(array(
'name' => 'Stock item example',
'description' => 'Example stock item description.',
'sku' => 'STOCK'.mt_rand(100, 999).'ID',
'unit_price' => round(M_PI, 2),
'vat' => 20,
'stock' => 10
));
if (!empty($bench)) {
_debug($response, 'Add stock item');
}
/******************************************
* Pridame pohyb na sklade
******************************************/
$stock_item_id = 0;
if (!empty($stock_item_id)) {
// Add new stock movement
$response = $api->addStockMovement(array(
'stock_item_id' => $stock_item_id,
'quantity' => 50, // fe. -50 negative movement
'note' => 'Stock movement example from API'
));
if (!empty($bench)) {
_debug($response, 'Add stock movement');
}
}
$tend = microtime(true);
if (!empty($bench)) {
// output time
echo '<div style="background:red;color:white;padding:10px;margin-top:10px;">Bench is ON. Microtime in secs ~ <b>'.round($tend - $tstart, $time_round).'s</b><br></div>';
}
/***********************************************
* dump in readable format
***********************************************/
function _debug($obj, $title = '') {
if (!is_array($obj)) {
$obj = json_decode(json_encode($obj), true);
}
if (!empty($title)) {
echo "<h2>$title</h2>";
}
echo '<code style="white-space: pre;background:#FAFCAC;margin-top:10px;padding:15px;display:block;width:450px;">';
print_r($obj);
echo '</code>';
}
?>
| superfaktura/apiclient | examples/sample2.php | PHP | mit | 8,031 |
import tornado.web
from datetime import date
from sqlalchemy.orm.exc import NoResultFound
from pyprint.handler import BaseHandler
from pyprint.models import User, Link, Post
class SignInHandler(BaseHandler):
def get(self):
return self.background_render('login.html')
def post(self):
username = self.get_argument('username', None)
password = self.get_argument('password', None)
if username and password:
try:
user = self.orm.query(User).filter(User.username == username).one()
except NoResultFound:
return self.redirect('/login')
if user.check(password):
self.set_secure_cookie('username', user.username)
self.redirect('/kamisama/posts')
return self.redirect('/login')
class ManagePostHandler(BaseHandler):
@tornado.web.authenticated
def get(self):
posts = self.orm.query(Post.title, Post.id).order_by(Post.id.desc()).all()
self.background_render('posts.html', posts=posts)
@tornado.web.authenticated
def post(self):
action = self.get_argument('action', None)
if action == 'del':
post_id = self.get_argument('id', 0)
if post_id:
post = self.orm.query(Post).filter(Post.id == post_id).one()
self.orm.delete(post)
self.orm.commit()
class AddPostHandler(BaseHandler):
@tornado.web.authenticated
def get(self):
self.background_render('add_post.html', post=None)
@tornado.web.authenticated
def post(self):
title = self.get_argument('title', None)
content = self.get_argument('content', None)
tags = self.get_argument('tags', '').strip().split(',')
if not title or not content:
return self.redirect('/kamisama/posts/add')
post = self.orm.query(Post.title).filter(Post.title == title).all()
if post:
return self.write('<script>alert("Title has already existed");window.history.go(-1);</script>')
self.orm.add(Post(title=title, content=content, created_time=date.today()))
self.orm.commit()
return self.redirect('/kamisama/posts')
class AddLinkHandler(BaseHandler):
@tornado.web.authenticated
def get(self):
links = self.orm.query(Link).all()
self.background_render('links.html', links=links)
@tornado.web.authenticated
def post(self):
action = self.get_argument('action', None)
if action == 'add':
name = self.get_argument('name', '')
url = self.get_argument('url', '')
if not name or not url:
return self.redirect('/kamisama/links')
self.orm.add(Link(name=name, url=url))
self.orm.commit()
return self.redirect('/kamisama/links')
elif action == 'del':
link_id = self.get_argument('id', 0)
if link_id:
link = self.orm.query(Link).filter(Link.id == link_id).one()
self.orm.delete(link)
self.orm.commit()
| RicterZ/pyprint | pyprint/views/background.py | Python | mit | 3,116 |
<html><body>
<h4>Windows 10 x64 (18363.476)</h4><br>
<h2>_POP_FX_DEVICE_DIRECTED_TRANSITION_STATE</h2>
<font face="arial"> +0x000 CompletionContext : Ptr64 Void<br>
+0x008 CompletionStatus : Int4B<br>
+0x00c DIrpPending : Pos 0, 1 Bit<br>
+0x00c DIrpCompleted : Pos 1, 1 Bit<br>
</font></body></html> | epikcraw/ggool | public/Windows 10 x64 (18363.476)/_POP_FX_DEVICE_DIRECTED_TRANSITION_STATE.html | HTML | mit | 326 |
<?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace ApiPlatform\Core\Tests\Annotation;
use ApiPlatform\Core\Annotation\ApiProperty;
use PHPUnit\Framework\TestCase;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class ApiPropertyTest extends TestCase
{
public function testAssignation()
{
$property = new ApiProperty();
$property->description = 'description';
$property->readable = true;
$property->writable = true;
$property->readableLink = true;
$property->writableLink = true;
$property->required = true;
$property->iri = 'http://example.com/prop';
$property->identifier = true;
$property->attributes = ['foo' => 'bar'];
$this->assertEquals('description', $property->description);
$this->assertTrue($property->readable);
$this->assertTrue($property->writable);
$this->assertTrue($property->readableLink);
$this->assertTrue($property->writableLink);
$this->assertTrue($property->required);
$this->assertEquals('http://example.com/prop', $property->iri);
$this->assertTrue($property->identifier);
$this->assertEquals(['foo' => 'bar'], $property->attributes);
}
public function testConstruct()
{
$property = new ApiProperty([
'deprecationReason' => 'this field is deprecated',
'fetchable' => true,
'fetchEager' => false,
'jsonldContext' => ['foo' => 'bar'],
'security' => 'is_granted(\'ROLE_ADMIN\')',
'swaggerContext' => ['foo' => 'baz'],
'openapiContext' => ['foo' => 'baz'],
'push' => true,
'attributes' => ['unknown' => 'unknown', 'fetchable' => false],
]);
$this->assertEquals([
'deprecation_reason' => 'this field is deprecated',
'fetchable' => false,
'fetch_eager' => false,
'jsonld_context' => ['foo' => 'bar'],
'security' => 'is_granted(\'ROLE_ADMIN\')',
'swagger_context' => ['foo' => 'baz'],
'openapi_context' => ['foo' => 'baz'],
'push' => true,
'unknown' => 'unknown',
], $property->attributes);
}
/**
* @requires PHP 8.0
*/
public function testConstructAttribute()
{
$property = eval(<<<'PHP'
return new \ApiPlatform\Core\Annotation\ApiProperty(
deprecationReason: 'this field is deprecated',
fetchable: true,
fetchEager: false,
jsonldContext: ['foo' => 'bar'],
security: 'is_granted(\'ROLE_ADMIN\')',
swaggerContext: ['foo' => 'baz'],
openapiContext: ['foo' => 'baz'],
push: true,
attributes: ['unknown' => 'unknown', 'fetchable' => false]
);
PHP
);
$this->assertEquals([
'deprecation_reason' => 'this field is deprecated',
'fetchable' => false,
'fetch_eager' => false,
'jsonld_context' => ['foo' => 'bar'],
'security' => 'is_granted(\'ROLE_ADMIN\')',
'swagger_context' => ['foo' => 'baz'],
'openapi_context' => ['foo' => 'baz'],
'push' => true,
'unknown' => 'unknown',
], $property->attributes);
}
}
| meyerbaptiste/core | tests/Annotation/ApiPropertyTest.php | PHP | mit | 3,478 |
export default {
name: 'help-view',
data() {
return {
}
},
methods: {
}
}
| freelogfe/console | src/views/help/index.js | JavaScript | mit | 94 |
<!DOCTYPE html>
<html>
<head>
<title><?php echo $post['title']; ?></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/blog.css" />
</head>
<body>
<div class="blog-masthead">
<div class="container">
<nav class="blog-nav">
<a class="blog-nav-item" href="<?php echo site_url('blog'); ?>">Home</a>
<?php if(empty($_SESSION['username'])): ?>
<a class="blog-nav-item" href="<?php echo site_url('login'); ?>">Login</a>
<?php else: ?>
<a class="blog-nav-item" href="<?php echo site_url('blog/viewDashboard'); ?>">Dashboard</a>
<a class="blog-nav-item" href="<?php echo site_url('blog/addPost'); ?>">New post</a>
<a class="blog-nav-item pull-right" href="<?php echo site_url('login/logout') ;?>">Logout</a>
<?php endif; ?>
</nav>
</div>
</div>
<div class="container">
<div class="blog-header">
<h1 class="blog-title"><?php echo $header;?></h1>
<p class="lead blog-description"><?php echo $subtitle; ?></p>
</div>
<div class="col-sm-8 blog-main">
<div class="blog-post">
<h2 class="blog-post-title"><?php echo $post['title']; ?></h2>
<p class="blog-post-meta"><small> Posted on: <span><?php print date('F j/ Y, g:i a', $post['posted_on']->sec); ?></span></small></p>
<p><?php echo $post['body']; ?></p>
</div>
<div class="well">
<h4>Leave your comment</h4>
<form action="<?php echo site_url('blog/saveComment'); ?>" method="post">
<h6>Name</h6>
<input class="form-control" type="text" name="cname"/>
<br />
<h6>Write your comment</h6>
<textarea class="form-control" name="comment" rows="5"></textarea><br />
<input type="hidden" name="postId" value="<?php echo $post['_id']; ?>" />
<input class="btn btn-primary" type="submit" name="bsubmit" value="Submit" />
</form>
</div>
<div class="media">
<?php if(!empty($post['comments'])): ?>
<h3>Comments</h3>
<?php foreach ($post['comments'] as $comment):?>
<div class="media">
<h4 class="media-heading">
<?php echo $comment['name']; ?>
<small><?php echo date('F j/ Y, g:i a', $comment['commented_on']->sec); ?></small>
</h4>
<p><?php echo $comment['comment'];?></p>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<br />
</div>
</div>
<div class="blog-footer"></div>
</body>
</html> | lherrerab/SingleBlog | application/views/viewPost.php | PHP | mit | 2,687 |
---
id: 297
title: 'Cynicism Never had a Chance! [PIC]'
date: 2010-04-20T23:49:09+00:00
author: rami
layout: post
guid: http://rtaibah1.wordpress.com/2010/04/20/cynicism-never-had-a-chance-pic
permalink: /2010/04/20/cynicism-never-had-a-chance-pic/
posterous_39894d3ad3d9f6a441052a50351e8a54_post_id:
- "16850984"
- "16850984"
- "16850984"
posterous_39894d3ad3d9f6a441052a50351e8a54_permalink:
- http://blog.ramitaibah.com/cynicism-never-had-a-chance-pic
- http://blog.ramitaibah.com/cynicism-never-had-a-chance-pic
- http://blog.ramitaibah.com/cynicism-never-had-a-chance-pic
categories:
- Uncategorized
---
<div class="posterous_bookmarklet_entry">
<div class='p_embed p_image_embed'>
<a href="http://139.59.20.41/wp-content/uploads/2011/12/media_httpidailymailc_nahog-scaled1000.jpg"><img alt="Media_httpidailymailc_nahog" height="375" src="http://139.59.20.41/wp-content/uploads/2011/12/media_httpidailymailc_nahog-scaled1000.jpg?w=300" width="500" /></a>
</div>
<div class="posterous_quote_citation">
via <a href="http://i.dailymail.co.uk/i/pix/2009/03/10/article-1160954-03D022DE000005DC-490_468x311_popup.jpg">i.dailymail.co.uk</a>
</div></p>
</div> | rtaibah/jekyll-blog | _posts/zeitgeist/2010-04-20-cynicism-never-had-a-chance-pic.md | Markdown | mit | 1,189 |
---
layout: page
title: Banner Financial Party
date: 2016-05-24
author: Ralph Levy
tags: weekly links, java
status: published
summary: Aliquam et odio sed turpis.
banner: images/banner/leisure-01.jpg
booking:
startDate: 12/09/2017
endDate: 12/11/2017
ctyhocn: MFESPHX
groupCode: BFP
published: true
---
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nunc lacinia finibus ante, porttitor pellentesque magna congue vitae. Etiam eget magna et diam tincidunt consectetur. Morbi bibendum elit est, sed elementum velit interdum in. Aenean eget nibh ac arcu vestibulum ultrices. Etiam sagittis lacinia risus quis lacinia. Nullam nec mauris a tortor fermentum eleifend non eget sem. Etiam ac imperdiet nibh. Quisque tempor risus sit amet urna congue porta. Donec finibus tristique egestas. Quisque quis iaculis mi. Aliquam ultrices augue orci, quis gravida risus varius suscipit. Aliquam interdum sed lectus at varius.
1 Vivamus non diam efficitur, tincidunt ex nec, aliquet tortor.
In tincidunt lorem vel ullamcorper ullamcorper. Aenean egestas aliquam nibh, eu eleifend ligula imperdiet eget. Maecenas blandit arcu nec urna congue vulputate. Donec ac metus convallis, ullamcorper augue et, pellentesque velit. Quisque eget ex vel nisl euismod iaculis nec vitae lacus. Nunc in fermentum nisi. Nam lorem nulla, cursus facilisis erat id, mattis tincidunt augue. Vestibulum dapibus metus id posuere iaculis. Mauris mi sapien, vehicula quis ipsum nec, sodales consectetur nulla. Ut ac cursus quam. Suspendisse potenti. Suspendisse fermentum mauris at nisl lacinia, feugiat lacinia odio lacinia. Aenean ut dolor nibh. Donec porttitor neque nec arcu accumsan pretium. Pellentesque consectetur elit vel nulla placerat, sed egestas ipsum egestas.
| KlishGroup/prose-pogs | pogs/M/MFESPHX/BFP/index.md | Markdown | mit | 1,787 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>free-groups: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.11.0 / free-groups - 8.8.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
free-groups
<small>
8.8.0
<span class="label label-info">Not compatible</span>
</small>
</h1>
<p><em><script>document.write(moment("2020-09-17 07:05:41 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-09-17 07:05:41 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-m4 1 Virtual package relying on m4
coq 8.11.0 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/free-groups"
license: "LGPL"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/FreeGroups"]
depends: [
"ocaml"
"coq" {>= "8.8" & < "8.9~"}
]
tags: [ "keyword: free group" "category: Mathematics/Algebra" ]
authors: [ "Daniel Schepler <dschepler@gmail.com>" ]
bug-reports: "https://github.com/coq-contribs/free-groups/issues"
dev-repo: "git+https://github.com/coq-contribs/free-groups.git"
synopsis: "Free Groups"
description:
"This small contribution is a formalization of van der Waerden's proof of the construction of a free group on a set of generators, as the reduced words where a letter is a generator or its formal inverse."
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/free-groups/archive/v8.8.0.tar.gz"
checksum: "md5=767e036a0fd3ec6d3e5881b4ff9c3c37"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-free-groups.8.8.0 coq.8.11.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0).
The following dependencies couldn't be met:
- coq-free-groups -> coq < 8.9~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-free-groups.8.8.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
<small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.05.0-2.0.6/released/8.11.0/free-groups/8.8.0.html | HTML | mit | 6,964 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>search-trees: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.6 / search-trees - 8.10.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
search-trees
<small>
8.10.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-18 12:47:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-18 12:47:20 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.6 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.04.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.04.2 Official 4.04.2 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/search-trees"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/SearchTrees"]
depends: [
"ocaml"
"coq" {>= "8.10" & < "8.11~"}
]
tags: [
"keyword: binary search trees"
"category: Computer Science/Data Types and Data Structures"
"category: Miscellaneous/Extracted Programs/Data structures"
]
authors: [
"Pierre Castéran"
]
bug-reports: "https://github.com/coq-contribs/search-trees/issues"
dev-repo: "git+https://github.com/coq-contribs/search-trees.git"
synopsis: "Binary Search Trees"
description: """
Algorithms for collecting, searching, inserting and deleting elements in binary search trees on nat"""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/search-trees/archive/v8.10.0.tar.gz"
checksum: "md5=012695d00801360382b39c5ccd2c18e1"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-search-trees.8.10.0 coq.8.6</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.6).
The following dependencies couldn't be met:
- coq-search-trees -> coq >= 8.10 -> ocaml >= 4.05.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-search-trees.8.10.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.04.2-2.0.5/released/8.6/search-trees/8.10.0.html | HTML | mit | 6,988 |
package word.w2004.elements;
import word.api.interfaces.IElement;
import word.w2004.elements.tableElements.TableRow;
/**
* @author leonardo_correa
*
*/
public class TableV2 implements IElement {
private StringBuilder txt = new StringBuilder("");
private boolean hasBeenCalledBefore = false;
public String getContent() {
if (hasBeenCalledBefore) {
return txt.toString();
} else {
hasBeenCalledBefore = true;
}
if ("".equals(txt.toString())) {
return "";
}
// here it goes
txt.insert(0, tableTop);
txt.append("\n" + tableBottom);
//apply style
return txt.toString();
}
/**
* You always have to use TableRow to add new rows to the table. Eg.:
* <code>
* tbl.addRow( TableRowV2.with("Simple String cell") );
* </code>
* See documentation on method "TableRowV2.with" for very detailed information.
*
* @param row
* @return
*/
public TableRow addRow(TableRow row) {
//the row will have cells. The Row knows how to do the rest...
txt.append(row.getContent());
return row;
}
String tableTop =
"\n <w:tbl> "
+"\n <w:tblPr> "
+"\n <w:tblW w:w=\"0\" w:type=\"auto\"/> "
+"\n <w:tblBorders> "
+"\n <w:top w:val=\"single\" w:sz=\"4\" wx:bdrwidth=\"10\" w:space=\"0\" w:color=\"000000\"/> "
+"\n <w:left w:val=\"single\" w:sz=\"4\" wx:bdrwidth=\"10\" w:space=\"0\" w:color=\"000000\"/> "
+"\n <w:bottom w:val=\"single\" w:sz=\"4\" wx:bdrwidth=\"10\" w:space=\"0\" w:color=\"000000\"/> "
+"\n <w:right w:val=\"single\" w:sz=\"4\" wx:bdrwidth=\"10\" w:space=\"0\" w:color=\"000000\"/> "
+"\n <w:insideH w:val=\"single\" w:sz=\"4\" wx:bdrwidth=\"10\" w:space=\"0\" w:color=\"000000\"/> "
+"\n <w:insideV w:val=\"single\" w:sz=\"4\" wx:bdrwidth=\"10\" w:space=\"0\" w:color=\"000000\"/> "
+"\n </w:tblBorders> "
+"\n <w:tblLook w:val=\"00BF\"/> "
+"\n </w:tblPr> "
+"\n <w:tblGrid> "
+"\n <w:gridCol w:w=\"4258\"/> "
+"\n <w:gridCol w:w=\"4258\"/> "
+"\n </w:tblGrid> "
;
private String tableBottom = "\n </w:tbl>";
/*
*
*
* - Top or TableDefinition is the same - just realized that TableRow is
* always the same. Ou seja, nao precisara dizer TableEle.TD ou TableEle.TH.
* - sera possivel applicar style a cell ou linha inteira. - sera possivel
* fazer tudo na mesma linha com Fluent Interfaces. - collSpan ou gredSpan e
* mais relacionado a celula do que Style. Por isso nao esta no Style. -
* sera possivel passar String ou voce mandar seu Paragraph, que
*
* # Desired tbl.showHeaderonEveryPage(); tbl.addRow("Pele", "1281",
* "Brazil").withStyle(); tbl.addRow(Cell.with("Pele").withStyle().bold(),
* "1281", "Brazil");
* tbl.addRow(Cell.with("line has merge").collSpan(2).withStyle().bold(),
* "Brazil"); tbl.addRow("Style applied to the whole line", "",
* "").withStyle().bold();
* tbl.addRow(Paragraph.with("Paragraph 01").create(), "", ""
* ).withStyle().bold();
*
*
* <w:tcPr> <w:tcW w:w="4258" w:type="dxa"/> <w:gridSpan w:val="2"/>
* </w:tcPr>
*
* <w:tcPr> <w:tcW w:w="4258" w:type="dxa"/> <w:shd w:val="clear"
* w:color="auto" w:fill="00FFFF"/> </w:tcPr>
*
<w:tr wsp:rsidR="00505659" wsp:rsidRPr="00505659">
<w:tc>
<w:tcPr>
<w:tcW w:w="4258" w:type="dxa"/>
<w:gridSpan w:val="2"/>
</w:tcPr>
<w:p wsp:rsidR="00505659" wsp:rsidRPr="00505659" wsp:rsidRDefault="00505659">
<w:r wsp:rsidRPr="00505659">
<w:t>* Arthur Friedenreich</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="4258" w:type="dxa"/>
</w:tcPr>
<w:p wsp:rsidR="00505659" wsp:rsidRPr="00505659" wsp:rsidRDefault="00505659">
<w:r wsp:rsidRPr="00505659">
<w:t>Brazil</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
*/
}
| leonardoanalista/java2word | java2word/src/main/java/word/w2004/elements/TableV2.java | Java | mit | 4,644 |
<?php
namespace CallFire\Api\Soap\Structure;
class Type
{
}
| CallFire/CallFire-PHP-SDK | src/CallFire/Api/Soap/Structure/Type.php | PHP | mit | 63 |
#pragma once
#include "GCNTypes.hpp"
#include "zeus/zeus.hpp"
#include "CMaterialList.hpp"
namespace urde {
class CCollisionInfoList;
namespace CollisionUtil {
bool LineIntersectsOBBox(const zeus::COBBox&, const zeus::CMRay&, float&);
u32 RayAABoxIntersection(const zeus::CMRay&, const zeus::CAABox&, float&, float&);
u32 RayAABoxIntersection(const zeus::CMRay&, const zeus::CAABox&, zeus::CVector3f&, float&);
u32 RayAABoxIntersection_Double(const zeus::CMRay&, const zeus::CAABox&, zeus::CVector3f&, double&);
bool RaySphereIntersection_Double(const zeus::CSphere&, const zeus::CVector3f&, const zeus::CVector3f&, double&);
bool RaySphereIntersection(const zeus::CSphere& sphere, const zeus::CVector3f& pos, const zeus::CVector3f& dir,
float mag, float& T, zeus::CVector3f& point);
bool RayTriangleIntersection_Double(const zeus::CVector3f& point, const zeus::CVector3f& dir,
const zeus::CVector3f* verts, double& d);
bool RayTriangleIntersection(const zeus::CVector3f& point, const zeus::CVector3f& dir, const zeus::CVector3f* verts,
float& d);
void FilterOutBackfaces(const zeus::CVector3f& vec, const CCollisionInfoList& in, CCollisionInfoList& out);
void FilterByClosestNormal(const zeus::CVector3f& norm, const CCollisionInfoList& in, CCollisionInfoList& out);
bool AABoxAABoxIntersection(const zeus::CAABox& aabb0, const CMaterialList& list0, const zeus::CAABox& aabb1,
const CMaterialList& list1, CCollisionInfoList& infoList);
bool AABoxAABoxIntersection(const zeus::CAABox& aabb0, const zeus::CAABox& aabb1);
bool TriBoxOverlap(const zeus::CVector3f& boxcenter, const zeus::CVector3f& boxhalfsize,
const zeus::CVector3f& trivert0, const zeus::CVector3f& trivert1, const zeus::CVector3f& trivert2);
double TriPointSqrDist(const zeus::CVector3f& point, const zeus::CVector3f& trivert0, const zeus::CVector3f& trivert1,
const zeus::CVector3f& trivert2, float* baryX, float* baryY);
bool TriSphereOverlap(const zeus::CSphere& sphere, const zeus::CVector3f& trivert0, const zeus::CVector3f& trivert1,
const zeus::CVector3f& trivert2);
bool TriSphereIntersection(const zeus::CSphere& sphere, const zeus::CVector3f& trivert0,
const zeus::CVector3f& trivert1, const zeus::CVector3f& trivert2, zeus::CVector3f& point,
zeus::CVector3f& normal);
bool BoxLineTest(const zeus::CAABox& aabb, const zeus::CVector3f& point, const zeus::CVector3f& dir, float& tMin,
float& tMax, int& axis, bool& sign);
bool LineCircleIntersection2d(const zeus::CVector3f& point, const zeus::CVector3f& dir, const zeus::CSphere& sphere,
int axis1, int axis2, float& d);
bool MovingSphereAABox(const zeus::CSphere& sphere, const zeus::CAABox& aabb, const zeus::CVector3f& dir, double& d,
zeus::CVector3f& point, zeus::CVector3f& normal);
bool AABox_AABox_Moving(const zeus::CAABox& aabb0, const zeus::CAABox& aabb1, const zeus::CVector3f& dir, double& d,
zeus::CVector3f& point, zeus::CVector3f& normal);
void AddAverageToFront(const CCollisionInfoList& in, CCollisionInfoList& out);
} // namespace CollisionUtil
} // namespace urde
| RetroView/PathShagged | Runtime/Collision/CollisionUtil.hpp | C++ | mit | 3,343 |
import {
ActionBar,
Avatar,
Breadcrumb,
BusyIndicator,
Button,
ButtonGroup,
Calendar,
ComboboxInput,
Counter,
DatePicker,
Dialog,
Checkbox,
FormFieldset,
FormGroup,
FormInput,
FormItem,
FormLabel,
FormLegend,
FormRadioGroup,
FormRadioItem,
FormSelect,
FormSet,
FormTextarea,
Icon,
Image,
InfoLabel,
InlineHelp,
InputGroup,
LayoutGrid,
LayoutPanel,
Link,
List,
LocalizationEditor,
Menu,
MessageStrip,
MultiInput,
ObjectStatus,
Pagination,
Popover,
SearchInput,
Select,
Shellbar,
SideNav,
StepInput,
Switch,
Tab,
TabGroup,
Table,
Tile,
Time,
TimePicker,
Title,
Token,
TreeView,
} from "fundamental-react";
import * as React from "react";
const counter = <Counter>101</Counter>;
const actionBars = (
<div>
<ActionBar
actions={(
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url='#'>Option 1</Menu.Item>
<Menu.Item url='#'>Option 2</Menu.Item>
<Menu.Item url='#'>Option 3</Menu.Item>
<Menu.Item url='#'>Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Button glyph='vertical-grip' option='transparent' />}
placement='bottom-end' />
)}
description={'Action Bar Description'}
title={'Page Title'}
/>
<ActionBar
actions={(
<>
<Button>Button</Button>
<Button option='emphasized'>Button</Button>
</>
)}
description={'Action Bar Description'}
title={'Page Title'}
/>
<ActionBar
actions={(
<>
<Button>Button</Button>
<Button option='emphasized'>Button</Button>
</>
)}
description={'Action Bar Description'}
onBackClick={() => null}
title={'Page Title'}
/>
</div>
);
const avatar = (
<Avatar color={1} tile={false} />
);
const breadcrumb = (
<Breadcrumb>
<Breadcrumb.Item name="Link Text" url="#" />
<Breadcrumb.Item name="Link Text" url="#" />
<Breadcrumb.Item name="Link Text" url="#" />
</Breadcrumb>
);
const busyIndicator = (
<BusyIndicator show/>
);
const buttons = (
<div>
<Button onClick={function w() {}} option="emphasized">
Emphasized Button
</Button>
<Button onClick={function w() {}}>Regular Button</Button>
<Button onClick={function w() {}} option="transparent">
Light Button
</Button>
<Button>Action Button</Button>
<Button type="standard">Standard Button</Button>
<Button type="positive">Positive Button</Button>
<Button type="medium">Medium Button</Button>
<Button type="negative">Negative Button</Button>
<Button glyph="cart" option="emphasized">
Add to Cart
</Button>
<Button glyph="cart">Add to Cart</Button>
<Button glyph="filter" option="transparent">
Add to Cart
</Button>
<Button glyph="accept" option="emphasized" type="positive">
Approve
</Button>
<Button glyph="decline" option="emphasized" type="negative">
Reject
</Button>
<Button glyph="alert" option="emphasized" type="medium">
Review
</Button>
<br />
<br />
<br />
<Button glyph="cart" option="emphasized" />
<Button glyph="cart" />
<Button glyph="filter" option="transparent" />
<Button glyph="accept" option="emphasized" type="positive" />
<Button glyph="decline" option="emphasized" type="negative" />
<Button glyph="alert" option="emphasized" type="medium" />
<Button>Default</Button>
<Button compact>Compact</Button>
<Button option="emphasized">Normal State</Button>
<Button option="emphasized" selected>
Selected State
</Button>
<Button disabled option="emphasized">
Disabled State
</Button>
<br />
<br />
<Button>Normal State</Button>
<Button selected>Selected State</Button>
<Button disabled>Disabled State</Button>
<br />
<br />
<Button option="transparent">Normal State</Button>
<Button option="transparent" selected>
Selected State
</Button>
<Button disabled option="transparent">
Disabled State
</Button>
<br />
<br />
<Button type="standard">Normal State</Button>
<Button selected type="standard">
Selected State
</Button>
<Button disabled type="standard">
Disabled State
</Button>
<br />
<br />
<Button type="positive">Normal State</Button>
<Button selected type="positive">
Selected State
</Button>
<Button disabled type="positive">
Disabled State
</Button>
<br />
<br />
<Button type="medium">Normal State</Button>
<Button selected type="medium">
Selected State
</Button>
<Button disabled type="medium">
Disabled State
</Button>
<br />
<br />
<Button type="negative">Normal State</Button>
<Button selected type="negative">
Selected State
</Button>
<Button disabled type="negative">
Disabled State
</Button>
</div>
);
const buttonGroups = (
<div>
<ButtonGroup>
<Button glyph="survey" />
<Button glyph="pie-chart" selected />
<Button glyph="pool" />
</ButtonGroup>
<ButtonGroup>
<Button compact>Left</Button>
<Button compact selected>
Middle
</Button>
<Button compact>Right</Button>
</ButtonGroup>
</div>
);
const calendars = (
<div>
<Calendar />
<Calendar
disableBeforeDate={new Date("2018-08-02T22:00:00.000Z")}
disableWeekends
/>
<Calendar
blockedDates={[
new Date("2018-01-31T23:00:00.000Z"),
new Date("2018-04-02T22:00:00.000Z")
]}
disableWeekday={["Monday", "Tuesday"]}
/>
<Calendar enableRangeSelection />
</div>
);
const comboboxInput = (
<ComboboxInput
list=''
menu={
<Menu>
<Menu.List>
<Menu.Item url="/">Pear</Menu.Item>
<Menu.Item url="/">Strawberry</Menu.Item>
<Menu.Item url="/">Raspberry</Menu.Item>
<Menu.Item isLink url="/">
+ New Item
</Menu.Item>
</Menu.List>
</Menu>
}
placeholder="Select Fruit"
/>
);
const contextualMenus = (
<div>
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Button glyph="vertical-grip" option="transparent" />}
noArrow
/>
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Button>More</Button>}
noArrow
/>
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Button option="transparent">More</Button>}
noArrow
/>
</div>
);
const datePickers = (
<div>
<DatePicker
disableBeforeDate={new Date("2018-12-23T23:00:00.000Z")}
disableWeekends
/>
<DatePicker
blockedDates={[
new Date("2018-11-30T23:00:00.000Z"),
new Date("2018-12-22T23:00:00.000Z")
]}
compact
disableWeekday={["Monday", "Tuesday"]}
/>
<DatePicker disableFutureDates enableRangeSelection />
<DatePicker compact disablePastDates enableRangeSelection />
</div>
);
const dialogs = (
<div>
<button className="fd-button" onClick={function w() {}}>
Show Information Modal
</button>
<Dialog actions={[]} onClose={function w() {}} title="Product Added">
<div>
<b>The new product have been added to your catalog.</b>
<br />
<br />
Automatic Product ID:
<b>PD-3465334</b>
<br />
<br />
Expiration date:
<b>13/03/2018</b>
<br />
<br />
</div>
</Dialog>
<Dialog
actions={[
<>
<Button onClick={function w() {}} type="standard">
No Way
</Button>
<Button onClick={function w() {}}>Sure</Button>
</>
]}
onClose={function w() {}}
title="Delete"
>
<div>
Do you want to delete item
<b>X</b>?
</div>
</Dialog>
<Dialog
actions={[
<>
<Button onClick={function w() {}} type="standard">
Cancel
</Button>
<Button onClick={function w() {}}>Invite</Button>
</>
]}
onClose={function w() {}}
title="Invite user"
>
<div className="fd-form__group">
<div className="fd-form__item">
<label className="fd-form__label is-required">Email</label>
<input
className="fd-form__control"
onChange={function w() {}}
type="text"
value=""
/>
</div>
</div>
</Dialog>
</div>
);
const forms = (
<div>
<FormSet>
<FormItem>
<FormLabel htmlFor="input-1">Default Input</FormLabel>
<FormInput
id="input-1"
placeholder="Field placeholder text"
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="input-2" required>
Required Input
</FormLabel>
<FormInput
id="input-2"
placeholder="Field placeholder text"
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="input-3" required>
Password
</FormLabel>
<FormInput
id="input-3"
placeholder="Field placeholder text"
type="password"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="textarea-1" required>
Text area
</FormLabel>
<FormTextarea
defaultValue=" Pellentesque metus lacus commodo eget justo ut rutrum varius nunc."
id="textarea-1"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="input-4">
Input with inline help
<span className="fd-inline-help fd-has-float-right">
<span className="fd-inline-help__content fd-inline-help__content--bottom-right">
Lorem ipsum dolor sit amet, consectetur adipiscing.
</span>
</span>
</FormLabel>
<FormInput id="input-4" type="text" />
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="input-5">Input with Help Message</FormLabel>
<FormInput id="input-5" type="text" />
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="OatmD552">Normal Input</FormLabel>
<FormInput
id="OatmD552"
placeholder="Field placeholder text"
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="OatmD553">Valid Input</FormLabel>
<FormInput
id="OatmD553"
placeholder="Field placeholder text"
state="valid"
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="OatmD554">Invalid Input</FormLabel>
<FormInput
id="OatmD554"
placeholder="Field placeholder text"
state="invalid"
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="OatmD555">Warning Input</FormLabel>
<FormInput
id="OatmD555"
placeholder="Field placeholder text"
state="warning"
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="OatmD557">Disabled Input</FormLabel>
<FormInput
disabled
id="OatmD557"
placeholder="Field placeholder text"
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="OatmD558">Readonly Input</FormLabel>
<FormInput
id="OatmD558"
placeholder="Field placeholder text"
readOnly
type="text"
/>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="select-1">Default Select</FormLabel>
<FormSelect id="select-1">
<option value="1">
Duis malesuada odio volutpat elementum
</option>
<option value="2">Suspendisse ante ligula</option>
<option value="3">
Sed bibendum sapien at posuere interdum
</option>
</FormSelect>
</FormItem>
</FormSet>
<FormSet>
<FormItem>
<FormLabel htmlFor="select-1">Default Select</FormLabel>
<FormSelect disabled id="select-1">
<option value="1">
Duis malesuada odio volutpat elementum
</option>
<option value="2">Suspendisse ante ligula</option>
<option value="3">
Sed bibendum sapien at posuere interdum
</option>
</FormSelect>
</FormItem>
</FormSet>
<FormFieldset>
<FormLegend>Radio buttons</FormLegend>
<FormRadioGroup>
<FormRadioItem id="radio-1">Option 1</FormRadioItem>
<FormRadioItem id="radio-2">Option 2</FormRadioItem>
<FormRadioItem defaultChecked id="radio-3">
Option 3
</FormRadioItem>
</FormRadioGroup>
</FormFieldset>
<FormFieldset>
<FormLegend>Radio buttons disabled</FormLegend>
<FormRadioGroup>
<FormRadioItem defaultChecked disabled id="radio-4">
Option 1
</FormRadioItem>
<FormRadioItem disabled id="radio-5">
Option 2
</FormRadioItem>
<FormRadioItem disabled id="radio-6">
Option 3
</FormRadioItem>
</FormRadioGroup>
</FormFieldset>
<FormFieldset>
<FormLegend>Inline Radio buttons</FormLegend>
<FormRadioGroup inline>
<FormRadioItem id="radio-7">Option 1</FormRadioItem>
<FormRadioItem defaultChecked id="radio-8">
Option 2
</FormRadioItem>
<FormRadioItem id="radio-9">Option 3</FormRadioItem>
</FormRadioGroup>
</FormFieldset>
<FormFieldset>
<FormLegend>Checkboxes</FormLegend>
<FormItem isCheck>
<FormInput
id="checkbox-1"
name="checkbox-name-1"
type="checkbox"
value=""
/>
<FormLabel htmlFor="checkbox-1">Option One</FormLabel>
</FormItem>
<FormItem isCheck>
<FormInput
id="checkbox-2"
name="checkbox-name-2"
type="checkbox"
value=""
/>
<FormLabel htmlFor="checkbox-2">Option Two</FormLabel>
</FormItem>
<FormItem isCheck>
<FormInput
id="checkbox-3"
name="checkbox-name-3"
type="checkbox"
value=""
/>
<FormLabel htmlFor="checkbox-3">Option Three</FormLabel>
</FormItem>
</FormFieldset>
<FormFieldset>
<FormLegend>Inline Checkbox buttons</FormLegend>
<FormItem isCheck isInline>
<FormLabel htmlFor="checkbox-4">
<FormInput
id="checkbox-4"
name="checkbox-name-4"
type="checkbox"
value=""
/>
Option One
</FormLabel>
</FormItem>
<FormItem isCheck isInline>
<FormLabel htmlFor="checkbox-5">
<FormInput
id="checkbox-5"
name="checkbox-name-5"
type="checkbox"
value=""
/>
Option Two
</FormLabel>
</FormItem>
<FormItem isCheck isInline>
<FormLabel htmlFor="checkbox-6">
<Checkbox
id="checkbox-6"
name="checkbox-name-6"
type="checkbox"
value=""
/>
Option Three
</FormLabel>
</FormItem>
</FormFieldset>
</div>
);
const icons = (
<div>
<Icon glyph="cart" size="s" />
<Icon glyph="cart" />
<Icon glyph="cart" size="m" />
<Icon glyph="cart" size="l" />
<Icon glyph="cart" size="xl" />
</div>
);
const images = (
<div>
<Image photo="https://placeimg.com/400/400/nature" size="s" />
<Image photo="https://placeimg.com/400/400/nature" size="m" />
<Image photo="https://placeimg.com/400/400/nature" size="l" />
<Image
photo="https://placeimg.com/400/400/nature"
size="s"
type="circle"
/>
<Image
photo="https://placeimg.com/400/400/nature"
size="m"
type="circle"
/>
<Image
photo="https://placeimg.com/400/400/nature"
size="l"
type="circle"
/>
</div>
);
const infoLabels = (
<div>
<InfoLabel>Default</InfoLabel>
<InfoLabel glyph='key'>Icon</InfoLabel>
<InfoLabel glyph='upload-to-cloud' />
<InfoLabel numeric>1</InfoLabel>
<InfoLabel numeric>10000</InfoLabel>
<InfoLabel color={1}>Default</InfoLabel>
<InfoLabel color={2}>Default</InfoLabel>
<InfoLabel color={3}>Default</InfoLabel>
<InfoLabel color={4}>Default</InfoLabel>
<InfoLabel color={5}>Default</InfoLabel>
<InfoLabel color={6}>Default</InfoLabel>
<InfoLabel color={7}>Default</InfoLabel>
<InfoLabel color={8}>Default</InfoLabel>
<InfoLabel color={9}>Default</InfoLabel>
<InfoLabel color={10}>Default</InfoLabel>
</div>
);
const inlineHelp = (
<div>
Bottom Right (Default)
<InlineHelp
placement="bottom-right"
text="Lorem ipsum dolor sit amet, consectetur adipiscing."
/>
</div>
);
const formGroup = <FormGroup />;
const inputGroup = (
<div>
<FormGroup>
<FormLabel>Left Aligned Text Addon</FormLabel>
<FormItem>
<InputGroup
addon="$"
addonPos="before"
inputValue="1234567890"
/>
</FormItem>
</FormGroup>
<br />
<FormGroup>
<FormLabel>Right Aligned Text Addon</FormLabel>
<FormItem>
<InputGroup addon="€" inputValue="1234567890" />
</FormItem>
</FormGroup>
<br />
<p>Compact mode</p>
<FormGroup>
<FormLabel>Left Aligned Text Addon</FormLabel>
<FormItem>
<InputGroup
addon="$"
addonPos="before"
compact
inputValue="1234567890"
/>
</FormItem>
</FormGroup>
<br />
<FormGroup>
<FormLabel>Right Aligned Text Addon</FormLabel>
<FormItem>
<InputGroup addon="€" compact inputValue="1234567890" />
</FormItem>
</FormGroup>
<FormGroup>
<FormLabel>Right Aligned Text Addon</FormLabel>
<FormItem>
<InputGroup inputType="number" inputValue={100} />
</FormItem>
</FormGroup>
<br />
<p>Compact mode</p>
<FormGroup>
<FormLabel>Right Aligned Text Addon</FormLabel>
<FormItem>
<InputGroup compact inputType="number" inputValue={100} />
</FormItem>
</FormGroup>
<FormGroup>
<FormLabel>Search Input</FormLabel>
<FormItem>
<InputGroup inputPlaceholder="Search Term" inputType="search" />
</FormItem>
</FormGroup>
<br />
<p>Compact mode</p>
<FormGroup>
<FormLabel>Search Input</FormLabel>
<FormItem>
<InputGroup
compact
inputPlaceholder="Search Term"
inputType="search"
/>
</FormItem>
</FormGroup>
<br />
<br />
<FormGroup>
<FormLabel>Input with icon on the left</FormLabel>
<FormItem>
<InputGroup
addonPos="before"
glyph="globe"
inputValue="1234567890"
/>
</FormItem>
</FormGroup>
<br />
<p>Compact mode</p>
<FormGroup>
<FormLabel>Input with icon on the left</FormLabel>
<FormItem>
<InputGroup
addonPos="before"
compact
glyph="globe"
inputValue="1234567890"
/>
</FormItem>
</FormGroup>
<br />
<br />
<FormGroup>
<FormLabel>Input with icon on the right</FormLabel>
<FormItem>
<InputGroup glyph="hide" inputValue="1234567890" />
</FormItem>
</FormGroup>
<br />
<p>Compact mode</p>
<FormGroup>
<FormLabel>Input with icon on the right</FormLabel>
<FormItem>
<InputGroup compact glyph="hide" inputValue="1234567890" />
</FormItem>
</FormGroup>
<FormGroup>
<FormLabel>Input with text action</FormLabel>
<FormItem>
<InputGroup actions inputValue="1234567890">
<Button option="transparent">Button</Button>
</InputGroup>
</FormItem>
</FormGroup>
<br />
<p>Compact mode</p>
<FormGroup>
<FormLabel>Input with text action</FormLabel>
<FormItem>
<InputGroup actions compact inputValue="1234567890">
<Button option="transparent">Button</Button>
</InputGroup>
</FormItem>
</FormGroup>
<br />
<br />
<FormGroup>
<FormLabel>Input with icon text action</FormLabel>
<FormItem>
<InputGroup actions>
<Button glyph="navigation-down-arrow" option="transparent" />
</InputGroup>
</FormItem>
</FormGroup>
<br />
<p>Compact mode</p>
<FormGroup>
<FormLabel>Input with icon text action</FormLabel>
<FormItem>
<InputGroup actions compact>
<Button glyph="navigation-down-arrow" option="transparent" />
</InputGroup>
</FormItem>
</FormGroup>
</div>
);
const links = (
<div>
<Link href='#'>Default Link</Link>
<Link disabled href='#'>Disabled Link</Link>
</div>
);
const lists = (
<div>
<List compact noBorder>
<List.Header>List Header</List.Header>
<List.Item>
<List.Text>List Item 1</List.Text>
</List.Item>
<List.Item>
<List.Text>List Item 2</List.Text>
<List.Icon glyph='navigation-right-arrow' />
</List.Item>
<List.Item>
<List.Text>List Item 3</List.Text>
<List.Text secondary>secondary</List.Text>
</List.Item>
<List.Item>
<List.Text>List Item 4</List.Text>
</List.Item>
<List.Footer>List Footer</List.Footer>
</List>
</div>
);
const localizationEditors = (
<div>
<LocalizationEditor
control={{
label: "Localization Editor Label",
language: "EN*",
placeholder: "Enter Label"
}}
menu={[
{
language: "ES",
placeholder: "Enter Label"
},
{
language: "CH",
placeholder: "Enter Label"
},
{
language: "PL",
placeholder: "Enter Label"
}
]}
/>
<br />
<LocalizationEditor
compact
control={{
label: "Localization Editor Compact Mode",
language: "EN*",
placeholder: "Enter Label"
}}
menu={[
{
language: "ES",
placeholder: "Enter Label"
},
{
language: "CH",
placeholder: "Enter Label"
},
{
language: "PL",
placeholder: "Enter Label"
}
]}
/>
<LocalizationEditor
control={{
label: "Localization Editor Label",
language: "EN*",
placeholder: "Enter Label"
}}
menu={[
{
language: "ES",
placeholder: "Enter Label"
},
{
language: "CH",
placeholder: "Enter Label"
},
{
language: "PL",
placeholder: "Enter Label"
}
]}
textarea
/>
</div>
);
const menus = (
<div>
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
<Menu>
<Menu.List>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
</Menu.List>
<Menu.Group title="Group Header">
<Menu.List>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
</Menu.List>
</Menu.Group>
</Menu>
<Menu>
<Menu.List>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
</Menu.List>
</Menu>
<Menu addonBefore>
<Menu.List>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item addon="accept">
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
<Menu.Item>
<Menu.Item url="/">Option 1</Menu.Item>
</Menu.Item>
</Menu.List>
</Menu>
</div>
);
const messageStrips = (
<div>
<MessageStrip
dismissible
link='#'
linkText='link'>
Default MessageStrip
</MessageStrip>
<MessageStrip
dismissible
link='#'
linkText='Learn More'
type='error'>
Error Message.
</MessageStrip>
<MessageStrip noGlyph>
Error Message with no icon
</MessageStrip>
</div>
);
const multiInputs = (
<div>
<MultiInput
data={[
"Apple",
"Apricot",
"Acai",
"African Moringa",
"Bearberry",
"Bilberry",
"Blood orange",
"Barbadine",
"Barbados cherry",
"Balsam Apple",
"Chokeberry",
"Cranberry",
"Cupuacu"
]}
onTagsUpdate={function w() {}}
placeHolder="Select a Fruit"
/>
<MultiInput
compact
data={[
"Apple",
"Apricot",
"Acai",
"African Moringa",
"Bearberry",
"Bilberry",
"Blood orange",
"Barbadine",
"Barbados cherry",
"Balsam Apple",
"Chokeberry",
"Cranberry",
"Cupuacu"
]}
onTagsUpdate={function w() {}}
placeHolder="Select a Fruit"
/>
</div>
);
const objectStatus = (
<ObjectStatus indication={1} size={'l'}/>
);
const paginations = (
<div>
<Pagination itemsTotal={101} onClick={function w() {}} />
<Pagination
initialPage={11}
itemsTotal={101}
onClick={function w() {}}
/>
<Pagination
itemsPerPage={25}
itemsTotal={101}
onClick={function w() {}}
/>
<Pagination
displayTotal={false}
itemsTotal={101}
onClick={function w() {}}
/>
<Pagination
itemsTotal={101}
onClick={function w() {}}
totalText="Dalmations"
/>
</div>
);
const layoutPanel = (
<LayoutPanel>
<LayoutPanel.Header>
LayoutPanel Head
</LayoutPanel.Header>
<LayoutPanel.Body>
LayoutPanel Body
</LayoutPanel.Body>
</LayoutPanel>
);
const popovers = (
<div>
<div>
<div className="fd-container">
<div className="fd-col--shift-3 fd-col--2 fd-has-text-align-center">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-up-arrow"
option="transparent"
/>
}
placement="top-start"
/>
</div>
<div className="fd-col--2 fd-has-text-align-center">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-up-arrow"
option="transparent"
/>
}
placement="top"
/>
</div>
<div className="fd-col--2 fd-has-text-align-center">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-up-arrow"
option="transparent"
/>
}
placement="top-end"
/>
</div>
</div>
<div className="fd-container">
<div className="fd-col--shift-2 fd-col--2">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-left-arrow"
option="transparent"
/>
}
placement="left-start"
/>
</div>
<div className="fd-col--shift-4 fd-col--2 fd-has-text-align-right">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-right-arrow"
option="transparent"
/>
}
placement="right-start"
/>
</div>
</div>
<div className="fd-container">
<div className="fd-col--shift-2 fd-col--2">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-left-arrow"
option="transparent"
/>
}
placement="left"
/>
</div>
<div className="fd-col--shift-4 fd-col--2 fd-has-text-align-right">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-right-arrow"
option="transparent"
/>
}
placement="right"
/>
</div>
</div>
<div className="fd-container">
<div className="fd-col--shift-2 fd-col--2">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-left-arrow"
option="transparent"
/>
}
placement="left-end"
/>
</div>
<div className="fd-col--shift-4 fd-col--2 fd-has-text-align-right">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-right-arrow"
option="transparent"
/>
}
placement="right-end"
/>
</div>
</div>
<div className="fd-container">
<div className="fd-col--shift-3 fd-col--2 fd-has-text-align-center">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-down-arrow"
option="transparent"
/>
}
placement="bottom-start"
/>
</div>
<div className="fd-col--2 fd-has-text-align-center">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-down-arrow"
option="transparent"
/>
}
placement="bottom"
/>
</div>
<div className="fd-col--2 fd-has-text-align-center">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button
glyph="navigation-down-arrow"
option="transparent"
/>
}
placement="bottom-end"
/>
</div>
</div>
</div>
<div className="fd-doc__margin--popover">
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Icon glyph="cart" size="xl" />}
noArrow
placement="left"
/>
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Image
photo="https://placeimg.com/400/400/nature"
size="m"
type="circle"
/>
}
noArrow
placement="top"
/>
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Icon glyph="menu2" size="xl" />}
noArrow
placement="bottom"
/>
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Icon glyph="menu2" size="xl" />}
noArrow
placement="right"
/>
</div>
<div>
<Button onClick={function w() {}}>Show Modal</Button>
<Dialog
actions={[]}
bodyProps={{
style: {
height: "200px",
overflowY: "auto",
textAlign: "center",
width: "400px"
}
}}
onClose={function w() {}}
title="Overflow Example"
>
<p>
Click the icon to show the popover and then scroll within
the modal body...
</p>
<br />
<br />
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Icon glyph="menu2" size="xl" />}
placement="bottom"
/>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</Dialog>
</div>
</div>
);
const searchInputs = (
<div>
<SearchInput
onEnter={function w() {}}
placeholder="Enter a fruit"
searchList={[
{
callback: function w() {},
text: "apple"
},
{
callback: function w() {},
text: "apricot"
},
{
callback: function w() {},
text: "banana"
},
{
callback: function w() {},
text: "blueberry"
},
{
callback: function w() {},
text: "blackberry"
},
{
callback: function w() {},
text: "calabash"
},
{
callback: function w() {},
text: "clementines"
},
{
callback: function w() {},
text: "kiwi"
},
{
callback: function w() {},
text: "orange"
}
]}
/>
<br />
<SearchInput
noSearchBtn
onChange={function w() {}}
placeholder="Enter a fruit"
/>
<br />
<SearchInput
compact
onEnter={function w() {}}
placeholder="Enter a fruit"
searchList={[
{
callback: function w() {},
text: "apple"
},
{
callback: function w() {},
text: "apricot"
},
{
callback: function w() {},
text: "banana"
},
{
callback: function w() {},
text: "blueberry"
},
{
callback: function w() {},
text: "blackberry"
},
{
callback: function w() {},
text: "calabash"
},
{
callback: function w() {},
text: "clementines"
},
{
callback: function w() {},
text: "kiwi"
},
{
callback: function w() {},
text: "orange"
}
]}
/>
</div>
);
const selects = (
<div>
<Select placeholder='Select' options={[
{text: "List Item 1", key: "1"},
{text: "List Item 2", key: "2"}
]} selectedKey={"2"}>
</Select>
<Select compact validationState={{state: 'warning', text: 'Validated'}}>
</Select>
</div>
);
const shellbars = (
<div>
<Shellbar
logo={
<img
alt="SAP"
src="//unpkg.com/fiori-fundamentals/dist/images/sap-logo.png"
/>
}
productTitle="Corporate Portal"
profile={{
colorAccent: 8,
initials: "JS",
userName: "John Snow"
}}
profileMenu={[
{
callback: function w() {},
glyph: "action-settings",
name: "Settings",
size: "s"
},
{
callback: function w() {},
glyph: "log",
name: "Sign Out",
size: "s"
}
]}
/>
<Shellbar
backAction={function w() {}}
logo={
<img
alt="SAP"
src="//unpkg.com/fiori-fundamentals/dist/images/sap-logo.png"
/>
}
productTitle="Corporate Portal"
profile={{
colorAccent: 8,
initials: "JS",
userName: "John Snow"
}}
profileMenu={[
{
callback: function w() {},
glyph: "action-settings",
name: "Settings",
size: "s"
},
{
callback: function w() {},
glyph: "log",
name: "Sign Out",
size: "s"
}
]}
/>
<Shellbar
logoSAP
notifications={{
callback: function w() {},
label: "Notifications",
notificationCount: 2
}}
productMenu={[
{
callback: function w() {},
name: "Application A"
},
{
callback: function w() {},
name: "Application B"
},
{
callback: function w() {},
name: "Application C"
},
{
callback: function w() {},
name: "Application D"
}
]}
productTitle="Corporate Portal"
profile={{
image:
"/fundamental-react/static/media/headshot-male.10d4e22e.jpg",
userName: "John Snow"
}}
profileMenu={[
{
callback: function w() {},
glyph: "action-settings",
name: "Settings",
size: "s"
},
{
callback: function w() {},
glyph: "log",
name: "Sign Out",
size: "s"
}
]}
searchInput={{
callback: function w() {},
label: "Search",
onSearch: function w() {},
placeholder: "Enter a fruit"
}}
subtitle="Subtitle"
/>
<Shellbar
actions={[
{
callback: function w() {},
glyph: "settings",
label: "Settings",
menu: (
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
</Menu.List>
</Menu>
),
notificationCount: 5
}
]}
copilot
logoSAP
notifications={{
callback: function w() {},
label: "Notifications",
noNotificationsBody: (
<Menu>
<Menu.List>
<Menu.Item>There are no notifications</Menu.Item>
</Menu.List>
</Menu>
),
notificationCount: 2,
notificationsBody: (
<Menu>
<Menu.List>
<Menu.Item url="/">Notification 1</Menu.Item>
<Menu.Item url="/">Notification 2</Menu.Item>
<Menu.Item url="/">Notification 3</Menu.Item>
</Menu.List>
</Menu>
)
}}
productMenu={[
{
callback: function w() {},
name: "Application A"
},
{
callback: function w() {},
name: "Application B"
},
{
callback: function w() {},
name: "Application C"
},
{
callback: function w() {},
name: "Application D"
}
]}
productSwitch={{
label: "Product Switcher"
}}
productSwitchList={[
{
callback: function w() {},
glyph: "home",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Fiori Home"
},
{
callback: function w() {},
glyph: "cloud",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "S/4 HANA Cloud"
},
{
callback: function w() {},
glyph: "business-objects-experience",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Analytics Cloud"
},
{
callback: function w() {},
glyph: "activate",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Ariba"
},
{
callback: function w() {},
glyph: "message-success",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "SuccessFactors"
},
{
callback: function w() {},
glyph: "retail-store",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Commerce Cloud"
},
{
callback: function w() {},
glyph: "customer-view",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Gigya"
},
{
callback: function w() {},
glyph: "globe",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Callidus Cloud"
},
{
callback: function w() {},
glyph: "work-history",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Fieldglass"
},
{
callback: function w() {},
glyph: "area-chart",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Concur"
},
{
callback: function w() {},
glyph: "customer-view",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Cloud for Customer"
},
{
callback: function w() {},
glyph: "customer",
image:
"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
title: "Cloud Portal"
}
]}
productTitle="Corporate Portal"
profile={{
image:
"/fundamental-react/static/media/headshot-male.10d4e22e.jpg",
userName: "John Snow"
}}
profileMenu={[
{
callback: function w() {},
glyph: "action-settings",
name: "Settings",
size: "s"
},
{
callback: function w() {},
glyph: "log",
name: "Sign Out",
size: "s"
}
]}
searchInput={{
callback: function w() {},
label: "Search",
onSearch: function w() {},
placeholder: "Enter a fruit",
searchList: [
{
callback: function w() {},
text: "apple"
},
{
callback: function w() {},
text: "apricot"
},
{
callback: function w() {},
text: "acai"
},
{
callback: function w() {},
text: "banana"
},
{
callback: function w() {},
text: "berry"
},
{
callback: function w() {},
text: "blueberry"
},
{
callback: function w() {},
text: "blackberry"
},
{
callback: function w() {},
text: "cranberry"
},
{
callback: function w() {},
text: "conkerberry"
},
{
callback: function w() {},
text: "calabash"
},
{
callback: function w() {},
text: "clementines"
},
{
callback: function w() {},
text: "kiwi"
},
{
callback: function w() {},
text: "orange"
}
]
}}
subtitle="Subtitle"
/>
</div>
);
const sideNavs = (
<div>
<SideNav selectedId="item-2">
<SideNav.List>
<SideNav.ListItem id="item-1" name="Link Item" url="#" />
<SideNav.ListItem id="item-2" name="Link Item" url="#" />
<SideNav.ListItem id="item-3" name="Link Item" url="#" />
<SideNav.ListItem id="item-4" name="Link Item" url="#" />
<SideNav.ListItem id="item-5" name="Link Item" url="#" />
</SideNav.List>
</SideNav>
<SideNav selectedId="item_2">
<SideNav.List title="Group Title">
<SideNav.ListItem id="item_1" name="Link Item" url="#" />
<SideNav.ListItem id="item_2">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem id="item_3">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem id="item_4">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem id="item_5">
<a href="#">Link Item</a>
</SideNav.ListItem>
</SideNav.List>
<SideNav.List title="Group Title">
<SideNav.ListItem id="item_6">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem id="item_7">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem id="item_8">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem id="item_9">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem id="item_10">
<a href="#">Link Item</a>
</SideNav.ListItem>
</SideNav.List>
</SideNav>
<SideNav selectedId="item-2">
<SideNav.List>
<SideNav.ListItem id="item-1" name="Link Item 1" url="#" />
<SideNav.ListItem id="item-2" name="Link Item 2" url="#">
<SideNav.List>
<SideNav.ListItem
id="subitem_21"
name="Item 1"
url="#"
/>
<SideNav.ListItem
id="subitem_22"
name="Item 2"
url="#"
/>
<SideNav.ListItem
id="subitem_23"
name="Item 3"
url="#"
/>
<SideNav.ListItem
id="subitem_24"
name="Item 4"
url="#"
/>
</SideNav.List>
</SideNav.ListItem>
<SideNav.ListItem id="item_3" name="Link Item 3" url="#" />
<SideNav.ListItem id="item_4" name="Link Item 4" url="#">
<SideNav.List>
<SideNav.ListItem
id="subitem_41"
name="Item 1"
url="#"
/>
<SideNav.ListItem
id="subitem_42"
name="Item 2"
url="#"
/>
<SideNav.ListItem
id="subitem_43"
name="Item 3"
url="#"
/>
<SideNav.ListItem
id="subitem_44"
name="Item 4"
url="#"
/>
</SideNav.List>
</SideNav.ListItem>
<SideNav.ListItem id="item_5" name="Link Item 5" url="#" />
</SideNav.List>
</SideNav>
<SideNav selectedId="item-2">
<SideNav.List>
<SideNav.ListItem glyph="home" id="item-1">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem glyph="home" id="item-2">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem glyph="home" id="item-3">
<a href="#">Link Item</a>
</SideNav.ListItem>
<SideNav.ListItem
glyph="home"
id="item-4"
name="Link Item"
url="#"
/>
<SideNav.ListItem
glyph="home"
id="item-5"
name="Link Item"
url="#"
/>
</SideNav.List>
</SideNav>
<SideNav selectedId="item-2">
<SideNav.List>
<SideNav.ListItem glyph="home" id="item-1" url="#" />
<SideNav.ListItem glyph="home" id="item-2" url="#" />
<SideNav.ListItem glyph="home" id="item-3" url="#" />
<SideNav.ListItem glyph="home" id="item-4" url="#" />
<SideNav.ListItem glyph="home" id="item-5" url="#" />
</SideNav.List>
</SideNav>
</div>
);
const stepInputs = (
<div>
<StepInput disabled value={10} />
<StepInput readOnly value={10} />
<StepInput
placeholder='Error'
validationState={{
state: 'error',
text: 'Test validation state'
}} />
</div>
);
const tables = (
<div>
<Table
headers={[
"Column Header 1",
"Column Header 2",
"Column Header 3",
"Column Header 4"
]}
tableData={[
{
rowData: ["Data 1", "Data 2", "Data 3", "Data 4"]
},
{
rowData: ["Data 5", "Data 6", "Data 7", "Data 8"]
}
]}
/>
<Table
headers={[
<input type="checkbox" />,
"Avatar",
"email",
"First Name",
"Last Name",
"Date",
" "
]}
tableData={[
{
rowData: [
<input type="checkbox" />,
<Image
photo="https://robohash.org/green?size=50x50"
size="m"
/>,
<a className="fd-has-font-weight-semi" href="#">
user.name@email.com
</a>,
"First Name",
"Last Name",
"01/26/17",
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button glyph="vertical-grip" option="transparent" />
}
placement="bottom-end"
/>
]
},
{
rowData: [
<input type="checkbox" />,
<Image
photo="https://robohash.org/brown?size=50x50"
size="m"
/>,
<a className="fd-has-font-weight-semi" href="#">
florence.garcia@qwerty.io
</a>,
"First Name",
"Last Name",
"07/29/18",
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button glyph="vertical-grip" option="transparent" />
}
placement="bottom-end"
/>
]
},
{
rowData: [
<input type="checkbox" />,
<Image
photo="https://robohash.org/Q27.png?set=set1&size=50x50"
size="m"
/>,
<a className="fd-has-font-weight-semi" href="#">
mark.helper@qwerty.io
</a>,
"First Name",
"Last Name",
"05/26/18",
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button glyph="vertical-grip" option="transparent" />
}
placement="bottom-end"
/>
]
},
{
rowData: [
<input type="checkbox" />,
<Image
photo="https://robohash.org/water?&size=50x50"
size="m"
/>,
<a className="fd-has-font-weight-semi" href="#">
user.name@email.com
</a>,
"First Name",
"Last Name",
"01/26/14",
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={
<Button glyph="vertical-grip" option="transparent" />
}
placement="bottom-end"
/>
]
}
]}
/>
</div>
);
const tabs = (
<div>
<TabGroup>
<Tab id="1" title="Tab 1">
Lorem ipsum dolor sit amet consectetur adipisicing elit.
</Tab>
<Tab id="2" title="Tab 2">
Numquam libero id corporis odit animi voluptat, Lorem ipsum
dolor sit amet consectetur adipisicing elit. Possimus quia
tempore eligendi tempora repellat officia rerum laudantium,
veritatis officiis asperiores ipsum nam, distinctio, dolor
provident culpa voluptatibus esse deserunt animi?
</Tab>
<Tab disabled id="3" title="Tab 3">
Lorem ipsum dolor sit amet consectetur adipisicing elit.
</Tab>
<Tab glyph="cart" id="4">
Please review your shopping chart.
</Tab>
</TabGroup>
</div>
);
const tiles = (
<div>
<Tile>
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<Tile>
<Tile.Media>
<Image photo="https://placeimg.com/400/400/nature" size="m" />
</Tile.Media>
<Tile.Content title="Tile Title" />
</Tile>
<br />
<Tile role="button">
<Tile.Media>
<Image
photo="https://placeimg.com/400/400/nature"
size="l"
type="circle"
/>
</Tile.Media>
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<br />
<Tile role="button">
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<Tile>
<Tile.Content title="Tile Title" />
<Tile.Actions>
<Popover
body={
<Menu>
<Menu.List>
<Menu.Item url="/">Option 1</Menu.Item>
<Menu.Item url="/">Option 2</Menu.Item>
<Menu.Item url="/">Option 3</Menu.Item>
<Menu.Item url="/">Option 4</Menu.Item>
</Menu.List>
</Menu>
}
control={<Button glyph="vertical-grip" option="transparent" />}
placement="bottom-end"
/>
</Tile.Actions>
</Tile>
<Tile product role="button">
<Tile.Media image="https://techne.yaas.io/images/product-thumbnail-wide.png" />
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<br />
<Tile product disabled>
<Tile.Media image="https://techne.yaas.io/images/product-thumbnail-wide.png" />
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<LayoutGrid cols={4}>
<Tile colorAccent={7} rowSpan={2}>
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<Tile>
<Tile.Media>
<Image
photo="https://placeimg.com/400/400/nature"
size="l"
type="circle"
/>
</Tile.Media>
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<Tile>
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<Tile role="button">
<Tile.Content title="Tile Title" />
</Tile>
<Tile>
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
<Tile colorAccent={4} columnSpan={2}>
<Tile.Content title="Tile Title">
<p>Tile Description</p>
</Tile.Content>
</Tile>
</LayoutGrid>
</div>
);
const times = (
<div>
<Time />
<Time format12Hours />
<Time spinners={false} />
<Time showSecond={false} />
<Time disabled />
</div>
);
const timePickers = (
<div>
<TimePicker />
<TimePicker format12Hours />
<TimePicker showSecond={false} />
<TimePicker disabled />
</div>
);
const title = (
<div>
<Title level={1}>Fundamental React Title 1</Title>
<Title level={2}>Fundamental React Title 2</Title>
<Title level={3}>Fundamental React Title 3</Title>
<Title level={4}>Fundamental React Title 4</Title>
<Title level={5}>Fundamental React Title 5</Title>
<Title level={6}>Fundamental React Title 6</Title>
</div>
);
const switches = (
<div>
<Switch>
switch
</Switch>
</div>
);
const tokens = (
<div>
<Token onClick={function w() {}}>Bibendum</Token>
<Token onClick={function w() {}}>Lorem</Token>
<Token onClick={function w() {}}>Dolor</Token>
<Token onClick={function w() {}}>Filter</Token>
</div>
);
const treeViews = (
<div>
<TreeView>
<TreeView.Tree>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 1</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 2</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 1</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 2</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 3</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 1</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>
Grandchild 1
</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>
Grandchild 2
</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
</TreeView.Tree>
</TreeView>
<TreeView>
<TreeView.Head>
<TreeView.Col>Column Header 1</TreeView.Col>
<TreeView.Col>Column Header 2</TreeView.Col>
<TreeView.Col>Column Header 3</TreeView.Col>
<TreeView.Col>Column Header 4</TreeView.Col>
</TreeView.Head>
<TreeView.Tree>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 1</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 1</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>
Grandchild 1
</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>
Great Grandchild 1
</TreeView.Col>
<TreeView.Col>
Data Col 2
</TreeView.Col>
<TreeView.Col>
Data Col 3
</TreeView.Col>
<TreeView.Col>
Data Col 4
</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 2</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 2</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 1</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 2</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 3</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 4</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Child 1</TreeView.Col>
<TreeView.Col>Data Col 2</TreeView.Col>
<TreeView.Col>Data Col 3</TreeView.Col>
<TreeView.Col>Data Col 4</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
</TreeView.Tree>
</TreeView>
<TreeView>
<TreeView.Head>
<TreeView.Col>Column Header 1</TreeView.Col>
<TreeView.Col>Column Header 2</TreeView.Col>
<TreeView.Col>Column Header 3</TreeView.Col>
<TreeView.Col>Column Header 4</TreeView.Col>
</TreeView.Head>
<TreeView.Tree>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col>Row 1</TreeView.Col>
</TreeView.Row>
<TreeView.Branch>
<TreeView.Item>
<TreeView.Row>
<TreeView.Col />
<TreeView.Col>
<a href="http://www.google.com">Google</a>
</TreeView.Col>
<TreeView.Col>
<a href="http://www.bing.com">Bing</a>
</TreeView.Col>
<TreeView.Col>
<a href="http://www.yahoo.com">Yahoo</a>
</TreeView.Col>
</TreeView.Row>
</TreeView.Item>
</TreeView.Branch>
</TreeView.Item>
</TreeView.Tree>
</TreeView>
</div>
);
| mcliment/DefinitelyTyped | types/fundamental-react/fundamental-react-tests.tsx | TypeScript | mit | 94,263 |
//
// ConvertingAnImageToGrayscale.h
// XFCrystalKitExample
//
// Created by 付星 on 16/8/19.
// Copyright © 2016年 yizzuide. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ConvertingAnImageToGrayscale : UIView
@end
| yizzuide/XFCrystalKit | XFCrystalKitExample/XFCrystalKitExample/Classes/FuncExample/DrawingImages/ConvertingAnImageToGrayscale.h | C | mit | 239 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 Pi-Yueh Chuang <pychuang@gwu.edu>
#
# Distributed under terms of the MIT license.
"""convert the output file in a batch"""
import os
import os.path as op
import sys
import argparse
if os.getenv("PyFR") is None:
raise EnvironmentError("Environmental variable PyFR is not set")
else:
PyFRPath = os.getenv("PyFR")
if PyFRPath not in sys.path:
sys.path.append(PyFRPath)
try:
import pyfr
import pyfr.writers
except ImportError as err:
err.msg += "! Please check the path set in the environmental variable PyFR."
raise
def parseArgs(args=sys.argv[1:]):
"""parse arguments
Args:
args: list of strings. Default is sys.argv[1:].
Returns:
parser.parse_args(args)
"""
parser = argparse.ArgumentParser(
description="2D Cavity Flow Post-Precessor")
parser.add_argument(
"casePath", metavar="path",
help="The path to a PyFR case folder", type=str)
parser.add_argument(
"-s", "--soln-dir", metavar="soln-dir", dest="solnDir",
help="The directory (under casePath) containing *.pyfrs files. " +
"(Default = solutions)",
type=str, default="solutions")
parser.add_argument(
"-v", "--vtu-dir", metavar="vtu-dir", dest="vtuDir",
help="The directory (under casePath) in where *.vtu files will be. " +
"If the folder does not exist, the script will create it. "
"(Default = vtu)",
type=str, default="vtu")
parser.add_argument(
"-m", "--mesh", metavar="mesh", dest="mesh",
help="The mesh file required. " +
"The default is to use the first-found .pyfrm file in the case " +
"directory. If multiple .pyfrm files exist in the case directory, "
"it is suggested to set the argument.",
type=str, default=None)
parser.add_argument(
"-o", "--overwrite", dest="overwrite",
help="Whether to overwrite the output files if they already exist.",
action="store_true")
parser.add_argument(
"-d", "--degree", dest="degree",
help="The level of mesh. If the solver use higher-order " +
"polynomials, than it may be necessary to set larger degree.",
type=int, default=0)
return parser.parse_args(args)
def setup_dirs(args):
"""set up path to directories necessary
Args:
args: parsed arguments generated by parser.parse_args()
Returns:
areparse.Namespace object with full paths
"""
# set up the path to case directory
args.casePath = os.path.abspath(args.casePath)
# set up and check the path to case directory
args.solnDir = args.casePath + "/" + args.solnDir
if not op.isdir(args.solnDir):
raise RuntimeError(
"The path " + args.solnDir + " does not exist.")
# set up the path for .pyfrm file
if args.mesh is not None:
args.mesh = args.casePath + "/" + args.mesh
if not op.isfile(args.mesh):
raise RuntimeError(
"The input mesh file " + args.mesh + " does not exist.")
else:
for f in os.listdir(args.casePath):
if f.endswith(".pyfrm"):
args.mesh = args.casePath + "/" + f
if args.mesh is None:
raise RuntimeError(
"Could not find any .pyfrm file in the case folder " +
args.casePath)
# set up and create the directory for .vtu files, if it does not exist
args.vtuDir = args.casePath + "/" + args.vtuDir
if not op.isdir(args.vtuDir):
os.mkdir(args.vtuDir)
return args
def get_pyfrs_list(pyfrsDirPath):
"""get list of file names that end with .pyfrs in pyfrsDirPath
Args:
pyfrsDirPath: path to the folder of .pyfrs files
Returns:
a list of file names
"""
fileList = [f for f in os.listdir(pyfrsDirPath)
if op.splitext(f)[1] == ".pyfrs"]
if len(fileList) == 0:
raise RuntimeError(
"No .pyfrs file was found in the path " + pyfrsDirPath)
return fileList
def generate_vtu(vtuPath, pyfrsPath, pyfrsList, mesh, overwrite, degree):
"""generate .vtu files, if they do not exist
Args:
vtuPath: the path to folder of .vtu files
pyfrsPath: the path to .pyfrs files
pyfrsList: the list of .pyfrs which to be converted
mesh: the .pyfrm file
overwrite: whether to overwrite the .vtu file if it already exist
"""
vtuList = [op.splitext(f)[0]+".vtu" for f in pyfrsList]
for i, o in zip(pyfrsList, vtuList):
ifile = op.join(pyfrsPath, i)
ofile = op.join(vtuPath, o)
if op.isfile(ofile) and not overwrite:
print("Warning: " +
"the vtu file " + o + " exists " +
"and won't be overwrited because overwrite=False")
else:
output_vtu(mesh, ifile, ofile, degree)
def output_vtu(mesh, iFile, oFile, g=True, p="double", d=0):
"""convert a single .pyfrs file to .vtu file using PyFR's converter
Args:
mesh: mesh file (must end with .pyfrm)
input: input file name (must end with .pyfrs)
output: output file name (must end with .vtu)
g: whether to export gradients
p: precision, either "single" or "double"
d: degree of the element (set this according the order of the polynimal)
"""
writerArgs = argparse.Namespace(
meshf=mesh, solnf=iFile, outf=oFile, precision=p,
gradients=g, divisor=d)
writer = pyfr.writers.get_writer_by_extn(".vtu", writerArgs)
print("Converting " + iFile + " to " + oFile)
writer.write_out()
def get_pyfrs_files(pyfrsDirPath):
pass
if __name__ == "__main__":
args = parseArgs()
args = setup_dirs(args)
pyfrsList = get_pyfrs_list(args.solnDir)
generate_vtu(
args.vtuDir, args.solnDir, pyfrsList,
args.mesh, args.overwrite, args.degree)
| piyueh/PyFR-Cases | utils/batch_conversion.py | Python | mit | 6,025 |
# Based on
# https://github.com/ng/paperclip-watermarking-app/blob/master/lib/paperclip_processors/watermark.rb
# Modified by Laurynas Butkus
module Paperclip
class Watermark < Processor
# Handles watermarking of images that are uploaded.
attr_accessor :format, :whiny, :watermark_path, :position
def initialize file, options = {}, attachment = nil
super
@file = file
@whiny = options[:whiny].nil? ? true : options[:whiny]
@format = options[:format]
@watermark_path = options[:watermark_path]
@position = options[:watermark_position].nil? ? "Center" : options[:watermark_position]
@transparency = options[:watermark_transparency].nil? ? "20%" : options[:watermark_transparency]
@tile_watermark = options[:tile_watermark].nil? ? false : options[:tile_watermark]
@current_format = File.extname(@file.path)
@basename = File.basename(@file.path, @current_format)
end
# Performs the conversion of the +file+ into a watermark. Returns the Tempfile
# that contains the new image.
def make
return @file unless watermark_path
dst = Tempfile.new([@basename, @format].compact.join("."))
dst.binmode
#command = "composite"
#params = "-gravity #{@position} #{watermark_path} #{fromfile} #{tofile(dst)}"
command = "composite"
params = "-gravity #{@position}"
params = params + " -tile" if @tile_watermark
params = params + " -dissolve #{@transparency} #{watermark_path} #{fromfile} #{tofile(dst)}"
# composite -gravity south -geometry +0+10 stamp.png logo.jpg \
# wmark_text_stamped.jpg
begin
success = Paperclip.run(command, params)
rescue PaperclipCommandLineError
raise PaperclipError, "There was an error processing the watermark for #{@basename}" if @whiny
end
dst
end
def fromfile
"\"#{ File.expand_path(@file.path) }[0]\""
end
def tofile(destination)
"\"#{ File.expand_path(destination.path) }[0]\""
end
end
end | jstemen/photography-website | lib/paperclip_processors/watermark.rb | Ruby | mit | 2,109 |
var counter = require('mongodb-counter');
var s3redirect = require('./s3redirect');
module.exports = shortener;
module.exports.redis = require('./redisStore');
module.exports.mongodb = require('./mongoStore');
module.exports.s3 = s3redirect;
module.exports.counter = counter;
function shortener(options) {
var store = options.store || s3redirect(options);
var uniqueIdGenerator = options.uniqueIdGenerator || (options.counters || counter.createCounters(
_({}).assign(options).assign({collectionName: options.countersCollectionName}).value()
))(options.uniqueIdCounterName || 'shortener');
return {
shorten: shorten,
shortenUnique: shortenUnique,
unshorten: unshorten
};
function shorten(longUrl, done) {
getUniqueId(function (err, uniqueId) {
if (err) return done(err);
store.set(uniqueId, longUrl, finish);
function finish(err, path) { return done(null, options.shortUrlPrefix + uniqueId); }
});
}
function shortenUnique(longUrl, done) {
getUniqueId(function (err, uniqueId) {
if (err) return done(err);
store.getOrSet(uniqueId, longUrl, finish);
function finish(err, path) { return done(null, options.shortUrlPrefix + uniqueId); }
});
}
function unshorten(shortUrl, done) { store.get(shortUrl.replace(options.shortUrlPrefix, ''), done); }
function getUniqueId(done) {
if (typeof(uniqueIdGenerator) == 'function') return uniqueIdGenerator(complete);
return uniqueIdGenerator.getUniqueId(complete);
function complete(err, value) {
if (err) return done(err);
var prefix = config.uniqueIdPrefix || '';
if (typeof(value) == 'number') return done(null, prefix + value.toString(36));
return done(null, prefix + value.toString());
}
}
}
| Like-Falling-Leaves/url-shorten | shorten.js | JavaScript | mit | 1,774 |
var todolist = require("./lib");
var assert = require("assert");
describe('findMarks', function() {
it('Find TODOs, NOTES, and FIXMEs', function() {
var result = todolist.findMarks("// TODO: This is a TODO\n// NOTE: This is a Note\n// FIXME: This is a fixme.\n");
assert.deepEqual(result,
[{
content: 'TODO: This is a TODO',
line: 0,
assignee: null,
type: 'TODOs'
},
{
content: 'NOTE: This is a Note',
line: 1,
assignee: null,
type: 'NOTEs'
},
{
content: 'FIXME: This is a fixme.',
line: 2,
assignee: null,
type: 'FIXMEs'
}]);
});
it('Case-insensitive matching', function() {
var result = todolist.findMarks("// todo: This is a TODO\n// note: This is a Note\n// fixme: This is a fixme.\n");
assert.deepEqual(result,
[{
content: 'todo: This is a TODO',
line: 0,
assignee: null,
type: 'TODOs'
},
{
content: 'note: This is a Note',
line: 1,
assignee: null,
type: 'NOTEs'
},
{
content: 'fixme: This is a fixme.',
line: 2,
assignee: null,
type: 'FIXMEs'
}]);
});
it('Parse the assignee of a task', function() {
var result = todolist.findMarks("// TODO(bob): This is a TODO assigned to bob.");
assert.deepEqual(result,
[{
content: 'TODO(bob): This is a TODO assigned to bob.',
line: 0,
assignee: 'bob',
type: 'TODOs'
}]);
});
});
| rameshvarun/todo-list | test.js | JavaScript | mit | 1,615 |
<?php
if (!defined('TAPPED_CACHE')) define("TAPPED_CACHE",5);
define('ROOT',realpath(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])))) . '/');
define('APP_ROOT', ROOT . 'src/');
define('PUBLIC_ROOT',APP_ROOT . 'public/');
define("BASE_ROOT",realpath(ROOT . 'vendor/antz29/base/src') . '/');
define("CONFIG_ROOT",realpath(APP_ROOT . 'config') . '/');
define("TEMPLATE_ROOT",realpath(APP_ROOT .'templates') . '/');
define("DS",DIRECTORY_SEPARATOR);
include BASE_ROOT . "tapped/tapped.php";
$tapped = Base\Tapped::getInstance();
$tapped->setCache(TAPPED_CACHE);
$tapped->addPath(ROOT."vendor");
$tapped->addPath(APP_ROOT."lib");
$tapped->addPath(APP_ROOT."controllers");
$tapped->addPath(APP_ROOT."models");
$tapped->addPath(APP_ROOT."resources");
$tapped->addPath(APP_ROOT."modules");
$tapped->registerAutoloader();
if (file_exists(ROOT.'/VERSION')) {
define('VERSION',trim(file_get_contents(ROOT.'/VERSION')));
} else {
define('VERSION','?');
}
$b = new Base\Base();
$b->run(); | antz29/base | src/load.php | PHP | mit | 993 |
<!DOCTYPE html>
<html>
<head>
<title>Password Reset</title>
</head>
<body>
{% if validlink %}
<h3>Password Reset</h3>
<form action="" method="post">
{% csrf_token %}
<table border="1">
{{form}}
</table>
<input type="submit" value="Change Password" />
</form>
{% else %}
<p>Your link is invalid. You can create a new password reset request.</p>
{% endif %}
</body>
</html> | fabteam1/komsukomsuhuhu | komsukomsuhuu/static/templates/registration/password_reset_confirm.html | HTML | mit | 403 |
################################################################################
#
# Copyright (C) 2006-2007 pmade inc. (Peter Jones pjones@pmade.com)
#
# 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.
#
################################################################################
class TextFilter
################################################################################
def self.inherited (klass)
instance_eval { (@filters ||= {}).store(klass.to_s.sub(/Filter/, ''), klass) }
end
################################################################################
def self.list
["None", instance_eval {@filters.keys.sort}].flatten
end
################################################################################
def self.filter_with (filter_name, text)
if filter_klass = instance_eval {@filters[filter_name]}
filter_klass.filter(text)
elsif text.include?('<') # looks like HTML
text
else # make HTML
text.split(/\r?\n\r?\n/).map {|t| %Q(<p>#{t}</p>)}.join
end
end
end
################################################################################
Dir.foreach(File.join(File.dirname(__FILE__), 'text_filters')) do |file|
require 'text_filters/' + file if file.match(/\.rb$/)
end
################################################################################
| codemer/devalot | lib/text_filter.rb | Ruby | mit | 2,350 |
# WASD Keyboard Design
This is a 104 key [WASD keyboard](http://wasdkeyboards.com/) design specifically made for coders on macs.
It features ...
- Coder friendly offset key designs to make it easier to match sqaure and curly brackets
- Colour coded shift function keys
- Close as possible emulation to the standard mac keyboard layouts

## Art Files
I have provided the original art files in Adobe Illustrator format. Make sure that you convert all your fonts to outlines before sendin to WASD for processing.
You will also need the [Adobe Source Code Pro](https://github.com/adobe-fonts/source-code-pro) font available at https://github.com/adobe-fonts/source-code-pro
## Dip switch settings
1: on, 2: off, 3: off, 4: off, 5: off, 6: off
## Key Mappings
Use [karabiner](https://pqrs.org/osx/karabiner/) to remap key functions so that your keyboard behaves like it should.
I have provided my private.xml file to get you started.

| craigs/wasd-keyboard | README.md | Markdown | mit | 1,029 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import render_template, request, redirect, session, flash, url_for
from functools import wraps
from user import app
import services2db
import log2db
import users
import json
import time
import sys
import asset
reload(sys)
sys.setdefaultencoding('gb18030')
# 登录验证装饰器(登录页面加入验证会死循环)
def login_required(func):
@wraps(func)
def wrapper(*args, **kwargs):
if session.get('user') is None:
return redirect('/')
rt = func(*args, **kwargs)
return rt
return wrapper
# 时间装饰器
def time_wrapper(func):
@wraps(func)
def wrapper():
print '计时开始:%s' % func.__name__
start = time.time()
rt = func()
print '计时结束:%s:%s' % (func.__name__,time.time() - start)
return rt
return wrapper
# 根目录
@app.route('/')
def index():
if session:
return redirect('/users/')
else:
return render_template('login.html')
# 登录页面
@app.route('/login/', methods=['POST', 'GET'])
def login():
params = request.args if request.method == 'GET' else request.form
username = params.get('username', '')
password = params.get('password', '')
if users.validate_login(username, password):
print '登录成功'
session['user'] = {'username': username}
return redirect('/users/')
else:
return render_template('login.html', username=username, error=u'用户名或密码错误')
# 登出页面
@app.route('/user/logout/')
def logout():
session.clear()
return redirect('/')
# 用户信息显示
@app.route('/users/')
@login_required
def user_list():
return render_template('users.html', user_list=users.get_users())
# 返回添加用户模版给dialog页面
@app.route('/user/adder/', methods=['POST', 'GET'])
@login_required
def user_create():
return render_template('user_create.html')
# 添加用户
@app.route('/user/add/', methods=['POST'])
def user_add():
params = request.args if request.method == 'GET' else request.form
username = params.get('username', '')
password = params.get('password', '')
age = params.get('age', '')
# 检查用户信息
_is_ok, _error = users.validate_add_user(username, password, age)
_status = None
if _is_ok:
if users.add_users(username=username, age=age, password=password):
_status = '添加用户成功!'
else:
_status = '添加用户失败!'
return json.dumps({'is_ok': _is_ok, 'status': _status, 'error': _error})
# 返回更新用户模版给dialog页面
@app.route('/user/update/', methods=['POST', 'GET'])
@login_required
def user_update():
_id = request.args.get('id', '')
_name = request.args.get('name', '')
# _users = []
# for i in users.get_users():
# if i.get('id') == int(_id):
# _users.append(i)
return render_template('user_update.html', uid=_id, username=_name)
# 更新用户
@app.route('/user/upd/', methods=['POST', 'GET'])
def user_upd():
_id = request.form.get('id', '')
_mpassword = request.form.get('mpassword', '')
_upassword = request.form.get('upassword', '')
_age = request.form.get('age', '')
_is_ok, _error = users.validate_update_user(_id, session['user']['username'], _mpassword, _upassword, _age)
_status = None
if _is_ok:
if users.update_users(_id, _upassword, _age):
_status = '用户更新成功!'
else:
_status = '用户更新失败!'
return json.dumps({'is_ok': _is_ok, 'status': _status, 'error': _error})
# 删除用户
@app.route('/user/delete/')
@login_required
def delete_user():
uid = request.args.get('uid', '')
if users.del_users(uid):
return redirect('/users/')
else:
return '用户删除失败'
# 显示日志信息
@app.route('/logs/', methods=['POST', 'GET'])
@time_wrapper
@login_required
def logs():
files = request.files.get('files')
if files:
# print files.filename
files.save('./access.txt')
log_files = 'access.txt'
if log2db.log2db(log_files=log_files, fetch=False):
return redirect('/logs/')
else:
return '日志写入数据库失败!'
else:
topn = request.form.get('topn', 10)
topn = int(topn) if str(topn).isdigit() else 10
rt_list = log2db.log2db(topn=topn) # 读取数据
return render_template('logs.html', rt_list=rt_list)
# 显示域名管理信息
@app.route('/services/', methods=['POST', 'GET'])
@login_required
def service_manage():
params = request.args if request.method == 'GET' else request.form
_url = params.get('url', 'Null')
_username = params.get('username', 'Null')
_password = params.get('password', 'Null')
_func = params.get('func', 'Null')
# 添加域名管理信息
if _url != 'Null':
if services2db.add_service(_url, _username, _password, _func):
return redirect('/services/')
else:
return '添加信息失败!'
# 查询域名管理信息
else:
service_list = services2db.get_service()
return render_template('services.html', service_list=service_list)
# 更新域名管理信息
@app.route('/services/update/', methods=['POST'])
def update_service():
params = request.args if request.method == 'GET' else request.form
_id = params.get('id', '')
_url = params.get('url', '')
_username = params.get('username', '')
_password = params.get('password', '')
_func = params.get('func', '')
_is_ok = services2db.update_service(_url, _username, _password, _func, _id)
return json.dumps({'is_ok': _is_ok})
# 删除域名管理信息
@app.route('/services/del/')
@login_required
def serviceDel():
uid = request.args.get('id', '')
if services2db.servicedel(uid):
return redirect('/services/')
else:
return '域名管理信息删除失败!'
# 资产信息显示
@app.route('/assets/')
@login_required
def asset_list():
_asset_list = []
for i in asset.get_list():
_rt_list = asset.get_by_id(i.get('idc_id'))
i['idc_id'] = _rt_list[0][1]
_asset_list.append(i)
return render_template('assets.html', asset_list=_asset_list)
# 返回新建资产模版给dialog页面
@app.route('/asset/create/', methods=['POST', 'GET'])
@login_required
def asset_create():
return render_template('asset_create.html', idcs=asset.get_idc())
# 添加资产信息
@app.route('/asset/add/', methods=['POST', 'GET'])
@login_required
def asset_add():
lists = ['sn','ip','hostname','idc_id','purchase_date','warranty','vendor','model','admin','business','os','cpu','ram','disk']
asset_dict = {}
for i in lists:
asset_dict['_'+i] = request.form.get(i, '')
# 检查资产信息
_is_ok, _error = asset.validate_create(asset_dict)
status = None
if _is_ok:
if asset.create(asset_dict):
status = '添加资产成功!'
else:
status = '添加资产失败!'
return json.dumps({'is_ok': _is_ok, 'status': status, 'error': _error})
# 删除资产信息
@app.route('/asset/delete/')
@login_required
def asset_del():
uid = request.args.get('id', '')
if asset.delete(uid):
return redirect('/assets/')
else:
return '资产删除失败!'
# 返回更新资产模版给dialog页面
@app.route('/asset/update/', methods=['POST', 'GET'])
@login_required
def asset_update():
_id = request.args.get('id', '')
_asset_list = []
for i in asset.get_list():
if i.get('id') == int(_id):
_asset_list.append(i)
return render_template('asset_update.html', asset_list=_asset_list, idcs=asset.get_idc())
# 更新资产信息
@app.route('/asset/upd/', methods=['POST', 'GET'])
@login_required
def asset_upd():
_id = request.form.get('id', '')
assets = ['sn','ip','hostname','idc_id','purchase_date','warranty','vendor','model','admin','business','os','cpu','ram','disk']
asset_dict = {}
for i in assets:
asset_dict['_'+i] = request.form.get(i, '')
# 检查资产信息
_is_ok, _error = asset.validate_update(asset_dict)
_status = None
if _is_ok:
if asset.update(asset_dict,_id):
_status = '更新资产成功!'
else:
_status = '更新资产失败!'
return json.dumps({'is_ok': _is_ok, 'status': _status, 'error': _error}) | 51reboot/actual_09_homework | 09/tanshuai/cmdb_v6/user/views.py | Python | mit | 8,533 |
# AppSecrets
Easy library for retrieving secrets from [Microsoft Azure Key Vault](http://azure.microsoft.com/en-us/services/key-vault/) (Preview).
Only two methods are offered; `Task<string> GetSecret(string name)` and `Task<SecureString> GetSecretSecure(string name)`. There are no plans to add calls to create or modify secrets. If you want to do that, use the PowerShell commands (see below).
**Be aware that although secrets can be retrieved as `SecureString`, values are still deserialised by the Key Vault client in plain text (in RAM).** Hopefully this will be addressed in future versions. For secrets like Bearer Tokens and Connection Strings this is not usually a big deal - but use your own judgment.
## Quick Start
Library is .NET 4.5 Framework and Async by default.
Once your Key Vault has been set up and some secrets added to it, AppSecrets provides a simple API for retrieving them inside your Application. A conventional implementation is provided via `AppSecretsManager`. For more options, use the `AppSecrets` class instead.
```csharp
using Scale.AppSecrets;
public async Task<string> GetStorageConnectionString()
{
return await AppSecretsManager.GetSecret("AZURE-STORAGE-CONNECTION-STRING");
}
```
`AppSecretsManager` looks for three AppSettings in your config file:
```xml
<appSettings>
<add key="Scale.AppSecrets.AppSecretsManager.VaultUrl" value="{Fully qualified Vault URL}"/>
<add key="Scale.AppSecrets.AppSecretsManager.ClientId" value="{Azure AD Client ID}"/>
<add key="Scale.AppSecrets.AppSecretsManager.ClientSecret" value="{Azure AD Client Secret}"/>
</appSettings>
```
If you prefer to manage your own config use the `AppSecrets` class instead.
## Setting up Azure Key Vault
There are a couple of really good blogs on this:
* [Azure Key Vault - Step by Step](http://blogs.technet.com/b/kv/archive/2015/01/09/azure-key-vault-step-by-step.aspx)
* [Securing Azure Web Job Secrets with Azure Key Vault](http://wp.sjkp.dk/securing-azure-web-job-secrets-with-azure-key-vault/)
This project currently requires you to create a "Client Key" (Client Secret) for your App in Azure AD. Hoping to support other Client Credentials in a future version. Here are the high level steps *(will fill in more detail later)*:
**In the Full Azure Portal**
1. Create an Azure AD Application for your App. Use the Web app type so that you can create a Client Key (Client Secret).
1. Copy the Client ID and the Client Key (secret).
**In PowerShell**
1. Install [Azure PowerShell](http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/) version 0.8.13 or higher.
1. Download [Key Vault Manager Cmdlets](http://go.microsoft.com/fwlink/?LinkID=521539).
1. `Add-AzureAccount`
1. `Import-Module .\KeyVaultManager`
1. `Switch-AzureMode AzureResourceManager`
1. `New-AzureKeyVault -VaultName 'MyDevVault' -Location 'West Europe' -ResourceGroupName 'MyDevRG'` *- Creates a Vault and Resource Group for it. Only some Locations work in preview.*
1. `Set-AzureKeyVaultAccessPolicy -vaultname 'MyDevVault' -ServicePrincipalName {{Copy from output of previous}} -PermissionsToSecrets get -PermissionsToKeys wrapkey,unwrapkey,decrypt,encrypt`
1. `Add-AzureKeyVaultKey -Name 'MyRSAKey1' -VaultName 'MyDevVault' -Destination 'Software'` *- Creates an encryption key in Software (in Azure).*
1. `$Secret = ConvertTo-SecureString -String 'This is secret text' -AsPlainText -Force` *- Creates a SecureString*
1. `Set-AzureKeyVaultSecret -VaultName 'MyDevVault' -Name 'Secret1' -SecretValue $Secret1` *- Sets a Secret name and value.*
## Questions an support
@DanielLarsenNZ or create an Issue. Contributions welcome.
| FeatherAndScale/AppSecrets | Readme.md | Markdown | mit | 3,686 |
using System;
using System.Net;
namespace Nancy.Rest.Client.Exceptions
{
public class RestClientException : Exception
{
public HttpStatusCode Status { get; private set; }
public string Content { get; private set; }
public RestClientException(HttpStatusCode statuscode, string message, string content) : base(message)
{
Content = content;
Status = statuscode;
}
}
}
| maxpiva/Nancy.Rest.Client | Exceptions/RestClientException.cs | C# | mit | 447 |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
/* Body style, for the entire document */
body {
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}
/* Header1 style, used for the main title */
h1 {
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}
/* Header2 style, used for "Overview" and other sections */
h2 {
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}
/* Header3 style, used for sub-sections, such as project name */
h3 {
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}
h4 {
font-weight: normal;
font-size: 12pt;
margin: 0;
padding: 0 0 0 0;
background-color: transparent;
}
/* Color all hyperlinks one color */
a {
color: #1382CE;
}
/* Paragraph text (for longer informational messages) */
p {
font-size: 10pt;
}
/* Table styles */
table {
border-spacing: 0 0;
border-collapse: collapse;
font-size: 10pt;
}
table th {
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}
table td {
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}
.NoBreakingChanges {
color: darkgreen;
font-weight:bold;
}
.FewBreakingChanges {
color: orange;
font-weight:bold;
}
.ManyBreakingChanges {
color: red;
font-weight:bold;
}
.BreakDetails {
margin-left: 30px;
}
.CompatMessage {
font-style: italic;
font-size: 10pt;
}
.GoodMessage {
color: darkgreen;
}
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink {
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}
.localLink:hover {
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}
/* Center text, used in the over views cells that contain message level counts */
.textCentered {
text-align: center;
}
/* The message cells in message tables should take up all avaliable space */
.messageCell {
width: 100%;
}
/* Padding around the content after the h1 */
#content {
padding: 0px 12px 12px 12px;
}
/* The overview table expands to width, with a max width of 97% */
#overview table {
width: auto;
max-width: 75%;
}
/* The messages tables are always 97% width */
#messages table {
width: 97%;
}
/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded {
min-width: 18px;
min-height: 18px;
background-repeat: no-repeat;
background-position: center;
}
/* Success icon encoded */
.IconSuccessEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==);
}
/* Information icon encoded */
.IconInfoEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}
/* Warning icon encoded */
.IconWarningEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}
/* Error icon encoded */
.IconErrorEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style>
</head>
<body>
<h1 _locid="PortabilityReport">.NET Portability Report</h1>
<div id="content">
<div id="submissionId" style="font-size:8pt;">
<p>
<i>
Submission Id
467f3d97-35a8-4008-ba0a-67677c70f6ff
</i>
</p>
</div>
<h2 _locid="SummaryTitle">
<a name="Portability Summary"></a>Portability Summary
</h2>
<div id="summary">
<table>
<tbody>
<tr>
<th>Assembly</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
</tr>
<tr>
<td><strong><a href="#Argument">Argument</a></strong></td>
<td class="text-center">100.00 %</td>
<td class="text-center">100.00 %</td>
<td class="text-center">100.00 %</td>
<td class="text-center">100.00 %</td>
</tr>
</tbody>
</table>
</div>
<div id="details">
</div>
</div>
</body>
</html> | kuhlenh/port-to-core | Reports/ar/argument.1.0.3/Argument-net20.html | HTML | mit | 9,631 |
# -*- coding: utf-8 -*-
# Scrapy settings for saymedia project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
BOT_NAME = 'saymedia'
SPIDER_MODULES = ['saymedia.spiders']
NEWSPIDER_MODULE = 'saymedia.spiders'
ROBOTSTXT_OBEY = True
DOWNLOADER_MIDDLEWARES = {
'saymedia.middleware.ErrorConverterMiddleware': 1,
# 'saymedia.middleware.MysqlDownloaderMiddleware': 1,
'saymedia.middleware.OriginHostMiddleware': 2,
'saymedia.middleware.TimerDownloaderMiddleware': 998,
}
SPIDER_REPORTS = {
'xml': 'saymedia.reports.XmlReport',
'firebase': 'saymedia.reports.FirebaseReport',
}
SPIDER_MIDDLEWARES = {
'scrapy.contrib.spidermiddleware.httperror.HttpErrorMiddleware': None,
}
ITEM_PIPELINES = {
'saymedia.pipelines.DatabaseWriterPipeline': 0,
}
# Crawl responsibly by identifying yourself (and your website) on the user-agent
USER_AGENT = 'SEO Spider (+http://www.saymedia.com)'
DATABASE = {
'USER': 'YOUR_DATABASE_USER',
'PASS': 'YOUR_DATABASE_PASS',
}
FIREBASE_URL = "YOUR_FIREBASE_URL"
try:
# Only used in development environments
from .local_settings import *
except ImportError:
pass | saymedia/SaySpider | saymedia/saymedia/settings.py | Python | mit | 1,287 |
<?php
return array (
'id' => 'samsung_shw_m110_ver1',
'fallback' => 'generic_android_ver2_1',
'capabilities' =>
array (
'has_qwerty_keyboard' => 'false',
'model_name' => 'SHW-M110S',
'brand_name' => 'Samsung',
'marketing_name' => 'Galaxy S',
'release_date' => '2010_april',
'density_class' => '1.5',
'max_image_width' => '460',
'resolution_width' => '480',
'resolution_height' => '800',
'max_image_height' => '760',
'max_data_rate' => '2100',
'rss_support' => 'true',
),
);
| cuckata23/wurfl-data | data/samsung_shw_m110_ver1.php | PHP | mit | 533 |
//-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2022 Ryo Suzuki
// Copyright (c) 2016-2022 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include <Siv3D/Common.hpp>
# include <Siv3D/Vertex2D.hpp>
# include <Siv3D/FloatRect.hpp>
# include <Siv3D/FloatQuad.hpp>
# include <Siv3D/TriangleIndex.hpp>
# include <Siv3D/ColorHSV.hpp>
# include <Siv3D/Optional.hpp>
# include <Siv3D/LineStyle.hpp>
# include <Siv3D/YesNo.hpp>
# include <Siv3D/PredefinedYesNo.hpp>
# include <Siv3D/Particle2D.hpp>
# include <Siv3D/ParticleSystem2DParameters.hpp>
# include "Vertex2DBufferPointer.hpp"
namespace s3d
{
using BufferCreatorFunc = std::function<Vertex2DBufferPointer(Vertex2D::IndexType, Vertex2D::IndexType)>;
namespace Vertex2DBuilder
{
[[nodiscard]]
Vertex2D::IndexType BuildLine(const LineStyle& style, const BufferCreatorFunc& bufferCreator, const Float2& begin, const Float2& end, float thickness, const Float4(&colors)[2], float scale);
[[nodiscard]]
Vertex2D::IndexType BuildCappedLine(const BufferCreatorFunc& bufferCreator, const Float2& begin, const Float2& end, float thickness, const Float4(&colors)[2]);
[[nodiscard]]
Vertex2D::IndexType BuildUncappedLine(const BufferCreatorFunc& bufferCreator, const Float2& begin, const Float2& end, float thickness, const Float4(&colors)[2]);
[[nodiscard]]
Vertex2D::IndexType BuildUncappedLine(const BufferCreatorFunc& bufferCreator, const Float2& begin, const Float2& end, float thickness, const Float4(&colors)[2], float& startAngle);
[[nodiscard]]
Vertex2D::IndexType BuildSquareDotLine(const BufferCreatorFunc& bufferCreator, const Float2& begin, const Float2& end, float thickness, const Float4(&colors)[2], float dotOffset, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildRoundDotLine(const BufferCreatorFunc& bufferCreator, const Float2& begin, const Float2& end, float thickness, const Float4(&colors)[2], float dotOffset, bool hasAlignedDot);
[[nodiscard]]
Vertex2D::IndexType BuildTriangle(const BufferCreatorFunc& bufferCreator, const Float2(&points)[3], const Float4& color);
[[nodiscard]]
Vertex2D::IndexType BuildTriangle(const BufferCreatorFunc& bufferCreator, const Float2(&points)[3], const Float4(&colors)[3]);
[[nodiscard]]
Vertex2D::IndexType BuildRect(const BufferCreatorFunc& bufferCreator, const FloatRect& rect, const Float4& color);
[[nodiscard]]
Vertex2D::IndexType BuildRect(const BufferCreatorFunc& bufferCreator, const FloatRect& rect, const Float4(&colors)[4]);
[[nodiscard]]
Vertex2D::IndexType BuildRectFrame(const BufferCreatorFunc& bufferCreator, const FloatRect& rect, float thickness, const Float4& innerColor, const Float4& outerColor);
[[nodiscard]]
Vertex2D::IndexType BuildCircle(const BufferCreatorFunc& bufferCreator, const Float2& center, float r, const Float4& innerColor, const Float4& outerColor, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildCircleFrame(const BufferCreatorFunc& bufferCreator, const Float2& center, float rInner, float thickness, const Float4& innerColor, const Float4& outerColor, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildCirclePie(const BufferCreatorFunc& bufferCreator, const Float2& center, float r, float startAngle, float angle, const Float4& innerColor, const Float4& outerColor, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildCircleArc(const BufferCreatorFunc& bufferCreator, const LineStyle& style, const Float2& center, float rInner, float startAngle, float angle, float thickness, const Float4& innerColor, const Float4& outerColor, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildUncappedCircleArc(const BufferCreatorFunc& bufferCreator, const Float2& center, float rInner, float startAngle, float angle, float thickness, const Float4& innerColor, const Float4& outerColor, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildEllipse(const BufferCreatorFunc& bufferCreator, const Float2& center, float a, float b, const Float4& innerColor, const Float4& outerColor, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildEllipseFrame(const BufferCreatorFunc& bufferCreator, const Float2& center, float aInner, float bInner, float thickness, const Float4& innerColor, const Float4& outerColor, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildQuad(const BufferCreatorFunc& bufferCreator, const FloatQuad& quad, const Float4 color);
[[nodiscard]]
Vertex2D::IndexType BuildQuad(const BufferCreatorFunc& bufferCreator, const FloatQuad& quad, const Float4(&colors)[4]);
[[nodiscard]]
Vertex2D::IndexType BuildRoundRect(const BufferCreatorFunc& bufferCreator, Array<Float2>& buffer, const FloatRect& rect, float w, float h, float r, const Float4& color, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildLineString(const BufferCreatorFunc& bufferCreator, Array<Float2>& buffer, const LineStyle& style, const Vec2* points, size_t size, const Optional<Float2>& offset, float thickness, bool inner, const Float4& color, CloseRing closeRing, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildClosedLineString(const BufferCreatorFunc& bufferCreator, Array<Float2>& buffer, const Vec2* points, size_t size, const Optional<Float2>& offset, float thickness, bool inner, const Float4& color, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildCappedLineString(const BufferCreatorFunc& bufferCreator, Array<Float2>& buffer, const Vec2* points, size_t size, const Optional<Float2>& offset, float thickness, bool inner, const Float4& color, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildUncappedLineString(const BufferCreatorFunc& bufferCreator, Array<Float2>& buffer, const Vec2* points, size_t size, const Optional<Float2>& offset, float thickness, bool inner, const Float4& color, float scale, float* startAngle0, float* startAngle1);
[[nodiscard]]
Vertex2D::IndexType BuildDefaultLineString(const BufferCreatorFunc& bufferCreator, const Vec2* points, const ColorF* colors, size_t size, const Optional<Float2>& offset, float thickness, bool inner, CloseRing closeRing, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildPolygon(const BufferCreatorFunc& bufferCreator, const Array<Float2>& vertices, const Array<TriangleIndex>& tirnagleIndices, const Optional<Float2>& offset, const Float4& color);
[[nodiscard]]
Vertex2D::IndexType BuildPolygon(const BufferCreatorFunc& bufferCreator, const Vertex2D* vertices, size_t vertexCount, const TriangleIndex* indices, size_t num_triangles);
[[nodiscard]]
Vertex2D::IndexType BuildPolygonTransformed(const BufferCreatorFunc& bufferCreator, const Array<Float2>& vertices, const Array<TriangleIndex>& tirnagleIndices, float s, float c, const Float2& offset, const Float4& color);
[[nodiscard]]
Vertex2D::IndexType BuildPolygonFrame(const BufferCreatorFunc& bufferCreator, Array<Float2>& buffer, const Float2* points, size_t size, float thickness, const Float4& color, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildTextureRegion(const BufferCreatorFunc& bufferCreator, const FloatRect& rect, const FloatRect& uv, const Float4& color);
[[nodiscard]]
Vertex2D::IndexType BuildTextureRegion(const BufferCreatorFunc& bufferCreator, const FloatRect& rect, const FloatRect& uv, const Float4(&colors)[4]);
[[nodiscard]]
Vertex2D::IndexType BuildTexturedCircle(const BufferCreatorFunc& bufferCreator, const Circle& circle, const FloatRect& uv, const Float4& color, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildTexturedQuad(const BufferCreatorFunc& bufferCreator, const FloatQuad& quad, const FloatRect& uv, const Float4& color);
[[nodiscard]]
Vertex2D::IndexType BuildTexturedRoundRect(const BufferCreatorFunc& bufferCreator, Array<Float2>& buffer, const FloatRect& rect, float w, float h, float r, const FloatRect& uvRect, const Float4& color, float scale);
[[nodiscard]]
Vertex2D::IndexType BuildTexturedVertices(const BufferCreatorFunc& bufferCreator, const Vertex2D* vertices, size_t vertexCount, const TriangleIndex* indices, size_t num_triangles);
[[nodiscard]]
Vertex2D::IndexType BuildTexturedParticles(const BufferCreatorFunc& bufferCreator, const Array<Particle2D>& particles,
const ParticleSystem2DParameters::SizeOverLifeTimeFunc& sizeOverLifeTimeFunc, const ParticleSystem2DParameters::ColorOverLifeTimeFunc& colorOverLifeTimeFunc);
}
}
| Siv3D/OpenSiv3D | Siv3D/src/Siv3D/Renderer2D/Vertex2DBuilder.hpp | C++ | mit | 8,498 |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 30 2020 21:18:12).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import <IDEKit/IDEInspectorAbstractActionProperty.h>
@class IDEInspectorKeyPath, NSButton, NSString;
@interface IDEInspectorActionButtonProperty : IDEInspectorAbstractActionProperty
{
IDEInspectorKeyPath *_targetKeyPath;
IDEInspectorKeyPath *_titleKeyPath;
NSString *_title;
SEL _action;
NSButton *_button;
}
- (void).cxx_destruct;
@property(retain, nonatomic) NSButton *button; // @synthesize button=_button;
- (void)setupRefreshTriggersAndConfigure;
- (void)refresh;
- (void)broadcastAction:(id)arg1;
- (void)refreshTitle:(id)arg1;
- (double)baseline;
@end
| XVimProject/XVim2 | XVim2/XcodeHeader/IDEKit/IDEInspectorActionButtonProperty.h | C | mit | 728 |
<?php namespace App\Http\Controllers\Acp;
use App\File as Model;
use Illuminate\Validation\Rule;
class Files extends AbstractController
{
protected $sortableKeys = ['id', 'size', 'downloads'];
public function index()
{
$models = Model::query()
->orderBy($this->getSortKey(), $this->getSortDir())
->paginate();
return view($this->view, ['models' => $models]);
}
/**
* @param Model|null $model
* @return array
*/
protected function rules($model = null)
{
return [
'slug' => [
'required',
Rule::unique('files', 'slug')->ignore($model->id ?? null),
],
'file' => [
Rule::when(empty($model->exists), 'required'),
'file',
],
'title' => 'required',
];
}
protected function storeModel()
{
$file = request()->file('file');
$folder = request('folder');
/** @var Model $model */
$model = $this->newModel()->fill($this->requestDataForModel());
$model->size = $file->getSize();
$model->extension = $file->getClientOriginalExtension();
$model->downloads = 0;
$model->save();
\Storage::disk('files')->putFileAs($folder, $file, $model->basename());
return $model;
}
}
| ivacuum/hosting | app/Http/Controllers/Acp/Files.php | PHP | mit | 1,379 |
module Rockpaperkinson
class RockPaperScissors
def initialize
@player_one = Player.new("Player One", false)
@player_two = Player.new("Player Two", false)
end
def play
# choose single or multiplayer
@player_two.ai = true if enable_ai?
# prompt players for input
input_one = @player_one.get_input(@player_one.name)
input_two = @player_two.get_input(@player_two.name)
input_one_name = input_names(input_one)
input_two_name = input_names(input_two)
# compare choices
system("clear")
puts "#{@player_one.name} throws #{input_one_name}...#{@player_two.name} throws #{input_two_name}..."
comparison = compare_inputs(input_one, input_two)
# declare winner
declare_winner(input_one_name, comparison)
end
def enable_ai?
puts "Play single player against AI? (y/n)"
gets.downcase.chomp == "y"
end
def compare_inputs(one, two)
case one * two
when 2
"PAPER beats ROCK..."
when 3
"ROCK beats SCISSORS..."
when 6
"SCISSORS beats PAPER..."
else
"It's a draw!"
end
end
def declare_winner(input_name, winning_phrase)
puts winning_phrase
if winning_phrase == "It's a draw!"
puts "Nobody wins...you should play again!"
elsif winning_phrase[0] == input_name[0]
puts "#{@player_one.name.upcase} WINS!"
else
puts "#{@player_two.name.upcase} WINS!"
end
end
def input_names(input_number)
names = %w[ROCK PAPER SCISSORS]
names[input_number - 1]
end
end
end | kinsona/rockpaperkinson | lib/rockpaperkinson/rock_paper_scissors.rb | Ruby | mit | 1,638 |
import {
ADD_HISTORY_FILTER_EXCLUDE_TAG,
REMOVE_HISTORY_FILTER_EXCLUDE_TAG,
SAVE_HISTORY_FILTER_EXCLUDES_TAGS,
DISMISS_HISTORY_FILTER_EXCLUDES_TAGS,
} from 'app/configs+constants/ActionTypes';
export const saveTags = (tags = []) => ({
type: SAVE_HISTORY_FILTER_EXCLUDES_TAGS,
tags: tags,
});
export const dismissTags = () => ({ type: DISMISS_HISTORY_FILTER_EXCLUDES_TAGS });
export const cancelTags = () => ({ type: DISMISS_HISTORY_FILTER_EXCLUDES_TAGS });;
export const tappedPill = () => ({ type: REMOVE_HISTORY_FILTER_EXCLUDE_TAG });
export const addPill = () => ({ type: ADD_HISTORY_FILTER_EXCLUDE_TAG });
| squatsandsciencelabs/OpenBarbellApp | app/features/history/history_filter/tags/tagsToExclude/EditHistoryFilterTagsToExcludeActions.js | JavaScript | mit | 639 |
---
published: true
layout: page
---
Excel Spreadsheet function VLOOKUP

* Vlookup [Instructions Link](http://www.gcflearnfree.org/excel-tips/how-to-use-excels-vlookup-function "read this Web Based Lesson"){:target="_blank"} for the Excel function
## Excel Spreadsheet function VLOOKUP
### Exercises
2. cat simple [Spreadsheet]({{ site.baseurl }}/06excel/Cats vlookup simple.xls "Download this and follow the instructions in the spreadsheet ")
1. Vlookup [Instructions]({{ site.baseurl }}/05vlookup/Instructions_Catnip_Vlookup.doc "Download this and follow the instructions in the document to get started using the Vlookup Function")
2. Blank [Spreadsheet]({{ site.baseurl }}/05vlookup/Orig_Catnip_VLookup.xlsx "Download this and follow the instructions in the previous document to implement the vlookup function")
2. Class grades [Spreadsheet]({{ site.baseurl }}/06excel/classxx grades.xlsx "Download this and follow the instructions in the spreadsheet ")
### Useful resources
1. Excel [help]({{ site.baseurl }}/05vlookup/vlookup_excel_help.pdf "Inbuilt Excel Help for Vlookup"){:target="_blank"}
What do you think HLOOKUP does ?
### Teacher Resources
1. Demo [part done spreadsheet]({{ site.baseurl }}/05vlookup/part_done_Catnip_VLookup.xlsx "Download this to demonstrate the use of vlookup ")
2. Completed [spreadsheet]({{ site.baseurl }}/05vlookup/all_done_Catnip_VLookup.xlsx "an example of the completed spreadsheet")
3. starter plenary [functions quiz]({{ site.baseurl }}/05vlookup/starter_plenary_functions.ppt "a simple yes/no Excel functions quiz")
3. starter [complete vlookup quiz]({{ site.baseurl }}/05vlookup/vlookup_buzzwords.ppt "buzzwords - find the vlookup answer")
3. introduction [to vlookup]({{ site.baseurl }}/05vlookup/vlookup_intro.ppt "Optional- single slide of vlookup to talk/walk through")
| paulcockram7/paulcockram7.github.io | _posts/2016-02-01-Excel Vlookup Function.md | Markdown | mit | 1,926 |
require 'yaml'
require 'active_record'
require_relative 'weapon'
require_relative '../core/damage'
require_relative '../skills/skill'
require_relative '../skills/protection_skill'
# class PopulateItems
#
# ITEMS = {
# bow: Weapon.new( :bow, 2, :shoot, 2, Damage.new( 8 ), 10 ),
# sword: Weapon.new( :sword, 6, :melee, 2, Damage.new( 6 ), 1 ),
# shield: Tool.new( :shield, 4, :shield, 2 )
# }
#
# def self.get( item_name )
# raise "Item #{item_name} does not exist" unless ITEMS.has_key?( item_name)
# ITEMS[ item_name ].clone
# end
#
# end
db_info = YAML.load( File.open( 'db/config.yml' ).read )
ActiveRecord::Base.establish_connection( db_info[ 'development' ] )
_1d8 = Damage.find_or_create_by!( dices_side: 8, nb_dices: 1, bonus: 0 )
shoot = Skill.find_by( name: :shoot )
Weapon.find_or_create_by!( name: :bow, difficulty: 2, hp: 2, skill_id: shoot.id, damage_id: _1d8.id, reach: 10 )
_1d6 = Damage.find_or_create_by!( dices_side: 6, nb_dices: 1, bonus: 0 )
melee = Skill.find_by( name: :melee )
Weapon.find_or_create_by!( name: :sword, difficulty: 2, hp: 6, skill_id: melee.id, damage_id: _1d6.id, reach: 1 )
shield = Skill.find_by( name: :shield )
Tool.find_or_create_by!( name: :shield, difficulty: 2, hp: 4, skill_id: shield.id )
| czuger/d10_fight_system | lib/items/old/populate_items.rb | Ruby | mit | 1,272 |
require 'net/ftp'
module Setup
module WebhookCommon
extend ActiveSupport::Concern
include WithTemplateParameters
include JsonMetadata
include AuthorizationHandler
def method_enum
self.class.method_enum
end
def conformed_path(options = {})
conform_field_value(:path, options)
end
def upon(connections, options = {})
@connections = connections
@connection_role_options = options || {}
self
end
def params_stack
stack = [using_authorization, self]
stack.compact!
stack.unshift(@connections) if @connections.is_a?(Setup::Connection)
stack
end
def with(options)
case options
when NilClass
self
when Setup::Connection, Setup::ConnectionRole
upon(options)
else
super
end
end
def and(options)
with(options)
end
def connections
if @connections_cache
@connections_cache
else
connections =
if @connections
@connections.is_a?(Setup::Connection) ? [@connections] : (@connections.connections || [])
else
connections = []
Setup::ConnectionRole.all.each do |connection_role|
if connection_role.webhook_ids.include?(self.id)
connections = (connections + connection_role.connections.to_a).uniq
end
end
connections
end
if connections.empty? && (connection = Setup::Connection.where(namespace: namespace).first)
connections << connection
end
@connections_cache = connections unless @connection_role_options &&
@connection_role_options.key?(:cache) &&
!@connection_role_options[:cache]
connections
end
end
def submit!(*args, &block)
if (options = args[0]).is_a?(Hash)
body_argument = options[:body]
else
body_argument = options
options = args[1] || {}
end
options[:halt_on_error] = true
submit(body_argument, options, &block)
end
def notification_model
Account.current ? Setup::SystemNotification : Setup::SystemReport
end
def submit(*args, &block)
if (options = args[0]).is_a?(Hash)
body_argument = options[:body]
else
body_argument = options
options = args[1] || {}
end
last_response = nil
template_parameters_hash = self.template_parameters_hash.merge!(options[:template_parameters] || {})
verbose_response = options[:verbose_response] ? {} : nil
if (connections = self.connections).present?
verbose_response[:connections_present] = true if verbose_response
common_submitter_body = (body_caller = body_argument.respond_to?(:call)) ? nil : body_argument
connections.each do |connection|
template_parameters = template_parameters_hash.dup
template_parameters.reverse_merge!(connection.template_parameters_hash)
submitter_body =
if body_caller
body_argument.call(template_parameters)
else
common_submitter_body
end
submitter_body = '' if body_argument && submitter_body.nil?
if [Hash, Array, String, NilClass].include?(submitter_body.class)
case submitter_body
when Hash
if options[:contentType] == 'application/json'
body = submitter_body.to_json
else
body = {}
submitter_body.each do |key, content|
body[key] =
if content.is_a?(String) || content.respond_to?(:read)
content
elsif content.is_a?(Hash)
UploadIO.new(StringIO.new(content[:data]), content[:contentType], content[:filename])
else
content.to_s
end
end
end
when Array
body = submitter_body.to_json
else
body = submitter_body
end
template_parameters.reverse_merge!(
url: url = connection.conformed_url(template_parameters),
path: conformed_path(template_parameters)
)
template_parameters[:body] = body if body
uri = URI.parse(url)
last_response = case uri.scheme
when nil, '', 'http', 'https'
process_http_connection(connection, template_parameters, verbose_response, last_response, options, &block)
else
process_connection(template_parameters, verbose_response, last_response, options, &block)
end
else
notification_model.create(message: "Invalid submit data type: #{submitter_body.class}")
end
end
else
notification_model.create(message: 'No connections available', type: :warning)
end
verbose_response || last_response
end
def process_http_connection(connection, template_parameters, verbose_response, last_response, options, &block)
template_parameters[:method] ||= method
conformed_url = template_parameters[:url]
conformed_path = template_parameters[:path]
parameters = connection.conformed_parameters(template_parameters)
.merge(conformed_parameters(template_parameters))
.merge!(options[:parameters] || {})
.reject { |_, value| value.blank? }
template_parameters[:query_parameters] = parameters
connection.inject_other_parameters(parameters, template_parameters)
inject_other_parameters(parameters, template_parameters)
if (auth = using_authorization || connection.using_authorization)
auth.sign_params(parameters, template_parameters)
end
body = template_parameters[:body]
query = parameters.plain_query(skip_encoding: template_parameters['skip_query_encoding'].to_b)
template_parameters[:query] = query
headers = {}
template_parameters[:contentType] = headers['Content-Type'] = options[:contentType] if options.key?(:contentType)
headers.merge!(connection.conformed_headers(template_parameters))
.merge!(conformed_headers(template_parameters))
.merge!(options[:headers] || {})
.reject! { |_, value| value.nil? }
halt_anyway = false
begin
if body.to_s.empty? && headers['Content-Type'] == 'application/x-www-form-urlencoded'
body = parameters.www_form_encode
query = nil
end
conformed_path += '?' + query if query.present?
url = conformed_url.gsub(%r{\/+\Z}, '') + ('/' + conformed_path).gsub(%r{\/+}, '/')
template_parameters[:uri] ||= url
if body
if (attachment_body = body).is_a?(Hash)
attachment_body = attachment_body.collect do |key, value|
[
key, if value.respond_to?(:default_hash)
value.default_hash
else
value
end
]
end.to_h
attachment_body = JSON.pretty_generate(attachment_body)
end
attachment = build_attachment(contentType: headers['Content-Type'], body: attachment_body)
if (request_attachment = options[:request_attachment]).respond_to?(:call)
attachment = request_attachment.call(attachment)
end
else
attachment = nil
end
notification_model.create_with(
message: JSON.pretty_generate(
method: method,
url: url,
headers: headers),
type: :notice,
attachment: attachment,
skip_notification_level: options[:skip_notification_level] || options[:notify_request]
)
headers.each { |key, value| headers[key] = value.to_s }
msg = { headers: headers }
msg[:body] = body if body
msg[:timeout] = remaining_request_time
msg[:verify] = false # TODO: Https verify option by Connection
if (http_proxy = options[:http_proxy_address])
msg[:http_proxyaddr] = http_proxy
end
if (http_proxy_port = options[:http_proxy_port])
msg[:http_proxyport] = http_proxy_port
end
begin
start_time = Time.current
http_response = HTTMultiParty.send(method, url, msg)
rescue Timeout::Error
http_response = Setup::Webhook::HttpResponse.new(
true,
code: 408,
content_type: 'application/json',
body: {
error: {
errors: [
{
reason: 'timeout',
message: "Request timeout (#{msg[:timeout]}s)"
}
],
code: 408,
message: "Request timeout (#{msg[:timeout]}s)"
}
}.to_json
)
rescue Exception => ex
raise ex
ensure
remaining_request_time(start_time - Time.current)
end
last_response = http_response.body
http_response = Setup::Webhook::HttpResponse.new(false, http_response) unless http_response.is_a?(Setup::Webhook::HttpResponse)
notification_model.create_with(
message: { response_code: http_response.code }.to_json,
type: http_response.success? ? :notice : :error,
attachment: attachment_from(http_response),
skip_notification_level: options[:skip_notification_level] || options[:notify_response]
)
if block
halt_anyway = true
last_response =
case block.arity
when 1
block.call(http_response)
when 2
block.call(http_response, template_parameters)
end
end
if verbose_response
verbose_response[:last_response] = last_response
verbose_response[:http_response] = verbose_response[:response] = http_response
end
rescue Exception => ex
notification_model.create_from(ex)
raise ex if options[:halt_on_error] || halt_anyway
end
last_response
end
def process_connection(template_parameters, verbose_response, last_response, options, &block)
conformed_url = template_parameters[:url]
conformed_path = template_parameters[:path]
body = template_parameters[:body]
halt_anyway = false
begin
url = conformed_url.gsub(%r{\/+\Z}, '') + ('/' + conformed_path).gsub(%r{\/+}, '/')
if body
fail "Invalid operation '#{method}', non HTTP[S] body submission only supported for PUT operations" unless method == 'put'
attachment = build_attachment(contentType: options[:contentType], body: body)
if (request_attachment = options[:request_attachment]).respond_to?(:call)
attachment = request_attachment.call(attachment)
end
else
fail "Invalid operation '#{method}', non HTTP[S] requests (with no body) only supported for GET operations" unless method == 'get'
attachment = nil
end
notification_model.create_with(
message: JSON.pretty_generate(
command: body ? 'put' : 'get',
url: url
),
type: :notice,
attachment: attachment,
skip_notification_level: options[:skip_notification_level] || options[:notify_request]
)
#msg[:timeout] = remaining_request_time #TODO handle timeout
begin
uri = URI.parse(url)
process_method = "process_#{uri.scheme}"
if respond_to?(process_method)
start_time = Time.current
result = send(
process_method,
host: uri.host,
path: uri.path,
body: body,
template_parameters: template_parameters,
options: options
)
response = Setup::Webhook::Response.new(
true,
code: :success,
body: result,
headers: {
filename: uri.path.split('/').last,
metadata: {
uri: uri.to_s,
host: uri.host,
path: uri.path
}
}
)
else
fail "Unsupported file resource scheme: #{uri.scheme}"
end
rescue Timeout::Error
response = Setup::Webhook::Response.new(true, code: :timeout)
rescue Exception => ex
raise ex
ensure
remaining_request_time(start_time - Time.current)
end
last_response = response.body
notification_model.create_with(
message: { response_code: response.code }.to_json,
type: response.success? ? :notice : :error,
attachment: attachment_from(response),
skip_notification_level: options[:skip_notification_level] || options[:notify_response]
)
if block
halt_anyway = true
last_response =
case block.arity
when 1
block.call(response)
when 2
block.call(response, template_parameters)
end
end
if verbose_response
verbose_response[:last_response] = last_response
verbose_response[:response] = response
end
rescue Exception => ex
notification_model.create_from(ex)
raise ex if options[:halt_on_error] || halt_anyway
end
last_response
end
def process_ftp(opts)
result = nil
path = URI.decode(opts[:path])
username, password = check(opts[:template_parameters], :username, :password)
Net::FTP.open(opts[:host], username, password) do |ftp|
if (body = opts[:body])
begin
# Checking the path
folders = path.split('/')
folders[0, folders.size - 1].each do |folder|
ftp.mkdir(folder) if !ftp.list(ftp.pwd).any? { |dir| dir.match(/\s#{folder}$/) }
ftp.chdir(folder)
end
# Uploading file
tempfile = Tempfile.new('ftp', :encoding => body.encoding)
tempfile.write(body)
tempfile.close
ftp.putbinaryfile(tempfile, folders.last)
ensure
begin
tempfile.close
rescue
end
end
else
result = ftp.getbinaryfile(path, nil)
end
end
result
end
def process_sftp(opts)
result = nil
username, password = check(opts[:template_parameters], :username, :password)
Net::SFTP.start(opts[:host], username, password: password) do |sftp|
if (body = opts[:body])
sftp.file.open(opts[:path], 'w') { |f| f.puts(body) }
else
result = sftp.file.open(opts[:path], 'r') { |f| f.gets }
end
end
result
end
def process_scp(opts)
username, password = check(opts[:template_parameters], :username, :password)
if (body = opts[:body])
Net::SCP.upload!(opts[:host], username, StringIO.new(body), opts[:path], ssh: { password: password })
else
Net::SCP.download!(opts[:host], username, opts[:path], nil, ssh: { password: password })
end
end
def check(template_parameters, *args)
values = []
args.collect(&:to_s).each do |key|
if (value = template_parameters[key].presence)
values << value
else
fail "Template parameter '#{key}' is not present"
end
end
values
end
def attachment_from(response)
if response && (body = response.body)
build_attachment(base_name: response.object_id.to_s, contentType: response.content_type, body: body)
else
nil
end
end
def build_attachment(hash)
unless hash.key?(:filename)
filename = hash[:base_name] || DateTime.now.strftime('%Y-%m-%d_%Hh%Mm%S')
if (content_type = hash[:contentType]) && (types = MIME::Types[content_type])
types.each do |type|
if (ext = type.extensions.first)
filename = "#{filename}.#{ext}"
break
end
end
end
hash[:filename] = filename
end
hash[:contentType] ||= 'application/octet-stream'
hash
end
REQUEST_TIME_KEY = '[cenit]remaining_request_time'
DEFAULT_REQUEST_TIMEOUT = 300
def remaining_request_time(*args)
unless (remaining = Thread.current[REQUEST_TIME_KEY])
Thread.current[REQUEST_TIME_KEY] = remaining = Cenit.request_timeout || DEFAULT_REQUEST_TIMEOUT
end
if (delta = args[0])
Thread.current[REQUEST_TIME_KEY] = [remaining + delta, 1].max
else
remaining
end
end
METHODS = %W(GET POST PUT DELETE PATCH COPY OPTIONS LINK UNLINK PURGE LOCK UNLOCK HEAD LINK UNLINK PURGE LOCK UNLOCK PROPFIND)
SYM_METHODS = METHODS.map(&:downcase).map(&:to_sym)
module ClassMethods
def method_enum
SYM_METHODS
end
end
class HttpResponse
attr_reader :requester_response
def initialize(requester_response, response)
@requester_response = requester_response
@response = response
end
def success?
(200...299).include?(code)
end
def requester_response?
requester_response.to_b
end
def code
get(:code)
end
def body
get(:body)
end
def headers
(get(:headers) || {}).to_hash
end
def content_type
get(:content_type)
end
private
def get(property)
if requester_response?
@response[property]
else
@response.instance_eval(property.to_s)
end
end
end
class Response
attr_reader :requester_response
def initialize(requester_response, response)
@requester_response = requester_response
@response = response
end
def success?
code == :success
end
def requester_response?
requester_response.to_b
end
def code
get(:code)
end
def body
get(:body)
end
def headers
(get(:headers) || {}).to_hash
end
def content_type
get(:content_type)
end
private
def get(property)
@response[property]
end
end
end
end
| macarci/cenit | app/models/setup/webhook_common.rb | Ruby | mit | 18,884 |
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { Craft, CrafterStats, CraftingAction, CraftingActionsRegistry } from '@ffxiv-teamcraft/simulator';
import { first } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class SolverWorkerService {
private worker: Worker;
private _result$: Subject<CraftingAction[]> = new Subject<CraftingAction[]>();
public result$: Observable<CraftingAction[]> = this._result$.asObservable();
constructor() {
if (typeof Worker !== 'undefined') {
// Create a new
const worker = new Worker('./solver.worker', { type: 'module' });
worker.onmessage = ({ data }) => {
this._result$.next(CraftingActionsRegistry.deserializeRotation(data));
};
} else {
// Web Workers are not supported in this environment.
// You should add a fallback so that your program still executes correctly.
}
}
public solveRotation(recipe: Craft, stats: CrafterStats, seed?: CraftingAction[]): Observable<CraftingAction[]> {
this.worker.postMessage({
recipe,
stats,
seed
});
return this.result$.pipe(first());
}
public isSupported(): boolean {
return this.worker !== undefined;
}
}
| Supamiu/ffxiv-teamcraft | apps/client/src/app/core/workers/solver/solver.worker.service.ts | TypeScript | mit | 1,260 |
var Service = require("./../service.js");
function DistanceService(deviceId, serviceId) {
var distanceService = {}
, _characteristics = {
'distance' : 1
, 'unit' : 2
}
, _requests = {
'read-distance' : function () {
return {
packetType : 'read'
, packetData :[_characteristics['distance']]
}
}
, 'read-unit' : function () {
return {
packetType : 'read'
, packetData :[_characteristics['unit']]
}
}
, 'read-distance-with-unit' : function () {
return {
packetType : 'read'
, packetData :[_characteristics['distance'], _characteristics['unit']]
}
}
, 'set-unit' : function (unit) {
return {
packetType : 'write'
, packetData :[
{id : _characteristics['unit'], data : new Buffer(unit)}
]
}
}
}
, _responses = {};
_responses[_characteristics['distance']] = function (distanceBufer) {
var distance = distanceBufer.readUInt8(0, true);
return {
response : 'distance'
, data : "" + (distance === undefined ? 0 : distance)
};
};
_responses[_characteristics['unit']] = function (unitBuffer) {
return {
response : 'unit'
, data : unitBuffer.toString()
};
};
distanceService.__proto__ = Service(
deviceId
, serviceId
, _requests
, _responses
);
return distanceService;
}
module.exports = DistanceService;
(function(){
var assert = require("assert");
var ResponsePacket = require("../device-packets/response-packet");
var serviceId = 3
, distanceService = DistanceService("my-device-id", serviceId);
(function(){
console.log("Should process read distance json message.");
assert.deepEqual(
distanceService.processRequest(JSON.stringify(
{request: 'read-distance'}
)),
new Buffer([1, 1, 0, 0, 0, serviceId, 1, 1])
);
})();
(function(){
console.log("Should process read unit json message.");
assert.deepEqual(
distanceService.processRequest(JSON.stringify(
{request: 'read-unit'}
)),
new Buffer([1, 1, 0, 0, 0, serviceId, 1, 2])
);
})();
(function(){
console.log("Should process read distance with unit json message.");
assert.deepEqual(
distanceService.processRequest(JSON.stringify(
{request: 'read-distance-with-unit'}
)),
new Buffer([1, 1, 0, 0, 0, serviceId, 2, 1, 2])
);
})();
(function(){
console.log("Should process set unit json message.");
var unit = "cm"
, unitBuffer = new Buffer(unit);
assert.deepEqual(
distanceService.processRequest(JSON.stringify(
{request: 'set-unit', data: unit}
)),
Buffer.concat([
new Buffer([1, 2, 0, 0, 0, serviceId, 1, 2, unitBuffer.length])
, unitBuffer
])
);
})();
(function(){
console.log("Should process distance response packet.");
assert.deepEqual(
distanceService.processResponse(ResponsePacket(new Buffer([
1, 4, 0, 0, 0, serviceId, 1, 1, 1, 23
]))),
[{response: 'distance', data: 23}]
);
})();
(function(){
console.log("Should process unit response packet.");
var unit = "cm"
, unitBuffer = new Buffer(unit);
assert.deepEqual(
distanceService.processResponse(ResponsePacket(Buffer.concat([
new Buffer([1, 4, 0, 0, 0, serviceId, 1, 2, unitBuffer.length])
, unitBuffer
]))),
[{response: 'unit', data: 'cm'}]
);
})();
(function(){
console.log("Should process distance with unit response packet.");
var unit = "cm"
, unitBuffer = new Buffer(unit);
assert.deepEqual(
distanceService.processResponse(ResponsePacket(Buffer.concat([
new Buffer([1, 4, 0, 0, 0, serviceId, 2, 1, 1, 54, 2, unitBuffer.length])
, unitBuffer
]))),
[
{response: 'distance', data: '54'}
, {response: 'unit', data: 'cm'}
]
);
})();
})(this); | ThoughtWorksIoTGurgaon/queenbee | services/distance-service.js | JavaScript | mit | 4,788 |
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
double p;
double f(double x) {
return x * x - p;
}
double fd(double x) {
return 2.0L * x;
}
int main() {
ios::sync_with_stdio(false);
cout << setiosflags(ios::fixed) << setprecision(4);
while (cin >> p) {
double x = p / 2.0L;
while (fabs(f(x)) > 0.00000001L) {
x = x - f(x) / fd(x);
}
cout << x << endl;
}
return 0;
}
| algoriddle/cp | uva/sqroot.cc | C++ | mit | 438 |
Struts2-jQueryMobile-Cordova
============================
An approach for integrating Struts2 + JQeryMobile + PhoneGap/Cordova to make the PhoneGap app.
| LuXiaolin/Struts2-jQueryMobile-Cordova | README.md | Markdown | mit | 155 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-field: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / extra-dev</a></li>
<li class="active"><a href="">dev / mathcomp-field - 1.6.2</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
mathcomp-field
<small>
1.6.2
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-20 06:05:22 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-20 06:05:22 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 3 Virtual package relying on a GMP lib system installation
coq dev Formal proof management system
dune 2.9.1 Fast, portable, and opinionated build system
ocaml 4.10.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.2 Official release 4.10.2
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
name: "coq-mathcomp-field"
version: "1.6.2"
maintainer: "Mathematical Components <mathcomp-dev@sympa.inria.fr>"
homepage: "http://math-comp.github.io/math-comp/"
bug-reports: "Mathematical Components <mathcomp-dev@sympa.inria.fr>"
license: "CeCILL-B"
build: [ make "-C" "mathcomp/field" "-j" "%{jobs}%" ]
install: [ make "-C" "mathcomp/field" "install" ]
remove: [ "sh" "-c" "rm -rf '%{lib}%/coq/user-contrib/mathcomp/field'" ]
depends: [
"ocaml"
"coq-mathcomp-solvable" {= "1.6.2"}
]
tags: [ "keyword:algebra" "keyword:field" "keyword:small scale reflection" "keyword:mathematical components" "keyword:odd order theorem" ]
authors: [ "Jeremy Avigad <>" "Andrea Asperti <>" "Stephane Le Roux <>" "Yves Bertot <>" "Laurence Rideau <>" "Enrico Tassi <>" "Ioana Pasca <>" "Georges Gonthier <>" "Sidi Ould Biha <>" "Cyril Cohen <>" "Francois Garillot <>" "Alexey Solovyev <>" "Russell O'Connor <>" "Laurent Théry <>" "Assia Mahboubi <>" ]
synopsis: "Mathematical Components Library on Fields"
description: """
This library contains definitions and theorems about field extensions,
galois theory, algebraic numbers, cyclotomic polynomials..."""
url {
src: "http://github.com/math-comp/math-comp/archive/mathcomp-1.6.2.tar.gz"
checksum: "md5=cf10cb16f1ac239a9d52c029a4e00f66"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-mathcomp-field.1.6.2 coq.dev</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is dev).
The following dependencies couldn't be met:
- coq-mathcomp-field -> coq-mathcomp-solvable = 1.6.2 -> coq-mathcomp-algebra = 1.6.2 -> coq-mathcomp-fingroup = 1.6.2 -> coq-mathcomp-ssreflect = 1.6.2 -> coq < 8.6~ -> ocaml < 4.10
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-field.1.6.2</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.10.2-2.0.6/extra-dev/dev/mathcomp-field/1.6.2.html | HTML | mit | 7,861 |
<?php
/*
* This file is part of the FOSUserBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace UserBundle\Controller;
use Symfony\Component\DependencyInjection\ContainerAware;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Core\Exception\AccountStatusException;
use FOS\UserBundle\Model\UserInterface;
use FOS\UserBundle\Controller\RegistrationController as BaseController;
use UserBundle\Entity\User;
/**
* Controller managing the registration
*
* @author Thibault Duplessis <thibault.duplessis@gmail.com>
* @author Christophe Coevoet <stof@notk.org>
*/
class RegistrationController extends BaseController
{
public function registerAction()
{
$form = $this->container->get('fos_user.registration.form');
$formHandler = $this->container->get('fos_user.registration.form.handler');
$confirmationEnabled = $this->container->getParameter('fos_user.registration.confirmation.enabled');
$process = $formHandler->process($confirmationEnabled);
if ($process) {
$user = $form->getData();
$authUser = false;
if ($confirmationEnabled) {
$this->container->get('session')->set('fos_user_send_confirmation_email/email', $user->getEmail());
$route = 'fos_user_registration_check_email';
} else {
$authUser = true;
$route = 'homepage';
}
$this->setFlash('fos_user_success', 'registration.flash.user_created');
$url = $this->container->get('router')->generate($route);
$response = new RedirectResponse($url);
if ($authUser) {
$this->authenticateUser($user, $response);
}
return $response;
}
return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:register.html.'.$this->getEngine(), array(
'form' => $form->createView(),
'register'=>true
));
}
/**
* Tell the user to check his email provider
*/
public function checkEmailAction()
{
$email = $this->container->get('session')->get('fos_user_send_confirmation_email/email');
$this->container->get('session')->remove('fos_user_send_confirmation_email/email');
$user = $this->container->get('fos_user.user_manager')->findUserByEmail($email);
if (null === $user) {
throw new NotFoundHttpException(sprintf('The user with email "%s" does not exist', $email));
}
return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:checkEmail.html.'.$this->getEngine(), array(
'user' => $user,
));
}
/**
* Receive the confirmation token from user email provider, login the user
*/
public function confirmAction($token)
{
$user = $this->container->get('fos_user.user_manager')->findUserByConfirmationToken($token);
if (null === $user) {
throw new NotFoundHttpException(sprintf('The user with confirmation token "%s" does not exist', $token));
}
$user->setConfirmationToken(null);
$user->setEnabled(true);
$user->setLastLogin(new \DateTime());
$this->container->get('fos_user.user_manager')->updateUser($user);
$response = new RedirectResponse($this->container->get('router')->generate('homepage'));
$this->authenticateUser($user, $response);
return $response;
}
/**
* Tell the user his account is now confirmed
*/
public function confirmedAction()
{
$user = $this->container->get('security.context')->getToken()->getUser();
if (!is_object($user) || !$user instanceof UserInterface) {
throw new AccessDeniedException('This user does not have access to this section.');
}
return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:confirmed.html.'.$this->getEngine(), array(
'user' => $user,
));
}
/**
* Authenticate a user with Symfony Security
*
* @param \FOS\UserBundle\Model\UserInterface $user
* @param \Symfony\Component\HttpFoundation\Response $response
*/
protected function authenticateUser(UserInterface $user, Response $response)
{
try {
$this->container->get('fos_user.security.login_manager')->loginUser(
$this->container->getParameter('fos_user.firewall_name'),
$user,
$response);
} catch (AccountStatusException $ex) {
// We simply do not authenticate users which do not pass the user
// checker (not enabled, expired, etc.).
}
}
/**
* @param string $action
* @param string $value
*/
protected function setFlash($action, $value)
{
$this->container->get('session')->getFlashBag()->set($action, $value);
}
protected function getEngine()
{
return $this->container->getParameter('fos_user.template.engine');
}
public function registerFbAction(Request $request)
{
$params_request = $request->request->all();
$route = 'homepage';//Get last URL
$url = $this->container->get('router')->generate($route);
// dump($params_request);die;
$email = $params_request['email'];
$user = $this->container->get('fos_user.user_manager')->findUserByEmail($email);
if (empty($user)) {
$user = new User();
$user->setEmail($email)
->setUsername($email)
->setPassword('')
->setEmailCanonical(strtolower($email))
->setName($params_request['name']);
$user->setLocked(false);
// ->setLastName($params_request['last_name'])
//->setRoles(array('ROLE_USER', 'ROLE_FBUSER'))//add a custom role maybe to identify fb users?
// ->setEnabled(true); //enable directly because this is a confirmed user email from facebook.
// $this->container->get('fos_user.user_manager')->save($user);
$em=$this->container->get('doctrine.orm.default_entity_manager');
$em->persist($user);
$em->flush();
$route = 'fos_user_registration_confirmed';
$url = $this->container->get('router')->generate($route);
//$this->setFlash('msg', 'Welcome');
} else {
$this->setFlash('msg', 'You are old in the site');
}
// $this->authUser($user);
$this->container->get('fos_user.security.login_manager')->loginUser('main', $user);
return new RedirectResponse($url);
}
}
| ernestgm/hoteles | src/UserBundle/Controller/RegistrationController.php | PHP | mit | 7,174 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using uWebshop.Domain;
namespace uWebshop.Test.Domain.IoCContainerTests
{
[TestFixture]
public class ResolveTests
{
private IoCContainer _container;
[SetUp]
public void Setup()
{
_container = new IoCContainer();
}
[ExpectedException(typeof (Exception))]
[Test]
public void Resolve_UnregisteredTypeRequested_ShouldThrowException()
{
_container.Resolve<ResolveTests>();
}
[Test]
public void asb()
{
_container.SetDefaultServiceFactory(new MockServiceFactory());
_container.Resolve<ResolveTests>();
}
[Test]
public void Resolve_RegisteredTypeWithNoDependenciesRequested_ShouldGiveNewInstanceOfRegisteredImplementation()
{
_container.RegisterType<ILeafType, LeafType>();
var actual = _container.Resolve<ILeafType>().GetType();
Assert.AreEqual(typeof (LeafType), actual);
}
[ExpectedException(typeof (Exception))]
[Test]
public void Resolve_RegisteredTypeWithUnregisteredDependencyRequested_ShouldThrowException()
{
_container.RegisterType<INonLeafType, NonLeafType>();
var actual = _container.Resolve<INonLeafType>().GetType();
}
private interface ILeafType
{
}
private class LeafType : ILeafType
{
}
private interface INonLeafType
{
}
private class NonLeafType : INonLeafType
{
public NonLeafType(ILeafType dependency)
{
}
}
}
} | uWebshop/uWebshop-Releases | Tests/uWebshop.Test/Domain/IoCContainerTests/ResolveTests.cs | C# | mit | 1,461 |
---
layout: post
title: RPSC Agriculture Officer posts last date 23rd Nov-2015
date: 2015-10-19 06:27
comments: true
tags: Agriculture Officer Online PSC Rajasthan RPSC
archive: false
---
Recruitment of Assistant Agriculture Officer
RPSC invites Online application for the following posts of Assistant Agriculture Officer for Rajasthan Agriculture Service of Rajasthan Government :
Assistant Agriculture Officer : 257 posts, Age : 18-35 years as on 01/08/2015, Pay Scale : Rs. 9300-34800 grade pay Rs.4200/-
**How to Apply** : Apply Online at RPSC website from 22/10/2015 to 23/11/2015 12.00 midnight.
Information : For complete information and apply online at <http://rpsc.rajasthan.gov.in>
| anchalrani/getopportunity | _posts/2015-10-19-rpsc-agriculture-officer-posts-last.md | Markdown | mit | 717 |
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TextTransformer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TextTransformer")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| nielsbosma/TextTransformer | TextTransformer/Properties/AssemblyInfo.cs | C# | mit | 2,239 |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
<title>Coverage for /usr/local/lib/python2.7/dist-packages/pexpect/__init__.py: 100%</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.hotkeys.js"></script>
<script type="text/javascript" src="jquery.isonscreen.js"></script>
<script type="text/javascript" src="coverage_html.js"></script>
<script type="text/javascript">
jQuery(document).ready(coverage.pyfile_ready);
</script>
</head>
<body class="pyfile">
<div id="header">
<div class="content">
<h1>Coverage for <b>/usr/local/lib/python2.7/dist-packages/pexpect/__init__.py</b> :
<span class="pc_cov">100%</span>
</h1>
<img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
<h2 class="stats">
11 statements
<span class="run hide_run shortkey_r button_toggle_run">11 run</span>
<span class="mis shortkey_m button_toggle_mis">0 missing</span>
<span class="exc shortkey_x button_toggle_exc">0 excluded</span>
</h2>
</div>
</div>
<div class="help_panel">
<img id="panel_icon" src="keybd_open.png" alt="Hide keyboard shortcuts" />
<p class="legend">Hot-keys on this page</p>
<div>
<p class="keyhelp">
<span class="key">r</span>
<span class="key">m</span>
<span class="key">x</span>
<span class="key">p</span> toggle line displays
</p>
<p class="keyhelp">
<span class="key">j</span>
<span class="key">k</span> next/prev highlighted chunk
</p>
<p class="keyhelp">
<span class="key">0</span> (zero) top of page
</p>
<p class="keyhelp">
<span class="key">1</span> (one) first highlighted chunk
</p>
</div>
</div>
<div id="source">
<table>
<tr>
<td class="linenos">
<p id="n1" class="pln"><a href="#n1">1</a></p>
<p id="n2" class="pln"><a href="#n2">2</a></p>
<p id="n3" class="pln"><a href="#n3">3</a></p>
<p id="n4" class="pln"><a href="#n4">4</a></p>
<p id="n5" class="pln"><a href="#n5">5</a></p>
<p id="n6" class="pln"><a href="#n6">6</a></p>
<p id="n7" class="pln"><a href="#n7">7</a></p>
<p id="n8" class="pln"><a href="#n8">8</a></p>
<p id="n9" class="pln"><a href="#n9">9</a></p>
<p id="n10" class="pln"><a href="#n10">10</a></p>
<p id="n11" class="pln"><a href="#n11">11</a></p>
<p id="n12" class="pln"><a href="#n12">12</a></p>
<p id="n13" class="pln"><a href="#n13">13</a></p>
<p id="n14" class="pln"><a href="#n14">14</a></p>
<p id="n15" class="pln"><a href="#n15">15</a></p>
<p id="n16" class="pln"><a href="#n16">16</a></p>
<p id="n17" class="pln"><a href="#n17">17</a></p>
<p id="n18" class="pln"><a href="#n18">18</a></p>
<p id="n19" class="pln"><a href="#n19">19</a></p>
<p id="n20" class="pln"><a href="#n20">20</a></p>
<p id="n21" class="pln"><a href="#n21">21</a></p>
<p id="n22" class="pln"><a href="#n22">22</a></p>
<p id="n23" class="pln"><a href="#n23">23</a></p>
<p id="n24" class="pln"><a href="#n24">24</a></p>
<p id="n25" class="pln"><a href="#n25">25</a></p>
<p id="n26" class="pln"><a href="#n26">26</a></p>
<p id="n27" class="pln"><a href="#n27">27</a></p>
<p id="n28" class="pln"><a href="#n28">28</a></p>
<p id="n29" class="pln"><a href="#n29">29</a></p>
<p id="n30" class="pln"><a href="#n30">30</a></p>
<p id="n31" class="pln"><a href="#n31">31</a></p>
<p id="n32" class="pln"><a href="#n32">32</a></p>
<p id="n33" class="pln"><a href="#n33">33</a></p>
<p id="n34" class="pln"><a href="#n34">34</a></p>
<p id="n35" class="pln"><a href="#n35">35</a></p>
<p id="n36" class="pln"><a href="#n36">36</a></p>
<p id="n37" class="pln"><a href="#n37">37</a></p>
<p id="n38" class="pln"><a href="#n38">38</a></p>
<p id="n39" class="pln"><a href="#n39">39</a></p>
<p id="n40" class="pln"><a href="#n40">40</a></p>
<p id="n41" class="pln"><a href="#n41">41</a></p>
<p id="n42" class="pln"><a href="#n42">42</a></p>
<p id="n43" class="pln"><a href="#n43">43</a></p>
<p id="n44" class="pln"><a href="#n44">44</a></p>
<p id="n45" class="pln"><a href="#n45">45</a></p>
<p id="n46" class="pln"><a href="#n46">46</a></p>
<p id="n47" class="pln"><a href="#n47">47</a></p>
<p id="n48" class="pln"><a href="#n48">48</a></p>
<p id="n49" class="pln"><a href="#n49">49</a></p>
<p id="n50" class="pln"><a href="#n50">50</a></p>
<p id="n51" class="pln"><a href="#n51">51</a></p>
<p id="n52" class="pln"><a href="#n52">52</a></p>
<p id="n53" class="pln"><a href="#n53">53</a></p>
<p id="n54" class="pln"><a href="#n54">54</a></p>
<p id="n55" class="pln"><a href="#n55">55</a></p>
<p id="n56" class="pln"><a href="#n56">56</a></p>
<p id="n57" class="pln"><a href="#n57">57</a></p>
<p id="n58" class="pln"><a href="#n58">58</a></p>
<p id="n59" class="pln"><a href="#n59">59</a></p>
<p id="n60" class="pln"><a href="#n60">60</a></p>
<p id="n61" class="pln"><a href="#n61">61</a></p>
<p id="n62" class="pln"><a href="#n62">62</a></p>
<p id="n63" class="pln"><a href="#n63">63</a></p>
<p id="n64" class="pln"><a href="#n64">64</a></p>
<p id="n65" class="pln"><a href="#n65">65</a></p>
<p id="n66" class="stm run hide_run"><a href="#n66">66</a></p>
<p id="n67" class="stm run hide_run"><a href="#n67">67</a></p>
<p id="n68" class="pln"><a href="#n68">68</a></p>
<p id="n69" class="stm run hide_run"><a href="#n69">69</a></p>
<p id="n70" class="stm run hide_run"><a href="#n70">70</a></p>
<p id="n71" class="stm run hide_run"><a href="#n71">71</a></p>
<p id="n72" class="pln"><a href="#n72">72</a></p>
<p id="n73" class="stm run hide_run"><a href="#n73">73</a></p>
<p id="n74" class="pln"><a href="#n74">74</a></p>
<p id="n75" class="stm run hide_run"><a href="#n75">75</a></p>
<p id="n76" class="stm run hide_run"><a href="#n76">76</a></p>
<p id="n77" class="pln"><a href="#n77">77</a></p>
<p id="n78" class="stm run hide_run"><a href="#n78">78</a></p>
<p id="n79" class="stm run hide_run"><a href="#n79">79</a></p>
<p id="n80" class="stm run hide_run"><a href="#n80">80</a></p>
<p id="n81" class="pln"><a href="#n81">81</a></p>
<p id="n82" class="pln"><a href="#n82">82</a></p>
<p id="n83" class="pln"><a href="#n83">83</a></p>
<p id="n84" class="pln"><a href="#n84">84</a></p>
<p id="n85" class="pln"><a href="#n85">85</a></p>
</td>
<td class="text">
<p id="t1" class="pln"><span class="str">'''Pexpect is a Python module for spawning child applications and controlling</span><span class="strut"> </span></p>
<p id="t2" class="pln"><span class="str">them automatically. Pexpect can be used for automating interactive applications</span><span class="strut"> </span></p>
<p id="t3" class="pln"><span class="str">such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup</span><span class="strut"> </span></p>
<p id="t4" class="pln"><span class="str">scripts for duplicating software package installations on different servers. It</span><span class="strut"> </span></p>
<p id="t5" class="pln"><span class="str">can be used for automated software testing. Pexpect is in the spirit of Don</span><span class="strut"> </span></p>
<p id="t6" class="pln"><span class="str">Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python</span><span class="strut"> </span></p>
<p id="t7" class="pln"><span class="str">require TCL and Expect or require C extensions to be compiled. Pexpect does not</span><span class="strut"> </span></p>
<p id="t8" class="pln"><span class="str">use C, Expect, or TCL extensions. It should work on any platform that supports</span><span class="strut"> </span></p>
<p id="t9" class="pln"><span class="str">the standard Python pty module. The Pexpect interface focuses on ease of use so</span><span class="strut"> </span></p>
<p id="t10" class="pln"><span class="str">that simple tasks are easy.</span><span class="strut"> </span></p>
<p id="t11" class="pln"><span class="strut"> </span></p>
<p id="t12" class="pln"><span class="str">There are two main interfaces to the Pexpect system; these are the function,</span><span class="strut"> </span></p>
<p id="t13" class="pln"><span class="str">run() and the class, spawn. The spawn class is more powerful. The run()</span><span class="strut"> </span></p>
<p id="t14" class="pln"><span class="str">function is simpler than spawn, and is good for quickly calling program. When</span><span class="strut"> </span></p>
<p id="t15" class="pln"><span class="str">you call the run() function it executes a given program and then returns the</span><span class="strut"> </span></p>
<p id="t16" class="pln"><span class="str">output. This is a handy replacement for os.system().</span><span class="strut"> </span></p>
<p id="t17" class="pln"><span class="strut"> </span></p>
<p id="t18" class="pln"><span class="str">For example::</span><span class="strut"> </span></p>
<p id="t19" class="pln"><span class="strut"> </span></p>
<p id="t20" class="pln"><span class="str"> pexpect.run('ls -la')</span><span class="strut"> </span></p>
<p id="t21" class="pln"><span class="strut"> </span></p>
<p id="t22" class="pln"><span class="str">The spawn class is the more powerful interface to the Pexpect system. You can</span><span class="strut"> </span></p>
<p id="t23" class="pln"><span class="str">use this to spawn a child program then interact with it by sending input and</span><span class="strut"> </span></p>
<p id="t24" class="pln"><span class="str">expecting responses (waiting for patterns in the child's output).</span><span class="strut"> </span></p>
<p id="t25" class="pln"><span class="strut"> </span></p>
<p id="t26" class="pln"><span class="str">For example::</span><span class="strut"> </span></p>
<p id="t27" class="pln"><span class="strut"> </span></p>
<p id="t28" class="pln"><span class="str"> child = pexpect.spawn('scp foo user@example.com:.')</span><span class="strut"> </span></p>
<p id="t29" class="pln"><span class="str"> child.expect('Password:')</span><span class="strut"> </span></p>
<p id="t30" class="pln"><span class="str"> child.sendline(mypassword)</span><span class="strut"> </span></p>
<p id="t31" class="pln"><span class="strut"> </span></p>
<p id="t32" class="pln"><span class="str">This works even for commands that ask for passwords or other input outside of</span><span class="strut"> </span></p>
<p id="t33" class="pln"><span class="str">the normal stdio streams. For example, ssh reads input directly from the TTY</span><span class="strut"> </span></p>
<p id="t34" class="pln"><span class="str">device which bypasses stdin.</span><span class="strut"> </span></p>
<p id="t35" class="pln"><span class="strut"> </span></p>
<p id="t36" class="pln"><span class="str">Credits: Noah Spurrier, Richard Holden, Marco Molteni, Kimberley Burchett,</span><span class="strut"> </span></p>
<p id="t37" class="pln"><span class="str">Robert Stone, Hartmut Goebel, Chad Schroeder, Erick Tryzelaar, Dave Kirby, Ids</span><span class="strut"> </span></p>
<p id="t38" class="pln"><span class="str">vander Molen, George Todd, Noel Taylor, Nicolas D. Cesar, Alexander Gattin,</span><span class="strut"> </span></p>
<p id="t39" class="pln"><span class="str">Jacques-Etienne Baudoux, Geoffrey Marshall, Francisco Lourenco, Glen Mabey,</span><span class="strut"> </span></p>
<p id="t40" class="pln"><span class="str">Karthik Gurusamy, Fernando Perez, Corey Minyard, Jon Cohen, Guillaume</span><span class="strut"> </span></p>
<p id="t41" class="pln"><span class="str">Chazarain, Andrew Ryan, Nick Craig-Wood, Andrew Stone, Jorgen Grahn, John</span><span class="strut"> </span></p>
<p id="t42" class="pln"><span class="str">Spiegel, Jan Grant, and Shane Kerr. Let me know if I forgot anyone.</span><span class="strut"> </span></p>
<p id="t43" class="pln"><span class="strut"> </span></p>
<p id="t44" class="pln"><span class="str">Pexpect is free, open source, and all that good stuff.</span><span class="strut"> </span></p>
<p id="t45" class="pln"><span class="str">http://pexpect.sourceforge.net/</span><span class="strut"> </span></p>
<p id="t46" class="pln"><span class="strut"> </span></p>
<p id="t47" class="pln"><span class="str">PEXPECT LICENSE</span><span class="strut"> </span></p>
<p id="t48" class="pln"><span class="strut"> </span></p>
<p id="t49" class="pln"><span class="str"> This license is approved by the OSI and FSF as GPL-compatible.</span><span class="strut"> </span></p>
<p id="t50" class="pln"><span class="str"> http://opensource.org/licenses/isc-license.txt</span><span class="strut"> </span></p>
<p id="t51" class="pln"><span class="strut"> </span></p>
<p id="t52" class="pln"><span class="str"> Copyright (c) 2012, Noah Spurrier <noah@noah.org></span><span class="strut"> </span></p>
<p id="t53" class="pln"><span class="str"> PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY</span><span class="strut"> </span></p>
<p id="t54" class="pln"><span class="str"> PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE</span><span class="strut"> </span></p>
<p id="t55" class="pln"><span class="str"> COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.</span><span class="strut"> </span></p>
<p id="t56" class="pln"><span class="str"> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span><span class="strut"> </span></p>
<p id="t57" class="pln"><span class="str"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span><span class="strut"> </span></p>
<p id="t58" class="pln"><span class="str"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span><span class="strut"> </span></p>
<p id="t59" class="pln"><span class="str"> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span><span class="strut"> </span></p>
<p id="t60" class="pln"><span class="str"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span><span class="strut"> </span></p>
<p id="t61" class="pln"><span class="str"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span><span class="strut"> </span></p>
<p id="t62" class="pln"><span class="str"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span><span class="strut"> </span></p>
<p id="t63" class="pln"><span class="strut"> </span></p>
<p id="t64" class="pln"><span class="str">'''</span><span class="strut"> </span></p>
<p id="t65" class="pln"><span class="strut"> </span></p>
<p id="t66" class="stm run hide_run"><span class="key">import</span> <span class="nam">sys</span><span class="strut"> </span></p>
<p id="t67" class="stm run hide_run"><span class="nam">PY3</span> <span class="op">=</span> <span class="op">(</span><span class="nam">sys</span><span class="op">.</span><span class="nam">version_info</span><span class="op">[</span><span class="num">0</span><span class="op">]</span> <span class="op">>=</span> <span class="num">3</span><span class="op">)</span><span class="strut"> </span></p>
<p id="t68" class="pln"><span class="strut"> </span></p>
<p id="t69" class="stm run hide_run"><span class="key">from</span> <span class="op">.</span><span class="nam">exceptions</span> <span class="key">import</span> <span class="nam">ExceptionPexpect</span><span class="op">,</span> <span class="nam">EOF</span><span class="op">,</span> <span class="nam">TIMEOUT</span><span class="strut"> </span></p>
<p id="t70" class="stm run hide_run"><span class="key">from</span> <span class="op">.</span><span class="nam">utils</span> <span class="key">import</span> <span class="nam">split_command_line</span><span class="op">,</span> <span class="nam">which</span><span class="op">,</span> <span class="nam">is_executable_file</span><span class="strut"> </span></p>
<p id="t71" class="stm run hide_run"><span class="key">from</span> <span class="op">.</span><span class="nam">expect</span> <span class="key">import</span> <span class="nam">Expecter</span><span class="op">,</span> <span class="nam">searcher_re</span><span class="op">,</span> <span class="nam">searcher_string</span><span class="strut"> </span></p>
<p id="t72" class="pln"><span class="strut"> </span></p>
<p id="t73" class="stm run hide_run"><span class="key">if</span> <span class="nam">sys</span><span class="op">.</span><span class="nam">platform</span> <span class="op">!=</span> <span class="str">'win32'</span><span class="op">:</span><span class="strut"> </span></p>
<p id="t74" class="pln"> <span class="com"># On Unix, these are available at the top level for backwards compatibility</span><span class="strut"> </span></p>
<p id="t75" class="stm run hide_run"> <span class="key">from</span> <span class="op">.</span><span class="nam">pty_spawn</span> <span class="key">import</span> <span class="nam">spawn</span><span class="op">,</span> <span class="nam">spawnu</span><span class="strut"> </span></p>
<p id="t76" class="stm run hide_run"> <span class="key">from</span> <span class="op">.</span><span class="nam">run</span> <span class="key">import</span> <span class="nam">run</span><span class="op">,</span> <span class="nam">runu</span><span class="strut"> </span></p>
<p id="t77" class="pln"><span class="strut"> </span></p>
<p id="t78" class="stm run hide_run"><span class="nam">__version__</span> <span class="op">=</span> <span class="str">'4.2.1'</span><span class="strut"> </span></p>
<p id="t79" class="stm run hide_run"><span class="nam">__revision__</span> <span class="op">=</span> <span class="str">''</span><span class="strut"> </span></p>
<p id="t80" class="stm run hide_run"><span class="nam">__all__</span> <span class="op">=</span> <span class="op">[</span><span class="str">'ExceptionPexpect'</span><span class="op">,</span> <span class="str">'EOF'</span><span class="op">,</span> <span class="str">'TIMEOUT'</span><span class="op">,</span> <span class="str">'spawn'</span><span class="op">,</span> <span class="str">'spawnu'</span><span class="op">,</span> <span class="str">'run'</span><span class="op">,</span> <span class="str">'runu'</span><span class="op">,</span><span class="strut"> </span></p>
<p id="t81" class="pln"> <span class="str">'which'</span><span class="op">,</span> <span class="str">'split_command_line'</span><span class="op">,</span> <span class="str">'__version__'</span><span class="op">,</span> <span class="str">'__revision__'</span><span class="op">]</span><span class="strut"> </span></p>
<p id="t82" class="pln"><span class="strut"> </span></p>
<p id="t83" class="pln"><span class="strut"> </span></p>
<p id="t84" class="pln"><span class="strut"> </span></p>
<p id="t85" class="pln"><span class="com"># vim: set shiftround expandtab tabstop=4 shiftwidth=4 ft=python autoindent :</span><span class="strut"> </span></p>
</td>
</tr>
</table>
</div>
<div id="footer">
<div class="content">
<p>
<a class="nav" href="index.html">« index</a> <a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.3.4</a>,
created at 2017-04-14 18:38
</p>
</div>
</div>
</body>
</html>
| ianmiell/shutit-test | htmlcov/_usr_local_lib_python2_7_dist-packages_pexpect___init___py.html | HTML | mit | 19,780 |
/* Requires
globals.css
app.js */
/* Tabs ---------------------- */
/* line 7, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs {
border-bottom: solid 1px #e6e6e6;
display: block;
height: 40px;
padding: 0;
margin-bottom: 20px;
}
/* line 8, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.contained {
margin-bottom: 0;
}
/* line 10, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs dt {
color: #b3b3b3;
cursor: default;
display: block;
float: left;
font-size: 12px;
height: 40px;
line-height: 40px;
padding: 0 9px 0 20px;
width: auto;
text-transform: uppercase;
}
/* line 11, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs dt:first-child {
padding: 0 9px 0 0;
}
/* line 14, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs dd {
display: block;
float: left;
padding: 0;
margin: 0;
}
/* line 15, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs dd a {
color: #6f6f6f;
display: block;
font-size: 14px;
height: 40px;
line-height: 40px;
padding: 0px 23.8px;
}
/* line 16, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs dd.active {
border-top: 3px solid #2ba6cb;
margin-top: -3px;
}
/* line 17, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs dd.active a {
cursor: default;
color: #3c3c3c;
background: #fff;
border-left: 1px solid #e6e6e6;
border-right: 1px solid #e6e6e6;
font-weight: bold;
}
/* line 19, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs dd:first-child {
margin-left: 0;
}
/* line 22, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.vertical {
height: auto;
border-bottom: 1px solid #e6e6e6;
}
/* line 23, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.vertical dt, dl.tabs.vertical dd {
float: none;
height: auto;
}
/* line 25, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.vertical dd {
border-left: 3px solid #cccccc;
}
/* line 26, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.vertical dd a {
background: #f2f2f2;
border: none;
border: 1px solid #e6e6e6;
border-width: 1px 1px 0 0;
color: #555;
display: block;
font-size: 14px;
height: auto;
line-height: 1;
padding: 15px 20px;
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
/* line 28, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.vertical dd.active {
margin-top: 0;
border-top: 1px solid #4d4d4d;
border-left: 4px solid #1a1a1a;
}
/* line 29, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.vertical dd.active a {
background: #4d4d4d;
border: none;
color: #fff;
height: auto;
margin: 0;
position: static;
top: 0;
-webkit-box-shadow: 0 0 0;
-moz-box-shadow: 0 0 0;
box-shadow: 0 0 0;
}
/* line 31, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.vertical dd:first-child a.active {
margin: 0;
}
/* line 35, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.pill {
border-bottom: none;
margin-bottom: 10px;
}
/* line 36, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.pill dd {
margin-right: 10px;
}
/* line 37, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.pill dd:last-child {
margin-right: 0;
}
/* line 38, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.pill dd a {
-webkit-border-radius: 1000px;
-moz-border-radius: 1000px;
-ms-border-radius: 1000px;
-o-border-radius: 1000px;
border-radius: 1000px;
background: #e6e6e6;
height: 26px;
line-height: 26px;
color: #666;
}
/* line 40, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.pill dd.active {
border: none;
margin-top: 0;
}
/* line 41, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.pill dd.active a {
background-color: #2ba6cb;
border: none;
color: #fff;
}
/* line 44, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.pill.contained {
border-bottom: solid 1px #eee;
margin-bottom: 0;
}
/* line 48, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.two-up dt a, dl.tabs.two-up dd a, dl.tabs.three-up dt a, dl.tabs.three-up dd a, dl.tabs.four-up dt a, dl.tabs.four-up dd a, dl.tabs.five-up dt a, dl.tabs.five-up dd a {
padding: 0 17px;
text-align: center;
overflow: hidden;
}
/* line 50, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.two-up dt, dl.tabs.two-up dd {
width: 50%;
}
/* line 51, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.three-up dt, dl.tabs.three-up dd {
width: 33.33%;
}
/* line 52, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.four-up dt, dl.tabs.four-up dd {
width: 25%;
}
/* line 53, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.five-up dt, dl.tabs.five-up dd {
width: 20%;
}
/* line 56, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
ul.tabs-content {
display: block;
margin: 0 0 20px;
padding: 0;
}
/* line 57, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
ul.tabs-content > li {
display: none;
}
/* line 58, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
ul.tabs-content > li.active {
display: block;
}
/* line 60, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
ul.tabs-content.contained {
padding: 0;
}
/* line 61, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
ul.tabs-content.contained > li {
border: solid 0 #e6e6e6;
border-width: 0 1px 1px 1px;
padding: 20px;
}
/* line 62, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
ul.tabs-content.contained.vertical > li {
border-width: 1px 1px 1px 1px;
}
/* line 66, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
.no-js ul.tabs-content > li {
display: block;
}
@media only screen and (max-width: 767px) {
/* line 69, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.mobile, dl.nice.tabs.mobile {
width: auto;
margin: 20px -20px 40px;
height: auto;
}
/* line 70, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.mobile dt, dl.tabs.mobile dd, dl.nice.tabs.mobile dt, dl.nice.tabs.mobile dd {
float: none;
height: auto;
}
/* line 72, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.mobile dd a {
display: block;
width: auto;
height: auto;
padding: 18px 20px;
line-height: 1;
border: solid 0 #ccc;
border-width: 1px 0 0;
margin: 0;
color: #555;
background: #eee;
font-size: 15px;
font-size: 1.5rem;
}
/* line 73, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.mobile dd a.active {
height: auto;
margin: 0;
border-width: 1px 0 0;
}
/* line 76, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
.tabs.mobile {
border-bottom: solid 1px #ccc;
height: auto;
}
/* line 78, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
.tabs.mobile dd a {
padding: 18px 20px;
border: none;
border-left: none;
border-right: none;
border-top: 1px solid #ccc;
background: #fff;
}
/* line 79, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
.tabs.mobile dd a.active {
border: none;
background: #2ba6cb;
color: #fff;
margin: 0;
position: static;
top: 0;
height: auto;
}
/* line 80, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
.tabs.mobile dd:first-child a.active {
margin: 0;
}
/* line 83, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.contained.mobile, dl.nice.contained.mobile {
margin-bottom: 0;
}
/* line 84, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.contained.tabs.mobile dd a {
padding: 18px 20px;
}
/* line 86, /Users/RoozbehMeghdadi/.rvm/gems/ruby-1.9.3-p194/gems/zurb-foundation-3.0.6/stylesheets/foundation/tabs.scss */
dl.tabs.mobile + ul.contained {
margin-left: -20px;
margin-right: -20px;
border-width: 0 0 1px 0;
}
}
| roozbehmeghdadi/roozbehmeghdadi.com | stylesheets/foundation-style/tabs.css | CSS | mit | 10,648 |
<?php
namespace module;
use Exception;
use Zend\Config\Reader\Ini;
use Zend\Config\Config;
use ulfberht\core\module;
use module\application\service\store;
use module\application\service\request;
use module\application\service\response;
use module\application\service\router;
use module\application\service\doctrine;
/**
* The application module is the backbone of Ulfberht Applications and provides much of the
* automatical things we see like initializing configurations.
*/
class application extends module {
/**
* The constructor. Registers all services for the application module.
*/
public function __construct() {
$this->dependsOn('module\debugger');
$this->registerSingleton('module\application\controller\resourceBundle');
$this->registerSingleton('module\application\service\store');
$this->registerSingleton('module\application\service\doctrine');
$this->registerSingleton('module\application\service\request');
$this->registerSingleton('module\application\service\response');
$this->registerSingleton('module\application\service\router');
$this->registerSingleton('module\application\service\view');
$this->registerFactory('module\application\service\doctrine\config');
$this->registerFactory('module\application\service\minifier');
}
/**
* [Ulfberht Forging Hook] Initializes an ulfberht application.
* @param $store module\application\service\store
* @param $request module\application\service\request
* @param $router module\application\service\router
* @return void
*/
public function applicationInit(store $store, request $request, router $router, doctrine $doctrine) {
$this->applicationInitConfig($store, $request);
$this->applicationInitRoutes($store, $router);
$this->applicationInitDoctrine($store, $doctrine);
}
/**
* [Ulfberht Forging Hook] This method is responsible for loading in initial
* application configurations from application ini files located in
* /src/module/application/configs/application.ini.
* @param $store module\application\service\store
* @param $request module\application\service\request
* @return void
*/
public function applicationInitConfig(store $store, request $request) {
//get app config and loop though additional configs
$appConfigSrcPath = APPLICATION_ROOT . '/src/module/application/config/application.ini';
$appConfigIni = $this->_getConfigIniFromIniPath($appConfigSrcPath);
$appConfigName = $this->_getFileNameFromIniPath($appConfigSrcPath);
$store->set($appConfigName, $appConfigIni);
//look through application config configs array and setup those configs
$configs = ($appConfigIni->configs) ? $appConfigIni->configs : [];
foreach ($appConfigIni->application->configs as $storePath) {
$storeSrcPath = APPLICATION_ROOT . $storePath;
$configName = $this->_getFileNameFromIniPath($storeSrcPath);
$configIni = $this->_getConfigIniFromIniPath($storeSrcPath);
$existingConfig = $store->get($configName);
if ($existingConfig) {
$existingConfig->merge($configIni);
} else {
$store->set($configName, $configIni);
}
}
//setup env config
$host = $request->server->get('HTTP_HOST');
//if host comes back undefined assume localhost:8000 settings
if (!$host) {
$host = 'localhost:8000';
}
$environmentConfig = $store->get('environment');
$envVar = false;
foreach ($environmentConfig->environments as $environmentVar => $domain) {
if (strtolower($host) === strtolower($domain)) {
$envVar = $environmentVar;
break;
}
}
if (!$envVar) {
throw new Exception('Could not find proper environment config variable for host "' . $host . '"');
} else {
$envConfig = $store->get('environment')->{$envVar};
$store->set('ENV', $envConfig);
}
}
/**
* [Ulfberht Forging Hook] This method is responsible for loading in routes
* based on routes.ini
* @param $store module\application\service\store
* @param $request module\application\service\router
* @return void
*/
public function applicationInitRoutes(store $store, router $router) {
$env = $store->get('ENV');
$routesConfig = $store->get('routes');
foreach ($routesConfig->routes as $key => $route) {
$path = $route->path;
$verb = $route->verb;
$controller = $route->controller . ':' . $route->action;
$router->{$verb}($path, $controller);
}
//setting default controller if it is set in routes.ini
if ($routesConfig->default->controller && $routesConfig->default->action) {
$router->otherwise($routesConfig->default->controller . ':' . $routesConfig->default->action);
}
//set routes for resource bundles if in develop mode
if ($env->application->debug) {
$router->get('/debug/bundle/js/{resourceBundleId}', 'module\application\controller\resourceBundle:js');
$router->get('/debug/bundle/css/{resourceBundleId}', 'module\application\controller\resourceBundle:css');
}
}
/**
* This method is responsible for setting up the application entity manager
* based on application.ini and environment.ini configs.
* @param $store module\application\service\store
* @return void
*/
public function applicationInitDoctrine(store $store, doctrine $doctrine) {
$envConfig = $store->get('ENV');
$applicationConfig = $store->get('application');
//get new doctrine config object.
$doctrineConfig = $this->get('module\application\service\doctrine\config');
$doctrineConfig->develop = $envConfig->application->debug;
$doctrineConfig->enableCache = $envConfig->doctrine->cache;
$doctrineConfig->type = $applicationConfig->doctrine->type;
$doctrineConfig->database->driver = $envConfig->database->driver;
$doctrineConfig->database->host = $envConfig->database->host;
$doctrineConfig->database->name = $envConfig->database->name;
$doctrineConfig->database->user = $envConfig->database->user;
$doctrineConfig->database->password = $envConfig->database->password;
//setting doctrine paths
$doctrinePaths = [];
foreach ($applicationConfig->doctrine->paths as $path) {
$doctrinePaths[] = APPLICATION_ROOT . $path;
}
$doctrineConfig->paths = $doctrinePaths;
//set doctrine application config
$doctrine->addEntityManager('application', $doctrineConfig);
}
/**
* [Ulfberht Forging Hook] This method is setup to run as a hook when forging
* an ulfberht application. The purpose of this hook is to resolve a path to
* a controller and run that controller's action.
* @param $router module\application\service\router
* @param $request module\application\service\request
* @param $response module\application\service\response
* @return void
*/
public function applicationMvc(router $router, request $request, response $response) {
$params = $router->resolve();
$request->attributes->add($params);
$controllerActionSetting = explode(':', $params['controller']);
$controllerClass = $controllerActionSetting[0];
$controllerAction = (isset($controllerActionSetting[1])) ? $controllerActionSetting[1] : false;
if (!$controllerClass) {
throw new Exception('Could not find a controller to resolve.');
}
if (!$controllerAction) {
throw new Exception('A controller action was not defined.');
}
if (!ulfberht()->exists($controllerClass)) {
throw new Exception('Could not find controller "' . $controllerClass . '"');
}
$controller = ulfberht()->get($controllerClass);
if ($controllerAction) {
if (!method_exists($controller, $controllerAction)) {
throw new Exception('Cound not find action method "' . $controllerAction . '" on controller "' . $controllerClass . '"');
}
call_user_func([$controller, $controllerAction]);
}
$response->prepare($request);
$response->send();
}
/**
* This method is responsible for returning a configIni object wrapping
* which ever ini file is passed in.
* @param $fileSrcPath string The path to the ini file.
* @return Zend\Config\Config
*/
private function _getConfigIniFromIniPath($fileSrcPath) {
$reader = new Ini();
$config = $reader->fromFile($fileSrcPath);
return new Config($config);
}
/**
* Returns the filename of the files source path you pass into it.
* @param $fileSrcPath string The path to the ini file.
* @return string The filename parsed out of the path.
*/
private function _getFileNameFromIniPath($fileSrcPath) {
$pathParts = preg_split('/\//', $fileSrcPath);
$fileName = $pathParts[count($pathParts) - 1];
$fileNameParts = preg_split('/\./', $fileName);
return $fileNameParts[0];
}
}
| ua1-labs/ulfberht-application | src/module/application.php | PHP | mit | 9,505 |
/**
* @summary Returns deep equality between objects
* {@link https://gist.github.com/egardner/efd34f270cc33db67c0246e837689cb9}
* @param obj1
* @param obj2
* @return {boolean}
* @private
*/
export function deepEqual(obj1, obj2) {
if (obj1 === obj2) {
return true;
}
else if (isObject(obj1) && isObject(obj2)) {
if (Object.keys(obj1).length !== Object.keys(obj2).length) {
return false;
}
for (const prop of Object.keys(obj1)) {
if (!deepEqual(obj1[prop], obj2[prop])) {
return false;
}
}
return true;
}
else {
return false;
}
}
function isObject(obj) {
return typeof obj === 'object' && obj != null;
}
| mistic100/Photo-Sphere-Viewer | src/plugins/resolution/utils.js | JavaScript | mit | 679 |
""" Contains functions to fetch info from different simple online APIs."""
import util.web
def urbandictionary_search(search):
"""
Searches urbandictionary's API for a given search term.
:param search: The search term str to search for.
:return: defenition str or None on no match or error.
"""
if str(search).strip():
urban_api_url = 'http://api.urbandictionary.com/v0/define?term=%s' % search
response = util.web.http_get(url=urban_api_url, json=True)
if response['json'] is not None:
try:
definition = response['json']['list'][0]['definition']
return definition.encode('ascii', 'ignore')
except (KeyError, IndexError):
return None
else:
return None
def weather_search(city):
"""
Searches worldweatheronline's API for weather data for a given city.
You must have a working API key to be able to use this function.
:param city: The city str to search for.
:return: weather data str or None on no match or error.
"""
if str(city).strip():
api_key = ''
if not api_key:
return 'Missing api key.'
else:
weather_api_url = 'http://api.worldweatheronline.com/premium/v1/weather.ashx?key=%s&q=%s&format=json' % \
(api_key, city)
response = util.web.http_get(url=weather_api_url, json=True)
if response['json'] is not None:
try:
pressure = response['json']['data']['current_condition'][0]['pressure']
temp_c = response['json']['data']['current_condition'][0]['temp_C']
temp_f = response['json']['data']['current_condition'][0]['temp_F']
query = response['json']['data']['request'][0]['query'].encode('ascii', 'ignore')
result = '%s. Temperature: %sC (%sF) Pressure: %s millibars' % (query, temp_c, temp_f, pressure)
return result
except (IndexError, KeyError):
return None
else:
return None
def whois(ip):
"""
Searches ip-api for information about a given IP.
:param ip: The ip str to search for.
:return: information str or None on error.
"""
if str(ip).strip():
url = 'http://ip-api.com/json/%s' % ip
response = util.web.http_get(url=url, json=True)
if response['json'] is not None:
try:
city = response['json']['city']
country = response['json']['country']
isp = response['json']['isp']
org = response['json']['org']
region = response['json']['regionName']
zipcode = response['json']['zip']
info = country + ', ' + city + ', ' + region + ', Zipcode: ' + zipcode + ' Isp: ' + isp + '/' + org
return info
except KeyError:
return None
else:
return None
def chuck_norris():
"""
Finds a random Chuck Norris joke/quote.
:return: joke str or None on failure.
"""
url = 'http://api.icndb.com/jokes/random/?escape=javascript'
response = util.web.http_get(url=url, json=True)
if response['json'] is not None:
if response['json']['type'] == 'success':
joke = response['json']['value']['joke']
return joke
return None
| nortxort/tinybot-rtc | apis/other.py | Python | mit | 3,454 |
def main() -> None:
N = int(input())
A = [int(x) for x in input().split()]
rev_A = A[:]
left = [-1] * N
left_cnt = [0] * N
A_left = [A[0]]
for i in range(1, N):
if rev_A[i-1] < rev_A[i]:
cnt = 0
while rev_A[i-1]
pass
elif rev_A[i-1] < rev_A[i] * 4:
now = i-1
while left[now] != -1:
now = left[now]
left[i] = now
A_left.append(A[i])
left[i] = i-1
else:
pass
ans = 10 ** 9
for i in range(N + 1):
A = AA[:]
cnt = 0
if i > 0:
A[i-1] *= -2
cnt += 1
for j in reversed(range(i-1)):
A[j] *= -2
cnt += 1
while A[j] > A[j+1]:
A[j] *= 4
cnt += 2
for j in range(i+1, N):
while A[j-1] > A[j]:
A[j] *= 4
cnt += 2
print(i, cnt, A)
ans = min(ans, cnt)
print(ans)
if __name__ == '__main__':
main()
| knuu/competitive-programming | atcoder/corp/caddi2018_e.py | Python | mit | 1,094 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from itertools import izip
from tacit import tac
ordered_list_path = 'data/ordered.list'
expected_lines = open(ordered_list_path).read().splitlines(True)
expected_lines.reverse()
expected_count = len(expected_lines)
for bsize in range(10):
count = 0
for expected_line, line in izip(
expected_lines,
tac(ordered_list_path, bsize)
):
if line != expected_line:
print >> sys.stderr, 'error: bsize=%d, expected_line=%r, line=%r' % (bsize, expected_line, line)
count += 1
if bsize > 0:
if count != expected_count:
print >> sys.stderr, 'error: bsize=%d, expected_count=%r, count=%r' % (bsize, expected_count, count)
else:
if count != 0:
print >> sys.stderr, 'error: bsize=%d, expected_count=0, count=%r' % (bsize, count)
| moskytw/tacit | tests/test_correctness.py | Python | mit | 884 |
---
title: STODDAN
is_name: true
---
STODDAN
| stokeclimsland/stokeclimsland | _cards/STODDAN.md | Markdown | mit | 50 |
#ifndef NWJS_CONTENT_HOOKS_H
#define NWJS_CONTENT_HOOKS_H
#include "nw_package.h"
#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
namespace base {
class DictionaryValue;
}
namespace blink {
class WebFrame;
class WebLocalFrame;
class WebURLRequest;
class WebString;
}
namespace content {
class RenderProcessHost;
class NotificationDetails;
class RenderView;
class WebContents;
}
namespace extensions {
class Extension;
class ScriptContext;
class Dispatcher;
class AppWindow;
}
namespace nw {
int MainPartsPreCreateThreadsHook();
void MainPartsPostDestroyThreadsHook();
void ContextCreationHook(blink::WebLocalFrame* frame, extensions::ScriptContext* context);
void LoadNWAppAsExtensionHook(base::DictionaryValue* manifest, std::string* error);
void DocumentElementHook(blink::WebFrame* frame,
const extensions::Extension* extension,
const GURL& effective_document_url);
void DocumentFinishHook(blink::WebFrame* frame,
const extensions::Extension* extension,
const GURL& effective_document_url);
void RendererProcessTerminatedHook(content::RenderProcessHost* process,
const content::NotificationDetails& details);
void OnRenderProcessShutdownHook(extensions::ScriptContext* context);
void willHandleNavigationPolicy(content::RenderView* rv,
blink::WebFrame* frame,
const blink::WebURLRequest& request,
blink::WebNavigationPolicy* policy,
blink::WebString* manifest,
bool new_win);
void ExtensionDispatcherCreated(extensions::Dispatcher* dispatcher);
void CalcNewWinParams(content::WebContents* new_contents, void* params,
std::string* nw_inject_js_doc_start,
std::string* nw_inject_js_doc_end);
}
#endif
| dougmolineux/nw.js | src/nw_content.h | C | mit | 2,003 |
//===--------------------------------------------------------------------------------*- C++ -*-===//
// _ _
// | | | |
// __ _| |_ ___| | __ _ _ __ __ _
// / _` | __/ __| |/ _` | '_ \ / _` |
// | (_| | || (__| | (_| | | | | (_| |
// \__, |\__\___|_|\__,_|_| |_|\__, | - GridTools Clang DSL
// __/ | __/ |
// |___/ |___/
//
//
// This file is distributed under the MIT License (MIT).
// See LICENSE.txt for details.
//
//===------------------------------------------------------------------------------------------===//
#pragma once
#include "gtclang_dsl_defs/stencil_function.hpp"
namespace gtclang {
namespace dsl {
/*
* @brief Boundary condition specification
* @ingroup gtclang_dsl
*/
class boundary_condition {
public:
template <typename... T>
boundary_condition(const stencil_function&, T&&...);
};
} // namespace dsl
} // namespace gtclang
| MeteoSwiss-APN/dawn | gtclang/src/gtclang_dsl_defs/boundary_condition.hpp | C++ | mit | 1,070 |
// vim:ts=4:sw=4:expandtab
#pragma once
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <err.h>
#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>
#include <xcb/xcb_aux.h>
#include <xcb/randr.h>
#include <xcb/dpms.h>
#include <pango/pangocairo.h>
#include <cairo/cairo-xcb.h>
#include <ev.h>
| Airblader/kiosklock | include/externals.h | C | mit | 333 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>My Project: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">My Project
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>amqp</b></li><li class="navelem"><a class="el" href="classamqp_1_1amqp__queue.html">amqp_queue</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">amqp::amqp_queue Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classamqp_1_1amqp__queue.html">amqp::amqp_queue</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html#a32ff81b5b7f33a9e9ea380a031c0c303">add_message</a>(message msg)</td><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html">amqp::amqp_queue</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html#a2b795b034403141805872fe116a21dda">amqp_queue</a>(unsigned int client_id)</td><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html">amqp::amqp_queue</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html#ac288d83c9123bfc65eabc64420e925eb">get_message</a>()</td><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html">amqp::amqp_queue</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html#afaf730ace1a8d8b4b8ac48da536dafc2">get_queue_active_status</a>()</td><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html">amqp::amqp_queue</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html#a7a2ddbd8a77182800409045ccab3ec31">getClientId</a>()</td><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html">amqp::amqp_queue</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html#a1f18a3cf709dc103e317651db1719288">set_active_status</a>(bool i_status)</td><td class="entry"><a class="el" href="classamqp_1_1amqp__queue.html">amqp::amqp_queue</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
| cliffton/cliffton.github.io | cpp/classamqp_1_1amqp__queue-members.html | HTML | mit | 5,794 |
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
const version = "0.5-beta"
const minNumWords = 10
const minNumHashtag = 2
const minNumUserInteractions = 2
const iterationsCount = 3
func main() {
eye := `
___________
.-=d88888888888b=-.
.:d8888pr |\|/-\| rq8888b.
,:d8888P^//\-\/_\ /_\/^q888/b.
,;d88888/~-/ .-~ _~-. |/-q88888b,
//8888887-\ _/ (#) \\-\/Y88888b\
\8888888|// T Y _/|888888 o
\q88888|- \l !\_/|88888p/
q8888l\-//\ / /\|!8888P
q888\/-| -,___.-^\/-\/888P
=88\./-/|/ |-/!\/-!/88=
^^ ------------- ^
_____ _____ ____ _____
/\ | __ \ / ____|/ __ \ / ____|
/ \ | |__) | | __| | | | (___
/ /\ \ | _ /| | |_ | | | |\___ \
/ ____ \| | \ \| |__| | |__| |____) |
/_/ \_\_| \_\\_____|\____/|_____/
Open source twitter entropic toolkit
`
c.Cyan(eye)
c.DarkGray("--Be half bot and half human, a new generation of cyborgs--")
fmt.Println("---------------")
fmt.Print("source code: ")
c.Purple("https://github.com/arnaucode/argos")
fmt.Print("project page: ")
c.Purple("http://arnaucode/argos")
fmt.Print("version ")
c.Purple(version)
fmt.Println("---------------")
client := readConfigTokensAndConnect()
fmt.Println("Getting user data...")
user := getUserData(client)
printUserData(user)
if user.ScreenName == "" {
c.Red("Can not connect to Twitter API, maybe the file twitterConfig.json is wrong")
os.Exit(3)
}
fmt.Println("")
newcommand := bufio.NewReader(os.Stdin)
fmt.Print("Please select command number")
options := `
1 - Analyze username
2 - Unfollow all
3 - Follow random
4 - Delete Tweets
5 - Delete Favs (Likes)
6 - Tweet Random
7 - Analyze tweet
8 - Analyze User Followers
0 - Exit script
option to select: `
for {
fmt.Print(options)
option, _ := newcommand.ReadString('\n')
option = strings.TrimSpace(option)
switch option {
case "1":
fmt.Println("selected 1 - Analyze username")
username := askForUsername()
optionAnalyzeUserTweets(client, username)
fmt.Println("")
c.Purple("Note: the current hours displaying, are the Twitter servers hours (Coordinated Universal Time (UTC) +0000 UTC)")
break
case "2":
fmt.Println("selected 2 - Unfollow all")
optionUnfollowAll(client)
break
case "3":
fmt.Println("selected 3 - Follow random")
optionFollowRandom(client)
break
case "4":
fmt.Println("selected 4 - Delete Tweets")
optionDeleteTweets(client)
break
case "5":
fmt.Println("selected 5 - Delete Favs (Likes)")
optionDeleteFavs(client)
break
case "6":
fmt.Println("selected 6 - Tweet random")
optionTweetRandom(client)
break
case "7":
fmt.Println("selected 7 - Analyze Tweet")
optionAnalyzeTweet(client)
break
case "8":
fmt.Println("selected 8 - Analyze User Followers")
username := askForUsername()
optionAnalyzeUserFollowers(client, username)
break
case "0":
fmt.Println("selected 0 - exit script")
os.Exit(3)
break
default:
fmt.Println("Invalid option")
break
}
}
}
| arnaucode/argos | main.go | GO | mit | 3,129 |
<div class="commune_descr limited">
<p>
Larzicourt est
un village
géographiquement positionné dans le département de Marne en Champagne-Ardenne. Elle comptait 301 habitants en 2008.</p>
<p>À proximité de Larzicourt sont positionnées géographiquement les communes de
<a href="{{VLROOT}}/immobilier/arrigny_51016/">Arrigny</a> à 1 km, 265 habitants,
<a href="{{VLROOT}}/immobilier/ecriennes_51224/">Écriennes</a> localisée à 6 km, 144 habitants,
<a href="{{VLROOT}}/immobilier/moncetz-labbaye_51373/">Moncetz-l'Abbaye</a> localisée à 4 km, 108 habitants,
<a href="{{VLROOT}}/immobilier/matignicourt-goncourt_51356/">Matignicourt-Goncourt</a> à 5 km, 115 habitants,
<a href="{{VLROOT}}/immobilier/orconte_51417/">Orconte</a> à 4 km, 420 habitants,
<a href="{{VLROOT}}/immobilier/cloyes-sur-marne_51156/">Cloyes-sur-Marne</a> située à 6 km, 112 habitants,
entre autres. De plus, Larzicourt est située à seulement 17 km de <a href="{{VLROOT}}/immobilier/saint-dizier_52448/">Saint-Dizier</a>.</p>
<p>Si vous pensez venir habiter à Larzicourt, vous pourrez facilement trouver une maison à acheter. </p>
<p>La ville propose quelques équipements, elle propose entre autres un terrain de tennis.</p>
<p>Le nombre d'habitations, à Larzicourt, était réparti en 2011 en six appartements et 153 maisons soit
un marché relativement équilibré.</p>
</div>
| donaldinou/frontend | src/Viteloge/CoreBundle/Resources/descriptions/51316.html | HTML | mit | 1,422 |
EXPECTED = {'CAM-PDU-Descriptions': {'extensibility-implied': False,
'imports': {'ITS-Container': ['AccelerationControl',
'CauseCode',
'CenDsrcTollingZone',
'ClosedLanes',
'Curvature',
'CurvatureCalculationMode',
'DangerousGoodsBasic',
'DriveDirection',
'EmbarkationStatus',
'EmergencyPriority',
'ExteriorLights',
'Heading',
'ItsPduHeader',
'LanePosition',
'LateralAcceleration',
'Latitude',
'LightBarSirenInUse',
'Longitude',
'LongitudinalAcceleration',
'PathHistory',
'PerformanceClass',
'ProtectedCommunicationZone',
'ProtectedCommunicationZonesRSU',
'PtActivation',
'ReferencePosition',
'RoadworksSubCauseCode',
'SpecialTransportType',
'Speed',
'SpeedLimit',
'StationType',
'SteeringWheelAngle',
'TrafficRule',
'VehicleLength',
'VehicleRole',
'VehicleWidth',
'VerticalAcceleration',
'YawRate']},
'object-classes': {},
'object-sets': {},
'tags': 'AUTOMATIC',
'types': {'BasicContainer': {'members': [{'name': 'stationType',
'type': 'StationType'},
{'name': 'referencePosition',
'type': 'ReferencePosition'},
None],
'type': 'SEQUENCE'},
'BasicVehicleContainerHighFrequency': {'members': [{'name': 'heading',
'type': 'Heading'},
{'name': 'speed',
'type': 'Speed'},
{'name': 'driveDirection',
'type': 'DriveDirection'},
{'name': 'vehicleLength',
'type': 'VehicleLength'},
{'name': 'vehicleWidth',
'type': 'VehicleWidth'},
{'name': 'longitudinalAcceleration',
'type': 'LongitudinalAcceleration'},
{'name': 'curvature',
'type': 'Curvature'},
{'name': 'curvatureCalculationMode',
'type': 'CurvatureCalculationMode'},
{'name': 'yawRate',
'type': 'YawRate'},
{'name': 'accelerationControl',
'optional': True,
'type': 'AccelerationControl'},
{'name': 'lanePosition',
'optional': True,
'type': 'LanePosition'},
{'name': 'steeringWheelAngle',
'optional': True,
'type': 'SteeringWheelAngle'},
{'name': 'lateralAcceleration',
'optional': True,
'type': 'LateralAcceleration'},
{'name': 'verticalAcceleration',
'optional': True,
'type': 'VerticalAcceleration'},
{'name': 'performanceClass',
'optional': True,
'type': 'PerformanceClass'},
{'name': 'cenDsrcTollingZone',
'optional': True,
'type': 'CenDsrcTollingZone'}],
'type': 'SEQUENCE'},
'BasicVehicleContainerLowFrequency': {'members': [{'name': 'vehicleRole',
'type': 'VehicleRole'},
{'name': 'exteriorLights',
'type': 'ExteriorLights'},
{'name': 'pathHistory',
'type': 'PathHistory'}],
'type': 'SEQUENCE'},
'CAM': {'members': [{'name': 'header',
'type': 'ItsPduHeader'},
{'name': 'cam',
'type': 'CoopAwareness'}],
'type': 'SEQUENCE'},
'CamParameters': {'members': [{'name': 'basicContainer',
'type': 'BasicContainer'},
{'name': 'highFrequencyContainer',
'type': 'HighFrequencyContainer'},
{'name': 'lowFrequencyContainer',
'optional': True,
'type': 'LowFrequencyContainer'},
{'name': 'specialVehicleContainer',
'optional': True,
'type': 'SpecialVehicleContainer'},
None],
'type': 'SEQUENCE'},
'CoopAwareness': {'members': [{'name': 'generationDeltaTime',
'type': 'GenerationDeltaTime'},
{'name': 'camParameters',
'type': 'CamParameters'}],
'type': 'SEQUENCE'},
'DangerousGoodsContainer': {'members': [{'name': 'dangerousGoodsBasic',
'type': 'DangerousGoodsBasic'}],
'type': 'SEQUENCE'},
'EmergencyContainer': {'members': [{'name': 'lightBarSirenInUse',
'type': 'LightBarSirenInUse'},
{'name': 'incidentIndication',
'optional': True,
'type': 'CauseCode'},
{'name': 'emergencyPriority',
'optional': True,
'type': 'EmergencyPriority'}],
'type': 'SEQUENCE'},
'GenerationDeltaTime': {'named-numbers': {'oneMilliSec': 1},
'restricted-to': [(0,
65535)],
'type': 'INTEGER'},
'HighFrequencyContainer': {'members': [{'name': 'basicVehicleContainerHighFrequency',
'type': 'BasicVehicleContainerHighFrequency'},
{'name': 'rsuContainerHighFrequency',
'type': 'RSUContainerHighFrequency'},
None],
'type': 'CHOICE'},
'LowFrequencyContainer': {'members': [{'name': 'basicVehicleContainerLowFrequency',
'type': 'BasicVehicleContainerLowFrequency'},
None],
'type': 'CHOICE'},
'PublicTransportContainer': {'members': [{'name': 'embarkationStatus',
'type': 'EmbarkationStatus'},
{'name': 'ptActivation',
'optional': True,
'type': 'PtActivation'}],
'type': 'SEQUENCE'},
'RSUContainerHighFrequency': {'members': [{'name': 'protectedCommunicationZonesRSU',
'optional': True,
'type': 'ProtectedCommunicationZonesRSU'},
None],
'type': 'SEQUENCE'},
'RescueContainer': {'members': [{'name': 'lightBarSirenInUse',
'type': 'LightBarSirenInUse'}],
'type': 'SEQUENCE'},
'RoadWorksContainerBasic': {'members': [{'name': 'roadworksSubCauseCode',
'optional': True,
'type': 'RoadworksSubCauseCode'},
{'name': 'lightBarSirenInUse',
'type': 'LightBarSirenInUse'},
{'name': 'closedLanes',
'optional': True,
'type': 'ClosedLanes'}],
'type': 'SEQUENCE'},
'SafetyCarContainer': {'members': [{'name': 'lightBarSirenInUse',
'type': 'LightBarSirenInUse'},
{'name': 'incidentIndication',
'optional': True,
'type': 'CauseCode'},
{'name': 'trafficRule',
'optional': True,
'type': 'TrafficRule'},
{'name': 'speedLimit',
'optional': True,
'type': 'SpeedLimit'}],
'type': 'SEQUENCE'},
'SpecialTransportContainer': {'members': [{'name': 'specialTransportType',
'type': 'SpecialTransportType'},
{'name': 'lightBarSirenInUse',
'type': 'LightBarSirenInUse'}],
'type': 'SEQUENCE'},
'SpecialVehicleContainer': {'members': [{'name': 'publicTransportContainer',
'type': 'PublicTransportContainer'},
{'name': 'specialTransportContainer',
'type': 'SpecialTransportContainer'},
{'name': 'dangerousGoodsContainer',
'type': 'DangerousGoodsContainer'},
{'name': 'roadWorksContainerBasic',
'type': 'RoadWorksContainerBasic'},
{'name': 'rescueContainer',
'type': 'RescueContainer'},
{'name': 'emergencyContainer',
'type': 'EmergencyContainer'},
{'name': 'safetyCarContainer',
'type': 'SafetyCarContainer'},
None],
'type': 'CHOICE'}},
'values': {}}} | eerimoq/asn1tools | tests/files/etsi/cam_pdu_descriptions_1_3_2.py | Python | mit | 19,027 |
define(['jquery','xing'],function($,xing) {
var $body = $('body'),
$progress = $($body.data('progressDisplay')),
$status = $($body.data('statusMessage')),
curPath = window.location.pathname,
baseDir = curPath.substring(0, curPath.lastIndexOf('/')),
sitePath = '//'+window.location.host+baseDir,
stackCount = 0,
stackCall = function() {
if( $progress.length > 0 ) {
$progress.show();
stackCount++;
}
},
unstackCall = function() {
if( --stackCount < 1 ) {
stackCount = 0;
$progress.hide();
}
},
getErrorHandler = function( callback, doUnstack ) {
return function( xhr ) {
if( doUnstack ) {
unstackCall();
}
callback($.parseJSON(xhr.response));
};
}
;
xing.http = {
BasePath : baseDir,
SitePath : sitePath,
redirect : function( path ) {
stackCall(); // show our processing loader when changing pages
window.location.href = path.replace('~',this.BasePath);
},
get : function( path, data, callback, stopLoadingIcon ) {
xing.http.ajax('GET',path,data,callback,stopLoadingIcon);
},
post : function( path, data, callback, stopLoadingIcon ) {
xing.http.ajax('POST',path,data,callback,stopLoadingIcon);
},
put : function( path, data, callback, stopLoadingIcon ) {
xing.http.ajax('PUT',path,data,callback,stopLoadingIcon);
},
ajax : function( type, path, data, callback, stopLoadingIcon ) {
stopLoadingIcon = stopLoadingIcon || false;
$.ajax( {
type : type,
url : path.replace('~',this.BasePath),
data : data,
success : stopLoadingIcon ? callback : function(response) { unstackCall(); callback(response); },
error : getErrorHandler(callback, !stopLoadingIcon)
} );
if( !stopLoadingIcon ) {
stackCall();
}
},
stackCall : stackCall,
unstackCall : unstackCall,
forceEndStack : function() {
stackCount = 0;
unstackCall();
},
message : function( msg, isError, timeoutSecs, callback ) {
if( $status.length ) {
$status.find('.content').html(msg);
$status.toggleClass('error',!!isError).show('fast'); // force isError to boolean with !!
setTimeout( function() {
$status.hide('fast');
if( callback ) { callback(); }
}, typeof timeoutSecs == 'undefined' ? 1400 : (timeoutSecs * 1000));
}
}
};
return xing.http;
}); | lanwise/dojo-twtapi | scripts/xing/http.src.js | JavaScript | mit | 3,118 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Man extends MX_Controller {
public function __construct() {
// parent::__construct();
$this->load->module('init_sys/Init_sys');
$this->load->model('man/Man_models');
}
public function man_page()
{
$data['txt_search_name'] = $this->input->post('txt_search_name');
$data['man_list'] = $this->get_man($data['txt_search_name']);
$data['content']='man/man';
$this->init_sys->content($data);
}
public function man_add(){
$data['alert'] = $this->session->flashdata('alert');
$data['content']='man/add-man';
$this->init_sys->content($data);
}
public function man_edit(){
$data['alert'] = $this->session->flashdata('alert');
$data['content']='man/edit-man';
$eq_id = $this->uri->segment(3);
$data['man_details'] = $this->Man_models->get_man_details($eq_id);
$this->init_sys->content($data);
}
public function add_man(){
$data['man_list'] = $this->get_man();
$this->load->model('Man_models');
$timestam = date('Y-m-d H:i:s');
$this->Man_models->add_man();
$this->session->set_flashdata('alert', 1);
redirect('man/man_page');
}
public function get_man($qstr ='')
{
$result = $this->Man_models->get_man($qstr);
return $result;
}
public function delete_man(){
$this->load->model('Man_models');
$id = $this->uri->segment(3);
$this->Man_models->delete_man($id);
$this->session->set_flashdata('alert', 2);
redirect('man/man_page');
}
public function update_man_details(){
$this->load->model('Man_models');
$timestam = date('Y-m-d H:i:s');
$eq_id = $this->uri->segment(3);
$this->Man_models->update_man_details($eq_id);
$this->session->set_flashdata('alert', 1);
redirect('man/man_page');
}
}//end class
| khanitss/betagro_compare | application/modules/man/controllers/Man.php | PHP | mit | 1,776 |
\documentclass{article}
\usepackage{biblatex}
\addbibresource{test-cites.bib}
\begin{document}
\begin{enumerate}
\item \autocite[10]{Hemingway1940}
\item \autocites{Hemingway1940}{JiM2020}
\item \autocites[10]{JiM2020}[20]{Hemingway1940}
\item \autocites[10]{Hemingway1940}{JiM2020}
\item \autocites{Hemingway1940}[20]{JiM2020}
\end{enumerate}
arXiv tests: \textcite{0801.1144} and \textcite{wilcox.e:2021}
\end{document}
| lervag/vimtex | test/test-context-cite/test-cites.tex | TeX | mit | 435 |
---
layout: post
title: Rough Sex and rim job
titleinfo: pornvd
desc: Watch Rough Sex and rim job. Pornhub is the ultimate xxx porn and sex site.
---
<iframe src="http://www.pornhub.com/embed/390953323" frameborder="0" width="630" height="338" scrolling="no"></iframe>
<h2>Rough Sex and rim job</h2>
<h3>Watch Rough Sex and rim job. Pornhub is the ultimate xxx porn and sex site.</h3>
| pornvd/pornvd.github.io | _posts/2016-01-15-Rough-Sex-and-rim-job.md | Markdown | mit | 402 |
namespace AnimalHierarchy
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public abstract class Animal : ISound
{
//fields
private string name;
private int age;
private string sex;
//constructors
protected Animal(string name, int age, string sex)
{
this.Name = name;
this.Age = age;
this.Sex = sex;
}
//properties
protected string Name
{
get
{
return this.name;
}
private set
{
if (String.IsNullOrEmpty(value))
{
throw new ArgumentException("Name cannot be null or empty.");
}
this.name = value;
}
}
protected int Age
{
get
{
return this.age;
}
private set
{
if (value < 0)
{
throw new ArgumentException("Age cannot be a negative number.");
}
this.age = value;
}
}
protected string Sex
{
get
{
return this.sex;
}
private set
{
if (value != "male" && value != "female")
{
throw new ArgumentException("Gender can be either male or female.");
}
this.sex = value;
}
}
//methods
public static double AverageAge(IEnumerable<Animal> animals)
{
double average = animals.Average(x => x.Age);
return average;
}
public static void PrintAnimals(IEnumerable<Animal> animals)
{
foreach (var animal in animals)
{
Console.WriteLine(animal);
Console.WriteLine();
}
}
public override string ToString()
{
var animal = new StringBuilder();
animal.AppendFormat("Animal: {0}", this.GetType().Name);
animal.AppendLine();
animal.AppendFormat("Name: {0}", this.Name);
animal.AppendLine();
animal.AppendFormat("Gender: {0}", this.Sex);
animal.AppendLine();
animal.AppendFormat("Age: {0}", this.age);
return animal.ToString();
}
public virtual void MakeSound()
{
Console.WriteLine(this.Name + "made a sound.");
}
}
}
| Vyara/Telerik-OOP-Homeworks | 04. OOP Principles - Part 1/AnimalHierarchy/Animal.cs | C# | mit | 2,690 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.