hexsha
stringlengths 40
40
| size
int64 5
1.05M
| ext
stringclasses 98
values | lang
stringclasses 21
values | max_stars_repo_path
stringlengths 3
945
| max_stars_repo_name
stringlengths 4
118
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
sequencelengths 1
10
| max_stars_count
int64 1
368k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 3
945
| max_issues_repo_name
stringlengths 4
118
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
sequencelengths 1
10
| max_issues_count
int64 1
134k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
945
| max_forks_repo_name
stringlengths 4
135
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
sequencelengths 1
10
| max_forks_count
int64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 5
1.05M
| avg_line_length
float64 1
1.03M
| max_line_length
int64 2
1.03M
| alphanum_fraction
float64 0
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a46bee9663c83784b6794d84cf9c28ad5bda8c23 | 1,757 | php | PHP | models/Countries.php | hokode/OSA-Scorecarts-Admin-V2 | 7a092654c1503ee2dc0d6a0244a22adf56c2d0b1 | [
"BSD-3-Clause"
] | null | null | null | models/Countries.php | hokode/OSA-Scorecarts-Admin-V2 | 7a092654c1503ee2dc0d6a0244a22adf56c2d0b1 | [
"BSD-3-Clause"
] | null | null | null | models/Countries.php | hokode/OSA-Scorecarts-Admin-V2 | 7a092654c1503ee2dc0d6a0244a22adf56c2d0b1 | [
"BSD-3-Clause"
] | null | null | null | <?php
namespace app\models;
use Yii;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "countries".
*
* @property string|null $_id
* @property string|null $active
* @property string|null $countryId
* @property string|null $countryName
* @property string|null $countryShortName
* @property string|null $isDeleted
* @property string|null $latitude
* @property string|null $longitude
* @property int $id
*/
class Countries extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'countries';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['_id'], 'string', 'max' => 24],
[['active'], 'string', 'max' => 6],
[['countryId', 'isDeleted', 'longitude'], 'string', 'max' => 9],
[['countryName'], 'string', 'max' => 12],
[['countryShortName'], 'string', 'max' => 16],
[['latitude'], 'string', 'max' => 8],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'_id' => 'Id',
'active' => 'Active',
'countryId' => 'Country ID',
'countryName' => 'Country Name',
'countryShortName' => 'Country Short Name',
'isDeleted' => 'Is Deleted',
'latitude' => 'Latitude',
'longitude' => 'Longitude',
'id' => 'ID',
];
}
/**get and return all listed countries in an array**/
public function loadCountries()
{
$countries = Countries::find()->all();
$listData = ArrayHelper::map($countries,'id','countryName');
return $listData;
}
}
| 24.068493 | 76 | 0.520774 |
547082059d0b0d03d258cc2773026c3f2a371c41 | 2,487 | css | CSS | apps/samples/main.css | vmturbo/flex-blazeds | 38a3280ca09213cb17331db8131789cba0d869d9 | [
"Apache-2.0"
] | null | null | null | apps/samples/main.css | vmturbo/flex-blazeds | 38a3280ca09213cb17331db8131789cba0d869d9 | [
"Apache-2.0"
] | null | null | null | apps/samples/main.css | vmturbo/flex-blazeds | 38a3280ca09213cb17331db8131789cba0d869d9 | [
"Apache-2.0"
] | null | null | null | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
margin-top: 30px;
margin-top: 30px;
margin-left: 8%;
margin-right: 8%;
font-size: 0.8em;
color: #333333;
background-color:#FFFFFF;
}
h1, h2, h3 {
font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
font-weight: bold;
}
h1 {
font-weight: bold;
margin-top: 4px;
margin-bottom: 12px;
font-size: 2em;
}
h2 {
padding-top: 12px;
margin-bottom: 0px;
font-size: 1.6em;
color: #333333;
}
h3 {
margin-top: 0px;
font-size: 1.3em;
color: #004477;
}
h4 {
margin-top: 20px;
margin-bottom: 8px;
font-size: 12px;
color: #333333;
}
.item {
border-bottom: 1px solid #CCCCCC;
padding-top: 12px;
padding-bottom: 0px;
}
.highlight {
border: 1px solid #CCCCCC;
padding-top:10px;
padding-left:10px;
padding-right:10px;
padding-bottom:0px;
border-color: #2080B3;
margin-top:20px;
margin-bottom:20px;
}
.footer {
color: #666666;
margin-top: 20px;
font-size: 0.75em;
}
ul {
margin-top:8px;
margin-bottom:8px;
}
li {
padding-bottom:8px;
}
code {
color: #000099;
font-family: "Courier New", Courier, monospace;
font-size:1.1em;
}
img {
border: 0;
}
#col1{
float:left;
width: 20%;
padding-right: 24px;
}
#col2{
float: left;
width: 55%;
}
#col3{
float: right;
width: 20%;
margin: 0px;
padding: 0px;
}
a:link {
color: #006699;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #006699;
}
a:hover {
text-decoration: underline;
color: #006699;
}
a:active {
text-decoration: none;
color: #006699;
} | 18.021739 | 76 | 0.650985 |
2fb50e5b4764ca01181bd15c01a6ba221e3d8926 | 181,311 | py | Python | library/netapp-manageability-sdk-5.6/lib/python/NetApp/netapp_utils.py | Italux/python-mdszoning | e9126e5ee1f64105577db4afa74de33db88a80bf | [
"Apache-2.0"
] | null | null | null | library/netapp-manageability-sdk-5.6/lib/python/NetApp/netapp_utils.py | Italux/python-mdszoning | e9126e5ee1f64105577db4afa74de33db88a80bf | [
"Apache-2.0"
] | 2 | 2022-03-23T20:22:14.000Z | 2022-03-23T20:23:09.000Z | library/netapp-manageability-sdk-5.6/lib/python/NetApp/netapp_utils.py | italux/python-mdszoning | e9126e5ee1f64105577db4afa74de33db88a80bf | [
"Apache-2.0"
] | null | null | null | ############################################################################
# This module was auto-generated on Thu Oct 13 19:24:39 2016
# by using the 'system-api-list' api call from NetApp SDK for python.
# If you make changes to this module it will likely be broken the next time
# this file is auto-generated. If you choose to update this file anyway,
# please ensure that you have also updated the generate-api.py script
# to include your new changes.
#
# Also worth mentioning that some of the api calls may not work properly
# and that is because there is no way to easily auto-determine what api
# calls require additional arguments. If you find one that is broken,
# you may need to manually update this file but that is not recommended.
#
# The goal of this module is to make it easier to develop code since the
# original API requires you to know the exact API calls for interating
# with your NetApp appliance. The other goal of this module is to ensure
# you can override it instaed of modifying it directly if you find problems.
############################################################################
import sys
from NaElement import *
from NaServer import *
import xmltodict
import unicodedata
conn = None
timeout = 10
def connect(hostname, user, password, minor_version=1, major_version=21):
global conn
conn = NaServer(hostname, minor_version, major_version)
conn.set_server_type('filer')
conn.set_transport_type('HTTP')
conn.set_port(80)
conn.set_style('LOGIN')
conn.set_admin_user(user, password)
conn.set_timeout(timeout)
return conn
def action_test_key_optionality_defaultaction(*args):
api_call = _invoke_api('action-test-key-optionality-defaultaction', *args)
return api_call
def active_directory_account_get_iter(*args):
api_call = _invoke_api('active-directory-account-get-iter', *args)
return api_call
def aggr_add(*args):
api_call = _invoke_api('aggr-add', *args)
return api_call
def aggr_autobalance_aggregate_state_get_iter(*args):
api_call = _invoke_api('aggr-autobalance-aggregate-state-get-iter', *args)
return api_call
def aggr_autobalance_config_get(*args):
api_call = _invoke_api('aggr-autobalance-config-get', *args)
return api_call
def aggr_autobalance_config_modify(*args):
api_call = _invoke_api('aggr-autobalance-config-modify', *args)
return api_call
def aggr_autobalance_notification_get_iter(*args):
api_call = _invoke_api('aggr-autobalance-notification-get-iter', *args)
return api_call
def aggr_autobalance_volume_state_get_iter(*args):
api_call = _invoke_api('aggr-autobalance-volume-state-get-iter', *args)
return api_call
def aggr_check_spare_low(*args):
api_call = _invoke_api('aggr-check-spare-low', *args)
return api_call
def aggr_create(*args):
api_call = _invoke_api('aggr-create', *args)
return api_call
def aggr_destroy(*args):
api_call = _invoke_api('aggr-destroy', *args)
return api_call
def aggr_get_filer_info(*args):
api_call = _invoke_api('aggr-get-filer-info', *args)
return api_call
def aggr_get_iter(*args):
api_call = _invoke_api('aggr-get-iter', *args)
return api_call
def aggr_layout_recommendation_get_iter(*args):
api_call = _invoke_api('aggr-layout-recommendation-get-iter', *args)
return api_call
def aggr_mirror(*args):
api_call = _invoke_api('aggr-mirror', *args)
return api_call
def aggr_modify_raid_type(*args):
api_call = _invoke_api('aggr-modify-raid-type', *args)
return api_call
def aggr_offline(*args):
api_call = _invoke_api('aggr-offline', *args)
return api_call
def aggr_online(*args):
api_call = _invoke_api('aggr-online', *args)
return api_call
def aggr_options_list_info(*args):
api_call = _invoke_api('aggr-options-list-info', *args)
return api_call
def aggr_relocation(*args):
api_call = _invoke_api('aggr-relocation', *args)
return api_call
def aggr_relocation_status(*args):
api_call = _invoke_api('aggr-relocation-status', *args)
return api_call
def aggr_remove_stale_record(*args):
api_call = _invoke_api('aggr-remove-stale-record', *args)
return api_call
def aggr_rename(*args):
api_call = _invoke_api('aggr-rename', *args)
return api_call
def aggr_restrict(*args):
api_call = _invoke_api('aggr-restrict', *args)
return api_call
def aggr_scrub_list_info(*args):
api_call = _invoke_api('aggr-scrub-list-info', *args)
return api_call
def aggr_scrub_resume(*args):
api_call = _invoke_api('aggr-scrub-resume', *args)
return api_call
def aggr_scrub_start(*args):
api_call = _invoke_api('aggr-scrub-start', *args)
return api_call
def aggr_scrub_stop(*args):
api_call = _invoke_api('aggr-scrub-stop', *args)
return api_call
def aggr_scrub_suspend(*args):
api_call = _invoke_api('aggr-scrub-suspend', *args)
return api_call
def aggr_set_option(*args):
api_call = _invoke_api('aggr-set-option', *args)
return api_call
def aggr_space_get_iter(*args):
api_call = _invoke_api('aggr-space-get-iter', *args)
return api_call
def aggr_spare_get_iter(*args):
api_call = _invoke_api('aggr-spare-get-iter', *args)
return api_call
def aggr_status_get_iter(*args):
api_call = _invoke_api('aggr-status-get-iter', *args)
return api_call
def aggr_verify_list_info(*args):
api_call = _invoke_api('aggr-verify-list-info', *args)
return api_call
def aggr_verify_resume(*args):
api_call = _invoke_api('aggr-verify-resume', *args)
return api_call
def aggr_verify_start(*args):
api_call = _invoke_api('aggr-verify-start', *args)
return api_call
def aggr_verify_stop(*args):
api_call = _invoke_api('aggr-verify-stop', *args)
return api_call
def aggr_verify_suspend(*args):
api_call = _invoke_api('aggr-verify-suspend', *args)
return api_call
def alternate_destroy_iter_1(*args):
api_call = _invoke_api('alternate-destroy-iter-1', *args)
return api_call
def alternate_destroy_iter_1_inout(*args):
api_call = _invoke_api('alternate-destroy-iter-1-inout', *args)
return api_call
def alternate_get_1(*args):
api_call = _invoke_api('alternate-get-1', *args)
return api_call
def alternate_get_1_inout(*args):
api_call = _invoke_api('alternate-get-1-inout', *args)
return api_call
def alternate_get_iter_1(*args):
api_call = _invoke_api('alternate-get-iter-1', *args)
return api_call
def alternate_get_iter_1_inout(*args):
api_call = _invoke_api('alternate-get-iter-1-inout', *args)
return api_call
def alternate_get_iter_2(*args):
api_call = _invoke_api('alternate-get-iter-2', *args)
return api_call
def alternate_get_iter_2_inout(*args):
api_call = _invoke_api('alternate-get-iter-2-inout', *args)
return api_call
def alternate_modify_iter(*args):
api_call = _invoke_api('alternate-modify-iter', *args)
return api_call
def alternate_modify_iter_inout(*args):
api_call = _invoke_api('alternate-modify-iter-inout', *args)
return api_call
def antivirus_modify(*args):
api_call = _invoke_api('antivirus-modify', *args)
return api_call
def audit_get(*args):
api_call = _invoke_api('audit-get', *args)
return api_call
def audit_modify(*args):
api_call = _invoke_api('audit-modify', *args)
return api_call
def autogenzapi_create(*args):
api_call = _invoke_api('autogenzapi-create', *args)
return api_call
def autogenzapi_destroy(*args):
api_call = _invoke_api('autogenzapi-destroy', *args)
return api_call
def autogenzapi_get_iter(*args):
api_call = _invoke_api('autogenzapi-get-iter', *args)
return api_call
def autogenzapi_modify(*args):
api_call = _invoke_api('autogenzapi-modify', *args)
return api_call
def autogenzapi2_get_iter(*args):
api_call = _invoke_api('autogenzapi2-get-iter', *args)
return api_call
def autogenzapi3_create(*args):
api_call = _invoke_api('autogenzapi3-create', *args)
return api_call
def autogenzapi3_destroy(*args):
api_call = _invoke_api('autogenzapi3-destroy', *args)
return api_call
def autogenzapi3_get_iter(*args):
api_call = _invoke_api('autogenzapi3-get-iter', *args)
return api_call
def autogenzapi3_method1(*args):
api_call = _invoke_api('autogenzapi3-method1', *args)
return api_call
def autogenzapi3_modify(*args):
api_call = _invoke_api('autogenzapi3-modify', *args)
return api_call
def autogenzapiaction_dummy_autozapi_action_cmd(*args):
api_call = _invoke_api('autogenzapiaction-dummy-autozapi-action-cmd', *args)
return api_call
def autosupport_budget_get(*args):
api_call = _invoke_api('autosupport-budget-get', *args)
return api_call
def autosupport_budget_get_iter(*args):
api_call = _invoke_api('autosupport-budget-get-iter', *args)
return api_call
def autosupport_budget_get_total_records(*args):
api_call = _invoke_api('autosupport-budget-get-total-records', *args)
return api_call
def autosupport_budget_modify(*args):
api_call = _invoke_api('autosupport-budget-modify', *args)
return api_call
def autosupport_check_connectivity(*args):
api_call = _invoke_api('autosupport-check-connectivity', *args)
return api_call
def autosupport_check_connectivity_iter(*args):
api_call = _invoke_api('autosupport-check-connectivity-iter', *args)
return api_call
def autosupport_check_iter(*args):
api_call = _invoke_api('autosupport-check-iter', *args)
return api_call
def autosupport_compliant_get(*args):
api_call = _invoke_api('autosupport-compliant-get', *args)
return api_call
def autosupport_compliant_get_iter(*args):
api_call = _invoke_api('autosupport-compliant-get-iter', *args)
return api_call
def autosupport_compliant_get_total_records(*args):
api_call = _invoke_api('autosupport-compliant-get-total-records', *args)
return api_call
def autosupport_config_get(*args):
api_call = _invoke_api('autosupport-config-get', *args)
return api_call
def autosupport_config_get_iter(*args):
api_call = _invoke_api('autosupport-config-get-iter', *args)
return api_call
def autosupport_config_get_total_records(*args):
api_call = _invoke_api('autosupport-config-get-total-records', *args)
return api_call
def autosupport_config_modify(*args):
api_call = _invoke_api('autosupport-config-modify', *args)
return api_call
def autosupport_destinations_get(*args):
api_call = _invoke_api('autosupport-destinations-get', *args)
return api_call
def autosupport_destinations_get_iter(*args):
api_call = _invoke_api('autosupport-destinations-get-iter', *args)
return api_call
def autosupport_destinations_get_total_records(*args):
api_call = _invoke_api('autosupport-destinations-get-total-records', *args)
return api_call
def autosupport_download_get(*args):
api_call = _invoke_api('autosupport-download-get', *args)
return api_call
def autosupport_download_get_iter(*args):
api_call = _invoke_api('autosupport-download-get-iter', *args)
return api_call
def autosupport_history_cancel(*args):
api_call = _invoke_api('autosupport-history-cancel', *args)
return api_call
def autosupport_history_get(*args):
api_call = _invoke_api('autosupport-history-get', *args)
return api_call
def autosupport_history_get_iter(*args):
api_call = _invoke_api('autosupport-history-get-iter', *args)
return api_call
def autosupport_history_get_total_records(*args):
api_call = _invoke_api('autosupport-history-get-total-records', *args)
return api_call
def autosupport_history_retransmit(*args):
api_call = _invoke_api('autosupport-history-retransmit', *args)
return api_call
def autosupport_invoke(*args):
api_call = _invoke_api('autosupport-invoke', *args)
return api_call
def autosupport_invoke_core_upload(*args):
api_call = _invoke_api('autosupport-invoke-core-upload', *args)
return api_call
def autosupport_invoke_diagnostic(*args):
api_call = _invoke_api('autosupport-invoke-diagnostic', *args)
return api_call
def autosupport_invoke_performance_archive(*args):
api_call = _invoke_api('autosupport-invoke-performance-archive', *args)
return api_call
def autosupport_invoke_splog(*args):
api_call = _invoke_api('autosupport-invoke-splog', *args)
return api_call
def autosupport_manifest_get_iter(*args):
api_call = _invoke_api('autosupport-manifest-get-iter', *args)
return api_call
def autosupport_manifest_get_total_records(*args):
api_call = _invoke_api('autosupport-manifest-get-total-records', *args)
return api_call
def autosupport_trigger_get(*args):
api_call = _invoke_api('autosupport-trigger-get', *args)
return api_call
def autosupport_trigger_get_iter(*args):
api_call = _invoke_api('autosupport-trigger-get-iter', *args)
return api_call
def autosupport_trigger_get_total_records(*args):
api_call = _invoke_api('autosupport-trigger-get-total-records', *args)
return api_call
def autosupport_trigger_modify(*args):
api_call = _invoke_api('autosupport-trigger-modify', *args)
return api_call
def autozapiview_get_iter(*args):
api_call = _invoke_api('autozapiview-get-iter', *args)
return api_call
def av_get_engine_info(*args):
api_call = _invoke_api('av-get-engine-info', *args)
return api_call
def av_get_engine_options(*args):
api_call = _invoke_api('av-get-engine-options', *args)
return api_call
def av_get_log(*args):
api_call = _invoke_api('av-get-log', *args)
return api_call
def av_get_remedy_info(*args):
api_call = _invoke_api('av-get-remedy-info', *args)
return api_call
def av_get_version_info(*args):
api_call = _invoke_api('av-get-version-info', *args)
return api_call
def av_log_iter(*args):
api_call = _invoke_api('av-log-iter', *args)
return api_call
def av_on_access_policy_get_iter(*args):
api_call = _invoke_api('av-on-access-policy-get-iter', *args)
return api_call
def av_on_demand_command_abort(*args):
api_call = _invoke_api('av-on-demand-command-abort', *args)
return api_call
def av_on_demand_command_run(*args):
api_call = _invoke_api('av-on-demand-command-run', *args)
return api_call
def av_on_demand_command_scan_cluster_create(*args):
api_call = _invoke_api('av-on-demand-command-scan-cluster-create', *args)
return api_call
def av_on_demand_command_scan_cluster_delete(*args):
api_call = _invoke_api('av-on-demand-command-scan-cluster-delete', *args)
return api_call
def av_on_demand_command_scan_cluster_get(*args):
api_call = _invoke_api('av-on-demand-command-scan-cluster-get', *args)
return api_call
def av_on_demand_command_scan_cluster_get_iter(*args):
api_call = _invoke_api('av-on-demand-command-scan-cluster-get-iter', *args)
return api_call
def av_on_demand_command_scan_cluster_modify(*args):
api_call = _invoke_api('av-on-demand-command-scan-cluster-modify', *args)
return api_call
def av_on_demand_command_scan_dir_get_iter(*args):
api_call = _invoke_api('av-on-demand-command-scan-dir-get-iter', *args)
return api_call
def av_on_demand_command_scan_file_get_iter(*args):
api_call = _invoke_api('av-on-demand-command-scan-file-get-iter', *args)
return api_call
def av_on_demand_command_scan_vserver_get_iter(*args):
api_call = _invoke_api('av-on-demand-command-scan-vserver-get-iter', *args)
return api_call
def av_on_demand_command_schedule(*args):
api_call = _invoke_api('av-on-demand-command-schedule', *args)
return api_call
def av_on_demand_command_unschedule(*args):
api_call = _invoke_api('av-on-demand-command-unschedule', *args)
return api_call
def av_on_demand_job_get_iter(*args):
api_call = _invoke_api('av-on-demand-job-get-iter', *args)
return api_call
def av_on_demand_report_get_iter(*args):
api_call = _invoke_api('av-on-demand-report-get-iter', *args)
return api_call
def av_on_demand_report_print(*args):
api_call = _invoke_api('av-on-demand-report-print', *args)
return api_call
def av_on_demand_report_upload(*args):
api_call = _invoke_api('av-on-demand-report-upload', *args)
return api_call
def av_set_engine_info(*args):
api_call = _invoke_api('av-set-engine-info', *args)
return api_call
def av_set_engine_options(*args):
api_call = _invoke_api('av-set-engine-options', *args)
return api_call
def av_set_log(*args):
api_call = _invoke_api('av-set-log', *args)
return api_call
def av_set_remedy_info(*args):
api_call = _invoke_api('av-set-remedy-info', *args)
return api_call
def av_set_version_info(*args):
api_call = _invoke_api('av-set-version-info', *args)
return api_call
def av_start_update(*args):
api_call = _invoke_api('av-start-update', *args)
return api_call
def capability_can_be_enabled(*args):
api_call = _invoke_api('capability-can-be-enabled', *args)
return api_call
def capability_can_be_enabled_shim(*args):
api_call = _invoke_api('capability-can-be-enabled-shim', *args)
return api_call
def capability_can_boot_shim(*args):
api_call = _invoke_api('capability-can-boot-shim', *args)
return api_call
def capability_can_join_shim(*args):
api_call = _invoke_api('capability-can-join-shim', *args)
return api_call
def capability_disable(*args):
api_call = _invoke_api('capability-disable', *args)
return api_call
def capability_downgrade_commit_shim(*args):
api_call = _invoke_api('capability-downgrade-commit-shim', *args)
return api_call
def capability_downgrade_prepare_shim(*args):
api_call = _invoke_api('capability-downgrade-prepare-shim', *args)
return api_call
def capability_enable(*args):
api_call = _invoke_api('capability-enable', *args)
return api_call
def capability_get(*args):
api_call = _invoke_api('capability-get', *args)
return api_call
def capability_get_cluster_set(*args):
api_call = _invoke_api('capability-get-cluster-set', *args)
return api_call
def capability_get_iter(*args):
api_call = _invoke_api('capability-get-iter', *args)
return api_call
def capability_is_enabled(*args):
api_call = _invoke_api('capability-is-enabled', *args)
return api_call
def capability_is_enabled_during_downgrade_shim(*args):
api_call = _invoke_api('capability-is-enabled-during-downgrade-shim', *args)
return api_call
def capability_is_local_node_enable_ready(*args):
api_call = _invoke_api('capability-is-local-node-enable-ready', *args)
return api_call
def capability_load_manifest_shim(*args):
api_call = _invoke_api('capability-load-manifest-shim', *args)
return api_call
def capability_mark_local_node_enable_ready(*args):
api_call = _invoke_api('capability-mark-local-node-enable-ready', *args)
return api_call
def capability_node_disable(*args):
api_call = _invoke_api('capability-node-disable', *args)
return api_call
def capability_node_enable(*args):
api_call = _invoke_api('capability-node-enable', *args)
return api_call
def capability_node_has_capability(*args):
api_call = _invoke_api('capability-node-has-capability', *args)
return api_call
def capability_node_is_enabled(*args):
api_call = _invoke_api('capability-node-is-enabled', *args)
return api_call
def capability_recommend_release_shim(*args):
api_call = _invoke_api('capability-recommend-release-shim', *args)
return api_call
def capability_replicate_manifest_for_join_shim(*args):
api_call = _invoke_api('capability-replicate-manifest-for-join-shim', *args)
return api_call
def capability_software_update_check_shim(*args):
api_call = _invoke_api('capability-software-update-check-shim', *args)
return api_call
def cf_aggregate_giveback_status(*args):
api_call = _invoke_api('cf-aggregate-giveback-status', *args)
return api_call
def cf_force_takeover(*args):
api_call = _invoke_api('cf-force-takeover', *args)
return api_call
def cf_get_iter(*args):
api_call = _invoke_api('cf-get-iter', *args)
return api_call
def cf_get_partner(*args):
api_call = _invoke_api('cf-get-partner', *args)
return api_call
def cf_giveback(*args):
api_call = _invoke_api('cf-giveback', *args)
return api_call
def cf_hwassist_stats(*args):
api_call = _invoke_api('cf-hwassist-stats', *args)
return api_call
def cf_hwassist_stats_clear(*args):
api_call = _invoke_api('cf-hwassist-stats-clear', *args)
return api_call
def cf_hwassist_status(*args):
api_call = _invoke_api('cf-hwassist-status', *args)
return api_call
def cf_hwassist_test(*args):
api_call = _invoke_api('cf-hwassist-test', *args)
return api_call
def cf_mode_set(*args):
api_call = _invoke_api('cf-mode-set', *args)
return api_call
def cf_modify_iter(*args):
api_call = _invoke_api('cf-modify-iter', *args)
return api_call
def cf_service_disable(*args):
api_call = _invoke_api('cf-service-disable', *args)
return api_call
def cf_service_enable(*args):
api_call = _invoke_api('cf-service-enable', *args)
return api_call
def cf_status(*args):
api_call = _invoke_api('cf-status', *args)
return api_call
def cf_takeover(*args):
api_call = _invoke_api('cf-takeover', *args)
return api_call
def cf_takeover_status(*args):
api_call = _invoke_api('cf-takeover-status', *args)
return api_call
def cifs_branchcache_get_iter(*args):
api_call = _invoke_api('cifs-branchcache-get-iter', *args)
return api_call
def cifs_character_mapping_get_iter(*args):
api_call = _invoke_api('cifs-character-mapping-get-iter', *args)
return api_call
def cifs_domain_discovered_servers_get_iter(*args):
api_call = _invoke_api('cifs-domain-discovered-servers-get-iter', *args)
return api_call
def cifs_domain_name_mapping_search_get_iter(*args):
api_call = _invoke_api('cifs-domain-name-mapping-search-get-iter', *args)
return api_call
def cifs_domain_password_schedule_get_iter(*args):
api_call = _invoke_api('cifs-domain-password-schedule-get-iter', *args)
return api_call
def cifs_domain_preferred_dc_get_iter(*args):
api_call = _invoke_api('cifs-domain-preferred-dc-get-iter', *args)
return api_call
def cifs_domain_trusts_get_iter(*args):
api_call = _invoke_api('cifs-domain-trusts-get-iter', *args)
return api_call
def cifs_home_directory_get_iter(*args):
api_call = _invoke_api('cifs-home-directory-get-iter', *args)
return api_call
def cifs_home_directory_search_path_get_iter(*args):
api_call = _invoke_api('cifs-home-directory-search-path-get-iter', *args)
return api_call
def cifs_local_group_get_iter(*args):
api_call = _invoke_api('cifs-local-group-get-iter', *args)
return api_call
def cifs_local_group_members_get_iter(*args):
api_call = _invoke_api('cifs-local-group-members-get-iter', *args)
return api_call
def cifs_local_user_get_iter(*args):
api_call = _invoke_api('cifs-local-user-get-iter', *args)
return api_call
def cifs_local_user_membership_get_iter(*args):
api_call = _invoke_api('cifs-local-user-membership-get-iter', *args)
return api_call
def cifs_nbtstat_get_iter(*args):
api_call = _invoke_api('cifs-nbtstat-get-iter', *args)
return api_call
def cifs_options_get_iter(*args):
api_call = _invoke_api('cifs-options-get-iter', *args)
return api_call
def cifs_privilege_get_iter(*args):
api_call = _invoke_api('cifs-privilege-get-iter', *args)
return api_call
def cifs_security_get_iter(*args):
api_call = _invoke_api('cifs-security-get-iter', *args)
return api_call
def cifs_server_get_iter(*args):
api_call = _invoke_api('cifs-server-get-iter', *args)
return api_call
def cifs_session_file_get_iter(*args):
api_call = _invoke_api('cifs-session-file-get-iter', *args)
return api_call
def cifs_session_get_iter(*args):
api_call = _invoke_api('cifs-session-get-iter', *args)
return api_call
def cifs_shadowcopy_add_files(*args):
api_call = _invoke_api('cifs-shadowcopy-add-files', *args)
return api_call
def cifs_shadowcopy_ems_get_iter(*args):
api_call = _invoke_api('cifs-shadowcopy-ems-get-iter', *args)
return api_call
def cifs_shadowcopy_keep_snapshot(*args):
api_call = _invoke_api('cifs-shadowcopy-keep-snapshot', *args)
return api_call
def cifs_shadowcopy_restore_dir(*args):
api_call = _invoke_api('cifs-shadowcopy-restore-dir', *args)
return api_call
def cifs_share_access_control_get_iter(*args):
api_call = _invoke_api('cifs-share-access-control-get-iter', *args)
return api_call
def cifs_share_get_iter(*args):
api_call = _invoke_api('cifs-share-get-iter', *args)
return api_call
def cifs_symlink_get_iter(*args):
api_call = _invoke_api('cifs-symlink-get-iter', *args)
return api_call
def clock_get_clock(*args):
api_call = _invoke_api('clock-get-clock', *args)
return api_call
def clock_get_timezone(*args):
api_call = _invoke_api('clock-get-timezone', *args)
return api_call
def clone_deletion_get_iter(*args):
api_call = _invoke_api('clone-deletion-get-iter', *args)
return api_call
def clone_split_load_get_iter(*args):
api_call = _invoke_api('clone-split-load-get-iter', *args)
return api_call
def clone_split_load_modify(*args):
api_call = _invoke_api('clone-split-load-modify', *args)
return api_call
def clone_token_create(*args):
api_call = _invoke_api('clone-token-create', *args)
return api_call
def clone_token_delete(*args):
api_call = _invoke_api('clone-token-delete', *args)
return api_call
def clone_token_get(*args):
api_call = _invoke_api('clone-token-get', *args)
return api_call
def clone_token_modify_expiry_limit(*args):
api_call = _invoke_api('clone-token-modify-expiry-limit', *args)
return api_call
def cluster_application_record_create(*args):
api_call = _invoke_api('cluster-application-record-create', *args)
return api_call
def cluster_application_record_delete(*args):
api_call = _invoke_api('cluster-application-record-delete', *args)
return api_call
def cluster_application_record_get_iter(*args):
api_call = _invoke_api('cluster-application-record-get-iter', *args)
return api_call
def cluster_application_record_modify(*args):
api_call = _invoke_api('cluster-application-record-modify', *args)
return api_call
def cluster_contact_get(*args):
api_call = _invoke_api('cluster-contact-get', *args)
return api_call
def cluster_contact_modify(*args):
api_call = _invoke_api('cluster-contact-modify', *args)
return api_call
def cluster_create(*args):
api_call = _invoke_api('cluster-create', *args)
return api_call
def cluster_create_join_progress_get(*args):
api_call = _invoke_api('cluster-create-join-progress-get', *args)
return api_call
def cluster_ha_get(*args):
api_call = _invoke_api('cluster-ha-get', *args)
return api_call
def cluster_ha_modify(*args):
api_call = _invoke_api('cluster-ha-modify', *args)
return api_call
def cluster_identity_get(*args):
api_call = _invoke_api('cluster-identity-get', *args)
return api_call
def cluster_identity_modify(*args):
api_call = _invoke_api('cluster-identity-modify', *args)
return api_call
def cluster_image_get(*args):
api_call = _invoke_api('cluster-image-get', *args)
return api_call
def cluster_image_get_download_progress(*args):
api_call = _invoke_api('cluster-image-get-download-progress', *args)
return api_call
def cluster_image_get_iter(*args):
api_call = _invoke_api('cluster-image-get-iter', *args)
return api_call
def cluster_image_node_update_progress_info(*args):
api_call = _invoke_api('cluster-image-node-update-progress-info', *args)
return api_call
def cluster_image_package_delete(*args):
api_call = _invoke_api('cluster-image-package-delete', *args)
return api_call
def cluster_image_package_download(*args):
api_call = _invoke_api('cluster-image-package-download', *args)
return api_call
def cluster_image_package_download_abort(*args):
api_call = _invoke_api('cluster-image-package-download-abort', *args)
return api_call
def cluster_image_package_local_get(*args):
api_call = _invoke_api('cluster-image-package-local-get', *args)
return api_call
def cluster_image_package_local_get_iter(*args):
api_call = _invoke_api('cluster-image-package-local-get-iter', *args)
return api_call
def cluster_image_update(*args):
api_call = _invoke_api('cluster-image-update', *args)
return api_call
def cluster_image_update_cancel(*args):
api_call = _invoke_api('cluster-image-update-cancel', *args)
return api_call
def cluster_image_update_history_get_iter(*args):
api_call = _invoke_api('cluster-image-update-history-get-iter', *args)
return api_call
def cluster_image_update_log_get_iter(*args):
api_call = _invoke_api('cluster-image-update-log-get-iter', *args)
return api_call
def cluster_image_update_pause(*args):
api_call = _invoke_api('cluster-image-update-pause', *args)
return api_call
def cluster_image_update_progress_get_iter(*args):
api_call = _invoke_api('cluster-image-update-progress-get-iter', *args)
return api_call
def cluster_image_update_progress_info(*args):
api_call = _invoke_api('cluster-image-update-progress-info', *args)
return api_call
def cluster_image_update_resume(*args):
api_call = _invoke_api('cluster-image-update-resume', *args)
return api_call
def cluster_image_validate(*args):
api_call = _invoke_api('cluster-image-validate', *args)
return api_call
def cluster_join(*args):
api_call = _invoke_api('cluster-join', *args)
return api_call
def cluster_log_forward_create(*args):
api_call = _invoke_api('cluster-log-forward-create', *args)
return api_call
def cluster_log_forward_destroy(*args):
api_call = _invoke_api('cluster-log-forward-destroy', *args)
return api_call
def cluster_log_forward_get(*args):
api_call = _invoke_api('cluster-log-forward-get', *args)
return api_call
def cluster_log_forward_get_iter(*args):
api_call = _invoke_api('cluster-log-forward-get-iter', *args)
return api_call
def cluster_log_forward_modify(*args):
api_call = _invoke_api('cluster-log-forward-modify', *args)
return api_call
def cluster_log_forward_statistics_get(*args):
api_call = _invoke_api('cluster-log-forward-statistics-get', *args)
return api_call
def cluster_log_forward_statistics_get_iter(*args):
api_call = _invoke_api('cluster-log-forward-statistics-get-iter', *args)
return api_call
def cluster_node_get(*args):
api_call = _invoke_api('cluster-node-get', *args)
return api_call
def cluster_node_get_iter(*args):
api_call = _invoke_api('cluster-node-get-iter', *args)
return api_call
def cluster_node_modify(*args):
api_call = _invoke_api('cluster-node-modify', *args)
return api_call
def cluster_peer_active_address_insert(*args):
api_call = _invoke_api('cluster-peer-active-address-insert', *args)
return api_call
def cluster_peer_active_addresses_get(*args):
api_call = _invoke_api('cluster-peer-active-addresses-get', *args)
return api_call
def cluster_peer_active_addresses_register(*args):
api_call = _invoke_api('cluster-peer-active-addresses-register', *args)
return api_call
def cluster_peer_authn_offer_cancel(*args):
api_call = _invoke_api('cluster-peer-authn-offer-cancel', *args)
return api_call
def cluster_peer_authn_offer_get(*args):
api_call = _invoke_api('cluster-peer-authn-offer-get', *args)
return api_call
def cluster_peer_authn_offer_get_iter(*args):
api_call = _invoke_api('cluster-peer-authn-offer-get-iter', *args)
return api_call
def cluster_peer_authn_offer_modify(*args):
api_call = _invoke_api('cluster-peer-authn-offer-modify', *args)
return api_call
def cluster_peer_connection_destroy(*args):
api_call = _invoke_api('cluster-peer-connection-destroy', *args)
return api_call
def cluster_peer_connections_get(*args):
api_call = _invoke_api('cluster-peer-connections-get', *args)
return api_call
def cluster_peer_connections_get_iter(*args):
api_call = _invoke_api('cluster-peer-connections-get-iter', *args)
return api_call
def cluster_peer_create(*args):
api_call = _invoke_api('cluster-peer-create', *args)
return api_call
def cluster_peer_delete(*args):
api_call = _invoke_api('cluster-peer-delete', *args)
return api_call
def cluster_peer_get(*args):
api_call = _invoke_api('cluster-peer-get', *args)
return api_call
def cluster_peer_get_iter(*args):
api_call = _invoke_api('cluster-peer-get-iter', *args)
return api_call
def cluster_peer_health_info_get(*args):
api_call = _invoke_api('cluster-peer-health-info-get', *args)
return api_call
def cluster_peer_health_info_get_iter(*args):
api_call = _invoke_api('cluster-peer-health-info-get-iter', *args)
return api_call
def cluster_peer_modify(*args):
api_call = _invoke_api('cluster-peer-modify', *args)
return api_call
def cluster_peer_ping_cluster_peer_test_check_mtu(*args):
api_call = _invoke_api('cluster-peer-ping-cluster-peer-test-check-mtu', *args)
return api_call
def cluster_peer_ping_iter(*args):
api_call = _invoke_api('cluster-peer-ping-iter', *args)
return api_call
def cluster_peer_policy_get(*args):
api_call = _invoke_api('cluster-peer-policy-get', *args)
return api_call
def cluster_peer_policy_modify(*args):
api_call = _invoke_api('cluster-peer-policy-modify', *args)
return api_call
def cluster_peer_stable_addresses_get(*args):
api_call = _invoke_api('cluster-peer-stable-addresses-get', *args)
return api_call
def cluster_peer_stable_addresses_register(*args):
api_call = _invoke_api('cluster-peer-stable-addresses-register', *args)
return api_call
def cluster_unjoin(*args):
api_call = _invoke_api('cluster-unjoin', *args)
return api_call
def config_backup_copy(*args):
api_call = _invoke_api('config-backup-copy', *args)
return api_call
def config_backup_create(*args):
api_call = _invoke_api('config-backup-create', *args)
return api_call
def config_backup_delete(*args):
api_call = _invoke_api('config-backup-delete', *args)
return api_call
def config_backup_download(*args):
api_call = _invoke_api('config-backup-download', *args)
return api_call
def config_backup_info_get(*args):
api_call = _invoke_api('config-backup-info-get', *args)
return api_call
def config_backup_info_get_iter(*args):
api_call = _invoke_api('config-backup-info-get-iter', *args)
return api_call
def config_backup_rename(*args):
api_call = _invoke_api('config-backup-rename', *args)
return api_call
def config_backup_settings_get(*args):
api_call = _invoke_api('config-backup-settings-get', *args)
return api_call
def config_backup_settings_modify(*args):
api_call = _invoke_api('config-backup-settings-modify', *args)
return api_call
def config_backup_settings_password_set(*args):
api_call = _invoke_api('config-backup-settings-password-set', *args)
return api_call
def config_backup_upload(*args):
api_call = _invoke_api('config-backup-upload', *args)
return api_call
def core_segment_config_get(*args):
api_call = _invoke_api('core-segment-config-get', *args)
return api_call
def core_segment_config_modify(*args):
api_call = _invoke_api('core-segment-config-modify', *args)
return api_call
def core_segment_delete_all(*args):
api_call = _invoke_api('core-segment-delete-all', *args)
return api_call
def core_segment_destroy(*args):
api_call = _invoke_api('core-segment-destroy', *args)
return api_call
def core_segment_get(*args):
api_call = _invoke_api('core-segment-get', *args)
return api_call
def core_segment_get_iter(*args):
api_call = _invoke_api('core-segment-get-iter', *args)
return api_call
def core_segment_start(*args):
api_call = _invoke_api('core-segment-start', *args)
return api_call
def core_segment_status_get_iter(*args):
api_call = _invoke_api('core-segment-status-get-iter', *args)
return api_call
def core_segment_stop(*args):
api_call = _invoke_api('core-segment-stop', *args)
return api_call
def coredump_config_get(*args):
api_call = _invoke_api('coredump-config-get', *args)
return api_call
def coredump_config_get_iter(*args):
api_call = _invoke_api('coredump-config-get-iter', *args)
return api_call
def coredump_config_get_total_records(*args):
api_call = _invoke_api('coredump-config-get-total-records', *args)
return api_call
def coredump_config_modify(*args):
api_call = _invoke_api('coredump-config-modify', *args)
return api_call
def coredump_config_modify_iter(*args):
api_call = _invoke_api('coredump-config-modify-iter', *args)
return api_call
def coredump_delete_all(*args):
api_call = _invoke_api('coredump-delete-all', *args)
return api_call
def coredump_delete_core(*args):
api_call = _invoke_api('coredump-delete-core', *args)
return api_call
def coredump_delete_core_iter(*args):
api_call = _invoke_api('coredump-delete-core-iter', *args)
return api_call
def coredump_get(*args):
api_call = _invoke_api('coredump-get', *args)
return api_call
def coredump_get_iter(*args):
api_call = _invoke_api('coredump-get-iter', *args)
return api_call
def coredump_get_total_records(*args):
api_call = _invoke_api('coredump-get-total-records', *args)
return api_call
def coredump_save_all(*args):
api_call = _invoke_api('coredump-save-all', *args)
return api_call
def coredump_save_core(*args):
api_call = _invoke_api('coredump-save-core', *args)
return api_call
def coredump_save_core_iter(*args):
api_call = _invoke_api('coredump-save-core-iter', *args)
return api_call
def coredump_trigger(*args):
api_call = _invoke_api('coredump-trigger', *args)
return api_call
def coredump_upload_core(*args):
api_call = _invoke_api('coredump-upload-core', *args)
return api_call
def cost_center_statistics_get(*args):
api_call = _invoke_api('cost-center-statistics-get', *args)
return api_call
def cost_center_statistics_get_iter(*args):
api_call = _invoke_api('cost-center-statistics-get-iter', *args)
return api_call
def cost_center_statistics_get_total_records(*args):
api_call = _invoke_api('cost-center-statistics-get-total-records', *args)
return api_call
def dashboard_alarm_get(*args):
api_call = _invoke_api('dashboard-alarm-get', *args)
return api_call
def dashboard_alarm_get_iter(*args):
api_call = _invoke_api('dashboard-alarm-get-iter', *args)
return api_call
def dashboard_alarm_get_total_records(*args):
api_call = _invoke_api('dashboard-alarm-get-total-records', *args)
return api_call
def dashboard_alarm_threshold_get(*args):
api_call = _invoke_api('dashboard-alarm-threshold-get', *args)
return api_call
def dashboard_alarm_threshold_get_iter(*args):
api_call = _invoke_api('dashboard-alarm-threshold-get-iter', *args)
return api_call
def dashboard_alarm_threshold_get_total_records(*args):
api_call = _invoke_api('dashboard-alarm-threshold-get-total-records', *args)
return api_call
def dashboard_alarm_threshold_modify(*args):
api_call = _invoke_api('dashboard-alarm-threshold-modify', *args)
return api_call
def default_destroy_iter(*args):
api_call = _invoke_api('default-destroy-iter', *args)
return api_call
def default_destroy_iter_inout(*args):
api_call = _invoke_api('default-destroy-iter-inout', *args)
return api_call
def default_get(*args):
api_call = _invoke_api('default-get', *args)
return api_call
def default_get_inout(*args):
api_call = _invoke_api('default-get-inout', *args)
return api_call
def default_get_iter(*args):
api_call = _invoke_api('default-get-iter', *args)
return api_call
def default_get_iter_inout(*args):
api_call = _invoke_api('default-get-iter-inout', *args)
return api_call
def default_modify_iter(*args):
api_call = _invoke_api('default-modify-iter', *args)
return api_call
def default_modify_iter_inout(*args):
api_call = _invoke_api('default-modify-iter-inout', *args)
return api_call
def diagnosis_alert_definition_get(*args):
api_call = _invoke_api('diagnosis-alert-definition-get', *args)
return api_call
def diagnosis_alert_definition_get_iter(*args):
api_call = _invoke_api('diagnosis-alert-definition-get-iter', *args)
return api_call
def diagnosis_alert_get(*args):
api_call = _invoke_api('diagnosis-alert-get', *args)
return api_call
def diagnosis_alert_get_iter(*args):
api_call = _invoke_api('diagnosis-alert-get-iter', *args)
return api_call
def diagnosis_alert_modify(*args):
api_call = _invoke_api('diagnosis-alert-modify', *args)
return api_call
def diagnosis_config_get(*args):
api_call = _invoke_api('diagnosis-config-get', *args)
return api_call
def diagnosis_config_get_iter(*args):
api_call = _invoke_api('diagnosis-config-get-iter', *args)
return api_call
def diagnosis_delete_alert(*args):
api_call = _invoke_api('diagnosis-delete-alert', *args)
return api_call
def diagnosis_policy_definition_get(*args):
api_call = _invoke_api('diagnosis-policy-definition-get', *args)
return api_call
def diagnosis_policy_definition_get_iter(*args):
api_call = _invoke_api('diagnosis-policy-definition-get-iter', *args)
return api_call
def diagnosis_policy_modify(*args):
api_call = _invoke_api('diagnosis-policy-modify', *args)
return api_call
def diagnosis_status_get(*args):
api_call = _invoke_api('diagnosis-status-get', *args)
return api_call
def diagnosis_subscriptions_create(*args):
api_call = _invoke_api('diagnosis-subscriptions-create', *args)
return api_call
def diagnosis_subscriptions_get(*args):
api_call = _invoke_api('diagnosis-subscriptions-get', *args)
return api_call
def diagnosis_subscriptions_get_iter(*args):
api_call = _invoke_api('diagnosis-subscriptions-get-iter', *args)
return api_call
def diagnosis_subscriptions_modify(*args):
api_call = _invoke_api('diagnosis-subscriptions-modify', *args)
return api_call
def diagnosis_subsystem_config_get(*args):
api_call = _invoke_api('diagnosis-subsystem-config-get', *args)
return api_call
def diagnosis_subsystem_config_get_iter(*args):
api_call = _invoke_api('diagnosis-subsystem-config-get-iter', *args)
return api_call
def diagnosis_subsystem_config_modify(*args):
api_call = _invoke_api('diagnosis-subsystem-config-modify', *args)
return api_call
def disk_encrypt_get(*args):
api_call = _invoke_api('disk-encrypt-get', *args)
return api_call
def disk_encrypt_get_iter(*args):
api_call = _invoke_api('disk-encrypt-get-iter', *args)
return api_call
def disk_encrypt_modify(*args):
api_call = _invoke_api('disk-encrypt-modify', *args)
return api_call
def disk_encrypt_modify_iter(*args):
api_call = _invoke_api('disk-encrypt-modify-iter', *args)
return api_call
def disk_encrypt_sanitize(*args):
api_call = _invoke_api('disk-encrypt-sanitize', *args)
return api_call
def disk_encrypt_sanitize_iter(*args):
api_call = _invoke_api('disk-encrypt-sanitize-iter', *args)
return api_call
def disk_encrypt_status_get(*args):
api_call = _invoke_api('disk-encrypt-status-get', *args)
return api_call
def disk_encrypt_status_get_iter(*args):
api_call = _invoke_api('disk-encrypt-status-get-iter', *args)
return api_call
def disk_fail(*args):
api_call = _invoke_api('disk-fail', *args)
return api_call
def disk_remove(*args):
api_call = _invoke_api('disk-remove', *args)
return api_call
def disk_sanown_assign(*args):
api_call = _invoke_api('disk-sanown-assign', *args)
return api_call
def disk_sanown_filer_list_info(*args):
api_call = _invoke_api('disk-sanown-filer-list-info', *args)
return api_call
def disk_sanown_list_info(*args):
api_call = _invoke_api('disk-sanown-list-info', *args)
return api_call
def disk_sanown_reassign(*args):
api_call = _invoke_api('disk-sanown-reassign', *args)
return api_call
def disk_sanown_remove_ownership(*args):
api_call = _invoke_api('disk-sanown-remove-ownership', *args)
return api_call
def disk_unfail(*args):
api_call = _invoke_api('disk-unfail', *args)
return api_call
def disk_update_disk_fw(*args):
api_call = _invoke_api('disk-update-disk-fw', *args)
return api_call
def disk_zero_spares(*args):
api_call = _invoke_api('disk-zero-spares', *args)
return api_call
def dummy_addquery_alt_get(*args):
api_call = _invoke_api('dummy-addquery-alt-get', *args)
return api_call
def dummy_addquery_create(*args):
api_call = _invoke_api('dummy-addquery-create', *args)
return api_call
def dummy_addquery_get_iter(*args):
api_call = _invoke_api('dummy-addquery-get-iter', *args)
return api_call
def dummy_addquery_modify(*args):
api_call = _invoke_api('dummy-addquery-modify', *args)
return api_call
def dummy_async_volume_create(*args):
api_call = _invoke_api('dummy-async-volume-create', *args)
return api_call
def dummy_async_volume_create_args(*args):
api_call = _invoke_api('dummy-async-volume-create-args', *args)
return api_call
def dummy_av_get_engine_options(*args):
api_call = _invoke_api('dummy-av-get-engine-options', *args)
return api_call
def dummy_av_set_engine_options(*args):
api_call = _invoke_api('dummy-av-set-engine-options', *args)
return api_call
def dummy_fcp_create(*args):
api_call = _invoke_api('dummy-fcp-create', *args)
return api_call
def dummy_fcp_destroy(*args):
api_call = _invoke_api('dummy-fcp-destroy', *args)
return api_call
def dummy_fcp_get_iter(*args):
api_call = _invoke_api('dummy-fcp-get-iter', *args)
return api_call
def dummy_file_dummy_read_file(*args):
api_call = _invoke_api('dummy-file-dummy-read-file', *args)
return api_call
def dummy_listInfo_only_get(*args):
api_call = _invoke_api('dummy-listInfo-only-get', *args)
return api_call
def dummy_listInfo_only_list_info(*args):
api_call = _invoke_api('dummy-listInfo-only-list-info', *args)
return api_call
def dummy_quota_create(*args):
api_call = _invoke_api('dummy-quota-create', *args)
return api_call
def dummy_quota_destroy(*args):
api_call = _invoke_api('dummy-quota-destroy', *args)
return api_call
def dummy_quota_report(*args):
api_call = _invoke_api('dummy-quota-report', *args)
return api_call
def dummy_quota_report_no_input(*args):
api_call = _invoke_api('dummy-quota-report-no-input', *args)
return api_call
def dummy_storage_initiator_errors_list_info(*args):
api_call = _invoke_api('dummy-storage-initiator-errors-list-info', *args)
return api_call
def dummy_storage_initiator_errors_list_info_alt(*args):
api_call = _invoke_api('dummy-storage-initiator-errors-list-info-alt', *args)
return api_call
def dummy_storage_initiator_errors_list_info_empty(*args):
api_call = _invoke_api('dummy-storage-initiator-errors-list-info-empty', *args)
return api_call
def dummy_vserver_destroy_iter(*args):
api_call = _invoke_api('dummy-vserver-destroy-iter', *args)
return api_call
def dummy_vserver_dosomething(*args):
api_call = _invoke_api('dummy-vserver-dosomething', *args)
return api_call
def dummy_vserver_family_test_alt_create(*args):
api_call = _invoke_api('dummy-vserver-family-test-alt-create', *args)
return api_call
def dummy_vserver_family_test_alt_destroy(*args):
api_call = _invoke_api('dummy-vserver-family-test-alt-destroy', *args)
return api_call
def dummy_vserver_family_test_alt_get(*args):
api_call = _invoke_api('dummy-vserver-family-test-alt-get', *args)
return api_call
def dummy_vserver_family_test_alt_list_info(*args):
api_call = _invoke_api('dummy-vserver-family-test-alt-list-info', *args)
return api_call
def dummy_vserver_family_test_alt_modify(*args):
api_call = _invoke_api('dummy-vserver-family-test-alt-modify', *args)
return api_call
def dummy_vserver_family_test_destroy_iter(*args):
api_call = _invoke_api('dummy-vserver-family-test-destroy-iter', *args)
return api_call
def dummy_vserver_family_test_get_iter(*args):
api_call = _invoke_api('dummy-vserver-family-test-get-iter', *args)
return api_call
def dummy_vserver_family_test_list_info(*args):
api_call = _invoke_api('dummy-vserver-family-test-list-info', *args)
return api_call
def dummy_vserver_family_test_modify_iter(*args):
api_call = _invoke_api('dummy-vserver-family-test-modify-iter', *args)
return api_call
def dummy_vserver_fcp_list_get_iter(*args):
api_call = _invoke_api('dummy-vserver-fcp-list-get-iter', *args)
return api_call
def dummy_vserver_file_dummy_vserver_read_file_alt(*args):
api_call = _invoke_api('dummy-vserver-file-dummy-vserver-read-file-alt', *args)
return api_call
def dummy_vserver_get_iter(*args):
api_call = _invoke_api('dummy-vserver-get-iter', *args)
return api_call
def dummy_vserver_list_info(*args):
api_call = _invoke_api('dummy-vserver-list-info', *args)
return api_call
def dummy_vserver_list_info_1_alt(*args):
api_call = _invoke_api('dummy-vserver-list-info-1-alt', *args)
return api_call
def dummy_vserver_list_info_2_alt(*args):
api_call = _invoke_api('dummy-vserver-list-info-2-alt', *args)
return api_call
def dummy_vserver_list_info_3_alt(*args):
api_call = _invoke_api('dummy-vserver-list-info-3-alt', *args)
return api_call
def dummy_vserver_list_info_alt(*args):
api_call = _invoke_api('dummy-vserver-list-info-alt', *args)
return api_call
def dummy_vserver_modify_iter(*args):
api_call = _invoke_api('dummy-vserver-modify-iter', *args)
return api_call
def dummy_zapi_delete_async(*args):
api_call = _invoke_api('dummy-zapi-delete-async', *args)
return api_call
def dummy_zapi_delete_async_nowait(*args):
api_call = _invoke_api('dummy-zapi-delete-async-nowait', *args)
return api_call
def dummy_zapi_delete_async_nowait_returnsok(*args):
api_call = _invoke_api('dummy-zapi-delete-async-nowait-returnsok', *args)
return api_call
def dummy_zapi_jobid_async(*args):
api_call = _invoke_api('dummy-zapi-jobid-async', *args)
return api_call
def dummy_zapi_jobid_async_nowait(*args):
api_call = _invoke_api('dummy-zapi-jobid-async-nowait', *args)
return api_call
def dummy_zapi_key_attribute_specified_type(*args):
api_call = _invoke_api('dummy-zapi-key-attribute-specified-type', *args)
return api_call
def dummylun_create(*args):
api_call = _invoke_api('dummylun-create', *args)
return api_call
def dummylun_create_by_size(*args):
api_call = _invoke_api('dummylun-create-by-size', *args)
return api_call
def dummylun_create_by_size_alt(*args):
api_call = _invoke_api('dummylun-create-by-size-alt', *args)
return api_call
def dummylun_destroy_iter(*args):
api_call = _invoke_api('dummylun-destroy-iter', *args)
return api_call
def dummylun_get_alt(*args):
api_call = _invoke_api('dummylun-get-alt', *args)
return api_call
def dummylun_get_iter(*args):
api_call = _invoke_api('dummylun-get-iter', *args)
return api_call
def dummylun_get_iter_alt(*args):
api_call = _invoke_api('dummylun-get-iter-alt', *args)
return api_call
def dummylun_list_info(*args):
api_call = _invoke_api('dummylun-list-info', *args)
return api_call
def dummylun_list_info_alt(*args):
api_call = _invoke_api('dummylun-list-info-alt', *args)
return api_call
def dummylun_list_info_alt1(*args):
api_call = _invoke_api('dummylun-list-info-alt1', *args)
return api_call
def dummylun_list_info_alt2(*args):
api_call = _invoke_api('dummylun-list-info-alt2', *args)
return api_call
def ems_config_get(*args):
api_call = _invoke_api('ems-config-get', *args)
return api_call
def ems_config_modify(*args):
api_call = _invoke_api('ems-config-modify', *args)
return api_call
def ems_destination_create(*args):
api_call = _invoke_api('ems-destination-create', *args)
return api_call
def ems_destination_destroy(*args):
api_call = _invoke_api('ems-destination-destroy', *args)
return api_call
def ems_destination_destroy_iter(*args):
api_call = _invoke_api('ems-destination-destroy-iter', *args)
return api_call
def ems_destination_get(*args):
api_call = _invoke_api('ems-destination-get', *args)
return api_call
def ems_destination_get_iter(*args):
api_call = _invoke_api('ems-destination-get-iter', *args)
return api_call
def ems_destination_modify(*args):
api_call = _invoke_api('ems-destination-modify', *args)
return api_call
def ems_destination_modify_iter(*args):
api_call = _invoke_api('ems-destination-modify-iter', *args)
return api_call
def ems_mail_history_destroy(*args):
api_call = _invoke_api('ems-mail-history-destroy', *args)
return api_call
def ems_mail_history_destroy_iter(*args):
api_call = _invoke_api('ems-mail-history-destroy-iter', *args)
return api_call
def ems_mail_history_get(*args):
api_call = _invoke_api('ems-mail-history-get', *args)
return api_call
def ems_mail_history_get_iter(*args):
api_call = _invoke_api('ems-mail-history-get-iter', *args)
return api_call
def ems_message_get(*args):
api_call = _invoke_api('ems-message-get', *args)
return api_call
def ems_message_get_iter(*args):
api_call = _invoke_api('ems-message-get-iter', *args)
return api_call
def ems_routing_add_destination(*args):
api_call = _invoke_api('ems-routing-add-destination', *args)
return api_call
def ems_routing_get(*args):
api_call = _invoke_api('ems-routing-get', *args)
return api_call
def ems_routing_get_iter(*args):
api_call = _invoke_api('ems-routing-get-iter', *args)
return api_call
def ems_routing_modify(*args):
api_call = _invoke_api('ems-routing-modify', *args)
return api_call
def ems_routing_modify_iter(*args):
api_call = _invoke_api('ems-routing-modify-iter', *args)
return api_call
def ems_routing_remove_destination(*args):
api_call = _invoke_api('ems-routing-remove-destination', *args)
return api_call
def ems_snmp_history_destroy(*args):
api_call = _invoke_api('ems-snmp-history-destroy', *args)
return api_call
def ems_snmp_history_destroy_iter(*args):
api_call = _invoke_api('ems-snmp-history-destroy-iter', *args)
return api_call
def ems_snmp_history_get(*args):
api_call = _invoke_api('ems-snmp-history-get', *args)
return api_call
def ems_snmp_history_get_iter(*args):
api_call = _invoke_api('ems-snmp-history-get-iter', *args)
return api_call
def ems_status_get(*args):
api_call = _invoke_api('ems-status-get', *args)
return api_call
def ems_status_get_iter(*args):
api_call = _invoke_api('ems-status-get-iter', *args)
return api_call
def environment_sensors_get_iter(*args):
api_call = _invoke_api('environment-sensors-get-iter', *args)
return api_call
def event_log_get_iter(*args):
api_call = _invoke_api('event-log-get-iter', *args)
return api_call
def export_policy_get_iter(*args):
api_call = _invoke_api('export-policy-get-iter', *args)
return api_call
def export_rule_get_create_defaults(*args):
api_call = _invoke_api('export-rule-get-create-defaults', *args)
return api_call
def export_rule_get_iter(*args):
api_call = _invoke_api('export-rule-get-iter', *args)
return api_call
def exports_access_cache_all_vservers_get(*args):
api_call = _invoke_api('exports-access-cache-all-vservers-get', *args)
return api_call
def exports_access_cache_all_vservers_modify(*args):
api_call = _invoke_api('exports-access-cache-all-vservers-modify', *args)
return api_call
def external_cache_policy_get(*args):
api_call = _invoke_api('external-cache-policy-get', *args)
return api_call
def external_cache_policy_get_iter(*args):
api_call = _invoke_api('external-cache-policy-get-iter', *args)
return api_call
def external_cache_policy_modify(*args):
api_call = _invoke_api('external-cache-policy-modify', *args)
return api_call
def external_cache_policy_modify_iter(*args):
api_call = _invoke_api('external-cache-policy-modify-iter', *args)
return api_call
def fc_config_adapter_disable(*args):
api_call = _invoke_api('fc-config-adapter-disable', *args)
return api_call
def fc_config_adapter_enable(*args):
api_call = _invoke_api('fc-config-adapter-enable', *args)
return api_call
def fc_config_list_info(*args):
api_call = _invoke_api('fc-config-list-info', *args)
return api_call
def fc_config_set_adapter_fc_type(*args):
api_call = _invoke_api('fc-config-set-adapter-fc-type', *args)
return api_call
def fcp_adapter_config_down(*args):
api_call = _invoke_api('fcp-adapter-config-down', *args)
return api_call
def fcp_adapter_config_up(*args):
api_call = _invoke_api('fcp-adapter-config-up', *args)
return api_call
def fcp_adapter_get_iter(*args):
api_call = _invoke_api('fcp-adapter-get-iter', *args)
return api_call
def fcp_adapter_set_speed(*args):
api_call = _invoke_api('fcp-adapter-set-speed', *args)
return api_call
def fcp_adapter_stats_get_iter(*args):
api_call = _invoke_api('fcp-adapter-stats-get-iter', *args)
return api_call
def fcp_initiator_get_iter(*args):
api_call = _invoke_api('fcp-initiator-get-iter', *args)
return api_call
def fcp_interface_get_iter(*args):
api_call = _invoke_api('fcp-interface-get-iter', *args)
return api_call
def fcp_port_name_get_iter(*args):
api_call = _invoke_api('fcp-port-name-get-iter', *args)
return api_call
def fcp_service_get_iter(*args):
api_call = _invoke_api('fcp-service-get-iter', *args)
return api_call
def fcp_wwpnalias_get_iter(*args):
api_call = _invoke_api('fcp-wwpnalias-get-iter', *args)
return api_call
def fcport_get_link_state(*args):
api_call = _invoke_api('fcport-get-link-state', *args)
return api_call
def feature_status_list_info(*args):
api_call = _invoke_api('feature-status-list-info', *args)
return api_call
def feature_usage_get_iter(*args):
api_call = _invoke_api('feature-usage-get-iter', *args)
return api_call
def feature_usage_summary_get_iter(*args):
api_call = _invoke_api('feature-usage-summary-get-iter', *args)
return api_call
def file_assign_qos(*args):
api_call = _invoke_api('file-assign-qos', *args)
return api_call
def file_copy_destroy(*args):
api_call = _invoke_api('file-copy-destroy', *args)
return api_call
def file_copy_get_iter(*args):
api_call = _invoke_api('file-copy-get-iter', *args)
return api_call
def file_copy_start(*args):
api_call = _invoke_api('file-copy-start', *args)
return api_call
def file_directory_security_ntfs_dacl_get_iter(*args):
api_call = _invoke_api('file-directory-security-ntfs-dacl-get-iter', *args)
return api_call
def file_directory_security_ntfs_get_iter(*args):
api_call = _invoke_api('file-directory-security-ntfs-get-iter', *args)
return api_call
def file_directory_security_ntfs_sacl_get_iter(*args):
api_call = _invoke_api('file-directory-security-ntfs-sacl-get-iter', *args)
return api_call
def file_directory_security_policy_get_iter(*args):
api_call = _invoke_api('file-directory-security-policy-get-iter', *args)
return api_call
def file_directory_security_policy_task_get_iter(*args):
api_call = _invoke_api('file-directory-security-policy-task-get-iter', *args)
return api_call
def file_move_destroy(*args):
api_call = _invoke_api('file-move-destroy', *args)
return api_call
def file_move_get_iter(*args):
api_call = _invoke_api('file-move-get-iter', *args)
return api_call
def file_move_start(*args):
api_call = _invoke_api('file-move-start', *args)
return api_call
def fileservice_audit_config_get_iter(*args):
api_call = _invoke_api('fileservice-audit-config-get-iter', *args)
return api_call
def fileservice_audit_config_get_total_records(*args):
api_call = _invoke_api('fileservice-audit-config-get-total-records', *args)
return api_call
def flash_device_get_iter(*args):
api_call = _invoke_api('flash-device-get-iter', *args)
return api_call
def flash_device_list_info(*args):
api_call = _invoke_api('flash-device-list-info', *args)
return api_call
def flash_get_thresholds(*args):
api_call = _invoke_api('flash-get-thresholds', *args)
return api_call
def flash_thresholds_get_iter(*args):
api_call = _invoke_api('flash-thresholds-get-iter', *args)
return api_call
def flexcache_cache_policy_create(*args):
api_call = _invoke_api('flexcache-cache-policy-create', *args)
return api_call
def flexcache_cache_policy_destroy(*args):
api_call = _invoke_api('flexcache-cache-policy-destroy', *args)
return api_call
def flexcache_cache_policy_get(*args):
api_call = _invoke_api('flexcache-cache-policy-get', *args)
return api_call
def flexcache_cache_policy_get_iter(*args):
api_call = _invoke_api('flexcache-cache-policy-get-iter', *args)
return api_call
def flexcache_cache_policy_modify(*args):
api_call = _invoke_api('flexcache-cache-policy-modify', *args)
return api_call
def flexcache_create(*args):
api_call = _invoke_api('flexcache-create', *args)
return api_call
def flexcache_delete(*args):
api_call = _invoke_api('flexcache-delete', *args)
return api_call
def flexcache_get_iter(*args):
api_call = _invoke_api('flexcache-get-iter', *args)
return api_call
def fpolicy_passthrough_read_connection_get_iter(*args):
api_call = _invoke_api('fpolicy-passthrough-read-connection-get-iter', *args)
return api_call
def fpolicy_policy_event_get_iter(*args):
api_call = _invoke_api('fpolicy-policy-event-get-iter', *args)
return api_call
def fpolicy_policy_external_engine_get_iter(*args):
api_call = _invoke_api('fpolicy-policy-external-engine-get-iter', *args)
return api_call
def fpolicy_policy_get_iter(*args):
api_call = _invoke_api('fpolicy-policy-get-iter', *args)
return api_call
def fpolicy_policy_scope_get_iter(*args):
api_call = _invoke_api('fpolicy-policy-scope-get-iter', *args)
return api_call
def fpolicy_policy_status_get_iter(*args):
api_call = _invoke_api('fpolicy-policy-status-get-iter', *args)
return api_call
def fpolicy_server_status_get_iter(*args):
api_call = _invoke_api('fpolicy-server-status-get-iter', *args)
return api_call
def gpo_applied_info_get_iter(*args):
api_call = _invoke_api('gpo-applied-info-get-iter', *args)
return api_call
def gpo_get_iter(*args):
api_call = _invoke_api('gpo-get-iter', *args)
return api_call
def gpo_gpresult_info_get_iter(*args):
api_call = _invoke_api('gpo-gpresult-info-get-iter', *args)
return api_call
def gpo_restricted_group_applied_info_get_iter(*args):
api_call = _invoke_api('gpo-restricted-group-applied-info-get-iter', *args)
return api_call
def gpo_restricted_group_defined_info_get_iter(*args):
api_call = _invoke_api('gpo-restricted-group-defined-info-get-iter', *args)
return api_call
def group_mapping_get_iter(*args):
api_call = _invoke_api('group-mapping-get-iter', *args)
return api_call
def igroup_disable_aix_support(*args):
api_call = _invoke_api('igroup-disable-aix-support', *args)
return api_call
def igroup_get_iter(*args):
api_call = _invoke_api('igroup-get-iter', *args)
return api_call
def igroup_os_type_list(*args):
api_call = _invoke_api('igroup-os-type-list', *args)
return api_call
def interim_license_list_get(*args):
api_call = _invoke_api('interim-license-list-get', *args)
return api_call
def interim_license_remove(*args):
api_call = _invoke_api('interim-license-remove', *args)
return api_call
def interim_license_set(*args):
api_call = _invoke_api('interim-license-set', *args)
return api_call
def iscsi_connection_get_iter(*args):
api_call = _invoke_api('iscsi-connection-get-iter', *args)
return api_call
def iscsi_initiator_auth_get_iter(*args):
api_call = _invoke_api('iscsi-initiator-auth-get-iter', *args)
return api_call
def iscsi_initiator_get_iter(*args):
api_call = _invoke_api('iscsi-initiator-get-iter', *args)
return api_call
def iscsi_interface_accesslist_get_iter(*args):
api_call = _invoke_api('iscsi-interface-accesslist-get-iter', *args)
return api_call
def iscsi_interface_get_iter(*args):
api_call = _invoke_api('iscsi-interface-get-iter', *args)
return api_call
def iscsi_isns_get_iter(*args):
api_call = _invoke_api('iscsi-isns-get-iter', *args)
return api_call
def iscsi_service_get_iter(*args):
api_call = _invoke_api('iscsi-service-get-iter', *args)
return api_call
def iscsi_session_get_iter(*args):
api_call = _invoke_api('iscsi-session-get-iter', *args)
return api_call
def iscsi_stats_get_iter(*args):
api_call = _invoke_api('iscsi-stats-get-iter', *args)
return api_call
def iscsi_tpgroup_get_iter(*args):
api_call = _invoke_api('iscsi-tpgroup-get-iter', *args)
return api_call
def job_bad_erase(*args):
api_call = _invoke_api('job-bad-erase', *args)
return api_call
def job_bad_get_iter(*args):
api_call = _invoke_api('job-bad-get-iter', *args)
return api_call
def job_by_node_get_iter(*args):
api_call = _invoke_api('job-by-node-get-iter', *args)
return api_call
def job_completed_get_iter(*args):
api_call = _invoke_api('job-completed-get-iter', *args)
return api_call
def job_delete_iter(*args):
api_call = _invoke_api('job-delete-iter', *args)
return api_call
def job_expunge_iter(*args):
api_call = _invoke_api('job-expunge-iter', *args)
return api_call
def job_get_iter(*args):
api_call = _invoke_api('job-get-iter', *args)
return api_call
def job_history_get_iter(*args):
api_call = _invoke_api('job-history-get-iter', *args)
return api_call
def job_init_state_get(*args):
api_call = _invoke_api('job-init-state-get', *args)
return api_call
def job_init_state_get_iter(*args):
api_call = _invoke_api('job-init-state-get-iter', *args)
return api_call
def job_kick(*args):
api_call = _invoke_api('job-kick', *args)
return api_call
def job_pause_iter(*args):
api_call = _invoke_api('job-pause-iter', *args)
return api_call
def job_private_completed_get_iter(*args):
api_call = _invoke_api('job-private-completed-get-iter', *args)
return api_call
def job_private_delete_iter(*args):
api_call = _invoke_api('job-private-delete-iter', *args)
return api_call
def job_private_get_iter(*args):
api_call = _invoke_api('job-private-get-iter', *args)
return api_call
def job_private_pause_iter(*args):
api_call = _invoke_api('job-private-pause-iter', *args)
return api_call
def job_private_resume_iter(*args):
api_call = _invoke_api('job-private-resume-iter', *args)
return api_call
def job_private_soft_pause_iter(*args):
api_call = _invoke_api('job-private-soft-pause-iter', *args)
return api_call
def job_private_stop_iter(*args):
api_call = _invoke_api('job-private-stop-iter', *args)
return api_call
def job_queue_get(*args):
api_call = _invoke_api('job-queue-get', *args)
return api_call
def job_queue_get_iter(*args):
api_call = _invoke_api('job-queue-get-iter', *args)
return api_call
def job_resume_iter(*args):
api_call = _invoke_api('job-resume-iter', *args)
return api_call
def job_schedule_consumer_get(*args):
api_call = _invoke_api('job-schedule-consumer-get', *args)
return api_call
def job_schedule_consumer_get_iter(*args):
api_call = _invoke_api('job-schedule-consumer-get-iter', *args)
return api_call
def job_schedule_cron_create(*args):
api_call = _invoke_api('job-schedule-cron-create', *args)
return api_call
def job_schedule_cron_destroy(*args):
api_call = _invoke_api('job-schedule-cron-destroy', *args)
return api_call
def job_schedule_cron_destroy_iter(*args):
api_call = _invoke_api('job-schedule-cron-destroy-iter', *args)
return api_call
def job_schedule_cron_get(*args):
api_call = _invoke_api('job-schedule-cron-get', *args)
return api_call
def job_schedule_cron_get_iter(*args):
api_call = _invoke_api('job-schedule-cron-get-iter', *args)
return api_call
def job_schedule_cron_modify(*args):
api_call = _invoke_api('job-schedule-cron-modify', *args)
return api_call
def job_schedule_get(*args):
api_call = _invoke_api('job-schedule-get', *args)
return api_call
def job_schedule_get_iter(*args):
api_call = _invoke_api('job-schedule-get-iter', *args)
return api_call
def job_schedule_interval_create(*args):
api_call = _invoke_api('job-schedule-interval-create', *args)
return api_call
def job_schedule_interval_destroy(*args):
api_call = _invoke_api('job-schedule-interval-destroy', *args)
return api_call
def job_schedule_interval_destroy_iter(*args):
api_call = _invoke_api('job-schedule-interval-destroy-iter', *args)
return api_call
def job_schedule_interval_get(*args):
api_call = _invoke_api('job-schedule-interval-get', *args)
return api_call
def job_schedule_interval_get_iter(*args):
api_call = _invoke_api('job-schedule-interval-get-iter', *args)
return api_call
def job_schedule_interval_modify(*args):
api_call = _invoke_api('job-schedule-interval-modify', *args)
return api_call
def job_soft_pause_iter(*args):
api_call = _invoke_api('job-soft-pause-iter', *args)
return api_call
def job_stop_iter(*args):
api_call = _invoke_api('job-stop-iter', *args)
return api_call
def job_type_by_category_get(*args):
api_call = _invoke_api('job-type-by-category-get', *args)
return api_call
def job_type_by_category_get_iter(*args):
api_call = _invoke_api('job-type-by-category-get-iter', *args)
return api_call
def job_type_get(*args):
api_call = _invoke_api('job-type-get', *args)
return api_call
def job_type_get_iter(*args):
api_call = _invoke_api('job-type-get-iter', *args)
return api_call
def job_unclaim_iter(*args):
api_call = _invoke_api('job-unclaim-iter', *args)
return api_call
def kerberos_config_get_iter(*args):
api_call = _invoke_api('kerberos-config-get-iter', *args)
return api_call
def kerberos_realm_create(*args):
api_call = _invoke_api('kerberos-realm-create', *args)
return api_call
def kerberos_realm_delete(*args):
api_call = _invoke_api('kerberos-realm-delete', *args)
return api_call
def kerberos_realm_get_iter(*args):
api_call = _invoke_api('kerberos-realm-get-iter', *args)
return api_call
def kerberos_realm_modify(*args):
api_call = _invoke_api('kerberos-realm-modify', *args)
return api_call
def ldap_client_get_iter(*args):
api_call = _invoke_api('ldap-client-get-iter', *args)
return api_call
def ldap_client_schema_get_iter(*args):
api_call = _invoke_api('ldap-client-schema-get-iter', *args)
return api_call
def ldap_config_get_iter(*args):
api_call = _invoke_api('ldap-config-get-iter', *args)
return api_call
def license_v2_add(*args):
api_call = _invoke_api('license-v2-add', *args)
return api_call
def license_v2_cleanup_list_info(*args):
api_call = _invoke_api('license-v2-cleanup-list-info', *args)
return api_call
def license_v2_delete(*args):
api_call = _invoke_api('license-v2-delete', *args)
return api_call
def license_v2_delete_expired(*args):
api_call = _invoke_api('license-v2-delete-expired', *args)
return api_call
def license_v2_delete_unused(*args):
api_call = _invoke_api('license-v2-delete-unused', *args)
return api_call
def license_v2_entitlement_risk_get_iter(*args):
api_call = _invoke_api('license-v2-entitlement-risk-get-iter', *args)
return api_call
def license_v2_list_info(*args):
api_call = _invoke_api('license-v2-list-info', *args)
return api_call
def license_v2_status_list_info(*args):
api_call = _invoke_api('license-v2-status-list-info', *args)
return api_call
def lock_break_iter(*args):
api_call = _invoke_api('lock-break-iter', *args)
return api_call
def lock_get_iter(*args):
api_call = _invoke_api('lock-get-iter', *args)
return api_call
def lun_alignment_get_iter(*args):
api_call = _invoke_api('lun-alignment-get-iter', *args)
return api_call
def lun_bind_get_iter(*args):
api_call = _invoke_api('lun-bind-get-iter', *args)
return api_call
def lun_copy_cancel(*args):
api_call = _invoke_api('lun-copy-cancel', *args)
return api_call
def lun_copy_get_iter(*args):
api_call = _invoke_api('lun-copy-get-iter', *args)
return api_call
def lun_copy_modify(*args):
api_call = _invoke_api('lun-copy-modify', *args)
return api_call
def lun_copy_pause(*args):
api_call = _invoke_api('lun-copy-pause', *args)
return api_call
def lun_copy_resume(*args):
api_call = _invoke_api('lun-copy-resume', *args)
return api_call
def lun_copy_start(*args):
api_call = _invoke_api('lun-copy-start', *args)
return api_call
def lun_debug_get(*args):
api_call = _invoke_api('lun-debug-get', *args)
return api_call
def lun_get_iter(*args):
api_call = _invoke_api('lun-get-iter', *args)
return api_call
def lun_get_vdisk_attributes(*args):
api_call = _invoke_api('lun-get-vdisk-attributes', *args)
return api_call
def lun_group_internal_rebuild(*args):
api_call = _invoke_api('lun-group-internal-rebuild', *args)
return api_call
def lun_import_create(*args):
api_call = _invoke_api('lun-import-create', *args)
return api_call
def lun_import_delete(*args):
api_call = _invoke_api('lun-import-delete', *args)
return api_call
def lun_import_get_iter(*args):
api_call = _invoke_api('lun-import-get-iter', *args)
return api_call
def lun_import_pause(*args):
api_call = _invoke_api('lun-import-pause', *args)
return api_call
def lun_import_resume(*args):
api_call = _invoke_api('lun-import-resume', *args)
return api_call
def lun_import_start(*args):
api_call = _invoke_api('lun-import-start', *args)
return api_call
def lun_import_stop(*args):
api_call = _invoke_api('lun-import-stop', *args)
return api_call
def lun_import_throttle(*args):
api_call = _invoke_api('lun-import-throttle', *args)
return api_call
def lun_import_verify_start(*args):
api_call = _invoke_api('lun-import-verify-start', *args)
return api_call
def lun_import_verify_stop(*args):
api_call = _invoke_api('lun-import-verify-stop', *args)
return api_call
def lun_initiator_list_map_info(*args):
api_call = _invoke_api('lun-initiator-list-map-info', *args)
return api_call
def lun_map_get_iter(*args):
api_call = _invoke_api('lun-map-get-iter', *args)
return api_call
def lun_move_get_iter(*args):
api_call = _invoke_api('lun-move-get-iter', *args)
return api_call
def lun_os_type_list(*args):
api_call = _invoke_api('lun-os-type-list', *args)
return api_call
def lun_prepare_to_downgrade(*args):
api_call = _invoke_api('lun-prepare-to-downgrade', *args)
return api_call
def lun_stats_get_iter(*args):
api_call = _invoke_api('lun-stats-get-iter', *args)
return api_call
def lun_test_vdisk_size(*args):
api_call = _invoke_api('lun-test-vdisk-size', *args)
return api_call
def lun_transition_7mode_destroy(*args):
api_call = _invoke_api('lun-transition-7mode-destroy', *args)
return api_call
def lun_transition_7mode_get_iter(*args):
api_call = _invoke_api('lun-transition-7mode-get-iter', *args)
return api_call
def lun_transition_start(*args):
api_call = _invoke_api('lun-transition-start', *args)
return api_call
def lun_transition_volume_get_iter(*args):
api_call = _invoke_api('lun-transition-volume-get-iter', *args)
return api_call
def memoryperf_run(*args):
api_call = _invoke_api('memoryperf-run', *args)
return api_call
def method_for_key_optionality_default(*args):
api_call = _invoke_api('method-for-key-optionality-default', *args)
return api_call
def metrocluster_check_aggregate_eligibility_get(*args):
api_call = _invoke_api('metrocluster-check-aggregate-eligibility-get', *args)
return api_call
def metrocluster_check_aggregate_eligibility_get_iter(*args):
api_call = _invoke_api('metrocluster-check-aggregate-eligibility-get-iter', *args)
return api_call
def metrocluster_check_aggregate_get_iter(*args):
api_call = _invoke_api('metrocluster-check-aggregate-get-iter', *args)
return api_call
def metrocluster_check_capture_status_get(*args):
api_call = _invoke_api('metrocluster-check-capture-status-get', *args)
return api_call
def metrocluster_check_cluster_get_iter(*args):
api_call = _invoke_api('metrocluster-check-cluster-get-iter', *args)
return api_call
def metrocluster_check_config_replication_get(*args):
api_call = _invoke_api('metrocluster-check-config-replication-get', *args)
return api_call
def metrocluster_check_get_iter(*args):
api_call = _invoke_api('metrocluster-check-get-iter', *args)
return api_call
def metrocluster_check_lif_repair_placement(*args):
api_call = _invoke_api('metrocluster-check-lif-repair-placement', *args)
return api_call
def metrocluster_check_node_get_iter(*args):
api_call = _invoke_api('metrocluster-check-node-get-iter', *args)
return api_call
def metrocluster_check_run(*args):
api_call = _invoke_api('metrocluster-check-run', *args)
return api_call
def metrocluster_config_diff_get(*args):
api_call = _invoke_api('metrocluster-config-diff-get', *args)
return api_call
def metrocluster_config_diff_get_iter(*args):
api_call = _invoke_api('metrocluster-config-diff-get-iter', *args)
return api_call
def metrocluster_config_replication_cluster_storage_configuration_get(*args):
api_call = _invoke_api('metrocluster-config-replication-cluster-storage-configuration-get', *args)
return api_call
def metrocluster_config_replication_cluster_storage_configuration_modify(*args):
api_call = _invoke_api('metrocluster-config-replication-cluster-storage-configuration-modify', *args)
return api_call
def metrocluster_config_replication_resync_status_get(*args):
api_call = _invoke_api('metrocluster-config-replication-resync-status-get', *args)
return api_call
def metrocluster_configure(*args):
api_call = _invoke_api('metrocluster-configure', *args)
return api_call
def metrocluster_disable(*args):
api_call = _invoke_api('metrocluster-disable', *args)
return api_call
def metrocluster_get(*args):
api_call = _invoke_api('metrocluster-get', *args)
return api_call
def metrocluster_heal(*args):
api_call = _invoke_api('metrocluster-heal', *args)
return api_call
def metrocluster_interconnect_adapter_auto_reset_on_error_modify(*args):
api_call = _invoke_api('metrocluster-interconnect-adapter-auto-reset-on-error-modify', *args)
return api_call
def metrocluster_interconnect_adapter_get_iter(*args):
api_call = _invoke_api('metrocluster-interconnect-adapter-get-iter', *args)
return api_call
def metrocluster_interconnect_adapter_modify(*args):
api_call = _invoke_api('metrocluster-interconnect-adapter-modify', *args)
return api_call
def metrocluster_interconnect_adapter_reset(*args):
api_call = _invoke_api('metrocluster-interconnect-adapter-reset', *args)
return api_call
def metrocluster_interconnect_mirror_get_iter(*args):
api_call = _invoke_api('metrocluster-interconnect-mirror-get-iter', *args)
return api_call
def metrocluster_interconnect_mirror_modify(*args):
api_call = _invoke_api('metrocluster-interconnect-mirror-modify', *args)
return api_call
def metrocluster_interconnect_mirror_multipath_get_iter(*args):
api_call = _invoke_api('metrocluster-interconnect-mirror-multipath-get-iter', *args)
return api_call
def metrocluster_is_configured(*args):
api_call = _invoke_api('metrocluster-is-configured', *args)
return api_call
def metrocluster_node_get_iter(*args):
api_call = _invoke_api('metrocluster-node-get-iter', *args)
return api_call
def metrocluster_operation_get_iter(*args):
api_call = _invoke_api('metrocluster-operation-get-iter', *args)
return api_call
def metrocluster_progress_table_get_iter(*args):
api_call = _invoke_api('metrocluster-progress-table-get-iter', *args)
return api_call
def metrocluster_show_lif_placement_failures_get_iter(*args):
api_call = _invoke_api('metrocluster-show-lif-placement-failures-get-iter', *args)
return api_call
def metrocluster_switchback(*args):
api_call = _invoke_api('metrocluster-switchback', *args)
return api_call
def metrocluster_switchover(*args):
api_call = _invoke_api('metrocluster-switchover', *args)
return api_call
def metrocluster_tracelog_dump(*args):
api_call = _invoke_api('metrocluster-tracelog-dump', *args)
return api_call
def metrocluster_unconfigure(*args):
api_call = _invoke_api('metrocluster-unconfigure', *args)
return api_call
def metrocluster_vserver_get_iter(*args):
api_call = _invoke_api('metrocluster-vserver-get-iter', *args)
return api_call
def metrocluster_vserver_resync(*args):
api_call = _invoke_api('metrocluster-vserver-resync', *args)
return api_call
def name_mapping_get_iter(*args):
api_call = _invoke_api('name-mapping-get-iter', *args)
return api_call
def name_mapping_unix_group_get_iter(*args):
api_call = _invoke_api('name-mapping-unix-group-get-iter', *args)
return api_call
def name_mapping_unix_user_get_iter(*args):
api_call = _invoke_api('name-mapping-unix-user-get-iter', *args)
return api_call
def name_service_dns_statistics_get_iter(*args):
api_call = _invoke_api('name-service-dns-statistics-get-iter', *args)
return api_call
def name_service_nis_binding_detail_get_iter(*args):
api_call = _invoke_api('name-service-nis-binding-detail-get-iter', *args)
return api_call
def name_service_nis_show_bound_iter(*args):
api_call = _invoke_api('name-service-nis-show-bound-iter', *args)
return api_call
def name_service_nis_statistics_get_iter(*args):
api_call = _invoke_api('name-service-nis-statistics-get-iter', *args)
return api_call
def name_service_unix_group_limits_get(*args):
api_call = _invoke_api('name-service-unix-group-limits-get', *args)
return api_call
def name_service_unix_user_limits_get(*args):
api_call = _invoke_api('name-service-unix-user-limits-get', *args)
return api_call
def nameservice_dns_statistics_clear(*args):
api_call = _invoke_api('nameservice-dns-statistics-clear', *args)
return api_call
def nameservice_get_hostname_from_ipv4(*args):
api_call = _invoke_api('nameservice-get-hostname-from-ipv4', *args)
return api_call
def nameservice_get_ip_from_hostname(*args):
api_call = _invoke_api('nameservice-get-ip-from-hostname', *args)
return api_call
def nameservice_get_ipv4_from_hostname(*args):
api_call = _invoke_api('nameservice-get-ipv4-from-hostname', *args)
return api_call
def nameservice_nis_statistics_clear(*args):
api_call = _invoke_api('nameservice-nis-statistics-clear', *args)
return api_call
def nameservice_nsswitch_get_iter(*args):
api_call = _invoke_api('nameservice-nsswitch-get-iter', *args)
return api_call
def net_active_routes_get_iter(*args):
api_call = _invoke_api('net-active-routes-get-iter', *args)
return api_call
def net_arp_active_entry_destroy(*args):
api_call = _invoke_api('net-arp-active-entry-destroy', *args)
return api_call
def net_arp_active_entry_get(*args):
api_call = _invoke_api('net-arp-active-entry-get', *args)
return api_call
def net_arp_active_entry_get_iter(*args):
api_call = _invoke_api('net-arp-active-entry-get-iter', *args)
return api_call
def net_arp_create(*args):
api_call = _invoke_api('net-arp-create', *args)
return api_call
def net_arp_destroy(*args):
api_call = _invoke_api('net-arp-destroy', *args)
return api_call
def net_arp_get(*args):
api_call = _invoke_api('net-arp-get', *args)
return api_call
def net_arp_get_iter(*args):
api_call = _invoke_api('net-arp-get-iter', *args)
return api_call
def net_check_failover(*args):
api_call = _invoke_api('net-check-failover', *args)
return api_call
def net_cluster_ping(*args):
api_call = _invoke_api('net-cluster-ping', *args)
return api_call
def net_cluster_ping6(*args):
api_call = _invoke_api('net-cluster-ping6', *args)
return api_call
def net_connections_receive_window_size_get(*args):
api_call = _invoke_api('net-connections-receive-window-size-get', *args)
return api_call
def net_connections_receive_window_size_get_iter(*args):
api_call = _invoke_api('net-connections-receive-window-size-get-iter', *args)
return api_call
def net_connections_receive_window_size_modify(*args):
api_call = _invoke_api('net-connections-receive-window-size-modify', *args)
return api_call
def net_ddns_get_iter(*args):
api_call = _invoke_api('net-ddns-get-iter', *args)
return api_call
def net_device_discovery_get_iter(*args):
api_call = _invoke_api('net-device-discovery-get-iter', *args)
return api_call
def net_disable_readonly(*args):
api_call = _invoke_api('net-disable-readonly', *args)
return api_call
def net_dns_get_iter(*args):
api_call = _invoke_api('net-dns-get-iter', *args)
return api_call
def net_enable_readonly(*args):
api_call = _invoke_api('net-enable-readonly', *args)
return api_call
def net_failover_group_add_targets(*args):
api_call = _invoke_api('net-failover-group-add-targets', *args)
return api_call
def net_failover_group_create(*args):
api_call = _invoke_api('net-failover-group-create', *args)
return api_call
def net_failover_group_destroy(*args):
api_call = _invoke_api('net-failover-group-destroy', *args)
return api_call
def net_failover_group_get_iter(*args):
api_call = _invoke_api('net-failover-group-get-iter', *args)
return api_call
def net_failover_group_modify(*args):
api_call = _invoke_api('net-failover-group-modify', *args)
return api_call
def net_failover_group_remove_targets(*args):
api_call = _invoke_api('net-failover-group-remove-targets', *args)
return api_call
def net_failover_group_rename(*args):
api_call = _invoke_api('net-failover-group-rename', *args)
return api_call
def net_firewall_config_get(*args):
api_call = _invoke_api('net-firewall-config-get', *args)
return api_call
def net_firewall_config_get_iter(*args):
api_call = _invoke_api('net-firewall-config-get-iter', *args)
return api_call
def net_firewall_config_modify(*args):
api_call = _invoke_api('net-firewall-config-modify', *args)
return api_call
def net_firewall_config_modify_iter(*args):
api_call = _invoke_api('net-firewall-config-modify-iter', *args)
return api_call
def net_firewall_policy_create(*args):
api_call = _invoke_api('net-firewall-policy-create', *args)
return api_call
def net_firewall_policy_destroy(*args):
api_call = _invoke_api('net-firewall-policy-destroy', *args)
return api_call
def net_firewall_policy_get_iter(*args):
api_call = _invoke_api('net-firewall-policy-get-iter', *args)
return api_call
def net_firewall_policy_modify(*args):
api_call = _invoke_api('net-firewall-policy-modify', *args)
return api_call
def net_hosts_get_iter(*args):
api_call = _invoke_api('net-hosts-get-iter', *args)
return api_call
def net_interface_create(*args):
api_call = _invoke_api('net-interface-create', *args)
return api_call
def net_interface_delete(*args):
api_call = _invoke_api('net-interface-delete', *args)
return api_call
def net_interface_get_iter(*args):
api_call = _invoke_api('net-interface-get-iter', *args)
return api_call
def net_interface_migrate(*args):
api_call = _invoke_api('net-interface-migrate', *args)
return api_call
def net_interface_modify(*args):
api_call = _invoke_api('net-interface-modify', *args)
return api_call
def net_interface_modify_iter(*args):
api_call = _invoke_api('net-interface-modify-iter', *args)
return api_call
def net_interface_revert(*args):
api_call = _invoke_api('net-interface-revert', *args)
return api_call
def net_ipspaces_assign_vserver(*args):
api_call = _invoke_api('net-ipspaces-assign-vserver', *args)
return api_call
def net_ipspaces_create(*args):
api_call = _invoke_api('net-ipspaces-create', *args)
return api_call
def net_ipspaces_destroy(*args):
api_call = _invoke_api('net-ipspaces-destroy', *args)
return api_call
def net_ipspaces_get(*args):
api_call = _invoke_api('net-ipspaces-get', *args)
return api_call
def net_ipspaces_get_iter(*args):
api_call = _invoke_api('net-ipspaces-get-iter', *args)
return api_call
def net_ipspaces_rename(*args):
api_call = _invoke_api('net-ipspaces-rename', *args)
return api_call
def net_ndp_active_neighbor_destroy(*args):
api_call = _invoke_api('net-ndp-active-neighbor-destroy', *args)
return api_call
def net_ndp_active_neighbor_get(*args):
api_call = _invoke_api('net-ndp-active-neighbor-get', *args)
return api_call
def net_ndp_active_neighbor_get_iter(*args):
api_call = _invoke_api('net-ndp-active-neighbor-get-iter', *args)
return api_call
def net_ndp_default_router_delete_all(*args):
api_call = _invoke_api('net-ndp-default-router-delete-all', *args)
return api_call
def net_ndp_default_router_get(*args):
api_call = _invoke_api('net-ndp-default-router-get', *args)
return api_call
def net_ndp_default_router_get_iter(*args):
api_call = _invoke_api('net-ndp-default-router-get-iter', *args)
return api_call
def net_ndp_neighbor_get_iter(*args):
api_call = _invoke_api('net-ndp-neighbor-get-iter', *args)
return api_call
def net_ndp_prefix_delete_all(*args):
api_call = _invoke_api('net-ndp-prefix-delete-all', *args)
return api_call
def net_ndp_prefix_get(*args):
api_call = _invoke_api('net-ndp-prefix-get', *args)
return api_call
def net_ndp_prefix_get_iter(*args):
api_call = _invoke_api('net-ndp-prefix-get-iter', *args)
return api_call
def net_options_get(*args):
api_call = _invoke_api('net-options-get', *args)
return api_call
def net_options_modify(*args):
api_call = _invoke_api('net-options-modify', *args)
return api_call
def net_placement_cache_delete(*args):
api_call = _invoke_api('net-placement-cache-delete', *args)
return api_call
def net_placement_cache_get_iter(*args):
api_call = _invoke_api('net-placement-cache-get-iter', *args)
return api_call
def net_placement_discover(*args):
api_call = _invoke_api('net-placement-discover', *args)
return api_call
def net_port_broadcast_domain_add_ports(*args):
api_call = _invoke_api('net-port-broadcast-domain-add-ports', *args)
return api_call
def net_port_broadcast_domain_create(*args):
api_call = _invoke_api('net-port-broadcast-domain-create', *args)
return api_call
def net_port_broadcast_domain_destroy(*args):
api_call = _invoke_api('net-port-broadcast-domain-destroy', *args)
return api_call
def net_port_broadcast_domain_get(*args):
api_call = _invoke_api('net-port-broadcast-domain-get', *args)
return api_call
def net_port_broadcast_domain_get_iter(*args):
api_call = _invoke_api('net-port-broadcast-domain-get-iter', *args)
return api_call
def net_port_broadcast_domain_merge(*args):
api_call = _invoke_api('net-port-broadcast-domain-merge', *args)
return api_call
def net_port_broadcast_domain_modify(*args):
api_call = _invoke_api('net-port-broadcast-domain-modify', *args)
return api_call
def net_port_broadcast_domain_remove_ports(*args):
api_call = _invoke_api('net-port-broadcast-domain-remove-ports', *args)
return api_call
def net_port_broadcast_domain_rename(*args):
api_call = _invoke_api('net-port-broadcast-domain-rename', *args)
return api_call
def net_port_broadcast_domain_split(*args):
api_call = _invoke_api('net-port-broadcast-domain-split', *args)
return api_call
def net_port_delete(*args):
api_call = _invoke_api('net-port-delete', *args)
return api_call
def net_port_get(*args):
api_call = _invoke_api('net-port-get', *args)
return api_call
def net_port_get_iter(*args):
api_call = _invoke_api('net-port-get-iter', *args)
return api_call
def net_port_ifgrp_add_port(*args):
api_call = _invoke_api('net-port-ifgrp-add-port', *args)
return api_call
def net_port_ifgrp_create(*args):
api_call = _invoke_api('net-port-ifgrp-create', *args)
return api_call
def net_port_ifgrp_destroy(*args):
api_call = _invoke_api('net-port-ifgrp-destroy', *args)
return api_call
def net_port_ifgrp_get(*args):
api_call = _invoke_api('net-port-ifgrp-get', *args)
return api_call
def net_port_ifgrp_remove_port(*args):
api_call = _invoke_api('net-port-ifgrp-remove-port', *args)
return api_call
def net_port_modify(*args):
api_call = _invoke_api('net-port-modify', *args)
return api_call
def net_port_modify_iter(*args):
api_call = _invoke_api('net-port-modify-iter', *args)
return api_call
def net_routes_get_iter(*args):
api_call = _invoke_api('net-routes-get-iter', *args)
return api_call
def net_routes_lifs_get_iter(*args):
api_call = _invoke_api('net-routes-lifs-get-iter', *args)
return api_call
def net_routing_group_route_create(*args):
api_call = _invoke_api('net-routing-group-route-create', *args)
return api_call
def net_routing_group_route_destroy(*args):
api_call = _invoke_api('net-routing-group-route-destroy', *args)
return api_call
def net_routing_group_route_get_iter(*args):
api_call = _invoke_api('net-routing-group-route-get-iter', *args)
return api_call
def net_san_lif_placement_get(*args):
api_call = _invoke_api('net-san-lif-placement-get', *args)
return api_call
def net_subnet_add_ranges(*args):
api_call = _invoke_api('net-subnet-add-ranges', *args)
return api_call
def net_subnet_create(*args):
api_call = _invoke_api('net-subnet-create', *args)
return api_call
def net_subnet_destroy(*args):
api_call = _invoke_api('net-subnet-destroy', *args)
return api_call
def net_subnet_get(*args):
api_call = _invoke_api('net-subnet-get', *args)
return api_call
def net_subnet_get_iter(*args):
api_call = _invoke_api('net-subnet-get-iter', *args)
return api_call
def net_subnet_modify(*args):
api_call = _invoke_api('net-subnet-modify', *args)
return api_call
def net_subnet_remove_ranges(*args):
api_call = _invoke_api('net-subnet-remove-ranges', *args)
return api_call
def net_subnet_rename(*args):
api_call = _invoke_api('net-subnet-rename', *args)
return api_call
def net_traceroute6(*args):
api_call = _invoke_api('net-traceroute6', *args)
return api_call
def net_vlan_create(*args):
api_call = _invoke_api('net-vlan-create', *args)
return api_call
def net_vlan_delete(*args):
api_call = _invoke_api('net-vlan-delete', *args)
return api_call
def net_vlan_get(*args):
api_call = _invoke_api('net-vlan-get', *args)
return api_call
def net_vlan_get_iter(*args):
api_call = _invoke_api('net-vlan-get-iter', *args)
return api_call
def netgroups_file_delete(*args):
api_call = _invoke_api('netgroups-file-delete', *args)
return api_call
def netgroups_file_get(*args):
api_call = _invoke_api('netgroups-file-get', *args)
return api_call
def netgroups_file_get_iter(*args):
api_call = _invoke_api('netgroups-file-get-iter', *args)
return api_call
def nfs_all_flash_optimized_get(*args):
api_call = _invoke_api('nfs-all-flash-optimized-get', *args)
return api_call
def nfs_all_flash_optimized_get_iter(*args):
api_call = _invoke_api('nfs-all-flash-optimized-get-iter', *args)
return api_call
def nfs_service_get_create_defaults(*args):
api_call = _invoke_api('nfs-service-get-create-defaults', *args)
return api_call
def nfs_service_get_iter(*args):
api_call = _invoke_api('nfs-service-get-iter', *args)
return api_call
def nis_get_iter(*args):
api_call = _invoke_api('nis-get-iter', *args)
return api_call
def ntdtest_action_alt_simpleget(*args):
api_call = _invoke_api('ntdtest-action-alt-simpleget', *args)
return api_call
def ntdtest_action_alt_simpleget_optional(*args):
api_call = _invoke_api('ntdtest-action-alt-simpleget-optional', *args)
return api_call
def ntdtest_action_only_doit(*args):
api_call = _invoke_api('ntdtest-action-only-doit', *args)
return api_call
def ntdtest_action_only_doit_async(*args):
api_call = _invoke_api('ntdtest-action-only-doit-async', *args)
return api_call
def ntdtest_action_only_dothat(*args):
api_call = _invoke_api('ntdtest-action-only-dothat', *args)
return api_call
def ntdtest_action_simpleget(*args):
api_call = _invoke_api('ntdtest-action-simpleget', *args)
return api_call
def ntdtest_action_top_level_create(*args):
api_call = _invoke_api('ntdtest-action-top-level-create', *args)
return api_call
def ntdtest_action_top_level_create_alt(*args):
api_call = _invoke_api('ntdtest-action-top-level-create-alt', *args)
return api_call
def ntdtest_dnested_get(*args):
api_call = _invoke_api('ntdtest-dnested-get', *args)
return api_call
def ntdtest_dnested_get_iter(*args):
api_call = _invoke_api('ntdtest-dnested-get-iter', *args)
return api_call
def ntdtest_empty_tags_get_1(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-1', *args)
return api_call
def ntdtest_empty_tags_get_10(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-10', *args)
return api_call
def ntdtest_empty_tags_get_11(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-11', *args)
return api_call
def ntdtest_empty_tags_get_12(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-12', *args)
return api_call
def ntdtest_empty_tags_get_13(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-13', *args)
return api_call
def ntdtest_empty_tags_get_2(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-2', *args)
return api_call
def ntdtest_empty_tags_get_3(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-3', *args)
return api_call
def ntdtest_empty_tags_get_4(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-4', *args)
return api_call
def ntdtest_empty_tags_get_5(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-5', *args)
return api_call
def ntdtest_empty_tags_get_6(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-6', *args)
return api_call
def ntdtest_empty_tags_get_7(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-7', *args)
return api_call
def ntdtest_empty_tags_get_8(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-8', *args)
return api_call
def ntdtest_empty_tags_get_9(*args):
api_call = _invoke_api('ntdtest-empty-tags-get-9', *args)
return api_call
def ntdtest_extensive_alternate_create_1(*args):
api_call = _invoke_api('ntdtest-extensive-alternate-create-1', *args)
return api_call
def ntdtest_extensive_alternate_create_2(*args):
api_call = _invoke_api('ntdtest-extensive-alternate-create-2', *args)
return api_call
def ntdtest_extensive_alternate_destroy_1(*args):
api_call = _invoke_api('ntdtest-extensive-alternate-destroy-1', *args)
return api_call
def ntdtest_extensive_alternate_get_1(*args):
api_call = _invoke_api('ntdtest-extensive-alternate-get-1', *args)
return api_call
def ntdtest_extensive_alternate_get_2(*args):
api_call = _invoke_api('ntdtest-extensive-alternate-get-2', *args)
return api_call
def ntdtest_extensive_alternate_modify_1(*args):
api_call = _invoke_api('ntdtest-extensive-alternate-modify-1', *args)
return api_call
def ntdtest_extensive_default_create(*args):
api_call = _invoke_api('ntdtest-extensive-default-create', *args)
return api_call
def ntdtest_extensive_default_destroy(*args):
api_call = _invoke_api('ntdtest-extensive-default-destroy', *args)
return api_call
def ntdtest_extensive_default_get(*args):
api_call = _invoke_api('ntdtest-extensive-default-get', *args)
return api_call
def ntdtest_extensive_default_modify(*args):
api_call = _invoke_api('ntdtest-extensive-default-modify', *args)
return api_call
def ntdtest_extensive_destroy_iter(*args):
api_call = _invoke_api('ntdtest-extensive-destroy-iter', *args)
return api_call
def ntdtest_extensive_get_iter(*args):
api_call = _invoke_api('ntdtest-extensive-get-iter', *args)
return api_call
def ntdtest_extensive_method1_alternate(*args):
api_call = _invoke_api('ntdtest-extensive-method1-alternate', *args)
return api_call
def ntdtest_extensive_method1_default(*args):
api_call = _invoke_api('ntdtest-extensive-method1-default', *args)
return api_call
def ntdtest_extensive_method2_alternate(*args):
api_call = _invoke_api('ntdtest-extensive-method2-alternate', *args)
return api_call
def ntdtest_extensive_method2_default(*args):
api_call = _invoke_api('ntdtest-extensive-method2-default', *args)
return api_call
def ntdtest_extensive_method3_default(*args):
api_call = _invoke_api('ntdtest-extensive-method3-default', *args)
return api_call
def ntdtest_extensive_method4_alt(*args):
api_call = _invoke_api('ntdtest-extensive-method4-alt', *args)
return api_call
def ntdtest_extensive_method4_default(*args):
api_call = _invoke_api('ntdtest-extensive-method4-default', *args)
return api_call
def ntdtest_extensive_method5_alternate(*args):
api_call = _invoke_api('ntdtest-extensive-method5-alternate', *args)
return api_call
def ntdtest_extensive_method6_alternate(*args):
api_call = _invoke_api('ntdtest-extensive-method6-alternate', *args)
return api_call
def ntdtest_extensive_method6_alternate_1(*args):
api_call = _invoke_api('ntdtest-extensive-method6-alternate-1', *args)
return api_call
def ntdtest_extensive_method6_default(*args):
api_call = _invoke_api('ntdtest-extensive-method6-default', *args)
return api_call
def ntdtest_extensive_modify_iter(*args):
api_call = _invoke_api('ntdtest-extensive-modify-iter', *args)
return api_call
def ntdtest_folding_create(*args):
api_call = _invoke_api('ntdtest-folding-create', *args)
return api_call
def ntdtest_folding_deep_arrayof_get_iter(*args):
api_call = _invoke_api('ntdtest-folding-deep-arrayof-get-iter', *args)
return api_call
def ntdtest_folding_default_get(*args):
api_call = _invoke_api('ntdtest-folding-default-get', *args)
return api_call
def ntdtest_folding_destroy(*args):
api_call = _invoke_api('ntdtest-folding-destroy', *args)
return api_call
def ntdtest_folding_get(*args):
api_call = _invoke_api('ntdtest-folding-get', *args)
return api_call
def ntdtest_folding_get_collapsed_and_arrayof(*args):
api_call = _invoke_api('ntdtest-folding-get-collapsed-and-arrayof', *args)
return api_call
def ntdtest_folding_get_deep_element(*args):
api_call = _invoke_api('ntdtest-folding-get-deep-element', *args)
return api_call
def ntdtest_folding_get_element_no_array(*args):
api_call = _invoke_api('ntdtest-folding-get-element-no-array', *args)
return api_call
def ntdtest_folding_get_full_list(*args):
api_call = _invoke_api('ntdtest-folding-get-full-list', *args)
return api_call
def ntdtest_folding_get_iter(*args):
api_call = _invoke_api('ntdtest-folding-get-iter', *args)
return api_call
def ntdtest_folding_get_iter_mixed(*args):
api_call = _invoke_api('ntdtest-folding-get-iter-mixed', *args)
return api_call
def ntdtest_folding_get_multiple_field_list_shallow(*args):
api_call = _invoke_api('ntdtest-folding-get-multiple-field-list-shallow', *args)
return api_call
def ntdtest_folding_get_multiple_field_list_top(*args):
api_call = _invoke_api('ntdtest-folding-get-multiple-field-list-top', *args)
return api_call
def ntdtest_folding_get_multiple_fields_list_array_and_collapsed(*args):
api_call = _invoke_api('ntdtest-folding-get-multiple-fields-list-array-and-collapsed', *args)
return api_call
def ntdtest_folding_get_shallow_element(*args):
api_call = _invoke_api('ntdtest-folding-get-shallow-element', *args)
return api_call
def ntdtest_folding_get_single_field_list(*args):
api_call = _invoke_api('ntdtest-folding-get-single-field-list', *args)
return api_call
def ntdtest_folding_list_info(*args):
api_call = _invoke_api('ntdtest-folding-list-info', *args)
return api_call
def ntdtest_folding_list_info_alt(*args):
api_call = _invoke_api('ntdtest-folding-list-info-alt', *args)
return api_call
def ntdtest_folding_list_info_deep_element(*args):
api_call = _invoke_api('ntdtest-folding-list-info-deep-element', *args)
return api_call
def ntdtest_folding_multiple_arrays_create(*args):
api_call = _invoke_api('ntdtest-folding-multiple-arrays-create', *args)
return api_call
def ntdtest_folding_multiple_arrays_destroy(*args):
api_call = _invoke_api('ntdtest-folding-multiple-arrays-destroy', *args)
return api_call
def ntdtest_folding_multiple_arrays_get_iter(*args):
api_call = _invoke_api('ntdtest-folding-multiple-arrays-get-iter', *args)
return api_call
def ntdtest_get(*args):
api_call = _invoke_api('ntdtest-get', *args)
return api_call
def ntdtest_get_iter(*args):
api_call = _invoke_api('ntdtest-get-iter', *args)
return api_call
def ntdtest_iterfrom_alt_create(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-create', *args)
return api_call
def ntdtest_iterfrom_alt_destroy(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-destroy', *args)
return api_call
def ntdtest_iterfrom_alt_destroy_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-destroy-iter', *args)
return api_call
def ntdtest_iterfrom_alt_get(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-get', *args)
return api_call
def ntdtest_iterfrom_alt_get_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-get-iter', *args)
return api_call
def ntdtest_iterfrom_alt_list_info(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-list-info', *args)
return api_call
def ntdtest_iterfrom_alt_modify(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-modify', *args)
return api_call
def ntdtest_iterfrom_alt_modify_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-alt-modify-iter', *args)
return api_call
def ntdtest_iterfrom_create(*args):
api_call = _invoke_api('ntdtest-iterfrom-create', *args)
return api_call
def ntdtest_iterfrom_destroy(*args):
api_call = _invoke_api('ntdtest-iterfrom-destroy', *args)
return api_call
def ntdtest_iterfrom_destroy_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-destroy-iter', *args)
return api_call
def ntdtest_iterfrom_dupe_create(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-create', *args)
return api_call
def ntdtest_iterfrom_dupe_destroy(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-destroy', *args)
return api_call
def ntdtest_iterfrom_dupe_destroy_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-destroy-iter', *args)
return api_call
def ntdtest_iterfrom_dupe_get(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-get', *args)
return api_call
def ntdtest_iterfrom_dupe_get_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-get-iter', *args)
return api_call
def ntdtest_iterfrom_dupe_list_info(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-list-info', *args)
return api_call
def ntdtest_iterfrom_dupe_modify(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-modify', *args)
return api_call
def ntdtest_iterfrom_dupe_modify_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-dupe-modify-iter', *args)
return api_call
def ntdtest_iterfrom_get(*args):
api_call = _invoke_api('ntdtest-iterfrom-get', *args)
return api_call
def ntdtest_iterfrom_get_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-get-iter', *args)
return api_call
def ntdtest_iterfrom_list_info(*args):
api_call = _invoke_api('ntdtest-iterfrom-list-info', *args)
return api_call
def ntdtest_iterfrom_modify(*args):
api_call = _invoke_api('ntdtest-iterfrom-modify', *args)
return api_call
def ntdtest_iterfrom_modify_iter(*args):
api_call = _invoke_api('ntdtest-iterfrom-modify-iter', *args)
return api_call
def ntdtest_iternoread_create(*args):
api_call = _invoke_api('ntdtest-iternoread-create', *args)
return api_call
def ntdtest_iternoread_destroy(*args):
api_call = _invoke_api('ntdtest-iternoread-destroy', *args)
return api_call
def ntdtest_iternoread_destroy_iter(*args):
api_call = _invoke_api('ntdtest-iternoread-destroy-iter', *args)
return api_call
def ntdtest_iternoread_get(*args):
api_call = _invoke_api('ntdtest-iternoread-get', *args)
return api_call
def ntdtest_iternoread_get_alt(*args):
api_call = _invoke_api('ntdtest-iternoread-get-alt', *args)
return api_call
def ntdtest_iternoread_get_iter(*args):
api_call = _invoke_api('ntdtest-iternoread-get-iter', *args)
return api_call
def ntdtest_iternoread_get_iter_alt(*args):
api_call = _invoke_api('ntdtest-iternoread-get-iter-alt', *args)
return api_call
def ntdtest_iternoread_list_info(*args):
api_call = _invoke_api('ntdtest-iternoread-list-info', *args)
return api_call
def ntdtest_iternoread_modify(*args):
api_call = _invoke_api('ntdtest-iternoread-modify', *args)
return api_call
def ntdtest_iternoread_modify_iter(*args):
api_call = _invoke_api('ntdtest-iternoread-modify-iter', *args)
return api_call
def ntdtest_iterwants_get(*args):
api_call = _invoke_api('ntdtest-iterwants-get', *args)
return api_call
def ntdtest_iterwants_get_iter(*args):
api_call = _invoke_api('ntdtest-iterwants-get-iter', *args)
return api_call
def ntdtest_list_non_test_action_default(*args):
api_call = _invoke_api('ntdtest-list-non-test-action-default', *args)
return api_call
def ntdtest_list_non_test_method_default(*args):
api_call = _invoke_api('ntdtest-list-non-test-method-default', *args)
return api_call
def ntdtest_method_only_default(*args):
api_call = _invoke_api('ntdtest-method-only-default', *args)
return api_call
def ntdtest_method_only_method2(*args):
api_call = _invoke_api('ntdtest-method-only-method2', *args)
return api_call
def ntdtest_method_only_method3(*args):
api_call = _invoke_api('ntdtest-method-only-method3', *args)
return api_call
def ntdtest_method_only_method3_a(*args):
api_call = _invoke_api('ntdtest-method-only-method3-a', *args)
return api_call
def ntdtest_method_only_method3_async(*args):
api_call = _invoke_api('ntdtest-method-only-method3-async', *args)
return api_call
def ntdtest_method_only_method3_async_a(*args):
api_call = _invoke_api('ntdtest-method-only-method3-async-a', *args)
return api_call
def ntdtest_method_only_method3_async_iter(*args):
api_call = _invoke_api('ntdtest-method-only-method3-async-iter', *args)
return api_call
def ntdtest_method_only_method3_iter(*args):
api_call = _invoke_api('ntdtest-method-only-method3-iter', *args)
return api_call
def ntdtest_multiple_array_get_deep_element(*args):
api_call = _invoke_api('ntdtest-multiple-array-get-deep-element', *args)
return api_call
def ntdtest_multiple_array_get_shallow_element(*args):
api_call = _invoke_api('ntdtest-multiple-array-get-shallow-element', *args)
return api_call
def ntdtest_multiple_arrays_get_iter(*args):
api_call = _invoke_api('ntdtest-multiple-arrays-get-iter', *args)
return api_call
def ntdtest_multiple_default_method1_alternate(*args):
api_call = _invoke_api('ntdtest-multiple-default-method1-alternate', *args)
return api_call
def ntdtest_multiple_default_method1_default(*args):
api_call = _invoke_api('ntdtest-multiple-default-method1-default', *args)
return api_call
def ntdtest_multiple_inout_method1_alternate(*args):
api_call = _invoke_api('ntdtest-multiple-inout-method1-alternate', *args)
return api_call
def ntdtest_multiple_inout_method1_default(*args):
api_call = _invoke_api('ntdtest-multiple-inout-method1-default', *args)
return api_call
def ntdtest_multiple_with_default_create(*args):
api_call = _invoke_api('ntdtest-multiple-with-default-create', *args)
return api_call
def ntdtest_multiple_with_inout_create(*args):
api_call = _invoke_api('ntdtest-multiple-with-inout-create', *args)
return api_call
def ntdtest_nonlist_get(*args):
api_call = _invoke_api('ntdtest-nonlist-get', *args)
return api_call
def ntdtest_nonlist_get_iter(*args):
api_call = _invoke_api('ntdtest-nonlist-get-iter', *args)
return api_call
def ntdtest_shownoread_default_get(*args):
api_call = _invoke_api('ntdtest-shownoread-default-get', *args)
return api_call
def ntdtest_shownoread_get(*args):
api_call = _invoke_api('ntdtest-shownoread-get', *args)
return api_call
def ntdtest_top_level_alt_create(*args):
api_call = _invoke_api('ntdtest-top-level-alt-create', *args)
return api_call
def ntdtest_top_level_alt_get(*args):
api_call = _invoke_api('ntdtest-top-level-alt-get', *args)
return api_call
def ntdtest_top_level_default_create(*args):
api_call = _invoke_api('ntdtest-top-level-default-create', *args)
return api_call
def ntdtest_top_level_default_destroy(*args):
api_call = _invoke_api('ntdtest-top-level-default-destroy', *args)
return api_call
def ntdtest_top_level_default_get(*args):
api_call = _invoke_api('ntdtest-top-level-default-get', *args)
return api_call
def ntdtest_top_level_default_modify(*args):
api_call = _invoke_api('ntdtest-top-level-default-modify', *args)
return api_call
def ntdtest_top_level_no_inputs_create(*args):
api_call = _invoke_api('ntdtest-top-level-no-inputs-create', *args)
return api_call
def ntdtest_view_alternate_create_1(*args):
api_call = _invoke_api('ntdtest-view-alternate-create-1', *args)
return api_call
def ntdtest_view_alternate_create_2(*args):
api_call = _invoke_api('ntdtest-view-alternate-create-2', *args)
return api_call
def ntdtest_view_alternate_destroy_1(*args):
api_call = _invoke_api('ntdtest-view-alternate-destroy-1', *args)
return api_call
def ntdtest_view_alternate_get_1(*args):
api_call = _invoke_api('ntdtest-view-alternate-get-1', *args)
return api_call
def ntdtest_view_alternate_get_2(*args):
api_call = _invoke_api('ntdtest-view-alternate-get-2', *args)
return api_call
def ntdtest_view_alternate_modify_1(*args):
api_call = _invoke_api('ntdtest-view-alternate-modify-1', *args)
return api_call
def ntdtest_view_default_create(*args):
api_call = _invoke_api('ntdtest-view-default-create', *args)
return api_call
def ntdtest_view_default_destroy(*args):
api_call = _invoke_api('ntdtest-view-default-destroy', *args)
return api_call
def ntdtest_view_default_get(*args):
api_call = _invoke_api('ntdtest-view-default-get', *args)
return api_call
def ntdtest_view_default_modify(*args):
api_call = _invoke_api('ntdtest-view-default-modify', *args)
return api_call
def ntdtest_view_destroy_iter(*args):
api_call = _invoke_api('ntdtest-view-destroy-iter', *args)
return api_call
def ntdtest_view_get_iter(*args):
api_call = _invoke_api('ntdtest-view-get-iter', *args)
return api_call
def ntdtest_view_modify_iter(*args):
api_call = _invoke_api('ntdtest-view-modify-iter', *args)
return api_call
def ntp_server_create(*args):
api_call = _invoke_api('ntp-server-create', *args)
return api_call
def ntp_server_delete(*args):
api_call = _invoke_api('ntp-server-delete', *args)
return api_call
def ntp_server_get(*args):
api_call = _invoke_api('ntp-server-get', *args)
return api_call
def ntp_server_get_iter(*args):
api_call = _invoke_api('ntp-server-get-iter', *args)
return api_call
def ntp_server_modify(*args):
api_call = _invoke_api('ntp-server-modify', *args)
return api_call
def ntp_server_reset(*args):
api_call = _invoke_api('ntp-server-reset', *args)
return api_call
def ntp_server_validate(*args):
api_call = _invoke_api('ntp-server-validate', *args)
return api_call
def options_get_iter(*args):
api_call = _invoke_api('options-get-iter', *args)
return api_call
def options_modify_iter(*args):
api_call = _invoke_api('options-modify-iter', *args)
return api_call
def perf_archive_config_get(*args):
api_call = _invoke_api('perf-archive-config-get', *args)
return api_call
def perf_archive_config_modify(*args):
api_call = _invoke_api('perf-archive-config-modify', *args)
return api_call
def perf_archive_create(*args):
api_call = _invoke_api('perf-archive-create', *args)
return api_call
def perf_archive_datastore_get_iter(*args):
api_call = _invoke_api('perf-archive-datastore-get-iter', *args)
return api_call
def perf_archive_destroy(*args):
api_call = _invoke_api('perf-archive-destroy', *args)
return api_call
def perf_archive_get_iter(*args):
api_call = _invoke_api('perf-archive-get-iter', *args)
return api_call
def perf_archive_modify(*args):
api_call = _invoke_api('perf-archive-modify', *args)
return api_call
def perf_object_counter_list_info(*args):
api_call = _invoke_api('perf-object-counter-list-info', *args)
return api_call
def perf_object_get_instances(*args):
api_call = _invoke_api('perf-object-get-instances', *args)
return api_call
def perf_object_instance_list_info_iter(*args):
api_call = _invoke_api('perf-object-instance-list-info-iter', *args)
return api_call
def perf_object_list_info(*args):
api_call = _invoke_api('perf-object-list-info', *args)
return api_call
def perf_preset_create(*args):
api_call = _invoke_api('perf-preset-create', *args)
return api_call
def perf_preset_delete(*args):
api_call = _invoke_api('perf-preset-delete', *args)
return api_call
def perf_preset_detail_get(*args):
api_call = _invoke_api('perf-preset-detail-get', *args)
return api_call
def perf_preset_get_iter(*args):
api_call = _invoke_api('perf-preset-get-iter', *args)
return api_call
def perf_preset_import(*args):
api_call = _invoke_api('perf-preset-import', *args)
return api_call
def perf_preset_modify(*args):
api_call = _invoke_api('perf-preset-modify', *args)
return api_call
def portset_get_iter(*args):
api_call = _invoke_api('portset-get-iter', *args)
return api_call
def qos_policy_group_create(*args):
api_call = _invoke_api('qos-policy-group-create', *args)
return api_call
def qos_policy_group_delete(*args):
api_call = _invoke_api('qos-policy-group-delete', *args)
return api_call
def qos_policy_group_delete_iter(*args):
api_call = _invoke_api('qos-policy-group-delete-iter', *args)
return api_call
def qos_policy_group_get(*args):
api_call = _invoke_api('qos-policy-group-get', *args)
return api_call
def qos_policy_group_get_iter(*args):
api_call = _invoke_api('qos-policy-group-get-iter', *args)
return api_call
def qos_policy_group_modify(*args):
api_call = _invoke_api('qos-policy-group-modify', *args)
return api_call
def qos_policy_group_modify_iter(*args):
api_call = _invoke_api('qos-policy-group-modify-iter', *args)
return api_call
def qos_policy_group_rename(*args):
api_call = _invoke_api('qos-policy-group-rename', *args)
return api_call
def qos_settings_control_get(*args):
api_call = _invoke_api('qos-settings-control-get', *args)
return api_call
def qos_settings_control_modify(*args):
api_call = _invoke_api('qos-settings-control-modify', *args)
return api_call
def qos_settings_read_ahead_create(*args):
api_call = _invoke_api('qos-settings-read-ahead-create', *args)
return api_call
def qos_settings_read_ahead_destroy(*args):
api_call = _invoke_api('qos-settings-read-ahead-destroy', *args)
return api_call
def qos_settings_read_ahead_destroy_iter(*args):
api_call = _invoke_api('qos-settings-read-ahead-destroy-iter', *args)
return api_call
def qos_settings_read_ahead_get(*args):
api_call = _invoke_api('qos-settings-read-ahead-get', *args)
return api_call
def qos_settings_read_ahead_get_iter(*args):
api_call = _invoke_api('qos-settings-read-ahead-get-iter', *args)
return api_call
def qos_settings_read_ahead_modify(*args):
api_call = _invoke_api('qos-settings-read-ahead-modify', *args)
return api_call
def qos_settings_read_ahead_modify_iter(*args):
api_call = _invoke_api('qos-settings-read-ahead-modify-iter', *args)
return api_call
def qos_test_smf_zapi_error(*args):
api_call = _invoke_api('qos-test-smf-zapi-error', *args)
return api_call
def qos_workload_delete(*args):
api_call = _invoke_api('qos-workload-delete', *args)
return api_call
def qos_workload_delete_iter(*args):
api_call = _invoke_api('qos-workload-delete-iter', *args)
return api_call
def qos_workload_get(*args):
api_call = _invoke_api('qos-workload-get', *args)
return api_call
def qos_workload_get_iter(*args):
api_call = _invoke_api('qos-workload-get-iter', *args)
return api_call
def qos_workload_modify(*args):
api_call = _invoke_api('qos-workload-modify', *args)
return api_call
def qos_workload_modify_iter(*args):
api_call = _invoke_api('qos-workload-modify-iter', *args)
return api_call
def qtree_list_iter(*args):
api_call = _invoke_api('qtree-list-iter', *args)
return api_call
def quota_list_entries_iter(*args):
api_call = _invoke_api('quota-list-entries-iter', *args)
return api_call
def quota_policy_copy(*args):
api_call = _invoke_api('quota-policy-copy', *args)
return api_call
def quota_policy_create(*args):
api_call = _invoke_api('quota-policy-create', *args)
return api_call
def quota_policy_delete_iter(*args):
api_call = _invoke_api('quota-policy-delete-iter', *args)
return api_call
def quota_policy_get_iter(*args):
api_call = _invoke_api('quota-policy-get-iter', *args)
return api_call
def quota_policy_rename(*args):
api_call = _invoke_api('quota-policy-rename', *args)
return api_call
def quota_policy_rule_count_get_iter(*args):
api_call = _invoke_api('quota-policy-rule-count-get-iter', *args)
return api_call
def quota_report_iter(*args):
api_call = _invoke_api('quota-report-iter', *args)
return api_call
def quota_status_iter(*args):
api_call = _invoke_api('quota-status-iter', *args)
return api_call
def raidgroup_get_iter(*args):
api_call = _invoke_api('raidgroup-get-iter', *args)
return api_call
def security_certificate_ca_issued_get_iter(*args):
api_call = _invoke_api('security-certificate-ca-issued-get-iter', *args)
return api_call
def security_certificate_create(*args):
api_call = _invoke_api('security-certificate-create', *args)
return api_call
def security_certificate_delete(*args):
api_call = _invoke_api('security-certificate-delete', *args)
return api_call
def security_certificate_delete_iter(*args):
api_call = _invoke_api('security-certificate-delete-iter', *args)
return api_call
def security_certificate_file_get_iter(*args):
api_call = _invoke_api('security-certificate-file-get-iter', *args)
return api_call
def security_certificate_generate_csr(*args):
api_call = _invoke_api('security-certificate-generate-csr', *args)
return api_call
def security_certificate_get_iter(*args):
api_call = _invoke_api('security-certificate-get-iter', *args)
return api_call
def security_certificate_install(*args):
api_call = _invoke_api('security-certificate-install', *args)
return api_call
def security_certificate_revoke(*args):
api_call = _invoke_api('security-certificate-revoke', *args)
return api_call
def security_certificate_sign(*args):
api_call = _invoke_api('security-certificate-sign', *args)
return api_call
def security_key_manager_add_iter(*args):
api_call = _invoke_api('security-key-manager-add-iter', *args)
return api_call
def security_key_manager_create_key(*args):
api_call = _invoke_api('security-key-manager-create-key', *args)
return api_call
def security_key_manager_delete_iter(*args):
api_call = _invoke_api('security-key-manager-delete-iter', *args)
return api_call
def security_key_manager_get(*args):
api_call = _invoke_api('security-key-manager-get', *args)
return api_call
def security_key_manager_get_iter(*args):
api_call = _invoke_api('security-key-manager-get-iter', *args)
return api_call
def security_key_manager_query_get(*args):
api_call = _invoke_api('security-key-manager-query-get', *args)
return api_call
def security_key_manager_query_get_iter(*args):
api_call = _invoke_api('security-key-manager-query-get-iter', *args)
return api_call
def security_key_manager_restore_get(*args):
api_call = _invoke_api('security-key-manager-restore-get', *args)
return api_call
def security_key_manager_restore_get_iter(*args):
api_call = _invoke_api('security-key-manager-restore-get-iter', *args)
return api_call
def security_key_manager_setup(*args):
api_call = _invoke_api('security-key-manager-setup', *args)
return api_call
def security_login_create(*args):
api_call = _invoke_api('security-login-create', *args)
return api_call
def security_login_delete(*args):
api_call = _invoke_api('security-login-delete', *args)
return api_call
def security_login_delete_iter(*args):
api_call = _invoke_api('security-login-delete-iter', *args)
return api_call
def security_login_get(*args):
api_call = _invoke_api('security-login-get', *args)
return api_call
def security_login_get_iter(*args):
api_call = _invoke_api('security-login-get-iter', *args)
return api_call
def security_login_lock(*args):
api_call = _invoke_api('security-login-lock', *args)
return api_call
def security_login_modify(*args):
api_call = _invoke_api('security-login-modify', *args)
return api_call
def security_login_modify_iter(*args):
api_call = _invoke_api('security-login-modify-iter', *args)
return api_call
def security_login_modify_password(*args):
api_call = _invoke_api('security-login-modify-password', *args)
return api_call
def security_login_role_config_get(*args):
api_call = _invoke_api('security-login-role-config-get', *args)
return api_call
def security_login_role_config_get_iter(*args):
api_call = _invoke_api('security-login-role-config-get-iter', *args)
return api_call
def security_login_role_config_modify(*args):
api_call = _invoke_api('security-login-role-config-modify', *args)
return api_call
def security_login_role_config_modify_iter(*args):
api_call = _invoke_api('security-login-role-config-modify-iter', *args)
return api_call
def security_login_role_create(*args):
api_call = _invoke_api('security-login-role-create', *args)
return api_call
def security_login_role_delete(*args):
api_call = _invoke_api('security-login-role-delete', *args)
return api_call
def security_login_role_delete_iter(*args):
api_call = _invoke_api('security-login-role-delete-iter', *args)
return api_call
def security_login_role_get(*args):
api_call = _invoke_api('security-login-role-get', *args)
return api_call
def security_login_role_get_iter(*args):
api_call = _invoke_api('security-login-role-get-iter', *args)
return api_call
def security_login_role_modify(*args):
api_call = _invoke_api('security-login-role-modify', *args)
return api_call
def security_login_role_modify_iter(*args):
api_call = _invoke_api('security-login-role-modify-iter', *args)
return api_call
def security_login_unlock(*args):
api_call = _invoke_api('security-login-unlock', *args)
return api_call
def security_reset(*args):
api_call = _invoke_api('security-reset', *args)
return api_call
def security_ssh_add(*args):
api_call = _invoke_api('security-ssh-add', *args)
return api_call
def security_ssh_get_iter(*args):
api_call = _invoke_api('security-ssh-get-iter', *args)
return api_call
def security_ssh_remove(*args):
api_call = _invoke_api('security-ssh-remove', *args)
return api_call
def security_ssl_get_iter(*args):
api_call = _invoke_api('security-ssl-get-iter', *args)
return api_call
def security_ssl_modify(*args):
api_call = _invoke_api('security-ssl-modify', *args)
return api_call
def security_trace_filter_get_iter(*args):
api_call = _invoke_api('security-trace-filter-get-iter', *args)
return api_call
def security_trace_result_show(*args):
api_call = _invoke_api('security-trace-result-show', *args)
return api_call
def service_processor_api_service_get(*args):
api_call = _invoke_api('service-processor-api-service-get', *args)
return api_call
def service_processor_api_service_modify(*args):
api_call = _invoke_api('service-processor-api-service-modify', *args)
return api_call
def service_processor_api_service_renew_certificates(*args):
api_call = _invoke_api('service-processor-api-service-renew-certificates', *args)
return api_call
def service_processor_asup_config_get(*args):
api_call = _invoke_api('service-processor-asup-config-get', *args)
return api_call
def service_processor_asup_config_set(*args):
api_call = _invoke_api('service-processor-asup-config-set', *args)
return api_call
def service_processor_asup_invoke(*args):
api_call = _invoke_api('service-processor-asup-invoke', *args)
return api_call
def service_processor_auto_configuration_disable(*args):
api_call = _invoke_api('service-processor-auto-configuration-disable', *args)
return api_call
def service_processor_auto_configuration_enable(*args):
api_call = _invoke_api('service-processor-auto-configuration-enable', *args)
return api_call
def service_processor_auto_configuration_get(*args):
api_call = _invoke_api('service-processor-auto-configuration-get', *args)
return api_call
def service_processor_get(*args):
api_call = _invoke_api('service-processor-get', *args)
return api_call
def service_processor_get_iter(*args):
api_call = _invoke_api('service-processor-get-iter', *args)
return api_call
def service_processor_image_get(*args):
api_call = _invoke_api('service-processor-image-get', *args)
return api_call
def service_processor_image_modify(*args):
api_call = _invoke_api('service-processor-image-modify', *args)
return api_call
def service_processor_image_update(*args):
api_call = _invoke_api('service-processor-image-update', *args)
return api_call
def service_processor_image_update_progress_get(*args):
api_call = _invoke_api('service-processor-image-update-progress-get', *args)
return api_call
def service_processor_log_allocation_get(*args):
api_call = _invoke_api('service-processor-log-allocation-get', *args)
return api_call
def service_processor_log_allocation_get_iter(*args):
api_call = _invoke_api('service-processor-log-allocation-get-iter', *args)
return api_call
def service_processor_network_get(*args):
api_call = _invoke_api('service-processor-network-get', *args)
return api_call
def service_processor_network_get_iter(*args):
api_call = _invoke_api('service-processor-network-get-iter', *args)
return api_call
def service_processor_network_modify(*args):
api_call = _invoke_api('service-processor-network-modify', *args)
return api_call
def service_processor_network_modify_iter(*args):
api_call = _invoke_api('service-processor-network-modify-iter', *args)
return api_call
def service_processor_reboot(*args):
api_call = _invoke_api('service-processor-reboot', *args)
return api_call
def service_processor_ssh_add_allowed_addresses(*args):
api_call = _invoke_api('service-processor-ssh-add-allowed-addresses', *args)
return api_call
def service_processor_ssh_get(*args):
api_call = _invoke_api('service-processor-ssh-get', *args)
return api_call
def service_processor_ssh_remove_allowed_addresses(*args):
api_call = _invoke_api('service-processor-ssh-remove-allowed-addresses', *args)
return api_call
def sis_get_iter(*args):
api_call = _invoke_api('sis-get-iter', *args)
return api_call
def sis_policy_get_iter(*args):
api_call = _invoke_api('sis-policy-get-iter', *args)
return api_call
def sis_prepare_to_downgrade(*args):
api_call = _invoke_api('sis-prepare-to-downgrade', *args)
return api_call
def sis_status(*args):
api_call = _invoke_api('sis-status', *args)
return api_call
def snapmirror_abort(*args):
api_call = _invoke_api('snapmirror-abort', *args)
return api_call
def snapmirror_abort_async(*args):
api_call = _invoke_api('snapmirror-abort-async', *args)
return api_call
def snapmirror_abort_iter(*args):
api_call = _invoke_api('snapmirror-abort-iter', *args)
return api_call
def snapmirror_break(*args):
api_call = _invoke_api('snapmirror-break', *args)
return api_call
def snapmirror_break_async(*args):
api_call = _invoke_api('snapmirror-break-async', *args)
return api_call
def snapmirror_break_iter(*args):
api_call = _invoke_api('snapmirror-break-iter', *args)
return api_call
def snapmirror_cache_rebuild_relationship(*args):
api_call = _invoke_api('snapmirror-cache-rebuild-relationship', *args)
return api_call
def snapmirror_check(*args):
api_call = _invoke_api('snapmirror-check', *args)
return api_call
def snapmirror_check_iter(*args):
api_call = _invoke_api('snapmirror-check-iter', *args)
return api_call
def snapmirror_config_replication_cluster_storage_configuration_get(*args):
api_call = _invoke_api('snapmirror-config-replication-cluster-storage-configuration-get', *args)
return api_call
def snapmirror_config_replication_cluster_storage_configuration_modify(*args):
api_call = _invoke_api('snapmirror-config-replication-cluster-storage-configuration-modify', *args)
return api_call
def snapmirror_cr_status_aggregate_eligibility_get(*args):
api_call = _invoke_api('snapmirror-cr-status-aggregate-eligibility-get', *args)
return api_call
def snapmirror_cr_status_aggregate_eligibility_get_iter(*args):
api_call = _invoke_api('snapmirror-cr-status-aggregate-eligibility-get-iter', *args)
return api_call
def snapmirror_cr_status_comm_get(*args):
api_call = _invoke_api('snapmirror-cr-status-comm-get', *args)
return api_call
def snapmirror_cr_status_comm_get_iter(*args):
api_call = _invoke_api('snapmirror-cr-status-comm-get-iter', *args)
return api_call
def snapmirror_cr_status_get(*args):
api_call = _invoke_api('snapmirror-cr-status-get', *args)
return api_call
def snapmirror_create(*args):
api_call = _invoke_api('snapmirror-create', *args)
return api_call
def snapmirror_destroy(*args):
api_call = _invoke_api('snapmirror-destroy', *args)
return api_call
def snapmirror_destroy_async(*args):
api_call = _invoke_api('snapmirror-destroy-async', *args)
return api_call
def snapmirror_destroy_iter(*args):
api_call = _invoke_api('snapmirror-destroy-iter', *args)
return api_call
def snapmirror_get(*args):
api_call = _invoke_api('snapmirror-get', *args)
return api_call
def snapmirror_get_destination(*args):
api_call = _invoke_api('snapmirror-get-destination', *args)
return api_call
def snapmirror_get_destination_iter(*args):
api_call = _invoke_api('snapmirror-get-destination-iter', *args)
return api_call
def snapmirror_get_iter(*args):
api_call = _invoke_api('snapmirror-get-iter', *args)
return api_call
def snapmirror_get_total_records(*args):
api_call = _invoke_api('snapmirror-get-total-records', *args)
return api_call
def snapmirror_get_volume_status(*args):
api_call = _invoke_api('snapmirror-get-volume-status', *args)
return api_call
def snapmirror_history_get(*args):
api_call = _invoke_api('snapmirror-history-get', *args)
return api_call
def snapmirror_history_get_iter(*args):
api_call = _invoke_api('snapmirror-history-get-iter', *args)
return api_call
def snapmirror_initialize(*args):
api_call = _invoke_api('snapmirror-initialize', *args)
return api_call
def snapmirror_initialize_iter(*args):
api_call = _invoke_api('snapmirror-initialize-iter', *args)
return api_call
def snapmirror_initialize_ls_set(*args):
api_call = _invoke_api('snapmirror-initialize-ls-set', *args)
return api_call
def snapmirror_modify(*args):
api_call = _invoke_api('snapmirror-modify', *args)
return api_call
def snapmirror_modify_iter(*args):
api_call = _invoke_api('snapmirror-modify-iter', *args)
return api_call
def snapmirror_policy_get_iter(*args):
api_call = _invoke_api('snapmirror-policy-get-iter', *args)
return api_call
def snapmirror_promote(*args):
api_call = _invoke_api('snapmirror-promote', *args)
return api_call
def snapmirror_promote_iter(*args):
api_call = _invoke_api('snapmirror-promote-iter', *args)
return api_call
def snapmirror_quiesce(*args):
api_call = _invoke_api('snapmirror-quiesce', *args)
return api_call
def snapmirror_quiesce_iter(*args):
api_call = _invoke_api('snapmirror-quiesce-iter', *args)
return api_call
def snapmirror_release(*args):
api_call = _invoke_api('snapmirror-release', *args)
return api_call
def snapmirror_release_iter(*args):
api_call = _invoke_api('snapmirror-release-iter', *args)
return api_call
def snapmirror_restore(*args):
api_call = _invoke_api('snapmirror-restore', *args)
return api_call
def snapmirror_resume(*args):
api_call = _invoke_api('snapmirror-resume', *args)
return api_call
def snapmirror_resume_iter(*args):
api_call = _invoke_api('snapmirror-resume-iter', *args)
return api_call
def snapmirror_resync(*args):
api_call = _invoke_api('snapmirror-resync', *args)
return api_call
def snapmirror_resync_iter(*args):
api_call = _invoke_api('snapmirror-resync-iter', *args)
return api_call
def snapmirror_snapshot_owner_get(*args):
api_call = _invoke_api('snapmirror-snapshot-owner-get', *args)
return api_call
def snapmirror_snapshot_owner_get_snapshots(*args):
api_call = _invoke_api('snapmirror-snapshot-owner-get-snapshots', *args)
return api_call
def snapmirror_update(*args):
api_call = _invoke_api('snapmirror-update', *args)
return api_call
def snapmirror_update_iter(*args):
api_call = _invoke_api('snapmirror-update-iter', *args)
return api_call
def snapmirror_update_ls_set(*args):
api_call = _invoke_api('snapmirror-update-ls-set', *args)
return api_call
def snapshot_get_iter(*args):
api_call = _invoke_api('snapshot-get-iter', *args)
return api_call
def snapshot_modify_iter(*args):
api_call = _invoke_api('snapshot-modify-iter', *args)
return api_call
def snapshot_policy_add_schedule(*args):
api_call = _invoke_api('snapshot-policy-add-schedule', *args)
return api_call
def snapshot_policy_create(*args):
api_call = _invoke_api('snapshot-policy-create', *args)
return api_call
def snapshot_policy_delete(*args):
api_call = _invoke_api('snapshot-policy-delete', *args)
return api_call
def snapshot_policy_get(*args):
api_call = _invoke_api('snapshot-policy-get', *args)
return api_call
def snapshot_policy_get_iter(*args):
api_call = _invoke_api('snapshot-policy-get-iter', *args)
return api_call
def snapshot_policy_modify(*args):
api_call = _invoke_api('snapshot-policy-modify', *args)
return api_call
def snapshot_policy_modify_schedule(*args):
api_call = _invoke_api('snapshot-policy-modify-schedule', *args)
return api_call
def snapshot_policy_remove_schedule(*args):
api_call = _invoke_api('snapshot-policy-remove-schedule', *args)
return api_call
def snapshot_reserve_list_info(*args):
api_call = _invoke_api('snapshot-reserve-list-info', *args)
return api_call
def snmp_community_add(*args):
api_call = _invoke_api('snmp-community-add', *args)
return api_call
def snmp_community_delete(*args):
api_call = _invoke_api('snmp-community-delete', *args)
return api_call
def snmp_community_delete_all(*args):
api_call = _invoke_api('snmp-community-delete-all', *args)
return api_call
def snmp_disable(*args):
api_call = _invoke_api('snmp-disable', *args)
return api_call
def snmp_enable(*args):
api_call = _invoke_api('snmp-enable', *args)
return api_call
def snmp_get(*args):
api_call = _invoke_api('snmp-get', *args)
return api_call
def snmp_get_next(*args):
api_call = _invoke_api('snmp-get-next', *args)
return api_call
def snmp_prepare_to_downgrade(*args):
api_call = _invoke_api('snmp-prepare-to-downgrade', *args)
return api_call
def snmp_status(*args):
api_call = _invoke_api('snmp-status', *args)
return api_call
def snmp_trap_disable(*args):
api_call = _invoke_api('snmp-trap-disable', *args)
return api_call
def snmp_trap_enable(*args):
api_call = _invoke_api('snmp-trap-enable', *args)
return api_call
def snmp_traphost_add(*args):
api_call = _invoke_api('snmp-traphost-add', *args)
return api_call
def snmp_traphost_delete(*args):
api_call = _invoke_api('snmp-traphost-delete', *args)
return api_call
def ssh_prepare_to_downgrade(*args):
api_call = _invoke_api('ssh-prepare-to-downgrade', *args)
return api_call
def storage_adapter_enable_adapter(*args):
api_call = _invoke_api('storage-adapter-enable-adapter', *args)
return api_call
def storage_adapter_get_adapter_info(*args):
api_call = _invoke_api('storage-adapter-get-adapter-info', *args)
return api_call
def storage_adapter_get_adapter_list(*args):
api_call = _invoke_api('storage-adapter-get-adapter-list', *args)
return api_call
def storage_array_get_config_summary(*args):
api_call = _invoke_api('storage-array-get-config-summary', *args)
return api_call
def storage_array_list_info(*args):
api_call = _invoke_api('storage-array-list-info', *args)
return api_call
def storage_array_modify(*args):
api_call = _invoke_api('storage-array-modify', *args)
return api_call
def storage_array_port_modify(*args):
api_call = _invoke_api('storage-array-port-modify', *args)
return api_call
def storage_array_ports_list_info(*args):
api_call = _invoke_api('storage-array-ports-list-info', *args)
return api_call
def storage_array_rename(*args):
api_call = _invoke_api('storage-array-rename', *args)
return api_call
def storage_bridge_get(*args):
api_call = _invoke_api('storage-bridge-get', *args)
return api_call
def storage_bridge_get_iter(*args):
api_call = _invoke_api('storage-bridge-get-iter', *args)
return api_call
def storage_disk_get_iter(*args):
api_call = _invoke_api('storage-disk-get-iter', *args)
return api_call
def storage_disk_modify(*args):
api_call = _invoke_api('storage-disk-modify', *args)
return api_call
def storage_disk_remove_reservation(*args):
api_call = _invoke_api('storage-disk-remove-reservation', *args)
return api_call
def storage_initiator_balance(*args):
api_call = _invoke_api('storage-initiator-balance', *args)
return api_call
def storage_initiator_disk_path_list_info(*args):
api_call = _invoke_api('storage-initiator-disk-path-list-info', *args)
return api_call
def storage_initiator_errors_list_info(*args):
api_call = _invoke_api('storage-initiator-errors-list-info', *args)
return api_call
def storage_initiator_get_load(*args):
api_call = _invoke_api('storage-initiator-get-load', *args)
return api_call
def storage_initiator_path_list_info(*args):
api_call = _invoke_api('storage-initiator-path-list-info', *args)
return api_call
def storage_initiator_path_quiesce(*args):
api_call = _invoke_api('storage-initiator-path-quiesce', *args)
return api_call
def storage_initiator_path_resume(*args):
api_call = _invoke_api('storage-initiator-path-resume', *args)
return api_call
def storage_pool_add(*args):
api_call = _invoke_api('storage-pool-add', *args)
return api_call
def storage_pool_aggregate_get_iter(*args):
api_call = _invoke_api('storage-pool-aggregate-get-iter', *args)
return api_call
def storage_pool_available_capacity_get_iter(*args):
api_call = _invoke_api('storage-pool-available-capacity-get-iter', *args)
return api_call
def storage_pool_create(*args):
api_call = _invoke_api('storage-pool-create', *args)
return api_call
def storage_pool_delete(*args):
api_call = _invoke_api('storage-pool-delete', *args)
return api_call
def storage_pool_disk_get_iter(*args):
api_call = _invoke_api('storage-pool-disk-get-iter', *args)
return api_call
def storage_pool_get_iter(*args):
api_call = _invoke_api('storage-pool-get-iter', *args)
return api_call
def storage_pool_reassign(*args):
api_call = _invoke_api('storage-pool-reassign', *args)
return api_call
def storage_shelf_acp_get(*args):
api_call = _invoke_api('storage-shelf-acp-get', *args)
return api_call
def storage_shelf_acp_module_get(*args):
api_call = _invoke_api('storage-shelf-acp-module-get', *args)
return api_call
def storage_shelf_acp_module_get_iter(*args):
api_call = _invoke_api('storage-shelf-acp-module-get-iter', *args)
return api_call
def storage_shelf_bay_list_info(*args):
api_call = _invoke_api('storage-shelf-bay-list-info', *args)
return api_call
def storage_shelf_environment_list_info(*args):
api_call = _invoke_api('storage-shelf-environment-list-info', *args)
return api_call
def storage_shelf_error_list_info(*args):
api_call = _invoke_api('storage-shelf-error-list-info', *args)
return api_call
def storage_shelf_firmware_update(*args):
api_call = _invoke_api('storage-shelf-firmware-update', *args)
return api_call
def storage_shelf_firmware_update_info_get(*args):
api_call = _invoke_api('storage-shelf-firmware-update-info-get', *args)
return api_call
def storage_shelf_firmware_update_info_get_iter(*args):
api_call = _invoke_api('storage-shelf-firmware-update-info-get-iter', *args)
return api_call
def storage_shelf_get_shelf_info(*args):
api_call = _invoke_api('storage-shelf-get-shelf-info', *args)
return api_call
def storage_shelf_info_get(*args):
api_call = _invoke_api('storage-shelf-info-get', *args)
return api_call
def storage_shelf_info_get_iter(*args):
api_call = _invoke_api('storage-shelf-info-get-iter', *args)
return api_call
def storage_shelf_list_info(*args):
api_call = _invoke_api('storage-shelf-list-info', *args)
return api_call
def storage_shelf_storage_acp_configure(*args):
api_call = _invoke_api('storage-shelf-storage-acp-configure', *args)
return api_call
def storage_switch_get(*args):
api_call = _invoke_api('storage-switch-get', *args)
return api_call
def storage_switch_get_iter(*args):
api_call = _invoke_api('storage-switch-get-iter', *args)
return api_call
def storage_transition_aggregates_get_iter(*args):
api_call = _invoke_api('storage-transition-aggregates-get-iter', *args)
return api_call
def storage_transition_aggregates_start(*args):
api_call = _invoke_api('storage-transition-aggregates-start', *args)
return api_call
def storage_transition_commit_get_iter(*args):
api_call = _invoke_api('storage-transition-commit-get-iter', *args)
return api_call
def storage_transition_commit_start(*args):
api_call = _invoke_api('storage-transition-commit-start', *args)
return api_call
def storage_transition_pre_commit_begin(*args):
api_call = _invoke_api('storage-transition-pre-commit-begin', *args)
return api_call
def storage_transition_pre_commit_end(*args):
api_call = _invoke_api('storage-transition-pre-commit-end', *args)
return api_call
def storage_transition_pre_commit_get(*args):
api_call = _invoke_api('storage-transition-pre-commit-get', *args)
return api_call
def storage_transition_pre_commit_get_iter(*args):
api_call = _invoke_api('storage-transition-pre-commit-get-iter', *args)
return api_call
def storage_transition_purge_info(*args):
api_call = _invoke_api('storage-transition-purge-info', *args)
return api_call
def storage_transition_revert_get_iter(*args):
api_call = _invoke_api('storage-transition-revert-get-iter', *args)
return api_call
def storage_transition_revert_start(*args):
api_call = _invoke_api('storage-transition-revert-start', *args)
return api_call
def storage_transition_volumes_get_iter(*args):
api_call = _invoke_api('storage-transition-volumes-get-iter', *args)
return api_call
def storage_transition_volumes_start(*args):
api_call = _invoke_api('storage-transition-volumes-start', *args)
return api_call
def system_api_change_get_iter(*args):
api_call = _invoke_api('system-api-change-get-iter', *args)
return api_call
def system_api_get_elements(*args):
api_call = _invoke_api('system-api-get-elements', *args)
return api_call
def system_api_list(*args):
api_call = _invoke_api('system-api-list', *args)
return api_call
def system_api_list_types(*args):
api_call = _invoke_api('system-api-list-types', *args)
return api_call
def system_cli(*args):
api_call = _invoke_api('system-cli', *args)
return api_call
def system_get_node_info_iter(*args):
api_call = _invoke_api('system-get-node-info-iter', *args)
return api_call
def system_get_ontapi_version(*args):
api_call = _invoke_api('system-get-ontapi-version', *args)
return api_call
def system_get_vendor_info(*args):
api_call = _invoke_api('system-get-vendor-info', *args)
return api_call
def system_get_version(*args):
api_call = _invoke_api('system-get-version', *args)
return api_call
def system_image_fetch_package(*args):
api_call = _invoke_api('system-image-fetch-package', *args)
return api_call
def system_image_get_iter(*args):
api_call = _invoke_api('system-image-get-iter', *args)
return api_call
def system_image_modify(*args):
api_call = _invoke_api('system-image-modify', *args)
return api_call
def system_image_package_delete(*args):
api_call = _invoke_api('system-image-package-delete', *args)
return api_call
def system_image_package_get_iter(*args):
api_call = _invoke_api('system-image-package-get-iter', *args)
return api_call
def system_image_update(*args):
api_call = _invoke_api('system-image-update', *args)
return api_call
def system_image_update_get_abort(*args):
api_call = _invoke_api('system-image-update-get-abort', *args)
return api_call
def system_image_update_progress_get(*args):
api_call = _invoke_api('system-image-update-progress-get', *args)
return api_call
def system_manager_upgrade(*args):
api_call = _invoke_api('system-manager-upgrade', *args)
return api_call
def system_node_delete_backlog_get(*args):
api_call = _invoke_api('system-node-delete-backlog-get', *args)
return api_call
def system_node_discovery_get_iter(*args):
api_call = _invoke_api('system-node-discovery-get-iter', *args)
return api_call
def system_node_get(*args):
api_call = _invoke_api('system-node-get', *args)
return api_call
def system_node_get_iter(*args):
api_call = _invoke_api('system-node-get-iter', *args)
return api_call
def system_node_modify(*args):
api_call = _invoke_api('system-node-modify', *args)
return api_call
def system_node_power_cycle(*args):
api_call = _invoke_api('system-node-power-cycle', *args)
return api_call
def system_node_power_get(*args):
api_call = _invoke_api('system-node-power-get', *args)
return api_call
def system_node_power_off(*args):
api_call = _invoke_api('system-node-power-off', *args)
return api_call
def system_node_power_on(*args):
api_call = _invoke_api('system-node-power-on', *args)
return api_call
def system_node_reboot(*args):
api_call = _invoke_api('system-node-reboot', *args)
return api_call
def system_node_rename(*args):
api_call = _invoke_api('system-node-rename', *args)
return api_call
def system_node_reset(*args):
api_call = _invoke_api('system-node-reset', *args)
return api_call
def system_node_revert_to(*args):
api_call = _invoke_api('system-node-revert-to', *args)
return api_call
def system_node_shutdown(*args):
api_call = _invoke_api('system-node-shutdown', *args)
return api_call
def system_ontapi_limits_get(*args):
api_call = _invoke_api('system-ontapi-limits-get', *args)
return api_call
def system_ontapi_limits_set(*args):
api_call = _invoke_api('system-ontapi-limits-set', *args)
return api_call
def system_services_web_get(*args):
api_call = _invoke_api('system-services-web-get', *args)
return api_call
def system_user_capability_get_iter(*args):
api_call = _invoke_api('system-user-capability-get-iter', *args)
return api_call
def tape_mc_get(*args):
api_call = _invoke_api('tape-mc-get', *args)
return api_call
def tape_mc_get_iter(*args):
api_call = _invoke_api('tape-mc-get-iter', *args)
return api_call
def tape_mc_info_alias_clear(*args):
api_call = _invoke_api('tape-mc-info-alias-clear', *args)
return api_call
def tape_mc_info_alias_set(*args):
api_call = _invoke_api('tape-mc-info-alias-set', *args)
return api_call
def tape_mc_info_offline(*args):
api_call = _invoke_api('tape-mc-info-offline', *args)
return api_call
def tape_mc_info_online(*args):
api_call = _invoke_api('tape-mc-info-online', *args)
return api_call
def tape_mc_info_position(*args):
api_call = _invoke_api('tape-mc-info-position', *args)
return api_call
def tape_mc_info_reset(*args):
api_call = _invoke_api('tape-mc-info-reset', *args)
return api_call
def tape_mc_info_test_release(*args):
api_call = _invoke_api('tape-mc-info-test-release', *args)
return api_call
def tape_mc_info_test_reserve(*args):
api_call = _invoke_api('tape-mc-info-test-reserve', *args)
return api_call
def tape_mc_info_trace(*args):
api_call = _invoke_api('tape-mc-info-trace', *args)
return api_call
def test_intrinsic_apis_1_create(*args):
api_call = _invoke_api('test-intrinsic-apis-1-create', *args)
return api_call
def test_intrinsic_apis_1_destroy(*args):
api_call = _invoke_api('test-intrinsic-apis-1-destroy', *args)
return api_call
def test_intrinsic_apis_1_destroy_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-1-destroy-iter', *args)
return api_call
def test_intrinsic_apis_1_get(*args):
api_call = _invoke_api('test-intrinsic-apis-1-get', *args)
return api_call
def test_intrinsic_apis_1_get_create_defaults(*args):
api_call = _invoke_api('test-intrinsic-apis-1-get-create-defaults', *args)
return api_call
def test_intrinsic_apis_1_get_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-1-get-iter', *args)
return api_call
def test_intrinsic_apis_1_get_total_records(*args):
api_call = _invoke_api('test-intrinsic-apis-1-get-total-records', *args)
return api_call
def test_intrinsic_apis_1_list_info(*args):
api_call = _invoke_api('test-intrinsic-apis-1-list-info', *args)
return api_call
def test_intrinsic_apis_2_create(*args):
api_call = _invoke_api('test-intrinsic-apis-2-create', *args)
return api_call
def test_intrinsic_apis_2_destroy(*args):
api_call = _invoke_api('test-intrinsic-apis-2-destroy', *args)
return api_call
def test_intrinsic_apis_2_destroy_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-2-destroy-iter', *args)
return api_call
def test_intrinsic_apis_2_get(*args):
api_call = _invoke_api('test-intrinsic-apis-2-get', *args)
return api_call
def test_intrinsic_apis_2_get_create_defaults(*args):
api_call = _invoke_api('test-intrinsic-apis-2-get-create-defaults', *args)
return api_call
def test_intrinsic_apis_2_get_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-2-get-iter', *args)
return api_call
def test_intrinsic_apis_2_get_total_records(*args):
api_call = _invoke_api('test-intrinsic-apis-2-get-total-records', *args)
return api_call
def test_intrinsic_apis_2_list_info(*args):
api_call = _invoke_api('test-intrinsic-apis-2-list-info', *args)
return api_call
def test_intrinsic_apis_2_modify(*args):
api_call = _invoke_api('test-intrinsic-apis-2-modify', *args)
return api_call
def test_intrinsic_apis_2_modify_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-2-modify-iter', *args)
return api_call
def test_intrinsic_apis_3_create(*args):
api_call = _invoke_api('test-intrinsic-apis-3-create', *args)
return api_call
def test_intrinsic_apis_3_destroy(*args):
api_call = _invoke_api('test-intrinsic-apis-3-destroy', *args)
return api_call
def test_intrinsic_apis_3_destroy_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-3-destroy-iter', *args)
return api_call
def test_intrinsic_apis_3_get(*args):
api_call = _invoke_api('test-intrinsic-apis-3-get', *args)
return api_call
def test_intrinsic_apis_3_get_create_defaults(*args):
api_call = _invoke_api('test-intrinsic-apis-3-get-create-defaults', *args)
return api_call
def test_intrinsic_apis_3_get_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-3-get-iter', *args)
return api_call
def test_intrinsic_apis_3_get_total_records(*args):
api_call = _invoke_api('test-intrinsic-apis-3-get-total-records', *args)
return api_call
def test_intrinsic_apis_3_list_info(*args):
api_call = _invoke_api('test-intrinsic-apis-3-list-info', *args)
return api_call
def test_intrinsic_apis_4_create(*args):
api_call = _invoke_api('test-intrinsic-apis-4-create', *args)
return api_call
def test_intrinsic_apis_4_destroy(*args):
api_call = _invoke_api('test-intrinsic-apis-4-destroy', *args)
return api_call
def test_intrinsic_apis_4_destroy_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-4-destroy-iter', *args)
return api_call
def test_intrinsic_apis_4_get(*args):
api_call = _invoke_api('test-intrinsic-apis-4-get', *args)
return api_call
def test_intrinsic_apis_4_get_create_defaults(*args):
api_call = _invoke_api('test-intrinsic-apis-4-get-create-defaults', *args)
return api_call
def test_intrinsic_apis_4_get_iter(*args):
api_call = _invoke_api('test-intrinsic-apis-4-get-iter', *args)
return api_call
def test_intrinsic_apis_4_get_total_records(*args):
api_call = _invoke_api('test-intrinsic-apis-4-get-total-records', *args)
return api_call
def test_intrinsic_apis_4_list_info(*args):
api_call = _invoke_api('test-intrinsic-apis-4-list-info', *args)
return api_call
def test_key_optionality_alt_create(*args):
api_call = _invoke_api('test-key-optionality-alt-create', *args)
return api_call
def test_key_optionality_alt_destroy(*args):
api_call = _invoke_api('test-key-optionality-alt-destroy', *args)
return api_call
def test_key_optionality_alt_get(*args):
api_call = _invoke_api('test-key-optionality-alt-get', *args)
return api_call
def test_key_optionality_alt_modify(*args):
api_call = _invoke_api('test-key-optionality-alt-modify', *args)
return api_call
def test_key_optionality_create(*args):
api_call = _invoke_api('test-key-optionality-create', *args)
return api_call
def test_key_optionality_destroy(*args):
api_call = _invoke_api('test-key-optionality-destroy', *args)
return api_call
def test_key_optionality_get(*args):
api_call = _invoke_api('test-key-optionality-get', *args)
return api_call
def test_key_optionality_modify(*args):
api_call = _invoke_api('test-key-optionality-modify', *args)
return api_call
def test_memory_stats(*args):
api_call = _invoke_api('test-memory-stats', *args)
return api_call
def test_password_get(*args):
api_call = _invoke_api('test-password-get', *args)
return api_call
def test_password_set(*args):
api_call = _invoke_api('test-password-set', *args)
return api_call
def test_plug_leak(*args):
api_call = _invoke_api('test-plug-leak', *args)
return api_call
def test_ro_action_1_readonly3(*args):
api_call = _invoke_api('test-ro-action-1-readonly3', *args)
return api_call
def test_ro_action_2_readonly4(*args):
api_call = _invoke_api('test-ro-action-2-readonly4', *args)
return api_call
def test_ro_action_3_writable3(*args):
api_call = _invoke_api('test-ro-action-3-writable3', *args)
return api_call
def test_ro_method_readonly1(*args):
api_call = _invoke_api('test-ro-method-readonly1', *args)
return api_call
def test_ro_table_readonly1(*args):
api_call = _invoke_api('test-ro-table-readonly1', *args)
return api_call
def test_ro_table_writable1(*args):
api_call = _invoke_api('test-ro-table-writable1', *args)
return api_call
def test_rw_method_writable2(*args):
api_call = _invoke_api('test-rw-method-writable2', *args)
return api_call
def test_schema_validator(*args):
api_call = _invoke_api('test-schema-validator', *args)
return api_call
def test_zapi_ro_view_1_readonly6(*args):
api_call = _invoke_api('test-zapi-ro-view-1-readonly6', *args)
return api_call
def test_zapi_ro_view_1_writable4(*args):
api_call = _invoke_api('test-zapi-ro-view-1-writable4', *args)
return api_call
def test_zapi_ro_view_5_create(*args):
api_call = _invoke_api('test-zapi-ro-view-5-create', *args)
return api_call
def test_zapi_ro_view_5_destroy(*args):
api_call = _invoke_api('test-zapi-ro-view-5-destroy', *args)
return api_call
def test_zapi_ro_view_5_destroy_iter(*args):
api_call = _invoke_api('test-zapi-ro-view-5-destroy-iter', *args)
return api_call
def test_zapi_ro_view_5_get(*args):
api_call = _invoke_api('test-zapi-ro-view-5-get', *args)
return api_call
def test_zapi_ro_view_5_get_create_defaults(*args):
api_call = _invoke_api('test-zapi-ro-view-5-get-create-defaults', *args)
return api_call
def test_zapi_ro_view_5_get_iter(*args):
api_call = _invoke_api('test-zapi-ro-view-5-get-iter', *args)
return api_call
def test_zapi_ro_view_5_get_total_records(*args):
api_call = _invoke_api('test-zapi-ro-view-5-get-total-records', *args)
return api_call
def test_zapi_ro_view_5_list_info(*args):
api_call = _invoke_api('test-zapi-ro-view-5-list-info', *args)
return api_call
def test_zapi_ro_view_6_create(*args):
api_call = _invoke_api('test-zapi-ro-view-6-create', *args)
return api_call
def test_zapi_ro_view_6_destroy(*args):
api_call = _invoke_api('test-zapi-ro-view-6-destroy', *args)
return api_call
def test_zapi_ro_view_6_destroy_iter(*args):
api_call = _invoke_api('test-zapi-ro-view-6-destroy-iter', *args)
return api_call
def test_zapi_ro_view_6_get(*args):
api_call = _invoke_api('test-zapi-ro-view-6-get', *args)
return api_call
def test_zapi_ro_view_6_get_create_defaults(*args):
api_call = _invoke_api('test-zapi-ro-view-6-get-create-defaults', *args)
return api_call
def test_zapi_ro_view_6_get_iter(*args):
api_call = _invoke_api('test-zapi-ro-view-6-get-iter', *args)
return api_call
def test_zapi_ro_view_6_get_total_records(*args):
api_call = _invoke_api('test-zapi-ro-view-6-get-total-records', *args)
return api_call
def test_zapi_ro_view_6_list_info(*args):
api_call = _invoke_api('test-zapi-ro-view-6-list-info', *args)
return api_call
def test_zapi_ro_view_6_modify(*args):
api_call = _invoke_api('test-zapi-ro-view-6-modify', *args)
return api_call
def test_zapi_ro_view_6_modify_iter(*args):
api_call = _invoke_api('test-zapi-ro-view-6-modify-iter', *args)
return api_call
def test_zapi_sleep(*args):
api_call = _invoke_api('test-zapi-sleep', *args)
return api_call
def test_zapi_sleep_destroy_async_iter(*args):
api_call = _invoke_api('test-zapi-sleep-destroy-async-iter', *args)
return api_call
def test_zapi_sleep_destroy_iter(*args):
api_call = _invoke_api('test-zapi-sleep-destroy-iter', *args)
return api_call
def test_zapi_sleep_get_iter(*args):
api_call = _invoke_api('test-zapi-sleep-get-iter', *args)
return api_call
def test_zapi_sleep_method_async_iter(*args):
api_call = _invoke_api('test-zapi-sleep-method-async-iter', *args)
return api_call
def test_zapi_sleep_method_iter(*args):
api_call = _invoke_api('test-zapi-sleep-method-iter', *args)
return api_call
def test_zapi_sleep_modify_async_iter(*args):
api_call = _invoke_api('test-zapi-sleep-modify-async-iter', *args)
return api_call
def test_zapi_sleep_modify_iter(*args):
api_call = _invoke_api('test-zapi-sleep-modify-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_async_create(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-create', *args)
return api_call
def test_zapi_smf_mapping_apis_async_destroy(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-destroy', *args)
return api_call
def test_zapi_smf_mapping_apis_async_destroy_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-destroy-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_async_get(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-get', *args)
return api_call
def test_zapi_smf_mapping_apis_async_get_create_defaults(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-get-create-defaults', *args)
return api_call
def test_zapi_smf_mapping_apis_async_get_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-get-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_async_get_total_records(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-get-total-records', *args)
return api_call
def test_zapi_smf_mapping_apis_async_list_info(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-list-info', *args)
return api_call
def test_zapi_smf_mapping_apis_async_modify(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-modify', *args)
return api_call
def test_zapi_smf_mapping_apis_async_modify_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-async-modify-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_create(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-create', *args)
return api_call
def test_zapi_smf_mapping_apis_destroy(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-destroy', *args)
return api_call
def test_zapi_smf_mapping_apis_destroy_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-destroy-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_get(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-get', *args)
return api_call
def test_zapi_smf_mapping_apis_get_create_defaults(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-get-create-defaults', *args)
return api_call
def test_zapi_smf_mapping_apis_get_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-get-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_get_total_records(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-get-total-records', *args)
return api_call
def test_zapi_smf_mapping_apis_list_info(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-list-info', *args)
return api_call
def test_zapi_smf_mapping_apis_method_only_async_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-method-only-async-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_method_only_async_no_query(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-method-only-async-no-query', *args)
return api_call
def test_zapi_smf_mapping_apis_method_only_create(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-method-only-create', *args)
return api_call
def test_zapi_smf_mapping_apis_method_only_default(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-method-only-default', *args)
return api_call
def test_zapi_smf_mapping_apis_method_only_default_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-method-only-default-iter', *args)
return api_call
def test_zapi_smf_mapping_apis_method_only_get(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-method-only-get', *args)
return api_call
def test_zapi_smf_mapping_apis_modify(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-modify', *args)
return api_call
def test_zapi_smf_mapping_apis_modify_iter(*args):
api_call = _invoke_api('test-zapi-smf-mapping-apis-modify-iter', *args)
return api_call
def ucm_adapter_get(*args):
api_call = _invoke_api('ucm-adapter-get', *args)
return api_call
def ucm_adapter_get_iter(*args):
api_call = _invoke_api('ucm-adapter-get-iter', *args)
return api_call
def ucm_adapter_modify(*args):
api_call = _invoke_api('ucm-adapter-modify', *args)
return api_call
def unit_test_ktest_run(*args):
api_call = _invoke_api('unit-test-ktest-run', *args)
return api_call
def virtual_machine_get_info(*args):
api_call = _invoke_api('virtual-machine-get-info', *args)
return api_call
def virtual_machine_system_disks_get_iter(*args):
api_call = _invoke_api('virtual-machine-system-disks-get-iter', *args)
return api_call
def vmservices_vsphere_credential_check(*args):
api_call = _invoke_api('vmservices-vsphere-credential-check', *args)
return api_call
def vmservices_vsphere_credential_get(*args):
api_call = _invoke_api('vmservices-vsphere-credential-get', *args)
return api_call
def vmservices_vsphere_credential_modify(*args):
api_call = _invoke_api('vmservices-vsphere-credential-modify', *args)
return api_call
def volume_aggregate_vacate_async(*args):
api_call = _invoke_api('volume-aggregate-vacate-async', *args)
return api_call
def volume_autobalance_get_iter(*args):
api_call = _invoke_api('volume-autobalance-get-iter', *args)
return api_call
def volume_clone_get_iter(*args):
api_call = _invoke_api('volume-clone-get-iter', *args)
return api_call
def volume_copy_start(*args):
api_call = _invoke_api('volume-copy-start', *args)
return api_call
def volume_footprint_get_iter(*args):
api_call = _invoke_api('volume-footprint-get-iter', *args)
return api_call
def volume_get_iter(*args):
api_call = _invoke_api('volume-get-iter', *args)
return api_call
def volume_modify_iter(*args):
api_call = _invoke_api('volume-modify-iter', *args)
return api_call
def volume_modify_iter_async(*args):
api_call = _invoke_api('volume-modify-iter-async', *args)
return api_call
def volume_move_get_iter(*args):
api_call = _invoke_api('volume-move-get-iter', *args)
return api_call
def volume_move_modify(*args):
api_call = _invoke_api('volume-move-modify', *args)
return api_call
def volume_move_start(*args):
api_call = _invoke_api('volume-move-start', *args)
return api_call
def volume_move_target_aggr_get_iter(*args):
api_call = _invoke_api('volume-move-target-aggr-get-iter', *args)
return api_call
def volume_move_trigger_abort(*args):
api_call = _invoke_api('volume-move-trigger-abort', *args)
return api_call
def volume_move_trigger_cutover(*args):
api_call = _invoke_api('volume-move-trigger-cutover', *args)
return api_call
def volume_recovery_queue_get(*args):
api_call = _invoke_api('volume-recovery-queue-get', *args)
return api_call
def volume_recovery_queue_get_iter(*args):
api_call = _invoke_api('volume-recovery-queue-get-iter', *args)
return api_call
def volume_recovery_queue_modify_retention(*args):
api_call = _invoke_api('volume-recovery-queue-modify-retention', *args)
return api_call
def volume_recovery_queue_purge(*args):
api_call = _invoke_api('volume-recovery-queue-purge', *args)
return api_call
def volume_recovery_queue_recover(*args):
api_call = _invoke_api('volume-recovery-queue-recover', *args)
return api_call
def volume_rehost(*args):
api_call = _invoke_api('volume-rehost', *args)
return api_call
def volume_space_get_iter(*args):
api_call = _invoke_api('volume-space-get-iter', *args)
return api_call
def volume_storage_service_get_iter(*args):
api_call = _invoke_api('volume-storage-service-get-iter', *args)
return api_call
def volume_transition(*args):
api_call = _invoke_api('volume-transition', *args)
return api_call
def volume_transition_prepare_to_downgrade(*args):
api_call = _invoke_api('volume-transition-prepare-to-downgrade', *args)
return api_call
def volume_transition_protect(*args):
api_call = _invoke_api('volume-transition-protect', *args)
return api_call
def vscan_active_scanner_pool_get_iter(*args):
api_call = _invoke_api('vscan-active-scanner-pool-get-iter', *args)
return api_call
def vscan_connection_extended_stats_get_iter(*args):
api_call = _invoke_api('vscan-connection-extended-stats-get-iter', *args)
return api_call
def vscan_connection_status_all_get_iter(*args):
api_call = _invoke_api('vscan-connection-status-all-get-iter', *args)
return api_call
def vscan_events_get_iter(*args):
api_call = _invoke_api('vscan-events-get-iter', *args)
return api_call
def vscan_on_access_policy_get_iter(*args):
api_call = _invoke_api('vscan-on-access-policy-get-iter', *args)
return api_call
def vscan_scanner_pool_get_iter(*args):
api_call = _invoke_api('vscan-scanner-pool-get-iter', *args)
return api_call
def vscan_status_get_iter(*args):
api_call = _invoke_api('vscan-status-get-iter', *args)
return api_call
def vserver_add_aggregates(*args):
api_call = _invoke_api('vserver-add-aggregates', *args)
return api_call
def vserver_add_protocols(*args):
api_call = _invoke_api('vserver-add-protocols', *args)
return api_call
def vserver_config_diff_get(*args):
api_call = _invoke_api('vserver-config-diff-get', *args)
return api_call
def vserver_config_diff_get_iter(*args):
api_call = _invoke_api('vserver-config-diff-get-iter', *args)
return api_call
def vserver_create(*args):
api_call = _invoke_api('vserver-create', *args)
return api_call
def vserver_destroy(*args):
api_call = _invoke_api('vserver-destroy', *args)
return api_call
def vserver_get_iter(*args):
api_call = _invoke_api('vserver-get-iter', *args)
return api_call
def vserver_login_banner_get_iter(*args):
api_call = _invoke_api('vserver-login-banner-get-iter', *args)
return api_call
def vserver_login_banner_modify_iter(*args):
api_call = _invoke_api('vserver-login-banner-modify-iter', *args)
return api_call
def vserver_modify(*args):
api_call = _invoke_api('vserver-modify', *args)
return api_call
def vserver_modify_iter(*args):
api_call = _invoke_api('vserver-modify-iter', *args)
return api_call
def vserver_motd_get_iter(*args):
api_call = _invoke_api('vserver-motd-get-iter', *args)
return api_call
def vserver_motd_modify_iter(*args):
api_call = _invoke_api('vserver-motd-modify-iter', *args)
return api_call
def vserver_peer_accept(*args):
api_call = _invoke_api('vserver-peer-accept', *args)
return api_call
def vserver_peer_check_peer_table(*args):
api_call = _invoke_api('vserver-peer-check-peer-table', *args)
return api_call
def vserver_peer_create(*args):
api_call = _invoke_api('vserver-peer-create', *args)
return api_call
def vserver_peer_delete(*args):
api_call = _invoke_api('vserver-peer-delete', *args)
return api_call
def vserver_peer_get_iter(*args):
api_call = _invoke_api('vserver-peer-get-iter', *args)
return api_call
def vserver_peer_modify(*args):
api_call = _invoke_api('vserver-peer-modify', *args)
return api_call
def vserver_peer_reject(*args):
api_call = _invoke_api('vserver-peer-reject', *args)
return api_call
def vserver_peer_resume(*args):
api_call = _invoke_api('vserver-peer-resume', *args)
return api_call
def vserver_peer_suspend(*args):
api_call = _invoke_api('vserver-peer-suspend', *args)
return api_call
def vserver_peer_transition_create(*args):
api_call = _invoke_api('vserver-peer-transition-create', *args)
return api_call
def vserver_peer_transition_destroy(*args):
api_call = _invoke_api('vserver-peer-transition-destroy', *args)
return api_call
def vserver_peer_transition_destroy_iter(*args):
api_call = _invoke_api('vserver-peer-transition-destroy-iter', *args)
return api_call
def vserver_peer_transition_get(*args):
api_call = _invoke_api('vserver-peer-transition-get', *args)
return api_call
def vserver_peer_transition_get_iter(*args):
api_call = _invoke_api('vserver-peer-transition-get-iter', *args)
return api_call
def vserver_peer_transition_modify(*args):
api_call = _invoke_api('vserver-peer-transition-modify', *args)
return api_call
def vserver_remove_aggregates(*args):
api_call = _invoke_api('vserver-remove-aggregates', *args)
return api_call
def vserver_remove_protocols(*args):
api_call = _invoke_api('vserver-remove-protocols', *args)
return api_call
def vserver_rename(*args):
api_call = _invoke_api('vserver-rename', *args)
return api_call
def vserver_saninit(*args):
api_call = _invoke_api('vserver-saninit', *args)
return api_call
def vserver_start(*args):
api_call = _invoke_api('vserver-start', *args)
return api_call
def vserver_stop(*args):
api_call = _invoke_api('vserver-stop', *args)
return api_call
def vserver_unlock(*args):
api_call = _invoke_api('vserver-unlock', *args)
return api_call
def xml_to_dict(xml):
return xmltodict.parse(xml)
def normalize_unicode(result):
'''
Takes the dictionary @result from xml_to_dict and normalizes the
unicode characters.
Returns a new dictionary with no more unicode characters
'''
d = {}
for key,value in result.iteritems():
if isinstance(key, unicode):
key = unicodedata.normalize('NFKD', key).encode('ascii', 'ignore')
if isinstance(value, unicode):
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
d[key] = value
return d
def apicall_to_dict(api_call):
'''
Takes the apicall result, and transforms it into a dictionary
'''
xml = api_call.sprintf()
return xml_to_dict(xml)
def _invoke_api(*args):
api = NaElement(*args)
call = conn.invoke_elem(api)
if call.results_errno() != 0:
raise IOError('Failed api call=%s, errno=%s, desc=%s'
%(args, call.results_errno(), call.sprintf())
)
return call
| 31.051721 | 105 | 0.746893 |
a16960a34cd77801388be60ece4d46e570646fb9 | 3,104 | lua | Lua | packages/x/xz/xmake.lua | ImperatorS79/xmake-repo | b4cee6bcb2f8ff1ce9ab1dc1d6acccefe65f5304 | [
"Apache-2.0"
] | 241 | 2019-02-08T09:00:49.000Z | 2022-03-31T08:46:56.000Z | packages/x/xz/xmake.lua | ImperatorS79/xmake-repo | b4cee6bcb2f8ff1ce9ab1dc1d6acccefe65f5304 | [
"Apache-2.0"
] | 415 | 2019-02-08T09:25:24.000Z | 2022-03-31T07:57:04.000Z | packages/x/xz/xmake.lua | ImperatorS79/xmake-repo | b4cee6bcb2f8ff1ce9ab1dc1d6acccefe65f5304 | [
"Apache-2.0"
] | 189 | 2019-04-02T12:19:59.000Z | 2022-03-30T16:42:53.000Z | package("xz")
set_homepage("https://tukaani.org/xz/")
set_description("General-purpose data compression with high compression ratio.")
set_urls("https://downloads.sourceforge.net/project/lzmautils/xz-$(version).tar.gz",
"https://tukaani.org/xz/xz-$(version).tar.gz")
add_versions("5.2.5", "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10")
on_load(function (package)
if is_plat(os.host()) then
package:addenv("PATH", "bin")
end
if package:is_plat("windows") and not package:config("shared") then
package:add("defines", "LZMA_API_STATIC")
end
end)
on_install("windows", "mingw@windows", function (package)
local configs = {}
if package:config("shared") then
configs.kind = "shared"
end
io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug")
target("lzma")
set_kind("$(kind)")
add_defines("HAVE_CONFIG_H")
add_includedirs("src/common",
"src/liblzma/common",
"src/liblzma/api",
"src/liblzma/check",
"src/liblzma/delta",
"src/liblzma/lz",
"src/liblzma/lzma",
"src/liblzma/rangecoder",
"src/liblzma/simple",
--2013/2017/2019 config.h is the same
"windows/vs2013")
add_files("src/common/tuklib_cpucores.c",
"src/common/tuklib_physmem.c",
"src/liblzma/check/*.c|*_small.c|*_tablegen.c",
"src/liblzma/common/*.c",
"src/liblzma/delta/*.c",
"src/liblzma/lzma/*.c|*_tablegen.c",
"src/liblzma/lz/*.c",
"src/liblzma/rangecoder/price_table.c",
"src/liblzma/simple/*.c")
if is_kind("shared") and is_plat("windows") then
add_defines("DLL_EXPORT")
end
add_headerfiles("src/liblzma/api/*.h")
add_headerfiles("src/liblzma/api/(lzma/*.h)")
]])
import("package.tools.xmake").install(package, configs)
end)
on_install("macosx", "linux", "mingw@linux,macosx", function (package)
local configs = {"--disable-dependency-tracking", "--disable-silent-rules"}
if package:debug() then
table.insert(configs, "--enable-debug")
end
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-shared=no")
end
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("lzma_code", {includes = "lzma.h"}))
end)
| 41.945946 | 93 | 0.506121 |
24b009d138f4ec385f2f17d83119d4bb229caa0f | 5,906 | rs | Rust | src/core/mod.rs | nlanson/btc-hashes | cca8b416d99f50825354c9be4d8bc9c1a9bc5a58 | [
"MIT"
] | null | null | null | src/core/mod.rs | nlanson/btc-hashes | cca8b416d99f50825354c9be4d8bc9c1a9bc5a58 | [
"MIT"
] | null | null | null | src/core/mod.rs | nlanson/btc-hashes | cca8b416d99f50825354c9be4d8bc9c1a9bc5a58 | [
"MIT"
] | null | null | null | // Core module
//
// Where all the core parts of the Sha2 hash function family reside.
// This can be done because most parts are shared between the different
// hash functions.
pub mod message;
pub mod functions;
use std::ops::{
Add, Rem, BitXor, BitAnd, Not, Shr
};
use std::convert::TryFrom;
pub trait HashEngine: Default {
type Digest: Into<Vec<u8>> + IntoIterator<Item=u8> + TryFrom<Vec<u8>> + AsRef<[u8]> + Copy;
type Midstate: Copy;
const BLOCKSIZE: usize;
fn input<I>(&mut self, data: I) where I: AsRef<[u8]>;
fn reset(&mut self);
fn midstate(&self) -> Self::Midstate;
fn from_midstate(&mut self, midstate: Self::Midstate, length: usize);
fn finalise(&mut self) -> Self::Digest;
}
pub trait KeyBasedHashEngine: HashEngine {
fn new_with_key<I>(key: I) -> Self
where I: AsRef<[u8]>;
}
#[derive(Clone, Copy, Debug)]
pub struct State<T: Copy, const N: usize> {
registers: [T; N]
}
impl<T: Copy, const N: usize> State<T, N> {
pub fn init(constants: [T; N]) -> State<T, N> {
State {
registers: constants
}
}
/// Reads the state as the data type it is stored in.
/// u32 or u64 in the case of SHA2 or RIPEMD
pub fn read(&self) -> [T; N] {
self.registers
}
pub fn update(&mut self, new_state: [T; N]) {
self.registers = new_state;
}
}
/// Primitive trait
pub trait Primitive:
Into<u128> +
From<u32> +
Add +
Rem +
BitAnd<Output = Self> +
BitXor<Output = Self> +
Not<Output = Self> +
Shr<usize, Output = Self> +
Copy
{
fn rotr(&self, bits: usize) -> Self;
fn to_bytes(&self) -> Vec<u8>;
}
impl Primitive for u32 {
fn rotr(&self, bits: usize) -> Self {
self.rotate_right(bits as u32)
}
fn to_bytes(&self) -> Vec<u8> {
self.to_be_bytes().to_vec()
}
}
impl Primitive for u64{
fn rotr(&self, bits: usize) -> Self {
self.rotate_right(bits as u32)
}
fn to_bytes(&self) -> Vec<u8> {
self.to_be_bytes().to_vec()
}
}
/// Macro to create a new struct
macro_rules! hash_struct {
($name: ident, $block_size: expr, $length: ty, $state: ty, $state_len: expr) => {
#[derive(Clone, Copy, Debug)]
pub struct $name {
buffer: [u8; $block_size],
length: $length, // The length here is in bytes.
state: State<$state, $state_len>
}
};
}
/// Macro to implement functions that require initial constants.
macro_rules! iconst_funcs {
($iconsts: expr, $block_size: expr) => {
fn reset(&mut self) {
self.buffer = [0; $block_size];
self.length = 0;
self.state = State::init($iconsts)
}
};
}
/// Functions related to midstate
macro_rules! midstate_funcs {
($length_ty: ty) => {
fn midstate(&self) -> Self::Midstate {
self.state.read() // extracting the entire state without omitting registers
}
fn from_midstate(&mut self, midstate: Self::Midstate, length: usize) {
// If the length mod blocksize is not zero, panic.
// This is done because, the hasher has no way of knowing whether there was any
// data in the hasher's buffer that is unaccounted for in the given state.
assert_eq!(length%Self::BLOCKSIZE, 0);
self.length = length as $length_ty;
self.state.update(midstate);
}
}
}
/// Macro to implement hash function data inputting
macro_rules! input_func {
(
$length_ty: ty
) => {
fn input<I>(&mut self, data: I) //Code for this function was sourced from bitcoin-hashes crate and adapted to this library. Thanks :)
where I: AsRef<[u8]> {
let mut input = data.as_ref();
//while there is still data in the input slice...
while input.len() != 0 {
let buffer_index = self.length as usize%Self::BLOCKSIZE; // Get the current index of the buffer
let r = Self::BLOCKSIZE - buffer_index; // Get the remaining length of the buffer until BLOCKSIZE
let to_write = std::cmp::min(r, input.len()); // Get the length of the data to copy into the buffer (which ever is smaller, remaining length of the buffer or the remaining length of the input.)
// Insert the required amount of input data into the buffer
self.buffer[buffer_index..buffer_index+to_write].copy_from_slice(&input[..to_write]);
self.length += to_write as $length_ty; // Add to the total length of the data being hashed
// If the total length mod BLOCKSIZE is zero, that means we have enough new data in the buffer
// to process a block. (if buffer_index+to_write == Self::BLOCKSIZE)
if self.length%(Self::BLOCKSIZE as $length_ty) == 0 {
let blocks: Vec<MessageBlock<{Self::BLOCKSIZE}>> = MessageBlock::from_message(Message::new(self.buffer[..Self::BLOCKSIZE].to_vec()));
assert_eq!(blocks.len(), 1);
Self::process_block(&mut self.state, blocks[0]);
}
input = &input[to_write..]; // Remove the data we placed into the buffer from the input
}
}
};
}
macro_rules! impl_default {
($name: ident, $iconsts: expr, $block_size: expr) => {
impl Default for $name {
fn default() -> Self {
Self {
buffer: [0; $block_size],
length: 0,
state: State::init($iconsts)
}
}
}
};
}
pub(crate) use hash_struct;
pub(crate) use iconst_funcs;
pub(crate) use midstate_funcs;
pub(crate) use input_func;
pub(crate) use impl_default; | 30.601036 | 222 | 0.575008 |
07801aebfacde940e90d3a787f17cb008a963c62 | 266 | css | CSS | src/themes/default/lbfUI/css/Gotop.css | webfrontzhifei/school_stytem | 89c5307c7514684860005b0e64e00944062b966b | [
"MIT"
] | 1 | 2017-06-02T10:27:45.000Z | 2017-06-02T10:27:45.000Z | src/themes/default/lbfUI/css/Gotop.css | webfrontzhifei/school_stytem | 89c5307c7514684860005b0e64e00944062b966b | [
"MIT"
] | null | null | null | src/themes/default/lbfUI/css/Gotop.css | webfrontzhifei/school_stytem | 89c5307c7514684860005b0e64e00944062b966b | [
"MIT"
] | null | null | null | .lbf-gotop {}
.lbf-gotop a { position:fixed; display:block; width:38px; height:38px; right:40px; bottom:35px; opacity:0.8; filter:alpha(opacity=80); background:url(../images/Gotop/gotop.png) no-repeat 0 0;}
.lbf-gotop a:hover { opacity:1; filter:alpha(opacity=100);} | 88.666667 | 192 | 0.729323 |
40b41e7b482068227eec19b176289c6630fadc19 | 1,862 | swift | Swift | CEF.swift/Handlers/CEFDragHandler.swift | awmcclain/CEF.swift | 620a4fdd0f2d131e9d87913dcf08d3ad96dabdf8 | [
"BSD-3-Clause"
] | 77 | 2015-09-28T08:33:06.000Z | 2022-01-26T16:05:40.000Z | CEF.swift/Handlers/CEFDragHandler.swift | awmcclain/CEF.swift | 620a4fdd0f2d131e9d87913dcf08d3ad96dabdf8 | [
"BSD-3-Clause"
] | 63 | 2015-09-03T19:18:01.000Z | 2022-01-17T12:54:58.000Z | CEF.swift/Handlers/CEFDragHandler.swift | awmcclain/CEF.swift | 620a4fdd0f2d131e9d87913dcf08d3ad96dabdf8 | [
"BSD-3-Clause"
] | 26 | 2015-09-28T08:21:58.000Z | 2021-11-11T13:51:22.000Z | //
// CEFDragHandler.swift
// CEF.swift
//
// Created by Tamas Lustyik on 2015. 08. 11..
// Copyright © 2015. Tamas Lustyik. All rights reserved.
//
import Foundation
public enum CEFOnDragEnterAction {
/// Perform the default drag handling behavior
case Accept
/// Cancel the drag event
case Cancel
}
extension CEFOnDragEnterAction: BooleanType {
public var boolValue: Bool { return self == .Cancel }
}
/// Implement this interface to handle events related to dragging. The methods of
/// this class will be called on the UI thread.
public protocol CEFDragHandler {
/// Called when an external drag event enters the browser window. |dragData|
/// contains the drag event data and |mask| represents the type of drag
/// operation. Return false for default drag handling behavior or true to
/// cancel the drag event.
func onDragEnter(browser: CEFBrowser,
dragData: CEFDragData,
operationMask: CEFDragOperationsMask) -> CEFOnDragEnterAction
/// Called whenever draggable regions for the browser window change. These can
/// be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
/// draggable regions are never defined in a document this method will also
/// never be called. If the last draggable region is removed from a document
/// this method will be called with an empty vector.
func onDraggableRegionsChanged(browser: CEFBrowser, regions: [CEFDraggableRegion])
}
public extension CEFDragHandler {
func onDragEnter(browser: CEFBrowser,
dragData: CEFDragData,
operationMask: CEFDragOperationsMask) -> CEFOnDragEnterAction {
return .Accept
}
func onDraggableRegionsChanged(browser: CEFBrowser, regions: [CEFDraggableRegion]) {
}
}
| 32.666667 | 88 | 0.690655 |
45ce5ccd85f1380d7754f2f92dc762699a2031cf | 1,152 | lua | Lua | lua/nvim-lsp-installer/servers/phpactor/init.lua | BliznyukNM/nvim-lsp-installer | 10f4fb17d982d2ced01552f3bd5bdd9987c3bb54 | [
"Apache-2.0"
] | 1,177 | 2021-04-05T00:41:15.000Z | 2022-03-31T15:31:21.000Z | lua/nvim-lsp-installer/servers/phpactor/init.lua | BliznyukNM/nvim-lsp-installer | 10f4fb17d982d2ced01552f3bd5bdd9987c3bb54 | [
"Apache-2.0"
] | 320 | 2021-04-05T16:51:05.000Z | 2022-03-31T06:08:47.000Z | lua/nvim-lsp-installer/servers/phpactor/init.lua | BliznyukNM/nvim-lsp-installer | 10f4fb17d982d2ced01552f3bd5bdd9987c3bb54 | [
"Apache-2.0"
] | 133 | 2021-04-08T08:44:01.000Z | 2022-03-31T23:15:46.000Z | local installers = require "nvim-lsp-installer.installers"
local path = require "nvim-lsp-installer.path"
local server = require "nvim-lsp-installer.server"
local composer = require "nvim-lsp-installer.installers.composer"
local std = require "nvim-lsp-installer.installers.std"
local context = require "nvim-lsp-installer.installers.context"
local process = require "nvim-lsp-installer.process"
return function(name, root_dir)
return server.Server:new {
name = name,
root_dir = root_dir,
homepage = "https://phpactor.readthedocs.io/en/master/",
languages = { "php" },
installer = installers.when {
unix = {
std.git_clone "https://github.com/phpactor/phpactor.git",
composer.install(),
context.receipt(function(receipt)
receipt:with_primary_source(receipt.git_remote "https://github.com/phpactor/phpactor.git")
end),
},
},
default_options = {
cmd_env = {
PATH = process.extend_path { path.concat { root_dir, "bin" } },
},
},
}
end
| 37.16129 | 110 | 0.611111 |
cc5c121603c3eaf9c3845a5ddd7b6f593d168260 | 1,687 | ps1 | PowerShell | src/Test-ProgramInstalled.ps1 | stevenaubertin/powershell-repository | 3b238c2c633a458d3beed9d4a672163073e694c7 | [
"MIT"
] | null | null | null | src/Test-ProgramInstalled.ps1 | stevenaubertin/powershell-repository | 3b238c2c633a458d3beed9d4a672163073e694c7 | [
"MIT"
] | null | null | null | src/Test-ProgramInstalled.ps1 | stevenaubertin/powershell-repository | 3b238c2c633a458d3beed9d4a672163073e694c7 | [
"MIT"
] | null | null | null |
<#PSScriptInfo
.VERSION 1.0
.GUID 6164cc42-9e95-49eb-b8eb-d9f5285fdbb9
.AUTHOR [email protected]
.COMPANYNAME
.COPYRIGHT (c) 2018
.TAGS
.LICENSEURI https://github.com/stevenaubertin/powershell-repository/blob/master/LICENSE.md
.PROJECTURI https://github.com/stevenaubertin/powershell-repository
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES
.PRIVATEDATA
#>
<#
.DESCRIPTION
Returns true if a program with the specified display name is installed.
This function will check both the regular Uninstall location as well as the
"Wow6432Node" location to ensure that both 32-bit and 64-bit locations are
checked for software installations.
@param String $Name The name of the program to check for.
@return Booleam Returns true if a program matching the specified name is installed.
This script is inspired from : https://www.reich-consulting.net/support/lan-administration/check-if-a-program-is-installed-using-powershell-3/
#>
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True, Position=1)]
[string]$Name
)
$InstallationPathx86 = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall"
$InstallationPathx64 = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
function Test-Installed {
param (
[Parameter(Mandatory=$True, Position=1)]
[string]$InstallationPath
)
return ((Get-ChildItem $InstallationPath) | Where-Object { $_.GetValue( "DisplayName" ) -like "*$Name*" } ).Length -gt 0
}
$x86 = Test-Installed -InstallationPath $InstallationPathx86;
$x64 = Test-Installed -InstallationPath $InstallationPathx64;
return $x86 -or $x64; | 24.449275 | 143 | 0.7623 |
a48c277d7b0fd6617af1a1279b2c8a71e13d9590 | 1,646 | php | PHP | application/modules/transaksi/views/transaksi_read.php | purjayadi/project | a369fb0f8d7b9021bafb218bc3f73c4a766547b4 | [
"MIT"
] | null | null | null | application/modules/transaksi/views/transaksi_read.php | purjayadi/project | a369fb0f8d7b9021bafb218bc3f73c4a766547b4 | [
"MIT"
] | 1 | 2018-10-02T03:51:23.000Z | 2018-10-03T04:03:08.000Z | application/modules/transaksi/views/transaksi_read.php | purjayadi/project | a369fb0f8d7b9021bafb218bc3f73c4a766547b4 | [
"MIT"
] | 1 | 2018-09-15T05:08:17.000Z | 2018-09-15T05:08:17.000Z | <div class="col-md-6 col-xs-12" style="border: 1px solid #ccc">
<div class="x_panel">
<div class="x_title">
<h2>Detail Transaksi</h2>
<ul class="nav navbar-right panel_toolbox" style="min-width: 45px;">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
<li class="dropdown">
</li>
<li><a class="close-link"><i class="fa fa-close"></i></a>
</li>
</ul>
<div class="clearfix"></div>
</div><br>
<div class="x_content">
<table class="table table-hover dt-responsive nowrap">
<tr><td>Id Transaksi</td><td>:</td><td><?php echo $id_transaksi; ?></td></tr>
<tr><td>Barang ID</td><td>:</td><td><?php echo $wp_barang_id; ?></td></tr>
<tr><td>Harga</td><td>:</td><td><?php echo $harga; ?></td></tr>
<tr><td>Qty</td><td>:</td><td><?php echo $qty; ?></td></tr>
<tr><td>Satuan</td><td>:</td><td><?php echo $satuan; ?></td></tr>
<tr><td>Tgl Transaksi</td><td>:</td><td><?php echo $tgl_transaksi; ?></td></tr>
<tr><td>Updated At</td><td>:</td><td><?php echo $updated_at; ?></td></tr>
<tr><td>Pelanggan Id</td><td>:</td><td><?php echo $wp_pelanggan_id; ?></td></tr>
<tr><td>Username</td><td>:</td><td><?php echo $username; ?></td></tr>
<tr><td>Status Id</td><td>:</td><td><?php echo $wp_status_id; ?></td></tr>
<tr><td colspan="3" align="center"><a href="<?php echo site_url('transaksi') ?>" class="btn btn-danger">Kembali</a></td></tr>
</table>
</div>
</div>
</div
| 51.4375 | 132 | 0.50243 |
0a6e977f4be21bbf7e87f52a4f5fc21c5af1600c | 270 | swift | Swift | Animatify/Extensions/FoundationExtensions.swift | Azzaknight/Animatify-ios | 3f328621c956e350e4e4ed6cd3285b26156fe4ac | [
"Apache-2.0"
] | null | null | null | Animatify/Extensions/FoundationExtensions.swift | Azzaknight/Animatify-ios | 3f328621c956e350e4e4ed6cd3285b26156fe4ac | [
"Apache-2.0"
] | null | null | null | Animatify/Extensions/FoundationExtensions.swift | Azzaknight/Animatify-ios | 3f328621c956e350e4e4ed6cd3285b26156fe4ac | [
"Apache-2.0"
] | 1 | 2020-07-13T13:15:23.000Z | 2020-07-13T13:15:23.000Z | //
// FoundationExtensions.swift
// Animatify
//
// Created by Shubham Singh on 27/06/20.
// Copyright © 2020 Shubham Singh. All rights reserved.
//
import UIKit
extension CGFloat {
func degreeToRadians() -> CGFloat {
return (self * .pi) / 180
}
}
| 16.875 | 56 | 0.640741 |
b8ae70c3353dce631e8c78fcfc6747774aed046d | 451 | h | C | install/halodi_msgs/include/halodi_msgs/msg/hand_command.h | AHGOverbeek/halodi-messages | 4286676cb85cc4d5b2684523c1482afc9eef6ec9 | [
"Apache-2.0"
] | null | null | null | install/halodi_msgs/include/halodi_msgs/msg/hand_command.h | AHGOverbeek/halodi-messages | 4286676cb85cc4d5b2684523c1482afc9eef6ec9 | [
"Apache-2.0"
] | 3 | 2020-11-05T14:53:41.000Z | 2021-04-27T13:40:47.000Z | install/halodi_msgs/include/halodi_msgs/msg/hand_command.h | AHGOverbeek/halodi-messages | 4286676cb85cc4d5b2684523c1482afc9eef6ec9 | [
"Apache-2.0"
] | 1 | 2021-10-05T14:08:08.000Z | 2021-10-05T14:08:08.000Z | // generated from rosidl_generator_c/resource/idl.h.em
// with input from halodi_msgs:msg/HandCommand.idl
// generated code does not contain a copyright notice
#ifndef HALODI_MSGS__MSG__HAND_COMMAND_H_
#define HALODI_MSGS__MSG__HAND_COMMAND_H_
#include "halodi_msgs/msg/hand_command__struct.h"
#include "halodi_msgs/msg/hand_command__functions.h"
#include "halodi_msgs/msg/hand_command__type_support.h"
#endif // HALODI_MSGS__MSG__HAND_COMMAND_H_
| 34.692308 | 55 | 0.842572 |
a3619d771a9cbfe040e225aedd6ad4d58a065033 | 14,912 | java | Java | src/main/scala/org/chocosolver/sat/PropSat.java | pablosjv/aco-spark | 37d33a8d8ef56b1e9e5f5b754162b7deba225cae | [
"Apache-2.0"
] | 5 | 2019-05-01T15:41:56.000Z | 2021-03-04T05:09:02.000Z | src/main/java/org/chocosolver/sat/PropSat.java | philippe3263/choco-solver | f0148cc864dac946271f5959a7e2a00ffe1d9f92 | [
"BSD-4-Clause"
] | null | null | null | src/main/java/org/chocosolver/sat/PropSat.java | philippe3263/choco-solver | f0148cc864dac946271f5959a7e2a00ffe1d9f92 | [
"BSD-4-Clause"
] | 1 | 2020-05-11T07:40:18.000Z | 2020-05-11T07:40:18.000Z | /**
* This file is part of choco-solver, http://choco-solver.org/
*
* Copyright (c) 2017, IMT Atlantique. All rights reserved.
*
* Licensed under the BSD 4-clause license.
* See LICENSE file in the project root for full license information.
*/
package org.chocosolver.sat;
import gnu.trove.list.TIntList;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.map.hash.TIntObjectHashMap;
import gnu.trove.map.hash.TObjectIntHashMap;
import org.chocosolver.memory.IStateInt;
import org.chocosolver.solver.Model;
import org.chocosolver.solver.constraints.Propagator;
import org.chocosolver.solver.constraints.PropagatorPriority;
import org.chocosolver.solver.exception.ContradictionException;
import org.chocosolver.solver.explanations.RuleStore;
import org.chocosolver.solver.variables.BoolVar;
import org.chocosolver.solver.variables.IntVar;
import org.chocosolver.solver.variables.events.IEventType;
import org.chocosolver.solver.variables.events.IntEventType;
import org.chocosolver.util.ESat;
import java.util.ArrayList;
import static org.chocosolver.sat.SatSolver.*;
/**
* A propagator to deal with clauses and interface a {@link SatSolver}.
* <br/>
*
* @author Charles Prud'homme
* @since 12/07/13
*/
public class PropSat extends Propagator<BoolVar> {
/**
* The SAT solver
*/
private SatSolver sat_;
/**
* Map between BoolVar and its literal
*/
private TObjectIntHashMap<BoolVar> indices_;
/**
* For comparison with SAT solver trail, to deal properly with backtrack
*/
private IStateInt sat_trail_;
/**
* List of early deduction literals
*/
private TIntList early_deductions_;
/**
* Local-like parameter, for #why() method only, lazily initialized.
*/
private TIntObjectHashMap<ArrayList<SatSolver.Clause>> inClauses;
/**
* Store new added variables when {@link #initialized} is <i>false</i>
*/
private ArrayList<BoolVar> add_var;
/**
* Indicates if this is initialized or not
*/
private boolean initialized = false;
/**
* Create a (unique) propagator for clauses recording and propagation.
*
* @param model the solver that declares the propagator
*/
public PropSat(Model model) {
// this propagator initially has no variable
super(new BoolVar[]{model.boolVar(true)}, PropagatorPriority.VERY_SLOW, true);// adds solver.ONE to fit to the super constructor
this.vars = new BoolVar[0]; // erase model.ONE from the variable scope
this.indices_ = new TObjectIntHashMap<>(16,.5f, -1);
sat_ = new SatSolver();
early_deductions_ = new TIntArrayList();
sat_trail_ = model.getEnvironment().makeInt();
add_var = new ArrayList<>(16);
}
@Override
public int getPropagationConditions(int vIdx) {
return IntEventType.instantiation();
}
@Override
public void propagate(int evtmask) throws ContradictionException {
assert initialized:"PropSat is not initialized";
if (!sat_.ok_) fails();
sat_.cancelUntil(0);
storeEarlyDeductions();
applyEarlyDeductions();
for (int i = 0; i < vars.length; ++i) {
BoolVar var = vars[i];
if (var.isInstantiated()) {
VariableBound(i);
}
}
}
@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
VariableBound(idxVarInProp);
}
@Override
public ESat isEntailed() {
if (isCompletelyInstantiated()) {
int var, val;
boolean sign;
for (int k : sat_.implies_.keys()) {
sign = sign(negated(k));
var = var(k);
val = vars[var].getValue();
if (val == (sign ? 0 : 1)) {
TIntList lits = sat_.implies_.get(k);
for (int l : lits.toArray()) {
sign = sign(l);
var = var(l);
val = vars[var].getValue();
if (val == (sign ? 0 : 1)) {
return ESat.FALSE;
}
}
}
}
boolean OK = clauseEntailed(sat_.clauses);
OK &= clauseEntailed(sat_.learnts);
return ESat.eval(OK);
}
return ESat.UNDEFINED;
}
/**
* Checks if all clauses from <code>clauses</code> are satisfied
* @param clauses list of clause
* @return <tt>true</tt> if all clauses are satisfied, <tt>false</tt> otherwise
*/
private boolean clauseEntailed(ArrayList<SatSolver.Clause> clauses) {
int lit, var, val;
boolean sign;
for (SatSolver.Clause c : clauses) {
int cnt = 0;
for (int i = 0; i < c.size(); i++) {
lit = c._g(i);
sign = sign(lit);
var = var(lit);
val = vars[var].getValue();
if (val == (sign ? 0 : 1)) cnt++; // if the lit is ok
else break;
}
if (cnt == c.size()) return false;
}
return true;
}
/**
* @return the underlying SAT solver
*/
public SatSolver getSatSolver() {
return sat_;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Initializes this propagator
*/
public void initialize() {
if (!initialized) {
if (add_var.size() > 0) {
addVariable(add_var.toArray(new BoolVar[add_var.size()]));
}
add_var.clear();
this.initialized = true;
}
}
/**
* Creates, or returns if already existing, the literal corresponding to :
* <p>
* <code>expr</code> is <tt>true</tt>
* <p>
* The negation of the literal is managed outside.
*
* @param expr a boolean variable
* @return its literal
*/
public int makeVar(BoolVar expr) {
int var = indices_.get(expr);
if (var == -1) {
var = sat_.newVariable();
assert (vars.length + add_var.size() == var);
if(initialized) {
addVariable(expr);
}else {
add_var.add(expr);
}
indices_.put(expr, var);
}
return var;
}
/**
* Creates, or returns if already existing, the literal corresponding to :
* <p>
* <code>expr</code> is <tt>true</tt>
* <p>
* The negation of the literal is managed outside.
*
* @param expr a boolean variable
* @param sign true for even
* @return its literal
*/
public int makeLiteral(BoolVar expr, boolean sign) {
return SatSolver.makeLiteral(makeVar(expr), sign);
}
/**
* The value of the <code>index</code>^th literal is known.
*
* @param index position of the literal
* @throws ContradictionException if inconsistency is detected
*/
private void VariableBound(int index) throws ContradictionException {
try {
if (sat_trail_.get() < sat_.trailMarker()) {
sat_.cancelUntil(sat_trail_.get());
assert (sat_trail_.get() == sat_.trailMarker());
}
int var = index;
boolean sign = vars[index].getValue() != 0;
int lit = SatSolver.makeLiteral(var, sign);
boolean fail = !sat_.propagateOneLiteral(lit);
// Remark: explanations require to instantiated variables even if fail is set to true
sat_trail_.set(sat_.trailMarker());
for (int i = 0; i < sat_.touched_variables_.size(); ++i) {
lit = sat_.touched_variables_.get(i);
var = var(lit);
boolean assigned_bool = sign(lit);
vars[var].instantiateTo(assigned_bool ? 1 : 0, this);
}
if (fail) {
// force failure by removing the last value
vars[index].instantiateTo(1 - vars[index].getValue(), this);
}
}finally {
sat_.touched_variables_.resetQuick(); // issue#327
}
}
public void beforeAddingClauses(){
if (sat_trail_.get() < sat_.trailMarker()) {
sat_.cancelUntil(sat_trail_.get());
assert (sat_trail_.get() == sat_.trailMarker());
}
}
public void afterAddingClauses(){
storeEarlyDeductions();
}
/**
* Add a clause to SAT solver
*
* @param lits clause
* @return <tt>false</tt> if failure is detected
*/
public boolean addClause(TIntList lits) {
boolean result = sat_.addClause(lits);
storeEarlyDeductions();
return result;
}
/**
* Add learnt clause to SAT solver
*
* @param lits clause
*/
public void addLearnt(int... lits) {
sat_.learnClause(lits);
forcePropagationOnBacktrack(); // issue#327
// early deductions of learnt clause may lead to incorrect behavior on backtrack
// since early deduction is not backtrackable.
}
private void storeEarlyDeductions() {
for (int i = 0; i < sat_.touched_variables_.size(); ++i) {
int lit = sat_.touched_variables_.get(i);
early_deductions_.add(lit);
}
sat_.touched_variables_.resetQuick();
}
private void applyEarlyDeductions() throws ContradictionException {
for (int i = 0; i < early_deductions_.size(); ++i) {
int lit = early_deductions_.get(i);
int var = var(lit);
boolean assigned_bool = sign(lit);
// demons_[var.value()].inhibit(solver());
vars[var].instantiateTo(assigned_bool ? 1 : 0, this);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@Override
public boolean why(RuleStore ruleStore, IntVar bvar, IEventType evt, int bvalue) {
if (inClauses == null) {
fillInClauses();
}
boolean newrules = ruleStore.addPropagatorActivationRule(this);
// When we got here, there are multiple cases:
// 1. the propagator fails, at least one clause or implication cannot be satisfied
// 2. the propagator is the cause of an instantiation
// but the clauses and implications may be lost (cf. propagate)
// get the index of the variable in the sat solver
int var = indices_.get(bvar);
boolean new_value = bvar.getValue() != 0;
int lit = SatSolver.makeLiteral(var, new_value);
int neg = negated(lit);
// A. implications:
// simply iterate over implies_ and add the instantiated variables
TIntList implies = sat_.implies_.get(lit);
if (implies != null) {
for (int i = implies.size() - 1; i >= 0; i--) {
newrules |= _why(implies.get(i), ruleStore);
}
}
implies = sat_.implies_.get(neg);
if (implies != null) {
for (int i = implies.size() - 1; i >= 0; i--) {
newrules |= _why(implies.get(i), ruleStore);
}
}
// B. clauses:
// We need to find the fully instantiated clauses where bvar appears
ArrayList<SatSolver.Clause> mClauses = inClauses.get(lit);
if (mClauses != null) {
for (int i = mClauses.size() - 1; i >= 0; i--) {
newrules |= _why(mClauses.get(i), ruleStore);
}
}
mClauses = inClauses.get(neg);
if (mClauses != null) {
for (int i = mClauses.size() - 1; i >= 0; i--) {
newrules |= _why(mClauses.get(i), ruleStore);
}
}
// C. learnt clauses:
// We need to find the fully instantiated clauses where bvar appears
// we cannot rely on watches_ because is not backtrackable
// So, we iterate over clauses where the two first literal are valued AND which contains bvar
for (int k = sat_.nLearnt() - 1; k >= 0; k--) {
newrules |= _why(neg, lit, sat_.learnts.get(k), ruleStore);
}
return newrules;
}
private void fillInClauses() {
inClauses = new TIntObjectHashMap<>();
for (int k = sat_.nClauses() - 1; k >= 0; k--) {
SatSolver.Clause cl = sat_.clauses.get(k);
for (int d = cl.size() - 1; d >= 0; d--) {
int l = cl._g(d);
ArrayList<SatSolver.Clause> mcls = inClauses.get(l);
if (mcls == null) {
mcls = new ArrayList<>();
inClauses.put(l, mcls);
}
mcls.add(cl);
}
}
}
private boolean _why(SatSolver.Clause cl, RuleStore ruleStore) {
boolean newrules = false;
// if the variable watches
if (vars[var(cl._g(0))].isInstantiated() && vars[var(cl._g(1))].isInstantiated()) {
for (int d = cl.size() - 1; d >= 0; d--) {
newrules |= _why(cl._g(d), ruleStore);
}
}
return newrules;
}
private boolean _why(int neg, int lit, SatSolver.Clause cl, RuleStore ruleStore) {
boolean newrules = false;
// if the variable watches
if (cl._g(0) == neg || cl._g(0) == lit || cl._g(1) == neg || cl._g(1) == lit) {
for (int d = cl.size() - 1; d >= 0; d--) {
newrules |= _why(cl._g(d), ruleStore);
}
} else
// if the watched literals are instantiated
if (vars[var(cl._g(0))].isInstantiated() && vars[var(cl._g(1))].isInstantiated()) {
// then, look for the lit
int p = cl.pos(neg);
int q = cl.pos(lit);
if (p > -1 || q > -1) { // we found a clause where neg is in
for (int d = cl.size() - 1; d >= 0; d--) {
newrules |= _why(cl._g(d), ruleStore);
}
}
}
return newrules;
}
private boolean _why(int l, RuleStore ruleStore) {
return vars[var(l)].isInstantiated() && ruleStore.addFullDomainRule(vars[var(l)]);
}
}
| 34.438799 | 136 | 0.526422 |
c99260ac37509aeffc16099f1e9eb13e13f72aca | 1,501 | tsx | TypeScript | src/components/Icons/Invention.tsx | oliversaternus/sudoku-app | 89908250f00f85bd8c007f282b6152b71dfa9231 | [
"Apache-2.0"
] | null | null | null | src/components/Icons/Invention.tsx | oliversaternus/sudoku-app | 89908250f00f85bd8c007f282b6152b71dfa9231 | [
"Apache-2.0"
] | null | null | null | src/components/Icons/Invention.tsx | oliversaternus/sudoku-app | 89908250f00f85bd8c007f282b6152b71dfa9231 | [
"Apache-2.0"
] | null | null | null | import React from 'react';
const Invention: React.FC<any> = (props) => {
return <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
viewBox="0 0 64 64" {...props}>
<g>
<path d="M44.5,19.3c-3.7-3.5-8.5-5.1-13.6-4.8c-9.3,0.5-16.8,8.3-16.8,17.6c0,5.9,2.7,11.2,7.2,14.7v7.5c0,4,3.2,7.2,7.5,7.2h6.7
c4,0,7.5-3.2,7.5-7.2v-7.5c4.5-3.5,7.5-8.5,7.5-14.4C50.1,27.3,48,22.5,44.5,19.3L44.5,19.3z M37.3,54c0,1.1-0.8,1.9-2.1,1.9h-6.7
c-1.1,0-2.1-0.8-2.1-1.9v-6.1h10.7L37.3,54L37.3,54z M38.9,42.5h-4.3v-2.7c0-1.6-1.1-2.7-2.7-2.7c-1.6,0-2.7,1.1-2.7,2.7v2.7h-4.3
c-3.5-2.4-5.6-6.1-5.6-10.7c0-6.4,5.3-12,11.7-12.3c0.3,0,0.5,0,0.8,0c3.5,0,6.4,1.1,8.8,3.5s4,5.6,4,9.1
C44.8,36.4,42.7,40.1,38.9,42.5z"/>
<path d="M32,13.2c1.6,0,2.7-1.1,2.7-2.7V5.2c0-1.6-1.1-2.7-2.7-2.7c-1.6,0-2.7,1.1-2.7,2.7v5.3C29.3,12.1,30.4,13.2,32,13.2z" />
<path d="M56.5,11.1c-1.1-1.1-2.7-1.1-3.7,0l-3.7,3.7c-1.1,1.1-1.1,2.7,0,3.7c0.5,0.5,1.3,0.8,1.9,0.8c0.8,0,1.3-0.3,1.9-0.8
l3.7-3.7C57.6,13.7,57.6,12.1,56.5,11.1z"/>
<path d="M14.9,14.5l-3.7-3.5c-1.1-1.1-2.7-1.1-3.7,0s-1.1,2.7,0,3.7l3.7,3.7c0.5,0.5,1.3,0.8,1.9,0.8s1.3-0.3,1.9-0.8
C16,17.5,16,15.6,14.9,14.5z"/>
<path d="M8,31.9H2.7c-1.6,0-2.7,1.1-2.7,2.7s1.1,2.7,2.7,2.7H8c1.6,0,2.7-1.1,2.7-2.7S9.6,31.9,8,31.9z" />
<path d="M61.3,31.9H56c-1.6,0-2.7,1.1-2.7,2.7s1.1,2.7,2.7,2.7h5.3c1.6,0,2.7-1.1,2.7-2.7S62.9,31.9,61.3,31.9z" />
</g>
</svg>;
}
export default Invention; | 65.26087 | 137 | 0.541639 |
2c73725ca3b39956b4bf1a70c8be35bda0f04b78 | 3,592 | py | Python | berserker_resolver/resolver.py | DmitryFillo/berserker_resolver | 8f6aa8530b54d19de4bde3f3c84f566d875c3673 | [
"BSD-2-Clause"
] | 19 | 2015-02-28T17:45:06.000Z | 2022-03-22T10:36:44.000Z | berserker_resolver/resolver.py | DmitryFillo/berserker_resolver | 8f6aa8530b54d19de4bde3f3c84f566d875c3673 | [
"BSD-2-Clause"
] | 5 | 2015-08-08T09:57:50.000Z | 2018-01-03T15:47:48.000Z | berserker_resolver/resolver.py | DmitryFillo/berserker_resolver | 8f6aa8530b54d19de4bde3f3c84f566d875c3673 | [
"BSD-2-Clause"
] | 5 | 2015-04-09T17:09:15.000Z | 2020-11-02T15:04:46.000Z | import re
import random
import threading
import dns.resolver
import dns.exception
from berserker_resolver.utils import locked_iterator
class BaseResolver(object):
_regexp_www = re.compile(r'(?:www\.){1}(.+\..+)', re.I)
_regexp_www_combine = re.compile(r'(?:www\.)?(.+\..+)', re.I)
def __init__(self, *args, **kwargs):
self.tries = kwargs.get('tries', 48)
self.timeout = kwargs.get('timeout', 3)
self.qname = kwargs.get('qname', 'A')
self.nameservers = kwargs.get('nameservers', ['8.8.8.8', '8.8.4.4', '77.88.8.8', '77.88.8.1', '84.200.69.80', '84.200.70.40',])
self.verbose = kwargs.get('verbose', False)
self.www = kwargs.get('www', False)
self.www_combine = kwargs.get('www_combine', False)
self._backend = dns.resolver.Resolver(configure=False)
self._backend.lifetime = self.timeout
def resolve(self, domains):
domains = self._bind(domains)
result, result_exception = self._run(domains)
if self.verbose:
return {
'success' : result,
'error' : result_exception,
}
else:
return result
def query(self, domain, ns=None):
self._backend.nameservers = [ns or random.choice(self.nameservers)]
return self._backend.query(domain, self.qname)
def _bind(self, domains):
for d in domains:
for t in range(self.tries):
for n in self.nameservers:
if self.www:
r = self._regexp_www.match(d)
if not r:
for i in (d, 'www.'+d):
yield i, n
else:
for i in (d, r.group(1)):
yield i, n
else:
yield d, n
def _build(self, d, answer, result, result_exception):
domain, ns = d
if self.www_combine:
domain = self._regexp_www_combine.match(domain).group(1)
if not isinstance(answer, Exception):
result.setdefault(domain, set()).update(iter(answer))
elif self.verbose:
result_exception.setdefault(domain, dict()).update({ns: answer})
def _process(self, domains, result, result_exception):
for d in domains:
try:
answer = self.query(*d)
except dns.exception.DNSException as e:
answer = e
self._build(d, answer, result, result_exception)
def _run(self, domains):
result = {}
result_exception = {}
self._process(domains, result, result_exception)
return result, result_exception
class Resolver(BaseResolver):
def __init__(self, *args, **kwargs):
super(Resolver, self).__init__(*args, **kwargs)
self.threads = kwargs.get('threads', 512)
self._lock = threading.Lock()
@locked_iterator
def _bind(self, *args, **kwargs):
return super(Resolver, self)._bind(*args, **kwargs)
def _build(self, *args, **kwargs):
with self._lock:
return super(Resolver, self)._build(*args, **kwargs)
def _run(self, domains):
result = {}
result_exception = {}
threads = []
for i in range(self.threads):
t = threading.Thread(target=self._process, args=(domains, result, result_exception))
t.start()
threads.append(t)
for i in threads:
i.join()
return result, result_exception
| 34.538462 | 135 | 0.552339 |
bb28a795f531bcc22d7d654b1bcc7a66c9400883 | 1,143 | cs | C# | test/Microsoft.EntityFrameworkCore.Microbenchmarks.Core/Models/Orders/Customer.cs | davidroth/EntityFrameworkCore | 7bdf5818b10389588d74ecc03ba766fe24850298 | [
"Apache-2.0"
] | null | null | null | test/Microsoft.EntityFrameworkCore.Microbenchmarks.Core/Models/Orders/Customer.cs | davidroth/EntityFrameworkCore | 7bdf5818b10389588d74ecc03ba766fe24850298 | [
"Apache-2.0"
] | null | null | null | test/Microsoft.EntityFrameworkCore.Microbenchmarks.Core/Models/Orders/Customer.cs | davidroth/EntityFrameworkCore | 7bdf5818b10389588d74ecc03ba766fe24850298 | [
"Apache-2.0"
] | null | null | null | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
namespace Microsoft.EntityFrameworkCore.Microbenchmarks.Core.Models.Orders
{
public class Customer
{
public int CustomerId { get; set; }
public string Title { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public DateTime? DateOfBirth { get; set; }
public bool IsLoyaltyMember { get; set; }
public DateTime Joined { get; set; }
public bool OptedOutOfMarketing { get; set; }
public string Phone { get; set; }
public string Email { get; set; }
public string AddressLineOne { get; set; }
public string AddressLineTwo { get; set; }
public string City { get; set; }
public string StateOrProvince { get; set; }
public string ZipOrPostalCode { get; set; }
public string Country { get; set; }
public ICollection<Order> Orders { get; set; }
}
}
| 35.71875 | 111 | 0.64392 |
a8b42a6cc95fb7f4da9c07c7fcd44be70f2cee44 | 11,455 | rs | Rust | src/api/domain.rs | lightning-project/lightning | 1a1ac9e0017aab8118478059274b793597496011 | [
"Apache-2.0"
] | 1 | 2022-02-14T08:42:10.000Z | 2022-02-14T08:42:10.000Z | src/api/domain.rs | lightning-project/lightning | 1a1ac9e0017aab8118478059274b793597496011 | [
"Apache-2.0"
] | null | null | null | src/api/domain.rs | lightning-project/lightning | 1a1ac9e0017aab8118478059274b793597496011 | [
"Apache-2.0"
] | null | null | null | use crate::types::{
Dim, Dim1, Dim2, Dim3, Point, Point1, Point2, Point3, Rect1, Rect2, Rect3, MAX_DIMS,
};
use std::fmt::Debug;
use std::ops::{Bound, Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive};
pub trait Shape {
fn into_dim(self) -> Dim;
fn from_dim(this: Dim) -> Self;
}
impl Shape for u64 {
fn into_dim(self) -> Dim {
Dim::from([self])
}
fn from_dim(this: Dim) -> Self {
assert_eq!(&this[1..], &[1; MAX_DIMS - 1]);
this[0]
}
}
impl Shape for () {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
assert_eq!(&this[..], &[1; MAX_DIMS]);
()
}
}
impl Shape for (u64,) {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
assert_eq!(&this[1..], &[1; MAX_DIMS - 1]);
(this[0],)
}
}
impl Shape for (u64, u64) {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
assert_eq!(&this[2..], &[1; MAX_DIMS - 2]);
(this[0], this[1])
}
}
impl Shape for (u64, u64, u64) {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
assert_eq!(&this[3..], &[1; MAX_DIMS - 3]);
(this[0], this[1], this[2])
}
}
impl Shape for [u64; 0] {
fn into_dim(self) -> Dim {
Dim::one()
}
fn from_dim(this: Dim) -> Self {
let () = Shape::from_dim(this);
[]
}
}
impl Shape for [u64; 1] {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
let (x,) = Shape::from_dim(this);
[x]
}
}
impl Shape for [u64; 2] {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
let (x, y) = Shape::from_dim(this);
[x, y]
}
}
impl Shape for [u64; 3] {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
let (x, y, z) = Shape::from_dim(this);
[x, y, z]
}
}
impl Shape for Dim1 {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
let (x,) = Shape::from_dim(this);
Dim1::new(x)
}
}
impl Shape for Dim2 {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
let (x, y) = Shape::from_dim(this);
Dim2::new(x, y)
}
}
impl Shape for Dim3 {
fn into_dim(self) -> Dim {
Dim::from(self)
}
fn from_dim(this: Dim) -> Self {
let (x, y, z) = Shape::from_dim(this);
Dim3::new(x, y, z)
}
}
impl Shape for Vec<u64> {
fn into_dim(self) -> Dim {
assert!(self.len() < MAX_DIMS);
let x = self.get(0).copied().unwrap_or(1);
let y = self.get(1).copied().unwrap_or(1);
let z = self.get(2).copied().unwrap_or(1);
Dim::new(x, y, z)
}
fn from_dim(this: Dim) -> Self {
this.to_vec()
}
}
impl Shape for Box<[u64]> {
fn into_dim(self) -> Dim {
self.to_vec().into_dim()
}
fn from_dim(this: Dim) -> Self {
this.to_vec().into_boxed_slice()
}
}
pub trait ArrayIndex {
fn to_point(self) -> Point;
}
impl ArrayIndex for u64 {
fn to_point(self) -> Point {
Point::from([self])
}
}
impl ArrayIndex for () {
fn to_point(self) -> Point {
Point::zeros()
}
}
impl ArrayIndex for (u64,) {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for (u64, u64) {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for (u64, u64, u64) {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for [u64; 0] {
fn to_point(self) -> Point {
Point::zeros()
}
}
impl ArrayIndex for [u64; 1] {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for [u64; 2] {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for [u64; 3] {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for Point1 {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for Point2 {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for Point3 {
fn to_point(self) -> Point {
Point::from(self)
}
}
impl ArrayIndex for &[u64] {
fn to_point(self) -> Point {
Point::new(
self.get(0).copied().unwrap_or(0),
self.get(1).copied().unwrap_or(0),
self.get(2).copied().unwrap_or(0),
)
}
}
#[derive(Copy, Clone, Debug)]
pub enum SliceDescriptor {
Range(Bound<u64>, Bound<u64>),
Index(u64),
NewAxis,
}
pub trait SliceRange {
fn into_range(self) -> SliceDescriptor;
}
impl SliceRange for Range<u64> {
fn into_range(self) -> SliceDescriptor {
SliceDescriptor::Range(Bound::Included(self.start), Bound::Excluded(self.end))
}
}
impl SliceRange for RangeFrom<u64> {
fn into_range(self) -> SliceDescriptor {
SliceDescriptor::Range(Bound::Included(self.start), Bound::Unbounded)
}
}
impl SliceRange for RangeTo<u64> {
fn into_range(self) -> SliceDescriptor {
SliceDescriptor::Range(Bound::Unbounded, Bound::Excluded(self.end))
}
}
impl SliceRange for RangeFull {
fn into_range(self) -> SliceDescriptor {
SliceDescriptor::Range(Bound::Unbounded, Bound::Unbounded)
}
}
impl SliceRange for RangeInclusive<u64> {
fn into_range(self) -> SliceDescriptor {
let (start, end) = self.into_inner();
SliceDescriptor::Range(Bound::Included(start), Bound::Included(end))
}
}
impl SliceRange for RangeToInclusive<u64> {
fn into_range(self) -> SliceDescriptor {
SliceDescriptor::Range(Bound::Unbounded, Bound::Included(self.end))
}
}
pub trait ArraySlice {
type Slices: AsRef<[SliceDescriptor]>;
fn into_slices(self) -> Self::Slices;
}
impl ArraySlice for Rect1 {
type Slices = [SliceDescriptor; 1];
fn into_slices(self) -> Self::Slices {
let (lo, hi) = (self.low(), self.high());
(lo[0]..hi[0]).into_slices()
}
}
impl ArraySlice for Rect2 {
type Slices = [SliceDescriptor; 2];
fn into_slices(self) -> Self::Slices {
let (lo, hi) = (self.low(), self.high());
(lo[0]..hi[0], lo[1]..hi[1]).into_slices()
}
}
impl ArraySlice for Rect3 {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
let (lo, hi) = (self.low(), self.high());
(lo[0]..hi[0], lo[1]..hi[1], lo[2]..hi[2]).into_slices()
}
}
impl ArraySlice for u64 {
type Slices = [SliceDescriptor; 1];
fn into_slices(self) -> Self::Slices {
[SliceDescriptor::Index(self)]
}
}
impl<I: SliceRange> ArraySlice for I {
type Slices = [SliceDescriptor; 1];
fn into_slices(self) -> Self::Slices {
[self.into_range()]
}
}
impl ArraySlice for [u64; 0] {
type Slices = [SliceDescriptor; 0];
fn into_slices(self) -> Self::Slices {
[]
}
}
impl ArraySlice for [u64; 1] {
type Slices = [SliceDescriptor; 1];
fn into_slices(self) -> Self::Slices {
[SliceDescriptor::Index(self[0])]
}
}
impl ArraySlice for [u64; 2] {
type Slices = [SliceDescriptor; 2];
fn into_slices(self) -> Self::Slices {
[
SliceDescriptor::Index(self[0]),
SliceDescriptor::Index(self[1]),
]
}
}
impl ArraySlice for [u64; 3] {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
SliceDescriptor::Index(self[0]),
SliceDescriptor::Index(self[1]),
SliceDescriptor::Index(self[2]),
]
}
}
impl ArraySlice for () {
type Slices = [SliceDescriptor; 0];
fn into_slices(self) -> Self::Slices {
[]
}
}
impl ArraySlice for (u64,) {
type Slices = [SliceDescriptor; 1];
fn into_slices(self) -> Self::Slices {
[SliceDescriptor::Index(self.0)]
}
}
impl ArraySlice for (u64, u64) {
type Slices = [SliceDescriptor; 2];
fn into_slices(self) -> Self::Slices {
[
SliceDescriptor::Index(self.0),
SliceDescriptor::Index(self.1),
]
}
}
impl ArraySlice for (u64, u64, u64) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
SliceDescriptor::Index(self.0),
SliceDescriptor::Index(self.1),
SliceDescriptor::Index(self.2),
]
}
}
impl<I: SliceRange> ArraySlice for (I,) {
type Slices = [SliceDescriptor; 1];
fn into_slices(self) -> Self::Slices {
[self.0.into_range()]
}
}
impl<I: SliceRange> ArraySlice for (I, u64) {
type Slices = [SliceDescriptor; 2];
fn into_slices(self) -> Self::Slices {
[self.0.into_range(), SliceDescriptor::Index(self.1)]
}
}
impl<J: SliceRange> ArraySlice for (u64, J) {
type Slices = [SliceDescriptor; 2];
fn into_slices(self) -> Self::Slices {
[SliceDescriptor::Index(self.0), self.1.into_range()]
}
}
impl<I: SliceRange> ArraySlice for (I, u64, u64) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
self.0.into_range(),
SliceDescriptor::Index(self.1),
SliceDescriptor::Index(self.2),
]
}
}
impl<J: SliceRange> ArraySlice for (u64, J, u64) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
SliceDescriptor::Index(self.0),
self.1.into_range(),
SliceDescriptor::Index(self.2),
]
}
}
impl<K: SliceRange> ArraySlice for (u64, u64, K) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
SliceDescriptor::Index(self.0),
SliceDescriptor::Index(self.1),
self.2.into_range(),
]
}
}
impl<I: SliceRange, J: SliceRange> ArraySlice for (I, J) {
type Slices = [SliceDescriptor; 2];
fn into_slices(self) -> Self::Slices {
[self.0.into_range(), self.1.into_range()]
}
}
impl<I: SliceRange, J: SliceRange> ArraySlice for (I, J, u64) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
self.0.into_range(),
self.1.into_range(),
SliceDescriptor::Index(self.2),
]
}
}
impl<J: SliceRange, K: SliceRange> ArraySlice for (u64, J, K) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
SliceDescriptor::Index(self.0),
self.1.into_range(),
self.2.into_range(),
]
}
}
impl<I: SliceRange, K: SliceRange> ArraySlice for (I, u64, K) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
self.0.into_range(),
SliceDescriptor::Index(self.1),
self.2.into_range(),
]
}
}
impl<I: SliceRange, J: SliceRange, K: SliceRange> ArraySlice for (I, J, K) {
type Slices = [SliceDescriptor; 3];
fn into_slices(self) -> Self::Slices {
[
self.0.into_range(),
self.1.into_range(),
self.2.into_range(),
]
}
}
| 21.056985 | 94 | 0.550153 |
d35805fa43f51d5781b3395ad5c369170cd8ab2b | 1,588 | sql | SQL | Day36-40/code/mooc_create_and_init.sql | EngrSaad2/Python-100-Days | ab0b26714b1df50d02a1433dc82f2a3fb025be5c | [
"Apache-2.0"
] | 6 | 2020-04-22T14:07:51.000Z | 2021-09-07T12:55:23.000Z | Day36-40/code/mooc_create_and_init.sql | 2462612540/Python-Language | a676d1274a04ff03f1aea0de9c58019d6ef8f5fe | [
"Apache-2.0"
] | 88 | 2019-10-31T12:30:02.000Z | 2020-08-14T12:17:12.000Z | Day36-40/code/mooc_create_and_init.sql | 2462612540/Python-Language | a676d1274a04ff03f1aea0de9c58019d6ef8f5fe | [
"Apache-2.0"
] | 4 | 2019-08-25T05:51:00.000Z | 2021-04-16T08:14:16.000Z | drop database if exists mooc1706;
create database mooc1706 default charset utf8;
use mooc1706;
create table tb_course_catalog
(
catid integer not null auto_increment,
catname varchar(20) not null,
catparent integer,
primary key (catid)
);
alter table tb_course_catalog add constraint fk_catalog_parent
foreign key (catparent) references tb_course_catalog(catid)
on delete cascade
on update cascade;
insert into tb_course_catalog values (default, '前端开发', null);
insert into tb_course_catalog values (default, '后端开发', null);
insert into tb_course_catalog values (default, '移动开发', null);
insert into tb_course_catalog values (default, '数据库', null);
insert into tb_course_catalog values (default, '云计算&大数据', null);
insert into tb_course_catalog values (default, '运维&测试', null);
insert into tb_course_catalog values (default, 'UI设计', null);
insert into tb_course_catalog values (default, 'HTML/CSS', 1);
insert into tb_course_catalog values (default, 'JavaScript', 1);
insert into tb_course_catalog values (default, 'jQuery', 1);
insert into tb_course_catalog values (default, 'HTML5', 1);
insert into tb_course_catalog values (default, 'CSS3', 1);
insert into tb_course_catalog values (default, 'Node.js', 1);
insert into tb_course_catalog values (default, 'AngularJS', 1);
insert into tb_course_catalog values (default, 'Bootstrap', 1);
insert into tb_course_catalog values (default, 'React', 1);
insert into tb_course_catalog values (default, 'Sass/Less', 1);
insert into tb_course_catalog values (default, 'Vue.js', 1);
insert into tb_course_catalog values (default, 'WebApp', 1); | 40.717949 | 64 | 0.781486 |
e234b69ab50440e7c0578315f4394c556724eb6f | 3,240 | py | Python | bench.py | Yamp/Lin-Kernighan | 88e3ef8c0f4ec91ba22a065466b2473725d86870 | [
"MIT"
] | 1 | 2021-07-24T02:50:52.000Z | 2021-07-24T02:50:52.000Z | bench.py | Lin-Kernighan/Lin-Kernighan | 88e3ef8c0f4ec91ba22a065466b2473725d86870 | [
"MIT"
] | 5 | 2020-02-01T10:44:09.000Z | 2020-05-24T10:39:14.000Z | bench.py | Yamp/Lin-Kernighan | 88e3ef8c0f4ec91ba22a065466b2473725d86870 | [
"MIT"
] | 1 | 2020-08-26T05:26:23.000Z | 2020-08-26T05:26:23.000Z | import logging
from time import time
import click
from lin_kernighan.algorithms.structures.matrix import adjacency_matrix
from lin_kernighan.algorithms.utils.generator import generator
from lin_kernighan.algorithms.utils.initial_tour import greedy
from lin_kernighan.lkh_search import LKHSearch
from lin_kernighan.tabu_proc_search import TabuProcSearch
from lin_kernighan.tabu_search import TabuSearch
from lin_kernighan.utils import opts_type
search_type = dict(lkh=LKHSearch, tabu=TabuSearch, tabu_p=TabuProcSearch)
@click.group()
def cli():
pass
@click.command()
@click.option('--search', default='lkh', help='Search can be: lkh, tabu, tabu_p')
@click.option('--size', default=100, help='Size of generated tsp task')
@click.option('--number', default=5, help='Number of launching for averaging')
@click.option('--info', default=False, help='Show info message')
@click.option('--opt', default='two_opt', help='Opt type for tabu searchers: two_opt, three_opt, lk_opt, lkh_opt')
@click.option('--iterations', default=10, help='Iterations of search')
@click.option('--swap', default=2, help='Swaps for tabu searchers')
@click.option('--proc', default=4, help='Number of process in tabu_p')
def searchers(search, size, number, info, opt, iterations, swap, proc):
if info:
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO)
average = 0.
ft_start = time()
for _ in range(number):
tsp = generator(size)
matrix = adjacency_matrix(tsp)
t_start = time()
searcher = search_type[search](matrix=matrix, opt=opt, proc=proc)
searcher.optimize(iterations=iterations, swap=swap)
average += (time() - t_start)
click.echo(f'all: {time() - ft_start} s')
click.echo(f'average: {average / number} s')
@click.command()
@click.option('--opt', default='two_opt', help='Opt type: two_opt, three_opt, lk_opt, lkh_opt')
@click.option('--size', default=100, help='Size of generated tsp task')
@click.option('--number', default=5, help='Number of launching for averaging')
@click.option('--info', default=False, help='Show info message')
@click.option('--neighbours', default=5, help='Neighbours for LK')
@click.option('--k', default=5, help='Number of k for LK or LKH')
@click.option('--mul', default=1, help='Excess factor for LKH (factor * excess)')
@click.option('--sb', default=False, help='Use or not subgradient optimization for LKH')
@click.option('--ns', default=False, help='Use or not non seq for LKH')
def opts(opt, size, number, info, neighbours, k, mul, sb, ns):
if info:
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO)
average = 0.
ft_start = time()
for _ in range(number):
tsp = generator(size)
matrix = adjacency_matrix(tsp)
length, tour = greedy(matrix)
t_start = time()
searcher = opts_type[opt](length, tour, matrix, neighbours=neighbours, k=k, mul=mul, subgradient=sb, non_seq=ns)
searcher.optimize()
average += (time() - t_start)
click.echo(f'all: {time() - ft_start} s')
click.echo(f'average: {average / number} s')
cli.add_command(searchers)
cli.add_command(opts)
if __name__ == '__main__':
cli()
| 38.117647 | 120 | 0.696605 |
71f8b7ac492b5ee033a726c710669ae944e0f170 | 10,559 | sql | SQL | parkiran.sql | izanagiwarrior/Parkiran | 304524887f707ca9aa90669580eb59559671fda8 | [
"MIT"
] | null | null | null | parkiran.sql | izanagiwarrior/Parkiran | 304524887f707ca9aa90669580eb59559671fda8 | [
"MIT"
] | null | null | null | parkiran.sql | izanagiwarrior/Parkiran | 304524887f707ca9aa90669580eb59559671fda8 | [
"MIT"
] | 1 | 2021-09-04T13:36:28.000Z | 2021-09-04T13:36:28.000Z | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 10, 2021 at 12:21 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `parkiran`
--
-- --------------------------------------------------------
--
-- Table structure for table `akun`
--
CREATE TABLE `akun` (
`id` int(255) NOT NULL,
`username` varchar(255) NOT NULL,
`nama_lengkap` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`nohp` varchar(255) NOT NULL,
`alamat` varchar(255) NOT NULL,
`jenis_kelamin` varchar(255) NOT NULL,
`tanggal_lahir` date NOT NULL,
`role` varchar(255) NOT NULL,
`csrf` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `akun`
--
INSERT INTO `akun` (`id`, `username`, `nama_lengkap`, `password`, `email`, `nohp`, `alamat`, `jenis_kelamin`, `tanggal_lahir`, `role`, `csrf`) VALUES
(22, 'admin', 'Admin', '123', '[email protected]', '081234567890', 'Bandung', 'laki-laki', '2020-10-10', 'admin', 'jdBIcke5hz0YrR2NApTJYiV8YiiXOki0SpGtjiiB'),
(23, 'user', 'User', '123', '[email protected]', '081234567890', 'Bandung', 'laki-laki', '2020-10-10', 'pengguna', 'I4tuORehcKrZAxMCutMZLNEkeypmIfCtxsE1M23l'),
(24, 'petugas', 'Petugas', '123', '[email protected]', '081234567890', 'Bandung', 'laki-laki', '2020-10-10', 'petugas', 'aStD2eefSYkNYYJ33hZ1FJzWet7h2lzlZVZvyYrx'),
(25, 'klien', 'Client', '123', '[email protected]', '081234567890', 'Bandung', 'laki-laki', '2020-10-10', 'klien', 'tgQjBrpTkmK6YBZ3wNOeHmH4mKP8XmPnN8clUoMx'),
(38, 'neta_keren', 'Neta Keren', '12341234', '[email protected]', '082189100482', 'Jl Bambu Ori', 'laki-laki', '2021-06-10', 'user', 'LSgc4CV2KnEaqBjjqOkmZhLxzP7CCS0vonuVxlpF');
-- --------------------------------------------------------
--
-- Table structure for table `bukti_pembayaran`
--
CREATE TABLE `bukti_pembayaran` (
`id` int(255) NOT NULL,
`metode` varchar(255) NOT NULL DEFAULT '',
`gambar` varchar(255) NOT NULL DEFAULT '',
`id_akun` int(255) NOT NULL DEFAULT 0,
`id_produk` int(255) NOT NULL DEFAULT 0,
`total_pembayaran` int(255) NOT NULL DEFAULT 0,
`status` varchar(255) NOT NULL DEFAULT 'belum_diterima'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bukti_pembayaran`
--
INSERT INTO `bukti_pembayaran` (`id`, `metode`, `gambar`, `id_akun`, `id_produk`, `total_pembayaran`, `status`) VALUES
(21, 'bank_mandiri', '/foto/4.PNG', 23, 4, 0, 'diterima'),
(22, 'bank_mandiri', '/foto/Salinan 517402.jpg', 23, 4, 0, 'diterima'),
(23, 'bank_mandiri', '/foto/Salinan 517402.jpg', 23, 4, 0, 'diterima'),
(24, 'bank_mandiri', '', 23, 10, 0, 'diterima'),
(25, 'bank_mandiri', '', 23, 24, 0, 'diterima'),
(28, 'bank_mandiri', '', 23, 6, 0, 'diterima'),
(30, 'bank_mandiri', '', 23, 4, 0, 'diterima');
-- --------------------------------------------------------
--
-- Table structure for table `feedback`
--
CREATE TABLE `feedback` (
`id` int(11) NOT NULL,
`nama_lengkap` varchar(255) NOT NULL,
`feedback` varchar(255) NOT NULL,
`rating` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `feedback`
--
INSERT INTO `feedback` (`id`, `nama_lengkap`, `feedback`, `rating`) VALUES
(6, 'User', 'faiz', 1),
(7, 'User', 'waw', 2),
(8, 'User', 'aw', 3),
(9, 'User', 'waw', 4),
(10, 'User', '123', 5),
(11, 'User', 'aw', 3),
(12, 'User', 'aw', 2),
(13, 'User', 'lol', 5),
(14, 'User', '21', 5),
(15, 'User', '123', 5);
-- --------------------------------------------------------
--
-- Table structure for table `keranjang`
--
CREATE TABLE `keranjang` (
`id` int(255) NOT NULL,
`id_produk` int(255) NOT NULL,
`id_pembeli` int(255) NOT NULL,
`jumlah` int(255) NOT NULL,
`status` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `parkiran`
--
CREATE TABLE `parkiran` (
`id` int(255) NOT NULL,
`nama_parkiran` varchar(255) NOT NULL,
`harga` int(255) NOT NULL,
`kategori` varchar(255) NOT NULL,
`gambar` varchar(255) NOT NULL,
`detail_parkiran` text NOT NULL,
`lat` varchar(255) DEFAULT NULL,
`lang` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `parkiran`
--
INSERT INTO `parkiran` (`id`, `nama_parkiran`, `harga`, `kategori`, `gambar`, `detail_parkiran`, `lat`, `lang`) VALUES
(1, 'Parkiran PVJJ (Biasa)', 5000, 'Barat,reserved', 'foto/parkir.png', 'Parkiran Tersedia 20', '-6.887650323544048', '107.59622923272897'),
(2, 'Parkiran PVJJ (Valey)', 20000, 'Barat,reserved', 'foto/parkir.png', 'Parkiran Tersedia 5', '-6.887650323544048', '107.59622923272897'),
(3, 'Parkiran TSM (Biasa)', 10000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 20', '-6.926448779085916', '107.63636823937998'),
(4, 'Parkiran TSM (Valey)', 35000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 10', '-6.926448779085916', '107.63636823937998'),
(5, 'Parkiran BIP (Biasa)', 15000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 30', '-6.908683943108505', '107.61088760320149'),
(6, 'Parkiran BIP (Valey)', 25000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 20', '-6.908683943108505', '107.61088760320149'),
(7, 'Parkiran Ciwalk (Biasa)', 12000, 'Utara,reserved', 'foto/parkir.png', 'Parkiran Tersedia 45', '-6.89334511293544', '107.60455018416832'),
(8, 'Parkiran Ciwalk (Valey)', 20000, 'Utara,reserved', 'foto/parkir.png', 'Parkiran Tersedia 15', '-6.89334511293544', '107.60455018416832'),
(9, 'Parkiran Festival Citylink (Biasa)', 13000, 'Utara,bestseller', 'foto/parkir.png', 'Parkiran Tersedia 50', '-6.929772503270773', '107.58662984183897'),
(10, 'Parkiran Festival Citylink (Valey)', 33000, 'Utara,bestseller', 'foto/parkir.png', 'Parkiran Tersedia 10', '-6.929772503270773', '107.58662984183897'),
(11, 'Parkiran BTC (Biasa)', 5000, 'Selatan,reserved', 'foto/parkir.png', 'Parkiran Tersedia 25', '-6.893350910367234', '107.58544752649803'),
(12, 'Parkiran BTC (Valey)', 25000, 'Selatan,reserved', 'foto/parkir.png', 'Parkiran Tersedia 5', '-6.893350910367234', '107.58544752649803'),
(13, 'Parkiran Kings Plaza (Biasa)', 5000, 'Selatan,kosong', 'foto/parkir.png', 'Parkiran Tersedia 40', '-6.923090589179086', '107.60470233975457'),
(14, 'Parkiran Kings Plaza (Valey)', 25000, 'Selatan,kosong', 'foto/parkir.png', 'Parkiran Tersedia 20', '-6.923090589179086', '107.60470233975457'),
(15, 'Parkiran Click Square (Biasa)', 15000, 'Selatan,kosong', 'foto/parkir.png', 'Parkiran Tersedia 100', '-6.920699152290651', '107.61630258786104'),
(16, 'Parkiran Click Square (Valey)', 25000, 'Selatan,kosong', 'foto/parkir.png', 'Parkiran Tersedia 3', '-6.920699152290651', '107.61630258786104'),
(17, 'Parkiran Braga (Biasa)', 25000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 20', '-6.916642967640514', '107.60798178129784'),
(18, 'Parkiran Braga (Valey)', 75000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 4', '-6.916642967640514', '107.60798178129784'),
(19, 'Parkiran BEC (Biasa)', 5000, 'Selatan,kosong', 'foto/parkir.png', 'Parkiran Tersedia 38', '-6.909355177805484', '107.60930669368507'),
(20, 'Parkiran BEC (Valey)', 15000, 'Selatan,kosong', 'foto/parkir.png', 'Parkiran Tersedia 5', '-6.909355177805484', '107.60930669368507'),
(21, 'Parkiran Dago (Biasa)', 13000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 100', '-6.90100574331355', '107.61173973724634'),
(22, 'Parkiran Dago (Valey)', 23000, 'Barat,kosong', 'foto/parkir.png', 'Parkiran Tersedia 7', '-6.90100574331355', '107.61173973724634'),
(24, 'Parkiran Paskal (Valey)', 35000, 'Utara,kosong', 'foto/parkir.png', 'Parkiran Tersedia 10', '-6.914857399754043', '-6.914857399754043');
-- --------------------------------------------------------
--
-- Table structure for table `teracc`
--
CREATE TABLE `teracc` (
`id` int(255) NOT NULL,
`gambar` varchar(255) NOT NULL DEFAULT '',
`id_akun` int(255) NOT NULL DEFAULT 0,
`id_produk` int(255) NOT NULL DEFAULT 0,
`total_pembayaran` int(255) NOT NULL DEFAULT 0,
`status` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `teracc`
--
INSERT INTO `teracc` (`id`, `gambar`, `id_akun`, `id_produk`, `total_pembayaran`, `status`) VALUES
(22, '', 23, 4, 0, 'Parkir Selesai'),
(23, '', 23, 4, 0, 'Parkir Selesai'),
(24, '', 23, 10, 0, NULL),
(25, '', 23, 24, 0, NULL),
(26, '', 23, 6, 0, NULL),
(27, '', 23, 6, 0, NULL),
(28, '', 23, 6, 0, NULL),
(29, '', 23, 6, 0, NULL),
(30, '', 23, 6, 0, NULL),
(31, '', 23, 4, 0, NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `akun`
--
ALTER TABLE `akun`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bukti_pembayaran`
--
ALTER TABLE `bukti_pembayaran`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `feedback`
--
ALTER TABLE `feedback`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `keranjang`
--
ALTER TABLE `keranjang`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `parkiran`
--
ALTER TABLE `parkiran`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `teracc`
--
ALTER TABLE `teracc`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `akun`
--
ALTER TABLE `akun`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;
--
-- AUTO_INCREMENT for table `bukti_pembayaran`
--
ALTER TABLE `bukti_pembayaran`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
--
-- AUTO_INCREMENT for table `feedback`
--
ALTER TABLE `feedback`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `keranjang`
--
ALTER TABLE `keranjang`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=41;
--
-- AUTO_INCREMENT for table `parkiran`
--
ALTER TABLE `parkiran`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=122;
--
-- AUTO_INCREMENT for table `teracc`
--
ALTER TABLE `teracc`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| 36.663194 | 174 | 0.655744 |
a9fbe71522aff7ddd6ae91d333e00de9b9bb312f | 3,589 | php | PHP | backend/views/layouts/main.php | madetec/map_backend | 783c6fa0e0f4def6278ff841d94ae72ebf4bf22d | [
"BSD-3-Clause"
] | null | null | null | backend/views/layouts/main.php | madetec/map_backend | 783c6fa0e0f4def6278ff841d94ae72ebf4bf22d | [
"BSD-3-Clause"
] | null | null | null | backend/views/layouts/main.php | madetec/map_backend | 783c6fa0e0f4def6278ff841d94ae72ebf4bf22d | [
"BSD-3-Clause"
] | null | null | null | <?php
use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
if(!Yii::$app->user->isGuest){
$username = Yii::$app->user->identity->getUsername();
$userDetails = (object)Yii::$app->user->identity->getUserDetails($username);
}else{
$userDetails = null;
}
if (Yii::$app->controller->action->id === 'sign-in' || Yii::$app->controller->action->id === 'sign-up') {
/**
* Do not use this code in your template. Remove it.
* Instead, use the code $this->layout = '//main-login'; in your controller.
*/
echo $this->render(
'main-login',
['content' => $content]
);
} else {
dmstr\web\AdminLteAsset::register($this);
if (class_exists('backend\assets\AppAsset')) {
backend\assets\AdditionalAsset::register($this);
backend\assets\AppAsset::register($this);
backend\assets\AdminLteAsset::register($this);
} else {
app\assets\AppAsset::register($this);
}
$directoryAsset = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<link rel="apple-touch-icon" sizes="57x57" href="favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="manifest" href="favicons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<?php $this->head() ?>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<?php $this->beginBody() ?>
<div class="wrapper">
<?= $this->render(
'header.php',
['directoryAsset' => $directoryAsset,'userDetails' => $userDetails]
) ?>
<?= $this->render(
'left.php',
['directoryAsset' => $directoryAsset,'userDetails' => $userDetails]
)
?>
<?= $this->render(
'content.php',
['content' => $content, 'directoryAsset' => $directoryAsset, 'userDetails' => $userDetails]
) ?>
</div>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
<?php } ?>
| 38.591398 | 105 | 0.603511 |
44798f3a4674d1028faf766275f57c8d8a4eeb2d | 1,165 | py | Python | onadata/apps/main/service_health.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 1 | 2018-07-15T10:37:41.000Z | 2018-07-15T10:37:41.000Z | onadata/apps/main/service_health.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 48 | 2019-03-18T09:26:31.000Z | 2019-05-27T08:12:03.000Z | onadata/apps/main/service_health.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 1 | 2020-03-03T15:50:24.000Z | 2020-03-03T15:50:24.000Z | import requests
import time
from django.conf import settings
from django.http import HttpResponse
from onadata.apps.logger.models import Instance
def service_health(request):
''' Return a HTTP 200 if some very basic runtime tests of the application
pass. Otherwise, return HTTP 500 '''
any_failure = False
t0 = time.time()
try:
settings.MONGO_DB.instances.find_one()
except Exception as e:
mongo_message = repr(e)
any_failure = True
else:
mongo_message = 'OK'
mongo_time = time.time() - t0
t0 = time.time()
try:
Instance.objects.first()
except Exception as e:
postgres_message = repr(e)
any_failure = True
else:
postgres_message = 'OK'
postgres_time = time.time() - t0
output = (
u'{}\r\n\r\n'
u'Mongo: {} in {:.3} seconds\r\n'
u'Postgres: {} in {:.3} seconds\r\n'
).format(
'FAIL' if any_failure else 'OK',
mongo_message, mongo_time,
postgres_message, postgres_time,
)
return HttpResponse(
output, status=(500 if any_failure else 200), content_type='text/plain'
)
| 24.270833 | 79 | 0.618884 |
43ac9c304fd6acc0cdb630827e08e8625049aeae | 391 | tsx | TypeScript | packages/plugins/src/open-file/open-file-plugin.tsx | pmclachlan/blink-mind | f06440cad4dd42375c8badd6dfd76e6831420ec4 | [
"MIT"
] | null | null | null | packages/plugins/src/open-file/open-file-plugin.tsx | pmclachlan/blink-mind | f06440cad4dd42375c8badd6dfd76e6831420ec4 | [
"MIT"
] | null | null | null | packages/plugins/src/open-file/open-file-plugin.tsx | pmclachlan/blink-mind | f06440cad4dd42375c8badd6dfd76e6831420ec4 | [
"MIT"
] | null | null | null | import { ToolbarItemConfigs } from '@blink-mind/renderer-react';
import { ToolbarItemOpenFile } from './toolbar-item-openfile';
export function OpenFilePlugin() {
return {
customizeToolbar(props, next): ToolbarItemConfigs {
const res: ToolbarItemConfigs = next();
res.push({
order: 10,
element: ToolbarItemOpenFile
});
return res;
}
};
}
| 24.4375 | 64 | 0.649616 |
ff504605aee2a22e67f4ad5c4a503566aa4a2c79 | 635 | lua | Lua | content/levels/sample_animation/level.lua | Mutoxicated/ppl-utils | 302d39c380ee17bdd2cac0e1aadb20d32675e645 | [
"MIT"
] | 23 | 2020-10-12T22:17:12.000Z | 2022-03-11T01:28:38.000Z | content/levels/sample_animation/level.lua | Mutoxicated/ppl-utils | 302d39c380ee17bdd2cac0e1aadb20d32675e645 | [
"MIT"
] | 8 | 2020-10-22T19:56:41.000Z | 2022-01-28T18:34:37.000Z | content/levels/sample_animation/level.lua | Mutoxicated/ppl-utils | 302d39c380ee17bdd2cac0e1aadb20d32675e645 | [
"MIT"
] | 14 | 2020-10-22T17:40:09.000Z | 2022-03-07T19:53:56.000Z | -- Set how large the level will be.
pewpew.set_level_size(500fx, 500fx)
-- Create an entity at position (0,0) that will hold the background mesh.
local background = pewpew.new_customizable_entity(0fx, 0fx)
-- Animate the background.
local frame = 0
pewpew.add_update_callback(function()
frame = frame + 1
if frame == 50 then
frame = 0
end
pewpew.customizable_entity_set_mesh(background, "/dynamic/square500x500_graphic.lua", frame)
end)
-- Create the player's ship.
local player_x = 250fx
local player_y = 100fx
local player_index = 0 -- there is only one player
pewpew.new_player_ship(player_x, player_y, player_index)
| 28.863636 | 94 | 0.76063 |
38d30804609bb50f52bf628159627d18610b701e | 1,061 | php | PHP | database/migrations/2017_11_20_172948_create_feespayment_table.php | Nmwameso/drivingschool | 72a254935f9dc92951fa329204dac3bbbfb1f0de | [
"MIT"
] | 1 | 2018-01-10T17:04:46.000Z | 2018-01-10T17:04:46.000Z | database/migrations/2017_11_20_172948_create_feespayment_table.php | Nmwameso/drivingschool | 72a254935f9dc92951fa329204dac3bbbfb1f0de | [
"MIT"
] | null | null | null | database/migrations/2017_11_20_172948_create_feespayment_table.php | Nmwameso/drivingschool | 72a254935f9dc92951fa329204dac3bbbfb1f0de | [
"MIT"
] | null | null | null | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFeespaymentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('feepayments', function (Blueprint $table) {
$table->increments('feeID');
$table->integer('student_id')->unsigned();
$table->foreign('student_id')->references('id')->on('students');
$table->date('date_received');
$table->decimal('deposit_paid', 15,2);
$table->string('mode_payment');
$table->integer('discount')->asigned(0.00)->nullable();
$table->integer('cheque')->length(10)->unsigned()->nullable();
$table->string('sponsored');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('feespayment');
}
}
| 26.525 | 76 | 0.565504 |
99b5aa27634d4ea579f400a39c12e74581bb4a5f | 575 | sql | SQL | sql/project.sql | rurban/smolder | 929c6a5e14e82eb2d592f0df75e49d42f4e92fd1 | [
"BSD-3-Clause"
] | 10 | 2015-05-14T20:52:26.000Z | 2021-05-26T06:49:55.000Z | sql/project.sql | rurban/smolder | 929c6a5e14e82eb2d592f0df75e49d42f4e92fd1 | [
"BSD-3-Clause"
] | null | null | null | sql/project.sql | rurban/smolder | 929c6a5e14e82eb2d592f0df75e49d42f4e92fd1 | [
"BSD-3-Clause"
] | 2 | 2015-05-11T14:15:52.000Z | 2015-09-16T13:24:38.000Z | CREATE TABLE project (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
start_date INTEGER NOT NULL,
public INTEGER DEFAULT 1,
enable_feed INTEGER DEFAULT 1,
default_platform TEXT DEFAULT '',
default_arch TEXT DEFAULT '',
graph_start TEXT DEFAULT 'project',
allow_anon INTEGER DEFAULT 0,
max_reports INTEGER DEFAULT 100,
extra_css TEXT DEFAULT ''
);
CREATE UNIQUE INDEX i_project_name_project on project (name);
| 33.823529 | 61 | 0.591304 |
a0dbe1e5cf98c97904cbd574edd687d0a30acd41 | 112 | sql | SQL | integration/tests/sqlite/table-column-name/fixtures.sql | pecigonzalo/schemahero | 230b52e32982e711b37c0802b85dbfb762e20a35 | [
"Apache-2.0"
] | 559 | 2019-05-01T13:56:21.000Z | 2022-03-31T19:48:01.000Z | integration/tests/sqlite/table-column-name/fixtures.sql | pecigonzalo/schemahero | 230b52e32982e711b37c0802b85dbfb762e20a35 | [
"Apache-2.0"
] | 312 | 2019-05-08T04:09:40.000Z | 2022-03-25T12:00:03.000Z | integration/tests/sqlite/table-column-name/fixtures.sql | pecigonzalo/schemahero | 230b52e32982e711b37c0802b85dbfb762e20a35 | [
"Apache-2.0"
] | 62 | 2019-07-30T01:10:11.000Z | 2022-02-14T19:48:04.000Z | CREATE TABLE `abcdefg` (`source_hash` text not null, `abcdefg` timestamp not null, primary key (`source_hash`)); | 112 | 112 | 0.75 |
79cf7fb2b95a3a7edae7f1ea114508c7715773aa | 998 | php | PHP | app/Mail/AdminOrderMail.php | krishnamishra9026/saga | 9ae912e910bb704f0190cc7181ce395560421d9d | [
"MIT"
] | null | null | null | app/Mail/AdminOrderMail.php | krishnamishra9026/saga | 9ae912e910bb704f0190cc7181ce395560421d9d | [
"MIT"
] | null | null | null | app/Mail/AdminOrderMail.php | krishnamishra9026/saga | 9ae912e910bb704f0190cc7181ce395560421d9d | [
"MIT"
] | null | null | null | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class AdminOrderMail extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($subject,$orderDetails,$cartItemArray)
{
$this->sub = $subject;
$this->orderDetails = $orderDetails;
$this->cartItems = $cartItemArray;
//
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$e_subject = $this->sub;
$orderDetails = $this->orderDetails;
$cartItemArray = $this->cartItems;
return $this
->from($address = '[email protected]', $name = 'Cureroot')
->subject($e_subject)
->view('Mail.admin_order_mail',compact('orderDetails','cartItemArray'));
}
}
| 21.695652 | 80 | 0.599198 |
05bb9b9ad2254542365473f8eea6244bad6729b1 | 554 | sql | SQL | openGaussBase/testcase/SQL/INNERFUNC/now/Opengauss_Function_Innerfunc_Now_Case0001.sql | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/INNERFUNC/now/Opengauss_Function_Innerfunc_Now_Case0001.sql | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/INNERFUNC/now/Opengauss_Function_Innerfunc_Now_Case0001.sql | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | -- @testpoint: now()函数用于where条件
select 1 from sys_dummy where now()<>now();
select 1 from sys_dummy where now()!=now();
select 1 from sys_dummy where now()=now();
select 1 from sys_dummy where now() > CURRENT_TIMESTAMP;
select 1 from sys_dummy where now()<CURRENT_TIMESTAMP;
select 1 from sys_dummy where now()<>CURRENT_TIMESTAMP;
select 1 from sys_dummy where now()!=CURRENT_TIMESTAMP;
select 1 from sys_dummy where now()=CURRENT_TIMESTAMP;
select 1 from sys_dummy where now()<=CURRENT_TIMESTAMP;
select 1 from sys_dummy where now()>=CURRENT_TIMESTAMP;
| 46.166667 | 56 | 0.777978 |
e03fafe7a6d2ab8fc998c6241203ce82a90d3200 | 912 | swift | Swift | Live3s/Module/StatisticModule/StatisticSession.swift | bksasuke/KTT | 0f33a3097473336aeee181a7e0b04107b815d73c | [
"MIT"
] | null | null | null | Live3s/Module/StatisticModule/StatisticSession.swift | bksasuke/KTT | 0f33a3097473336aeee181a7e0b04107b815d73c | [
"MIT"
] | null | null | null | Live3s/Module/StatisticModule/StatisticSession.swift | bksasuke/KTT | 0f33a3097473336aeee181a7e0b04107b815d73c | [
"MIT"
] | null | null | null | //
// StatisticSession.swift
// Live3s
//
// Created by codelover2 on 14/12/2015.
// Copyright © Năm 2015 com.phucnguyen. All rights reserved.
//
import Foundation
import SwiftyJSON
class StatisticSession {
let id: String?
let name: String?
let country_Id: String?
let league_logo: String?
init(json: JSON) {
id = json["id"].stringValue
name = json["name"].stringValue
country_Id = json["country_id"].stringValue
league_logo = json["league_logo"].stringValue
}
init(id: String, vi_name: String, fr_name: String){
self.id = id
self.name = ""
country_Id = ""
league_logo = ""
}
init(season: Season) {
id = season.id
name = season.name
country_Id = ""
league_logo = season.league_logo
}
func localizationName() -> String? {
return name
}
}
| 22.8 | 61 | 0.58443 |
12aafbd3fb273fb982fc2284a7c57408c00195b3 | 177 | cs | C# | ARMClient.Authentication/Contracts/TenantInfo.cs | jitinjohn/ARMClient | 59599e8dc166f4765a7a46b23658f4091cdbdf70 | [
"Apache-2.0"
] | 296 | 2015-01-12T04:36:54.000Z | 2022-03-09T01:26:14.000Z | ARMClient.Authentication/Contracts/TenantInfo.cs | jitinjohn/ARMClient | 59599e8dc166f4765a7a46b23658f4091cdbdf70 | [
"Apache-2.0"
] | 52 | 2015-01-12T20:07:28.000Z | 2021-11-10T03:58:38.000Z | ARMClient.Authentication/Contracts/TenantInfo.cs | jitinjohn/ARMClient | 59599e8dc166f4765a7a46b23658f4091cdbdf70 | [
"Apache-2.0"
] | 110 | 2015-01-29T01:05:51.000Z | 2022-01-26T22:37:05.000Z |
namespace ARMClient.Authentication.Contracts
{
internal class TenantInfo
{
public string id { get; set; }
public string tenantId { get; set; }
}
}
| 17.7 | 44 | 0.621469 |
55a0b3d7922c6a6c3d260ce4cb2f33be29314380 | 11,607 | sql | SQL | pp_dayup.sql | okki23/pp_dayup | beec56925c4cd020c44650f39ab4cebf019ecdfe | [
"MIT"
] | null | null | null | pp_dayup.sql | okki23/pp_dayup | beec56925c4cd020c44650f39ab4cebf019ecdfe | [
"MIT"
] | null | null | null | pp_dayup.sql | okki23/pp_dayup | beec56925c4cd020c44650f39ab4cebf019ecdfe | [
"MIT"
] | null | null | null | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100132
Source Host : localhost:3306
Source Schema : pp_dayup
Target Server Type : MySQL
Target Server Version : 100132
File Encoding : 65001
Date: 06/08/2018 10:09:19
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for m_admin_hrd
-- ----------------------------
DROP TABLE IF EXISTS `m_admin_hrd`;
CREATE TABLE `m_admin_hrd` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`nik` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`nama` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`no_ktp` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`alamat` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`no_telp` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`email` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for m_akun_admin_hrd
-- ----------------------------
DROP TABLE IF EXISTS `m_akun_admin_hrd`;
CREATE TABLE `m_akun_admin_hrd` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`password` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`id_admin_hrd` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of m_akun_admin_hrd
-- ----------------------------
INSERT INTO `m_akun_admin_hrd` VALUES (1, 'karlina', 'YQ==', NULL);
-- ----------------------------
-- Table structure for m_akun_pelamar
-- ----------------------------
DROP TABLE IF EXISTS `m_akun_pelamar`;
CREATE TABLE `m_akun_pelamar` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`password` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`id_akun_pelamar` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of m_akun_pelamar
-- ----------------------------
INSERT INTO `m_akun_pelamar` VALUES (1, 'karlina', 'YQ==', NULL);
INSERT INTO `m_akun_pelamar` VALUES (5, 'okki', 'YQ==', 6);
-- ----------------------------
-- Table structure for m_akun_superadmin
-- ----------------------------
DROP TABLE IF EXISTS `m_akun_superadmin`;
CREATE TABLE `m_akun_superadmin` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`password` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of m_akun_superadmin
-- ----------------------------
INSERT INTO `m_akun_superadmin` VALUES (1, 'zahro', 'YQ==');
-- ----------------------------
-- Table structure for m_akun_supervisor
-- ----------------------------
DROP TABLE IF EXISTS `m_akun_supervisor`;
CREATE TABLE `m_akun_supervisor` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`password` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`id_supervisor` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of m_akun_supervisor
-- ----------------------------
INSERT INTO `m_akun_supervisor` VALUES (1, 'karlina', 'YQ==', NULL);
-- ----------------------------
-- Table structure for m_email
-- ----------------------------
DROP TABLE IF EXISTS `m_email`;
CREATE TABLE `m_email` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`tipe_pesan` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`pesan` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`user_assign` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`date_assign` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for m_lowongan
-- ----------------------------
DROP TABLE IF EXISTS `m_lowongan`;
CREATE TABLE `m_lowongan` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`nama_lowongan` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`deskripsi` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`tanggal_terbit` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of m_lowongan
-- ----------------------------
INSERT INTO `m_lowongan` VALUES (1, 'Penjahitan', '<h2>WYSIWYG Editor</h2>\r\n\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ullamcorper sapien non nisl facilisis bibendum in quis tellus. Duis in urna bibendum turpis pretium fringilla. Aenean neque velit, porta eget mattis ac, imperdiet quis nisi. Donec non dui et tortor vulputate luctus. Praesent consequat rhoncus velit, ut molestie arcu venenatis sodales.</p>\r\n\r\n<h3>Lacinia</h3>\r\n\r\n<ul>\r\n <li>Suspendisse tincidunt urna ut velit ullamcorper fermentum.</li>\r\n <li>Nullam mattis sodales lacus, in gravida sem auctor at.</li>\r\n <li>Praesent non lacinia mi.</li>\r\n <li>Mauris a ante neque.</li>\r\n <li>Aenean ut magna lobortis nunc feugiat sagittis.</li>\r\n</ul>\r\n\r\n<h3>Pellentesque adipiscing</h3>\r\n\r\n<p>Maecenas quis ante ante. Nunc adipiscing rhoncus rutrum. Pellentesque adipiscing urna mi, ut tempus lacus ultrices ac. Pellentesque sodales, libero et mollis interdum, dui odio vestibulum dolor, eu pellentesque nisl nibh quis nunc. Sed porttitor leo adipiscing venenatis vehicula. Aenean quis viverra enim. Praesent porttitor ut ipsum id ornare.</p>\r\n', '2018-08-03 11:58:31');
-- ----------------------------
-- Table structure for m_pelamar
-- ----------------------------
DROP TABLE IF EXISTS `m_pelamar`;
CREATE TABLE `m_pelamar` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`nama_lengkap` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`no_ktp` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`email` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`tempat_lahir` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`tanggal_lahir` date NULL DEFAULT NULL,
`alamat_tinggal` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`jenis_kelamin` varchar(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`kewarganegaraan` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`agama` varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`no_telp` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`riwayat_pendidikan` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`pengalaman_pekerjaan` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`pendidikan_terakhir` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`upload_cv` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of m_pelamar
-- ----------------------------
INSERT INTO `m_pelamar` VALUES (6, 'Okki Setyawan', NULL, '[email protected]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for m_supervisor
-- ----------------------------
DROP TABLE IF EXISTS `m_supervisor`;
CREATE TABLE `m_supervisor` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`nik` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`nama` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`no_ktp` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`alamat` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`no_telp` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`email` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_hasil_seleksi
-- ----------------------------
DROP TABLE IF EXISTS `t_hasil_seleksi`;
CREATE TABLE `t_hasil_seleksi` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`id_pengujian` int(10) NULL DEFAULT NULL,
`id_pelamar` int(10) NULL DEFAULT NULL,
`id_hrd` int(10) NULL DEFAULT NULL,
`keterangan` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`approval_hrd` varchar(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`approval_spv` varchar(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`date_assign` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_lamaran
-- ----------------------------
DROP TABLE IF EXISTS `t_lamaran`;
CREATE TABLE `t_lamaran` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`id_pelamar` int(10) NULL DEFAULT NULL,
`id_lowongan` int(10) NULL DEFAULT NULL,
`date_assign` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_pengujian
-- ----------------------------
DROP TABLE IF EXISTS `t_pengujian`;
CREATE TABLE `t_pengujian` (
`id` int(10) NOT NULL,
`id_pelamar` int(10) NULL DEFAULT NULL,
`id_lowongan` int(10) NULL DEFAULT NULL,
`id_supervisor` int(10) NULL DEFAULT NULL,
`materi_uji` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`nilai_uji` varchar(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`keterangan` varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`date_assign` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;
| 52.520362 | 1,187 | 0.696649 |
462c77f2ce34544e42fba4ef4f1c0ca27692d936 | 1,359 | php | PHP | app/Http/Controllers/PagesController.php | hossein-nas/AUSMT | 8a5ac59c1191fb9d514604c5d7aeac72b7d92d03 | [
"MIT"
] | null | null | null | app/Http/Controllers/PagesController.php | hossein-nas/AUSMT | 8a5ac59c1191fb9d514604c5d7aeac72b7d92d03 | [
"MIT"
] | null | null | null | app/Http/Controllers/PagesController.php | hossein-nas/AUSMT | 8a5ac59c1191fb9d514604c5d7aeac72b7d92d03 | [
"MIT"
] | null | null | null | <?php
namespace App\Http\Controllers;
use App\Post;
use App\Incoming_event as Incoming;
use Illuminate\Http\Request;
use App\Http\Requests;
class PagesController extends Controller
{
public function about(){
$name = "Hossein Nasiri";
return view('pages.about',["first"=>"Hossein","last"=>"Nasiri"]);
}
// post
public function post($hifen) {
$post = Post::post($hifen);
$post->increase;
return view('pages.postview.posts',compact('post'));
}
public function page($hifen) {
$page = Post::page($hifen);
return view('pages.postview.pages',compact('page'));
}
public function notfication($hifen) {
$notfication = Post::notfication($hifen);
$notfication->increase;
return view('pages.postview.notfications',compact('notfication'));
}
public function seminar($hifen) {
$seminar = Post::seminar($hifen);
$seminar->increase;
return view('pages.postview.seminars',compact('seminar'));
}
public function incoming($hifen) {
$incoming = Post::incoming($hifen);
return view('pages.postview.incoming',compact('incoming'));
}
public function other($hifen) {
$other = Post::other($hifen);
$other->increase;
return view('pages.postview.others',compact('other'));
}
}
| 27.734694 | 74 | 0.61663 |
084b1920006b744d92ade30630b3fea45eff9734 | 6,091 | lua | Lua | gamemode/modules/hud/sh_alert.lua | AlexSwift/vrzn | 1188b0a82c831ac6fc34787fad74d4d1a16f44ed | [
"MIT"
] | null | null | null | gamemode/modules/hud/sh_alert.lua | AlexSwift/vrzn | 1188b0a82c831ac6fc34787fad74d4d1a16f44ed | [
"MIT"
] | null | null | null | gamemode/modules/hud/sh_alert.lua | AlexSwift/vrzn | 1188b0a82c831ac6fc34787fad74d4d1a16f44ed | [
"MIT"
] | 1 | 2021-02-16T02:02:21.000Z | 2021-02-16T02:02:21.000Z |
AddCSLuaFile()
ALERT = {}
ALERT.__index = __index
ALERT.Items = {}
tblZones = {
rp_downtown_v2_insonic = {
{
name = "Cassino",
from = Vector(-5690, -8366, -200),
to = Vector(-3637, -7172, 500)
},
{
name = "Bairro Capitalista",
from = Vector(-5722, -7150, -200),
to = Vector( 1087, -4340, 500)
},
{
name = "Zona Sul",
from = Vector(1156, -7372, -200),
to = Vector(3784, -4916, 300)
},
{
name = "Praia",
from = Vector(7564, -4769, -200),
to = Vector(1983, -664, 500)
},
{
name = "Bairro do trabalhador",
from = Vector(1346, -2092, -200),
to = Vector(-341, -616, 500)
},
{
name = "Centro da cidade",
from = Vector(-2895, -2415, -200),
to = Vector(-1040, 942, 500)
},
{
name = "Bairro Gole de Skol",
from = Vector(-9, 424, -200),
to = Vector(1510, 4223, 500)
},
{
name = "Bairro do Vazio",
from = Vector( 1786, 2528, -200),
to = Vector( 4600, 4194, 500 )
},
{
name = "Área do Spawn",
from = Vector(3647, 1959, -200),
to = Vector(2016, 128, 500)
}
}
}
function ALERT:Create(tt, bt, ic, t, ply)
if (CLIENT) then
table.insert(self.Items, {
title = tt,
bottom = bt,
icon = ic,
time = t
})
else
net.Start("AddToast")
net.WriteString(tt)
net.WriteString(bt)
net.WriteString(ic)
net.WriteFloat(t)
if (ply) then
net.Send(ply)
else
net.Broadcast()
end
end
end
--LocalPlayer().zone = 0
hook.Add("Think", "CheckToastInside", function(ply)
if (CLIENT and tblZones[game.GetMap()] and #tblZones[game.GetMap()] > 0) then
local ply = LocalPlayer()
ply.NoZone = true
for k, v in pairs(tblZones[game.GetMap()]) do
if (ply:GetPos():WithinAABox(v.from - Vector(0, 0, 70), v.to)) then
ply.NoZone = false
if ((ply.zone or 0) ~= k and (ply.zonename or "") ~= v.name) then
ply.zone = k
ply.zonename = v.name
ALERT:Create("ENTRANDO EM", "" .. v.name, "materials/vgui/elements/coordinates.png", 3)
end
if (ply.zone == k and not ply:GetPos():WithinAABox(v.from - Vector(0, 0, 60), v.to)) then
ply.zone = 0
end
end
end
if (ply.NoZone) then
ply.zone = 0
ply.zonename = ""
end
end
end)
net.Receive("AddToast", function()
ALERT:Create(net.ReadString(), net.ReadString(), net.ReadString(), net.ReadFloat())
end)
if CLIENT then
local blur = Material("pp/blurscreen")
local function DrawBlurRect(x, y, w, h)
local X, Y = 0, 0
surface.SetDrawColor(255, 255, 255)
surface.SetMaterial(blur)
for i = 1, 3 do
blur:SetFloat("$blur", (i / 2) * (3))
blur:Recompute()
render.UpdateScreenEffectTexture()
render.SetScissorRect(x, y, x + w, y + h, true)
surface.DrawTexturedRect(X * -1, Y * -1, ScrW(), ScrH())
render.SetScissorRect(0, 0, 0, 0, false)
end
draw.RoundedBox(0, x, y, w, h, Color(0, 0, 0, 175))
surface.SetDrawColor(0, 0, 0, 255)
surface.DrawOutlinedRect(x, y, w, h)
end
surface.CreateFont("Oswald", {
font = "Montserrat Regular",
size = 32,
weight = 100
})
surface.CreateFont("OswaldBold", {
font = "Montserrat Bold",
size = 48,
weight = 600
})
local toast = nil
local tx, bx = 0, 0
hook.Add("HUDPaint", "ShowToastsOnScreen", function()
-- if IsValid(Monolith.HUD.IntroScreen) then
-- return
-- end
if (#ALERT.Items > 0) then
toast = ALERT.Items[1]
if (not toast.on) then
toast.on = true
toast.h = 40
toast.prg = 0
end
if toast and toast.time > 0 then
toast.prg = Lerp(FrameTime() * 8, toast.prg, 1)
else
toast.prg = Lerp(FrameTime() * 8, toast.prg, -1)
if (toast.prg < -0.05) then
table.RemoveByValue(ALERT.Items, ALERT.Items[1])
end
end
toast.time = toast.time - FrameTime()
BSHADOWS.BeginShadow()
draw.RoundedBox(8, ScrW() / 2 - ((tx > bx and tx or bx) + 64) / 2 - 32 , toast.h - 8, (tx > bx and tx or bx) + 112, (64 + 16) * toast.prg, Color(26,26,26))
BSHADOWS.EndShadow(1, 1, 2, 200)
tx, _ = draw.SimpleText(toast.title, "OswaldBold", ScrW() / 2 + 32, toast.h + 16, Color(235, 235, 235, 255 * toast.prg), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
bx, _ = draw.SimpleText(toast.bottom, "HUD::0.2vw", ScrW() / 2 + 16, toast.h + 16 - (1 - toast.prg * 36), Color(235, 235, 235, 255 * toast.prg), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
surface.SetMaterial(Material(toast.icon))
surface.SetDrawColor(255, 255, 255, 255 * toast.prg)
surface.DrawTexturedRect(ScrW() / 2 - ((tx > bx and tx or bx) + 32) / 2 - (29 + 16) + 10, toast.h, 64, (64) * toast.prg)
end
end)
end
| 32.057895 | 198 | 0.448202 |
ff5ee34cbb032159de8722c2021b6a308810f1e1 | 109 | py | Python | PW Crack #2/pass.py | AbrahamDevs/PicoCTF-WriteUps | 5277157d8af3ecebf013298aedba629ad0e38fda | [
"Unlicense"
] | null | null | null | PW Crack #2/pass.py | AbrahamDevs/PicoCTF-WriteUps | 5277157d8af3ecebf013298aedba629ad0e38fda | [
"Unlicense"
] | null | null | null | PW Crack #2/pass.py | AbrahamDevs/PicoCTF-WriteUps | 5277157d8af3ecebf013298aedba629ad0e38fda | [
"Unlicense"
] | null | null | null | #user_pw = chr(0x63) + chr(0x30) + chr(0x30) + chr(0x30)
print(chr(0x63) + chr(0x30) + chr(0x30) + chr(0x30)) | 54.5 | 56 | 0.623853 |
c69187268fb4755676c5f0a1322e1a24d93ec526 | 39 | py | Python | setup/brython/__init__.py | ranjian0/brython | 6dd5f2e3e89638d1607f118cf25f6b0375890381 | [
"BSD-3-Clause"
] | null | null | null | setup/brython/__init__.py | ranjian0/brython | 6dd5f2e3e89638d1607f118cf25f6b0375890381 | [
"BSD-3-Clause"
] | null | null | null | setup/brython/__init__.py | ranjian0/brython | 6dd5f2e3e89638d1607f118cf25f6b0375890381 | [
"BSD-3-Clause"
] | null | null | null | __version__ = implementation = "3.10.1" | 39 | 39 | 0.74359 |
da36159bad2d36fc38cecf52568fabd85bc6d29d | 1,419 | rb | Ruby | spec/unit/keyed_factory_spec.rb | yxchiwork/r10k | 29204764d7aa824801690ea388d7065a2b32e391 | [
"Apache-2.0"
] | 468 | 2015-01-04T08:14:57.000Z | 2022-03-13T14:24:15.000Z | spec/unit/keyed_factory_spec.rb | jantman/r10k | 4ec28c2178d016bb9afdbef0530e673492f068fb | [
"Apache-2.0"
] | 753 | 2015-01-02T20:30:16.000Z | 2022-03-31T18:59:18.000Z | spec/unit/keyed_factory_spec.rb | jantman/r10k | 4ec28c2178d016bb9afdbef0530e673492f068fb | [
"Apache-2.0"
] | 380 | 2015-01-06T18:23:00.000Z | 2022-03-30T09:43:31.000Z | require 'spec_helper'
require 'r10k/keyed_factory'
describe R10K::KeyedFactory do
let(:registered) { Class.new }
describe "registering implementations" do
it "can register new implementations" do
subject.register(:klass, registered)
expect(subject.retrieve(:klass)).to eq registered
end
it "raises an error when a duplicate implementation is registered" do
subject.register(:klass, registered)
expect {
subject.register(:klass, registered)
}.to raise_error(R10K::KeyedFactory::DuplicateImplementationError)
end
it "can register classes with nil as a key" do
subject.register(nil, registered)
expect(subject.retrieve(nil)).to eq registered
end
end
describe "generating instances" do
before do
subject.register(:klass, registered)
end
it "generates an instance with the associated class" do
instance = subject.generate(:klass)
expect(instance).to be_a_kind_of registered
end
it "can generate a class with nil as a key" do
other = Class.new
subject.register(nil, other)
instance = subject.generate(nil)
expect(instance).to be_a_kind_of other
end
it "raises an error if no implementation was registered with the given key" do
expect {
subject.generate(:foo)
}.to raise_error(R10K::KeyedFactory::UnknownImplementationError)
end
end
end
| 27.288462 | 82 | 0.696265 |
10348eaab1b8150ab46744de2125f2f5fba898fb | 1,059 | dart | Dart | lib/src/flutter_danmaku_render.dart | a62527776a/flutter_danmaku | 51b7b18592b7166f519b0a27954950873dbca9ad | [
"MIT"
] | 31 | 2020-11-10T13:28:44.000Z | 2022-03-20T05:23:51.000Z | lib/src/flutter_danmaku_render.dart | a62527776a/flutter_danmaku | 51b7b18592b7166f519b0a27954950873dbca9ad | [
"MIT"
] | 2 | 2020-11-02T06:36:20.000Z | 2020-11-04T11:20:11.000Z | lib/src/flutter_danmaku_render.dart | a62527776a/flutter_danmaku | 51b7b18592b7166f519b0a27954950873dbca9ad | [
"MIT"
] | 3 | 2021-10-14T06:56:29.000Z | 2021-11-29T08:04:53.000Z | import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_danmaku/src/config.dart';
import 'package:flutter_danmaku/src/flutter_danmaku_bullet.dart';
class FlutterDanmakuRenderManager {
Timer _timer;
Timer get timer => _timer;
void run(Function nextFrame, Function setState) {
_timer = Timer.periodic(Duration(milliseconds: FlutterDanmakuConfig.unitTimer), (Timer timer) {
// 暂停不执行
if (!FlutterDanmakuConfig.pause) {
nextFrame();
setState(() {});
}
});
}
void dispose() {
_timer?.cancel();
}
// 渲染下一帧
List<FlutterDanmakuBulletModel> renderNextFramerate(List<FlutterDanmakuBulletModel> bullets, Function(UniqueKey) allOutLeaveCallBack) {
List<FlutterDanmakuBulletModel> _bullets = List.generate(bullets.length, (index) => bullets[index]);
_bullets.forEach((FlutterDanmakuBulletModel bulletModel) {
bulletModel.runNextFrame();
if (bulletModel.allOutLeave) {
allOutLeaveCallBack(bulletModel.id);
}
});
return _bullets;
}
}
| 27.868421 | 137 | 0.703494 |
57ef465b608eac11ebb8798334bd1dcd10691629 | 727 | php | PHP | app/Modelos/Administracion/Destino.php | N0NameF0und/Invex | e6ff9ce22fad68099d6b0e1d958633407bb50071 | [
"MIT"
] | null | null | null | app/Modelos/Administracion/Destino.php | N0NameF0und/Invex | e6ff9ce22fad68099d6b0e1d958633407bb50071 | [
"MIT"
] | 4 | 2021-02-02T19:13:36.000Z | 2022-02-27T05:57:55.000Z | app/Modelos/Administracion/Destino.php | N0NameF0und/bod | d60c9a47b353ee2bb7cf672a0fc668f9efdcad14 | [
"MIT"
] | null | null | null | <?php
namespace App\Modelos\Administracion;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Model;
class Destino extends Model
{
public function Coleccionar() {
return DB::connection('sqlsrv')->select(
" Select Destino.cod_destino as Codigo,Destino.nombre_destino as Destino, (Select Case Destino.ESTADO When 1 Then 'ACTIVO'
When 0 Then 'INACTIVO' END) as Estado from Destino "
);
}
public function Insertar($data){
return DB::connection('sqlsrv')->insert(
"INSERT INTO Destino
(
[nombre_destino]
,[ESTADO])
VALUES
(?,?)",[$data['Destino'],'1']
);
}
}
| 25.068966 | 133 | 0.588721 |
8eeb6da63751551107a2d4c9e3bbc0642cb52675 | 8,472 | rs | Rust | tests/lib.rs | AxelNennker/bytebuffer-rs | 5d91ee5151cb1359a7925936d9b8b49e644e7637 | [
"Apache-2.0",
"MIT"
] | 6 | 2016-06-26T20:40:20.000Z | 2018-11-23T18:14:21.000Z | tests/lib.rs | AxelNennker/bytebuffer-rs | 5d91ee5151cb1359a7925936d9b8b49e644e7637 | [
"Apache-2.0",
"MIT"
] | 3 | 2019-08-17T10:20:14.000Z | 2020-07-23T16:35:48.000Z | tests/lib.rs | AxelNennker/bytebuffer-rs | 5d91ee5151cb1359a7925936d9b8b49e644e7637 | [
"Apache-2.0",
"MIT"
] | 6 | 2019-09-23T17:18:18.000Z | 2021-12-01T01:15:32.000Z | extern crate bytebuffer;
use bytebuffer::*;
use std::io::{Read, Write, ErrorKind};
#[test]
fn test_empty() {
let mut buffer = ByteBuffer::new();
buffer.write_u8(1);
assert_eq!(buffer.len(), 1);
}
#[test]
fn test_u8() {
let mut buffer = ByteBuffer::new();
buffer.write_u8(0xF0);
assert_eq!(buffer.read_u8().unwrap(), 0xF0);
}
#[test]
fn test_u16() {
let mut buffer = ByteBuffer::new();
buffer.write_u16(0xF0E1);
assert_eq!(buffer.read_u16().unwrap(), 0xF0E1);
}
#[test]
fn test_u16_little_endian(){
let mut buffer = ByteBuffer::new();
buffer.set_endian(Endian::LittleEndian);
buffer.write_u16(0xF0E1);
assert_eq!(buffer.read_u16().unwrap(), 0xF0E1);
}
#[test]
fn test_u32() {
let mut buffer = ByteBuffer::new();
buffer.write_u32(0xF0E1D2C3);
assert_eq!(buffer.read_u32().unwrap(), 0xF0E1D2C3);
}
#[test]
fn test_u32_little_endian() {
let mut buffer = ByteBuffer::new();
buffer.set_endian(Endian::LittleEndian);
buffer.write_u32(0xF0E1D2C3);
assert_eq!(buffer.read_u32().unwrap(), 0xF0E1D2C3);
}
#[test]
fn test_u64() {
let mut buffer = ByteBuffer::new();
buffer.write_u64(0xF0E1D2C3B4A59687);
assert_eq!(buffer.read_u64().unwrap(), 0xF0E1D2C3B4A59687);
}
#[test]
fn test_u64_little_endian() {
let mut buffer = ByteBuffer::new();
buffer.set_endian(Endian::LittleEndian);
buffer.write_u64(0xF0E1D2C3B4A59687);
assert_eq!(buffer.read_u64().unwrap(), 0xF0E1D2C3B4A59687);
}
#[test]
fn test_signed() {
let mut buffer = ByteBuffer::new();
buffer.write_i8(-1);
assert_eq!(buffer.read_u8().unwrap(), 0xFF);
}
#[test]
fn test_signed_little_endian() {
let mut buffer = ByteBuffer::new();
buffer.set_endian(Endian::LittleEndian);
buffer.write_i8(-1);
assert_eq!(buffer.read_u8().unwrap(), 0xFF);
}
#[test]
fn test_string() {
let mut buffer = ByteBuffer::new();
buffer.write_string("hello");
assert_eq!(buffer.read_string().unwrap(), "hello");
}
#[test]
fn test_mixed() {
let mut buffer = ByteBuffer::new();
buffer.write_i16(-1);
buffer.write_string("hello");
buffer.write_u64(0xF0E1D2C3B4A59687);
assert_eq!(buffer.read_i16().unwrap(), -1);
assert_eq!(buffer.read_string().unwrap(), "hello");
assert_eq!(buffer.read_u64().unwrap(), 0xF0E1D2C3B4A59687);
}
#[test]
fn test_string_overread_protection() {
let mut buffer = ByteBuffer::new();
buffer.write_u32(2);
buffer.write_bytes(&[0x65]);
let result = buffer.read_string();
assert!(result.is_err());
let error = result.err().unwrap();
assert_eq!(error.kind(), ErrorKind::UnexpectedEof);
}
#[test]
fn test_to_string() {
let mut buffer = ByteBuffer::new();
buffer.write_string("hello");
assert_eq!(buffer.to_string(), "0x00 0x00 0x00 0x05 0x68 0x65 0x6c 0x6c 0x6f");
}
#[test]
fn test_wpos() {
let mut buffer = ByteBuffer::new();
buffer.write_u32(0);
buffer.set_wpos(1);
buffer.write_u8(0xFF);
buffer.write_u8(0x11);
assert_eq!(buffer.read_u32().unwrap(), 0x00FF1100);
}
#[test]
fn test_rpos() {
let mut buffer = ByteBuffer::new();
buffer.write_u32(0x0000FF00);
buffer.set_rpos(2);
assert_eq!(buffer.read_u8().unwrap(), 0xFF);
}
#[test]
fn test_to_bytes() {
let mut buffer = ByteBuffer::new();
buffer.write_u8(0xFF);
assert_eq!(buffer.to_bytes(), vec![0xFF]);
}
#[test]
fn test_from_bytes() {
let mut buffer = ByteBuffer::from_bytes(&vec![1, 2]);
assert_eq!(buffer.read_u8().unwrap() + buffer.read_u8().unwrap(), 3);
}
#[test]
fn test_read_bit() {
let mut buffer = ByteBuffer::from_bytes(&vec![128]);
let bit1 = buffer.read_bit().unwrap();
assert_eq!(bit1, true);
let bit2 = buffer.read_bit().unwrap();
assert_eq!(bit2, false);
}
#[test]
fn test_cannot_read_bit_outside_data() {
let mut buffer = ByteBuffer::new();
let result = buffer.read_bit();
assert!(result.is_err());
let error = result.err().unwrap();
assert_eq!(error.kind(), ErrorKind::UnexpectedEof);
}
#[test]
fn test_read_bits() {
let mut buffer = ByteBuffer::from_bytes(&vec![128]);
let value = buffer.read_bits(3).unwrap();
assert_eq!(value, 4);
}
#[test]
fn test_cannot_read_more_than_64_bits() {
let mut buffer = ByteBuffer::from_bytes(&vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
let result = buffer.read_bits(73);
assert!(result.is_err());
let error = result.err().unwrap();
assert_eq!(error.kind(), ErrorKind::InvalidInput);
}
#[test]
fn test_write_bit() {
let mut buffer = ByteBuffer::new();
buffer.write_bit(true);
buffer.write_bit(true);
buffer.write_bit(false);
assert_eq!(buffer.to_bytes()[0], 128 + 64);
}
#[test]
fn test_write_bits() {
let mut buffer = ByteBuffer::new();
buffer.write_bits(6, 3); // 110b
assert_eq!(buffer.to_bytes()[0], 128 + 64);
}
#[test]
fn test_flush_bit() {
let mut buffer = ByteBuffer::new();
buffer.write_bit(true);
buffer.write_i8(1);
let buffer_result_1 = buffer.to_bytes();
assert_eq!(buffer_result_1[0], 128);
assert_eq!(buffer_result_1[1], 1);
let mut buffer2 = ByteBuffer::from_bytes(&vec![0xFF, 0x01]);
let bit1 = buffer2.read_bit().unwrap();
let number1 = buffer2.read_i8().unwrap();
assert_eq!(bit1, true);
assert_eq!(number1, 1);
}
#[test]
fn test_read_empty_buffer() {
let mut buffer = ByteBuffer::new();
buffer.write_u8(0xFF);
let mut res = [];
buffer.read(&mut res).unwrap();
}
#[test]
fn test_read_exact_buffer() {
let mut buffer = ByteBuffer::new();
buffer.write_u8(0xFF);
let mut res = [0; 1];
buffer.read(&mut res).unwrap();
assert_eq!(res[0], 0xFF);
}
#[test]
fn test_read_larger_buffer() {
let mut buffer = ByteBuffer::new();
buffer.write_u8(0xFF);
let mut res = [0; 2];
buffer.read(&mut res).unwrap();
assert_eq!(res[0], 0xFF);
assert_eq!(res[1], 0);
}
#[test]
fn test_read_larger_buffer_twice() {
let mut buffer = ByteBuffer::new();
buffer.write_u8(0xFF);
let mut res = [0; 2];
buffer.read(&mut res).unwrap();
// Check for overflow on second read
buffer.read(&mut res).unwrap();
assert_eq!(res[0], 0xFF);
assert_eq!(res[1], 0);
}
#[test]
fn test_write() {
let mut buffer = ByteBuffer::new();
buffer.write(&[0x1, 0xFF, 0x45]).unwrap();
assert_eq!(buffer.read_bytes(3).unwrap(), &[0x1, 0xFF, 0x45]);
}
#[test]
fn test_flush() {
let mut buffer = ByteBuffer::new();
buffer.flush().unwrap();
}
#[test]
fn test_debug() {
let mut buffer = ByteBuffer::from_bytes(&[0x1, 0xFF, 0x45]);
buffer.read_u8().unwrap();
let debug_string = format!("{:?}", buffer);
assert_eq!(&debug_string, "ByteBuffer { remaining_data: [255, 69], total_data: [1, 255, 69], endian: BigEndian }");
}
#[test]
fn test_debug_with_bit_reads() {
let mut buffer = ByteBuffer::from_bytes(&[0x1, 0xFF, 0x45]);
let first_four_bits = buffer.read_bits(4).unwrap();
let debug_string = format!("{:?}", buffer);
assert_eq!(buffer.get_rpos(), 0);
let next_four_bits = buffer.read_bits(4).unwrap();
assert_eq!(buffer.get_rpos(), 1);
let remaining = buffer.read_bits(16).unwrap();
assert_eq!(&debug_string, "ByteBuffer { remaining_data: [255, 69], total_data: [1, 255, 69], endian: BigEndian }");
assert_eq!(first_four_bits, 0);
assert_eq!(next_four_bits, 1);
assert_eq!(remaining, 65349);
assert_eq!(buffer.get_rpos(), 3);
}
macro_rules! overread_tests {
($($name:ident: $value:expr,)*) => {
$(
#[test]
fn $name() {
let result = $value;
assert!(result.is_err());
let error = result.err().unwrap();
assert_eq!(error.kind(), ErrorKind::UnexpectedEof);
}
)*
}
}
overread_tests! {
overread_bytes: ByteBuffer::new().read_bytes(1),
overread_u8: ByteBuffer::new().read_u8(),
overread_i8: ByteBuffer::new().read_i8(),
overread_u16: ByteBuffer::new().read_u16(),
overread_i16: ByteBuffer::new().read_i16(),
overread_u32: ByteBuffer::new().read_u32(),
overread_i32: ByteBuffer::new().read_i32(),
overread_u64: ByteBuffer::new().read_u64(),
overread_i64: ByteBuffer::new().read_i64(),
overread_f32: ByteBuffer::new().read_f32(),
overread_f64: ByteBuffer::new().read_f64(),
overread_bit: ByteBuffer::new().read_bit(),
overread_bits: ByteBuffer::new().read_bits(1),
}
| 26.310559 | 119 | 0.640581 |
078d6f1eea53658e14e3b108f35d062ae09df3e4 | 31,574 | css | CSS | assets/css/hermit.css | hkmshb/lektor-theme-hermit | 9d00fd4efedd8d20fb64eacf3675512341541ae5 | [
"MIT"
] | null | null | null | assets/css/hermit.css | hkmshb/lektor-theme-hermit | 9d00fd4efedd8d20fb64eacf3675512341541ae5 | [
"MIT"
] | 1 | 2021-05-11T04:46:51.000Z | 2021-05-11T04:46:51.000Z | assets/css/hermit.css | hkmshb/lektor-theme-hermit | 9d00fd4efedd8d20fb64eacf3675512341541ae5 | [
"MIT"
] | null | null | null | @charset "UTF-8";
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
/* Webkit Scrollbar Customize */
::-webkit-scrollbar {
width: 8px;
height: 8px;
background: #212020; }
::-webkit-scrollbar-thumb {
background: #888; }
::-webkit-scrollbar-thumb:hover {
background: #dcdcdc; }
html {
line-height: 1.15;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */ }
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0; }
/**
* Render the `main` element consistently in IE.
*/
main {
display: block; }
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0; }
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box;
/* 1 */
height: 0;
/* 1 */
overflow: visible;
/* 2 */ }
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace;
/* 1 */
font-display: auto;
font-size: 1em;
/* 2 */ }
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent; }
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
/* 1 */
text-decoration: underline;
/* 2 */
text-decoration: underline dotted;
/* 2 */ }
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder; }
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace;
/* 1 */
font-display: auto;
font-size: 1em;
/* 2 */ }
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%; }
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline; }
sub {
bottom: -0.25em; }
sup {
top: -0.5em; }
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none; }
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-display: auto;
font-size: 100%;
/* 1 */
line-height: 1.15;
/* 1 */
margin: 0;
/* 2 */ }
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible; }
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none; }
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button; }
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0; }
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText; }
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em; }
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box;
/* 1 */
color: inherit;
/* 2 */
display: table;
/* 1 */
max-width: 100%;
/* 1 */
padding: 0;
/* 3 */
white-space: normal;
/* 1 */ }
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline; }
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto; }
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */ }
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto; }
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */ }
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none; }
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */ }
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block; }
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item; }
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none; }
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none; }
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
/* Webkit Scrollbar Customize */
::-webkit-scrollbar {
width: 8px;
height: 8px;
background: #212020; }
::-webkit-scrollbar-thumb {
background: #888; }
::-webkit-scrollbar-thumb:hover {
background: #dcdcdc; }
html {
line-height: 1.15;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */ }
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0; }
/**
* Render the `main` element consistently in IE.
*/
main {
display: block; }
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0; }
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box;
/* 1 */
height: 0;
/* 1 */
overflow: visible;
/* 2 */ }
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace;
/* 1 */
font-display: auto;
font-size: 1em;
/* 2 */ }
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent; }
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
/* 1 */
text-decoration: underline;
/* 2 */
text-decoration: underline dotted;
/* 2 */ }
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder; }
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace;
/* 1 */
font-display: auto;
font-size: 1em;
/* 2 */ }
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%; }
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline; }
sub {
bottom: -0.25em; }
sup {
top: -0.5em; }
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none; }
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-display: auto;
font-size: 100%;
/* 1 */
line-height: 1.15;
/* 1 */
margin: 0;
/* 2 */ }
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible; }
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none; }
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button; }
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0; }
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText; }
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em; }
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box;
/* 1 */
color: inherit;
/* 2 */
display: table;
/* 1 */
max-width: 100%;
/* 1 */
padding: 0;
/* 3 */
white-space: normal;
/* 1 */ }
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline; }
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto; }
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */ }
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto; }
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */ }
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none; }
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */ }
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block; }
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item; }
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none; }
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none; }
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+abap+actionscript+ada+apacheconf+apl+applescript+c+arff+asciidoc+asm6502+csharp+autohotkey+autoit+bash+basic+batch+bison+brainfuck+bro+cpp+aspnet+arduino+cil+coffeescript+clojure+ruby+csp+css-extras+d+dart+diff+django+docker+eiffel+elixir+elm+markup-templating+erlang+fsharp+flow+fortran+gcode+gedcom+gherkin+git+glsl+gml+go+graphql+groovy+less+handlebars+haskell+haxe+hcl+http+hpkp+hsts+ichigojam+icon+inform7+ini+io+j+java+javastacktrace+jolie+json+julia+keyman+kotlin+latex+markdown+liquid+lisp+livescript+lolcode+lua+makefile+crystal+erb+matlab+mel+mizar+monkey+n1ql+n4js+nand2tetris-hdl+nasm+nginx+nim+nix+nsis+objectivec+ocaml+opencl+oz+parigp+parser+pascal+perl+php+php-extras+sql+powershell+processing+prolog+properties+protobuf+scss+puppet+pure+python+q+qore+r+jsx+typescript+renpy+reason+rest+rip+roboconf+textile+rust+sas+sass+stylus+scala+scheme+smalltalk+smarty+plsql+soy+pug+swift+yaml+tcl+haml+toml+tt2+twig+tsx+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+wasm+wiki+xeora+xojo+xquery+tap */
/**
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
* Based on https://github.com/chriskempson/tomorrow-theme
* @author Rose Pritchard
*/
code[class*="language-"],
pre[class*="language-"] {
color: #ccc;
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-display: auto;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none; }
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto; }
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #2d2d2d; }
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal; }
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999; }
.token.punctuation {
color: #ccc; }
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
color: #e2777a; }
.token.function-name {
color: #6196cc; }
.token.boolean,
.token.number,
.token.function {
color: #f08d49; }
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
color: #f8c555; }
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
color: #cc99cd; }
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
color: #7ec699; }
.token.operator,
.token.entity,
.token.url {
color: #67cdcc; }
.token.important,
.token.bold {
font-weight: bold; }
.token.italic {
font-style: italic; }
.token.entity {
cursor: help; }
.token.inserted {
color: green; }
/* light theme color */
/* dark theme colors */
/* variables for js, must be the same as these in @custom-media queries */
:root {
--phoneWidth: (max-width: 684px);
--tabletWidth: (max-width: 900px); }
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-display: auto;
font-weight: 400;
src: url("../fonts/Inter-UI-Regular.woff2") format("woff2"), url("../fonts/Inter-UI-Regular.woff") format("woff"); }
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-display: auto;
font-weight: 400;
src: url("../fonts/Inter-UI-Italic.woff2") format("woff2"), url("../fonts/Inter-UI-Italic.woff") format("woff"); }
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-display: auto;
font-weight: 600;
src: url("../fonts/Inter-UI-Medium.woff2") format("woff2"), url("../fonts/Inter-UI-Medium.woff") format("woff"); }
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-display: auto;
font-weight: 600;
src: url("../fonts/Inter-UI-MediumItalic.woff2") format("woff2"), url("../fonts/Inter-UI-MediumItalic.woff") format("woff"); }
@font-face {
font-family: 'Inter UI';
font-style: normal;
font-display: auto;
font-weight: 800;
src: url("../fonts/Inter-UI-Bold.woff2") format("woff2"), url("../fonts/Inter-UI-Bold.woff") format("woff"); }
@font-face {
font-family: 'Inter UI';
font-style: italic;
font-display: auto;
font-weight: 800;
src: url("../fonts/Inter-UI-BoldItalic.woff2") format("woff2"), url("../fonts/Inter-UI-BoldItalic.woff") format("woff"); }
.button-container {
display: table;
margin-left: auto;
margin-right: auto; }
button,
.button,
a.button {
position: relative;
display: flex;
align-items: center;
justify-content: center;
padding: 8px 18px;
margin-bottom: 5px;
background: #eaeaea;
text-decoration: none;
text-align: center;
font-weight: 500;
border-radius: 8px;
border: 1px solid transparent;
appearance: none;
cursor: pointer;
outline: none;
/* variants */ }
.dark-theme button, .dark-theme
.button, .dark-theme
a.button {
background: #3b3d42;
color: inherit; }
button.outline,
.button.outline,
a.button.outline {
background: transparent;
border-color: #eaeaea;
box-shadow: none;
padding: 8px 18px; }
.dark-theme button.outline, .dark-theme
.button.outline, .dark-theme
a.button.outline {
border-color: #3b3d42;
color: inherit; }
button.outline :hover,
.button.outline :hover,
a.button.outline :hover {
transform: none;
box-shadow: none; }
button.primary,
.button.primary,
a.button.primary {
box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08); }
button.primary:hover,
.button.primary:hover,
a.button.primary:hover {
box-shadow: 0 2px 6px rgba(50, 50, 93, 0.21), 0 1px 3px rgba(0, 0, 0, 0.08); }
button.link,
.button.link,
a.button.link {
background: none;
font-size: 1rem; }
button.small,
.button.small,
a.button.small {
font-size: .8rem; }
button.wide,
.button.wide,
a.button.wide {
min-width: 200px;
padding: 14px 24px; }
.code-toolbar {
margin-bottom: 20px; }
.code-toolbar .toolbar-item a {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px 8px;
margin-bottom: 5px;
background: #eaeaea;
text-decoration: none;
text-align: center;
font-size: 13px;
font-weight: 500;
border-radius: 8px;
border: 1px solid transparent;
appearance: none;
cursor: pointer;
outline: none; }
.dark-theme .code-toolbar .toolbar-item a {
background: #3b3d42;
color: inherit; }
.header {
background: #fafafa;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 20px; }
.dark-theme .header {
background: #252627; }
.header__right {
display: flex;
flex-direction: row;
align-items: center; }
@media (max-width: 684px) {
.header__right {
flex-direction: row-reverse; } }
.header__inner {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
width: 760px;
max-width: 100%; }
.theme-toggle {
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
cursor: pointer; }
.theme-toggler {
fill: currentColor; }
.unselectable {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; }
.logo {
display: flex;
align-items: center;
text-decoration: none;
font-weight: bold;
font-display: auto;
font-family: monospace, monospace; }
.logo img {
height: 44px; }
.logo__mark {
margin-right: 5px; }
.logo__text {
font-size: 1.125rem; }
.logo__cursor {
display: inline-block;
width: 10px;
height: 1rem;
background: #fe5186;
margin-left: 5px;
border-radius: 1px;
animation: cursor 1s infinite; }
@media (prefers-reduced-motion: reduce) {
.logo__cursor {
animation: none; } }
@keyframes cursor {
0% {
opacity: 0; }
50% {
opacity: 1; }
100% {
opacity: 0; } }
.menu {
background: #fafafa;
border-right: 1px solid;
margin-right: 18px;
z-index: 9999; }
.dark-theme .menu {
background: #252627; }
@media (max-width: 684px) {
.menu {
position: absolute;
top: 50px;
right: 0;
border: none;
margin: 0;
padding: 10px; } }
.menu__inner {
display: flex;
align-items: center;
justify-content: flex-start;
max-width: 100%;
margin: 0 auto;
padding: 0 15px;
font-size: 1rem;
list-style: none; }
.menu__inner li {
margin: 0 12px; }
@media (max-width: 684px) {
.menu__inner {
flex-direction: column;
align-items: flex-start;
padding: 0; }
.menu__inner li {
margin: 0;
padding: 5px; } }
.menu-trigger {
width: 24px;
height: 24px;
fill: currentColor;
margin-left: 10px;
cursor: pointer; }
.menu a {
display: inline-block;
margin-right: 15px;
text-decoration: none; }
.menu a:hover {
text-decoration: underline; }
.menu a:last-of-type {
margin-right: 0; }
html {
box-sizing: border-box;
line-height: 1.6;
letter-spacing: .06em;
scroll-behavior: smooth; }
*,
*:before,
*:after {
box-sizing: inherit; }
body {
margin: 0;
padding: 0;
font-family: 'Inter UI', -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
font-display: auto;
font-size: 1rem;
line-height: 1.54;
background-color: #fff;
color: #222;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
-webkit-overflow-scrolling: touch;
-webkit-text-size-adjust: 100%;
display: flex;
min-height: 100vh;
flex-direction: column; }
@media (max-width: 684px) {
body {
font-size: 1rem; } }
body.dark-theme {
background-color: #292a2d;
color: #a9a9b3; }
h2, h3, h4, h5, h6 {
display: flex;
align-items: center;
line-height: 1.3; }
h1 {
font-size: 2.625rem; }
h2 {
font-size: 1.625rem; }
h3 {
font-size: 1.375rem; }
h4 {
font-size: 1.125rem; }
@media (max-width: 684px) {
h1 {
font-size: 2rem; }
h2 {
font-size: 1.4rem; }
h3 {
font-size: 1.15rem; }
h4 {
font-size: 1.125rem; } }
a {
color: inherit; }
img {
display: block;
max-width: 100%; }
img.left {
margin-right: auto; }
img.center {
margin-left: auto;
margin-right: auto; }
img.right {
margin-left: auto; }
figure {
display: table;
max-width: 100%;
margin: 25px 0; }
figure.left {
margin-right: auto; }
figure.center {
margin-left: auto;
margin-right: auto; }
figure.right {
margin-left: auto; }
figure figcaption {
font-size: 14px;
margin-top: 5px;
opacity: .8; }
figure figcaption.left {
text-align: left; }
figure figcaption.center {
text-align: center; }
figure figcaption.right {
text-align: right; }
code {
font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;
font-display: auto;
font-feature-settings: normal;
background: #eaeaea;
padding: 1px 6px;
margin: 0 2px;
border-radius: 5px;
font-size: .95rem; }
.dark-theme code {
background: #3b3d42; }
pre {
background: #212020;
padding: 20px;
border-radius: 8px;
font-size: .95rem;
overflow: auto; }
@media (max-width: 684px) {
pre {
white-space: pre-wrap;
word-wrap: break-word; } }
pre code {
background: none !important;
color: #ccc;
margin: 0;
padding: 0;
font-size: inherit; }
.dark-theme pre code {
color: inherit; }
blockquote {
border-left: 2px solid;
margin: 40px;
padding: 10px 20px; }
@media (max-width: 684px) {
blockquote {
margin: 10px;
padding: 10px; } }
blockquote:before {
content: '”';
font-family: Georgia, serif;
font-display: auto;
font-size: 3.875rem;
position: absolute;
left: -40px;
top: -20px; }
blockquote p:first-of-type {
margin-top: 0; }
blockquote p:last-of-type {
margin-bottom: 0; }
ul, ol {
margin-left: 40px;
padding: 0; }
@media (max-width: 684px) {
ul, ol {
margin-left: 20px; } }
ol ol {
list-style-type: lower-alpha; }
.container {
flex: 1 auto;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center; }
.content {
display: flex;
flex-direction: column;
flex: 1 auto;
align-items: center;
justify-content: center;
margin: 50px 0; }
@media (max-width: 684px) {
.content {
margin-top: 0; } }
hr {
width: 100%;
border: none;
background: #dcdcdc;
height: 1px; }
.dark-theme hr {
background: #4a4b50; }
.hidden {
display: none; }
@media (max-width: 684px) {
.hide-on-phone {
display: none; } }
@media (max-width: 900px) {
.hide-on-tablet {
display: none; } }
.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
word-wrap: normal !important; }
.screen-reader-text:focus {
background-color: #f1f1f1;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
clip: auto !important;
clip-path: none;
color: #21759b;
display: block;
font-size: 14px;
font-size: 0.875rem;
font-weight: bold;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000; }
.posts {
width: 100%;
max-width: 800px;
text-align: left;
padding: 20px;
margin: 20px auto; }
@media (max-width: 900px) {
.posts {
max-width: 660px; } }
.posts:not(:last-of-type) {
border-bottom: 1px solid #dcdcdc; }
.dark-theme .posts:not(:last-of-type) {
border-color: #4a4b50; }
.posts-group {
display: flex;
margin-bottom: 1.9em;
line-height: normal; }
@media (max-width: 900px) {
.posts-group {
display: block; } }
.posts-list {
flex-grow: 1;
margin: 0;
padding: 0;
list-style: none; }
.posts .post-title {
font-size: 1rem;
margin: 5px 0 5px 0; }
.posts .post-year {
padding-top: 6px;
margin-right: 1.8em;
font-size: 1.6em;
opacity: .6; }
@media (max-width: 900px) {
.posts .post-year {
margin: -6px 0 4px; } }
.posts .post-item {
border-bottom: 1px grey dashed; }
.posts .post-item a {
display: flex;
justify-content: space-between;
align-items: baseline;
padding: 12px 0;
text-decoration: none; }
.posts .post-day {
flex-shrink: 0;
margin-left: 1em;
opacity: .6; }
.post {
width: 100%;
max-width: 800px;
text-align: left;
padding: 20px;
margin: 20px auto; }
@media (max-width: 900px) {
.post {
max-width: 600px; } }
.post-date:after {
content: '—'; }
.post-title {
font-size: 2.625rem;
margin: 0 0 20px; }
@media (max-width: 684px) {
.post-title {
font-size: 2rem; } }
.post-title a {
text-decoration: none; }
.post-tags {
display: block;
margin-bottom: 20px;
font-size: 1rem;
opacity: .5; }
.post-tags a {
text-decoration: none; }
.post-content {
margin-top: 30px; }
.post-cover {
border-radius: 8px;
margin: 40px -50px;
width: 860px;
max-width: 860px; }
@media (max-width: 900px) {
.post-cover {
margin: 20px 0;
width: 100%; } }
.post-info {
margin-top: 30px;
font-size: .8rem;
line-height: normal;
opacity: .6; }
.post-info p {
margin: .8em 0; }
.post-info a:hover {
border-bottom: 1px solid white; }
.post-info svg {
margin-right: .8em; }
.post-info .tag {
margin-right: .5em; }
.post-info .tag::before {
content: "#"; }
.post-info .feather {
display: inline-block;
vertical-align: -.125em;
width: 1em;
height: 1em; }
.post .flag {
border-radius: 50%;
margin: 0 5px; }
.pagination {
margin-top: 20px; }
.pagination__title {
display: flex;
text-align: center;
position: relative;
margin: 30px 0 20px; }
.pagination__title-h {
text-align: center;
margin: 0 auto;
padding: 5px 10px;
background: #fff;
color: #999;
font-size: .8rem;
text-transform: uppercase;
text-decoration: none;
letter-spacing: .1em;
z-index: 1; }
.dark-theme .pagination__title-h {
background: #292a2d;
color: #73747b; }
.pagination__title hr {
position: absolute;
left: 0;
right: 0;
width: 100%;
margin-top: 15px;
z-index: 0; }
.pagination__buttons {
display: flex;
align-items: center;
justify-content: center; }
.pagination__buttons a {
text-decoration: none;
font-weight: bold; }
.button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
background: #eaeaea;
font-size: 1rem;
font-weight: 600;
border-radius: 8px;
max-width: 40%;
padding: 0;
cursor: pointer;
appearance: none; }
.dark-theme .button {
background: #3b3d42; }
.button + .button {
margin-left: 10px; }
.button a {
display: flex;
padding: 8px 16px;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden; }
.button__text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden; }
.button.next .button__icon {
margin-left: 8px; }
.button.previous .button__icon {
margin-right: 8px; }
.footer {
padding: 40px 20px;
flex-grow: 0;
color: #999; }
.footer__inner {
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
width: 760px;
max-width: 100%; }
@media (max-width: 900px) {
.footer__inner {
flex-direction: column; } }
.footer__content {
display: flex;
flex-direction: row;
align-items: center;
font-size: 1rem;
color: #999; }
@media (max-width: 900px) {
.footer__content {
flex-direction: column;
margin-top: 10px; } }
.footer__content > *:not(:last-child) {
border-right: 1px solid;
padding: 0 15px; }
@media (max-width: 900px) {
.footer__content > *:not(:last-child) {
border: none; } }
.footer__content > *:last-child {
padding: 0 15px; }
| 21.805249 | 1,105 | 0.598499 |
cf9ff3161d98d18cc5bb4cde9d88ae2270968134 | 280 | lua | Lua | src/resource/sys_script/Vec4.lua | degarashi/revenant | 9e671320a5c8790f6bdd1b14934f81c37819f7b3 | [
"MIT"
] | null | null | null | src/resource/sys_script/Vec4.lua | degarashi/revenant | 9e671320a5c8790f6bdd1b14934f81c37819f7b3 | [
"MIT"
] | null | null | null | src/resource/sys_script/Vec4.lua | degarashi/revenant | 9e671320a5c8790f6bdd1b14934f81c37819f7b3 | [
"MIT"
] | null | null | null | require("vector_common")
local tmp = {
_size = 4,
IsVec = function(a)
return VecC.IsVec(a) and a._size == 4
end,
_postfix = VecC.Postfix,
_metatable = VecC.Metatable,
_renamefunc =
RV.RenameFunc(
{"toVec2", "convert<2>"},
{"toVec3", "convert<3>"}
)
}
return tmp
| 17.5 | 39 | 0.639286 |
441df44b23a1317552d5a8d14ec3a46c96c346fa | 200 | py | Python | py_reportit/shared/repository/crawl.py | fedus/py_reportit | 46422cabb652571d8cce6c8e91a229009dcca141 | [
"MIT"
] | 1 | 2021-12-05T19:16:16.000Z | 2021-12-05T19:16:16.000Z | py_reportit/shared/repository/crawl.py | fedus/py_reportit | 46422cabb652571d8cce6c8e91a229009dcca141 | [
"MIT"
] | null | null | null | py_reportit/shared/repository/crawl.py | fedus/py_reportit | 46422cabb652571d8cce6c8e91a229009dcca141 | [
"MIT"
] | null | null | null | from py_reportit.shared.repository.abstract_repository import AbstractRepository
from py_reportit.shared.model.crawl import Crawl
class CrawlRepository(AbstractRepository[Crawl]):
model = Crawl
| 28.571429 | 80 | 0.845 |
ebea7801d8c693fd019e74cff3d2903c97401eee | 478 | css | CSS | src/components/VideoCard.css | shinheechae/shinheechae-YoutubeClone_ReactJS | 3c9171a00fee6803f57b28cfd1d81db640af8845 | [
"MIT"
] | 1 | 2022-02-20T04:34:17.000Z | 2022-02-20T04:34:17.000Z | src/components/VideoCard.css | shinheechae/shinheechae-YoutubeClone_ReactJS | 3c9171a00fee6803f57b28cfd1d81db640af8845 | [
"MIT"
] | null | null | null | src/components/VideoCard.css | shinheechae/shinheechae-YoutubeClone_ReactJS | 3c9171a00fee6803f57b28cfd1d81db640af8845 | [
"MIT"
] | null | null | null | .videoCard {
margin: 10px 10px 5px -5px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
}
.videoCard__text {
width: 300px;
min-height: 120px;
}
@media screen and (max-width: 375px) {
.videoCard {
margin: 0px -200px 5px 0px;
display: flex;
flex-direction: column;
width: 100vw;
}
.videoCard__text {
width: 100vw;
min-height: 120px;
margin-top: 4px;
}
} | 15.933333 | 38 | 0.537657 |
7f902e07a0ab9a29da73e48309424ee3de973c69 | 605 | php | PHP | framework/classes/TempFolder.php | WPPlugins/export2pdf | bf116bd63dc8622e998cd920af4e82ee84c31921 | [
"Apache-2.0",
"MIT"
] | null | null | null | framework/classes/TempFolder.php | WPPlugins/export2pdf | bf116bd63dc8622e998cd920af4e82ee84c31921 | [
"Apache-2.0",
"MIT"
] | 1 | 2018-08-01T15:44:12.000Z | 2018-08-01T15:44:12.000Z | framework/classes/TempFolder.php | export2pdf/export2pdf | 06af9d57ca678a931ce46055930854fa433a0baf | [
"Apache-2.0",
"MIT"
] | null | null | null | <?php
namespace Export2Pdf;
if ( ! defined( 'EXPORT2PDF_LOADED' ) )
die();
/**
* Temporary folder management
*/
class TempFolder extends TempFile
{
public function __construct( $extension = 'folder' )
{
parent::__construct( $extension );
@unlink( $this->path() );
@mkdir( $this->path() );
if ( ! file_exists( $this->path() ) )
throw new Exception( "It wasn't possible to create folder " . $this->path() );
$this->path .= '/';
}
/**
* Delete folder
*/
public function delete()
{
Tools::rm( $this->path() );
}
}
| 15.125 | 84 | 0.543802 |
188da37adfa2a036bab10641b511653936823eb0 | 276 | swift | Swift | MotionCollector/Model/SensorData+CoreDataClass.swift | kursatbakis/MotionCollector | 6cce804c162058e9de23774295b5cbc03314e367 | [
"MIT"
] | 62 | 2018-04-21T11:35:20.000Z | 2022-03-16T08:51:46.000Z | MotionCollector/Model/SensorData+CoreDataClass.swift | kursatbakis/MotionCollector | 6cce804c162058e9de23774295b5cbc03314e367 | [
"MIT"
] | 7 | 2018-12-21T10:44:37.000Z | 2021-03-29T22:32:31.000Z | MotionCollector/Model/SensorData+CoreDataClass.swift | kursatbakis/MotionCollector | 6cce804c162058e9de23774295b5cbc03314e367 | [
"MIT"
] | 20 | 2018-04-21T11:35:21.000Z | 2022-02-09T14:37:24.000Z | //
// SensorData+CoreDataClass.swift
// MotionCollector
//
// Created by Aleksei Degtiarev on 05/03/2018.
// Copyright © 2018 Aleksei Degtiarev. All rights reserved.
//
//
import Foundation
import CoreData
@objc(SensorData)
public class SensorData: NSManagedObject {
}
| 16.235294 | 60 | 0.73913 |
835fe659cc6c5601c9db628f56cde2994e2d60fa | 731 | ts | TypeScript | packages/formatjs-extract-cldr-data/scripts/aggregateLocaleFiles.ts | guopengliang/formatjs | d70a27d33c8ff40cbb1b6d4ee2413b6d6bbf82ce | [
"BSD-3-Clause"
] | 1 | 2022-02-19T15:03:48.000Z | 2022-02-19T15:03:48.000Z | packages/formatjs-extract-cldr-data/scripts/aggregateLocaleFiles.ts | guopengliang/formatjs | d70a27d33c8ff40cbb1b6d4ee2413b6d6bbf82ce | [
"BSD-3-Clause"
] | null | null | null | packages/formatjs-extract-cldr-data/scripts/aggregateLocaleFiles.ts | guopengliang/formatjs | d70a27d33c8ff40cbb1b6d4ee2413b6d6bbf82ce | [
"BSD-3-Clause"
] | 1 | 2019-08-30T12:01:53.000Z | 2019-08-30T12:01:53.000Z |
import {resolve, dirname} from 'path'
import {sync as globSync} from 'glob'
import {outputFileSync} from 'fs-extra'
const dateFields: Record<string, string> = globSync('*/dateFields.json', {
cwd: resolve(
dirname(require.resolve('cldr-dates-full/package.json')),
'./main'
)
})
.reduce(function(hash: Record<string, string>, filename) {
hash[dirname(filename)] = `cldr-dates-full/main/${filename}`;
return hash;
}, {});
const locales = Object.keys(dateFields)
outputFileSync('src/dateFields.ts', `
${locales.map((l, i) => `import * as _${i} from '${dateFields[l]}'`).join('\n')}
export const dateFields = {
${locales.map((l, i) => `'${l}': _${i}`)}
}
`)
| 29.24 | 83 | 0.599179 |
c24097c9f67822b892d15b89606c79a260280c6f | 4,735 | sql | SQL | database/_1364.sql | gurungr2/Leetcode | 51c21e0937dcd2c78f1fd1c665503c7f7ebd0f7e | [
"Apache-2.0"
] | 2 | 2021-04-03T17:12:12.000Z | 2021-09-28T08:13:04.000Z | database/_1364.sql | gurungr2/Leetcode | 51c21e0937dcd2c78f1fd1c665503c7f7ebd0f7e | [
"Apache-2.0"
] | null | null | null | database/_1364.sql | gurungr2/Leetcode | 51c21e0937dcd2c78f1fd1c665503c7f7ebd0f7e | [
"Apache-2.0"
] | 5 | 2020-09-29T13:32:12.000Z | 2021-10-04T15:43:05.000Z | --1364. Number of Trusted Contacts of a Customer
--
--Table: Customers
--
--+---------------+---------+
--| Column Name | Type |
--+---------------+---------+
--| customer_id | int |
--| customer_name | varchar |
--| email | varchar |
--+---------------+---------+
--customer_id is the primary key for this table.
--Each row of this table contains the name and the email of a customer of an online shop.
--
--
--Table: Contacts
--
--+---------------+---------+
--| Column Name | Type |
--+---------------+---------+
--| user_id | id |
--| contact_name | varchar |
--| contact_email | varchar |
--+---------------+---------+
--(user_id, contact_email) is the primary key for this table.
--Each row of this table contains the name and email of one contact of customer with user_id.
--This table contains information about people each customer trust. The contact may or may not exist in the Customers table.
--
--
--
--Table: Invoices
--
--+--------------+---------+
--| Column Name | Type |
--+--------------+---------+
--| invoice_id | int |
--| price | int |
--| user_id | int |
--+--------------+---------+
--invoice_id is the primary key for this table.
--Each row of this table indicates that user_id has an invoice with invoice_id and a price.
--
--
--Write an SQL query to find the following for each invoice_id:
--
--customer_name: The name of the customer the invoice is related to.
--price: The price of the invoice.
--contacts_cnt: The number of contacts related to the customer.
--trusted_contacts_cnt: The number of contacts related to the customer and at the same time they are customers to the shop. (i.e His/Her email exists in the Customers table.)
--Order the result table by invoice_id.
--
--The query result format is in the following example:
--
--Customers table:
--+-------------+---------------+--------------------+
--| customer_id | customer_name | email |
--+-------------+---------------+--------------------+
--| 1 | Alice | [email protected] |
--| 2 | Bob | [email protected] |
--| 13 | John | [email protected] |
--| 6 | Alex | [email protected] |
--+-------------+---------------+--------------------+
--Contacts table:
--+-------------+--------------+--------------------+
--| user_id | contact_name | contact_email |
--+-------------+--------------+--------------------+
--| 1 | Bob | [email protected] |
--| 1 | John | [email protected] |
--| 1 | Jal | [email protected] |
--| 2 | Omar | [email protected] |
--| 2 | Meir | [email protected] |
--| 6 | Alice | [email protected] |
--+-------------+--------------+--------------------+
--Invoices table:
--+------------+-------+---------+
--| invoice_id | price | user_id |
--+------------+-------+---------+
--| 77 | 100 | 1 |
--| 88 | 200 | 1 |
--| 99 | 300 | 2 |
--| 66 | 400 | 2 |
--| 55 | 500 | 13 |
--| 44 | 60 | 6 |
--+------------+-------+---------+
--Result table:
--+------------+---------------+-------+--------------+----------------------+
--| invoice_id | customer_name | price | contacts_cnt | trusted_contacts_cnt |
--+------------+---------------+-------+--------------+----------------------+
--| 44 | Alex | 60 | 1 | 1 |
--| 55 | John | 500 | 0 | 0 |
--| 66 | Bob | 400 | 2 | 0 |
--| 77 | Alice | 100 | 3 | 2 |
--| 88 | Alice | 200 | 3 | 2 |
--| 99 | Bob | 300 | 2 | 0 |
--+------------+---------------+-------+--------------+----------------------+
--Alice has three contacts, two of them are trusted contacts (Bob and John).
--Bob has two contacts, none of them is a trusted contact.
--Alex has one contact and it is a trusted contact (Alice).
--John doesn't have any contacts.
--credit: https://leetcode.com/problems/number-of-trusted-contacts-of-a-customer/discuss/522435/mysql-simple-solution
select i.invoice_id,
c.customer_name,
i.price,
count(cont.contact_name) contacts_cnt,
sum(
if(cont.contact_name in (select distinct customer_name from customers), 1, 0)
) as trusted_contacts_cnt
from invoices i
join customers c on c.customer_id = i.user_id
left join Contacts cont on cont.user_id = c.customer_id
group by i.invoice_id
order by i.invoice_id;
| 40.818966 | 174 | 0.448574 |
05fd786f14b4c86e9c09a66e55ac3ca22198d262 | 16,584 | py | Python | deploytools/drivers/gae/gae.py | LowieHuyghe/deploy-tools | b84a471adaaf86d4743075d077b7e83e0b334abf | [
"Apache-2.0"
] | null | null | null | deploytools/drivers/gae/gae.py | LowieHuyghe/deploy-tools | b84a471adaaf86d4743075d077b7e83e0b334abf | [
"Apache-2.0"
] | null | null | null | deploytools/drivers/gae/gae.py | LowieHuyghe/deploy-tools | b84a471adaaf86d4743075d077b7e83e0b334abf | [
"Apache-2.0"
] | null | null | null |
from deploytools.drivers.basedriver import BaseDriver
import os
import shutil
import re
from datetime import datetime
class Gae(BaseDriver):
def __init__(self, base_path, arguments=None):
"""
Construct the script
:param base_path: The base path
:param arguments: The arguments
"""
title = 'GAE Deploy'
description = 'Deploy on Google App Engine'
super(Gae, self).__init__(base_path, title, description, arguments=arguments)
self._register_command('production', 'Deploy application for production', lambda *args, **kwargs: self.deploy(self.PRODUCTION, *args, **kwargs))
self._register_command('staging', 'Deploy application for staging', lambda *args, **kwargs: self.deploy(self.STAGING, *args, **kwargs))
self._register_command('development', 'Deploy application for development', lambda *args, **kwargs: self.deploy(self.DEVELOPMENT, *args, **kwargs))
def deploy(self, environment, arguments=None):
"""
Deploy
:param environment: The environment to deploy in
:param arguments: The arguments
:return: void
"""
try:
self._deploy(environment, arguments=arguments)
self.output('')
finally:
self._clean_up()
def _deploy(self, environment, arguments=None):
"""
Actually deploy
:param environment: The environment to deploy in
:param arguments: The arguments
:return: void
"""
# Prepare
if not self._load_config():
return False
caching = self.config('deploy.caching', True)
# Confirm deploy
warnings = []
if environment == self.PRODUCTION:
warnings.append('Do not push any changes to app.yaml whilst deploying the application!')
warnings.append('All database changes should be backwards compatible!')
# Ask
if not self._deploy_confirm(environment, warnings):
return False
self.output('')
# Config
name = self.config('deploy.name')
repo = self.config('deploy.repository')
branch = self.config('deploy.branch', 'master')
# Notify started building
self._notify_started(self.DEPLOY_STAGE_BUILDING, name, environment)
# Title
self.output.title('Preparing deploy')
self.output('')
# Temp directory
directory = self._get_temp_dir()
# self.output.info('Working dir: %s' % directory)
# Run before all commands
if not self._run_custom_commands(environment, directory, branch, 'before_all'):
self._notify_failed(name, environment, 'Failed while running before_all-commands')
return False
# Git clone
if not self._git_clone(environment, directory, repo, branch, caching=caching):
self._notify_failed(name, environment, 'Failed while cloning git')
return False
# Copy persistent files
if not self._copy_persistent_files(directory):
self._notify_failed(name, environment, 'Failed while copying persistent files')
return False
# Load app.yaml
app_yaml = self._get_app_yaml(directory)
if not app_yaml:
self._notify_failed(name, environment, 'Failed while loading app.yaml')
return False
# Update submodules
if not self._submodules_update(environment, directory):
self._notify_failed(name, environment, 'Failed while updating submodules')
return False
# Composer install
if not self._composer_install(environment, directory, caching=caching):
self._notify_failed(name, environment, 'Failed while running composer install')
return False
# Npm install
if not self._npm_install(environment, directory, caching=caching):
self._notify_failed(name, environment, 'Failed while running npm install')
return False
# Update app.yaml version
if not self._update_app_yaml_version(environment, directory, app_yaml, branch):
self._notify_failed(name, environment, 'Failed while updating app.yaml version')
return False
# Run before deploy commands
if not self._run_custom_commands(environment, directory, branch, 'before_deploy'):
self._notify_failed(name, environment, 'Failed while running before_deploy-commands')
return False
# Notify finished building, started deploying
self._notify_succeeded(name, environment)
self._notify_started(self.DEPLOY_STAGE_DEPLOYING, name, environment)
# Deploy application
if not self._deploy_to_gae(directory):
self._run_custom_commands(environment, directory, branch, 'after_failed')
self._notify_failed(name, environment, 'Failed while deploying application')
return False
# Push new version
if environment == self.PRODUCTION:
if not self._git_push(environment, directory):
self._notify_failed(name, environment, 'Failed while pushing new version')
return False
# Run after success
if not self._run_custom_commands(environment, directory, branch, 'after_success'):
self._notify_failed(name, environment, 'Failed while running after_success-commands')
return False
self.output.success('Successfully finished deploy sequence')
self._notify_succeeded(name, environment)
def _load_config(self):
"""
Load the config
:return: Dict
"""
deploy_yaml_path = 'deploy.yaml'
if not os.path.isfile(deploy_yaml_path):
self.output.error('No \'%s\' found' % deploy_yaml_path)
return False
# Load and validate
self.config.load_from_yaml('deploy.yaml')
if not self._validate_config():
return False
# Load slack integration
slack_integration = self.config('notifications.slack', None)
if slack_integration is not None:
if not self._set_slack_integration(slack_integration):
return False
return True
def _validate_config(self):
"""
Validate the config
:return: Success
"""
valid_config = True
if self.config('deploy.name') is None:
self.output.error('\'deploy > name\' is not set in deploy.yaml')
valid_config = False
if self.config('deploy.repository') is None:
self.output.error('\'deploy > repository\' is not set in deploy.yaml')
valid_config = False
return valid_config
def _copy_persistent_files(self, directory):
"""
Copy persistent files
:param directory: The working directory
:return: Success
"""
persistent_files = self.config('deploy.persistent', {})
if not persistent_files:
self.output.info('Skipped copying persistent files')
return True
def copy_persistent_files(persistent_files, directory):
for persistent_file in persistent_files:
shutil.copyfile(persistent_file, os.path.join(directory, persistent_files[persistent_file]))
out, err, exitcode = self.execute.spinner(copy_persistent_files, 'Copying persistent files', (persistent_files, directory))
if exitcode != 0:
self.output.error('Failed copying persistent files\n%s' % '\n'.join(err))
return False
self.output.success('Successfully copied persistent files')
return True
def _get_app_yaml(self, directory):
"""
Get app.yaml
:param directory: The working directory
:return: Dict
"""
app_yaml = self._yaml_load(directory, 'app.yaml')
if not app_yaml:
return False
if 'application' not in app_yaml or not app_yaml['application']:
self.output.error('Google App Engine application was not set in app.yaml')
return False
if 'version' not in app_yaml or not app_yaml['version']:
self.output.error('Google App Engine version was not set in app.yaml')
return False
return app_yaml
def _update_app_yaml_version(self, environment, directory, app_yaml, branch):
"""
Update the app yaml version
param environment: The environment
param directory: The working directory
param app_yaml: The current app yaml
param branch: The branch
:return: Success
"""
# Version increase
version = list()
match = re.match('^(\d*)\D*(\d*)\D*(\d*)$', app_yaml['version'])
version.append(int(match.group(1)) if match.group(1) else 0)
version.append(int(match.group(2)) if match.group(2) else 0)
version.append(int(match.group(3)) + 1 if match.group(3) else 0)
if version[0] + version[1] + version[2] == 0:
version[2] += 1
version_string_underscore = '%i-%i-%i' % tuple(version)
version_string_dot = '%i.%i.%i' % tuple(version)
if environment == self.PRODUCTION:
# Increase app yaml version
command = 'sed -i.bak -e "s/^version[ \\t]*:[ \\t]*[0-9]*[^0-9\\n]*[0-9]*[^0-9\\n]*[0-9]*$/version: %s/" "%s/app.yaml"' % (version_string_underscore, directory)
command += ' && rm -f %s/app.yaml.bak' % directory
description = 'Increase version of app.yaml'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed to increase version of app.yaml\n%s' % '\n'.join(err))
return False
# Add file to git
command = 'git --git-dir "%s/.git" --work-tree "%s" add app.yaml' % (directory, directory)
description = 'Adding the increased app.yaml to git'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed adding the increased app.yaml to git\n%s' % '\n'.join(err))
return False
# Commit
datetime_string = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
user = self._get_current_user()
commit_title = 'Release of %s on %s UTC by %s' % (branch, datetime_string, user.name)
commit_description = 'Released on Google App Engine application %s as version %s' % (app_yaml['application'], version_string_underscore)
command = 'git --git-dir "%s/.git" --work-tree "%s" commit -m "%s" -m "%s"' % (directory, directory, commit_title, commit_description)
description = 'Committing the increased app.yaml to git'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed committing the increased app.yaml to git\n%s' % '\n'.join(err))
return False
# Last hash
command = 'git --git-dir "%s/.git" --work-tree "%s" rev-parse HEAD' % (directory, directory)
description = 'Fetching the hash of the last commit'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed fetching the hash of the last commit\n%s' % '\n'.join(err))
return False
commit_hash = out[0]
# Tag
command = 'git --git-dir "%s/.git" --work-tree "%s" tag -a v%s -m "Version %s (%s)" %s' % (directory, directory, version_string_dot, version_string_dot, commit_title, commit_hash)
description = 'Tagging the last commit as a new release'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed tagging the last commit as a new release\n%s' % '\n'.join(err))
return False
else:
# Set application name
app_yaml['application'] = '%s-%s' % (app_yaml['application'], environment)
# Set version
app_yaml['version'] = version_string_underscore
# Set environment to staging
if 'env_variables' not in app_yaml:
app_yaml['env_variables'] = dict()
app_yaml['env_variables']['APP_ENV'] = environment
# All handlers should be secured with login
if 'handlers' in app_yaml:
for handler in app_yaml['handlers']:
handler['login'] = 'admin'
# Dump the app.yaml
if not self._yaml_dump(directory, 'app.yaml', app_yaml):
return False
# Also apply the environment to the .env files
out, err, exitcode = self.execute('ls "%s/.env*"' % directory)
if exitcode == 0:
command = 'sed -i.bak -e "s/^APP_ENV[ \\t]*=[ \\t]*.*$/APP_ENV=%s/" "%s/.env*"' % (environment, directory)
command += ' && rm -f "%s/.env*.bak"' % directory
description = 'Updating .env-files'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed updating .env-files\n%s' % '\n'.join(err))
return False
self.output.success('Successfully increase version of %s' % app_yaml['application'])
return True
def _run_custom_commands(self, environment, directory, branch, key):
"""
Run the custom commands
:param environment: The environment
:param directory: The working directory
:param branch: The branch
:param key: Key to fetch config from
:return: Success
"""
commands = self.config(key, [])
if not commands:
self.output.info('Skipped %s' % key)
return True
self.output.info('Running %s' % key)
for command in commands:
command = command.replace('{{environment}}', environment)
command = command.replace('{{directory}}', directory)
command = command.replace('{{branch}}', branch)
description = ' Running \'%s\'' % command
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error(' Failed running \'%s\'\n%s' % (command, '.'.join(err)))
return False
else:
self.output.success(' Successfully ran \'%s\'' % command)
return True
def _deploy_to_gae(self, directory):
"""
Deploy to Google App Engine
:param directory: The working directory
:return: Success
"""
command = 'appcfg.py update "%s/."' % directory
description = 'Deploying the app'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed deploying the app\n%s' % '\n'.join(err))
return False
self.output.success('Successfully deployed the app')
return True
def _git_push(self, environment, directory):
"""
Push the changes in git
:param environment: The environment
:param directory: The working directory
:return: Success
"""
command = 'git --git-dir "%s/.git" --work-tree "%s" pull --rebase' % (directory, directory)
description = 'Pulling git repository before pushing'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed pulling git repository before pushing\n%s' % '\n'.join(err))
return False
command = 'git --git-dir "%s/.git" --work-tree "%s" push --follow-tags' % (directory, directory)
description = 'Pushing new version to repository'
out, err, exitcode = self.execute.spinner(command, description)
if exitcode != 0:
self.output.error('Failed pushing new version to repository\n%s' % '\n'.join(err))
return False
self.output.success('Successfully pushed new version to repository')
return True
| 40.154964 | 191 | 0.597745 |
5718ae88770927ad7aa41099d6a96c3079635572 | 624 | swift | Swift | FlatlandView/Utilities/KMDataPoint.swift | sjrankin/FlatlandView | e49731c36c7640dffa97b901db12675b789b7344 | [
"FSFAP"
] | null | null | null | FlatlandView/Utilities/KMDataPoint.swift | sjrankin/FlatlandView | e49731c36c7640dffa97b901db12675b789b7344 | [
"FSFAP"
] | 1 | 2020-08-24T04:22:48.000Z | 2020-08-24T04:23:41.000Z | FlatlandView/Utilities/KMDataPoint.swift | sjrankin/FlatlandView | e49731c36c7640dffa97b901db12675b789b7344 | [
"FSFAP"
] | null | null | null | //
// KMDataPoint.swift
// Flatland
//
// Created by Stuart Rankin on 7/5/20.
// Copyright © 2020 Stuart Rankin. All rights reserved.
//
import Foundation
/// K-Means clustering protocol. Algorithm adapted from _Classic Computer Science Problems in Swift_.
protocol KMDataPoint: CustomStringConvertible, Equatable
{
static var NumDimensions: UInt { get }
var Dimensions: [Double] { get set}
init(Values: [Double])
}
extension KMDataPoint
{
public func Distance<Point: KMDataPoint>(To: Point) -> Double
{
return sqrt(zip(Dimensions, To.Dimensions).map({pow(($0.1 - $0.0), 2)}).Sum)
}
}
| 24 | 101 | 0.6875 |
05e195d1cd62d5ea450782ae3389d7f3117f612c | 4,138 | rb | Ruby | spec/models/language_spec.rb | zirni/alchemy_cms | b7b56177b9108e62274c88867f27c3e642a8abfb | [
"BSD-3-Clause"
] | null | null | null | spec/models/language_spec.rb | zirni/alchemy_cms | b7b56177b9108e62274c88867f27c3e642a8abfb | [
"BSD-3-Clause"
] | null | null | null | spec/models/language_spec.rb | zirni/alchemy_cms | b7b56177b9108e62274c88867f27c3e642a8abfb | [
"BSD-3-Clause"
] | null | null | null | # encoding: UTF-8
require 'spec_helper'
module Alchemy
describe Language do
let(:default_language) { Alchemy::Language.default }
let(:language) { FactoryGirl.create(:klingonian) }
let(:page) { FactoryGirl.create(:page, language: language) }
it "should return a label for code" do
language.label(:code).should == 'kl'
end
it "should return a label for name" do
language.label(:name).should == 'Klingonian'
end
context "with language_code and empty country_code" do
it "#code should return language locale only" do
language.country_code = ''
language.code.should == 'kl'
end
context "adding a value for country code" do
it "#code should return a joined locale" do
language.country_code = 'cr'
language.code.should == 'kl-cr'
end
it "should update all associated Pages with self.code as value for Page#language_code" do
page = FactoryGirl.create(:page, language: language)
language.country_code = 'cr'
language.save
page.reload; page.language_code.should == 'kl-cr'
end
end
end
context "with country_code and_language_code" do
context "removing the country_code" do
it "should update all associated Pages´s language_code with Language#code" do
language = FactoryGirl.create(:language, country_code: 'kl')
language.country_code = ''
language.save
page.reload; page.language_code.should == "kl"
end
end
end
it "should not be deletable if it is the default language" do
expect { default_language.destroy }.to raise_error
end
describe "before save" do
describe "#remove_old_default if default attribute has changed to true" do
it "should unset the default status of the old default language" do
default_language
language.update_attributes(default: true)
default_language.reload
default_language.default.should be_false
end
end
end
context "after_update" do
describe "#set_pages_language if language´s code has changed" do
it "should update all its pages with the new code" do
@other_page = FactoryGirl.create(:page, language: language)
language.update_attributes(code: "fo")
language.reload; page.reload; @other_page.reload
[page.language_code, @other_page.language_code].should == [language.code, language.code]
end
end
describe "#unpublish_pages" do
it "should set all pages to unpublic if it gets set to unpublic" do
page = FactoryGirl.create(:page, language: language)
@other_page = FactoryGirl.create(:page, language: language)
language.update_attributes(public: false)
language.reload; page.reload; @other_page.reload
[page.public?, @other_page.public?].should == [false, false]
end
end
end
describe '.find_by_code' do
context "with only the language code given" do
it "should find the language" do
Language.find_by_code(language.code).should == language
end
end
end
context 'validations' do
let(:language) { Language.new(default: true, public: false) }
describe 'publicity_of_default_language' do
context 'if language is not published' do
it "should add an error to the object" do
expect(language.valid?).to eq(false)
expect(language.errors.messages).to have_key(:public)
end
end
end
describe 'presence_of_default_language' do
context 'if no default language would exist anymore' do
before do
Language.stub(:default).and_return(language)
language.stub(:default_changed?).and_return(true)
end
it "should add an error to the object" do
expect(language.valid?).to eq(false)
expect(language.errors.messages).to have_key(:default)
end
end
end
end
end
end
| 33.918033 | 98 | 0.636539 |
8bd59a317ca8493d61fc81ff93b651dfcc7a743a | 2,113 | dart | Dart | test/features/todo/data/repositories/todo_reposirory_impl_test.dart | hit0907/clean_architecture_tdd_todo_flutter | 450842633739c2dd354dbc07b9379a5ed202e423 | [
"MIT"
] | null | null | null | test/features/todo/data/repositories/todo_reposirory_impl_test.dart | hit0907/clean_architecture_tdd_todo_flutter | 450842633739c2dd354dbc07b9379a5ed202e423 | [
"MIT"
] | null | null | null | test/features/todo/data/repositories/todo_reposirory_impl_test.dart | hit0907/clean_architecture_tdd_todo_flutter | 450842633739c2dd354dbc07b9379a5ed202e423 | [
"MIT"
] | null | null | null | import 'package:flutter_test/flutter_test.dart';
import 'package:clean_architecture_tdd_todo_flutter/features/todo/data/datasources/todo_data_source.dart';
import 'package:clean_architecture_tdd_todo_flutter/features/todo/data/models/todo_model.dart';
import 'package:clean_architecture_tdd_todo_flutter/features/todo/data/repositories/todo_repository_impl.dart';
import 'package:mockito/mockito.dart';
class MockTodoDataSource extends Mock implements TodoDataSource {}
void main() {
TodoRepositoryImpl todoRepositoryImpl;
MockTodoDataSource mockTodoDataSource;
setUp(() {
mockTodoDataSource = MockTodoDataSource();
todoRepositoryImpl = TodoRepositoryImpl(dataSource: mockTodoDataSource);
});
final tCompletedTodo = TodoModel(text: 'Todo completed', completed: true);
final tInCompletedTodo =
TodoModel(text: 'Todo incompleted', completed: false);
final tTodoList = [
tCompletedTodo,
tInCompletedTodo,
];
test('should return todo list when the call to data source', () async {
// arrange
when(mockTodoDataSource.fetch()).thenAnswer((_) async => tTodoList);
// act
final result = await todoRepositoryImpl.fetch();
// assert
verify(mockTodoDataSource.fetch());
expect(result, tTodoList);
});
test('should return todo completed after call to data source', () async {
// arrange
when(mockTodoDataSource.markCompleteTodo(tInCompletedTodo))
.thenAnswer((_) async => tCompletedTodo);
// act
final result = await todoRepositoryImpl.markCompleteTodo(tInCompletedTodo);
// assert
verify(mockTodoDataSource.markCompleteTodo(tInCompletedTodo));
expect(result, tCompletedTodo);
});
test('should return todo incompleted after call to data source', () async {
// arrange
when(mockTodoDataSource.markInCompleteTodo(tCompletedTodo))
.thenAnswer((_) async => tInCompletedTodo);
// act
final result = await todoRepositoryImpl.markInCompleteTodo(tCompletedTodo);
// assert
verify(mockTodoDataSource.markInCompleteTodo(tCompletedTodo));
expect(result, tInCompletedTodo);
});
}
| 36.431034 | 111 | 0.747752 |
f60b2bff941743aab59e7234d6a06828b5cdebf4 | 2,096 | cpp | C++ | Algorithms/0140.Word_Break_II.cpp | metehkaya/LeetCode | 52f4a1497758c6f996d515ced151e8783ae4d4d2 | [
"MIT"
] | 2 | 2020-07-20T06:40:22.000Z | 2021-11-20T01:23:26.000Z | Problems/LeetCode/Problems/0140.Word_Break_II.cpp | metehkaya/Algo-Archive | 03b5fdcf06f84a03125c57762c36a4e03ca6e756 | [
"MIT"
] | null | null | null | Problems/LeetCode/Problems/0140.Word_Break_II.cpp | metehkaya/Algo-Archive | 03b5fdcf06f84a03125c57762c36a4e03ca6e756 | [
"MIT"
] | null | null | null | typedef vector<int> vi;
typedef vector<string> vs;
class Node {
public:
bool isWord;
vector<Node*> child;
Node() {
isWord = false;
child.resize(26,NULL);
}
}*root;
class Solution {
public:
void solve(int i , int n , string& s , vi& last , string& word , vs& ans) {
if(i == n) {
ans.push_back(word);
return;
}
Node* node = root;
for( int j = i ; j <= last[i] ; j++ ) {
int c = s[j]-'a';
node = node->child[c];
word.push_back(s[j]);
if(node->isWord) {
if(j == n-1)
solve(j+1,n,s,last,word,ans);
else if(last[j+1] != -1) {
word.push_back(' ');
solve(j+1,n,s,last,word,ans);
word.pop_back();
}
}
}
for( int j = i ; j <= last[i] ; j++ )
word.pop_back();
}
vs wordBreak(string s, vs& words) {
root = new Node();
int n = words.size();
for( int i = 0 ; i < n ; i++ ) {
Node* node = root;
int len = words[i].length();
for( int j = 0 ; j < len ; j++ ) {
int c = words[i][j] - 'a';
if(node->child[c] == NULL)
node->child[c] = new Node();
node = node->child[c];
}
node->isWord = true;
}
n = s.length();
vi last(n+1,-1);
for( int i = n-1 ; i >= 0 ; i-- ) {
Node* node = root;
for( int j = i ; j < n ; j++ ) {
int c = s[j]-'a';
if(node->child[c]) {
node = node->child[c];
if(node->isWord)
if(j == n-1 or last[j+1] != -1)
last[i] = j;
}
else
break;
}
}
vs ans;
string word = "";
if(last[0] != -1)
solve(0,n,s,last,word,ans);
return ans;
}
}; | 27.946667 | 79 | 0.354485 |
c65e7dc05596c08e9c11daf4428fa796f34a95e8 | 1,514 | py | Python | Stream-2/Back-End-Development/8.Conways-Game-Of-Life/3.Creating-&-Drawing-Cells/game_of_life.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 4 | 2017-10-10T14:00:40.000Z | 2021-01-27T14:08:26.000Z | Stream-2/Back-End-Development/8.Conways-Game-Of-Life/3.Creating-&-Drawing-Cells/game_of_life.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 115 | 2019-10-24T11:18:33.000Z | 2022-03-11T23:15:42.000Z | Stream-2/Back-End-Development/8.Conways-Game-Of-Life/3.Creating-&-Drawing-Cells/game_of_life.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 5 | 2017-09-22T21:42:39.000Z | 2020-02-07T02:18:11.000Z | # import the system and pygame files needed
import random
import sys
import pygame
# import our newly created colours file
from colours import dark_blue, green, black
# define our grid method
def draw_grid():
for x in range(0, width, cell_size):
pygame.draw.line(screen, dark_blue, (x, 0), (x, height))
for y in range(0, height, cell_size):
pygame.draw.line(screen, dark_blue, (0, y), (width, y))
# create a method that returns a dictionary to store & initialise our cells
# NOTE: each cell can have 2 possible states:
# Alive OR Dead
def get_cells(density = 0.2):
return {(c, r): random.random() < density for c in range(columns) for r in range(rows)}
# define our method to draw the cells on our grid
def draw_cells():
for(x, y) in cells:
colour = green if cells[x, y] else black
rectangle = (x * cell_size, y * cell_size, cell_size, cell_size)
pygame.draw.rect(screen, colour, rectangle)
# call the initialise method
pygame.init()
# define our grid properties
columns, rows = 50, 50
cell_size = 10
size = width, height = columns * cell_size, rows * cell_size
screen = pygame.display.set_mode(size)
cells = get_cells()
# call on our loop to repeat until the exit condition is True
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
# call our draw cells & draw grid methods every frame
draw_cells()
draw_grid()
# update/refresh the game window
pygame.display.update()
| 29.686275 | 91 | 0.686922 |
0d83f0382768a84c1c67d2d0461f322cf1599b98 | 3,173 | c | C | talker/src/gpiotalker.c | sdkie3802dhsdkh3ioiuz/gpio_thermostat | 59fbb6d55f503c8523491b7dd37630998db27024 | [
"0BSD"
] | 2 | 2021-04-23T20:56:08.000Z | 2021-05-23T17:59:45.000Z | talker/src/gpiotalker.c | gagsports/gpio_thermostat | 84e066eb279ae0b3c262da3702dc403e9387b7f2 | [
"BSD-3-Clause"
] | null | null | null | talker/src/gpiotalker.c | gagsports/gpio_thermostat | 84e066eb279ae0b3c262da3702dc403e9387b7f2 | [
"BSD-3-Clause"
] | 2 | 2021-04-15T07:03:21.000Z | 2021-04-15T13:32:34.000Z | /* modified version of Brian "Beej Jorgensen" Hall's talker.c
** gpiotalker.c
** Compile the code below as a regular user by doing clang -o
** gpiotalker gpiotalker.c. Then copy gpiotalker to /usr/local/bin
** and /sbin/chown root._gpiotalker /usr/local/bin/gpiotalker ;
** /bin/chmod 755 /usr/local/bin/gpiotalker.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/gpio.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#define SERVERPORT "4950" // the port users will be connecting to
#define SERVER "listener.my.domain" // the computer we're sending to
#define THERM_PIN 21
#define MAX_TEMP 74
int main()
{
int sockfd;
struct addrinfo hints, *servinfo, *p;
int rv;
int numbytes;
/* BEGIN an added section */
int sum;
int devfd = open("/dev/gpio0", O_RDWR);
int pins[] = {16, 12, 7, 8, 25, 24, 23};
int i;
struct gpio_pin_op op;
daemon(1,1);
/* END an added section */
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_INET; // set to AF_INET to use IPv4
hints.ai_socktype = SOCK_DGRAM;
if ((rv = getaddrinfo(SERVER, SERVERPORT, &hints, &servinfo)) != 0) {
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
return 1;
}
// loop through all the results and make a socket
for(p = servinfo; p != NULL; p = p->ai_next) {
if ((sockfd = socket(p->ai_family, p->ai_socktype,
p->ai_protocol)) == -1) {
perror("talker: socket");
continue;
}
break;
}
if (p == NULL) {
fprintf(stderr, "talker: failed to create socket\n");
return 2;
}
/* BEGIN an added section */
while (1) {
sum = 0;
for (i = 0; i < 7; i++) {
memset(&op, 0, sizeof(op));
op.gp_pin = pins[i];
ioctl(devfd, GPIOPINREAD, &op);
sum += (1 << i) * op.gp_value;
}
/* END an added section */
if ((numbytes = sendto(sockfd, &sum, sizeof sum, 0,
p->ai_addr, p->ai_addrlen)) == -1) {
perror("talker: sendto");
exit(1);
}
/* BEGIN an added section */
memset(&op, 0, sizeof(op));
op.gp_pin = THERM_PIN;
if (sum >= MAX_TEMP) {
op.gp_value = GPIO_PIN_HIGH;
} else {
op.gp_value = GPIO_PIN_LOW;
}
if (ioctl(devfd, GPIOPINWRITE, &op))
fprintf(stderr, "pin write error\n");
/* END added section */
sleep(10);
}
freeaddrinfo(servinfo);
close(sockfd);
return 0;
}
| 34.11828 | 77 | 0.488182 |
07439ed5062a850ea6e07770be9c08d08a871937 | 884 | sql | SQL | EmployeeSQL/table_schemata.sql | rbvancleave/sql-challenge | 97af5f7be151fd013e9cf1efa8882b014c66f4c5 | [
"ADSL"
] | null | null | null | EmployeeSQL/table_schemata.sql | rbvancleave/sql-challenge | 97af5f7be151fd013e9cf1efa8882b014c66f4c5 | [
"ADSL"
] | null | null | null | EmployeeSQL/table_schemata.sql | rbvancleave/sql-challenge | 97af5f7be151fd013e9cf1efa8882b014c66f4c5 | [
"ADSL"
] | null | null | null | CREATE TABLE titles (
title_id VARCHAR, title VARCHAR,
PRIMARY KEY (title_id)
);
CREATE TABLE employees (
emp_no INT NOT NULL, emp_title_id VARCHAR, birth_date DATE, first_name VARCHAR,
last_name VARCHAR, sex VARCHAR, hire_date DATE, PRIMARY KEY (emp_no),
FOREIGN KEY (emp_title_id) REFERENCES titles(title_id)
);
CREATE TABLE salaries (
emp_no INT, salary INT,
FOREIGN KEY (emp_no) REFERENCES employees(emp_no)
);
CREATE TABLE departments (
dept_no VARCHAR NOT NULL, dept_name VARCHAR,
PRIMARY KEY (dept_no)
);
CREATE TABLE dept_manager (
dept_no VARCHAR, emp_no INT,
FOREIGN KEY (dept_no) REFERENCES departments(dept_no),
FOREIGN KEY (emp_no) REFERENCES employees(emp_no)
);
CREATE TABLE dept_emp (
emp_no INT, dept_no VARCHAR,
FOREIGN KEY (emp_no) REFERENCES employees(emp_no),
FOREIGN KEY (dept_no) REFERENCES departments(dept_no)
);
SELECT * FROM dept_emp | 24.555556 | 80 | 0.770362 |
bd817b62e5ec9cedd6a359878187ee9b466718e0 | 1,038 | swift | Swift | GameOn/UI/Screen/NewReleaseView.swift | mrandika/ios-gameon | 39610982c6bd975bbfcc13ebd4115c68f317cb89 | [
"MIT"
] | null | null | null | GameOn/UI/Screen/NewReleaseView.swift | mrandika/ios-gameon | 39610982c6bd975bbfcc13ebd4115c68f317cb89 | [
"MIT"
] | null | null | null | GameOn/UI/Screen/NewReleaseView.swift | mrandika/ios-gameon | 39610982c6bd975bbfcc13ebd4115c68f317cb89 | [
"MIT"
] | null | null | null | //
// NewReleaseView.swift
// GameOn
//
// Created by Andika on 05/08/21.
//
import SwiftUI
import SwiftUIX
struct NewReleaseView: View {
@ObservedObject var newReleaseGameViewModel: NewReleaseGameViewModel
var body: some View {
NavigationView {
ContentContainer(isLoading: $newReleaseGameViewModel.isLoading,
isError: $newReleaseGameViewModel.isError,
error: $newReleaseGameViewModel.error) {
ForEach(newReleaseGameViewModel.games, id: \.gameId) { game in
CompleteGameItem(game: game)
Divider()
.padding(.vertical)
}
}
.navigationBarTitle(LocalizedStringKey("NEW_RELEASE"))
.navigationViewStyle(StackNavigationViewStyle())
}
}
}
struct NewReleaseView_Previews: PreviewProvider {
static var previews: some View {
NewReleaseView(newReleaseGameViewModel: NewReleaseGameViewModel())
}
}
| 28.054054 | 78 | 0.608863 |
c95e0bb5ddabc8a29737ed73d653d02c50d94741 | 1,754 | ts | TypeScript | src/common/logging.schema.ts | Swanee84/got_calculator | 93c75cc4e4b39cd362d1ab22e5ba5127944077ee | [
"MIT"
] | null | null | null | src/common/logging.schema.ts | Swanee84/got_calculator | 93c75cc4e4b39cd362d1ab22e5ba5127944077ee | [
"MIT"
] | null | null | null | src/common/logging.schema.ts | Swanee84/got_calculator | 93c75cc4e4b39cd362d1ab22e5ba5127944077ee | [
"MIT"
] | null | null | null | // import { Schema } from '@nestjs/mongoose'
import { Document, Schema, model } from 'mongoose';
export const LoggingSchema = new Schema({
method: { type: String, required: false },
url: { type: String, required: false },
params: { type: Object, required: false },
body: { type: Object, required: false },
query: { type: Object, required: false },
processTime: { type: Number, required: false },
status: { type: Number, required: false },
success: { type: Boolean, required: false },
message: { type: String, required: false },
stack: { type: String, required: false },
signedUser: { type: Object, required: false },
});
export interface Logging extends Document {
method?: string;
url?: string;
params?: any;
body?: any;
query?: any;
processTime?: number;
status?: number;
success?: boolean;
message?: string;
stack?: string;
signedUser?: any;
}
export const LoggingModel = model<Logging>('logging', LoggingSchema);
export const SignInLogSchema = new Schema({
userId: { type: Number, required: false },
email: { type: String, required: false },
lastSignAt: { type: Date, required: true, default: Date.now },
});
export interface SignInLog extends Document {
userId?: number;
email?: string;
lastSignAt?: Date;
}
export const SignInLogModel = model<SignInLog>('sign_in_log', SignInLogSchema);
export const SignFailLogSchema = new Schema({
userId: { type: Number, required: false },
email: { type: String, required: false },
signDate: { type: Date, required: true, default: Date.now },
});
export interface SignFailLog extends Document {
userId?: number;
email?: string;
signDate?: Date;
}
export const SignFailLogModel = model<SignFailLog>('sign_fail_log', SignFailLogSchema);
| 28.754098 | 87 | 0.685861 |
96cfe04f3df897eada9a932d1400fa62acadc8d7 | 4,455 | kt | Kotlin | test/base/src/jvmTest/kotlin/io/realm/test/compiler/PrimaryKeyTests.kt | Reedyuk/realm-kotlin | 922029489c82ba16844263673af7296469c8b234 | [
"DOC"
] | 2 | 2021-12-20T05:32:37.000Z | 2021-12-20T05:32:44.000Z | test/base/src/jvmTest/kotlin/io/realm/test/compiler/PrimaryKeyTests.kt | Reedyuk/realm-kotlin | 922029489c82ba16844263673af7296469c8b234 | [
"DOC"
] | null | null | null | test/base/src/jvmTest/kotlin/io/realm/test/compiler/PrimaryKeyTests.kt | Reedyuk/realm-kotlin | 922029489c82ba16844263673af7296469c8b234 | [
"DOC"
] | null | null | null | /*
* Copyright 2021 Realm Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.realm.test.compiler
import com.tschuchort.compiletesting.KotlinCompilation
import com.tschuchort.compiletesting.SourceFile
import io.realm.RealmInstant
import io.realm.internal.interop.CollectionType
import io.realm.test.util.Compiler.compileFromSource
import io.realm.test.util.TypeDescriptor.allFieldTypes
import org.junit.Test
import kotlin.reflect.KClassifier
import kotlin.test.assertEquals
import kotlin.test.assertTrue
// Cannot trigger these from within the IDE due to https://youtrack.jetbrains.com/issue/KT-46195
// Execute the tests from the CLI with `./gradlew jvmTest`
class PrimaryKeyTests {
@Test
fun `primary key supportness`() {
// TODO Consider placing these in PropertyDescriptor.kt for reuse
val defaults = mapOf<KClassifier, Any>(
Boolean::class to true,
Byte::class to "1",
Char::class to "\'c\'",
Short::class to "1",
Int::class to "1",
Long::class to "1",
Float::class to "1.4f",
Double::class to "1.4",
String::class to "\"Realm\"",
RealmInstant::class to "RealmInstant.fromEpochSeconds(42, 420)"
)
for (type in allFieldTypes) {
// TODO Consider adding verification of compiler errors when marking collection
// types as primary keys
if (type.collectionType != CollectionType.RLM_COLLECTION_TYPE_NONE) {
continue
}
val elementType = type.elementType
val default = if (!elementType.nullable) defaults[elementType.classifier] ?: error("unmapped default") else null
val kotlinLiteral = type.toKotlinLiteral()
val result = compileFromSource(
plugins = listOf(io.realm.compiler.Registrar()),
source = SourceFile.kotlin(
"primaryKey.kt",
"""
import io.realm.RealmInstant
import io.realm.RealmObject
import io.realm.RealmConfiguration
import io.realm.annotations.PrimaryKey
class A : RealmObject {
@PrimaryKey
var primaryKey: $kotlinLiteral = $default
}
val configuration =
RealmConfiguration.with(schema = setOf(A::class))
""".trimIndent()
)
)
if (type.isPrimaryKeySupported) {
assertEquals(KotlinCompilation.ExitCode.OK, result.exitCode, type.toString())
} else {
assertEquals(KotlinCompilation.ExitCode.COMPILATION_ERROR, result.exitCode, type.toString())
assertTrue(result.messages.contains("but must be of type"))
}
}
}
@Test
fun `multiple primary keys fails`() {
val result = compileFromSource(
source = SourceFile.kotlin(
"duplicatePrimaryKey.kt",
"""
import io.realm.RealmObject
import io.realm.RealmConfiguration
import io.realm.annotations.PrimaryKey
class A : RealmObject {
@PrimaryKey
var primaryKey1: String? = null
@PrimaryKey
var primaryKey2: String? = null
}
val configuration =
RealmConfiguration.with(schema = setOf(A::class))
""".trimIndent()
)
)
assertEquals(KotlinCompilation.ExitCode.COMPILATION_ERROR, result.exitCode)
assertTrue(result.messages.contains("RealmObject can only have one primary key"))
}
}
| 38.73913 | 124 | 0.584961 |
e2762a4f1be918db3a2835ab9f8a0611f2920374 | 713 | py | Python | apps/core/logic/url.py | techlib/celus | f32a7a22be5f4613dcac10b8e02c5c5a9bc297cb | [
"MIT"
] | 7 | 2020-02-20T13:24:40.000Z | 2022-01-28T19:36:04.000Z | apps/core/logic/url.py | techlib/celus | f32a7a22be5f4613dcac10b8e02c5c5a9bc297cb | [
"MIT"
] | 15 | 2020-04-28T13:09:02.000Z | 2021-11-03T15:21:24.000Z | apps/core/logic/url.py | techlib/celus | f32a7a22be5f4613dcac10b8e02c5c5a9bc297cb | [
"MIT"
] | 4 | 2020-02-20T13:48:30.000Z | 2021-03-19T00:33:34.000Z | def extract_organization_id_from_request_query(request):
return request.query_params.get('organization') or request.query_params.get('organization_id')
def extract_organization_id_from_request_data(request) -> (int, bool):
"""
Returns the organization id from the request.data and a bool indicating if the key
was present in the data (to distinguish between missing data and empty input value)
:param request:
:return:
"""
for source in (request.data, request.GET):
if 'organization' in source:
return source.get('organization'), True
if 'organization_id' in request.data:
return source.get('organization_id'), True
return None, False
| 39.611111 | 98 | 0.71108 |
53a18adbddb60e901f5052279bdc354c752a6454 | 1,516 | lua | Lua | src/InitializeLevel.lua | ArneSchwettmann/ArnesSpaceTaxi | 6a2791e04302b3d4755c28bc323d57714a885186 | [
"Apache-2.0"
] | 6 | 2017-05-15T18:59:42.000Z | 2021-02-14T17:50:43.000Z | src/InitializeLevel.lua | ArneSchwettmann/ArnesSpaceTaxi | 6a2791e04302b3d4755c28bc323d57714a885186 | [
"Apache-2.0"
] | 1 | 2020-02-05T06:50:51.000Z | 2021-11-24T16:05:13.000Z | src/InitializeLevel.lua | ArneSchwettmann/ArnesSpaceTaxi | 6a2791e04302b3d4755c28bc323d57714a885186 | [
"Apache-2.0"
] | 1 | 2020-02-05T06:31:13.000Z | 2020-02-05T06:31:13.000Z | -- Object order: forceField,player,passenger
function initializeLevel(levelNr)
background={}
backgroundMask={}
passengerRespawnPoints={}
playerRespawnPoints={}
loadBackgroundImages(levelNr)
timeSinceLastPassenger=50
if levelNr==1 then
objects={}
playerReferences={}
respawningPlayers={}
playersEscaped={}
for i=1,numPlayers do
local player=createPlayer(centerX,centerY,i)
table.insert(respawningPlayers,1,player)
table.insert(objects,player.thruster1)
table.insert(objects,player.thruster2)
end
else
for i=#objects,1,-1 do
if objects[i].type=="player" then
table.insert(playersEscaped,1,objects[i])
table.remove(objects,i)
end
end
objects={}
for i=#playersEscaped,1,-1 do
table.insert(respawningPlayers,1,playersEscaped[i])
table.insert(objects,playersEscaped[i].thruster1)
table.insert(objects,playersEscaped[i].thruster2)
table.remove(playersEscaped,i)
end
end
--[[
for i,player in ipairs(respawningPlayers) do
if levelNr==2 then
player.gravityY=0
player.gravityX=0
else
player.gravityY=20
player.gravityX=0
end
end
--]]
passengersLeft=5+numPlayers
--passengersLeft=1
numPassengers=0
respawnPlayers()
updatePlayerReferences()
end
--[[
resurrectingObjects={}
--]] | 27.563636 | 61 | 0.616095 |
79c236b9b265d146f21eeaf3b2fdc617d9ee8d91 | 502 | php | PHP | app/Helpers/general.php | Vermouth5214/stok | f18e87a977cb98fe5a3ce346fde08c1686c3d88c | [
"MIT"
] | null | null | null | app/Helpers/general.php | Vermouth5214/stok | f18e87a977cb98fe5a3ce346fde08c1686c3d88c | [
"MIT"
] | null | null | null | app/Helpers/general.php | Vermouth5214/stok | f18e87a977cb98fe5a3ce346fde08c1686c3d88c | [
"MIT"
] | null | null | null | <?php
use Illuminate\Support\Facades\Cache;
use App\Model\User;
use App\Model\AccessControl;
function getUserAccess($id){
$access_control = AccessControl::with('module')->where('user_level_id', $id)->get();
$role = [];
foreach ($access_control as $data):
$role[$data->user_level_id][$data->module->slug] = $data->content;
endforeach;
return $role;
}
function getMediaCount($id){
$total = 0;
$count_user = User::where('avatar_id',$id)->count();
$total = $count_user;
return $total;
}
| 20.916667 | 85 | 0.685259 |
e0905c05a9dfe6505b331b2b7a7c9da0d73f46db | 729 | h | C | src/tools/tools/include/halley/tools/project/build_project_task.h | mjopenglsdl/halley | 68b4bd0845569fa2bafaa72bef3926795f0a6d9b | [
"Apache-2.0"
] | null | null | null | src/tools/tools/include/halley/tools/project/build_project_task.h | mjopenglsdl/halley | 68b4bd0845569fa2bafaa72bef3926795f0a6d9b | [
"Apache-2.0"
] | null | null | null | src/tools/tools/include/halley/tools/project/build_project_task.h | mjopenglsdl/halley | 68b4bd0845569fa2bafaa72bef3926795f0a6d9b | [
"Apache-2.0"
] | null | null | null | #pragma once
#include "halley/support/logger.h"
#include "halley/tools/tasks/editor_task.h"
#include <regex>
namespace Halley {
class Project;
class BuildProjectTask : public EditorTask, ILoggerSink {
public:
BuildProjectTask(Project& project);
protected:
void run() override;
void log(LoggerLevel level, const String& msg) override;
private:
enum class BuildSystem {
Unknown,
MSBuild,
Ninja,
Make
};
Project& project;
String command;
BuildSystem buildSystem = BuildSystem::Unknown;
std::regex matchProgress;
void tryToIdentifyBuildSystem(const String& msg);
void parseMSBuildMessage(const String& msg);
void parseNinjaMessage(const String& msg);
};
}
| 20.25 | 64 | 0.707819 |
b6f21029f729d49499feae9bd58c94cd6df377c5 | 543 | rb | Ruby | generators/app/templates/rubyspec.rb | thekar22/rubytdd | 27ea60f3055e42e7464fbb2aa09a9a5bae985095 | [
"MIT"
] | null | null | null | generators/app/templates/rubyspec.rb | thekar22/rubytdd | 27ea60f3055e42e7464fbb2aa09a9a5bae985095 | [
"MIT"
] | null | null | null | generators/app/templates/rubyspec.rb | thekar22/rubytdd | 27ea60f3055e42e7464fbb2aa09a9a5bae985095 | [
"MIT"
] | null | null | null | require "<%= filename %>"
require "benchmark"
describe <%= classname %> do
before :each do
puts "before each test"
end
before :all do
puts "before all tests"
end
after :each do
puts "after each test"
end
after :all do
puts "after all tests"
end
describe "#meth1" do
context "particular scenario of meth1" do
it "should behave properly" do
puts @num
expect(true).to eql true
end
it "should run fast" do
puts @num
run1 = Benchmark.measure do
#run some method
end
end
end
end
end | 14.289474 | 43 | 0.64825 |
2d7968ee3a7d79f5b96d7efd3c98a04bd37846dd | 246 | css | CSS | Semifinal/speech_order/pizza/static/pizza/css/index.css | illia-v/UAWebChallenge-IX | 707abd9800c6464776b4465d363d81f4d6148e1c | [
"MIT"
] | null | null | null | Semifinal/speech_order/pizza/static/pizza/css/index.css | illia-v/UAWebChallenge-IX | 707abd9800c6464776b4465d363d81f4d6148e1c | [
"MIT"
] | null | null | null | Semifinal/speech_order/pizza/static/pizza/css/index.css | illia-v/UAWebChallenge-IX | 707abd9800c6464776b4465d363d81f4d6148e1c | [
"MIT"
] | null | null | null | form {
margin-bottom: 10px;
}
h3 {
margin-bottom: 1px;
}
p {
margin: 0;
}
input {
margin-right: 5px;
}
button {
margin: 5px 5px auto auto;
}
img {
display: inline;
vertical-align: middle;
/*margin-bottom: -6px;*/
} | 12.3 | 30 | 0.569106 |
fa00a48cd5d730f82d4e5fd8aaa7d0388128ec4d | 1,046 | kt | Kotlin | app/src/main/java/com/dolphin/traverse/database/PointDatabase.kt | oWen0019/TraverseSurvey | c7d8b23aa36a41bab76ee6840bb549ab796b4715 | [
"Apache-2.0"
] | 1 | 2022-03-22T13:17:03.000Z | 2022-03-22T13:17:03.000Z | app/src/main/java/com/dolphin/traverse/database/PointDatabase.kt | oWen0019/TraverseSurvey | c7d8b23aa36a41bab76ee6840bb549ab796b4715 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/dolphin/traverse/database/PointDatabase.kt | oWen0019/TraverseSurvey | c7d8b23aa36a41bab76ee6840bb549ab796b4715 | [
"Apache-2.0"
] | null | null | null | package com.dolphin.traverse.database
import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.dolphin.traverse.dao.ControlPointDao
import com.dolphin.traverse.dao.DxPointDao
import com.dolphin.traverse.entitiy.ControlPoint
import com.dolphin.traverse.entitiy.DxPoint
@Database(version = 1, entities = [ControlPoint::class, DxPoint::class])
abstract class PointDatabase : RoomDatabase() {
abstract fun controlPointDao(): ControlPointDao
abstract fun dxPointDao(): DxPointDao
companion object {
private var instance: PointDatabase? = null
@Synchronized
fun getDatabase(context: Context): PointDatabase {
instance?.let {
return it
}
return Room.databaseBuilder(
context.applicationContext,
PointDatabase::class.java,
"traverse_database"
).build().apply {
instance = this
}
}
}
} | 28.27027 | 72 | 0.66348 |
fd9c0ed5fe89f412b5ce643a4015c2e95a14d21b | 272 | css | CSS | src/app/components/quote-details/quote-details.component.css | eddygero/Quotes | 79767d3f94989587cca6b5a69b22004fba3beb1b | [
"MIT"
] | null | null | null | src/app/components/quote-details/quote-details.component.css | eddygero/Quotes | 79767d3f94989587cca6b5a69b22004fba3beb1b | [
"MIT"
] | null | null | null | src/app/components/quote-details/quote-details.component.css | eddygero/Quotes | 79767d3f94989587cca6b5a69b22004fba3beb1b | [
"MIT"
] | null | null | null | .card-footer {
padding: 1%;
margin-bottom: 0 !important;
background-color: rgb(248, 188, 188);
}
button { /*positions all buttons*/
float: right;
background: linear-gradient(90deg, rgba(61, 223, 235, 0.945) 0%, rgb(14, 250, 199) 50%, rgb(74, 238, 33) 100% );
} | 27.2 | 114 | 0.639706 |
2591b48e7804fdcc560cae929b760e63b7330643 | 2,756 | cs | C# | Defines/glLogicOpMode.cs | whaqzhzd/OpenGL.Core | 93f8d24bc901a697b5b080820cb0a83c4659c809 | [
"MIT"
] | 14 | 2015-12-26T07:47:06.000Z | 2020-12-23T10:18:10.000Z | Defines/glLogicOpMode.cs | whaqzhzd/OpenGL.Core | 93f8d24bc901a697b5b080820cb0a83c4659c809 | [
"MIT"
] | 1 | 2016-06-20T00:11:17.000Z | 2016-06-20T00:11:17.000Z | Defines/glLogicOpMode.cs | whaqzhzd/OpenGL.Core | 93f8d24bc901a697b5b080820cb0a83c4659c809 | [
"MIT"
] | 6 | 2018-04-15T03:42:33.000Z | 2022-02-16T12:20:34.000Z | #region Copyright and License
// Copyright (c) 2013-2014 The Khronos Group Inc.
// Copyright (c) of C# port 2014 by Shinta <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are 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 Materials.
//
// THE MATERIALS ARE 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
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#endregion
namespace OpenGL.Core
{
/// <summary>
/// Logic fragment operation.
/// </summary>
public enum glLogicOpMode : uint
{
/// <summary>
/// Re-Set to 0.
/// </summary>
CLEAR = 0x1500,
/// <summary>
/// Source AND destination.
/// </summary>
AND = 0x1501,
/// <summary>
/// Source AND inverse destination.
/// </summary>
AND_REVERSE = 0x1502,
/// <summary>
/// Copy source.
/// </summary>
COPY = 0x1503,
/// <summary>
/// Inverse source AND destination.
/// </summary>
AND_INVERTED = 0x1504,
/// <summary>
/// Copy destination.
/// </summary>
NOOP = 0x1505,
/// <summary>
/// Antivalance. Source XOR destination.
/// </summary>
XOR = 0x1506,
/// <summary>
/// Source OR destination.
/// </summary>
OR = 0x1507,
/// <summary>
/// Inverse of (source OR destination).
/// </summary>
NOR = 0x1508,
/// <summary>
/// Equivalance. Inverse of (source XOR destination).
/// </summary>
EQUIV = 0x1509,
/// <summary>
/// Inverse destination.
/// </summary>
INVERT = 0x150A,
/// <summary>
/// Source OR inverse destination.
/// </summary>
OR_REVERSE = 0x150B,
/// <summary>
/// Inverse source.
/// </summary>
COPY_INVERTED = 0x150C,
/// <summary>
/// Inverse source OR destination.
/// </summary>
OR_INVERTED = 0x150D,
/// <summary>
/// Inverse of (source AND destination).
/// </summary>
NAND = 0x150E,
/// <summary>
/// Set all bit.
/// </summary>
SET = 0x150F,
}
}
| 24.389381 | 74 | 0.65566 |
f45126dc0b3641ebc80f0652a1b25bcf05d55551 | 3,169 | cs | C# | IosImagePickerSampleProject/Assets/ToggleGroupController.cs | lupidan/unity-ios-image-picker | af82eaf0240e3a99f1e7fb0e3c34d19d8833f381 | [
"MIT"
] | null | null | null | IosImagePickerSampleProject/Assets/ToggleGroupController.cs | lupidan/unity-ios-image-picker | af82eaf0240e3a99f1e7fb0e3c34d19d8833f381 | [
"MIT"
] | null | null | null | IosImagePickerSampleProject/Assets/ToggleGroupController.cs | lupidan/unity-ios-image-picker | af82eaf0240e3a99f1e7fb0e3c34d19d8833f381 | [
"MIT"
] | null | null | null | using System;
using System.Collections.Generic;
using UnityEngine.UI;
namespace DefaultNamespace
{
public class ToggleGroupController<T> : IInterfaceController
{
private readonly T[] values;
private readonly Text[] labels;
private readonly Toggle[] toggles;
private readonly Func<T[]> valuesGetter;
private readonly Action<T[]> valuesSetter;
private readonly Func<T, bool> valueEnabled;
private readonly List<IInterfaceController> dependantInterfaceControllers;
public ToggleGroupController(
T[] values,
Text[] labels,
Toggle[] toggles,
Func<T[]> valuesGetter,
Action<T[]> valuesSetter,
Func<T, bool> valueEnabled)
{
this.values = values;
this.labels = labels;
this.toggles = toggles;
this.valuesGetter = valuesGetter;
this.valuesSetter = valuesSetter;
this.valueEnabled = valueEnabled;
this.dependantInterfaceControllers = new List<IInterfaceController>();
}
public void Setup()
{
// Setup initial UI status and listeners
var currentValues = valuesGetter();
for (var i = 0; i < this.toggles.Length; i++)
{
var value = this.values[i];
var shouldBeOn = currentValues != null && Array.IndexOf(currentValues, value) > -1;
this.toggles[i].isOn = shouldBeOn;
this.toggles[i].onValueChanged.RemoveAllListeners();
this.toggles[i].onValueChanged.AddListener(_ => this.Refresh());
}
}
public void Refresh()
{
var displayedValues = new List<T>();
// Refresh UI and get value from UI state
for (var i = 0; i < this.values.Length; i++)
{
var value = this.values[i];
var isOn = this.toggles[i].isOn;
var isEnabled = valueEnabled == null || valueEnabled(value);
var shouldBeOn = isOn && isEnabled;
this.labels[i].text = value.ToString();
this.toggles[i].enabled = isEnabled;
this.toggles[i].isOn = shouldBeOn;
if (shouldBeOn)
{
displayedValues.Add(value);
}
}
// Set value, update dependant controllers
valuesSetter(displayedValues.ToArray());
if (this.dependantInterfaceControllers != null)
{
for (var i = 0; i < this.dependantInterfaceControllers.Count; i++)
{
this.dependantInterfaceControllers[i].Refresh();
}
}
}
public void AddDependantController(IInterfaceController dependantInterfaceController)
{
if (!this.dependantInterfaceControllers.Contains(dependantInterfaceController))
{
this.dependantInterfaceControllers.Add(dependantInterfaceController);
}
}
}
} | 35.211111 | 99 | 0.546229 |
7997a2c0aa5b18aa9d02e80d99e1c931fcfa1aac | 791 | php | PHP | app/Http/Controllers/HomeController.php | RafaelMunareto/pertence_it_laravel_puro | f8b586cd6ff18878955e7771a1adb704dae929cd | [
"MIT"
] | null | null | null | app/Http/Controllers/HomeController.php | RafaelMunareto/pertence_it_laravel_puro | f8b586cd6ff18878955e7771a1adb704dae929cd | [
"MIT"
] | null | null | null | app/Http/Controllers/HomeController.php | RafaelMunareto/pertence_it_laravel_puro | f8b586cd6ff18878955e7771a1adb704dae929cd | [
"MIT"
] | null | null | null | <?php
namespace App\Http\Controllers;
use App\Usuario;
use App\Historico;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function index(Request $request)
{
$email = Auth::user()->email;
$cadastro = DB::table('historicos')
->where('email', '=', $email)
->get();
return view('areaCliente.index', compact('cadastro'));
}
}
| 18.833333 | 62 | 0.585335 |
ddb1f4d5e8718bef20ec554acaa05941f85222f9 | 3,417 | java | Java | src/main/java/iti/suitceyes/ontology/TestOntology.java | Suitceyes-Project/Semantics | 17091cb85f503ce5f864f514086f37099ac4d238 | [
"Apache-2.0"
] | null | null | null | src/main/java/iti/suitceyes/ontology/TestOntology.java | Suitceyes-Project/Semantics | 17091cb85f503ce5f864f514086f37099ac4d238 | [
"Apache-2.0"
] | null | null | null | src/main/java/iti/suitceyes/ontology/TestOntology.java | Suitceyes-Project/Semantics | 17091cb85f503ce5f864f514086f37099ac4d238 | [
"Apache-2.0"
] | null | null | null | package iti.suitceyes.ontology;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.eclipse.rdf4j.model.Model;
import org.eclipse.rdf4j.model.Resource;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.impl.TreeModel;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.RepositoryConnection;
import org.eclipse.rdf4j.repository.config.RepositoryConfig;
import org.eclipse.rdf4j.repository.config.RepositoryConfigSchema;
import org.eclipse.rdf4j.repository.manager.RemoteRepositoryManager;
import org.eclipse.rdf4j.repository.manager.RepositoryManager;
import org.eclipse.rdf4j.rio.RDFFormat;
import org.eclipse.rdf4j.rio.RDFHandlerException;
import org.eclipse.rdf4j.rio.RDFParseException;
import org.eclipse.rdf4j.rio.RDFParser;
import org.eclipse.rdf4j.rio.Rio;
import org.eclipse.rdf4j.rio.helpers.RDFParserHelper;
import org.eclipse.rdf4j.rio.helpers.StatementCollector;
public class TestOntology {
public static void main(String[] args) throws RDFParseException, RDFHandlerException, IOException {
// Instantiate a local repository manager and initialize it
// RepositoryManager repositoryManager = new LocalRepositoryManager(new File("."));
// repositoryManager.initialize();
RepositoryManager repositoryManager =
new RemoteRepositoryManager( "http://beaware-server.mklab.iti.gr:7200" );
//new RemoteRepositoryManager( "https://graphdb.certh.strdi.me:7200" );
repositoryManager.initialize();
// Instantiate a repository graph model
TreeModel graph = new TreeModel();
// Read repository configuration file
// InputStream config = EmbeddedGraphDB.class.getResourceAsStream("/repo-defaults.ttl");
InputStream config = RDFParserHelper.class.getResourceAsStream("\\repo-defaults.ttl");
RDFParser rdfParser = Rio.createParser(RDFFormat.TURTLE);
rdfParser.setRDFHandler(new StatementCollector(graph));
rdfParser.parse(config, RepositoryConfigSchema.NAMESPACE);
config.close();
// Retrieve the repository node as a resource
// Resource repositoryNode = GraphUtil.getUniqueSubject(graph, RDF.TYPE, RepositoryConfigSchema.REPOSITORY);
Resource repositoryNode = graph.filter(null, RDF.TYPE, RepositoryConfigSchema.REPOSITORY).subjects().iterator().next();
Model model = graph.filter(null, RDF.TYPE, RepositoryConfigSchema.REPOSITORY);
Iterator<Statement> iterator = model.iterator();
if (!iterator.hasNext())
throw new RuntimeException("Oops, no <http://www.openrdf.org/config/repository#> subject found!");
Statement statement = iterator.next();
Resource repositoryNodeXXNEW = statement.getSubject();
// Create a repository configuration object and add it to the repositoryManager
RepositoryConfig repositoryConfig = RepositoryConfig.create(graph, repositoryNode);
repositoryManager.addRepositoryConfig(repositoryConfig);
// Get the repository from repository manager, note the repository id set in configuration .ttl file
Repository repository = repositoryManager.getRepository("graphdb-repo");
// Open a connection to this repository
RepositoryConnection repositoryConnection = repository.getConnection();
// ... use the repository
// Shutdown connection, repository and manager
repositoryConnection.close();
repository.shutDown();
repositoryManager.shutDown();
}
}
| 42.185185 | 121 | 0.794849 |
ddd5863627ef3c78dddadfb6e8bab86a10cfe40a | 3,482 | java | Java | sdk/arena-java-sdk/src/main/java/com/github/kubeflow/arena/model/training/TrainingJobInfo.java | thliang01/arena | 8ec9325f4927744bb10483dac0b9399faf12ef12 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/arena-java-sdk/src/main/java/com/github/kubeflow/arena/model/training/TrainingJobInfo.java | thliang01/arena | 8ec9325f4927744bb10483dac0b9399faf12ef12 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/arena-java-sdk/src/main/java/com/github/kubeflow/arena/model/training/TrainingJobInfo.java | thliang01/arena | 8ec9325f4927744bb10483dac0b9399faf12ef12 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | package com.github.kubeflow.arena.model.training;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONType;
import com.github.kubeflow.arena.enums.TrainingJobStatus;
import com.github.kubeflow.arena.enums.TrainingJobType;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
public class TrainingJobInfo {
private String name;
private String namespace;
private String duration;
private TrainingJobStatus status;
private TrainingJobType trainer;
private String tensorboard;
private String chiefName;
private String priority;
private int requestGPUs;
private int allocatedGPUs;
private Instance[] instances;
private long creationTimestamp;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNamespace() {
return namespace;
}
public void setNamespace(String namespace) {
this.namespace = namespace;
}
public String getDuration() {
return this.duration;
}
public void setDuration(String duration) {
this.duration = duration;
}
public TrainingJobStatus getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = TrainingJobStatus.getByAlias(status);
}
public TrainingJobType getTrainer() {
return this.trainer;
}
public void setTrainer(String trainer) {
this.trainer = TrainingJobType.getByAlias(trainer);
}
public String getTensorboard() {
return this.tensorboard;
}
public void setTensorboard(String tensorboard) {
this.tensorboard = tensorboard;
}
public String getChiefName() {
return this.chiefName;
}
public void setChiefName(String name) {
this.chiefName = name;
}
public String getPriority() {
return this.priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public int getRequestGPUs() {
return this.requestGPUs;
}
public void setRequestGPUs(int requestGPUs) {
this.requestGPUs = requestGPUs;
}
public int getAllocatedGPUs() {
return this.allocatedGPUs;
}
public void setAllocatedGPUs(int allocatedGPUs) {
this.allocatedGPUs = allocatedGPUs;
}
public Instance[] getInstances() {
return this.instances;
}
public void setInstances(Instance[] instances) {
this.instances = instances;
}
public long getCreationTimestamp() {
return creationTimestamp;
}
public void setCreationTimestamp(long creationTimestamp) {
this.creationTimestamp = creationTimestamp;
}
public TrainingJobInfo complete(String json) {
TrainingJobInfo trainingJobInfo = JSON.parseObject(json, TrainingJobInfo.class);
for(int i = 0;i < trainingJobInfo.instances.length;i++) {
trainingJobInfo.instances[i].setNamespace(trainingJobInfo.getNamespace());
trainingJobInfo.instances[i].setOwner(trainingJobInfo.getName());
trainingJobInfo.instances[i].setOwnerType(trainingJobInfo.getTrainer());
}
return trainingJobInfo;
}
@Override
public String toString() {
return JSON.toJSONString(this, true);
}
}
| 26.992248 | 88 | 0.677197 |
a4a57706610e01040f86d7424541d9ec50642fb2 | 5,504 | php | PHP | templates/zoneimport.php | robertpenz/dns-ui | 15da9f79bd881e380f733f30b991a78f606848cf | [
"Apache-2.0"
] | 234 | 2017-01-24T09:59:00.000Z | 2022-03-31T02:38:01.000Z | templates/zoneimport.php | robertpenz/dns-ui | 15da9f79bd881e380f733f30b991a78f606848cf | [
"Apache-2.0"
] | 146 | 2017-01-25T19:00:33.000Z | 2022-03-08T11:56:08.000Z | templates/zoneimport.php | robertpenz/dns-ui | 15da9f79bd881e380f733f30b991a78f606848cf | [
"Apache-2.0"
] | 69 | 2017-02-13T04:16:36.000Z | 2021-10-31T21:45:04.000Z | <?php
##
## Copyright 2013-2018 Opera Software AS
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
$zone = $this->get('zone');
$modifications = $this->get('modifications');
$checked = 'checked ';
$count = 0;
$limit = 2500;
?>
<h1>Import preview for <?php out(DNSZoneName::unqualify(punycode_to_utf8($zone->name)))?> zone update</h1>
<?php if(count($modifications['add']) == 0 && count($modifications['update']) == 0 && count($modifications['delete']) == 0) { ?>
<p>No changes have been made! <a href="<?php outurl('/zones/'.urlencode(DNSZoneName::unqualify($zone->name)))?>">Go back</a>.</p>
<?php } else { ?>
<form method="post" action="<?php outurl('/zones/'.urlencode(DNSZoneName::unqualify($zone->name)))?>">
<?php out($this->get('active_user')->get_csrf_field(), ESC_NONE) ?>
<?php if(count($modifications['add']) > 0) { ?>
<h2>New resource recordsets</h2>
<table class="table table-bordered changepreview">
<thead>
<tr>
<th class="name">Name</th>
<th class="type">Type</th>
<th class="ttl">TTL</th>
<th>Data</th>
<th>Comments</th>
<th class="confirm">Okay to add?</th>
</tr>
</thead>
<tbody>
<?php
foreach($modifications['add'] as $mod) {
$count++;
if($count > $limit) $checked = '';
?>
<tr>
<td><?php out(DNSName::abbreviate($mod['new']->name, $zone->name))?></td>
<td><?php out($mod['new']->type)?></td>
<td><?php out(DNSTime::abbreviate($mod['new']->ttl))?></td>
<td>
<ul class="plain">
<?php foreach($mod['new']->list_resource_records() as $rr) { ?>
<li><?php out('Content: '.$rr->content.', Enabled: '.($rr->disabled ? 'No' : 'Yes')) ?></li>
<?php } ?>
</ul>
</td>
<td>
<ul class="plain">
<?php foreach($mod['new']->list_comments() as $comment) { ?>
<li><?php out($comment->content) ?></li>
<?php } ?>
</ul>
</td>
<td><input type="checkbox" name="updates[]"<?php out($checked)?> value="<?php out($mod['json']) ?>"></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<?php if(count($modifications['update']) > 0) { ?>
<h2>Updated resource recordsets</h2>
<table class="table table-bordered changepreview">
<thead>
<tr>
<th class="name">Name</th>
<th class="type">Type</th>
<th class="ttl">TTL</th>
<th>Changes</th>
<th class="confirm">Okay to update?</th>
</tr>
</thead>
<tbody>
<?php
foreach($modifications['update'] as $mod) {
$count++;
if($count > $limit) $checked = '';
?>
<tr>
<td><?php out(DNSName::abbreviate($mod['new']->name, $zone->name))?></td>
<td><?php out($mod['new']->type)?></td>
<td><?php out(DNSTime::abbreviate($mod['new']->ttl))?></td>
<td>
<ul class="plain">
<?php foreach($mod['changelist'] as $change) { ?>
<li><?php out($change) ?></li>
<?php } ?>
</ul>
</td>
<td><input type="checkbox" name="updates[]"<?php out($checked)?> value="<?php out($mod['json']) ?>"></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<?php if(count($modifications['delete']) > 0) { ?>
<h2>Deleted resource recordsets</h2>
<table class="table table-bordered changepreview">
<thead>
<tr>
<th class="name">Name</th>
<th class="type">Type</th>
<th class="ttl">TTL</th>
<th>Data</th>
<th>Comments</th>
<th class="confirm">Okay to delete?</th>
</tr>
</thead>
<tbody>
<?php
foreach($modifications['delete'] as $mod) {
$count++;
if($count > $limit) $checked = '';
?>
<tr>
<td><?php out(DNSName::abbreviate($mod['old']->name, $zone->name))?></td>
<td><?php out($mod['old']->type)?></td>
<td><?php out(DNSTime::abbreviate($mod['old']->ttl))?></td>
<td>
<ul class="plain">
<?php foreach($mod['old']->list_resource_records() as $rr) { ?>
<li><?php out('Content: '.$rr->content) ?></li>
<?php } ?>
</ul>
</td>
<td>
<ul class="plain">
<?php foreach($mod['old']->list_comments() as $comment) { ?>
<li><?php out($comment->content) ?></li>
<?php } ?>
</ul>
</td>
<td><input type="checkbox" name="updates[]"<?php out($checked)?> value="<?php out($mod['json']) ?>"></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<?php if($checked == '') { ?>
<p class="alert alert-danger">
By default only the first <?php out($limit)?> changes (out of <?php out($count)?>) have been selected for import as larger imports may be rejected by PowerDNS.
It is recommended that you run this import multiple times until all changes have been imported.
</p>
<?php } ?>
<div class="form-group"><label for="comment">Update comment</label><input type="text" id="comment" name="comment" class="form-control"></div>
<p>
<button type="submit" name="update_rrs" value="1" class="btn btn-primary">Confirm selected changes</button>
<a href="<?php outurl('/zones/'.urlencode(DNSZoneName::unqualify($zone->name)))?>" class="btn btn-default">Cancel import</a>
</p>
</form>
<?php } ?>
| 33.766871 | 161 | 0.580305 |
06cc225b2dc29d55f06282d210a0c63f9331ce97 | 43 | py | Python | exceptions/db_exceptions.py | 0rang3max/fourinrow-bot | 3a6c8751cb66e506137a84c37d7c0de526092454 | [
"MIT"
] | 3 | 2021-12-28T21:38:31.000Z | 2022-03-05T19:03:27.000Z | exceptions/db_exceptions.py | 0rang3max/fourinrow-bot | 3a6c8751cb66e506137a84c37d7c0de526092454 | [
"MIT"
] | null | null | null | exceptions/db_exceptions.py | 0rang3max/fourinrow-bot | 3a6c8751cb66e506137a84c37d7c0de526092454 | [
"MIT"
] | null | null | null | class GameDoesNotExist(Exception):
pass | 21.5 | 34 | 0.790698 |
fa0127da60d6209d0864b825a6f2927fd44126a7 | 318 | cpp | C++ | 5e/C++11/354_bind.cpp | mallius/CppPrimer | 0285fabe5934492dfed0a9cf67ba5650982a5f76 | [
"MIT"
] | null | null | null | 5e/C++11/354_bind.cpp | mallius/CppPrimer | 0285fabe5934492dfed0a9cf67ba5650982a5f76 | [
"MIT"
] | null | null | null | 5e/C++11/354_bind.cpp | mallius/CppPrimer | 0285fabe5934492dfed0a9cf67ba5650982a5f76 | [
"MIT"
] | 1 | 2022-01-25T15:51:34.000Z | 2022-01-25T15:51:34.000Z | #include <iostream>
#include <functional>
using namespace std;
using namespace std::placeholders;
bool check_size(const string& s, string::size_type sz)
{
return s.size() >= sz;
}
int main(void)
{
auto check6 = bind(check_size, _1, 6);
string s = "hello";
bool b1 = check6(s);
cout << b1 << endl;
return 0;
}
| 15.9 | 54 | 0.672956 |
c939ce837c56ff6b4969c9ba4516ae8ca97841ca | 622 | ts | TypeScript | typescript/src/tests/problem3.test.ts | shivaprasadkannoju/InterviewProblems | 0fcc787ebed228cf5ace9c9df05b42e364b2955b | [
"Apache-2.0"
] | null | null | null | typescript/src/tests/problem3.test.ts | shivaprasadkannoju/InterviewProblems | 0fcc787ebed228cf5ace9c9df05b42e364b2955b | [
"Apache-2.0"
] | null | null | null | typescript/src/tests/problem3.test.ts | shivaprasadkannoju/InterviewProblems | 0fcc787ebed228cf5ace9c9df05b42e364b2955b | [
"Apache-2.0"
] | null | null | null | import { describe, expect, test } from '@jest/globals';
import passengerLoad from '../problem3';
/**
* Problem 3 - Passenger Load Tests
*
* @group passengerLoad
*/
describe('Problem 3 - Passenger Load', () => {
test('[[10, 0], [3, 5], [5, 8]]', () => {
expect(
passengerLoad([
[10, 0],
[3, 5],
[5, 8]
])
).toBe(5);
});
test('[[5, 3]]', () => {
expect(passengerLoad([[5, 3]])).toBe(2);
});
test('[[8, 4], [19, 4], [6, 3], [0, 12], [7, 8], [4, 4]]', () => {
expect(
passengerLoad([
[8, 4],
[19, 4],
[6, 3],
[0, 12],
[7, 8],
[4, 4]
])
).toBe(9);
});
});
| 16.810811 | 67 | 0.438907 |
b757222d3fec4250df3a0d43e0f81db3d59429da | 795 | swift | Swift | iOS/Triggers.Item.swift | exsmoker/app | f0cb92a135651a75b8985a90ac0a1a10d94099e4 | [
"MIT"
] | null | null | null | iOS/Triggers.Item.swift | exsmoker/app | f0cb92a135651a75b8985a90ac0a1a10d94099e4 | [
"MIT"
] | null | null | null | iOS/Triggers.Item.swift | exsmoker/app | f0cb92a135651a75b8985a90ac0a1a10d94099e4 | [
"MIT"
] | null | null | null | import SwiftUI
import Core
extension Triggers {
struct Item: View {
let trigger: Smoke.Trigger
let action: () -> Void
var body: some View {
Button(action: action) {
ZStack {
GeometryReader {
RoundedRectangle(cornerRadius: $0.size.height / 4)
.shadow(color: .accentColor, radius: 2, x: -0.5, y: -0.5)
.shadow(color: .accentColor, radius: 2, x: 1, y: 1)
}
Text(.init(trigger.title))
.foregroundColor(.primary)
.font(Font.footnote.bold())
.padding()
}
}.accentColor(.pink)
}
}
}
| 29.444444 | 85 | 0.420126 |
51b30bd2ee22daeaf7396bc41308f47fa1694eca | 2,984 | lua | Lua | addons/pac3-master/lua/pac3/core/client/parts/projected_texture.lua | Jck123/gmodserver | 584d0529f22aa11f5dc2402b1597ffdbb1c69781 | [
"Apache-2.0"
] | null | null | null | addons/pac3-master/lua/pac3/core/client/parts/projected_texture.lua | Jck123/gmodserver | 584d0529f22aa11f5dc2402b1597ffdbb1c69781 | [
"Apache-2.0"
] | null | null | null | addons/pac3-master/lua/pac3/core/client/parts/projected_texture.lua | Jck123/gmodserver | 584d0529f22aa11f5dc2402b1597ffdbb1c69781 | [
"Apache-2.0"
] | null | null | null | local PART = {}
PART.ClassName = "projected_texture"
PART.Group = "experimental"
PART.Icon = 'icon16/lightbulb.png'
pac.StartStorableVars()
pac.GetSet(PART, "Shadows", true)
pac.GetSet(PART, "Orthographic", false)
pac.GetSet(PART, "NearZ", 1)
pac.GetSet(PART, "FarZ", 2048)
pac.GetSet(PART, "FOV", 90)
pac.GetSet(PART, "HorizontalFOV", 90)
pac.GetSet(PART, "VerticalFOV", 90)
pac.GetSet(PART, "Texture", "effects/flashlight/hard", {editor_panel = "textures"})
pac.GetSet(PART, "TextureFrame", 0)
pac.SetPropertyGroup(PART, "appearance")
pac.GetSet(PART, "Brightness", 8)
pac.GetSet(PART, "Color", Vector(1, 1, 1), {editor_panel = "color2"})
pac.EndStorableVars()
function PART:GetProjectedTexture()
if not self.ptex then
self.ptex = ProjectedTexture()
end
return self.ptex
end
function PART:GetNiceName()
local hue = pac.ColorToNames(self:GetColor())
return hue .. " projected texture"
end
local vars = {
"Shadows",
"NearZ",
"FarZ",
"FOV",
"HorizontalFOV",
"VerticalFOV",
"Orthographic",
"Texture",
"TextureFrame",
"Brightness",
"Color",
}
function PART:OnShow()
for _, v in ipairs(vars) do
self["Set" .. v](self, self["Get" .. v](self))
end
end
function PART:OnDraw(owner, pos, ang)
local ptex = self:GetProjectedTexture()
ptex:SetPos(pos)
ptex:SetAngles(ang)
ptex:Update()
end
function PART:SetColor(val)
self.Color = val
self:GetProjectedTexture():SetColor(Color(val.x*255, val.y*255, val.z*255, 1))
end
function PART:SetBrightness(val)
self.Brightness = val
self:GetProjectedTexture():SetBrightness(val)
end
function PART:SetOrthographic(val)
self.Orthographic = val
self:GetProjectedTexture():SetOrthographic(val)
end
function PART:SetVerticalFOV(val)
self.VerticalFOV = val
self:GetProjectedTexture():SetVerticalFOV(val)
end
function PART:SetHorizontalFOV(val)
self.HorizontalFOV = val
self:GetProjectedTexture():SetHorizontalFOV(val)
end
function PART:SetFOV(val)
self.FOV = val
self:GetProjectedTexture():SetFOV(val)
end
function PART:SetNearZ(val)
self.NearZ = val
self:GetProjectedTexture():SetNearZ(val)
end
function PART:SetFarZ(val)
self.FarZ = val
self:GetProjectedTexture():SetFarZ(val)
end
function PART:SetShadows(val)
self.Shadows = val
self:GetProjectedTexture():SetEnableShadows(val)
end
function PART:SetTextureFrame(val)
self.TextureFrame = val
if self.vtf_frame_limit then
self:GetProjectedTexture():SetTextureFrame(math.abs(val)%self.vtf_frame_limit)
else
self:GetProjectedTexture():SetTextureFrame(math.abs(val))
end
end
function PART:SetTexture(val)
if not val then
return
end
self.Texture = val
if not pac.resource.DownloadTexture(val, function(tex, frames)
if frames then
self.vtf_frame_limit = frames
end
self:GetProjectedTexture():SetTexture(tex)
end, self:GetPlayerOwner()) then
self:GetProjectedTexture():SetTexture(val)
end
end
function PART:OnHide()
self:GetProjectedTexture():Remove()
self.ptex = nil
end
pac.RegisterPart(PART) | 19.893333 | 84 | 0.740952 |
54e5526822337e84a0a330aa8a5498e6f56405d7 | 4,660 | css | CSS | src/css/ribbon-theme.css | fstfwd/react-ribbon | c0da61df3f6b0414a353355222124c54f82b8608 | [
"MIT"
] | 6 | 2018-03-25T01:32:48.000Z | 2020-07-01T17:11:46.000Z | src/css/ribbon-theme.css | fstfwd/react-ribbon | c0da61df3f6b0414a353355222124c54f82b8608 | [
"MIT"
] | null | null | null | src/css/ribbon-theme.css | fstfwd/react-ribbon | c0da61df3f6b0414a353355222124c54f82b8608 | [
"MIT"
] | null | null | null | /**
* @author yiskang / http://github.com/yiskang
*/
#RibbonUI li[role=ui-ribbon-tab].ui-ribbon-tab-application {
background-color: #2b579a;
color: #FFF;
border: 1px solid #2b579a !important;
}
#RibbonUI li[role=ui-ribbon-tab].ui-ribbon-tab-application:hover {
background-color: #3e6db5;
border: 1px solid #3e6db5 !important;
}
#RibbonUI li[role=ui-ribbon-tab]:not(.ui-ribbon-tab-application):hover {
color: #2b579a;
}
#RibbonUI li.ui-ribbon-active[role=ui-ribbon-tab]:not(.ui-ribbon-tab-application) {
color: #2b579a;
}
#RibbonUI li[role=ui-ribbon-tab].ui-ribbon-tab-application.ui-ribbon-active {
background-color: #3e6db5;
border: 1px solid #3e6db5 !important;
}
#RibbonUI .ui-ribbon-tab-application-contents #ribbon-nav-application-menu {
background-color: #2b579a;
}
#RibbonUI ul[role=ribbon-nav-application-menu-items] li:not(.ui-ribbon-seperator).ui-ribbon-active {
background-color: #3e6db5;
}
#RibbonUI ul[role=ribbon-nav-application-menu-items] li:not(.ui-ribbon-seperator):hover {
background-color: #19478a;
}
#RibbonUI ul[role=ribbon-nav-application-menu-items] li .ui-ribbon-seperator {
background-color: #3e6db5;
}
#RibbonUI .ui-ribbon-tab-application-contents #ribbon-nav-application-menu .ribbon-nav-back-arrow {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAIAAACRuyQOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNWWFMmUAAAOoSURBVEhLrZf5S1VREMfv/xNFBBFFFP0ihBRBhGWIZIsItpi0EdFCGyFt+EOpmOaSS2o9NZfE0kzMLTPNPdNcM01TccPqc53n9XrefYu+Dt8fzjIz33tmzsw5V1vjF+Uamw7FnY98k17U1P595K+pzc//qW/7EZdTH3wzT1GxhCsm/0svS2q77IYX2/TMXFPnT/tgsXX1j2W9bdkenKhYMMOaacvh+LzyDrEyOzcP35Wo0t3h6WaZtQei91/MepBSVdcyIJIjY1Ns0SxjhgVTwGXb4PAEmnx+rO0T3lMEHLHzZEpBxVfhK6/v8Ql9pggAlYmQiEJx9bcdIUnKqmuwRdyIbs/g712n05TVZUwGTfSLj+Z5z7Ex8Mm7um4sjE/O+J5KNS8tMfFFQkNIjMlVgPjllLVhh4Oz7ViCMW9n2hAQKxt3EVLPsf5gjByTospOY9LOlFbUxALB5IuMNW+w9ejToV+T2CQiMqMzcXyZIhOVc+wliAJmqxr7ZKgz2UpbmWJbMvW/gHs6e0exLIHX1vnHyIZ8jlskgRk4JCm/gQ8CHu5eDjNBoa+F3M5nUNPUb5ZwBDStXcNI0u4lVyqrzsBBI/1RIf01Uset8upoBFI52Y9W9aWPXuDVbEXCgDc04HFmLYqUR21wRD+LzgqPlzTg7MNidHPL2jXxIw5VJICZhore2DHkFo5fI+egpLZb49TRs0xYtrzAsoKWUtioGAm6lsP8h4ZebWximh4XkiIhQHPBgt6oZnLEXQBfKRZORBSiS1nS5ALdey5DkTBADi0Q6ZlAqVZW3eJG7Ht0kwsatexSve4a1ckS3pBJAcK+JtUpo7hZkVCwOjLCPzquR4cCpPmGpdJjTKlX5BQkvPq8wLUCMh4KyNc2D9DXK2xFQy9j1w4UhN8vwgdg34VMZckSuArLcoPrTOLAvqFxt9taEfaceS4phNsY2m9C2dbqqoAzSMXj6MvQziSZTCHgNSEzXuJWXLn4yXjE2ZmA+JQreaWPL0ccuZ4rfgu7+9qYXGICZDLLvL+9IeNamJyaxY7hN8Eyps1B8Vz7CPGG5YCalzwEFUFKNgmrLC1jApDxekWURrY6q4eO4L7nFhdF/gaUVaAyCeQipuEH+PhvcfY6I+AEw/g4Ho3knCIjsGYC1FxDn8brlyGuj0yrJv/4M6BPbkjkaTicGct7TuCUSQAft5QEz1kjbzjTbv3shskAhkLvFLCbR5k1ttK2iMQK+txynpYVv6h/ZqNVJyUvIOAAAAAASUVORK5CYII=');
}
#RibbonUI .ui-ribbon-tab-application-contents #ribbon-nav-application-menu .ribbon-nav-back-arrow:hover {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAIAAACRuyQOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNWWFMmUAAAO6SURBVEhLrZd3UxNBGMbv+6hIG7uOoiOOY0NHgRACQYoQIAakSBAjyFBCCUgNJCAtgJSA4gQFASkGREWk+W18bt7McSx3uZA48/tjb8v73O7ePvsedyza6p1gte1+wURm7Xx5z8+2yb8CLc5dk20ttXLmhn6YGSKJN6UI3WBh64o4OngztsNIAtTgVcI0diaCGGklzMPQ+JWiNDv3oBdtfH8xtU/cJyi246puUPt6urR7nXrWDm2mVc2I+4iRULqWOWR2/MbIpvFdLE6I2tubEniJvOZl0itqd59K7GY6AFYpKt9JAzCPM0lvmVbvRGQ4qvo3MLa6f+NCSi/TekBJkEmp+Cyu952wePvztm+I0DS2w4jtK0VkDJBMTPEHodIPjsd06C0LiIOZhSd0CfUepSBVZ2UfP/G0qlmhzW8gRjPLb1kWKj1K+EbRYGx3o5PQFgjhmq6awU3ExI5QDa90PqUXVa0Te8x3HCDYBYR90bFKj7zS0wZ+WbPrF6jqf4Hlqej7hciPjJN45PBMEzr7uEfc7zBYkAzzl8y6eeDj7B8UTiA4ThjK3E3DCB5KbGviHoeBjGBCmlIX0yrHSVUnjj+GwHS45IpPioP9kyHIOTEfDjuG0vUsWT8ORAYklfMz0ZZNc/QtntZKG0+AMiCqgPcdQ8MiB9tACQvK9ABiGTg6PFuRw29D3wEOMtfq3ENJ8sAmlrlIxnd0tXNMkEj9MOqLrW7OMrKFEpyR6UFgpBAlp3GRPnEvYK2YCHeejWFsXvMSV9b9A6XLTwaYHgI4Q6SEkxAcZ2NaFVG9nMLYdPMsZ7DwdyuOGNNDTCBisB4MfFg0ycEqUFK0Ir/FzA7+24a1cmSvlpFt5AVMJ4b06iOL4RZGf5N9HWXeYY1WN569LyBxL38cqQu4ku5gmiShK5HSGF6JFhBHWHFaR+JSWj+MG5HPJfPe7bkJaVr+uYAc5Hi4Y+nRo0QnGUaAFI5qAkRt+oiAyObg4lTjUQJZdfwFX/9uS84DfQfvTet2O3dUqNxXArlNS2jGRXnUTE8MrgVk1IgjrBtxQClUbacNqxv6A78SN/lIbMkUtgARkDEwTQeUQEicTch74WOwc6aDHNhgk/07DcRGMK2AVSK05dPk8biboYd1l8vOkLXfzRun7A7ARfHI9CGklYA4qQeNo9sFLStQxc8FTi7SaZSLrau08wAZK34XmCBiZJUI6CWUuigDkAPnRlUypehPCkoCofH2WzmjcBPMSVczp3nlQjkye/iEj7YSbf0Ha15pmffbg9AAAAAASUVORK5CYII=');
}
#RibbonUI .ui-ribbon-button.ui-ribbon-active {
background-color: #a3bde3;
}
#RibbonUI a:not(.ui-ribbon-disabled) .ui-ribbon-button-big:not(.ui-ribbon-active):hover,
#RibbonUI a:not(.ui-ribbon-disabled) .ui-ribbon-button-small:not(.ui-ribbon-active):hover {
background-color: #d5e1f2;
}
| 76.393443 | 1,513 | 0.88691 |
c6daf8b6e740da68804abf9cc0a79d991873a84c | 602 | py | Python | bspump/file/fileblocksource.py | thatch/BitSwanPump | 98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f | [
"BSD-3-Clause"
] | 17 | 2019-02-14T09:26:03.000Z | 2022-03-11T09:23:52.000Z | bspump/file/fileblocksource.py | thatch/BitSwanPump | 98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f | [
"BSD-3-Clause"
] | 91 | 2019-05-06T18:59:02.000Z | 2022-01-11T06:22:32.000Z | bspump/file/fileblocksource.py | thatch/BitSwanPump | 98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f | [
"BSD-3-Clause"
] | 10 | 2019-04-23T08:48:58.000Z | 2022-02-13T14:24:28.000Z | import logging
from .fileabcsource import FileABCSource
L = logging.getLogger(__file__)
class FileBlockSource(FileABCSource):
def __init__(self, app, pipeline, id=None, config=None):
super().__init__(app, pipeline, id=id, config=config)
self.ProactorService = app.get_service("asab.ProactorService")
async def read(self, filename, f):
await self.Pipeline.ready()
# Load the file in a worker thread (to prevent blockage of the main loop)
worker = self.ProactorService.execute(f.read)
await worker
event = worker.result()
await self.process(event, {
"filename": filename
})
| 25.083333 | 75 | 0.740864 |
0de6e1a683af71a06dce8e9684ccd7062e47b33f | 263 | cs | C# | samples/Configuration/Test.DifferentEnvironment/StagingStartup.cs | kalintsenkov/MyTested.AspNetCore.Mvc | 06056f5f0b0b9d2fd0a3331e6b93d65ae537029f | [
"MS-PL"
] | 8 | 2015-12-02T09:40:51.000Z | 2016-03-17T19:31:59.000Z | samples/Configuration/Test.DifferentEnvironment/StagingStartup.cs | kalintsenkov/MyTested.AspNetCore.Mvc | 06056f5f0b0b9d2fd0a3331e6b93d65ae537029f | [
"MS-PL"
] | 133 | 2015-12-02T07:11:05.000Z | 2016-06-05T08:14:11.000Z | samples/Configuration/Test.DifferentEnvironment/StagingStartup.cs | ivaylokenov/MyTested.Mvc | 06056f5f0b0b9d2fd0a3331e6b93d65ae537029f | [
"MS-PL"
] | null | null | null | namespace Test.DifferentEnvironment
{
using Microsoft.Extensions.DependencyInjection;
public class StagingStartup
{
public void ConfigureStagingServices(IServiceCollection services)
{
services.AddMvc();
}
}
}
| 20.230769 | 73 | 0.665399 |
f425a4349d62d42bae3a9af273f02f4e62dd2c60 | 989 | cs | C# | FutureCube/Assets/Scripts/No Limit/ChunkHolder.cs | SolomonRosemite/Unity-FutureCube | 9f27ba06a93fff209cf74b2a2db095c9feac4553 | [
"MIT"
] | 2 | 2020-10-31T06:37:21.000Z | 2020-11-04T12:33:58.000Z | FutureCube/Assets/Scripts/No Limit/ChunkHolder.cs | SolomonRosemite/Unity-FutureCube | 9f27ba06a93fff209cf74b2a2db095c9feac4553 | [
"MIT"
] | null | null | null | FutureCube/Assets/Scripts/No Limit/ChunkHolder.cs | SolomonRosemite/Unity-FutureCube | 9f27ba06a93fff209cf74b2a2db095c9feac4553 | [
"MIT"
] | null | null | null | using System.Collections;
using UnityEngine;
public class ChunkHolder : MonoBehaviour
{
public Chunk chunk { get; private set; }
private ChunkManager chunkManager;
private bool repeated = false;
void Start()
{
if (chunk == null) { chunk = new Chunk(0, LoadJson.loadJson.Difficulty); }
new GameObject($"Chunk {chunk.Id}");
StartCoroutine(LateStart(.5f));
}
IEnumerator LateStart(float seconds)
{
yield return new WaitForSeconds(seconds);
chunkManager = ChunkManager.ins.gameObject.GetComponent<ChunkManager>();
chunkManager.OnNewChunk += OnNewChunk;
}
private void OnNewChunk(object x, ChunkManager.OnNewChunkEventArgs args)
{
if (args.chunkId == chunk.Id || repeated == false && chunk.Id == 0)
{
repeated = true;
chunkManager.LoadNewChunk(gameObject, chunk);
}
}
public void updateChunkValues(Chunk chunk) => this.chunk = chunk;
}
| 25.358974 | 82 | 0.64004 |
239f7b2be6448e912d50fd0c8a3d6d1cd556b25a | 516 | js | JavaScript | src/components/layout/BreadcrumbBar.js | availabs/avail_app_bootstrap | 57943a180dd36813883268f5cf37c8b8902ddaec | [
"MIT"
] | null | null | null | src/components/layout/BreadcrumbBar.js | availabs/avail_app_bootstrap | 57943a180dd36813883268f5cf37c8b8902ddaec | [
"MIT"
] | null | null | null | src/components/layout/BreadcrumbBar.js | availabs/avail_app_bootstrap | 57943a180dd36813883268f5cf37c8b8902ddaec | [
"MIT"
] | null | null | null | import React from 'react';
import { Link } from 'react-router-dom';
import './BreadcrumbBar.css';
export default props => (
<ul className="breadcrumb">
{props.items.map((item, i) => {
if (props.items.length === i + 1) {
return (
<li key={i} className="breadcrumb-item">
{item.text}
</li>
);
}
return (
<li key={i} className="breadcrumb-item">
<Link to={item.link}>{item.text}</Link>
</li>
);
})}
</ul>
);
| 22.434783 | 50 | 0.498062 |
c9de1397dfad708908705ca18ab0acca48eb0a29 | 8,882 | ts | TypeScript | app/models/MetaModelConst.ts | hagerupe/legend-studio | d63a00a83c2414087e6b7732db6dab463ce27c6f | [
"Apache-2.0"
] | null | null | null | app/models/MetaModelConst.ts | hagerupe/legend-studio | d63a00a83c2414087e6b7732db6dab463ce27c6f | [
"Apache-2.0"
] | null | null | null | app/models/MetaModelConst.ts | hagerupe/legend-studio | d63a00a83c2414087e6b7732db6dab463ce27c6f | [
"Apache-2.0"
] | null | null | null | /**
* Copyright 2020 Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const SOURCE_INFORMATION_KEY = 'sourceInformation';
export const MULTIPLICITY_INFINITE = '*';
export const ENTITY_PATH_DELIMITER = '::';
export const LAMBDA_START = '|';
export const DEFAULT_SOURCE_PARAMETER_NAME = 'src';
export enum SOURCR_ID_LABEL {
CONSTRAINT = 'constraint',
DERIVED_PROPERTY = 'derivedProperty',
ENUMERATION_MAPPING = 'enumerationMapping',
OPERATION_CLASS_MAPPING = 'operationClassMapping',
PURE_INSTANCE_CLASS_MAPPING = 'pureInstanceClassMapping'
}
export enum CLIENT_VERSION {
V1_0_0 = 'v1_0_0',
VX_X_X = 'vX_X_X',
}
export enum ROOT_PACKAGE_NAME {
CORE = 'CORE',
MAIN = 'ROOT',
MODEL_GENERATION = 'MODEL_GENERATION_ROOT',
SYSTEM = 'SYSTEM_ROOT',
PROJECT_DEPENDENCY_ROOT = 'PROJECT_DEPENDENCY_ROOT',
LEGAL = 'LEGAL_ROOT', // TODO: remove when we remove demo mode support
}
// Pure model connection does not use an actual store so this is just a dummy value
export const MODEL_STORE_NAME = 'ModelStore';
export enum PRIMITIVE_TYPE {
STRING = 'String',
BOOLEAN = 'Boolean',
BINARY = 'Binary',
NUMBER = 'Number', // `Number` is the supper type of all other numeric types
INTEGER = 'Integer',
FLOAT = 'Float',
DECIMAL = 'Decimal',
DATE = 'Date', // `Date` is the supper type of all other temporal types
STRICTDATE = 'StrictDate', // just date, without time
DATETIME = 'DateTime',
// NOTE: `LatestDate` is a special type that is used for milestoning in store so its used in the body of function and lamdba but never should be exposed to users
// as such, if there is a day we want to have `LatestDate` in the graph but not exposed to the users
LATESTDATE = 'LatestDate',
}
export enum TYPICAL_MULTIPLICITY_TYPE {
ONE = 'one',
ZEROONE = 'zeroone',
ZEROMANY = 'zeromany',
ONEMANY = 'onemany',
ZERO = 'zero',
}
// NOTE: the list of auto-import are kept in m3.pure, this includes a more extensive list of packges
// which contain native functions, classes, etc.
export const AUTO_IMPORTS = [
// 'meta::pure::metamodel',
'meta::pure::metamodel::type',
// 'meta::pure::metamodel::type::generics',
// 'meta::pure::metamodel::relationship',
// 'meta::pure::metamodel::valuespecification',
// 'meta::pure::metamodel::multiplicity',
// 'meta::pure::metamodel::function',
// 'meta::pure::metamodel::function::property',
// 'meta::pure::metamodel::extension',
// 'meta::pure::metamodel::import',
// 'meta::pure::functions::date',
// 'meta::pure::functions::string',
// 'meta::pure::functions::collection',
// 'meta::pure::functions::meta',
// 'meta::pure::functions::constraints',
// 'meta::pure::functions::lang',
// 'meta::pure::functions::boolean',
// 'meta::pure::functions::tools',
// 'meta::pure::functions::io',
// 'meta::pure::functions::math',
// 'meta::pure::functions::asserts',
// 'meta::pure::functions::test',
// 'meta::pure::functions::multiplicity',
// 'meta::pure::router',
// 'meta::pure::service',
// 'meta::pure::tds',
// 'meta::pure::tools',
'meta::pure::profiles',
];
export enum PATH {
ANY = 'meta::pure::metamodel::type::Any',
// NOTE: we could have moved most of the paths from protocol classifier path here if it's not for the fact that
// Typescript does not allow to use computed value for enum.
// See https://github.com/microsoft/TypeScript/issues/27976
}
// TODO?: We should refactor this once we're refactoring this to a visitor
/* @MARKER: NEW ELEMENT TYPE SUPPORT --- consider adding new element type handler here whenever support for a new element type is added to the app */
export enum PROTOCOL_CLASSIFIER_PATH {
PROFILE = 'meta::pure::metamodel::extension::Profile',
ENUMERATION = 'meta::pure::metamodel::type::Enumeration',
MEASURE = 'meta::pure::metamodel::type::Measure',
// since we don't expose unit outside of measure, we probably don't need to reveal it
CLASS = 'meta::pure::metamodel::type::Class',
ASSOCIATION = 'meta::pure::metamodel::relationship::Association',
FUNCTION = 'meta::pure::metamodel::function::ConcreteFunctionDefinition',
MAPPING = 'meta::pure::mapping::Mapping',
DIAGRAM = 'meta::pure::metamodel::diagram::Diagram',
TEXT = 'meta::pure::metamodel::text::Text',
CONNECTION = 'meta::pure::runtime::PackageableConnection',
RUNTIME = 'meta::pure::runtime::PackageableRuntime',
FILE_GENERATION = 'meta::pure::generation::metamodel::GenerationConfiguration',
GENERATION_SPECIFICATION = 'meta::pure::generation::metamodel::GenerationSpecification',
SECTION_INDEX = 'meta::pure::metamodel::section::SectionIndex',
}
/**
* The main point of maintaining this enum is to keep lessen magic string in hash computation
* so that we are less error-prone in the process of defining hash.
*
* These tokens will be used in the definition of the hash as marker for the type of the strucure
* arguably some of these can be redundant since this information is encoded in the resulting hash
* code anyway, but sometimes when polymorphism manifests, such as when we have an array of structure
* which are sub-classes of an abstract stucture, hashing the marker is sometimes the only way to
* discern between instances of different sub-structures
*/
export enum HASH_STRUCTURE {
PACKAGE = 'PACKAGE',
PACKAGEABLE_ELEMENT = 'PACKAGEABLE_ELEMENT',
PACKAGEABLE_ELEMENT_POINTER = 'PACKAGEABLE_ELEMENT_POINTER',
// domain
PROFILE = 'PROFILE',
TAG_POINTER = 'TAG_POINTER',
STEREOTYPE_POINTER = 'STEREOTYPE_POINTER',
TAGGED_VALUE = 'TAGGED_VALUE',
ENUMERATION = 'ENUMERATION',
ENUM_VALUE = 'ENUM_VALUE',
CLASS = 'CLASS',
PROPERTY = 'PROPERTY',
PROPERTY_POINTER = 'PROPERTY_POINTER',
MULTIPLICITY = 'MULTIPLICITY',
CONSTRAINT = 'CONSTRAINT',
DERIVED_PROPERTY = 'DERIVED_PROPERTY',
ASSOCIATION = 'ASSOCIATION',
FUNCTION = 'FUNCTION',
MEASURE = 'MEASURE',
UNIT = 'UNIT',
// runtime
RUNTIME = 'RUNTIME',
PACKAGEABLE_RUNTIME = 'PACKAGEABLE_RUNTIME',
ENGINE_RUNTIME = 'ENGINE_RUNTIME',
LEGACY_RUNTIME = 'LEGACY_RUNTIME',
RUNTIME_POINTER = 'RUNTIME_POINTER',
STORE_CONNECTIONS = 'STORE_CONNECTIONS',
IDENTIFIED_CONNECTION = 'IDENTIFIED_CONNECTION',
// connection
CONNECTION = 'CONNECTION',
PACKAGEABLE_CONNECTION = 'PACKAGEABLE_CONNECTION',
CONNECTION_POINTER = 'CONNECTION_POINTER',
XML_MODEL_CONNECTION = 'XML_MODEL_CONNECTION',
JSON_MODEL_CONNECTION = 'JSON_MODEL_CONNECTION',
// store
STORE = 'STORE',
// mapping
MAPPING = 'MAPPING',
MAPPING_INCLUDE = 'MAPPING_INCLUDE',
ASSOCIATION_IMPLEMENTATION = 'ASSOCIATION_IMPLEMENTATION',
ENUMERATION_MAPPING = 'ENUMERATION_MAPPING',
ENUM_VALUE_MAPPING = 'ENUM_VALUE_MAPPING',
SET_IMPLEMENTATION = 'SET_IMPLEMENTATION',
OPERATION_SET_IMPLEMENTATION = 'OPERATION_SET_IMPLEMENTATION',
PURE_INSTANCE_SET_IMPLEMENTATION = 'PURE_INSTANCE_SET_IMPLEMENTATION',
PROPERTY_MAPPING = 'PROPERTY_MAPPING',
PURE_PROPERTY_MAPPING = 'PURE_PROPERTY_MAPPING',
MAPPING_TEST = 'MAPPING_TEST',
INPUT_DATA = 'INPUT_DATA',
OBJECT_INPUT_DATA = 'OBJECT_INPUT_DATA',
MAPPING_TEST_ASSERT = 'MAPPING_TEST_ASSERT',
EXPECTED_OUTPUT_MAPPING_TEST_ASSERT = 'EXPECTED_OUTPUT_MAPPING_TEST_ASSERT',
FILTER_MAPPING = 'FILTER_MAPPING',
COLUMN_MAPPING = 'COLUMN_MAPPING',
GROUP_BY_MAPPING = 'GROUP_BY_MAPPING',
// text
TEXT = 'TEXT',
// diagram
DIAGRAM = 'DIAGRAM',
CLASS_VIEW = 'CLASS_VIEW',
PROPERTY_VIEW = 'PROPERTY_VIEW',
ASSOCIATION_VIEW = 'ASSOCIATION_VIEW',
PROPERTY_HOLDER_VIEW = 'PROPERTY_HOLDER_VIEW',
GENERALIZATION_VIEW = 'GENERALIZATION_VIEW',
RELATIONSHIP_VIEW = 'RELATIONSHIP_VIEW',
POINT = 'POINT',
RECTANGLE = 'RECTANGLE',
POSITIONED_RECTANGLE = 'POSITIONED_RECTANGLE',
// file generation
FILE_GENERATION = 'FILE_GENERATION',
CONFIGURATION_PROPERTY = 'CONFIGURATION_PROPERTY',
// value specification
LAMBDA = 'LAMBDA',
VARIABLE = 'VARIABLE',
// generation specification
GENERATION_TREE = 'GENERATION_TREE',
GENERATION_TREE_NODE = 'GENERATION_TREE_NODE',
// SDLC
PROJECT_DEPENDENCY = 'PROJECT_DEPENDENCY',
PROJECT_CONFIGURATION = 'PROJECT_CONFIGURATION',
ARTIFACT_GENERATION = 'ARTIFACT_GENERATION',
// SECTION INDEX
SECTION_INDEX = 'SECTION_INDEX',
SECTION = 'SECTION',
IMPORT_AWARE_CODE_SECTION = 'IMPORT_AWARE_CODE_SECTION',
DEFAULT_CODE_SECTION = 'DEFAULT_CODE_SECTION'
}
| 38.617391 | 163 | 0.730128 |
b073ee80f9a37be5aa1459bd81c09496412acd3e | 82 | lua | Lua | _manifest.lua | krsvojte/premake-cuda | 2e4ad58f5f94b973e2dd0f745173ff44bc70d2cc | [
"BSD-3-Clause"
] | null | null | null | _manifest.lua | krsvojte/premake-cuda | 2e4ad58f5f94b973e2dd0f745173ff44bc70d2cc | [
"BSD-3-Clause"
] | 2 | 2017-10-18T13:17:28.000Z | 2018-01-25T04:08:31.000Z | _manifest.lua | TurkeyMan/premake-cuda | f140d92556a41c857b5db9ff3871eafce2d9ec67 | [
"BSD-3-Clause"
] | 2 | 2018-01-22T16:25:55.000Z | 2021-03-26T12:11:40.000Z | return {
"_preload.lua",
"cuda.lua",
-- "cuda_nvcc.lua",
"cuda_vstudio.lua",
}
| 11.714286 | 20 | 0.621951 |
1c23478fa1c06c3f3c44c375561382dc0e000df8 | 449 | dart | Dart | lib/src/apple_parameters.dart | AndrewBotalov80/flutter_pay | 53e38eabd0f85aa6a84e976e856d14f8babbb8b4 | [
"MIT"
] | null | null | null | lib/src/apple_parameters.dart | AndrewBotalov80/flutter_pay | 53e38eabd0f85aa6a84e976e856d14f8babbb8b4 | [
"MIT"
] | null | null | null | lib/src/apple_parameters.dart | AndrewBotalov80/flutter_pay | 53e38eabd0f85aa6a84e976e856d14f8babbb8b4 | [
"MIT"
] | null | null | null | part of flutter_pay;
class AppleParameters {
final String merchantIdentifier;
final List<MerchantCapability>? merchantCapabilities;
AppleParameters({
required this.merchantIdentifier,
this.merchantCapabilities,
});
Map<String, dynamic> toMap() {
return {
'merchantIdentifier': merchantIdentifier,
'merchantCapabilities':
merchantCapabilities?.map<String>((e) => e.getName).toList() ?? [],
};
}
}
| 22.45 | 77 | 0.688196 |
dc4693cb3b084e3b99bf8c0d1be705085a706ff2 | 1,606 | podspec | Ruby | data/train/ruby/dc4693cb3b084e3b99bf8c0d1be705085a706ff2MokiManageSDK.podspec | aliostad/deep-learning-lang-detection | d6b031f3ebc690cf2ffd0ae1b08ffa8fb3b38a62 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/ruby/dc4693cb3b084e3b99bf8c0d1be705085a706ff2MokiManageSDK.podspec | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/ruby/dc4693cb3b084e3b99bf8c0d1be705085a706ff2MokiManageSDK.podspec | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z |
Pod::Spec.new do |s|
s.name = "MokiManageSDK"
s.version = "1.0.0-rc1"
s.summary = "Integrate your application with MokiManage."
s.description = <<-DESC
Using this SDK your application can integrate with [MokiManage](http://MokiManage.com/).
This will help you monitor the applications environment like:
* location
* network connectivity
* battery charge
* memory usage
* etc.
This will also allow you to manage the settings of your application remotely.
DESC
s.homepage = "https://github.com/MokiMobility/MokiManageSDK-iOS"
s.license = {
:type => 'Commercial',
:text => <<-LICENSE
All text and design is copyright © 2013 MokiMobility
All rights reserved.
https://mokimobility.com/
LICENSE
}
s.author = { "MokiMobility" => "[email protected]" }
s.source = { :git => "https://github.com/MokiMobility/MokiManageSDK-iOS.git", :tag => "1.0.0-rc1" }
s.platform = :ios, '5.0'
s.source_files = '*.{h,m,mm,c,cpp}'
s.resources = "Buttons/*.png"
s.preserve_paths = "libMokiManage.a"
s.library = 'MokiManage'
s.frameworks = 'ExternalAccessory', 'CoreTelephony', 'CoreLocation', 'SystemConfiguration', 'Foundation', 'CoreGraphics'
s.requires_arc = true
s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/MokiManageSDK"' }
s.dependency 'AFNetworking', '~> 1.3.1'
end
| 35.688889 | 122 | 0.570984 |
72be9b838e68bc914fffeea865ea9c50bccb6dbf | 244 | cs | C# | Source/Cinder14.EchoSign/Models/Users/UsersInfo.cs | cinder14/echosign_sdk_csharp | 3e3c3a5e1e074e7ba88a8a742ff09591a92e794c | [
"MIT"
] | 1 | 2016-03-03T22:50:15.000Z | 2016-03-03T22:50:15.000Z | Source/Cinder14.EchoSign/Models/Users/UsersInfo.cs | cinder14/echosign_sdk_csharp | 3e3c3a5e1e074e7ba88a8a742ff09591a92e794c | [
"MIT"
] | 1 | 2017-03-17T00:44:10.000Z | 2017-03-17T00:44:10.000Z | Source/Cinder14.EchoSign/Models/Users/UsersInfo.cs | cinder14/echosign_sdk_csharp | 3e3c3a5e1e074e7ba88a8a742ff09591a92e794c | [
"MIT"
] | null | null | null | namespace Cinder14.EchoSign.Models
{
public class UsersInfo
{
/// <summary>
/// (UserInfo[]): The list of users in the account
/// </summary>
public virtual UserInfo[] userInfoList { get; set; }
}
} | 24.4 | 60 | 0.565574 |
d6fd670c308a59f5172b08944437ee5a8755adab | 7,676 | cpp | C++ | MultiThreaded Loader/main.cpp | AceofGrades/ImageLoader | a4b128c1e8a35d31c079b2063ad59965157bc716 | [
"Unlicense"
] | null | null | null | MultiThreaded Loader/main.cpp | AceofGrades/ImageLoader | a4b128c1e8a35d31c079b2063ad59965157bc716 | [
"Unlicense"
] | null | null | null | MultiThreaded Loader/main.cpp | AceofGrades/ImageLoader | a4b128c1e8a35d31c079b2063ad59965157bc716 | [
"Unlicense"
] | null | null | null | #include <Windows.h>
#include <vector>
#include <string>
#include <thread>
#include <mutex>
#include <chrono>
#include "resource.h"
#define WINDOW_CLASS_NAME L"MultiThreaded Loader Tool"
const unsigned int _kuiWINDOWWIDTH = 1200;
const unsigned int _kuiWINDOWHEIGHT = 1200;
#define MAX_FILES_TO_OPEN 50
#define MAX_CHARACTERS_IN_FILENAME 25
//Global Variables
std::vector<std::wstring> g_vecImageFileNames;
HINSTANCE g_hInstance;
bool g_bIsFileLoaded = false;
// Populates g_vecImageFileNames
bool ChooseImageFilesToLoad(HWND _hwnd)
{
OPENFILENAME ofn;
SecureZeroMemory(&ofn, sizeof(OPENFILENAME)); // Better to use than ZeroMemory
wchar_t wsFileNames[MAX_FILES_TO_OPEN * MAX_CHARACTERS_IN_FILENAME + MAX_PATH]; //The string to store all the filenames selected in one buffer togther with the complete path name.
wchar_t _wsPathName[MAX_PATH + 1];
wchar_t _wstempFile[MAX_PATH + MAX_CHARACTERS_IN_FILENAME]; //Assuming that the filename is not more than 20 characters
wchar_t _wsFileToOpen[MAX_PATH + MAX_CHARACTERS_IN_FILENAME];
ZeroMemory(wsFileNames, sizeof(wsFileNames));
ZeroMemory(_wsPathName, sizeof(_wsPathName));
ZeroMemory(_wstempFile, sizeof(_wstempFile));
//Fill out the fields of the structure
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = _hwnd;
ofn.lpstrFile = wsFileNames;
ofn.nMaxFile = MAX_FILES_TO_OPEN * 20 + MAX_PATH; //The size, in characters of the buffer pointed to by lpstrFile. The buffer must be atleast 256(MAX_PATH) characters long; otherwise GetOpenFileName and
//GetSaveFileName functions return False
// Set lpstrFile[0] to '\0' so that GetOpenFileName does not
// use the contents of wsFileNames to initialize itself.
ofn.lpstrFile[0] = '\0';
ofn.lpstrFilter = L"Bitmap Images(.bmp)\0*.bmp\0"; //Filter for bitmap images
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT;
//If the user makes a selection from the open dialog box, the API call returns a non-zero value
if (GetOpenFileName(&ofn) != 0) //user made a selection and pressed the OK button
{
//Extract the path name from the wide string - two ways of doing it
//First way: just work with wide char arrays
wcsncpy_s(_wsPathName, wsFileNames, ofn.nFileOffset);
int i = ofn.nFileOffset;
int j = 0;
while (true)
{
if (*(wsFileNames + i) == '\0')
{
_wstempFile[j] = *(wsFileNames + i);
wcscpy_s(_wsFileToOpen, _wsPathName);
wcscat_s(_wsFileToOpen, L"\\");
wcscat_s(_wsFileToOpen, _wstempFile);
g_vecImageFileNames.push_back(_wsFileToOpen);
j = 0;
}
else
{
_wstempFile[j] = *(wsFileNames + i);
j++;
}
if (*(wsFileNames + i) == '\0' && *(wsFileNames + i + 1) == '\0')
{
break;
}
else
{
i++;
}
}
g_bIsFileLoaded = true;
return true;
}
else // user pressed the cancel button or closed the dialog box or an error occured
{
return false;
}
}
std::mutex imgVectorLock;
std::vector<HBITMAP> g_vecLoadedImages;
// Load images into g_vecLoadedImages
void imgLoad(std::wstring filePath)
{
HBITMAP loadedImage = (HBITMAP)LoadImageW(NULL, filePath.c_str(), IMAGE_BITMAP, 100, 100, LR_LOADFROMFILE);
bool loadFailed = loadedImage == NULL;
if (loadFailed)
{
throw "Load failed.";
}
// Locks the write
imgVectorLock.lock();
g_vecLoadedImages.push_back(loadedImage);
imgVectorLock.unlock();
}
// Window shows what is happening
LRESULT CALLBACK WindowProc(HWND _hwnd, UINT _uiMsg, WPARAM _wparam, LPARAM _lparam)
{
PAINTSTRUCT ps;
HDC _hWindowDC;
//RECT rect;
switch (_uiMsg)
{
case WM_KEYDOWN:
{
switch (_wparam)
{
case VK_ESCAPE:
{
SendMessage(_hwnd, WM_CLOSE, 0, 0);
return(0);
}
break;
default:
break;
}
}
break;
case WM_PAINT: // Paint happens every time you render the window
{
_hWindowDC = BeginPaint(_hwnd, &ps);
//Do all our painting here
EndPaint(_hwnd, &ps);
return (0);
}
break;
case WM_COMMAND:
{
switch (LOWORD(_wparam))
{
case ID_FILE_LOADIMAGE:
{
if (ChooseImageFilesToLoad(_hwnd))
{
std::vector<std::thread> threadPool;
// Load the images
for (int imgFileNameIndex = 0; imgFileNameIndex < g_vecImageFileNames.size(); ++imgFileNameIndex)
{
std::wstring imgFileName = g_vecImageFileNames[imgFileNameIndex];
threadPool.push_back(std::thread(imgLoad, imgFileName));
}
// Waits for threads to complete. Then, images are loaded
for (int threadIndex = 0; threadIndex < threadPool.size(); ++threadIndex)
{
threadPool[threadIndex].join();
}
// All image file paths
for (int imgFileNameIndex = 0; imgFileNameIndex < g_vecImageFileNames.size(); ++imgFileNameIndex)
{
HBITMAP loadedImage = g_vecLoadedImages[imgFileNameIndex];
// Then, render it
HDC hdc = GetDC(_hwnd);
HBRUSH brush = CreatePatternBrush(loadedImage);
RECT rect;
rect.left = 0;
bool success = SetRect(&rect, 100 * imgFileNameIndex, 0, 100 * imgFileNameIndex + 100, 100);
int fillRectSuccess = FillRect(hdc, &rect, brush);
success = DeleteObject(brush);
int releaseDC = ReleaseDC(_hwnd, hdc);
}
}
else
{
MessageBox(_hwnd, L"No Image File selected", L"Error Message", MB_ICONWARNING);
}
return (0);
}
break;
case ID_EXIT:
{
SendMessage(_hwnd, WM_CLOSE, 0, 0);
return (0);
}
break;
default:
break;
}
}
break;
case WM_CLOSE:
{
PostQuitMessage(0);
}
break;
default:
break;
}
return (DefWindowProc(_hwnd, _uiMsg, _wparam, _lparam));
}
HWND CreateAndRegisterWindow(HINSTANCE _hInstance)
{
WNDCLASSEX winclass; // This will hold the class we create.
HWND hwnd; // Generic window handle.
// First fill in the window class structure.
winclass.cbSize = sizeof(WNDCLASSEX);
winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc = WindowProc;
winclass.cbClsExtra = 0;
winclass.cbWndExtra = 0;
winclass.hInstance = _hInstance;
winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
winclass.hbrBackground =
static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
winclass.lpszMenuName = NULL;
winclass.lpszClassName = WINDOW_CLASS_NAME;
winclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
// register the window class
if (!RegisterClassEx(&winclass))
{
return (0);
}
HMENU _hMenu = LoadMenu(_hInstance, MAKEINTRESOURCE(IDR_MENU1));
// create the window
hwnd = CreateWindowEx(NULL, // Extended style.
WINDOW_CLASS_NAME, // Class.
L"MultiThreaded Loader Tool", // Title.
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
10, 10, // Initial x,y.
_kuiWINDOWWIDTH, _kuiWINDOWHEIGHT, // Initial width, height.
NULL, // Handle to parent.
_hMenu, // Handle to menu.
_hInstance, // Instance of this application.
NULL); // Extra creation parameters.
return hwnd;
}
int WINAPI WinMain(HINSTANCE _hInstance,
HINSTANCE _hPrevInstance,
LPSTR _lpCmdLine,
int _nCmdShow)
{
MSG msg; //Generic Message
HWND _hwnd = CreateAndRegisterWindow(_hInstance);
if (!(_hwnd))
{
return (0);
}
// Enter main event loop
while (true)
{
// Test if there is a message in queue, if so get it.
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
// Test if this is a quit.
if (msg.message == WM_QUIT)
{
break;
}
// Translate any accelerator keys.
TranslateMessage(&msg);
// Send the message to the window proc.
DispatchMessage(&msg);
}
}
// Return to Windows like this...
return (static_cast<int>(msg.wParam));
} | 26.287671 | 205 | 0.690073 |
ef74066f70a4c50f77d9b2e2936fcf928343c03d | 1,656 | dart | Dart | lib/presentation/routes/route.gr.dart | Shadow60539/edualgo-app-demo | 9d60c3c2e37553b0373bb8452fde2e9c6bbba8bc | [
"MIT"
] | 1 | 2021-07-03T16:07:57.000Z | 2021-07-03T16:07:57.000Z | lib/presentation/routes/route.gr.dart | Shadow60539/edualgo-app-demo | 9d60c3c2e37553b0373bb8452fde2e9c6bbba8bc | [
"MIT"
] | null | null | null | lib/presentation/routes/route.gr.dart | Shadow60539/edualgo-app-demo | 9d60c3c2e37553b0373bb8452fde2e9c6bbba8bc | [
"MIT"
] | 1 | 2021-07-28T09:40:47.000Z | 2021-07-28T09:40:47.000Z | // GENERATED CODE - DO NOT MODIFY BY HAND
// **************************************************************************
// AutoRouteGenerator
// **************************************************************************
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:auto_route/auto_route.dart';
import 'package:edualgo_app_demo/presentation/pages/splash.dart';
import 'package:edualgo_app_demo/presentation/pages/first_screen.dart';
import 'package:edualgo_app_demo/presentation/pages/index_page.dart';
import 'package:edualgo_app_demo/dowload.dart';
class Router {
static const splashPage = '/';
static const firstPage = '/first-page';
static const indexPage = '/index-page';
static const downloadPage = '/download-page';
static final navigator = ExtendedNavigator();
static Route<dynamic> onGenerateRoute(RouteSettings settings) {
final args = settings.arguments;
switch (settings.name) {
case Router.splashPage:
return MaterialPageRoute<dynamic>(
builder: (_) => SplashPage(),
settings: settings,
);
case Router.firstPage:
return MaterialPageRoute<dynamic>(
builder: (_) => FirstPage(),
settings: settings,
);
case Router.indexPage:
return MaterialPageRoute<dynamic>(
builder: (_) => IndexPage(),
settings: settings,
);
case Router.downloadPage:
return MaterialPageRoute<dynamic>(
builder: (_) => DownloadPage(),
settings: settings,
);
default:
return unknownRoutePage(settings.name);
}
}
}
| 33.795918 | 77 | 0.606884 |
c689b3fb1c1c0a8f9c0c9eca7266286316f3657f | 9,826 | css | CSS | css/style.css | axlengblom/axelengblom | c9897c04eac6d49a3fddd7465f7b01afa19c24bd | [
"MIT"
] | null | null | null | css/style.css | axlengblom/axelengblom | c9897c04eac6d49a3fddd7465f7b01afa19c24bd | [
"MIT"
] | null | null | null | css/style.css | axlengblom/axelengblom | c9897c04eac6d49a3fddd7465f7b01afa19c24bd | [
"MIT"
] | null | null | null | .header{width:100%;margin:auto;background-color:#dbe7f6}.header__content{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:auto;padding:40px}.header__name,.header__title{margin:0 auto;padding:0 10px}.header__name{text-transform:uppercase;border-bottom:1px solid black}.header__title{font-family:'Open Sans Condensed'}.about,.skills,.projects{height:100%;width:100%;max-width:640px;padding:25px 0 0 0;margin:auto;background-color:#a5998f}.about__heading,.skills__heading,.projects__heading{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:5px auto;border-bottom:1px solid black}.about__list,.skills__list,.projects__list{list-style-type:none;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:auto}.about__list .about__item,.about__list .skills__item,.about__list .projects__item,.skills__list .about__item,.skills__list .skills__item,.skills__list .projects__item,.projects__list .about__item,.projects__list .skills__item,.projects__list .projects__item{margin:5px auto}.about__imgbox,.skills__imgbox,.projects__imgbox{width:100%;max-width:640px;margin:auto}.about__img,.skills__img,.projects__img{width:100%}.footer{width:100%;margin:auto;background-color:#dbe7f6;padding:25px 0}.footer__form{width:-webkit-max-content;width:-moz-max-content;width:max-content;margin:auto}.footer__inputname,.footer__inputemail{width:60%;max-width:300px;border:1px solid black;border-radius:4px;margin-bottom:5px}.footer__inputmsg{height:70px;width:100%;min-width:250px;max-width:400px;border:1px solid black;border-radius:4px}.footer__button{position:relative;left:100%;-webkit-transform:translateX(-100%);transform:translateX(-100%);border-radius:4px;padding:5px 10px}.adress__list{list-style-type:none;text-align:center}.adress__list .adress__item{margin:3px 0}.adress__list a{text-decoration:none;color:black;word-wrap:normal}.some{margin:25px auto 0 auto;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.some .some__link{color:black}.clickhere{display:none}.snowglobe{position:fixed;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.snowglobe #snow-one{-webkit-animation:snowfall1 linear 1.7s infinite;animation:snowfall1 linear 1.7s infinite}.snowglobe #snow-two{-webkit-animation:snowfall2 linear 1.4s infinite;animation:snowfall2 linear 1.4s infinite}.snowglobe #snow-three{-webkit-animation:snowfall3 linear 1s infinite;animation:snowfall3 linear 1s infinite}.snowglobe #snow-four{-webkit-animation:snowfall4 linear 1.4s infinite;animation:snowfall4 linear 1.4s infinite}.snowglobe #snow-five{-webkit-animation:snowfall5 linear 1.3s infinite;animation:snowfall5 linear 1.3s infinite}.snowglobe #snow-six{-webkit-animation:snowfall6 linear 0.8s infinite;animation:snowfall6 linear 0.8s infinite}.snowglobe #snow-seven{-webkit-animation:snowfall7 linear 1.6s infinite;animation:snowfall7 linear 1.6s infinite}.snowglobe #snow-eight{-webkit-animation:snowfall8 linear 0.6s infinite;animation:snowfall8 linear 0.6s infinite}@-webkit-keyframes snowfall1{from{-webkit-transform:translateY(-170px);transform:translateY(-170px)}to{-webkit-transform:translateY(250px);transform:translateY(250px)}}@keyframes snowfall1{from{-webkit-transform:translateY(-170px);transform:translateY(-170px)}to{-webkit-transform:translateY(250px);transform:translateY(250px)}}@-webkit-keyframes snowfall2{from{-webkit-transform:translateY(-280px);transform:translateY(-280px)}to{-webkit-transform:translateY(170px);transform:translateY(170px)}}@keyframes snowfall2{from{-webkit-transform:translateY(-280px);transform:translateY(-280px)}to{-webkit-transform:translateY(170px);transform:translateY(170px)}}@-webkit-keyframes snowfall3{from{-webkit-transform:translateY(-80px);transform:translateY(-80px)}to{-webkit-transform:translateY(150px);transform:translateY(150px)}}@keyframes snowfall3{from{-webkit-transform:translateY(-80px);transform:translateY(-80px)}to{-webkit-transform:translateY(150px);transform:translateY(150px)}}@-webkit-keyframes snowfall4{from{-webkit-transform:translateY(-270px);transform:translateY(-270px)}to{-webkit-transform:translateY(40px);transform:translateY(40px)}}@keyframes snowfall4{from{-webkit-transform:translateY(-270px);transform:translateY(-270px)}to{-webkit-transform:translateY(40px);transform:translateY(40px)}}@-webkit-keyframes snowfall5{from{-webkit-transform:translateY(-380px);transform:translateY(-380px)}to{-webkit-transform:translateY(-200px);transform:translateY(-200px)}}@keyframes snowfall5{from{-webkit-transform:translateY(-380px);transform:translateY(-380px)}to{-webkit-transform:translateY(-200px);transform:translateY(-200px)}}@-webkit-keyframes snowfall6{from{-webkit-transform:translateY(-270px);transform:translateY(-270px)}to{-webkit-transform:translateY(-180px);transform:translateY(-180px)}}@keyframes snowfall6{from{-webkit-transform:translateY(-270px);transform:translateY(-270px)}to{-webkit-transform:translateY(-180px);transform:translateY(-180px)}}@-webkit-keyframes snowfall7{from{-webkit-transform:translateY(-170px);transform:translateY(-170px)}to{-webkit-transform:translateY(200px);transform:translateY(200px)}}@keyframes snowfall7{from{-webkit-transform:translateY(-170px);transform:translateY(-170px)}to{-webkit-transform:translateY(200px);transform:translateY(200px)}}@-webkit-keyframes snowfall8{from{-webkit-transform:translateY(-30px);transform:translateY(-30px)}to{-webkit-transform:translateY(50px);transform:translateY(50px)}}@keyframes snowfall8{from{-webkit-transform:translateY(-30px);transform:translateY(-30px)}to{-webkit-transform:translateY(50px);transform:translateY(50px)}}@media screen and (min-width: 1024px){.clickhere{display:inline !important;position:absolute;top:3%;right:0%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.clickhere .clickhere__svg:hover{cursor:pointer}.clickhere .clickhere__svg:hover #Line5{-webkit-animation:line5 1s linear alternate infinite;animation:line5 1s linear alternate infinite;-webkit-transform-origin:center;transform-origin:center;transform-box:fill-box}.clickhere .clickhere__svg:hover #Line6{-webkit-animation:line6 1s linear alternate infinite;animation:line6 1s linear alternate infinite;-webkit-transform-origin:center;transform-origin:center;transform-box:fill-box}.clickhere .clickhere__svg:hover #Line7{-webkit-animation:line7 1s linear alternate infinite;animation:line7 1s linear alternate infinite;-webkit-transform-origin:center;transform-origin:center;transform-box:fill-box}.clickhere .clickhere__svg:hover #Line8{-webkit-animation:line8 1s linear alternate infinite;animation:line8 1s linear alternate infinite;-webkit-transform-origin:center;transform-origin:center;transform-box:fill-box}}@-webkit-keyframes line5{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}100%{-webkit-transform:rotateZ(-90deg) translateY(-28px);transform:rotateZ(-90deg) translateY(-28px)}}@keyframes line5{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}100%{-webkit-transform:rotateZ(-90deg) translateY(-28px);transform:rotateZ(-90deg) translateY(-28px)}}@-webkit-keyframes line6{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}100%{-webkit-transform:rotateZ(90deg) translateY(-28px);transform:rotateZ(90deg) translateY(-28px)}}@keyframes line6{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}100%{-webkit-transform:rotateZ(90deg) translateY(-28px);transform:rotateZ(90deg) translateY(-28px)}}@-webkit-keyframes line7{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}100%{-webkit-transform:rotateZ(90deg) translateX(-28px);transform:rotateZ(90deg) translateX(-28px)}}@keyframes line7{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}100%{-webkit-transform:rotateZ(90deg) translateX(-28px);transform:rotateZ(90deg) translateX(-28px)}}@-webkit-keyframes line8{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}100%{-webkit-transform:rotateZ(-90deg) translateX(-28px);transform:rotateZ(-90deg) translateX(-28px)}}@keyframes line8{0%{-webkit-transform:rotateZ(0deg);transform:rotateZ(0deg)}50%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}100%{-webkit-transform:rotateZ(-90deg) translateX(-28px);transform:rotateZ(-90deg) translateX(-28px)}}@media screen and (min-width: 1024px){.about,.skills,.projects{width:80%;max-width:1280px;margin:0 auto;background-color:#a5998f;padding:0}.about__section,.skills__section,.projects__section{display:-ms-grid;display:grid;-ms-grid-columns:50% 50%;grid-template-columns:50% 50%}.about__content,.skills__content,.projects__content{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.skills__content{-ms-grid-column:2;grid-column-start:2;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;grid-row-end:2}.skills__img{-ms-grid-column:1;grid-column-start:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;grid-row-end:2}.about__img,.skills__img,.projects__img{width:100%}.footer__container{width:80%;max-width:1280px;margin:auto;display:-ms-grid;display:grid;-ms-grid-columns:50% 50%;grid-template-columns:50% 50%}.footer__form{width:400px}.adress{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.some{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:10px auto}}*{margin:0;padding:0;font-family:'Quicksand'}body{background-color:#3f658d}
| 4,913 | 9,825 | 0.813963 |
4bdf6adfe5867e9fce8da99061f512beb70144b9 | 4,535 | c | C | 26_CProgNum/main.c | jaisuarez/C_NumberExercises | 755ca0619130dd771d64b1cfe503020cf30ffcb1 | [
"MIT"
] | null | null | null | 26_CProgNum/main.c | jaisuarez/C_NumberExercises | 755ca0619130dd771d64b1cfe503020cf30ffcb1 | [
"MIT"
] | null | null | null | 26_CProgNum/main.c | jaisuarez/C_NumberExercises | 755ca0619130dd771d64b1cfe503020cf30ffcb1 | [
"MIT"
] | null | null | null | # include <stdio.h>
# include <math.h>
// Verify if a given number is a prime number
static int isPrime(long int inputNumber);
// Verify if a given number is a circular prime number
static int isCircularPrime(long int inputNumber);
int main()
{
long int inputNumber;
printf("\n\nCheck whether a given number is a circular prime or not : \n");
// Request input number from the user
printf("Input a number : ");
scanf("%li", &inputNumber);
// Verify if the input number is a circular prime number
if (isCircularPrime(inputNumber))
{
printf("The given number is a circular prime number.\n");
}
else
{
printf("The given number is NOT a circular prime number.\n");
}
return 0;
}
static int isPrime(long int inputNumber)
{
int isPrime = 1;
long int factor = inputNumber - 1;
// Loop through all the possible factors less than the number
while (factor >= 2)
{
// If there is a factor other than 1 and the input number
// then it is not a prime number
if (inputNumber % factor == 0)
{
isPrime = 0;
}
// Go to the next factor
factor--;
}
return isPrime;
}
static int isCircularPrime(long int inputNumber)
{
int isCircularPrime = 1;
long int inputNumberCopy;
long int digitPosition;
long int digitPower;
long int digitPositionCtr;
long int totalNumberOfDigits;
long int originalIndexPosition;
long int rotatedDigit;
long int positionMultiplier;
long int digitAtPosition;
long int inputNumberDigitsFlipped[8];
long int inputNumberDigits[8];
long int cyclicRotationCounter;
// Make a copy of the input number
inputNumberCopy = inputNumber;
// Set the initial value of the input number's total number of digits
totalNumberOfDigits = 0;
// Save the individual digits of the input number to an array
while (inputNumberCopy > 0)
{
// Save the least significant digit of the input number
inputNumberDigits[totalNumberOfDigits] = inputNumberCopy % 10;
// Remove the least significant digit of the input number
inputNumberCopy = inputNumberCopy / 10;
// Increase digit count
totalNumberOfDigits++;
}
digitPosition = 0;
// Flip the positions of the extracted digits by saving it to a new array
for (originalIndexPosition = totalNumberOfDigits - 1; originalIndexPosition >= 0; originalIndexPosition--)
{
inputNumberDigitsFlipped[digitPosition] = inputNumberDigits[originalIndexPosition];
digitPosition++;
}
// Get a copy of the total number of digits of the input number
cyclicRotationCounter = totalNumberOfDigits;
// Loop until all the digits in the input number has completed all
// the possible cyclic rotation of the input number
while (cyclicRotationCounter > 0)
{
// Get the total number of digits in the array
digitPosition = cyclicRotationCounter - 1;
// The power that 10 should be raised to.
// This will be used to put the individual digits
// to its place in the cycled input number
digitPower = totalNumberOfDigits - 1;
// The counter that will go through all the digits
// saved in the position
digitPositionCtr = 0;
// The total number of rotated digits combination
rotatedDigit = 0;
while (digitPositionCtr < totalNumberOfDigits)
{
// Calculate position multiplier for the digit
positionMultiplier = pow(10, digitPower);
// Set the saved digit to the position
digitAtPosition = positionMultiplier * inputNumberDigitsFlipped[digitPosition % totalNumberOfDigits];
// Go to the next positioned digit
digitPosition++;
// Decrease the power value to position the digit to the next position
digitPower--;
// Count the digits that were processed
digitPositionCtr++;
// Add the calculated digit to the cumulative sum to get the new digit
rotatedDigit = rotatedDigit + digitAtPosition;
}
// Decrease the counter that determines the total
// cycle rotated value to evaluate
cyclicRotationCounter--;
// Verify if the rotated digit is a prime number
if (!isPrime(rotatedDigit))
{
isCircularPrime = 0;
}
}
return isCircularPrime;
} | 29.448052 | 113 | 0.649835 |
bbeca411c7daf34c02ee18bc6d4017dbdbe89677 | 651 | rb | Ruby | lib/puppet/type/cfsystem_secure_path.rb | codingfuture/puppet-cfsystem | 609819a81010f6c12734cf6ca169dc90f0ba3052 | [
"Apache-2.0"
] | null | null | null | lib/puppet/type/cfsystem_secure_path.rb | codingfuture/puppet-cfsystem | 609819a81010f6c12734cf6ca169dc90f0ba3052 | [
"Apache-2.0"
] | null | null | null | lib/puppet/type/cfsystem_secure_path.rb | codingfuture/puppet-cfsystem | 609819a81010f6c12734cf6ca169dc90f0ba3052 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016-2019 (c) Andrey Galkin
#
Puppet::Type.newtype(:cfsystem_secure_path) do
desc "Helper for sudo secure_path limitation"
autorequire(:cfsystem_flush_config) do
['begin']
end
autonotify(:cfsystem_flush_config) do
['commit']
end
ensurable do
defaultvalues
defaultto :absent
end
newparam(:name) do
desc "Named secure path"
isnamevar
end
newproperty(:path, :array_matching => :all) do
desc "Section name"
isrequired
validate do |value|
value.is_a? String and !value.empty?
end
end
end
| 19.147059 | 50 | 0.597542 |
57f9e9b18dc7d2a03231528e48ee2a9360ed641f | 2,144 | php | PHP | console/migrations/m181224_081931_create_table_shop_orders.php | kalnynsh/dshop_demo | 8d0280969b99c89d727ec816404ec56a3bfb88c0 | [
"BSD-3-Clause"
] | null | null | null | console/migrations/m181224_081931_create_table_shop_orders.php | kalnynsh/dshop_demo | 8d0280969b99c89d727ec816404ec56a3bfb88c0 | [
"BSD-3-Clause"
] | null | null | null | console/migrations/m181224_081931_create_table_shop_orders.php | kalnynsh/dshop_demo | 8d0280969b99c89d727ec816404ec56a3bfb88c0 | [
"BSD-3-Clause"
] | null | null | null | <?php
use yii\db\Migration;
/**
* Class m181224_081931_create_table_shop_orders
*/
class m181224_081931_create_table_shop_orders extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
$this->createTable('{{%shop_orders}}', [
'id' => $this->primaryKey(),
'created_at' => $this->integer()->notNull(),
'user_id' => $this->integer()->notNull(),
'delivery_id' => $this->integer(),
'delivery_name' => $this->string()->notNull(),
'delivery_cost' => $this->integer()->notNull(),
'payment_method' => $this->string(),
'cost' => $this->integer()->notNull(),
'note' => $this->text(),
'current_status' => $this->integer()->notNull(),
'cancel_reason' => $this->text(),
'statuses_json' => $this->text()->notNull(),
'customer_name' => $this->string(),
'customer_phone' => $this->string(),
'delivery_index' => $this->string(),
'delivery_address' => $this->text(),
], $tableOptions);
$this->createIndex(
'{{%idx_shop_orders__user_id}}',
'{{%shop_orders}}',
'user_id'
);
$this->createIndex(
'{{%idx_shop_orders__delivery_id}}',
'{{%shop_orders}}',
'delivery_id'
);
$this->addForeignKey(
'{{%fk_shop_orders__user_id}}',
'{{%shop_orders}}',
'user_id',
'{{%users}}',
'id',
'CASCADE'
);
$this->addForeignKey(
'{{%fk_shop_orders__delivery_id}}',
'{{%shop_orders}}',
'delivery_id',
'{{%shop_deliveries}}',
'id',
'SET NULL'
);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%shop_orders}}');
}
}
| 27.139241 | 87 | 0.47528 |
e7847476588ec99c4d94cb49bfc371ff49c0dd22 | 81 | css | CSS | bitrix/modules/intranet/install/templates/bitrix24/themes/light/beach/style.min.css | BuildingBridge/biznet | 0e9e864be99e01bd35f4321a04736866937897b0 | [
"Unlicense"
] | 1 | 2021-08-22T19:39:29.000Z | 2021-08-22T19:39:29.000Z | local/templates/bitrix24/themes/light/beach/style.min.css | PavelcCHernyshevME/bitrix24 | f3518c0071cbc1ecb25e9952150e303b4285e3ce | [
"Apache-2.0"
] | null | null | null | local/templates/bitrix24/themes/light/beach/style.min.css | PavelcCHernyshevME/bitrix24 | f3518c0071cbc1ecb25e9952150e303b4285e3ce | [
"Apache-2.0"
] | null | null | null | body{background:#294e6a url(beach.jpg) fixed 0 0 no-repeat;background-size:cover} | 81 | 81 | 0.802469 |
8d8175c7aad15e5911c1ce7684c54606b2d7f8af | 2,345 | js | JavaScript | assets/dist/js/app/soal/detail.js | sugik0806/bimbelcpnsonline | fd15013e869458eb786c1af903cd2f2ae08d2140 | [
"MIT"
] | null | null | null | assets/dist/js/app/soal/detail.js | sugik0806/bimbelcpnsonline | fd15013e869458eb786c1af903cd2f2ae08d2140 | [
"MIT"
] | null | null | null | assets/dist/js/app/soal/detail.js | sugik0806/bimbelcpnsonline | fd15013e869458eb786c1af903cd2f2ae08d2140 | [
"MIT"
] | 1 | 2021-02-25T14:15:03.000Z | 2021-02-25T14:15:03.000Z | $(document).ready(function () {
ajaxcsrf();
load_soal();
});
function next(obj) {
console.info(obj + 1);
var no = obj + 1;
window.location.href = base_url+'soal/detail/'+ no;
}
function back(obj) {
var no = obj - 1;
window.location.href = base_url+'soal/detail/'+ no;
}
function go(obj) {
var no = obj;
window.location.href = base_url+'soal/detail/'+ no;
}
function load_soal() {
$.getJSON(base_url+'soal/getCountSoalAll/', function (data) {
var html = '';
var klas = 'btn-default';
var gambar = '';
var total = Number(data.length);
var max = [];
var disableawal = false;
var disableakhir = false;
$("#totalsoal").html(data.length);
for (var i = 0; i < data.length; i++) {
var hashes = window.location.pathname;
var res = hashes.replace("/soal/detail/", "");
console.info(res);
console.info(hashes);
console.info(window.location);
if (data[i].file != "") {
gambar = '*';
}else{
gambar = "";
}
if (res == data[i].id_soal) {
klas = 'btn-success';
} else {
klas = 'btn-default';
}
// max += data[i].id_soal + ',';
max.push(data[i].id_soal);
// push.data[i].id_soal()
html += '<a class="btn '+klas+' " style="width:50px; height:30px;" onclick="return go('+data[i].id_soal+');">'+data[i].id_soal+' <i class=""></i> '+gambar+'</a>';
$("#navigasi").html(html);
}
var maximal = Math.max.apply(Math, max);
var minimal = Math.min.apply(Math, max);
if (minimal == Number(res)) {
//sudah awal
disableawal = true;
console.info('sudah awal');
document.getElementById("sebelumnya").style.visibility = "hidden";
}else if (maximal == Number(res)) {
//sudah akhir
disableakhir = true;
console.info('sudah akhir');
document.getElementById("selanjutnya").style.visibility = "hidden";
}else{
disableawal = false;
disableakhir = false;
}
});
}
| 25.48913 | 174 | 0.48145 |
d541291efbb8cd117aeaad5f13746514ea527a21 | 46,781 | asm | Assembly | cat.asm | lzckira/CS153-lab3 | d7c535fd189fa3444372c1fa639b19c4dca73908 | [
"MIT-0"
] | null | null | null | cat.asm | lzckira/CS153-lab3 | d7c535fd189fa3444372c1fa639b19c4dca73908 | [
"MIT-0"
] | null | null | null | cat.asm | lzckira/CS153-lab3 | d7c535fd189fa3444372c1fa639b19c4dca73908 | [
"MIT-0"
] | null | null | null |
_cat: file format elf32-i386
Disassembly of section .text:
00001000 <main>:
}
}
int
main(int argc, char *argv[])
{
1000: 55 push %ebp
1001: 89 e5 mov %esp,%ebp
1003: 57 push %edi
1004: 56 push %esi
int fd, i;
if(argc <= 1){
1005: be 01 00 00 00 mov $0x1,%esi
{
100a: 53 push %ebx
100b: 83 e4 f0 and $0xfffffff0,%esp
100e: 83 ec 10 sub $0x10,%esp
1011: 8b 45 0c mov 0xc(%ebp),%eax
if(argc <= 1){
1014: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
1018: 8d 58 04 lea 0x4(%eax),%ebx
101b: 7e 5a jle 1077 <main+0x77>
101d: 8d 76 00 lea 0x0(%esi),%esi
cat(0);
exit();
}
for(i = 1; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
1020: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1027: 00
1028: 8b 03 mov (%ebx),%eax
102a: 89 04 24 mov %eax,(%esp)
102d: e8 50 03 00 00 call 1382 <open>
1032: 85 c0 test %eax,%eax
1034: 89 c7 mov %eax,%edi
1036: 78 20 js 1058 <main+0x58>
printf(1, "cat: cannot open %s\n", argv[i]);
exit();
}
cat(fd);
1038: 89 04 24 mov %eax,(%esp)
for(i = 1; i < argc; i++){
103b: 83 c6 01 add $0x1,%esi
103e: 83 c3 04 add $0x4,%ebx
cat(fd);
1041: e8 4a 00 00 00 call 1090 <cat>
close(fd);
1046: 89 3c 24 mov %edi,(%esp)
1049: e8 1c 03 00 00 call 136a <close>
for(i = 1; i < argc; i++){
104e: 3b 75 08 cmp 0x8(%ebp),%esi
1051: 75 cd jne 1020 <main+0x20>
}
exit();
1053: e8 ea 02 00 00 call 1342 <exit>
printf(1, "cat: cannot open %s\n", argv[i]);
1058: 8b 03 mov (%ebx),%eax
105a: c7 44 24 04 64 18 00 movl $0x1864,0x4(%esp)
1061: 00
1062: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1069: 89 44 24 08 mov %eax,0x8(%esp)
106d: e8 2e 04 00 00 call 14a0 <printf>
exit();
1072: e8 cb 02 00 00 call 1342 <exit>
cat(0);
1077: c7 04 24 00 00 00 00 movl $0x0,(%esp)
107e: e8 0d 00 00 00 call 1090 <cat>
exit();
1083: e8 ba 02 00 00 call 1342 <exit>
1088: 66 90 xchg %ax,%ax
108a: 66 90 xchg %ax,%ax
108c: 66 90 xchg %ax,%ax
108e: 66 90 xchg %ax,%ax
00001090 <cat>:
{
1090: 55 push %ebp
1091: 89 e5 mov %esp,%ebp
1093: 56 push %esi
1094: 53 push %ebx
1095: 83 ec 10 sub $0x10,%esp
1098: 8b 75 08 mov 0x8(%ebp),%esi
while((n = read(fd, buf, sizeof(buf))) > 0) {
109b: eb 1f jmp 10bc <cat+0x2c>
109d: 8d 76 00 lea 0x0(%esi),%esi
if (write(1, buf, n) != n) {
10a0: 89 5c 24 08 mov %ebx,0x8(%esp)
10a4: c7 44 24 04 a0 1b 00 movl $0x1ba0,0x4(%esp)
10ab: 00
10ac: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10b3: e8 aa 02 00 00 call 1362 <write>
10b8: 39 d8 cmp %ebx,%eax
10ba: 75 28 jne 10e4 <cat+0x54>
while((n = read(fd, buf, sizeof(buf))) > 0) {
10bc: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
10c3: 00
10c4: c7 44 24 04 a0 1b 00 movl $0x1ba0,0x4(%esp)
10cb: 00
10cc: 89 34 24 mov %esi,(%esp)
10cf: e8 86 02 00 00 call 135a <read>
10d4: 83 f8 00 cmp $0x0,%eax
10d7: 89 c3 mov %eax,%ebx
10d9: 7f c5 jg 10a0 <cat+0x10>
if(n < 0){
10db: 75 20 jne 10fd <cat+0x6d>
}
10dd: 83 c4 10 add $0x10,%esp
10e0: 5b pop %ebx
10e1: 5e pop %esi
10e2: 5d pop %ebp
10e3: c3 ret
printf(1, "cat: write error\n");
10e4: c7 44 24 04 41 18 00 movl $0x1841,0x4(%esp)
10eb: 00
10ec: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10f3: e8 a8 03 00 00 call 14a0 <printf>
exit();
10f8: e8 45 02 00 00 call 1342 <exit>
printf(1, "cat: read error\n");
10fd: c7 44 24 04 53 18 00 movl $0x1853,0x4(%esp)
1104: 00
1105: c7 04 24 01 00 00 00 movl $0x1,(%esp)
110c: e8 8f 03 00 00 call 14a0 <printf>
exit();
1111: e8 2c 02 00 00 call 1342 <exit>
1116: 66 90 xchg %ax,%ax
1118: 66 90 xchg %ax,%ax
111a: 66 90 xchg %ax,%ax
111c: 66 90 xchg %ax,%ax
111e: 66 90 xchg %ax,%ax
00001120 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
1120: 55 push %ebp
1121: 89 e5 mov %esp,%ebp
1123: 8b 45 08 mov 0x8(%ebp),%eax
1126: 8b 4d 0c mov 0xc(%ebp),%ecx
1129: 53 push %ebx
char *os;
os = s;
while((*s++ = *t++) != 0)
112a: 89 c2 mov %eax,%edx
112c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1130: 83 c1 01 add $0x1,%ecx
1133: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
1137: 83 c2 01 add $0x1,%edx
113a: 84 db test %bl,%bl
113c: 88 5a ff mov %bl,-0x1(%edx)
113f: 75 ef jne 1130 <strcpy+0x10>
;
return os;
}
1141: 5b pop %ebx
1142: 5d pop %ebp
1143: c3 ret
1144: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
114a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00001150 <strcmp>:
int
strcmp(const char *p, const char *q)
{
1150: 55 push %ebp
1151: 89 e5 mov %esp,%ebp
1153: 8b 55 08 mov 0x8(%ebp),%edx
1156: 53 push %ebx
1157: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
115a: 0f b6 02 movzbl (%edx),%eax
115d: 84 c0 test %al,%al
115f: 74 2d je 118e <strcmp+0x3e>
1161: 0f b6 19 movzbl (%ecx),%ebx
1164: 38 d8 cmp %bl,%al
1166: 74 0e je 1176 <strcmp+0x26>
1168: eb 2b jmp 1195 <strcmp+0x45>
116a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1170: 38 c8 cmp %cl,%al
1172: 75 15 jne 1189 <strcmp+0x39>
p++, q++;
1174: 89 d9 mov %ebx,%ecx
1176: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
1179: 0f b6 02 movzbl (%edx),%eax
p++, q++;
117c: 8d 59 01 lea 0x1(%ecx),%ebx
while(*p && *p == *q)
117f: 0f b6 49 01 movzbl 0x1(%ecx),%ecx
1183: 84 c0 test %al,%al
1185: 75 e9 jne 1170 <strcmp+0x20>
1187: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
1189: 29 c8 sub %ecx,%eax
}
118b: 5b pop %ebx
118c: 5d pop %ebp
118d: c3 ret
118e: 0f b6 09 movzbl (%ecx),%ecx
while(*p && *p == *q)
1191: 31 c0 xor %eax,%eax
1193: eb f4 jmp 1189 <strcmp+0x39>
1195: 0f b6 cb movzbl %bl,%ecx
1198: eb ef jmp 1189 <strcmp+0x39>
119a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
000011a0 <strlen>:
uint
strlen(char *s)
{
11a0: 55 push %ebp
11a1: 89 e5 mov %esp,%ebp
11a3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
11a6: 80 39 00 cmpb $0x0,(%ecx)
11a9: 74 12 je 11bd <strlen+0x1d>
11ab: 31 d2 xor %edx,%edx
11ad: 8d 76 00 lea 0x0(%esi),%esi
11b0: 83 c2 01 add $0x1,%edx
11b3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
11b7: 89 d0 mov %edx,%eax
11b9: 75 f5 jne 11b0 <strlen+0x10>
;
return n;
}
11bb: 5d pop %ebp
11bc: c3 ret
for(n = 0; s[n]; n++)
11bd: 31 c0 xor %eax,%eax
}
11bf: 5d pop %ebp
11c0: c3 ret
11c1: eb 0d jmp 11d0 <memset>
11c3: 90 nop
11c4: 90 nop
11c5: 90 nop
11c6: 90 nop
11c7: 90 nop
11c8: 90 nop
11c9: 90 nop
11ca: 90 nop
11cb: 90 nop
11cc: 90 nop
11cd: 90 nop
11ce: 90 nop
11cf: 90 nop
000011d0 <memset>:
void*
memset(void *dst, int c, uint n)
{
11d0: 55 push %ebp
11d1: 89 e5 mov %esp,%ebp
11d3: 8b 55 08 mov 0x8(%ebp),%edx
11d6: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
11d7: 8b 4d 10 mov 0x10(%ebp),%ecx
11da: 8b 45 0c mov 0xc(%ebp),%eax
11dd: 89 d7 mov %edx,%edi
11df: fc cld
11e0: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
11e2: 89 d0 mov %edx,%eax
11e4: 5f pop %edi
11e5: 5d pop %ebp
11e6: c3 ret
11e7: 89 f6 mov %esi,%esi
11e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000011f0 <strchr>:
char*
strchr(const char *s, char c)
{
11f0: 55 push %ebp
11f1: 89 e5 mov %esp,%ebp
11f3: 8b 45 08 mov 0x8(%ebp),%eax
11f6: 53 push %ebx
11f7: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
11fa: 0f b6 18 movzbl (%eax),%ebx
11fd: 84 db test %bl,%bl
11ff: 74 1d je 121e <strchr+0x2e>
if(*s == c)
1201: 38 d3 cmp %dl,%bl
1203: 89 d1 mov %edx,%ecx
1205: 75 0d jne 1214 <strchr+0x24>
1207: eb 17 jmp 1220 <strchr+0x30>
1209: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1210: 38 ca cmp %cl,%dl
1212: 74 0c je 1220 <strchr+0x30>
for(; *s; s++)
1214: 83 c0 01 add $0x1,%eax
1217: 0f b6 10 movzbl (%eax),%edx
121a: 84 d2 test %dl,%dl
121c: 75 f2 jne 1210 <strchr+0x20>
return (char*)s;
return 0;
121e: 31 c0 xor %eax,%eax
}
1220: 5b pop %ebx
1221: 5d pop %ebp
1222: c3 ret
1223: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00001230 <gets>:
char*
gets(char *buf, int max)
{
1230: 55 push %ebp
1231: 89 e5 mov %esp,%ebp
1233: 57 push %edi
1234: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
1235: 31 f6 xor %esi,%esi
{
1237: 53 push %ebx
1238: 83 ec 2c sub $0x2c,%esp
cc = read(0, &c, 1);
123b: 8d 7d e7 lea -0x19(%ebp),%edi
for(i=0; i+1 < max; ){
123e: eb 31 jmp 1271 <gets+0x41>
cc = read(0, &c, 1);
1240: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1247: 00
1248: 89 7c 24 04 mov %edi,0x4(%esp)
124c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1253: e8 02 01 00 00 call 135a <read>
if(cc < 1)
1258: 85 c0 test %eax,%eax
125a: 7e 1d jle 1279 <gets+0x49>
break;
buf[i++] = c;
125c: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
for(i=0; i+1 < max; ){
1260: 89 de mov %ebx,%esi
buf[i++] = c;
1262: 8b 55 08 mov 0x8(%ebp),%edx
if(c == '\n' || c == '\r')
1265: 3c 0d cmp $0xd,%al
buf[i++] = c;
1267: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
126b: 74 0c je 1279 <gets+0x49>
126d: 3c 0a cmp $0xa,%al
126f: 74 08 je 1279 <gets+0x49>
for(i=0; i+1 < max; ){
1271: 8d 5e 01 lea 0x1(%esi),%ebx
1274: 3b 5d 0c cmp 0xc(%ebp),%ebx
1277: 7c c7 jl 1240 <gets+0x10>
break;
}
buf[i] = '\0';
1279: 8b 45 08 mov 0x8(%ebp),%eax
127c: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
1280: 83 c4 2c add $0x2c,%esp
1283: 5b pop %ebx
1284: 5e pop %esi
1285: 5f pop %edi
1286: 5d pop %ebp
1287: c3 ret
1288: 90 nop
1289: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00001290 <stat>:
int
stat(char *n, struct stat *st)
{
1290: 55 push %ebp
1291: 89 e5 mov %esp,%ebp
1293: 56 push %esi
1294: 53 push %ebx
1295: 83 ec 10 sub $0x10,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1298: 8b 45 08 mov 0x8(%ebp),%eax
129b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
12a2: 00
12a3: 89 04 24 mov %eax,(%esp)
12a6: e8 d7 00 00 00 call 1382 <open>
if(fd < 0)
12ab: 85 c0 test %eax,%eax
fd = open(n, O_RDONLY);
12ad: 89 c3 mov %eax,%ebx
if(fd < 0)
12af: 78 27 js 12d8 <stat+0x48>
return -1;
r = fstat(fd, st);
12b1: 8b 45 0c mov 0xc(%ebp),%eax
12b4: 89 1c 24 mov %ebx,(%esp)
12b7: 89 44 24 04 mov %eax,0x4(%esp)
12bb: e8 da 00 00 00 call 139a <fstat>
close(fd);
12c0: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
12c3: 89 c6 mov %eax,%esi
close(fd);
12c5: e8 a0 00 00 00 call 136a <close>
return r;
12ca: 89 f0 mov %esi,%eax
}
12cc: 83 c4 10 add $0x10,%esp
12cf: 5b pop %ebx
12d0: 5e pop %esi
12d1: 5d pop %ebp
12d2: c3 ret
12d3: 90 nop
12d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
12d8: b8 ff ff ff ff mov $0xffffffff,%eax
12dd: eb ed jmp 12cc <stat+0x3c>
12df: 90 nop
000012e0 <atoi>:
int
atoi(const char *s)
{
12e0: 55 push %ebp
12e1: 89 e5 mov %esp,%ebp
12e3: 8b 4d 08 mov 0x8(%ebp),%ecx
12e6: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
12e7: 0f be 11 movsbl (%ecx),%edx
12ea: 8d 42 d0 lea -0x30(%edx),%eax
12ed: 3c 09 cmp $0x9,%al
n = 0;
12ef: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
12f4: 77 17 ja 130d <atoi+0x2d>
12f6: 66 90 xchg %ax,%ax
n = n*10 + *s++ - '0';
12f8: 83 c1 01 add $0x1,%ecx
12fb: 8d 04 80 lea (%eax,%eax,4),%eax
12fe: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
1302: 0f be 11 movsbl (%ecx),%edx
1305: 8d 5a d0 lea -0x30(%edx),%ebx
1308: 80 fb 09 cmp $0x9,%bl
130b: 76 eb jbe 12f8 <atoi+0x18>
return n;
}
130d: 5b pop %ebx
130e: 5d pop %ebp
130f: c3 ret
00001310 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
1310: 55 push %ebp
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
1311: 31 d2 xor %edx,%edx
{
1313: 89 e5 mov %esp,%ebp
1315: 56 push %esi
1316: 8b 45 08 mov 0x8(%ebp),%eax
1319: 53 push %ebx
131a: 8b 5d 10 mov 0x10(%ebp),%ebx
131d: 8b 75 0c mov 0xc(%ebp),%esi
while(n-- > 0)
1320: 85 db test %ebx,%ebx
1322: 7e 12 jle 1336 <memmove+0x26>
1324: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
1328: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
132c: 88 0c 10 mov %cl,(%eax,%edx,1)
132f: 83 c2 01 add $0x1,%edx
while(n-- > 0)
1332: 39 da cmp %ebx,%edx
1334: 75 f2 jne 1328 <memmove+0x18>
return vdst;
}
1336: 5b pop %ebx
1337: 5e pop %esi
1338: 5d pop %ebp
1339: c3 ret
0000133a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
133a: b8 01 00 00 00 mov $0x1,%eax
133f: cd 40 int $0x40
1341: c3 ret
00001342 <exit>:
SYSCALL(exit)
1342: b8 02 00 00 00 mov $0x2,%eax
1347: cd 40 int $0x40
1349: c3 ret
0000134a <wait>:
SYSCALL(wait)
134a: b8 03 00 00 00 mov $0x3,%eax
134f: cd 40 int $0x40
1351: c3 ret
00001352 <pipe>:
SYSCALL(pipe)
1352: b8 04 00 00 00 mov $0x4,%eax
1357: cd 40 int $0x40
1359: c3 ret
0000135a <read>:
SYSCALL(read)
135a: b8 05 00 00 00 mov $0x5,%eax
135f: cd 40 int $0x40
1361: c3 ret
00001362 <write>:
SYSCALL(write)
1362: b8 10 00 00 00 mov $0x10,%eax
1367: cd 40 int $0x40
1369: c3 ret
0000136a <close>:
SYSCALL(close)
136a: b8 15 00 00 00 mov $0x15,%eax
136f: cd 40 int $0x40
1371: c3 ret
00001372 <kill>:
SYSCALL(kill)
1372: b8 06 00 00 00 mov $0x6,%eax
1377: cd 40 int $0x40
1379: c3 ret
0000137a <exec>:
SYSCALL(exec)
137a: b8 07 00 00 00 mov $0x7,%eax
137f: cd 40 int $0x40
1381: c3 ret
00001382 <open>:
SYSCALL(open)
1382: b8 0f 00 00 00 mov $0xf,%eax
1387: cd 40 int $0x40
1389: c3 ret
0000138a <mknod>:
SYSCALL(mknod)
138a: b8 11 00 00 00 mov $0x11,%eax
138f: cd 40 int $0x40
1391: c3 ret
00001392 <unlink>:
SYSCALL(unlink)
1392: b8 12 00 00 00 mov $0x12,%eax
1397: cd 40 int $0x40
1399: c3 ret
0000139a <fstat>:
SYSCALL(fstat)
139a: b8 08 00 00 00 mov $0x8,%eax
139f: cd 40 int $0x40
13a1: c3 ret
000013a2 <link>:
SYSCALL(link)
13a2: b8 13 00 00 00 mov $0x13,%eax
13a7: cd 40 int $0x40
13a9: c3 ret
000013aa <mkdir>:
SYSCALL(mkdir)
13aa: b8 14 00 00 00 mov $0x14,%eax
13af: cd 40 int $0x40
13b1: c3 ret
000013b2 <chdir>:
SYSCALL(chdir)
13b2: b8 09 00 00 00 mov $0x9,%eax
13b7: cd 40 int $0x40
13b9: c3 ret
000013ba <dup>:
SYSCALL(dup)
13ba: b8 0a 00 00 00 mov $0xa,%eax
13bf: cd 40 int $0x40
13c1: c3 ret
000013c2 <getpid>:
SYSCALL(getpid)
13c2: b8 0b 00 00 00 mov $0xb,%eax
13c7: cd 40 int $0x40
13c9: c3 ret
000013ca <sbrk>:
SYSCALL(sbrk)
13ca: b8 0c 00 00 00 mov $0xc,%eax
13cf: cd 40 int $0x40
13d1: c3 ret
000013d2 <sleep>:
SYSCALL(sleep)
13d2: b8 0d 00 00 00 mov $0xd,%eax
13d7: cd 40 int $0x40
13d9: c3 ret
000013da <uptime>:
SYSCALL(uptime)
13da: b8 0e 00 00 00 mov $0xe,%eax
13df: cd 40 int $0x40
13e1: c3 ret
000013e2 <shm_open>:
SYSCALL(shm_open)
13e2: b8 16 00 00 00 mov $0x16,%eax
13e7: cd 40 int $0x40
13e9: c3 ret
000013ea <shm_close>:
SYSCALL(shm_close)
13ea: b8 17 00 00 00 mov $0x17,%eax
13ef: cd 40 int $0x40
13f1: c3 ret
13f2: 66 90 xchg %ax,%ax
13f4: 66 90 xchg %ax,%ax
13f6: 66 90 xchg %ax,%ax
13f8: 66 90 xchg %ax,%ax
13fa: 66 90 xchg %ax,%ax
13fc: 66 90 xchg %ax,%ax
13fe: 66 90 xchg %ax,%ax
00001400 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
1400: 55 push %ebp
1401: 89 e5 mov %esp,%ebp
1403: 57 push %edi
1404: 56 push %esi
1405: 89 c6 mov %eax,%esi
1407: 53 push %ebx
1408: 83 ec 4c sub $0x4c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
140b: 8b 5d 08 mov 0x8(%ebp),%ebx
140e: 85 db test %ebx,%ebx
1410: 74 09 je 141b <printint+0x1b>
1412: 89 d0 mov %edx,%eax
1414: c1 e8 1f shr $0x1f,%eax
1417: 84 c0 test %al,%al
1419: 75 75 jne 1490 <printint+0x90>
neg = 1;
x = -xx;
} else {
x = xx;
141b: 89 d0 mov %edx,%eax
neg = 0;
141d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
1424: 89 75 c0 mov %esi,-0x40(%ebp)
}
i = 0;
1427: 31 ff xor %edi,%edi
1429: 89 ce mov %ecx,%esi
142b: 8d 5d d7 lea -0x29(%ebp),%ebx
142e: eb 02 jmp 1432 <printint+0x32>
do{
buf[i++] = digits[x % base];
1430: 89 cf mov %ecx,%edi
1432: 31 d2 xor %edx,%edx
1434: f7 f6 div %esi
1436: 8d 4f 01 lea 0x1(%edi),%ecx
1439: 0f b6 92 80 18 00 00 movzbl 0x1880(%edx),%edx
}while((x /= base) != 0);
1440: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
1442: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
1445: 75 e9 jne 1430 <printint+0x30>
if(neg)
1447: 8b 55 c4 mov -0x3c(%ebp),%edx
buf[i++] = digits[x % base];
144a: 89 c8 mov %ecx,%eax
144c: 8b 75 c0 mov -0x40(%ebp),%esi
if(neg)
144f: 85 d2 test %edx,%edx
1451: 74 08 je 145b <printint+0x5b>
buf[i++] = '-';
1453: 8d 4f 02 lea 0x2(%edi),%ecx
1456: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1)
while(--i >= 0)
145b: 8d 79 ff lea -0x1(%ecx),%edi
145e: 66 90 xchg %ax,%ax
1460: 0f b6 44 3d d8 movzbl -0x28(%ebp,%edi,1),%eax
1465: 83 ef 01 sub $0x1,%edi
write(fd, &c, 1);
1468: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
146f: 00
1470: 89 5c 24 04 mov %ebx,0x4(%esp)
1474: 89 34 24 mov %esi,(%esp)
1477: 88 45 d7 mov %al,-0x29(%ebp)
147a: e8 e3 fe ff ff call 1362 <write>
while(--i >= 0)
147f: 83 ff ff cmp $0xffffffff,%edi
1482: 75 dc jne 1460 <printint+0x60>
putc(fd, buf[i]);
}
1484: 83 c4 4c add $0x4c,%esp
1487: 5b pop %ebx
1488: 5e pop %esi
1489: 5f pop %edi
148a: 5d pop %ebp
148b: c3 ret
148c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
x = -xx;
1490: 89 d0 mov %edx,%eax
1492: f7 d8 neg %eax
neg = 1;
1494: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
149b: eb 87 jmp 1424 <printint+0x24>
149d: 8d 76 00 lea 0x0(%esi),%esi
000014a0 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
14a0: 55 push %ebp
14a1: 89 e5 mov %esp,%ebp
14a3: 57 push %edi
char *s;
int c, i, state;
uint *ap;
state = 0;
14a4: 31 ff xor %edi,%edi
{
14a6: 56 push %esi
14a7: 53 push %ebx
14a8: 83 ec 3c sub $0x3c,%esp
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
14ab: 8b 5d 0c mov 0xc(%ebp),%ebx
ap = (uint*)(void*)&fmt + 1;
14ae: 8d 45 10 lea 0x10(%ebp),%eax
{
14b1: 8b 75 08 mov 0x8(%ebp),%esi
ap = (uint*)(void*)&fmt + 1;
14b4: 89 45 d4 mov %eax,-0x2c(%ebp)
for(i = 0; fmt[i]; i++){
14b7: 0f b6 13 movzbl (%ebx),%edx
14ba: 83 c3 01 add $0x1,%ebx
14bd: 84 d2 test %dl,%dl
14bf: 75 39 jne 14fa <printf+0x5a>
14c1: e9 c2 00 00 00 jmp 1588 <printf+0xe8>
14c6: 66 90 xchg %ax,%ax
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
14c8: 83 fa 25 cmp $0x25,%edx
14cb: 0f 84 bf 00 00 00 je 1590 <printf+0xf0>
write(fd, &c, 1);
14d1: 8d 45 e2 lea -0x1e(%ebp),%eax
14d4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
14db: 00
14dc: 89 44 24 04 mov %eax,0x4(%esp)
14e0: 89 34 24 mov %esi,(%esp)
state = '%';
} else {
putc(fd, c);
14e3: 88 55 e2 mov %dl,-0x1e(%ebp)
write(fd, &c, 1);
14e6: e8 77 fe ff ff call 1362 <write>
14eb: 83 c3 01 add $0x1,%ebx
for(i = 0; fmt[i]; i++){
14ee: 0f b6 53 ff movzbl -0x1(%ebx),%edx
14f2: 84 d2 test %dl,%dl
14f4: 0f 84 8e 00 00 00 je 1588 <printf+0xe8>
if(state == 0){
14fa: 85 ff test %edi,%edi
c = fmt[i] & 0xff;
14fc: 0f be c2 movsbl %dl,%eax
if(state == 0){
14ff: 74 c7 je 14c8 <printf+0x28>
}
} else if(state == '%'){
1501: 83 ff 25 cmp $0x25,%edi
1504: 75 e5 jne 14eb <printf+0x4b>
if(c == 'd'){
1506: 83 fa 64 cmp $0x64,%edx
1509: 0f 84 31 01 00 00 je 1640 <printf+0x1a0>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
150f: 25 f7 00 00 00 and $0xf7,%eax
1514: 83 f8 70 cmp $0x70,%eax
1517: 0f 84 83 00 00 00 je 15a0 <printf+0x100>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
151d: 83 fa 73 cmp $0x73,%edx
1520: 0f 84 a2 00 00 00 je 15c8 <printf+0x128>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
1526: 83 fa 63 cmp $0x63,%edx
1529: 0f 84 35 01 00 00 je 1664 <printf+0x1c4>
putc(fd, *ap);
ap++;
} else if(c == '%'){
152f: 83 fa 25 cmp $0x25,%edx
1532: 0f 84 e0 00 00 00 je 1618 <printf+0x178>
write(fd, &c, 1);
1538: 8d 45 e6 lea -0x1a(%ebp),%eax
153b: 83 c3 01 add $0x1,%ebx
153e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1545: 00
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
1546: 31 ff xor %edi,%edi
write(fd, &c, 1);
1548: 89 44 24 04 mov %eax,0x4(%esp)
154c: 89 34 24 mov %esi,(%esp)
154f: 89 55 d0 mov %edx,-0x30(%ebp)
1552: c6 45 e6 25 movb $0x25,-0x1a(%ebp)
1556: e8 07 fe ff ff call 1362 <write>
putc(fd, c);
155b: 8b 55 d0 mov -0x30(%ebp),%edx
write(fd, &c, 1);
155e: 8d 45 e7 lea -0x19(%ebp),%eax
1561: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1568: 00
1569: 89 44 24 04 mov %eax,0x4(%esp)
156d: 89 34 24 mov %esi,(%esp)
putc(fd, c);
1570: 88 55 e7 mov %dl,-0x19(%ebp)
write(fd, &c, 1);
1573: e8 ea fd ff ff call 1362 <write>
for(i = 0; fmt[i]; i++){
1578: 0f b6 53 ff movzbl -0x1(%ebx),%edx
157c: 84 d2 test %dl,%dl
157e: 0f 85 76 ff ff ff jne 14fa <printf+0x5a>
1584: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
}
1588: 83 c4 3c add $0x3c,%esp
158b: 5b pop %ebx
158c: 5e pop %esi
158d: 5f pop %edi
158e: 5d pop %ebp
158f: c3 ret
state = '%';
1590: bf 25 00 00 00 mov $0x25,%edi
1595: e9 51 ff ff ff jmp 14eb <printf+0x4b>
159a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 16, 0);
15a0: 8b 45 d4 mov -0x2c(%ebp),%eax
15a3: b9 10 00 00 00 mov $0x10,%ecx
state = 0;
15a8: 31 ff xor %edi,%edi
printint(fd, *ap, 16, 0);
15aa: c7 04 24 00 00 00 00 movl $0x0,(%esp)
15b1: 8b 10 mov (%eax),%edx
15b3: 89 f0 mov %esi,%eax
15b5: e8 46 fe ff ff call 1400 <printint>
ap++;
15ba: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
15be: e9 28 ff ff ff jmp 14eb <printf+0x4b>
15c3: 90 nop
15c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s = (char*)*ap;
15c8: 8b 45 d4 mov -0x2c(%ebp),%eax
ap++;
15cb: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
s = (char*)*ap;
15cf: 8b 38 mov (%eax),%edi
s = "(null)";
15d1: b8 79 18 00 00 mov $0x1879,%eax
15d6: 85 ff test %edi,%edi
15d8: 0f 44 f8 cmove %eax,%edi
while(*s != 0){
15db: 0f b6 07 movzbl (%edi),%eax
15de: 84 c0 test %al,%al
15e0: 74 2a je 160c <printf+0x16c>
15e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
15e8: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
15eb: 8d 45 e3 lea -0x1d(%ebp),%eax
s++;
15ee: 83 c7 01 add $0x1,%edi
write(fd, &c, 1);
15f1: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
15f8: 00
15f9: 89 44 24 04 mov %eax,0x4(%esp)
15fd: 89 34 24 mov %esi,(%esp)
1600: e8 5d fd ff ff call 1362 <write>
while(*s != 0){
1605: 0f b6 07 movzbl (%edi),%eax
1608: 84 c0 test %al,%al
160a: 75 dc jne 15e8 <printf+0x148>
state = 0;
160c: 31 ff xor %edi,%edi
160e: e9 d8 fe ff ff jmp 14eb <printf+0x4b>
1613: 90 nop
1614: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
write(fd, &c, 1);
1618: 8d 45 e5 lea -0x1b(%ebp),%eax
state = 0;
161b: 31 ff xor %edi,%edi
write(fd, &c, 1);
161d: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1624: 00
1625: 89 44 24 04 mov %eax,0x4(%esp)
1629: 89 34 24 mov %esi,(%esp)
162c: c6 45 e5 25 movb $0x25,-0x1b(%ebp)
1630: e8 2d fd ff ff call 1362 <write>
1635: e9 b1 fe ff ff jmp 14eb <printf+0x4b>
163a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 10, 1);
1640: 8b 45 d4 mov -0x2c(%ebp),%eax
1643: b9 0a 00 00 00 mov $0xa,%ecx
state = 0;
1648: 66 31 ff xor %di,%di
printint(fd, *ap, 10, 1);
164b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1652: 8b 10 mov (%eax),%edx
1654: 89 f0 mov %esi,%eax
1656: e8 a5 fd ff ff call 1400 <printint>
ap++;
165b: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
165f: e9 87 fe ff ff jmp 14eb <printf+0x4b>
putc(fd, *ap);
1664: 8b 45 d4 mov -0x2c(%ebp),%eax
state = 0;
1667: 31 ff xor %edi,%edi
putc(fd, *ap);
1669: 8b 00 mov (%eax),%eax
write(fd, &c, 1);
166b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1672: 00
1673: 89 34 24 mov %esi,(%esp)
putc(fd, *ap);
1676: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
1679: 8d 45 e4 lea -0x1c(%ebp),%eax
167c: 89 44 24 04 mov %eax,0x4(%esp)
1680: e8 dd fc ff ff call 1362 <write>
ap++;
1685: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
1689: e9 5d fe ff ff jmp 14eb <printf+0x4b>
168e: 66 90 xchg %ax,%ax
00001690 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
1690: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1691: a1 80 1b 00 00 mov 0x1b80,%eax
{
1696: 89 e5 mov %esp,%ebp
1698: 57 push %edi
1699: 56 push %esi
169a: 53 push %ebx
169b: 8b 5d 08 mov 0x8(%ebp),%ebx
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
169e: 8b 08 mov (%eax),%ecx
bp = (Header*)ap - 1;
16a0: 8d 53 f8 lea -0x8(%ebx),%edx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
16a3: 39 d0 cmp %edx,%eax
16a5: 72 11 jb 16b8 <free+0x28>
16a7: 90 nop
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
16a8: 39 c8 cmp %ecx,%eax
16aa: 72 04 jb 16b0 <free+0x20>
16ac: 39 ca cmp %ecx,%edx
16ae: 72 10 jb 16c0 <free+0x30>
16b0: 89 c8 mov %ecx,%eax
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
16b2: 39 d0 cmp %edx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
16b4: 8b 08 mov (%eax),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
16b6: 73 f0 jae 16a8 <free+0x18>
16b8: 39 ca cmp %ecx,%edx
16ba: 72 04 jb 16c0 <free+0x30>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
16bc: 39 c8 cmp %ecx,%eax
16be: 72 f0 jb 16b0 <free+0x20>
break;
if(bp + bp->s.size == p->s.ptr){
16c0: 8b 73 fc mov -0x4(%ebx),%esi
16c3: 8d 3c f2 lea (%edx,%esi,8),%edi
16c6: 39 cf cmp %ecx,%edi
16c8: 74 1e je 16e8 <free+0x58>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
16ca: 89 4b f8 mov %ecx,-0x8(%ebx)
if(p + p->s.size == bp){
16cd: 8b 48 04 mov 0x4(%eax),%ecx
16d0: 8d 34 c8 lea (%eax,%ecx,8),%esi
16d3: 39 f2 cmp %esi,%edx
16d5: 74 28 je 16ff <free+0x6f>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
16d7: 89 10 mov %edx,(%eax)
freep = p;
16d9: a3 80 1b 00 00 mov %eax,0x1b80
}
16de: 5b pop %ebx
16df: 5e pop %esi
16e0: 5f pop %edi
16e1: 5d pop %ebp
16e2: c3 ret
16e3: 90 nop
16e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
16e8: 03 71 04 add 0x4(%ecx),%esi
16eb: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
16ee: 8b 08 mov (%eax),%ecx
16f0: 8b 09 mov (%ecx),%ecx
16f2: 89 4b f8 mov %ecx,-0x8(%ebx)
if(p + p->s.size == bp){
16f5: 8b 48 04 mov 0x4(%eax),%ecx
16f8: 8d 34 c8 lea (%eax,%ecx,8),%esi
16fb: 39 f2 cmp %esi,%edx
16fd: 75 d8 jne 16d7 <free+0x47>
p->s.size += bp->s.size;
16ff: 03 4b fc add -0x4(%ebx),%ecx
freep = p;
1702: a3 80 1b 00 00 mov %eax,0x1b80
p->s.size += bp->s.size;
1707: 89 48 04 mov %ecx,0x4(%eax)
p->s.ptr = bp->s.ptr;
170a: 8b 53 f8 mov -0x8(%ebx),%edx
170d: 89 10 mov %edx,(%eax)
}
170f: 5b pop %ebx
1710: 5e pop %esi
1711: 5f pop %edi
1712: 5d pop %ebp
1713: c3 ret
1714: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
171a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00001720 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
1720: 55 push %ebp
1721: 89 e5 mov %esp,%ebp
1723: 57 push %edi
1724: 56 push %esi
1725: 53 push %ebx
1726: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1729: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
172c: 8b 1d 80 1b 00 00 mov 0x1b80,%ebx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1732: 8d 48 07 lea 0x7(%eax),%ecx
1735: c1 e9 03 shr $0x3,%ecx
if((prevp = freep) == 0){
1738: 85 db test %ebx,%ebx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
173a: 8d 71 01 lea 0x1(%ecx),%esi
if((prevp = freep) == 0){
173d: 0f 84 9b 00 00 00 je 17de <malloc+0xbe>
1743: 8b 13 mov (%ebx),%edx
1745: 8b 7a 04 mov 0x4(%edx),%edi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
1748: 39 fe cmp %edi,%esi
174a: 76 64 jbe 17b0 <malloc+0x90>
174c: 8d 04 f5 00 00 00 00 lea 0x0(,%esi,8),%eax
if(nu < 4096)
1753: bb 00 80 00 00 mov $0x8000,%ebx
1758: 89 45 e4 mov %eax,-0x1c(%ebp)
175b: eb 0e jmp 176b <malloc+0x4b>
175d: 8d 76 00 lea 0x0(%esi),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
1760: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
1762: 8b 78 04 mov 0x4(%eax),%edi
1765: 39 fe cmp %edi,%esi
1767: 76 4f jbe 17b8 <malloc+0x98>
1769: 89 c2 mov %eax,%edx
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
176b: 3b 15 80 1b 00 00 cmp 0x1b80,%edx
1771: 75 ed jne 1760 <malloc+0x40>
if(nu < 4096)
1773: 8b 45 e4 mov -0x1c(%ebp),%eax
1776: 81 fe 00 10 00 00 cmp $0x1000,%esi
177c: bf 00 10 00 00 mov $0x1000,%edi
1781: 0f 43 fe cmovae %esi,%edi
1784: 0f 42 c3 cmovb %ebx,%eax
p = sbrk(nu * sizeof(Header));
1787: 89 04 24 mov %eax,(%esp)
178a: e8 3b fc ff ff call 13ca <sbrk>
if(p == (char*)-1)
178f: 83 f8 ff cmp $0xffffffff,%eax
1792: 74 18 je 17ac <malloc+0x8c>
hp->s.size = nu;
1794: 89 78 04 mov %edi,0x4(%eax)
free((void*)(hp + 1));
1797: 83 c0 08 add $0x8,%eax
179a: 89 04 24 mov %eax,(%esp)
179d: e8 ee fe ff ff call 1690 <free>
return freep;
17a2: 8b 15 80 1b 00 00 mov 0x1b80,%edx
if((p = morecore(nunits)) == 0)
17a8: 85 d2 test %edx,%edx
17aa: 75 b4 jne 1760 <malloc+0x40>
return 0;
17ac: 31 c0 xor %eax,%eax
17ae: eb 20 jmp 17d0 <malloc+0xb0>
if(p->s.size >= nunits){
17b0: 89 d0 mov %edx,%eax
17b2: 89 da mov %ebx,%edx
17b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->s.size == nunits)
17b8: 39 fe cmp %edi,%esi
17ba: 74 1c je 17d8 <malloc+0xb8>
p->s.size -= nunits;
17bc: 29 f7 sub %esi,%edi
17be: 89 78 04 mov %edi,0x4(%eax)
p += p->s.size;
17c1: 8d 04 f8 lea (%eax,%edi,8),%eax
p->s.size = nunits;
17c4: 89 70 04 mov %esi,0x4(%eax)
freep = prevp;
17c7: 89 15 80 1b 00 00 mov %edx,0x1b80
return (void*)(p + 1);
17cd: 83 c0 08 add $0x8,%eax
}
}
17d0: 83 c4 1c add $0x1c,%esp
17d3: 5b pop %ebx
17d4: 5e pop %esi
17d5: 5f pop %edi
17d6: 5d pop %ebp
17d7: c3 ret
prevp->s.ptr = p->s.ptr;
17d8: 8b 08 mov (%eax),%ecx
17da: 89 0a mov %ecx,(%edx)
17dc: eb e9 jmp 17c7 <malloc+0xa7>
base.s.ptr = freep = prevp = &base;
17de: c7 05 80 1b 00 00 84 movl $0x1b84,0x1b80
17e5: 1b 00 00
base.s.size = 0;
17e8: ba 84 1b 00 00 mov $0x1b84,%edx
base.s.ptr = freep = prevp = &base;
17ed: c7 05 84 1b 00 00 84 movl $0x1b84,0x1b84
17f4: 1b 00 00
base.s.size = 0;
17f7: c7 05 88 1b 00 00 00 movl $0x0,0x1b88
17fe: 00 00 00
1801: e9 46 ff ff ff jmp 174c <malloc+0x2c>
1806: 66 90 xchg %ax,%ax
1808: 66 90 xchg %ax,%ax
180a: 66 90 xchg %ax,%ax
180c: 66 90 xchg %ax,%ax
180e: 66 90 xchg %ax,%ax
00001810 <uacquire>:
#include "uspinlock.h"
#include "x86.h"
void
uacquire(struct uspinlock *lk)
{
1810: 55 push %ebp
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
1811: b9 01 00 00 00 mov $0x1,%ecx
1816: 89 e5 mov %esp,%ebp
1818: 8b 55 08 mov 0x8(%ebp),%edx
181b: 90 nop
181c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1820: 89 c8 mov %ecx,%eax
1822: f0 87 02 lock xchg %eax,(%edx)
// The xchg is atomic.
while(xchg(&lk->locked, 1) != 0)
1825: 85 c0 test %eax,%eax
1827: 75 f7 jne 1820 <uacquire+0x10>
;
// Tell the C compiler and the processor to not move loads or stores
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
1829: 0f ae f0 mfence
}
182c: 5d pop %ebp
182d: c3 ret
182e: 66 90 xchg %ax,%ax
00001830 <urelease>:
void urelease (struct uspinlock *lk) {
1830: 55 push %ebp
1831: 89 e5 mov %esp,%ebp
1833: 8b 45 08 mov 0x8(%ebp),%eax
__sync_synchronize();
1836: 0f ae f0 mfence
// Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might
// not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
1839: c7 00 00 00 00 00 movl $0x0,(%eax)
}
183f: 5d pop %ebp
1840: c3 ret
| 35.930108 | 70 | 0.413245 |
a9e2502ae1f79511738dda88d3bbf0bfb5c112ad | 262 | php | PHP | WEB/PHP/misreservas.php | walter-white-pr01/proyecto1 | ff78a07c4481a638b21ba1ebb19a8b98fff57a3f | [
"MIT"
] | null | null | null | WEB/PHP/misreservas.php | walter-white-pr01/proyecto1 | ff78a07c4481a638b21ba1ebb19a8b98fff57a3f | [
"MIT"
] | 1 | 2018-10-24T15:55:03.000Z | 2018-10-24T15:55:03.000Z | WEB/PHP/misreservas.php | walter-white-pr01/proyecto1 | ff78a07c4481a638b21ba1ebb19a8b98fff57a3f | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
include "header.php";
?>
<div class="centrar">
<div class="ancho">
<?php
include "misreservas.proc.php";
?>
</div>
</div>
<?php
// include "footer.php";
?>
</body>
</html> | 10.076923 | 35 | 0.515267 |
a38bcce6f2f385fc8d998bb21bea48afa46ab0d1 | 6,404 | java | Java | app/src/main/java/de/radioshuttle/mqttpushclient/dash/OptionListEditAdapter.java | RadioShuttle/MQTTPushClient_Android | a5bbe1ab088ec1edf1278bfe4c7a057bc5a803e2 | [
"Apache-2.0"
] | 7 | 2020-03-03T11:07:15.000Z | 2022-03-22T00:13:46.000Z | app/src/main/java/de/radioshuttle/mqttpushclient/dash/OptionListEditAdapter.java | RadioShuttle/MQTTPushClient_Android | a5bbe1ab088ec1edf1278bfe4c7a057bc5a803e2 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/de/radioshuttle/mqttpushclient/dash/OptionListEditAdapter.java | RadioShuttle/MQTTPushClient_Android | a5bbe1ab088ec1edf1278bfe4c7a057bc5a803e2 | [
"Apache-2.0"
] | 3 | 2020-10-12T04:15:08.000Z | 2022-03-22T00:13:48.000Z | /*
* Copyright (c) 2019 HELIOS Software GmbH
* 30827 Garbsen (Hannover) Germany
* Licensed under the Apache License, Version 2.0
*/
package de.radioshuttle.mqttpushclient.dash;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.LinkedList;
import java.util.Map;
import de.radioshuttle.mqttpushclient.R;
import de.radioshuttle.utils.Utils;
public class OptionListEditAdapter extends RecyclerView.Adapter<OptionListEditAdapter.ViewHolder>{
public OptionListEditAdapter(Context context, DashBoardViewModel viewModel) {
mInflater = LayoutInflater.from(context);
mViewModel = viewModel;
}
public void setRowSelectionListener(RowSelectionListener callback) {
mRowSelectionListener = callback;
}
@NonNull
@Override
public OptionListEditAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = mInflater.inflate(R.layout.activity_dash_board_edit_option_row, parent, false);
final OptionListEditAdapter.ViewHolder vh = new OptionListEditAdapter.ViewHolder(view);
vh.label = view.findViewById(R.id.label);
vh.image = view.findViewById(R.id.image);
vh.itemView.setOnLongClickListener(new View.OnLongClickListener() {
// Called when the user long-clicks on someView
@Override
public boolean onLongClick(View view) {
int pos = vh.getAdapterPosition();
if (pos != RecyclerView.NO_POSITION) {
view.requestFocus();
toggleSelection(pos);
}
return true;
}
});
vh.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (hasSelection()) {
int pos = vh.getAdapterPosition();
if (pos != RecyclerView.NO_POSITION) {
v.requestFocus();
toggleSelection(pos);
}
}
}
});
return vh;
}
public boolean hasSelection() {
boolean isSelected = false;
if (mData != null) {
int n = getItemCount();
for (int i = 0; i < n; i++) {
if (mData.get(i).selected != 0L) {
isSelected = true;
break;
}
}
}
return isSelected;
}
@Override
public void onBindViewHolder(@NonNull OptionListEditAdapter.ViewHolder holder, int position) {
OptionList.Option item = mData.get(position);
String label = (Utils.isEmpty(item.value) ? "" : item.value) + " - " +
(Utils.isEmpty(item.displayValue) ? "" : item.displayValue);
holder.label.setText(label);
holder.itemView.setSelected(item.selected != 0L);
if (Utils.isEmpty(item.imageURI)) {
if (holder.image.getDrawable() != null) {
holder.image.setImageDrawable(null);
}
} else {
Map<String, Drawable> cache = mViewModel.getOptionListImageCache();
Drawable img = cache.get(item.imageURI);
holder.image.setImageDrawable(img);
}
}
public void setData(LinkedList<OptionList.Option> list) {
mData = list;
notifyDataSetChanged();
}
private void toggleSelection(int pos) {
if (mData != null) {
int noOfSelectedItemsBefore = 0;
int n = getItemCount();
for (int i = 0; i < n; i++) {
if (mData.get(i).selected != 0) {
noOfSelectedItemsBefore++;
}
}
int noOfSelectedItems = noOfSelectedItemsBefore;
OptionList.Option e = mData.get(pos);
if (e.selected != 0) {
e.selected = 0L;
noOfSelectedItems--;
} else {
e.selected = System.currentTimeMillis();
noOfSelectedItems++;
}
notifyItemChanged(pos);
if (mRowSelectionListener != null) {
mRowSelectionListener.onSelectionChange(noOfSelectedItemsBefore, noOfSelectedItems);
}
}
}
public void clearSelection() {
if (mData != null) {
int noOfSelectedItemsBefore = 0;
int n = getItemCount();
for (int i = 0; i < n; i++) {
if (mData.get(i).selected != 0) {
noOfSelectedItemsBefore++;
mData.get(i).selected = 0L;
}
}
if (mRowSelectionListener != null) {
mRowSelectionListener.onSelectionChange(noOfSelectedItemsBefore, 0);
}
notifyDataSetChanged();
}
}
@Override
public int getItemCount() {
return mData == null ? 0 : mData.size();
}
public OptionList.Option getLastSelectedItem() {
OptionList.Option lastSelected = null, tmp;
int n = getItemCount();
for(int i = 0; i < n; i++) {
tmp = mData.get(i);
if (tmp.selected > 0) {
if (lastSelected == null) {
lastSelected = tmp;
lastSelected.temp = i;
} else if (tmp.selected > lastSelected.selected) {
lastSelected = tmp;
lastSelected.temp = i;
}
}
}
return lastSelected;
}
public class ViewHolder extends RecyclerView.ViewHolder {
public ViewHolder(View v) {
super(v);
}
public TextView label;
public ImageView image;
}
public interface RowSelectionListener {
void onSelectionChange(int noOfSelectedItemsBefore, int noOfSelectedItems);
}
protected DashBoardViewModel mViewModel;
protected LayoutInflater mInflater;
protected LinkedList<OptionList.Option> mData;
protected RowSelectionListener mRowSelectionListener;
protected Context mContext;
}
| 32.673469 | 105 | 0.570893 |
725a90167f260261cb70808abadd00fe91a4c33a | 6,773 | c | C | src/util/win32/findfile.c | cschlack/libgit2 | 63970244fb2d49794e7b5d268a2defe4299fd3ad | [
"CC0-1.0"
] | 2 | 2016-02-26T16:36:30.000Z | 2019-11-13T17:58:03.000Z | src/util/win32/findfile.c | cschlack/libgit2 | 63970244fb2d49794e7b5d268a2defe4299fd3ad | [
"CC0-1.0"
] | 3 | 2015-01-17T15:10:29.000Z | 2016-03-23T21:26:46.000Z | src/util/win32/findfile.c | cschlack/libgit2 | 63970244fb2d49794e7b5d268a2defe4299fd3ad | [
"CC0-1.0"
] | 5 | 2015-01-15T15:55:45.000Z | 2021-12-15T00:44:15.000Z | /*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#include "findfile.h"
#include "path_w32.h"
#include "utf-conv.h"
#include "fs_path.h"
#define REG_GITFORWINDOWS_KEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
#define REG_GITFORWINDOWS_KEY_WOW64 L"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
static int git_win32__expand_path(git_win32_path dest, const wchar_t *src)
{
DWORD len = ExpandEnvironmentStringsW(src, dest, GIT_WIN_PATH_UTF16);
if (!len || len > GIT_WIN_PATH_UTF16)
return -1;
return 0;
}
static int win32_path_to_8(git_str *dest, const wchar_t *src)
{
git_win32_utf8_path utf8_path;
if (git_win32_path_to_utf8(utf8_path, src) < 0) {
git_error_set(GIT_ERROR_OS, "unable to convert path to UTF-8");
return -1;
}
/* Convert backslashes to forward slashes */
git_fs_path_mkposix(utf8_path);
return git_str_sets(dest, utf8_path);
}
static git_win32_path mock_registry;
static bool mock_registry_set;
extern int git_win32__set_registry_system_dir(const wchar_t *mock_sysdir)
{
if (!mock_sysdir) {
mock_registry[0] = L'\0';
mock_registry_set = false;
} else {
size_t len = wcslen(mock_sysdir);
if (len > GIT_WIN_PATH_MAX) {
git_error_set(GIT_ERROR_INVALID, "mock path too long");
return -1;
}
wcscpy(mock_registry, mock_sysdir);
mock_registry_set = true;
}
return 0;
}
static int lookup_registry_key(
git_win32_path out,
const HKEY hive,
const wchar_t* key,
const wchar_t *value)
{
HKEY hkey;
DWORD type, size;
int error = GIT_ENOTFOUND;
/*
* Registry data may not be NUL terminated, provide room to do
* it ourselves.
*/
size = (DWORD)((sizeof(git_win32_path) - 1) * sizeof(wchar_t));
if (RegOpenKeyExW(hive, key, 0, KEY_READ, &hkey) != 0)
return GIT_ENOTFOUND;
if (RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)out, &size) == 0 &&
type == REG_SZ &&
size > 0 &&
size < sizeof(git_win32_path)) {
size_t wsize = size / sizeof(wchar_t);
size_t len = wsize - 1;
if (out[wsize - 1] != L'\0') {
len = wsize;
out[wsize] = L'\0';
}
if (out[len - 1] == L'\\')
out[len - 1] = L'\0';
if (_waccess(out, F_OK) == 0)
error = 0;
}
RegCloseKey(hkey);
return error;
}
static int find_sysdir_in_registry(git_win32_path out)
{
if (mock_registry_set) {
if (mock_registry[0] == L'\0')
return GIT_ENOTFOUND;
wcscpy(out, mock_registry);
return 0;
}
if (lookup_registry_key(out, HKEY_CURRENT_USER, REG_GITFORWINDOWS_KEY, L"InstallLocation") == 0 ||
lookup_registry_key(out, HKEY_CURRENT_USER, REG_GITFORWINDOWS_KEY_WOW64, L"InstallLocation") == 0 ||
lookup_registry_key(out, HKEY_LOCAL_MACHINE, REG_GITFORWINDOWS_KEY, L"InstallLocation") == 0 ||
lookup_registry_key(out, HKEY_LOCAL_MACHINE, REG_GITFORWINDOWS_KEY_WOW64, L"InstallLocation") == 0)
return 0;
return GIT_ENOTFOUND;
}
static int find_sysdir_in_path(git_win32_path out)
{
size_t out_len;
if (git_win32_path_find_executable(out, L"git.exe") < 0 &&
git_win32_path_find_executable(out, L"git.cmd") < 0)
return GIT_ENOTFOUND;
out_len = wcslen(out);
/* Trim the file name */
if (out_len <= CONST_STRLEN(L"git.exe"))
return GIT_ENOTFOUND;
out_len -= CONST_STRLEN(L"git.exe");
if (out_len && out[out_len - 1] == L'\\')
out_len--;
/*
* Git for Windows usually places the command in a 'bin' or
* 'cmd' directory, trim that.
*/
if (out_len >= CONST_STRLEN(L"\\bin") &&
wcsncmp(&out[out_len - CONST_STRLEN(L"\\bin")], L"\\bin", CONST_STRLEN(L"\\bin")) == 0)
out_len -= CONST_STRLEN(L"\\bin");
else if (out_len >= CONST_STRLEN(L"\\cmd") &&
wcsncmp(&out[out_len - CONST_STRLEN(L"\\cmd")], L"\\cmd", CONST_STRLEN(L"\\cmd")) == 0)
out_len -= CONST_STRLEN(L"\\cmd");
if (!out_len)
return GIT_ENOTFOUND;
out[out_len] = L'\0';
return 0;
}
static int win32_find_existing_dirs(
git_str* out,
const wchar_t* tmpl[])
{
git_win32_path path16;
git_str buf = GIT_STR_INIT;
git_str_clear(out);
for (; *tmpl != NULL; tmpl++) {
if (!git_win32__expand_path(path16, *tmpl) &&
path16[0] != L'%' &&
!_waccess(path16, F_OK)) {
win32_path_to_8(&buf, path16);
if (buf.size)
git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, buf.ptr);
}
}
git_str_dispose(&buf);
return (git_str_oom(out) ? -1 : 0);
}
static int append_subdir(git_str *out, git_str *path, const char *subdir)
{
static const char* architecture_roots[] = {
"",
"mingw64",
"mingw32",
NULL
};
const char **root;
size_t orig_path_len = path->size;
for (root = architecture_roots; *root; root++) {
if ((*root[0] && git_str_joinpath(path, path->ptr, *root) < 0) ||
git_str_joinpath(path, path->ptr, subdir) < 0)
return -1;
if (git_fs_path_exists(path->ptr) &&
git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, path->ptr) < 0)
return -1;
git_str_truncate(path, orig_path_len);
}
return 0;
}
int git_win32__find_system_dirs(git_str *out, const char *subdir)
{
git_win32_path pathdir, regdir;
git_str path8 = GIT_STR_INIT;
bool has_pathdir, has_regdir;
int error;
has_pathdir = (find_sysdir_in_path(pathdir) == 0);
has_regdir = (find_sysdir_in_registry(regdir) == 0);
if (!has_pathdir && !has_regdir)
return 0;
/*
* Usually the git in the path is the same git in the registry,
* in this case there's no need to duplicate the paths.
*/
if (has_pathdir && has_regdir && wcscmp(pathdir, regdir) == 0)
has_regdir = false;
if (has_pathdir) {
if ((error = win32_path_to_8(&path8, pathdir)) < 0 ||
(error = append_subdir(out, &path8, subdir)) < 0)
goto done;
}
if (has_regdir) {
if ((error = win32_path_to_8(&path8, regdir)) < 0 ||
(error = append_subdir(out, &path8, subdir)) < 0)
goto done;
}
done:
git_str_dispose(&path8);
return error;
}
int git_win32__find_global_dirs(git_str *out)
{
static const wchar_t *global_tmpls[4] = {
L"%HOME%\\",
L"%HOMEDRIVE%%HOMEPATH%\\",
L"%USERPROFILE%\\",
NULL,
};
return win32_find_existing_dirs(out, global_tmpls);
}
int git_win32__find_xdg_dirs(git_str *out)
{
static const wchar_t *global_tmpls[7] = {
L"%XDG_CONFIG_HOME%\\git",
L"%APPDATA%\\git",
L"%LOCALAPPDATA%\\git",
L"%HOME%\\.config\\git",
L"%HOMEDRIVE%%HOMEPATH%\\.config\\git",
L"%USERPROFILE%\\.config\\git",
NULL,
};
return win32_find_existing_dirs(out, global_tmpls);
}
int git_win32__find_programdata_dirs(git_str *out)
{
static const wchar_t *programdata_tmpls[2] = {
L"%PROGRAMDATA%\\Git",
NULL,
};
return win32_find_existing_dirs(out, programdata_tmpls);
}
| 23.599303 | 116 | 0.681825 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.