text
stringlengths
7
99.5k
meta
dict
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. // // The following only applies to changes made to this file as part of YugaByte development. // // Portions Copyright (c) YugaByte, 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. // // Copyright (c) 2012 Facebook. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ROCKSDB_LITE #include "yb/rocksdb/utilities/checkpoint.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <inttypes.h> #include <algorithm> #include <string> #include "yb/rocksdb/db/filename.h" #include "yb/rocksdb/db/wal_manager.h" #include "yb/rocksdb/db.h" #include "yb/rocksdb/env.h" #include "yb/rocksdb/transaction_log.h" #include "yb/rocksdb/util/file_util.h" #include "yb/rocksdb/port/port.h" #include "yb/util/random_util.h" #include "yb/util/string_util.h" namespace rocksdb { namespace checkpoint { // Builds an openable snapshot of RocksDB on the same disk, which // accepts an output directory on the same disk, and under the directory // (1) hard-linked SST files pointing to existing live SST files // SST files will be copied if output directory is on a different filesystem // (2) a copied manifest files and other files // The directory should not already exist and will be created by this API. // The directory will be an absolute path Status CreateCheckpoint(DB* db, const std::string& checkpoint_dir) { if (!db->GetCheckpointEnv()->IsPlainText()) { return STATUS(InvalidArgument, "db's checkpoint env is not plaintext."); } std::vector<std::string> live_files; uint64_t manifest_file_size = 0; uint64_t sequence_number = db->GetLatestSequenceNumber(); bool same_fs = true; VectorLogPtr live_wal_files; bool delete_checkpoint_dir = false; Status s = db->GetCheckpointEnv()->FileExists(checkpoint_dir); if (s.ok()) { delete_checkpoint_dir = true; } else if (!s.IsNotFound()) { assert(s.IsIOError()); return s; } s = db->DisableFileDeletions(); if (s.ok()) { // this will return live_files prefixed with "/" s = db->GetLiveFiles(live_files, &manifest_file_size, true); } // if we have more than one column family, we need to also get WAL files if (s.ok()) { s = db->GetSortedWalFiles(&live_wal_files); } if (!s.ok()) { WARN_NOT_OK(db->EnableFileDeletions(false), "Failed to disable file deletions"); return s; } size_t wal_size = live_wal_files.size(); RLOG(db->GetOptions().info_log, "Started the snapshot process -- creating snapshot in directory %s", checkpoint_dir.c_str()); const std::string full_private_path = checkpoint_dir + ".tmp." + ToString(yb::RandomUniformInt<uint64_t>()); // create snapshot directory s = db->GetCheckpointEnv()->CreateDir(full_private_path); // copy/hard link live_files for (size_t i = 0; s.ok() && i < live_files.size(); ++i) { uint64_t number; FileType type; bool ok = ParseFileName(live_files[i], &number, &type); if (!ok) { s = STATUS(Corruption, "Can't parse file name. This is very bad"); break; } // we should only get sst, manifest and current files here assert(type == kTableFile || type == kTableSBlockFile || type == kDescriptorFile || type == kCurrentFile); assert(live_files[i].size() > 0 && live_files[i][0] == '/'); std::string src_fname = live_files[i]; // rules: // * if it's kTableFile or kTableSBlockFile, then it's shared // * if it's kDescriptorFile, limit the size to manifest_file_size // * always copy if cross-device link bool is_table_file = type == kTableFile || type == kTableSBlockFile; if (is_table_file && same_fs) { RLOG(db->GetOptions().info_log, "Hard Linking %s", src_fname.c_str()); s = db->GetCheckpointEnv()->LinkFile(db->GetName() + src_fname, full_private_path + src_fname); if (s.IsNotSupported()) { same_fs = false; s = Status::OK(); } } if (!is_table_file || !same_fs) { RLOG(db->GetOptions().info_log, "Copying %s", src_fname.c_str()); std::string dest_name = full_private_path + src_fname; s = CopyFile(db->GetCheckpointEnv(), db->GetName() + src_fname, dest_name, type == kDescriptorFile ? manifest_file_size : 0); } } RLOG(db->GetOptions().info_log, "Number of log files %" ROCKSDB_PRIszt, live_wal_files.size()); // Link WAL files. Copy exact size of last one because it is the only one // that has changes after the last flush. for (size_t i = 0; s.ok() && i < wal_size; ++i) { if ((live_wal_files[i]->Type() == kAliveLogFile) && (live_wal_files[i]->StartSequence() >= sequence_number)) { if (i + 1 == wal_size) { RLOG(db->GetOptions().info_log, "Copying %s", live_wal_files[i]->PathName().c_str()); s = CopyFile(db->GetCheckpointEnv(), db->GetOptions().wal_dir + live_wal_files[i]->PathName(), full_private_path + live_wal_files[i]->PathName(), live_wal_files[i]->SizeFileBytes()); break; } if (same_fs) { // we only care about live log files RLOG(db->GetOptions().info_log, "Hard Linking %s", live_wal_files[i]->PathName().c_str()); s = db->GetCheckpointEnv()->LinkFile( db->GetOptions().wal_dir + live_wal_files[i]->PathName(), full_private_path + live_wal_files[i]->PathName()); if (s.IsNotSupported()) { same_fs = false; s = Status::OK(); } } if (!same_fs) { RLOG(db->GetOptions().info_log, "Copying %s", live_wal_files[i]->PathName().c_str()); s = CopyFile(db->GetCheckpointEnv(), db->GetOptions().wal_dir + live_wal_files[i]->PathName(), full_private_path + live_wal_files[i]->PathName(), 0); } } } // we copied all the files, enable file deletions RETURN_NOT_OK(db->EnableFileDeletions(false)); if (s.ok()) { if (delete_checkpoint_dir) { const Status s_del = DeleteRecursively(db->GetCheckpointEnv(), checkpoint_dir); RLOG( db->GetOptions().info_log, "Deleted dir %s -- %s", checkpoint_dir.c_str(), s_del.ToString().c_str()); } // move tmp private backup to real snapshot directory s = db->GetCheckpointEnv()->RenameFile(full_private_path, checkpoint_dir); } if (s.ok()) { unique_ptr<Directory> checkpoint_directory; RETURN_NOT_OK(db->GetCheckpointEnv()->NewDirectory(checkpoint_dir, &checkpoint_directory)); if (checkpoint_directory != nullptr) { s = checkpoint_directory->Fsync(); } } if (!s.ok()) { // clean all the files we might have created RLOG(db->GetOptions().info_log, "Snapshot failed -- %s", s.ToString().c_str()); // we have to delete the dir and all its children const Status s_del = DeleteRecursively(db->GetCheckpointEnv(), full_private_path); RLOG( db->GetOptions().info_log, "Deleted dir %s -- %s", full_private_path.c_str(), s_del.ToString().c_str()); return s; } // here we know that we succeeded and installed the new snapshot RLOG(db->GetOptions().info_log, "Checkpoint DONE. All is good"); RLOG(db->GetOptions().info_log, "Checkpoint sequence number: %" PRIu64, sequence_number); return s; } } // namespace checkpoint } // namespace rocksdb #endif // ROCKSDB_LITE
{ "pile_set_name": "Github" }
<?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInit2db7e2fa11a5b7e8309e5b34a51b960e { public static $files = array ( '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'd767e4fc2dc52fe66584ab8c6684783e' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/helpers.php', '65fec9ebcfbb3cbb4fd0d519687aea01' => __DIR__ . '/..' . '/danielstjules/stringy/src/Create.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', 'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php', '66453932bc1be9fb2f910a27947d11b6' => __DIR__ . '/..' . '/alibabacloud/client/src/Functions.php', ); public static $prefixLengthsPsr4 = array ( 'c' => array ( 'clagiordano\\weblibs\\configmanager\\' => 34, ), 'S' => array ( 'Symfony\\Polyfill\\Mbstring\\' => 26, 'Stringy\\' => 8, ), 'Q' => array ( 'Qcloud\\Sms\\' => 11, ), 'P' => array ( 'Psr\\Http\\Message\\' => 17, 'PHPMailer\\PHPMailer\\' => 20, ), 'O' => array ( 'OSS\\' => 4, ), 'J' => array ( 'JmesPath\\' => 9, ), 'I' => array ( 'Intervention\\Image\\' => 19, ), 'G' => array ( 'GuzzleHttp\\Psr7\\' => 16, 'GuzzleHttp\\Promise\\' => 19, 'GuzzleHttp\\' => 11, ), 'A' => array ( 'AlibabaCloud\\Client\\' => 20, 'Adbar\\' => 6, ), ); public static $prefixDirsPsr4 = array ( 'clagiordano\\weblibs\\configmanager\\' => array ( 0 => __DIR__ . '/..' . '/clagiordano/weblibs-configmanager/src', ), 'Symfony\\Polyfill\\Mbstring\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', ), 'Stringy\\' => array ( 0 => __DIR__ . '/..' . '/danielstjules/stringy/src', ), 'Qcloud\\Sms\\' => array ( 0 => __DIR__ . '/..' . '/qcloudsms/qcloudsms_php/src', ), 'Psr\\Http\\Message\\' => array ( 0 => __DIR__ . '/..' . '/psr/http-message/src', ), 'PHPMailer\\PHPMailer\\' => array ( 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', ), 'OSS\\' => array ( 0 => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS', ), 'JmesPath\\' => array ( 0 => __DIR__ . '/..' . '/mtdowling/jmespath.php/src', ), 'Intervention\\Image\\' => array ( 0 => __DIR__ . '/..' . '/intervention/image/src/Intervention/Image', ), 'GuzzleHttp\\Psr7\\' => array ( 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', ), 'GuzzleHttp\\Promise\\' => array ( 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', ), 'GuzzleHttp\\' => array ( 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', ), 'AlibabaCloud\\Client\\' => array ( 0 => __DIR__ . '/..' . '/alibabacloud/client/src', ), 'Adbar\\' => array ( 0 => __DIR__ . '/..' . '/adbario/php-dot-notation/src', ), ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInit2db7e2fa11a5b7e8309e5b34a51b960e::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit2db7e2fa11a5b7e8309e5b34a51b960e::$prefixDirsPsr4; }, null, ClassLoader::class); } }
{ "pile_set_name": "Github" }
## Sum ``` Sum(expr, {i, imin, imax}) ``` > evaluates the discrete sum of `expr` with `i` ranging from `imin` to `imax`. ``` Sum(expr, {i, imin, imax, di}) ``` > `i` ranges from `imin` to `imax` in steps of `di`. ``` Sum(expr, {i, imin, imax}, {j, jmin, jmax}, ...) ``` > evaluates `expr` as a multiple sum, with `{i, ...}, {j, ...}, ...` being in outermost-to-innermost order. See * [Wikipedia - Summation](https://en.wikipedia.org/wiki/Summation) ### Examples ``` >> Sum(k, {k, 1, 10}) 55 ``` Double sum: ``` >> Sum(i * j, {i, 1, 10}, {j, 1, 10}) 3025 ``` Symbolic sums are evaluated: ``` >> Sum(k, {k, 1, n}) 1/2*n*(1+n) >> Sum(k, {k, n, 2*n}) 3/2*n*(1+n) >> Sum(k, {k, I, I + 1}) 1+I*2 >> Sum(1 / k ^ 2, {k, 1, n}) HarmonicNumber(n, 2) ``` Verify algebraic identities: ``` >> Simplify(Sum(x ^ 2, {x, 1, y}) - y * (y + 1) * (2 * y + 1) / 6) 0 ``` Infinite sums: ``` >> Sum(1 / 2 ^ i, {i, 1, Infinity}) 1 >> Sum(1 / k ^ 2, {k, 1, Infinity}) Pi^2/6 >> Sum(x^k*Sum(y^l,{l,0,4}),{k,0,4})) 1+y+y^2+y^3+y^4+x*(1+y+y^2+y^3+y^4)+(1+y+y^2+y^3+y^4)*x^2+(1+y+y^2+y^3+y^4)*x^3+(1+y+y^2+y^3+y^4)*x^4 >> Sum(2^(-i), {i, 1, Infinity}) 1 >> Sum(i / Log(i), {i, 1, Infinity}) Sum(i/Log(i),{i,1,Infinity}) >> Sum(Cos(Pi i), {i, 1, Infinity}) Sum(Cos(i*Pi),{i,1,Infinity}) ```
{ "pile_set_name": "Github" }
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # database schema. If you need to create the application database on another # system, you should be using db:schema:load, not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20161021125616) do create_table "conversations", force: :cascade do |t| t.integer "author_id" t.integer "receiver_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["author_id", "receiver_id"], name: "index_conversations_on_author_id_and_receiver_id", unique: true t.index ["author_id"], name: "index_conversations_on_author_id" t.index ["receiver_id"], name: "index_conversations_on_receiver_id" end create_table "personal_messages", force: :cascade do |t| t.text "body" t.integer "conversation_id" t.integer "user_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["conversation_id"], name: "index_personal_messages_on_conversation_id" t.index ["user_id"], name: "index_personal_messages_on_user_id" end create_table "users", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end end
{ "pile_set_name": "Github" }
<?php /* * Copyright 2014 Google 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. */ /** * The "beaconinfo" collection of methods. * Typical usage is: * <code> * $proximitybeaconService = new Google_Service_Proximitybeacon(...); * $beaconinfo = $proximitybeaconService->beaconinfo; * </code> */ class Google_Service_Proximitybeacon_Resource_Beaconinfo extends Google_Service_Resource { /** * Given one or more beacon observations, returns any beacon information and * attachments accessible to your application. Authorize by using the [API * key](https://developers.google.com/beacons/proximity/get- * started#request_a_browser_api_key) for the application. * (beaconinfo.getforobserved) * * @param Google_Service_Proximitybeacon_GetInfoForObservedBeaconsRequest $postBody * @param array $optParams Optional parameters. * @return Google_Service_Proximitybeacon_GetInfoForObservedBeaconsResponse */ public function getforobserved(Google_Service_Proximitybeacon_GetInfoForObservedBeaconsRequest $postBody, $optParams = array()) { $params = array('postBody' => $postBody); $params = array_merge($params, $optParams); return $this->call('getforobserved', array($params), "Google_Service_Proximitybeacon_GetInfoForObservedBeaconsResponse"); } }
{ "pile_set_name": "Github" }
# Makefile.in generated by automake 1.14.1 from Makefile.am. # packages/Linux/RPM/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/curl pkgincludedir = $(includedir)/curl pkglibdir = $(libdir)/curl pkglibexecdir = $(libexecdir)/curl am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = x86_64-unknown-linux-gnu host_triplet = x86_64-unknown-linux-gnu subdir = packages/Linux/RPM DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(srcdir)/curl.spec.in \ $(srcdir)/curl-ssl.spec.in README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ $(top_srcdir)/m4/curl-confopts.m4 \ $(top_srcdir)/m4/curl-functions.m4 \ $(top_srcdir)/m4/curl-openssl.m4 \ $(top_srcdir)/m4/curl-override.m4 \ $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/xc-am-iface.m4 \ $(top_srcdir)/m4/xc-cc-check.m4 \ $(top_srcdir)/m4/xc-lt-iface.m4 \ $(top_srcdir)/m4/xc-translit.m4 \ $(top_srcdir)/m4/xc-val-flgs.m4 \ $(top_srcdir)/m4/zz40-xc-ovr.m4 \ $(top_srcdir)/m4/zz50-xc-ovr.m4 \ $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ $(top_builddir)/include/curl/curlbuild.h CONFIG_CLEAN_FILES = curl.spec curl-ssl.spec CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_$(V)) am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = ${SHELL} "/home/sniper/SurviveServer/deps/curl-7.38.0/missing" --run aclocal-1.14 AMTAR = $${TAR-tar} AM_DEFAULT_VERBOSITY = 1 AR = /usr/bin/ar AS = as AUTOCONF = ${SHELL} "/home/sniper/SurviveServer/deps/curl-7.38.0/missing" --run autoconf AUTOHEADER = ${SHELL} "/home/sniper/SurviveServer/deps/curl-7.38.0/missing" --run autoheader AUTOMAKE = ${SHELL} "/home/sniper/SurviveServer/deps/curl-7.38.0/missing" --run automake-1.14 AWK = mawk BLANK_AT_MAKETIME = CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -O2 -Wno-system-headers CFLAG_CURL_SYMBOL_HIDING = -fvisibility=hidden CONFIGURE_OPTIONS = "" CPP = gcc -E CPPFLAGS = CPPFLAG_CURL_STATICLIB = CURLVERSION = 7.38.0 CURL_CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt" CURL_CFLAG_EXTRAS = CURL_DISABLE_DICT = CURL_DISABLE_FILE = CURL_DISABLE_FTP = CURL_DISABLE_GOPHER = CURL_DISABLE_HTTP = CURL_DISABLE_IMAP = CURL_DISABLE_LDAP = 1 CURL_DISABLE_LDAPS = 1 CURL_DISABLE_POP3 = CURL_DISABLE_PROXY = CURL_DISABLE_RTSP = CURL_DISABLE_SMTP = CURL_DISABLE_TELNET = CURL_DISABLE_TFTP = CURL_LT_SHLIB_VERSIONED_FLAVOUR = CURL_NETWORK_AND_TIME_LIBS = CURL_NETWORK_LIBS = CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DLLTOOL = false DSYMUTIL = DUMPBIN = ECHO_C = ECHO_N = -n ECHO_T = EGREP = /bin/grep -E ENABLE_SHARED = yes ENABLE_STATIC = yes EXEEXT = FGREP = /bin/grep -F GREP = /bin/grep HAVE_GNUTLS_SRP = HAVE_LDAP_SSL = 1 HAVE_LIBZ = 1 HAVE_SSLEAY_SRP = 1 IDN_ENABLED = INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s IPV6_ENABLED = 1 LD = /usr/bin/ld -m elf_x86_64 LDFLAGS = LIBCURL_LIBS = -lssl -lcrypto -lssl -lcrypto -lz LIBMETALINK_CPPFLAGS = LIBMETALINK_LDFLAGS = LIBMETALINK_LIBS = LIBOBJS = LIBS = -lssl -lcrypto -lssl -lcrypto -lz LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s LTLIBOBJS = MAINT = # MAKEINFO = ${SHELL} "/home/sniper/SurviveServer/deps/curl-7.38.0/missing" --run makeinfo MANIFEST_TOOL = : MANOPT = -man MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = NROFF = /usr/bin/nroff NSS_LIBS = OBJDUMP = objdump OBJEXT = o OTOOL = OTOOL64 = PACKAGE = curl PACKAGE_BUGREPORT = a suitable curl mailing list: http://curl.haxx.se/mail/ PACKAGE_NAME = curl PACKAGE_STRING = curl - PACKAGE_TARNAME = curl PACKAGE_URL = PACKAGE_VERSION = - PATH_SEPARATOR = : PERL = /usr/bin/perl PKGADD_NAME = cURL - a client that groks URLs PKGADD_PKG = HAXXcurl PKGADD_VENDOR = curl.haxx.se PKGCONFIG = no RANDOM_FILE = /dev/urandom RANLIB = ranlib REQUIRE_LIB_DEPS = no SED = /bin/sed SET_MAKE = SHELL = /bin/bash SSL_ENABLED = 1 STRIP = strip SUPPORT_FEATURES = SSL IPv6 libz NTLM NTLM_WB TLS-SRP SUPPORT_PROTOCOLS = DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP USE_ARES = USE_AXTLS = USE_CYASSL = USE_DARWINSSL = USE_GNUTLS = USE_GNUTLS_NETTLE = USE_LIBRTMP = USE_LIBSSH2 = USE_NGHTTP2 = USE_NSS = USE_OPENLDAP = USE_POLARSSL = USE_SCHANNEL = USE_SSLEAY = 1 USE_WINDOWS_SSPI = VERSION = - VERSIONNUM = 072600 ZLIB_LIBS = -lz abs_builddir = /home/sniper/SurviveServer/deps/curl-7.38.0/packages/Linux/RPM abs_srcdir = /home/sniper/SurviveServer/deps/curl-7.38.0/packages/Linux/RPM abs_top_builddir = /home/sniper/SurviveServer/deps/curl-7.38.0 abs_top_srcdir = /home/sniper/SurviveServer/deps/curl-7.38.0 ac_ct_AR = ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include am__leading_dot = . am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin build = x86_64-unknown-linux-gnu build_alias = build_cpu = x86_64 build_os = linux-gnu build_vendor = unknown builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} host = x86_64-unknown-linux-gnu host_alias = host_cpu = x86_64 host_os = linux-gnu host_vendor = unknown htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /home/sniper/SurviveServer/deps/curl-7.38.0/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec libext = a localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include pdfdir = ${docdir} prefix = /usr/local program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com srcdir = . subdirs = sysconfdir = ${prefix}/etc target_alias = top_build_prefix = ../../../ top_builddir = ../../.. top_srcdir = ../../.. EXTRA_DIST = README curl-ssl.spec.in curl.spec.in make_curl_rpm all: all-am .SUFFIXES: $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Linux/RPM/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu packages/Linux/RPM/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: # $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): curl.spec: $(top_builddir)/config.status $(srcdir)/curl.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ curl-ssl.spec: $(top_builddir)/config.status $(srcdir)/curl-ssl.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT:
{ "pile_set_name": "Github" }
// To regenerate api.pb.go run hack/update-generated-runtime.sh syntax = 'proto3'; package runtime.v1alpha2; option go_package = "v1alpha2"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = true; option (gogoproto.goproto_getters_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; option (gogoproto.goproto_unrecognized_all) = false; // Runtime service defines the public APIs for remote container runtimes service RuntimeService { // Version returns the runtime name, runtime version, and runtime API version. rpc Version(VersionRequest) returns (VersionResponse) {} // RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure // the sandbox is in the ready state on success. rpc RunPodSandbox(RunPodSandboxRequest) returns (RunPodSandboxResponse) {} // StopPodSandbox stops any running process that is part of the sandbox and // reclaims network resources (e.g., IP addresses) allocated to the sandbox. // If there are any running containers in the sandbox, they must be forcibly // terminated. // This call is idempotent, and must not return an error if all relevant // resources have already been reclaimed. kubelet will call StopPodSandbox // at least once before calling RemovePodSandbox. It will also attempt to // reclaim resources eagerly, as soon as a sandbox is not needed. Hence, // multiple StopPodSandbox calls are expected. rpc StopPodSandbox(StopPodSandboxRequest) returns (StopPodSandboxResponse) {} // RemovePodSandbox removes the sandbox. If there are any running containers // in the sandbox, they must be forcibly terminated and removed. // This call is idempotent, and must not return an error if the sandbox has // already been removed. rpc RemovePodSandbox(RemovePodSandboxRequest) returns (RemovePodSandboxResponse) {} // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not // present, returns an error. rpc PodSandboxStatus(PodSandboxStatusRequest) returns (PodSandboxStatusResponse) {} // ListPodSandbox returns a list of PodSandboxes. rpc ListPodSandbox(ListPodSandboxRequest) returns (ListPodSandboxResponse) {} // CreateContainer creates a new container in specified PodSandbox rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {} // StartContainer starts the container. rpc StartContainer(StartContainerRequest) returns (StartContainerResponse) {} // StopContainer stops a running container with a grace period (i.e., timeout). // This call is idempotent, and must not return an error if the container has // already been stopped. // TODO: what must the runtime do after the grace period is reached? rpc StopContainer(StopContainerRequest) returns (StopContainerResponse) {} // RemoveContainer removes the container. If the container is running, the // container must be forcibly removed. // This call is idempotent, and must not return an error if the container has // already been removed. rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse) {} // ListContainers lists all containers by filters. rpc ListContainers(ListContainersRequest) returns (ListContainersResponse) {} // ContainerStatus returns status of the container. If the container is not // present, returns an error. rpc ContainerStatus(ContainerStatusRequest) returns (ContainerStatusResponse) {} // UpdateContainerResources updates ContainerConfig of the container. rpc UpdateContainerResources(UpdateContainerResourcesRequest) returns (UpdateContainerResourcesResponse) {} // ReopenContainerLog asks runtime to reopen the stdout/stderr log file // for the container. This is often called after the log file has been // rotated. If the container is not running, container runtime can choose // to either create a new log file and return nil, or return an error. // Once it returns error, new container log file MUST NOT be created. rpc ReopenContainerLog(ReopenContainerLogRequest) returns (ReopenContainerLogResponse) {} // ExecSync runs a command in a container synchronously. rpc ExecSync(ExecSyncRequest) returns (ExecSyncResponse) {} // Exec prepares a streaming endpoint to execute a command in the container. rpc Exec(ExecRequest) returns (ExecResponse) {} // Attach prepares a streaming endpoint to attach to a running container. rpc Attach(AttachRequest) returns (AttachResponse) {} // PortForward prepares a streaming endpoint to forward ports from a PodSandbox. rpc PortForward(PortForwardRequest) returns (PortForwardResponse) {} // ContainerStats returns stats of the container. If the container does not // exist, the call returns an error. rpc ContainerStats(ContainerStatsRequest) returns (ContainerStatsResponse) {} // ListContainerStats returns stats of all running containers. rpc ListContainerStats(ListContainerStatsRequest) returns (ListContainerStatsResponse) {} // UpdateRuntimeConfig updates the runtime configuration based on the given request. rpc UpdateRuntimeConfig(UpdateRuntimeConfigRequest) returns (UpdateRuntimeConfigResponse) {} // Status returns the status of the runtime. rpc Status(StatusRequest) returns (StatusResponse) {} } // ImageService defines the public APIs for managing images. service ImageService { // ListImages lists existing images. rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {} // ImageStatus returns the status of the image. If the image is not // present, returns a response with ImageStatusResponse.Image set to // nil. rpc ImageStatus(ImageStatusRequest) returns (ImageStatusResponse) {} // PullImage pulls an image with authentication config. rpc PullImage(PullImageRequest) returns (PullImageResponse) {} // RemoveImage removes the image. // This call is idempotent, and must not return an error if the image has // already been removed. rpc RemoveImage(RemoveImageRequest) returns (RemoveImageResponse) {} // ImageFSInfo returns information of the filesystem that is used to store images. rpc ImageFsInfo(ImageFsInfoRequest) returns (ImageFsInfoResponse) {} } message VersionRequest { // Version of the kubelet runtime API. string version = 1; } message VersionResponse { // Version of the kubelet runtime API. string version = 1; // Name of the container runtime. string runtime_name = 2; // Version of the container runtime. The string must be // semver-compatible. string runtime_version = 3; // API version of the container runtime. The string must be // semver-compatible. string runtime_api_version = 4; } // DNSConfig specifies the DNS servers and search domains of a sandbox. message DNSConfig { // List of DNS servers of the cluster. repeated string servers = 1; // List of DNS search domains of the cluster. repeated string searches = 2; // List of DNS options. See https://linux.die.net/man/5/resolv.conf // for all available options. repeated string options = 3; } enum Protocol { TCP = 0; UDP = 1; SCTP = 2; } // PortMapping specifies the port mapping configurations of a sandbox. message PortMapping { // Protocol of the port mapping. Protocol protocol = 1; // Port number within the container. Default: 0 (not specified). int32 container_port = 2; // Port number on the host. Default: 0 (not specified). int32 host_port = 3; // Host IP. string host_ip = 4; } enum MountPropagation { // No mount propagation ("private" in Linux terminology). PROPAGATION_PRIVATE = 0; // Mounts get propagated from the host to the container ("rslave" in Linux). PROPAGATION_HOST_TO_CONTAINER = 1; // Mounts get propagated from the host to the container and from the // container to the host ("rshared" in Linux). PROPAGATION_BIDIRECTIONAL = 2; } // Mount specifies a host volume to mount into a container. message Mount { // Path of the mount within the container. string container_path = 1; // Path of the mount on the host. If the hostPath doesn't exist, then runtimes // should report error. If the hostpath is a symbolic link, runtimes should // follow the symlink and mount the real destination to container. string host_path = 2; // If set, the mount is read-only. bool readonly = 3; // If set, the mount needs SELinux relabeling. bool selinux_relabel = 4; // Requested propagation mode. MountPropagation propagation = 5; } // A NamespaceMode describes the intended namespace configuration for each // of the namespaces (Network, PID, IPC) in NamespaceOption. Runtimes should // map these modes as appropriate for the technology underlying the runtime. enum NamespaceMode { // A POD namespace is common to all containers in a pod. // For example, a container with a PID namespace of POD expects to view // all of the processes in all of the containers in the pod. POD = 0; // A CONTAINER namespace is restricted to a single container. // For example, a container with a PID namespace of CONTAINER expects to // view only the processes in that container. CONTAINER = 1; // A NODE namespace is the namespace of the Kubernetes node. // For example, a container with a PID namespace of NODE expects to view // all of the processes on the host running the kubelet. NODE = 2; } // NamespaceOption provides options for Linux namespaces. message NamespaceOption { // Network namespace for this container/sandbox. // Note: There is currently no way to set CONTAINER scoped network in the Kubernetes API. // Namespaces currently set by the kubelet: POD, NODE NamespaceMode network = 1; // PID namespace for this container/sandbox. // Note: The CRI default is POD, but the v1.PodSpec default is CONTAINER. // The kubelet's runtime manager will set this to CONTAINER explicitly for v1 pods. // Namespaces currently set by the kubelet: POD, CONTAINER, NODE NamespaceMode pid = 2; // IPC namespace for this container/sandbox. // Note: There is currently no way to set CONTAINER scoped IPC in the Kubernetes API. // Namespaces currently set by the kubelet: POD, NODE NamespaceMode ipc = 3; } // Int64Value is the wrapper of int64. message Int64Value { // The value. int64 value = 1; } // LinuxSandboxSecurityContext holds linux security configuration that will be // applied to a sandbox. Note that: // 1) It does not apply to containers in the pods. // 2) It may not be applicable to a PodSandbox which does not contain any running // process. message LinuxSandboxSecurityContext { // Configurations for the sandbox's namespaces. // This will be used only if the PodSandbox uses namespace for isolation. NamespaceOption namespace_options = 1; // Optional SELinux context to be applied. SELinuxOption selinux_options = 2; // UID to run sandbox processes as, when applicable. Int64Value run_as_user = 3; // GID to run sandbox processes as, when applicable. run_as_group should only // be specified when run_as_user is specified; otherwise, the runtime MUST error. Int64Value run_as_group = 8; // If set, the root filesystem of the sandbox is read-only. bool readonly_rootfs = 4; // List of groups applied to the first process run in the sandbox, in // addition to the sandbox's primary GID. repeated int64 supplemental_groups = 5; // Indicates whether the sandbox will be asked to run a privileged // container. If a privileged container is to be executed within it, this // MUST be true. // This allows a sandbox to take additional security precautions if no // privileged containers are expected to be run. bool privileged = 6; // Seccomp profile for the sandbox, candidate values are: // * runtime/default: the default profile for the container runtime // * unconfined: unconfined profile, ie, no seccomp sandboxing // * localhost/<full-path-to-profile>: the profile installed on the node. // <full-path-to-profile> is the full path of the profile. // Default: "", which is identical with unconfined. string seccomp_profile_path = 7; } // LinuxPodSandboxConfig holds platform-specific configurations for Linux // host platforms and Linux-based containers. message LinuxPodSandboxConfig { // Parent cgroup of the PodSandbox. // The cgroupfs style syntax will be used, but the container runtime can // convert it to systemd semantics if needed. string cgroup_parent = 1; // LinuxSandboxSecurityContext holds sandbox security attributes. LinuxSandboxSecurityContext security_context = 2; // Sysctls holds linux sysctls config for the sandbox. map<string, string> sysctls = 3; } // PodSandboxMetadata holds all necessary information for building the sandbox name. // The container runtime is encouraged to expose the metadata associated with the // PodSandbox in its user interface for better user experience. For example, // the runtime can construct a unique PodSandboxName based on the metadata. message PodSandboxMetadata { // Pod name of the sandbox. Same as the pod name in the PodSpec. string name = 1; // Pod UID of the sandbox. Same as the pod UID in the PodSpec. string uid = 2; // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. string namespace = 3; // Attempt number of creating the sandbox. Default: 0. uint32 attempt = 4; } // PodSandboxConfig holds all the required and optional fields for creating a // sandbox. message PodSandboxConfig { // Metadata of the sandbox. This information will uniquely identify the // sandbox, and the runtime should leverage this to ensure correct // operation. The runtime may also use this information to improve UX, such // as by constructing a readable name. PodSandboxMetadata metadata = 1; // Hostname of the sandbox. string hostname = 2; // Path to the directory on the host in which container log files are // stored. // By default the log of a container going into the LogDirectory will be // hooked up to STDOUT and STDERR. However, the LogDirectory may contain // binary log files with structured logging data from the individual // containers. For example, the files might be newline separated JSON // structured logs, systemd-journald journal files, gRPC trace files, etc. // E.g., // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/` // ContainerConfig.LogPath = `containerName/Instance#.log` // // WARNING: Log management and how kubelet should interface with the // container logs are under active discussion in // https://issues.k8s.io/24677. There *may* be future change of direction // for logging as the discussion carries on. string log_directory = 3; // DNS config for the sandbox. DNSConfig dns_config = 4; // Port mappings for the sandbox. repeated PortMapping port_mappings = 5; // Key-value pairs that may be used to scope and select individual resources. map<string, string> labels = 6; // Unstructured key-value map that may be set by the kubelet to store and // retrieve arbitrary metadata. This will include any annotations set on a // pod through the Kubernetes API. // // Annotations MUST NOT be altered by the runtime; the annotations stored // here MUST be returned in the PodSandboxStatus associated with the pod // this PodSandboxConfig creates. // // In general, in order to preserve a well-defined interface between the // kubelet and the container runtime, annotations SHOULD NOT influence // runtime behaviour. // // Annotations can also be useful for runtime authors to experiment with // new features that are opaque to the Kubernetes APIs (both user-facing // and the CRI). Whenever possible, however, runtime authors SHOULD // consider proposing new typed fields for any new features instead. map<string, string> annotations = 7; // Optional configurations specific to Linux hosts. LinuxPodSandboxConfig linux = 8; } message RunPodSandboxRequest { // Configuration for creating a PodSandbox. PodSandboxConfig config = 1; // Named runtime configuration to use for this PodSandbox. // If the runtime handler is unknown, this request should be rejected. An // empty string should select the default handler, equivalent to the // behavior before this feature was added. // See https://git.k8s.io/community/keps/sig-node/0014-runtime-class.md string runtime_handler = 2; } message RunPodSandboxResponse { // ID of the PodSandbox to run. string pod_sandbox_id = 1; } message StopPodSandboxRequest { // ID of the PodSandbox to stop. string pod_sandbox_id = 1; } message StopPodSandboxResponse {} message RemovePodSandboxRequest { // ID of the PodSandbox to remove. string pod_sandbox_id = 1; } message RemovePodSandboxResponse {} message PodSandboxStatusRequest { // ID of the PodSandbox for which to retrieve status. string pod_sandbox_id = 1; // Verbose indicates whether to return extra information about the pod sandbox. bool verbose = 2; } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. message PodSandboxNetworkStatus { // IP address of the PodSandbox. string ip = 1; } // Namespace contains paths to the namespaces. message Namespace { // Namespace options for Linux namespaces. NamespaceOption options = 2; } // LinuxSandboxStatus contains status specific to Linux sandboxes. message LinuxPodSandboxStatus { // Paths to the sandbox's namespaces. Namespace namespaces = 1; } enum PodSandboxState { SANDBOX_READY = 0; SANDBOX_NOTREADY = 1; } // PodSandboxStatus contains the status of the PodSandbox. message PodSandboxStatus { // ID of the sandbox. string id = 1; // Metadata of the sandbox. PodSandboxMetadata metadata = 2; // State of the sandbox. PodSandboxState state = 3; // Creation timestamp of the sandbox in nanoseconds. Must be > 0. int64 created_at = 4; // Network contains network status if network is handled by the runtime. PodSandboxNetworkStatus network = 5; // Linux-specific status to a pod sandbox. LinuxPodSandboxStatus linux = 6; // Labels are key-value pairs that may be used to scope and select individual resources. map<string, string> labels = 7; // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding PodSandboxConfig used to // instantiate the pod sandbox this status represents. map<string, string> annotations = 8; } message PodSandboxStatusResponse { // Status of the PodSandbox. PodSandboxStatus status = 1; // Info is extra information of the PodSandbox. The key could be arbitrary string, and // value should be in json format. The information could include anything useful for // debug, e.g. network namespace for linux container based container runtime. // It should only be returned non-empty when Verbose is true. map<string, string> info = 2; } // PodSandboxStateValue is the wrapper of PodSandboxState. message PodSandboxStateValue { // State of the sandbox. PodSandboxState state = 1; } // PodSandboxFilter is used to filter a list of PodSandboxes. // All those fields are combined with 'AND' message PodSandboxFilter { // ID of the sandbox. string id = 1; // State of the sandbox. PodSandboxStateValue state = 2; // LabelSelector to select matches. // Only api.MatchLabels is supported for now and the requirements // are ANDed. MatchExpressions is not supported yet. map<string, string> label_selector = 3; } message ListPodSandboxRequest { // PodSandboxFilter to filter a list of PodSandboxes. PodSandboxFilter filter = 1; } // PodSandbox contains minimal information about a sandbox. message PodSandbox { // ID of the PodSandbox. string id = 1; // Metadata of the PodSandbox. PodSandboxMetadata metadata = 2; // State of the PodSandbox. PodSandboxState state = 3; // Creation timestamps of the PodSandbox in nanoseconds. Must be > 0. int64 created_at = 4; // Labels of the PodSandbox. map<string, string> labels = 5; // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding PodSandboxConfig used to // instantiate this PodSandbox. map<string, string> annotations = 6; } message ListPodSandboxResponse { // List of PodSandboxes. repeated PodSandbox items = 1; } // ImageSpec is an internal representation of an image. Currently, it wraps the // value of a Container's Image field (e.g. imageID or imageDigest), but in the // future it will include more detailed information about the different image types. message ImageSpec { string image = 1; } message KeyValue { string key = 1; string value = 2; } // LinuxContainerResources specifies Linux specific configuration for // resources. // TODO: Consider using Resources from opencontainers/runtime-spec/specs-go // directly. message LinuxContainerResources { // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). int64 cpu_period = 1; // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). int64 cpu_quota = 2; // CPU shares (relative weight vs. other containers). Default: 0 (not specified). int64 cpu_shares = 3; // Memory limit in bytes. Default: 0 (not specified). int64 memory_limit_in_bytes = 4; // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). int64 oom_score_adj = 5; // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified). string cpuset_cpus = 6; // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified). string cpuset_mems = 7; } // SELinuxOption are the labels to be applied to the container. message SELinuxOption { string user = 1; string role = 2; string type = 3; string level = 4; } // Capability contains the container capabilities to add or drop message Capability { // List of capabilities to add. repeated string add_capabilities = 1; // List of capabilities to drop. repeated string drop_capabilities = 2; } // LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. message LinuxContainerSecurityContext { // Capabilities to add or drop. Capability capabilities = 1; // If set, run container in privileged mode. // Privileged mode is incompatible with the following options. If // privileged is set, the following features MAY have no effect: // 1. capabilities // 2. selinux_options // 4. seccomp // 5. apparmor // // Privileged mode implies the following specific options are applied: // 1. All capabilities are added. // 2. Sensitive paths, such as kernel module paths within sysfs, are not masked. // 3. Any sysfs and procfs mounts are mounted RW. // 4. Apparmor confinement is not applied. // 5. Seccomp restrictions are not applied. // 6. The device cgroup does not restrict access to any devices. // 7. All devices from the host's /dev are available within the container. // 8. SELinux restrictions are not applied (e.g. label=disabled). bool privileged = 2; // Configurations for the container's namespaces. // Only used if the container uses namespace for isolation. NamespaceOption namespace_options = 3; // SELinux context to be optionally applied. SELinuxOption selinux_options = 4; // UID to run the container process as. Only one of run_as_user and // run_as_username can be specified at a time. Int64Value run_as_user = 5; // GID to run the container process as. run_as_group should only be specified // when run_as_user or run_as_username is specified; otherwise, the runtime // MUST error. Int64Value run_as_group = 12; // User name to run the container process as. If specified, the user MUST // exist in the container image (i.e. in the /etc/passwd inside the image), // and be resolved there by the runtime; otherwise, the runtime MUST error. string run_as_username = 6; // If set, the root filesystem of the container is read-only. bool readonly_rootfs = 7; // List of groups applied to the first process run in the container, in // addition to the container's primary GID. repeated int64 supplemental_groups = 8; // AppArmor profile for the container, candidate values are: // * runtime/default: equivalent to not specifying a profile. // * unconfined: no profiles are loaded // * localhost/<profile_name>: profile loaded on the node // (localhost) by name. The possible profile names are detailed at // http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference string apparmor_profile = 9; // Seccomp profile for the container, candidate values are: // * runtime/default: the default profile for the container runtime // * unconfined: unconfined profile, ie, no seccomp sandboxing // * localhost/<full-path-to-profile>: the profile installed on the node. // <full-path-to-profile> is the full path of the profile. // Default: "", which is identical with unconfined. string seccomp_profile_path = 10; // no_new_privs defines if the flag for no_new_privs should be set on the // container. bool no_new_privs = 11; // masked_paths is a slice of paths that should be masked by the container // runtime, this can be passed directly to the OCI spec. repeated string masked_paths = 13; // readonly_paths is a slice of paths that should be set as readonly by the // container runtime, this can be passed directly to the OCI spec. repeated string readonly_paths = 14; } // LinuxContainerConfig contains platform-specific configuration for // Linux-based containers. message LinuxContainerConfig { // Resources specification for the container. LinuxContainerResources resources = 1; // LinuxContainerSecurityContext configuration for the container. LinuxContainerSecurityContext security_context = 2; } // WindowsContainerSecurityContext holds windows security configuration that will be applied to a container. message WindowsContainerSecurityContext { // User name to run the container process as. If specified, the user MUST // exist in the container image and be resolved there by the runtime; // otherwise, the runtime MUST return error. string run_as_username = 1; } // WindowsContainerConfig contains platform-specific configuration for // Windows-based containers. message WindowsContainerConfig { // Resources specification for the container. WindowsContainerResources resources = 1; // WindowsContainerSecurityContext configuration for the container. WindowsContainerSecurityContext security_context = 2; } // WindowsContainerResources specifies Windows specific configuration for // resources. message WindowsContainerResources { // CPU shares (relative weight vs. other containers). Default: 0 (not specified). int64 cpu_shares = 1; // Number of CPUs available to the container. Default: 0 (not specified). int64 cpu_count = 2; // Specifies the portion of processor cycles that this container can use as a percentage times 100. int64 cpu_maximum = 3; // Memory limit in bytes. Default: 0 (not specified). int64 memory_limit_in_bytes = 4; } // ContainerMetadata holds all necessary information for building the container // name. The container runtime is encouraged to expose the metadata in its user // interface for better user experience. E.g., runtime can construct a unique // container name based on the metadata. Note that (name, attempt) is unique // within a sandbox for the entire lifetime of the sandbox. message ContainerMetadata { // Name of the container. Same as the container name in the PodSpec. string name = 1; // Attempt number of creating the container. Default: 0. uint32 attempt = 2; } // Device specifies a host device to mount into a container. message Device { // Path of the device within the container. string container_path = 1; // Path of the device on the host. string host_path = 2; // Cgroups permissions of the device, candidates are one or more of // * r - allows container to read from the specified device. // * w - allows container to write to the specified device. // * m - allows container to create device files that do not yet exist. string permissions = 3; } // ContainerConfig holds all the required and optional fields for creating a // container. message ContainerConfig { // Metadata of the container. This information will uniquely identify the // container, and the runtime should leverage this to ensure correct // operation. The runtime may also use this information to improve UX, such // as by constructing a readable name. ContainerMetadata metadata = 1 ; // Image to use. ImageSpec image = 2; // Command to execute (i.e., entrypoint for docker) repeated string command = 3; // Args for the Command (i.e., command for docker) repeated string args = 4; // Current working directory of the command. string working_dir = 5; // List of environment variable to set in the container. repeated KeyValue envs = 6; // Mounts for the container. repeated Mount mounts = 7; // Devices for the container. repeated Device devices = 8; // Key-value pairs that may be used to scope and select individual resources. // Label keys are of the form: // label-key ::= prefixed-name | name // prefixed-name ::= prefix '/' name // prefix ::= DNS_SUBDOMAIN // name ::= DNS_LABEL map<string, string> labels = 9; // Unstructured key-value map that may be used by the kubelet to store and // retrieve arbitrary metadata. // // Annotations MUST NOT be altered by the runtime; the annotations stored // here MUST be returned in the ContainerStatus associated with the container // this ContainerConfig creates. // // In general, in order to preserve a well-defined interface between the // kubelet and the container runtime, annotations SHOULD NOT influence // runtime behaviour. map<string, string> annotations = 10; // Path relative to PodSandboxConfig.LogDirectory for container to store // the log (STDOUT and STDERR) on the host. // E.g., // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/` // ContainerConfig.LogPath = `containerName/Instance#.log` // // WARNING: Log management and how kubelet should interface with the // container logs are under active discussion in // https://issues.k8s.io/24677. There *may* be future change of direction // for logging as the discussion carries on. string log_path = 11; // Variables for interactive containers, these have very specialized // use-cases (e.g. debugging). // TODO: Determine if we need to continue supporting these fields that are // part of Kubernetes's Container Spec. bool stdin = 12; bool stdin_once = 13; bool tty = 14; // Configuration specific to Linux containers. LinuxContainerConfig linux = 15; // Configuration specific to Windows containers. WindowsContainerConfig windows = 16; } message CreateContainerRequest { // ID of the PodSandbox in which the container should be created. string pod_sandbox_id = 1; // Config of the container. ContainerConfig config = 2; // Config of the PodSandbox. This is the same config that was passed // to RunPodSandboxRequest to create the PodSandbox. It is passed again // here just for easy reference. The PodSandboxConfig is immutable and // remains the same throughout the lifetime of the pod. PodSandboxConfig sandbox_config = 3; } message CreateContainerResponse { // ID of the created container. string container_id = 1; } message StartContainerRequest { // ID of the container to start. string container_id = 1; } message StartContainerResponse {} message StopContainerRequest { // ID of the container to stop. string container_id = 1; // Timeout in seconds to wait for the container to stop before forcibly // terminating it. Default: 0 (forcibly terminate the container immediately) int64 timeout = 2; } message StopContainerResponse {} message RemoveContainerRequest { // ID of the container to remove. string container_id = 1; } message RemoveContainerResponse {} enum ContainerState { CONTAINER_CREATED = 0; CONTAINER_RUNNING = 1; CONTAINER_EXITED = 2; CONTAINER_UNKNOWN = 3; } // ContainerStateValue is the wrapper of ContainerState. message ContainerStateValue { // State of the container. ContainerState state = 1; } // ContainerFilter is used to filter containers. // All those fields are combined with 'AND' message ContainerFilter { // ID of the container. string id = 1; // State of the container. ContainerStateValue state = 2; // ID of the PodSandbox. string pod_sandbox_id = 3; // LabelSelector to select matches. // Only api.MatchLabels is supported for now and the requirements // are ANDed. MatchExpressions is not supported yet. map<string, string> label_selector = 4; } message ListContainersRequest { ContainerFilter filter = 1; } // Container provides the runtime information for a container, such as ID, hash, // state of the container. message Container { // ID of the container, used by the container runtime to identify // a container. string id = 1; // ID of the sandbox to which this container belongs. string pod_sandbox_id = 2; // Metadata of the container. ContainerMetadata metadata = 3; // Spec of the image. ImageSpec image = 4; // Reference to the image in use. For most runtimes, this should be an // image ID. string image_ref = 5; // State of the container. ContainerState state = 6; // Creation time of the container in nanoseconds. int64 created_at = 7; // Key-value pairs that may be used to scope and select individual resources. map<string, string> labels = 8; // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding ContainerConfig used to // instantiate this Container. map<string, string> annotations = 9; } message ListContainersResponse { // List of containers. repeated Container containers = 1; } message ContainerStatusRequest { // ID of the container for which to retrieve status. string container_id = 1; // Verbose indicates whether to return extra information about the container. bool verbose = 2; } // ContainerStatus represents the status of a container. message ContainerStatus { // ID of the container. string id = 1; // Metadata of the container. ContainerMetadata metadata = 2; // Status of the container. ContainerState state = 3; // Creation time of the container in nanoseconds. int64 created_at = 4; // Start time of the container in nanoseconds. Default: 0 (not specified). int64 started_at = 5; // Finish time of the container in nanoseconds. Default: 0 (not specified). int64 finished_at = 6; // Exit code of the container. Only required when finished_at != 0. Default: 0. int32 exit_code = 7; // Spec of the image. ImageSpec image = 8; // Reference to the image in use. For most runtimes, this should be an // image ID string image_ref = 9; // Brief CamelCase string explaining why container is in its current state. string reason = 10; // Human-readable message indicating details about why container is in its // current state. string message = 11; // Key-value pairs that may be used to scope and select individual resources. map<string,string> labels = 12; // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding ContainerConfig used to // instantiate the Container this status represents. map<string,string> annotations = 13; // Mounts for the container. repeated Mount mounts = 14; // Log path of container. string log_path = 15; } message ContainerStatusResponse { // Status of the container. ContainerStatus status = 1; // Info is extra information of the Container. The key could be arbitrary string, and // value should be in json format. The information could include anything useful for // debug, e.g. pid for linux container based container runtime. // It should only be returned non-empty when Verbose is true. map<string, string> info = 2; } message UpdateContainerResourcesRequest { // ID of the container to update. string container_id = 1; // Resource configuration specific to Linux containers. LinuxContainerResources linux = 2; } message UpdateContainerResourcesResponse {} message ExecSyncRequest { // ID of the container. string container_id = 1; // Command to execute. repeated string cmd = 2; // Timeout in seconds to stop the command. Default: 0 (run forever). int64 timeout = 3; } message ExecSyncResponse { // Captured command stdout output. bytes stdout = 1; // Captured command stderr output. bytes stderr = 2; // Exit code the command finished with. Default: 0 (success). int32 exit_code = 3; } message ExecRequest { // ID of the container in which to execute the command. string container_id = 1; // Command to execute. repeated string cmd = 2; // Whether to exec the command in a TTY. bool tty = 3; // Whether to stream stdin. // One of `stdin`, `stdout`, and `stderr` MUST be true. bool stdin = 4; // Whether to stream stdout. // One of `stdin`, `stdout`, and `stderr` MUST be true. bool stdout = 5; // Whether to stream stderr. // One of `stdin`, `stdout`, and `stderr` MUST be true. // If `tty` is true, `stderr` MUST be false. Multiplexing is not supported // in this case. The output of stdout and stderr will be combined to a // single stream. bool stderr = 6; } message ExecResponse { // Fully qualified URL of the exec streaming server. string url = 1; } message AttachRequest { // ID of the container to which to attach. string container_id = 1; // Whether to stream stdin. // One of `stdin`, `stdout`, and `stderr` MUST be true. bool stdin = 2; // Whether the process being attached is running in a TTY. // This must match the TTY setting in the ContainerConfig. bool tty = 3; // Whether to stream stdout. // One of `stdin`, `stdout`, and `stderr` MUST be true. bool stdout = 4; // Whether to stream stderr. // One of `stdin`, `stdout`, and `stderr` MUST be true. // If `tty` is true, `stderr` MUST be false. Multiplexing is not supported // in this case. The output of stdout and stderr will be combined to a // single stream. bool stderr = 5; } message AttachResponse { // Fully qualified URL of the attach streaming server. string url = 1; } message PortForwardRequest { // ID of the container to which to forward the port. string pod_sandbox_id = 1; // Port to forward. repeated int32 port = 2; } message PortForwardResponse { // Fully qualified URL of the port-forward streaming server. string url = 1; } message ImageFilter { // Spec of the image. ImageSpec image = 1; } message ListImagesRequest { // Filter to list images. ImageFilter filter = 1; } // Basic information about a container image. message Image { // ID of the image. string id = 1; // Other names by which this image is known. repeated string repo_tags = 2; // Digests by which this image is known. repeated string repo_digests = 3; // Size of the image in bytes. Must be > 0. uint64 size = 4; // UID that will run the command(s). This is used as a default if no user is // specified when creating the container. UID and the following user name // are mutually exclusive. Int64Value uid = 5; // User name that will run the command(s). This is used if UID is not set // and no user is specified when creating container. string username = 6; } message ListImagesResponse { // List of images. repeated Image images = 1; } message ImageStatusRequest { // Spec of the image. ImageSpec image = 1; // Verbose indicates whether to return extra information about the image. bool verbose = 2; } message ImageStatusResponse { // Status of the image. Image image = 1; // Info is extra information of the Image. The key could be arbitrary string, and // value should be in json format. The information could include anything useful // for debug, e.g. image config for oci image based container runtime. // It should only be returned non-empty when Verbose is true. map<string, string> info = 2; } // AuthConfig contains authorization information for connecting to a registry. message AuthConfig { string username = 1; string password = 2; string auth = 3; string server_address = 4; // IdentityToken is used to authenticate the user and get // an access token for the registry. string identity_token = 5; // RegistryToken is a bearer token to be sent to a registry string registry_token = 6; } message PullImageRequest { // Spec of the image. ImageSpec image = 1; // Authentication configuration for pulling the image. AuthConfig auth = 2; // Config of the PodSandbox, which is used to pull image in PodSandbox context. PodSandboxConfig sandbox_config = 3; } message PullImageResponse { // Reference to the image in use. For most runtimes, this should be an // image ID or digest. string image_ref = 1; } message RemoveImageRequest { // Spec of the image to remove. ImageSpec image = 1; } message RemoveImageResponse {} message NetworkConfig { // CIDR to use for pod IP addresses. If the CIDR is empty, runtimes // should omit it. string pod_cidr = 1; } message RuntimeConfig { NetworkConfig network_config = 1; } message UpdateRuntimeConfigRequest { RuntimeConfig runtime_config = 1; } message UpdateRuntimeConfigResponse {} // RuntimeCondition contains condition information for the runtime. // There are 2 kinds of runtime conditions: // 1. Required conditions: Conditions are required for kubelet to work // properly. If any required condition is unmet, the node will be not ready. // The required conditions include: // * RuntimeReady: RuntimeReady means the runtime is up and ready to accept // basic containers e.g. container only needs host network. // * NetworkReady: NetworkReady means the runtime network is up and ready to // accept containers which require container network. // 2. Optional conditions: Conditions are informative to the user, but kubelet // will not rely on. Since condition type is an arbitrary string, all conditions // not required are optional. These conditions will be exposed to users to help // them understand the status of the system. message RuntimeCondition { // Type of runtime condition. string type = 1; // Status of the condition, one of true/false. Default: false. bool status = 2; // Brief CamelCase string containing reason for the condition's last transition. string reason = 3; // Human-readable message indicating details about last transition. string message = 4; } // RuntimeStatus is information about the current status of the runtime. message RuntimeStatus { // List of current observed runtime conditions. repeated RuntimeCondition conditions = 1; } message StatusRequest { // Verbose indicates whether to return extra information about the runtime. bool verbose = 1; } message StatusResponse { // Status of the Runtime. RuntimeStatus status = 1; // Info is extra information of the Runtime. The key could be arbitrary string, and // value should be in json format. The information could include anything useful for // debug, e.g. plugins used by the container runtime. // It should only be returned non-empty when Verbose is true. map<string, string> info = 2; } message ImageFsInfoRequest {} // UInt64Value is the wrapper of uint64. message UInt64Value { // The value. uint64 value = 1; } // FilesystemIdentifier uniquely identify the filesystem. message FilesystemIdentifier{ // Mountpoint of a filesystem. string mountpoint = 1; } // FilesystemUsage provides the filesystem usage information. message FilesystemUsage { // Timestamp in nanoseconds at which the information were collected. Must be > 0. int64 timestamp = 1; // The unique identifier of the filesystem. FilesystemIdentifier fs_id = 2; // UsedBytes represents the bytes used for images on the filesystem. // This may differ from the total bytes used on the filesystem and may not // equal CapacityBytes - AvailableBytes. UInt64Value used_bytes = 3; // InodesUsed represents the inodes used by the images. // This may not equal InodesCapacity - InodesAvailable because the underlying // filesystem may also be used for purposes other than storing images. UInt64Value inodes_used = 4; } message ImageFsInfoResponse { // Information of image filesystem(s). repeated FilesystemUsage image_filesystems = 1; } message ContainerStatsRequest{ // ID of the container for which to retrieve stats. string container_id = 1; } message ContainerStatsResponse { // Stats of the container. ContainerStats stats = 1; } message ListContainerStatsRequest{ // Filter for the list request. ContainerStatsFilter filter = 1; } // ContainerStatsFilter is used to filter containers. // All those fields are combined with 'AND' message ContainerStatsFilter { // ID of the container. string id = 1; // ID of the PodSandbox. string pod_sandbox_id = 2; // LabelSelector to select matches. // Only api.MatchLabels is supported for now and the requirements // are ANDed. MatchExpressions is not supported yet. map<string, string> label_selector = 3; } message ListContainerStatsResponse { // Stats of the container. repeated ContainerStats stats = 1; } // ContainerAttributes provides basic information of the container. message ContainerAttributes { // ID of the container. string id = 1; // Metadata of the container. ContainerMetadata metadata = 2; // Key-value pairs that may be used to scope and select individual resources. map<string,string> labels = 3; // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding ContainerConfig used to // instantiate the Container this status represents. map<string,string> annotations = 4; } // ContainerStats provides the resource usage statistics for a container. message ContainerStats { // Information of the container. ContainerAttributes attributes = 1; // CPU usage gathered from the container. CpuUsage cpu = 2; // Memory usage gathered from the container. MemoryUsage memory = 3; // Usage of the writeable layer. FilesystemUsage writable_layer = 4; } // CpuUsage provides the CPU usage information. message CpuUsage { // Timestamp in nanoseconds at which the information were collected. Must be > 0. int64 timestamp = 1; // Cumulative CPU usage (sum across all cores) since object creation. UInt64Value usage_core_nano_seconds = 2; } // MemoryUsage provides the memory usage information. message MemoryUsage { // Timestamp in nanoseconds at which the information were collected. Must be > 0. int64 timestamp = 1; // The amount of working set memory in bytes. UInt64Value working_set_bytes = 2; } message ReopenContainerLogRequest { // ID of the container for which to reopen the log. string container_id = 1; } message ReopenContainerLogResponse{ }
{ "pile_set_name": "Github" }
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. is.autoload=true javac.compilerargs=-Xlint -Xlint:-serial javac.source=1.8 javadoc.main.page=org/openide/actions/doc-files/api.html javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml test.config.stableBTD.includes=**/*Test.class test.config.stableBTD.excludes=\ **/PageSetupActionTest.class
{ "pile_set_name": "Github" }
<?php /* * 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. */ class ShaHmac256Signer implements ISigner { public function signString($source, $accessSecret) { return base64_encode(hash_hmac('sha256', $source, $accessSecret, true)); } public function getSignatureMethod() { return "HMAC-SHA256"; } public function getSignatureVersion() { return "1.0"; } }
{ "pile_set_name": "Github" }
<!-- Copyright (C) 2017 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="18.0dp" android:height="18.0dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:fillColor="#FFFFFFFF" android:pathData="M16.0,1.0L4.0,1.0c-1.1,0.0 -2.0,0.9 -2.0,2.0l0.0,14.0l2.0,0.0L4.0,3.0l12.0,0.0L16.0,1.0zm3.0,4.0L8.0,5.0c-1.1,0.0 -2.0,0.9 -2.0,2.0l0.0,14.0c0.0,1.0 0.9,2.0 2.0,2.0l11.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L21.0,7.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0zm0.0,16.0L8.0,21.0L8.0,7.0l11.0,0.0l0.0,14.0z"/> </vector>
{ "pile_set_name": "Github" }
package godot import ( "github.com/shadowapex/godot-go/gdnative" ) /*------------------------------------------------------------------------------ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Any updates should be done in // "class.go.tmpl" so they can be included in the generated // code. //----------------------------------------------------------------------------*/ //func NewAcceptDialogFromPointer(ptr gdnative.Pointer) AcceptDialog { func newAcceptDialogFromPointer(ptr gdnative.Pointer) AcceptDialog { owner := gdnative.NewObjectFromPointer(ptr) obj := AcceptDialog{} obj.SetBaseObject(owner) return obj } /* This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. */ type AcceptDialog struct { WindowDialog owner gdnative.Object } func (o *AcceptDialog) BaseClass() string { return "AcceptDialog" } /* Undocumented Args: [{ false arg0 String}], Returns: void */ func (o *AcceptDialog) X_BuiltinTextEntered(arg0 gdnative.String) { //log.Println("Calling AcceptDialog.X_BuiltinTextEntered()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 1, 1) ptrArguments[0] = gdnative.NewPointerFromString(arg0) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "_builtin_text_entered") // Call the parent method. // void retPtr := gdnative.NewEmptyVoid() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) } /* Undocumented Args: [{ false arg0 String}], Returns: void */ func (o *AcceptDialog) X_CustomAction(arg0 gdnative.String) { //log.Println("Calling AcceptDialog.X_CustomAction()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 1, 1) ptrArguments[0] = gdnative.NewPointerFromString(arg0) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "_custom_action") // Call the parent method. // void retPtr := gdnative.NewEmptyVoid() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) } /* Undocumented Args: [], Returns: void */ func (o *AcceptDialog) X_Ok() { //log.Println("Calling AcceptDialog.X_Ok()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 0, 0) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "_ok") // Call the parent method. // void retPtr := gdnative.NewEmptyVoid() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) } /* Adds a button with label [i]text[/i] and a custom [i]action[/i] to the dialog and returns the created button. [i]action[/i] will be passed to the [custom_action] signal when pressed. If [code]true[/code], [i]right[/i] will place the button to the right of any sibling buttons. Default value: [code]false[/code]. Args: [{ false text String} {False true right bool} { true action String}], Returns: Button */ func (o *AcceptDialog) AddButton(text gdnative.String, right gdnative.Bool, action gdnative.String) ButtonImplementer { //log.Println("Calling AcceptDialog.AddButton()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 3, 3) ptrArguments[0] = gdnative.NewPointerFromString(text) ptrArguments[1] = gdnative.NewPointerFromBool(right) ptrArguments[2] = gdnative.NewPointerFromString(action) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "add_button") // Call the parent method. // Button retPtr := gdnative.NewEmptyObject() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) // If we have a return type, convert it from a pointer into its actual object. ret := newButtonFromPointer(retPtr) // Check to see if we already have an instance of this object in our Go instance registry. if instance, ok := InstanceRegistry.Get(ret.GetBaseObject().ID()); ok { return instance.(ButtonImplementer) } // Check to see what kind of class this is and create it. This is generally used with // GetNode(). className := ret.GetClass() if className != "Button" { actualRet := getActualClass(className, ret.GetBaseObject()) return actualRet.(ButtonImplementer) } return &ret } /* Adds a button with label [i]name[/i] and a cancel action to the dialog and returns the created button. Args: [{ false name String}], Returns: Button */ func (o *AcceptDialog) AddCancel(name gdnative.String) ButtonImplementer { //log.Println("Calling AcceptDialog.AddCancel()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 1, 1) ptrArguments[0] = gdnative.NewPointerFromString(name) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "add_cancel") // Call the parent method. // Button retPtr := gdnative.NewEmptyObject() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) // If we have a return type, convert it from a pointer into its actual object. ret := newButtonFromPointer(retPtr) // Check to see if we already have an instance of this object in our Go instance registry. if instance, ok := InstanceRegistry.Get(ret.GetBaseObject().ID()); ok { return instance.(ButtonImplementer) } // Check to see what kind of class this is and create it. This is generally used with // GetNode(). className := ret.GetClass() if className != "Button" { actualRet := getActualClass(className, ret.GetBaseObject()) return actualRet.(ButtonImplementer) } return &ret } /* Undocumented Args: [], Returns: bool */ func (o *AcceptDialog) GetHideOnOk() gdnative.Bool { //log.Println("Calling AcceptDialog.GetHideOnOk()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 0, 0) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "get_hide_on_ok") // Call the parent method. // bool retPtr := gdnative.NewEmptyBool() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) // If we have a return type, convert it from a pointer into its actual object. ret := gdnative.NewBoolFromPointer(retPtr) return ret } /* Return the label used for built-in text. Args: [], Returns: Label */ func (o *AcceptDialog) GetLabel() LabelImplementer { //log.Println("Calling AcceptDialog.GetLabel()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 0, 0) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "get_label") // Call the parent method. // Label retPtr := gdnative.NewEmptyObject() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) // If we have a return type, convert it from a pointer into its actual object. ret := newLabelFromPointer(retPtr) // Check to see if we already have an instance of this object in our Go instance registry. if instance, ok := InstanceRegistry.Get(ret.GetBaseObject().ID()); ok { return instance.(LabelImplementer) } // Check to see what kind of class this is and create it. This is generally used with // GetNode(). className := ret.GetClass() if className != "Label" { actualRet := getActualClass(className, ret.GetBaseObject()) return actualRet.(LabelImplementer) } return &ret } /* Return the OK Button. Args: [], Returns: Button */ func (o *AcceptDialog) GetOk() ButtonImplementer { //log.Println("Calling AcceptDialog.GetOk()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 0, 0) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "get_ok") // Call the parent method. // Button retPtr := gdnative.NewEmptyObject() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) // If we have a return type, convert it from a pointer into its actual object. ret := newButtonFromPointer(retPtr) // Check to see if we already have an instance of this object in our Go instance registry. if instance, ok := InstanceRegistry.Get(ret.GetBaseObject().ID()); ok { return instance.(ButtonImplementer) } // Check to see what kind of class this is and create it. This is generally used with // GetNode(). className := ret.GetClass() if className != "Button" { actualRet := getActualClass(className, ret.GetBaseObject()) return actualRet.(ButtonImplementer) } return &ret } /* Undocumented Args: [], Returns: String */ func (o *AcceptDialog) GetText() gdnative.String { //log.Println("Calling AcceptDialog.GetText()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 0, 0) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "get_text") // Call the parent method. // String retPtr := gdnative.NewEmptyString() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) // If we have a return type, convert it from a pointer into its actual object. ret := gdnative.NewStringFromPointer(retPtr) return ret } /* Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. Args: [{ false line_edit Object}], Returns: void */ func (o *AcceptDialog) RegisterTextEnter(lineEdit ObjectImplementer) { //log.Println("Calling AcceptDialog.RegisterTextEnter()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 1, 1) ptrArguments[0] = gdnative.NewPointerFromObject(lineEdit.GetBaseObject()) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "register_text_enter") // Call the parent method. // void retPtr := gdnative.NewEmptyVoid() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) } /* Undocumented Args: [{ false enabled bool}], Returns: void */ func (o *AcceptDialog) SetHideOnOk(enabled gdnative.Bool) { //log.Println("Calling AcceptDialog.SetHideOnOk()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 1, 1) ptrArguments[0] = gdnative.NewPointerFromBool(enabled) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "set_hide_on_ok") // Call the parent method. // void retPtr := gdnative.NewEmptyVoid() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) } /* Undocumented Args: [{ false text String}], Returns: void */ func (o *AcceptDialog) SetText(text gdnative.String) { //log.Println("Calling AcceptDialog.SetText()") // Build out the method's arguments ptrArguments := make([]gdnative.Pointer, 1, 1) ptrArguments[0] = gdnative.NewPointerFromString(text) // Get the method bind methodBind := gdnative.NewMethodBind("AcceptDialog", "set_text") // Call the parent method. // void retPtr := gdnative.NewEmptyVoid() gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr) } // AcceptDialogImplementer is an interface that implements the methods // of the AcceptDialog class. type AcceptDialogImplementer interface { WindowDialogImplementer X_BuiltinTextEntered(arg0 gdnative.String) X_CustomAction(arg0 gdnative.String) X_Ok() AddButton(text gdnative.String, right gdnative.Bool, action gdnative.String) ButtonImplementer AddCancel(name gdnative.String) ButtonImplementer GetHideOnOk() gdnative.Bool GetLabel() LabelImplementer GetOk() ButtonImplementer GetText() gdnative.String RegisterTextEnter(lineEdit ObjectImplementer) SetHideOnOk(enabled gdnative.Bool) SetText(text gdnative.String) }
{ "pile_set_name": "Github" }
1.0.1 / 2015-04-07 ================== * Fix `TypeError`s when under `'use strict'` code * Fix useless type name on auto-generated messages * Support io.js 1.x * Support Node.js 0.12 1.0.0 / 2014-09-17 ================== * No changes 0.4.5 / 2014-09-09 ================== * Improve call speed to functions using the function wrapper * Support Node.js 0.6 0.4.4 / 2014-07-27 ================== * Work-around v8 generating empty stack traces 0.4.3 / 2014-07-26 ================== * Fix exception when global `Error.stackTraceLimit` is too low 0.4.2 / 2014-07-19 ================== * Correct call site for wrapped functions and properties 0.4.1 / 2014-07-19 ================== * Improve automatic message generation for function properties 0.4.0 / 2014-07-19 ================== * Add `TRACE_DEPRECATION` environment variable * Remove non-standard grey color from color output * Support `--no-deprecation` argument * Support `--trace-deprecation` argument * Support `deprecate.property(fn, prop, message)` 0.3.0 / 2014-06-16 ================== * Add `NO_DEPRECATION` environment variable 0.2.0 / 2014-06-15 ================== * Add `deprecate.property(obj, prop, message)` * Remove `supports-color` dependency for node.js 0.8 0.1.0 / 2014-06-15 ================== * Add `deprecate.function(fn, message)` * Add `process.on('deprecation', fn)` emitter * Automatically generate message when omitted from `deprecate()` 0.0.1 / 2014-06-15 ================== * Fix warning for dynamic calls at singe call site 0.0.0 / 2014-06-15 ================== * Initial implementation
{ "pile_set_name": "Github" }
// Fillers are random number generators that fills a blob using the specified // algorithm. The expectation is that they are only going to be used during // initialization time and will not involve any GPUs. #ifndef CAFFE_FILLER_HPP #define CAFFE_FILLER_HPP #include <string> #include "caffe/blob.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/syncedmem.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { /// @brief Fills a Blob with constant or randomly-generated data. template <typename Dtype> class Filler { public: explicit Filler(const FillerParameter& param) : filler_param_(param) {} virtual ~Filler() {} virtual void Fill(Blob<Dtype>* blob) = 0; protected: FillerParameter filler_param_; }; // class Filler /// @brief Fills a Blob with constant values @f$ x = 0 @f$. template <typename Dtype> class ConstantFiller : public Filler<Dtype> { public: explicit ConstantFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { Dtype* data = blob->mutable_cpu_data(); const int count = blob->count(); const Dtype value = this->filler_param_.value(); CHECK(count); for (int i = 0; i < count; ++i) { data[i] = value; } CHECK_EQ(this->filler_param_.sparse(), -1) << "Sparsity not supported by this Filler."; } }; /// @brief Fills a Blob with uniformly distributed values @f$ x\sim U(a, b) @f$. template <typename Dtype> class UniformFiller : public Filler<Dtype> { public: explicit UniformFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { CHECK(blob->count()); caffe_rng_uniform<Dtype>(blob->count(), Dtype(this->filler_param_.min()), Dtype(this->filler_param_.max()), blob->mutable_cpu_data()); CHECK_EQ(this->filler_param_.sparse(), -1) << "Sparsity not supported by this Filler."; } }; /// @brief Fills a Blob with Gaussian-distributed values @f$ x = a @f$. template <typename Dtype> class GaussianFiller : public Filler<Dtype> { public: explicit GaussianFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { Dtype* data = blob->mutable_cpu_data(); CHECK(blob->count()); caffe_rng_gaussian<Dtype>(blob->count(), Dtype(this->filler_param_.mean()), Dtype(this->filler_param_.std()), blob->mutable_cpu_data()); int sparse = this->filler_param_.sparse(); CHECK_GE(sparse, -1); if (sparse >= 0) { // Sparse initialization is implemented for "weight" blobs; i.e. matrices. // These have num == channels == 1; width is number of inputs; height is // number of outputs. The 'sparse' variable specifies the mean number // of non-zero input weights for a given output. CHECK_GE(blob->num_axes(), 1); const int num_outputs = blob->shape(0); Dtype non_zero_probability = Dtype(sparse) / Dtype(num_outputs); rand_vec_.reset(new SyncedMemory(blob->count() * sizeof(int))); int* mask = reinterpret_cast<int*>(rand_vec_->mutable_cpu_data()); caffe_rng_bernoulli(blob->count(), non_zero_probability, mask); for (int i = 0; i < blob->count(); ++i) { data[i] *= mask[i]; } } } protected: shared_ptr<SyncedMemory> rand_vec_; }; /** @brief Fills a Blob with values @f$ x \in [0, 1] @f$ * such that @f$ \forall i \sum_j x_{ij} = 1 @f$. */ template <typename Dtype> class PositiveUnitballFiller : public Filler<Dtype> { public: explicit PositiveUnitballFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { Dtype* data = blob->mutable_cpu_data(); DCHECK(blob->count()); caffe_rng_uniform<Dtype>(blob->count(), 0, 1, blob->mutable_cpu_data()); // We expect the filler to not be called very frequently, so we will // just use a simple implementation int dim = blob->count() / blob->num(); CHECK(dim); for (int i = 0; i < blob->num(); ++i) { Dtype sum = 0; for (int j = 0; j < dim; ++j) { sum += data[i * dim + j]; } for (int j = 0; j < dim; ++j) { data[i * dim + j] /= sum; } } CHECK_EQ(this->filler_param_.sparse(), -1) << "Sparsity not supported by this Filler."; } }; /** * @brief Fills a Blob with values @f$ x \sim U(-a, +a) @f$ where @f$ a @f$ is * set inversely proportional to number of incoming nodes, outgoing * nodes, or their average. * * A Filler based on the paper [Bengio and Glorot 2010]: Understanding * the difficulty of training deep feedforward neuralnetworks. * * It fills the incoming matrix by randomly sampling uniform data from [-scale, * scale] where scale = sqrt(3 / n) where n is the fan_in, fan_out, or their * average, depending on the variance_norm option. You should make sure the * input blob has shape (num, a, b, c) where a * b * c = fan_in and num * b * c * = fan_out. Note that this is currently not the case for inner product layers. * * TODO(dox): make notation in above comment consistent with rest & use LaTeX. */ template <typename Dtype> class XavierFiller : public Filler<Dtype> { public: explicit XavierFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { CHECK(blob->count()); int fan_in = blob->count() / blob->num(); int fan_out = blob->count() / blob->channels(); Dtype n = fan_in; // default to fan_in if (this->filler_param_.variance_norm() == FillerParameter_VarianceNorm_AVERAGE) { n = (fan_in + fan_out) / Dtype(2); } else if (this->filler_param_.variance_norm() == FillerParameter_VarianceNorm_FAN_OUT) { n = fan_out; } Dtype scale = sqrt(Dtype(3) / n); caffe_rng_uniform<Dtype>(blob->count(), -scale, scale, blob->mutable_cpu_data()); CHECK_EQ(this->filler_param_.sparse(), -1) << "Sparsity not supported by this Filler."; } }; /** * @brief Fills a Blob with values @f$ x \sim N(0, \sigma^2) @f$ where * @f$ \sigma^2 @f$ is set inversely proportional to number of incoming * nodes, outgoing nodes, or their average. * * A Filler based on the paper [He, Zhang, Ren and Sun 2015]: Specifically * accounts for ReLU nonlinearities. * * Aside: for another perspective on the scaling factor, see the derivation of * [Saxe, McClelland, and Ganguli 2013 (v3)]. * * It fills the incoming matrix by randomly sampling Gaussian data with std = * sqrt(2 / n) where n is the fan_in, fan_out, or their average, depending on * the variance_norm option. You should make sure the input blob has shape (num, * a, b, c) where a * b * c = fan_in and num * b * c = fan_out. Note that this * is currently not the case for inner product layers. */ template <typename Dtype> class MSRAFiller : public Filler<Dtype> { public: explicit MSRAFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { CHECK(blob->count()); int fan_in = blob->count() / blob->num(); int fan_out = blob->count() / blob->channels(); Dtype n = fan_in; // default to fan_in if (this->filler_param_.variance_norm() == FillerParameter_VarianceNorm_AVERAGE) { n = (fan_in + fan_out) / Dtype(2); } else if (this->filler_param_.variance_norm() == FillerParameter_VarianceNorm_FAN_OUT) { n = fan_out; } Dtype std = sqrt(Dtype(2) / n); caffe_rng_gaussian<Dtype>(blob->count(), Dtype(0), std, blob->mutable_cpu_data()); CHECK_EQ(this->filler_param_.sparse(), -1) << "Sparsity not supported by this Filler."; } }; /*! @brief Fills a Blob with coefficients for bilinear interpolation. A common use case is with the DeconvolutionLayer acting as upsampling. You can upsample a feature map with shape of (B, C, H, W) by any integer factor using the following proto. \code layer { name: "upsample", type: "Deconvolution" bottom: "{{bottom_name}}" top: "{{top_name}}" convolution_param { kernel_size: {{2 * factor - factor % 2}} stride: {{factor}} num_output: {{C}} group: {{C}} pad: {{ceil((factor - 1) / 2.)}} weight_filler: { type: "bilinear" } bias_term: false } param { lr_mult: 0 decay_mult: 0 } } \endcode Please use this by replacing `{{}}` with your values. By specifying `num_output: {{C}} group: {{C}}`, it behaves as channel-wise convolution. The filter shape of this deconvolution layer will be (C, 1, K, K) where K is `kernel_size`, and this filler will set a (K, K) interpolation kernel for every channel of the filter identically. The resulting shape of the top feature map will be (B, C, factor * H, factor * W). Note that the learning rate and the weight decay are set to 0 in order to keep coefficient values of bilinear interpolation unchanged during training. If you apply this to an image, this operation is equivalent to the following call in Python with Scikit.Image. \code{.py} out = skimage.transform.rescale(img, factor, mode='constant', cval=0) \endcode */ template <typename Dtype> class BilinearFiller : public Filler<Dtype> { public: explicit BilinearFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { CHECK_EQ(blob->num_axes(), 4) << "Blob must be 4 dim."; CHECK_EQ(blob->width(), blob->height()) << "Filter must be square"; Dtype* data = blob->mutable_cpu_data(); int f = ceil(blob->width() / 2.); float c = (2 * f - 1 - f % 2) / (2. * f); for (int i = 0; i < blob->count(); ++i) { float x = i % blob->width(); float y = (i / blob->width()) % blob->height(); data[i] = (1 - fabs(x / f - c)) * (1 - fabs(y / f - c)); } CHECK_EQ(this->filler_param_.sparse(), -1) << "Sparsity not supported by this Filler."; } }; /** * @brief Use file to initialize the weights or bias */ template <typename Dtype> class FileFiller : public Filler<Dtype> { public: explicit FileFiller(const FillerParameter& param) : Filler<Dtype>(param) {} virtual void Fill(Blob<Dtype>* blob) { CHECK(this->filler_param_.has_file()); std::ifstream file(this->filler_param_.file().c_str()); Dtype* data = blob->mutable_cpu_data(); int count = blob->count(); Dtype temp; for (int i = 0; i<count; ++i) { file >> temp; data[i] = temp; std::cout << "Setting " << i << "th position to " << temp << std::endl; } CHECK_EQ(this->filler_param_.sparse(), -1) << "Sparsity not supported by this Filler."; } }; /** * @brief Get a specific filler from the specification given in FillerParameter. * * Ideally this would be replaced by a factory pattern, but we will leave it * this way for now. */ template <typename Dtype> Filler<Dtype>* GetFiller(const FillerParameter& param) { const std::string& type = param.type(); if (type == "constant") { return new ConstantFiller<Dtype>(param); } else if (type == "gaussian") { return new GaussianFiller<Dtype>(param); } else if (type == "positive_unitball") { return new PositiveUnitballFiller<Dtype>(param); } else if (type == "uniform") { return new UniformFiller<Dtype>(param); } else if (type == "xavier") { return new XavierFiller<Dtype>(param); } else if (type == "msra") { return new MSRAFiller<Dtype>(param); }else if (type == "file") { return new FileFiller<Dtype>(param); } else if (type == "bilinear") { return new BilinearFiller<Dtype>(param); } else { CHECK(false) << "Unknown filler name: " << param.type(); } return (Filler<Dtype>*)(NULL); } } // namespace caffe #endif // CAFFE_FILLER_HPP_
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.lucene.index; import java.io.IOException; import java.util.Collections; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; import org.apache.lucene.document.IntPoint; import org.apache.lucene.document.TextField; import org.apache.lucene.store.Directory; import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LuceneTestCase; public class TestIndexOptions extends LuceneTestCase { public void testChangeIndexOptionsViaAddDocument() throws IOException { for (IndexOptions from : IndexOptions.values()) { for (IndexOptions to : IndexOptions.values()) { for (boolean preExisting : new boolean[] { false, true }) { for (boolean onNewSegment : new boolean[] { false, true }) { doTestChangeIndexOptionsViaAddDocument(preExisting, onNewSegment, from, to); } } } } } private void doTestChangeIndexOptionsViaAddDocument(boolean preExistingField, boolean onNewSegment, IndexOptions from, IndexOptions to) throws IOException { Directory dir = newDirectory(); IndexWriter w = new IndexWriter(dir, newIndexWriterConfig()); if (preExistingField) { w.addDocument(Collections.singleton(new IntPoint("foo", 1))); if (onNewSegment) { DirectoryReader.open(w).close(); } } FieldType ft1 = new FieldType(TextField.TYPE_STORED); ft1.setIndexOptions(from); w.addDocument(Collections.singleton(new Field("foo", "bar", ft1))); if (onNewSegment) { DirectoryReader.open(w).close(); } FieldType ft2 = new FieldType(TextField.TYPE_STORED); ft2.setIndexOptions(to); if (from == IndexOptions.NONE || to == IndexOptions.NONE || from == to) { w.addDocument(Collections.singleton(new Field("foo", "bar", ft2))); // no exception w.forceMerge(1); try (LeafReader r = getOnlyLeafReader(DirectoryReader.open(w))) { IndexOptions expected = from == IndexOptions.NONE ? to : from; assertEquals(expected, r.getFieldInfos().fieldInfo("foo").getIndexOptions()); } } else { IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> w.addDocument(Collections.singleton(new Field("foo", "bar", ft2)))); assertEquals("cannot change field \"foo\" from index options=" + from + " to inconsistent index options=" + to, e.getMessage()); } w.close(); dir.close(); } public void testChangeIndexOptionsViaAddIndexesCodecReader() throws IOException { for (IndexOptions from : IndexOptions.values()) { for (IndexOptions to : IndexOptions.values()) { doTestChangeIndexOptionsAddIndexesCodecReader(from, to); } } } private void doTestChangeIndexOptionsAddIndexesCodecReader(IndexOptions from, IndexOptions to) throws IOException { Directory dir1 = newDirectory(); IndexWriter w1 = new IndexWriter(dir1, newIndexWriterConfig()); FieldType ft1 = new FieldType(TextField.TYPE_STORED); ft1.setIndexOptions(from); w1.addDocument(Collections.singleton(new Field("foo", "bar", ft1))); Directory dir2 = newDirectory(); IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig()); FieldType ft2 = new FieldType(TextField.TYPE_STORED); ft2.setIndexOptions(to); w2.addDocument(Collections.singleton(new Field("foo", "bar", ft2))); try (CodecReader cr = (CodecReader) getOnlyLeafReader(DirectoryReader.open(w2))) { if (from == IndexOptions.NONE || to == IndexOptions.NONE || from == to) { w1.addIndexes(cr); // no exception w1.forceMerge(1); try (LeafReader r = getOnlyLeafReader(DirectoryReader.open(w1))) { IndexOptions expected = from == IndexOptions.NONE ? to : from; assertEquals(expected, r.getFieldInfos().fieldInfo("foo").getIndexOptions()); } } else { IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> w1.addIndexes(cr)); assertEquals("cannot change field \"foo\" from index options=" + from + " to inconsistent index options=" + to, e.getMessage()); } } IOUtils.close(w1, w2, dir1, dir2); } public void testChangeIndexOptionsViaAddIndexesDirectory() throws IOException { for (IndexOptions from : IndexOptions.values()) { for (IndexOptions to : IndexOptions.values()) { doTestChangeIndexOptionsAddIndexesDirectory(from, to); } } } private void doTestChangeIndexOptionsAddIndexesDirectory(IndexOptions from, IndexOptions to) throws IOException { Directory dir1 = newDirectory(); IndexWriter w1 = new IndexWriter(dir1, newIndexWriterConfig()); FieldType ft1 = new FieldType(TextField.TYPE_STORED); ft1.setIndexOptions(from); w1.addDocument(Collections.singleton(new Field("foo", "bar", ft1))); Directory dir2 = newDirectory(); IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig()); FieldType ft2 = new FieldType(TextField.TYPE_STORED); ft2.setIndexOptions(to); w2.addDocument(Collections.singleton(new Field("foo", "bar", ft2))); w2.close(); if (from == IndexOptions.NONE || to == IndexOptions.NONE || from == to) { w1.addIndexes(dir2); // no exception w1.forceMerge(1); try (LeafReader r = getOnlyLeafReader(DirectoryReader.open(w1))) { IndexOptions expected = from == IndexOptions.NONE ? to : from; assertEquals(expected, r.getFieldInfos().fieldInfo("foo").getIndexOptions()); } } else { IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> w1.addIndexes(dir2)); assertEquals("cannot change field \"foo\" from index options=" + from + " to inconsistent index options=" + to, e.getMessage()); } IOUtils.close(w1, dir1, dir2); } }
{ "pile_set_name": "Github" }
// This file was procedurally generated from the following sources: // - src/dstr-binding/ary-ptrn-rest-obj-prop-id.case // - src/dstr-binding/default/cls-decl-async-gen-meth-dflt.template /*--- description: Rest element containing an object binding pattern (class expression async generator method (default parameters)) esid: sec-class-definitions-runtime-semantics-evaluation features: [async-iteration] flags: [generated, async] info: | ClassDeclaration : class BindingIdentifier ClassTail 1. Let className be StringValue of BindingIdentifier. 2. Let value be the result of ClassDefinitionEvaluation of ClassTail with argument className. [...] 14.5.14 Runtime Semantics: ClassDefinitionEvaluation 21. For each ClassElement m in order from methods a. If IsStatic of m is false, then i. Let status be the result of performing PropertyDefinitionEvaluation for m with arguments proto and false. [...] Runtime Semantics: PropertyDefinitionEvaluation AsyncGeneratorMethod : async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody } 1. Let propKey be the result of evaluating PropertyName. 2. ReturnIfAbrupt(propKey). 3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true. Otherwise let strict be false. 4. Let scope be the running execution context's LexicalEnvironment. 5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters, AsyncGeneratorBody, scope, strict). [...] 13.3.3.6 Runtime Semantics: IteratorBindingInitialization BindingRestElement : ... BindingPattern 1. Let A be ArrayCreate(0). [...] 3. Repeat [...] b. If iteratorRecord.[[done]] is true, then i. Return the result of performing BindingInitialization of BindingPattern with A and environment as the arguments. [...] ---*/ let length = "outer"; var callCount = 0; class C { async *method([...{ 0: v, 1: w, 2: x, 3: y, length: z }] = [7, 8, 9]) { assert.sameValue(v, 7); assert.sameValue(w, 8); assert.sameValue(x, 9); assert.sameValue(y, undefined); assert.sameValue(z, 3); assert.sameValue(length, "outer", "the length prop is not set as a binding name"); callCount = callCount + 1; } }; new C().method().next().then(() => { assert.sameValue(callCount, 1, 'invoked exactly once'); }).then($DONE, $DONE);
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> <year>2011</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </legalnotice> <title>Usage</title> <prepared></prepared> <responsible></responsible> <docno></docno> <approved></approved> <checked></checked> <date></date> <rev></rev> <file>diameter_using.xml</file> </header> <p> To be written.</p> <!-- ===================================================================== --> </chapter>
{ "pile_set_name": "Github" }
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 const ( LabelHostname = "kubernetes.io/hostname" LabelZoneFailureDomain = "failure-domain.beta.kubernetes.io/zone" LabelZoneRegion = "failure-domain.beta.kubernetes.io/region" LabelZoneFailureDomainStable = "topology.kubernetes.io/zone" LabelZoneRegionStable = "topology.kubernetes.io/region" LabelInstanceType = "beta.kubernetes.io/instance-type" LabelInstanceTypeStable = "node.kubernetes.io/instance-type" LabelOSStable = "kubernetes.io/os" LabelArchStable = "kubernetes.io/arch" // LabelWindowsBuild is used on Windows nodes to specify the Windows build number starting with v1.17.0. // It's in the format MajorVersion.MinorVersion.BuildNumber (for ex: 10.0.17763) LabelWindowsBuild = "node.kubernetes.io/windows-build" // LabelNamespaceSuffixKubelet is an allowed label namespace suffix kubelets can self-set ([*.]kubelet.kubernetes.io/*) LabelNamespaceSuffixKubelet = "kubelet.kubernetes.io" // LabelNamespaceSuffixNode is an allowed label namespace suffix kubelets can self-set ([*.]node.kubernetes.io/*) LabelNamespaceSuffixNode = "node.kubernetes.io" // LabelNamespaceNodeRestriction is a forbidden label namespace that kubelets may not self-set when the NodeRestriction admission plugin is enabled LabelNamespaceNodeRestriction = "node-restriction.kubernetes.io" // IsHeadlessService is added by Controller to an Endpoint denoting if its parent // Service is Headless. The existence of this label can be used further by other // controllers and kube-proxy to check if the Endpoint objects should be replicated when // using Headless Services IsHeadlessService = "service.kubernetes.io/headless" )
{ "pile_set_name": "Github" }
// RUN: %clang_cc1 -triple x86_64-apple-darwin -fblocks -emit-llvm -o - %s | FileCheck -check-prefix CHECK -check-prefix CHECK-NOARC %s // RUN: %clang_cc1 -triple x86_64-apple-darwin -fblocks -emit-llvm -fobjc-arc -o - %s | FileCheck -check-prefix CHECK -check-prefix CHECK-ARC %s typedef void (^BlockTy)(void); union U { int *i; long long *ll; } __attribute__((transparent_union)); void escapingFunc0(BlockTy); void noescapeFunc0(id, __attribute__((noescape)) BlockTy); void noescapeFunc1(__attribute__((noescape)) int *); void noescapeFunc2(__attribute__((noescape)) id); void noescapeFunc3(__attribute__((noescape)) union U); // Block descriptors of non-escaping blocks don't need pointers to copy/dispose // helper functions. // CHECK: %[[STRUCT_BLOCK_DESCRIPTOR:.*]] = type { i64, i64 } // When the block is non-escaping, copy/dispose helpers aren't generated, so the // block layout string must include information about __strong captures. // CHECK-NOARC: %[[STRUCT_BLOCK_BYREF_B0:.*]] = type { i8*, %[[STRUCT_BLOCK_BYREF_B0]]*, i32, i32, i8*, %[[STRUCT_S0:.*]] } // CHECK-ARC: %[[STRUCT_BLOCK_BYREF_B0:.*]] = type { i8*, %[[STRUCT_BLOCK_BYREF_B0]]*, i32, i32, i8*, i8*, i8*, %[[STRUCT_S0:.*]] } // CHECK: %[[STRUCT_S0]] = type { i8*, i8* } // CHECK: @[[BLOCK_DESCIPTOR_TMP_2:.*ls32l8"]] = linkonce_odr hidden unnamed_addr constant { i64, i64, i8*, i64 } { i64 0, i64 40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @{{.*}}, i32 0, i32 0), i64 256 }, align 8 // CHECK-LABEL: define void @test0( // CHECK: call void @noescapeFunc0({{.*}}, {{.*}} nocapture {{.*}}) // CHECK: declare void @noescapeFunc0(i8*, {{.*}} nocapture) void test0(BlockTy b) { noescapeFunc0(0, b); } // CHECK-LABEL: define void @test1( // CHECK: call void @noescapeFunc1({{.*}} nocapture {{.*}}) // CHECK: declare void @noescapeFunc1({{.*}} nocapture) void test1(int *i) { noescapeFunc1(i); } // CHECK-LABEL: define void @test2( // CHECK: call void @noescapeFunc2({{.*}} nocapture {{.*}}) // CHECK: declare void @noescapeFunc2({{.*}} nocapture) void test2(id i) { noescapeFunc2(i); } // CHECK-LABEL: define void @test3( // CHECK: call void @noescapeFunc3({{.*}} nocapture {{.*}}) // CHECK: declare void @noescapeFunc3({{.*}} nocapture) void test3(union U u) { noescapeFunc3(u); } // CHECK: define internal void @"\01-[C0 m0:]"({{.*}}, {{.*}}, {{.*}} nocapture {{.*}}) // CHECK-LABEL: define void @test4( // CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32*)*)(i8* {{.*}}, i8* {{.*}}, i32* nocapture {{.*}}) @interface C0 -(void) m0:(int*)__attribute__((noescape)) p0; @end @implementation C0 -(void) m0:(int*)__attribute__((noescape)) p0 { } @end void test4(C0 *c0, int *p) { [c0 m0:p]; } // CHECK-LABEL: define void @test5( // CHECK: call void {{.*}}(i8* bitcast ({ i8**, i32, i32, i8*, {{.*}} }* @{{.*}} to i8*), i32* nocapture {{.*}}) // CHECK: call void {{.*}}(i8* {{.*}}, i32* nocapture {{.*}}) // CHECK: define internal void @{{.*}}(i8* {{.*}}, i32* nocapture {{.*}}) typedef void (^BlockTy2)(__attribute__((noescape)) int *); void test5(BlockTy2 b, int *p) { ^(int *__attribute__((noescape)) p0){}(p); b(p); } // If the block is non-escaping, set the BLOCK_IS_NOESCAPE and BLOCK_IS_GLOBAL // bits of field 'flags' and set the 'isa' field to 'NSConcreteGlobalBlock'. // CHECK: define void @test6(i8* %{{.*}}, i8* %[[B:.*]]) // CHECK: %{{.*}} = alloca i8*, align 8 // CHECK: %[[B_ADDR:.*]] = alloca i8*, align 8 // CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8 // CHECK-NOARC: store i8* %[[B]], i8** %[[B_ADDR]], align 8 // CHECK-ARC: store i8* null, i8** %[[B_ADDR]], align 8 // CHECK-ARC: call void @llvm.objc.storeStrong(i8** %[[B_ADDR]], i8* %[[B]]) // CHECK-ARC: %[[V0:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]], i32 0, i32 5 // CHECK: %[[BLOCK_ISA:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]], i32 0, i32 0 // CHECK: store i8* bitcast (i8** @_NSConcreteGlobalBlock to i8*), i8** %[[BLOCK_ISA]], align 8 // CHECK: %[[BLOCK_FLAGS:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]], i32 0, i32 1 // CHECK: store i32 -796917760, i32* %[[BLOCK_FLAGS]], align 8 // CHECK: %[[BLOCK_DESCRIPTOR:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]], i32 0, i32 4 // CHECK: store %[[STRUCT_BLOCK_DESCRIPTOR]]* bitcast ({ i64, i64, i8*, i64 }* @[[BLOCK_DESCIPTOR_TMP_2]] to %[[STRUCT_BLOCK_DESCRIPTOR]]*), %[[STRUCT_BLOCK_DESCRIPTOR]]** %[[BLOCK_DESCRIPTOR]], align 8 // CHECK: %[[BLOCK_CAPTURED:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]], i32 0, i32 5 // CHECK-NOARC: %[[V1:.*]] = load i8*, i8** %[[B_ADDR]], align 8 // CHECK-NOARC: store i8* %[[V1]], i8** %[[BLOCK_CAPTURED]], align 8 // CHECK-ARC: %[[V2:.*]] = load i8*, i8** %[[B_ADDR]], align 8 // CHECK-ARC: %[[V3:.*]] = call i8* @llvm.objc.retain(i8* %[[V2]]) // CHECK-ARC: store i8* %[[V3]], i8** %[[BLOCK_CAPTURED]], align 8 // CHECK: call void @noescapeFunc0( // CHECK-ARC: call void @llvm.objc.storeStrong(i8** %[[V0]], i8* null) // CHECK-ARC: call void @llvm.objc.storeStrong(i8** %[[B_ADDR]], i8* null) // Non-escaping blocks don't need copy/dispose helper functions. // CHECK-NOT: define internal void @__copy_helper_block_ // CHECK-NOT: define internal void @__destroy_helper_block_ void func(id); void test6(id a, id b) { noescapeFunc0(a, ^{ func(b); }); } // We don't need either the byref helper functions or the byref structs for // __block variables that are not captured by escaping blocks. // CHECK: define void @test7( // CHECK: alloca i8*, align 8 // CHECK: %[[B0:.*]] = alloca i8*, align 8 // CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8** }>, align 8 // CHECK: %[[BLOCK_CAPTURED:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8** }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8** }>* %[[BLOCK]], i32 0, i32 5 // CHECK: store i8** %[[B0]], i8*** %[[BLOCK_CAPTURED]], align 8 // CHECK-ARC-NOT: define internal void @__Block_byref_object_copy_ // CHECK-ARC-NOT: define internal void @__Block_byref_object_dispose_ void test7() { id a; __block id b0; noescapeFunc0(a, ^{ (void)b0; }); } // __block variables captured by escaping blocks need byref helper functions. // CHECK: define void @test8( // CHECK: %[[A:.*]] = alloca i8*, align 8 // CHECK: %[[B0:.*]] = alloca %[[STRUCT_BLOCK_BYREF_B0]], align 8 // CHECK: alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8 // CHECK: %[[BLOCK1:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8 // CHECK: %[[BLOCK_CAPTURED7:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK1]], i32 0, i32 5 // CHECK: %[[V3:.*]] = bitcast %[[STRUCT_BLOCK_BYREF_B0]]* %[[B0]] to i8* // CHECK: store i8* %[[V3]], i8** %[[BLOCK_CAPTURED7]], align 8 // CHECK-ARC: define internal void @__Block_byref_object_copy_ // CHECK-ARC: define internal void @__Block_byref_object_dispose_ // CHECK: define linkonce_odr hidden void @__copy_helper_block_ // CHECK: define linkonce_odr hidden void @__destroy_helper_block_ struct S0 { id a, b; }; void test8() { id a; __block struct S0 b0; noescapeFunc0(a, ^{ (void)b0; }); escapingFunc0(^{ (void)b0; }); }
{ "pile_set_name": "Github" }
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.undertow.websockets.client; import io.undertow.websockets.WebSocketExtension; import java.util.List; import java.util.Map; /** * @author Stuart Douglas */ public class WebSocketClientNegotiation { private final List<String> supportedSubProtocols; private final List<WebSocketExtension> supportedExtensions; private volatile String selectedSubProtocol; private volatile List<WebSocketExtension> selectedExtensions; public WebSocketClientNegotiation(List<String> supportedSubProtocols, List<WebSocketExtension> supportedExtensions) { this.supportedSubProtocols = supportedSubProtocols; this.supportedExtensions = supportedExtensions; } public List<String> getSupportedSubProtocols() { return supportedSubProtocols; } public List<WebSocketExtension> getSupportedExtensions() { return supportedExtensions; } public String getSelectedSubProtocol() { return selectedSubProtocol; } public List<WebSocketExtension> getSelectedExtensions() { return selectedExtensions; } public void beforeRequest(final Map<String, List<String>> headers) { } public void afterRequest(final Map<String, List<String>> headers) { } public void handshakeComplete(String selectedProtocol, List<WebSocketExtension> selectedExtensions) { this.selectedExtensions = selectedExtensions; this.selectedSubProtocol = selectedProtocol; } }
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> #import <SPOwner/NSCopying-Protocol.h> #import <SPOwner/NSSecureCoding-Protocol.h> @class NSDate, NSString; @interface SPBeaconLocation : NSObject <NSCopying, NSSecureCoding> { NSDate *_timestamp; double _latitude; double _longitude; double _horizontalAccuracy; NSString *_source; } + (BOOL)supportsSecureCoding; - (void).cxx_destruct; @property(copy, nonatomic) NSString *source; // @synthesize source=_source; @property(readonly, nonatomic) double horizontalAccuracy; // @synthesize horizontalAccuracy=_horizontalAccuracy; @property(nonatomic) double longitude; // @synthesize longitude=_longitude; @property(nonatomic) double latitude; // @synthesize latitude=_latitude; @property(copy, nonatomic) NSDate *timestamp; // @synthesize timestamp=_timestamp; - (id)debugDescription; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; - (id)initWithTimestamp:(id)arg1 latitude:(double)arg2 longitude:(double)arg3 horizontalAccuracy:(double)arg4 source:(id)arg5; - (id)copyWithZone:(struct _NSZone *)arg1; @end
{ "pile_set_name": "Github" }
<?php namespace Thelia\Model; use Thelia\Model\Base\OrderCouponQuery as BaseOrderCouponQuery; /** * Skeleton subclass for performing query and update operations on the 'order_coupon' table. * * * * You should add additional methods to this class to meet the * application requirements. This class will only be generated as * long as it does not already exist in the output directory. * */ class OrderCouponQuery extends BaseOrderCouponQuery { } // OrderCouponQuery
{ "pile_set_name": "Github" }
import subprocess from error_codes import * from helpers import geninfo_lookup, get_dpkg_pkg_version, get_rpm_pkg_version def get_package_version(pkg): pkg_mngr = geninfo_lookup('PKG_MANAGER') # dpkg if (pkg_mngr == 'dpkg'): return get_dpkg_pkg_version(pkg) # rpm elif (pkg_mngr == 'rpm'): return get_rpm_pkg_version(pkg) else: return None # get current OMSConfig (DSC) version running on machine def get_omsconfig_version(): pkg_version = get_package_version('omsconfig') if (pkg_version == None): # couldn't find OMSConfig return None return pkg_version # get current OMI version running on machine def get_omi_version(): pkg_version = get_package_version('omi') if (pkg_version == None): # couldn't find OMI return None return pkg_version # get current SCX version running on machine def get_scx_version(): pkg_version = get_package_version('scx') if (pkg_version == None): # couldn't find SCX return None return pkg_version # check to make sure all necessary packages are installed def check_packages(): if (get_omsconfig_version() == None): return ERR_OMSCONFIG if (get_omi_version() == None): return ERR_OMI if (get_scx_version() == None): return ERR_SCX return NO_ERROR
{ "pile_set_name": "Github" }
// This file was procedurally generated from the following sources: // - src/dstr-binding-for-await/obj-ptrn-id-init-fn-name-class.case // - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template /*--- description: SingleNameBinding assigns `name` to "anonymous" classes (for-await-of statement) esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation features: [destructuring-binding, async-iteration] flags: [generated, async] info: | IterationStatement : for await ( ForDeclaration of AssignmentExpression ) Statement [...] 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, lexicalBinding, labelSet, async). 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation [...] 4. Let destructuring be IsDestructuring of lhs. [...] 6. Repeat [...] j. If destructuring is false, then [...] k. Else i. If lhsKind is assignment, then [...] ii. Else if lhsKind is varBinding, then [...] iii. Else, 1. Assert: lhsKind is lexicalBinding. 2. Assert: lhs is a ForDeclaration. 3. Let status be the result of performing BindingInitialization for lhs passing nextValue and iterationEnv as arguments. [...] 13.3.3.7 Runtime Semantics: KeyedBindingInitialization SingleNameBinding : BindingIdentifier Initializer_opt [...] 6. If Initializer is present and v is undefined, then [...] d. If IsAnonymousFunctionDefinition(Initializer) is true, then i. Let hasNameProperty be HasOwnProperty(v, "name"). ii. ReturnIfAbrupt(hasNameProperty). iii. If hasNameProperty is false, perform SetFunctionName(v, bindingId). ---*/ var iterCount = 0; var asyncIter = (async function*() { yield* [{}]; })(); async function fn() { for await (const { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } of asyncIter) { assert.sameValue(cls.name, 'cls'); assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); iterCount += 1; } } fn() .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) .then($DONE, $DONE);
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.knox.gateway.websockets; import org.apache.knox.gateway.i18n.messages.Message; import org.apache.knox.gateway.i18n.messages.MessageLevel; import org.apache.knox.gateway.i18n.messages.Messages; import org.apache.knox.gateway.i18n.messages.StackTrace; /** * Logging for Websocket * * @since 0.10 */ @Messages(logger = "org.apache.knox.gateway.websockets") public interface WebsocketLogMessages { @Message(level = MessageLevel.ERROR, text = "Error creating websocket connection: {0}") void failedCreatingWebSocket( @StackTrace(level = MessageLevel.ERROR) Exception e); @Message(level = MessageLevel.ERROR, text = "Unable to connect to websocket server: {0}") void connectionFailed(@StackTrace(level = MessageLevel.ERROR) Exception e); @Message(level = MessageLevel.ERROR, text = "Error: {0}") void onError(String message); @Message(level = MessageLevel.ERROR, text = "Bad or malformed url: {0}") void badUrlError(@StackTrace(level = MessageLevel.ERROR) Exception e); @Message(level = MessageLevel.DEBUG, text = "Websocket connection to backend server {0} opened") void onConnectionOpen(String backend); @Message(level = MessageLevel.DEBUG, text = "Message: {0}") void logMessage(String message); @Message(level = MessageLevel.DEBUG, text = "Websocket connection to backend server {0} closed") void onConnectionClose(String backend); @Message(level = MessageLevel.DEBUG, text = "{0}") void debugLog(String message); }
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jackrabbit.oak.security.authorization.composite; /** * Same as {@link CompositeProviderAllTest} * with reverse order of the aggregated providers. */ public class CompositeProviderAllReverseTest extends CompositeProviderAllTest { @Override boolean reverseOrder() { return true; } }
{ "pile_set_name": "Github" }
/* * 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 app.metatron.discovery.domain.dataconnection; import com.querydsl.core.types.Predicate; import org.joda.time.DateTime; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; import java.util.Map; import app.metatron.discovery.common.criteria.ListCriterion; import app.metatron.discovery.common.criteria.ListCriterionType; import app.metatron.discovery.common.criteria.ListFilter; import app.metatron.discovery.domain.datasource.DataSourceListCriterionKey; import app.metatron.discovery.domain.user.DirectoryProfile; import app.metatron.discovery.domain.user.User; import app.metatron.discovery.domain.user.UserRepository; import app.metatron.discovery.domain.user.group.GroupMember; import app.metatron.discovery.domain.user.group.GroupMemberRepository; import app.metatron.discovery.domain.user.group.GroupService; import app.metatron.discovery.domain.user.role.RoleDirectory; import app.metatron.discovery.domain.user.role.RoleDirectoryRepository; import app.metatron.discovery.domain.workspace.Workspace; import app.metatron.discovery.domain.workspace.WorkspaceRepository; import app.metatron.discovery.domain.workspace.WorkspaceService; import app.metatron.discovery.extension.dataconnection.jdbc.dialect.JdbcDialect; import app.metatron.discovery.util.AuthUtils; /** * */ @Component public class DataConnectionFilterService { @Autowired UserRepository userRepository; @Autowired DataConnectionRepository dataConnectionRepository; @Autowired GroupService groupService; @Autowired RoleDirectoryRepository roleDirectoryRepository; @Autowired WorkspaceRepository workspaceRepository; @Autowired WorkspaceService workspaceService; @Autowired GroupMemberRepository groupMemberRepository; @Autowired DataConnectionProperties dataConnectionProperties; @Autowired List<JdbcDialect> jdbcDialects; public List<ListCriterion> getListCriterion(){ List<ListCriterion> criteria = new ArrayList<>(); //Publish criteria.add(new ListCriterion(DataConnectionListCriterionKey.PUBLISH, ListCriterionType.CHECKBOX, "msg.storage.ui.criterion.publish", true)); //Creator criteria.add(new ListCriterion(DataConnectionListCriterionKey.CREATOR, ListCriterionType.CHECKBOX, "msg.storage.ui.criterion.creator", true)); //DB TYPE criteria.add(new ListCriterion(DataConnectionListCriterionKey.IMPLEMENTOR, ListCriterionType.CHECKBOX, "msg.storage.ui.criterion.implementor")); //AUTH_TYPE criteria.add(new ListCriterion(DataConnectionListCriterionKey.AUTH_TYPE, ListCriterionType.CHECKBOX, "msg.storage.ui.criterion.auth-type")); //CreatedTime ListCriterion createdTimeCriterion = new ListCriterion(DataConnectionListCriterionKey.CREATED_TIME, ListCriterionType.RANGE_DATETIME, "msg.storage.ui.criterion.created-time"); createdTimeCriterion.addFilter(new ListFilter(DataConnectionListCriterionKey.CREATED_TIME, "createdTimeFrom", "createdTimeTo", "", "", "msg.storage.ui.criterion.created-time")); criteria.add(createdTimeCriterion); //more ListCriterion moreCriterion = new ListCriterion(DataConnectionListCriterionKey.MORE, ListCriterionType.CHECKBOX, "msg.storage.ui.criterion.more"); moreCriterion.addSubCriterion(new ListCriterion(DataConnectionListCriterionKey.MODIFIED_TIME, ListCriterionType.RANGE_DATETIME, "msg.storage.ui.criterion.modified-time")); criteria.add(moreCriterion); return criteria; } public ListCriterion getListCriterionByKey(DataConnectionListCriterionKey criterionKey){ ListCriterion criterion = new ListCriterion(); criterion.setCriterionKey(criterionKey); switch(criterionKey){ case IMPLEMENTOR: for(JdbcDialect jdbcDialect : jdbcDialects){ if(jdbcDialect.getImplementor().equals("STAGE")){ continue; } criterion.addFilter(new ListFilter(criterionKey, "implementor", jdbcDialect.getImplementor(), jdbcDialect.getName())); } break; case AUTH_TYPE: criterion.addFilter(new ListFilter(criterionKey, "authenticationType", DataConnection.AuthenticationType.MANUAL.toString(), "msg.storage.li.connect.always")); criterion.addFilter(new ListFilter(criterionKey, "authenticationType", DataConnection.AuthenticationType.USERINFO.toString(), "msg.storage.li.connect.account")); criterion.addFilter(new ListFilter(criterionKey, "authenticationType", DataConnection.AuthenticationType.DIALOG.toString(), "msg.storage.li.connect.id")); break; case CREATED_TIME: //created_time criterion.addFilter(new ListFilter(DataConnectionListCriterionKey.CREATED_TIME, "createdTimeFrom", "createdTimeTo", "", "", "msg.storage.ui.criterion.created-time")); break; case MODIFIED_TIME: //created_time criterion.addFilter(new ListFilter(DataConnectionListCriterionKey.MODIFIED_TIME, "modifiedTimeFrom", "modifiedTimeTo", "", "", "msg.storage.ui.criterion.modified-time")); break; case CREATOR: //allow search criterion.setSearchable(true); String userName = AuthUtils.getAuthUserName(); User user = userRepository.findByUsername(userName); //user ListCriterion userCriterion = new ListCriterion(); userCriterion.setCriterionName("msg.storage.ui.criterion.users"); userCriterion.setCriterionType(ListCriterionType.CHECKBOX); criterion.addSubCriterion(userCriterion); //me userCriterion.addFilter(new ListFilter("createdBy", userName, user.getFullName() + " (me)")); //dataconnection create users List<String> creatorIdList = dataConnectionRepository.findDistinctCreatedBy(); if(creatorIdList != null && !creatorIdList.isEmpty()){ List<User> creatorUserList = userRepository.findByUsernames(creatorIdList); for(User creator : creatorUserList){ if(!creator.getUsername().equals(userName)){ ListFilter filter = new ListFilter("createdBy", creator.getUsername(), creator.getFullName()); userCriterion.addFilter(filter); } } } //groups ListCriterion groupCriterion = new ListCriterion(); groupCriterion.setCriterionName("msg.storage.ui.criterion.groups"); criterion.addSubCriterion(groupCriterion); //my group List<Map<String, Object>> groupList = groupService.getJoinedGroupsForProjection(userName, false); if(groupList != null && !groupList.isEmpty()){ for(Map<String, Object> groupMap : groupList){ ListFilter filter = new ListFilter("userGroup", groupMap.get("id").toString(), groupMap.get("name").toString() + " (my)"); groupCriterion.addFilter(filter); } } //data manager group List<RoleDirectory> roleDirectoryList = roleDirectoryRepository.findByTypeAndRoleId(DirectoryProfile.Type.GROUP, "ROLE_SYSTEM_DATA_MANAGER"); if(roleDirectoryList != null && !roleDirectoryList.isEmpty()){ for(RoleDirectory roleDirectory : roleDirectoryList){ //duplicate group check boolean duplicated = false; if(groupList != null && !groupList.isEmpty()){ long duplicatedCnt = groupList.stream() .filter(groupMap -> roleDirectory.getDirectoryId().equals(groupMap.get("id").toString())) .count(); duplicated = duplicatedCnt > 0; } if(!duplicated){ ListFilter filter = new ListFilter("userGroup", roleDirectory.getDirectoryId(), roleDirectory.getDirectoryName()); groupCriterion.addFilter(filter); } } } break; case PUBLISH: //allow search criterion.setSearchable(true); //published workspace criterion.addFilter(new ListFilter(criterionKey, "published", "true", "msg.storage.ui.criterion.open-data")); //my private workspace Workspace myWorkspace = workspaceRepository.findPrivateWorkspaceByOwnerId(AuthUtils.getAuthUserName()); criterion.addFilter(new ListFilter(criterionKey, "workspace", myWorkspace.getId(), myWorkspace.getName())); //member public workspace not published List<Workspace> memberPublicWorkspaces = workspaceService.getPublicWorkspaces(false, null, null, null); for(Workspace workspace : memberPublicWorkspaces){ criterion.addFilter(new ListFilter(criterionKey, "workspace", workspace.getId(), workspace.getName())); } break; default: break; } return criterion; } public Page<DataConnection> findDataConnectionByFilter( List<String> workspaces, List<String> createdBys, List<String> userGroups, List<String> implementors, List<DataConnection.AuthenticationType> authenticationTypes, DateTime createdTimeFrom, DateTime createdTimeTo, DateTime modifiedTimeFrom, DateTime modifiedTimeTo, String containsText, List<Boolean> published, Pageable pageable){ //add userGroups member to createdBy List<GroupMember> groupMembers = groupMemberRepository.findByGroupIds(userGroups); if(groupMembers != null && !groupMembers.isEmpty()){ if(createdBys == null) createdBys = new ArrayList<>(); for(GroupMember groupMember : groupMembers){ createdBys.add(groupMember.getMemberId()); } } // Get Predicate Predicate searchPredicated = DataConnectionPredicate.searchList(workspaces, createdBys, implementors, authenticationTypes, createdTimeFrom, createdTimeTo, modifiedTimeFrom, modifiedTimeTo, containsText, published); // Find by predicated Page<DataConnection> dataConnections = dataConnectionRepository.findAll(searchPredicated, pageable); return dataConnections; } public List<ListFilter> getDefaultFilter(){ List<DataConnectionProperties.DefaultFilter> defaultFilters = dataConnectionProperties.getDefaultFilters(); List<ListFilter> defaultCriteria = new ArrayList<>(); if(defaultFilters != null){ for(DataConnectionProperties.DefaultFilter defaultFilter : defaultFilters){ //me if(defaultFilter.getFilterValue().equals("me")){ String userName = AuthUtils.getAuthUserName(); User user = userRepository.findByUsername(userName); ListFilter meFilter = new ListFilter(DataSourceListCriterionKey.valueOf(defaultFilter.getCriterionKey()) , "createdBy", null, userName, null, user.getFullName() + " (me)"); defaultCriteria.add(meFilter); } else { ListFilter listFilter = new ListFilter(DataSourceListCriterionKey.valueOf(defaultFilter.getCriterionKey()) , defaultFilter.getFilterKey(), null, defaultFilter.getFilterValue(), null , defaultFilter.getFilterName()); defaultCriteria.add(listFilter); } } } return defaultCriteria; } }
{ "pile_set_name": "Github" }
@echo off rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with rem this work for additional information regarding copyright ownership. rem The ASF licenses this file to You under the Apache License, Version 2.0 rem (the "License"); you may not use this file except in compliance with rem the License. You may obtain a copy of the License at rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem Unless required by applicable law or agreed to in writing, software rem distributed under the License is distributed on an "AS IS" BASIS, rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem See the License for the specific language governing permissions and rem limitations under the License. if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- rem Wrapper script for command line tools rem rem Environment Variable Prerequisites rem rem CATALINA_HOME May point at your Catalina "build" directory. rem rem TOOL_OPTS (Optional) Java runtime options. rem rem JAVA_HOME Must point at your Java Development Kit installation. rem Using JRE_HOME instead works as well. rem rem JRE_HOME Must point at your Java Runtime installation. rem Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME rem are both set, JRE_HOME is used. rem rem JAVA_OPTS (Optional) Java runtime options. rem rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories rem containing some jars in order to allow replacement of APIs rem created outside of the JCP (i.e. DOM and SAX from W3C). rem It can also be used to update the XML parser implementation. rem Defaults to $CATALINA_HOME/endorsed. rem rem $Id: tool-wrapper.bat 1138835 2011-06-23 11:27:57Z rjung $ rem --------------------------------------------------------------------------- rem Guess CATALINA_HOME if not defined set "CURRENT_DIR=%cd%" if not "%CATALINA_HOME%" == "" goto gotHome set "CATALINA_HOME=%CURRENT_DIR%" if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome cd .. set "CATALINA_HOME=%cd%" cd "%CURRENT_DIR%" :gotHome if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome echo The CATALINA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program goto end :okHome rem Ensure that any user defined CLASSPATH variables are not used on startup, rem but allow them to be specified in setenv.bat, in rare case when it is needed. set CLASSPATH= rem Get standard environment variables if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat" rem Get standard Java environment variables if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat" echo This file is needed to run this program goto end :okSetclasspath call "%CATALINA_HOME%\bin\setclasspath.bat" %1 if errorlevel 1 goto end rem Add on extra jar files to CLASSPATH rem Note that there are no quotes as we do not want to introduce random rem quotes into the CLASSPATH if "%CLASSPATH%" == "" goto emptyClasspath set "CLASSPATH=%CLASSPATH%;" :emptyClasspath set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CATALINA_HOME%\lib\servlet-api.jar" set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager rem Get remaining unshifted command line arguments and save them in the set CMD_LINE_ARGS= :setArgs if ""%1""=="""" goto doneSetArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto setArgs :doneSetArgs %_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% :end
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.processors.cache.ttl; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import javax.cache.Cache; import javax.cache.configuration.FactoryBuilder; import javax.cache.expiry.Duration; import javax.cache.expiry.TouchedExpiryPolicy; import javax.cache.integration.CacheLoaderException; import javax.cache.integration.CacheWriterException; import javax.cache.integration.CompletionListenerFuture; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteDataStreamer; import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy; import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.store.CacheStoreAdapter; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.lang.IgniteBiInClosure; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheMode.LOCAL; import static org.apache.ignite.cache.CachePeekMode.BACKUP; import static org.apache.ignite.cache.CachePeekMode.NEAR; import static org.apache.ignite.cache.CachePeekMode.OFFHEAP; import static org.apache.ignite.cache.CachePeekMode.ONHEAP; import static org.apache.ignite.cache.CachePeekMode.PRIMARY; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * TTL test. */ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest { /** */ private static final int MAX_CACHE_SIZE = 5; /** */ private static final int SIZE = 11; /** */ private static final long DEFAULT_TIME_TO_LIVE = 2000; /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setCacheMode(cacheMode()); ccfg.setAtomicityMode(atomicityMode()); LruEvictionPolicy plc = new LruEvictionPolicy(); plc.setMaxSize(MAX_CACHE_SIZE); ccfg.setEvictionPolicy(plc); ccfg.setOnheapCacheEnabled(true); ccfg.setIndexedTypes(Integer.class, Integer.class); ccfg.setBackups(2); ccfg.setWriteSynchronizationMode(FULL_SYNC); ccfg.setRebalanceMode(SYNC); ccfg.setCacheStoreFactory(singletonFactory(new CacheStoreAdapter() { @Override public void loadCache(IgniteBiInClosure clo, Object... args) { for (int i = 0; i < SIZE; i++) clo.apply(i, i); } @Override public Object load(Object key) throws CacheLoaderException { return key; } @Override public void write(Cache.Entry entry) throws CacheWriterException { // No-op. } @Override public void delete(Object key) throws CacheWriterException { // No-op. } })); ccfg.setExpiryPolicyFactory( FactoryBuilder.factoryOf(new TouchedExpiryPolicy(new Duration(MILLISECONDS, DEFAULT_TIME_TO_LIVE)))); cfg.setCacheConfiguration(ccfg); return cfg; } /** * @return Atomicity mode. */ protected abstract CacheAtomicityMode atomicityMode(); /** * @return Cache mode. */ protected abstract CacheMode cacheMode(); /** * @return GridCount */ protected abstract int gridCount(); /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { startGrids(gridCount()); } /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { stopAllGrids(); } /** * @throws Exception If failed. */ @Test public void testDefaultTimeToLiveLoadCache() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); cache.loadCache(null); checkSizeBeforeLive(SIZE); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(); } /** * @throws Exception If failed. */ @Test public void testDefaultTimeToLiveLoadAll() throws Exception { defaultTimeToLiveLoadAll(false); defaultTimeToLiveLoadAll(true); } /** * @param replaceExisting Replace existing value flag. * @throws Exception If failed. */ private void defaultTimeToLiveLoadAll(boolean replaceExisting) throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); CompletionListenerFuture fut = new CompletionListenerFuture(); Set<Integer> keys = new HashSet<>(); for (int i = 0; i < SIZE; ++i) keys.add(i); cache.loadAll(keys, replaceExisting, fut); fut.get(); checkSizeBeforeLive(SIZE); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(); } /** * @throws Exception If failed. */ @Test public void testDefaultTimeToLiveStreamerAdd() throws Exception { try (IgniteDataStreamer<Integer, Integer> streamer = ignite(0).dataStreamer(DEFAULT_CACHE_NAME)) { for (int i = 0; i < SIZE; i++) streamer.addData(i, i); } checkSizeBeforeLive(SIZE); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(); try (IgniteDataStreamer<Integer, Integer> streamer = ignite(0).dataStreamer(DEFAULT_CACHE_NAME)) { streamer.allowOverwrite(true); for (int i = 0; i < SIZE; i++) streamer.addData(i, i); } checkSizeBeforeLive(SIZE); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(); } /** * @throws Exception If failed. */ @Test public void testDefaultTimeToLivePut() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); Integer key = 0; cache.put(key, 1); checkSizeBeforeLive(1); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(); } /** * @throws Exception If failed. */ @Test public void testDefaultTimeToLivePutAll() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); Map<Integer, Integer> entries = new HashMap<>(); for (int i = 0; i < SIZE; ++i) entries.put(i, i); cache.putAll(entries); checkSizeBeforeLive(SIZE); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(); } /** * @throws Exception If failed. */ @Test public void testDefaultTimeToLivePreload() throws Exception { if (cacheMode() == LOCAL) return; IgniteCache<Integer, Integer> cache = jcache(0); Map<Integer, Integer> entries = new HashMap<>(); for (int i = 0; i < SIZE; ++i) entries.put(i, i); cache.putAll(entries); startGrid(gridCount()); checkSizeBeforeLive(SIZE, gridCount() + 1); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(gridCount() + 1); } /** * @throws Exception If failed. */ @Test public void testTimeToLiveTtl() throws Exception { long time = DEFAULT_TIME_TO_LIVE + 2000; IgniteCache<Integer, Integer> cache = this.<Integer, Integer>jcache(0).withExpiryPolicy( new TouchedExpiryPolicy(new Duration(MILLISECONDS, time))); for (int i = 0; i < SIZE; i++) cache.put(i, i); checkSizeBeforeLive(SIZE); Thread.sleep(DEFAULT_TIME_TO_LIVE + 500); checkSizeBeforeLive(SIZE); Thread.sleep(time - DEFAULT_TIME_TO_LIVE + 500); checkSizeAfterLive(); } /** * @param size Expected size. * @throws Exception If failed. */ private void checkSizeBeforeLive(int size) throws Exception { checkSizeBeforeLive(size, gridCount()); } /** * @param size Expected size. * @param gridCnt Number of nodes. * @throws Exception If failed. */ private void checkSizeBeforeLive(int size, int gridCnt) throws Exception { for (int i = 0; i < gridCnt; ++i) { IgniteCache<Integer, Integer> cache = jcache(i); log.info("Size [node=" + i + ", " + cache.localSize(PRIMARY, BACKUP, NEAR) + ']'); assertEquals("Unexpected size, node: " + i, size, cache.localSize(PRIMARY, BACKUP, NEAR)); for (int key = 0; key < size; key++) assertNotNull(cache.localPeek(key)); assertFalse(cache.query(new SqlQuery<>(Integer.class, "_val >= 0")).getAll().isEmpty()); } } /** * @throws Exception If failed. */ private void checkSizeAfterLive() throws Exception { checkSizeAfterLive(gridCount()); } /** * @param gridCnt Number of nodes. * @throws Exception If failed. */ private void checkSizeAfterLive(int gridCnt) throws Exception { for (int i = 0; i < gridCnt; ++i) { IgniteCache<Integer, Integer> cache = jcache(i); log.info("Size [node=" + i + ", heap=" + cache.localSize(ONHEAP) + ", offheap=" + cache.localSize(OFFHEAP) + ']'); assertEquals(0, cache.localSize()); assertEquals(0, cache.localSize(OFFHEAP)); assertEquals(0, cache.query(new SqlQuery<>(Integer.class, "_val >= 0")).getAll().size()); for (int key = 0; key < SIZE; key++) assertNull(cache.localPeek(key)); } } }
{ "pile_set_name": "Github" }
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_COMPILER_XLA_EXECUTABLE_RUN_OPTIONS_H_ #define TENSORFLOW_COMPILER_XLA_EXECUTABLE_RUN_OPTIONS_H_ #include <string> #include "tensorflow/compiler/xla/types.h" // These classes are forward declared so that ExecutableRunOptions can be linked // into an XLA-compiled binary without having to link all of the pointed-to // objects (e.g., for an ahead-of-time compiled CPU binary, the gpu tools don't // need to be linked). namespace stream_executor { class Stream; class Platform; class DeviceMemoryAllocator; } // namespace stream_executor namespace Eigen { struct ThreadPoolDevice; } // namespace Eigen namespace xla { class DeviceAssignment; class ExecutionProfile; // A unique identifier for a particular "logical execution" of an XLA model. // // A logical execution might encompass multiple executions of one or more // HloModules. Runs that are part of the same logical execution can // communicate via collective ops (e.g. kAllToAll), whereas runs that are part // of different logical executions are isolated. class RunId { public: // Creates a new, unique RunId. RunId(); RunId(const RunId&) = default; RunId& operator=(const RunId&) = default; friend bool operator==(const RunId& a, const RunId& b); std::string ToString() const; template <typename H> friend H AbslHashValue(H h, const RunId& id) { return H::combine(std::move(h), id.data_); } private: int64 data_; }; // Class containing options for running a LocalExecutable. class ExecutableRunOptions { public: // Specifies the allocator to use during execution. ExecutableRunOptions& set_allocator( stream_executor::DeviceMemoryAllocator* allocator); stream_executor::DeviceMemoryAllocator* allocator() const; // If set, this is the device to run the computation on. Valid device_ordinal // values are: 0 to # of devices - 1. These values are identical to the device // ordinal values used by StreamExecutor. The device must be of the same type // as the executable was compiled for. A value of -1 indicates this option has // not been set. ExecutableRunOptions& set_device_ordinal(int device_ordinal); int device_ordinal() const; // If set, this is the stream to run the computation on. The platform of the // stream must match the platform the executable was built for. A value of // nullptr indicates the option has not been set. ExecutableRunOptions& set_stream(stream_executor::Stream* stream); stream_executor::Stream* stream() const; // If set, this is the stream to perform any pre-computation transfers on. // The platform of the stream must match the platform the executable was // built for. A value of nullptr indicates the option has not been set. ExecutableRunOptions& set_host_to_device_stream( stream_executor::Stream* stream); stream_executor::Stream* host_to_device_stream() const; // Sets the thread pool device on which to run Eigen subcomputations. // // This field must be set for XLA:CPU models that call Eigen routines, but may // be null otherwise. Routines that use this field should always CHECK (or // TF_RET_CHECK) that it's not null before dereferencing it, so that users get // a clean crash rather than a segfault. // // Does not take ownership. ExecutableRunOptions& set_intra_op_thread_pool( const Eigen::ThreadPoolDevice* intra_op_thread_pool); const Eigen::ThreadPoolDevice* intra_op_thread_pool() const; // If set, profiling information is written to 'profile'. ExecutionProfile* execution_profile() const; ExecutableRunOptions& set_execution_profile(ExecutionProfile* profile); ExecutableRunOptions& set_device_assignment( const DeviceAssignment* device_assignment); const DeviceAssignment* device_assignment() const; ExecutableRunOptions& set_rng_seed(int rng_seed); int rng_seed() const; ExecutableRunOptions& set_run_id(RunId id); RunId run_id() const; private: stream_executor::DeviceMemoryAllocator* allocator_ = nullptr; int device_ordinal_ = -1; const DeviceAssignment* device_assignment_ = nullptr; stream_executor::Stream* stream_ = nullptr; const Eigen::ThreadPoolDevice* intra_op_thread_pool_ = nullptr; ExecutionProfile* execution_profile_ = nullptr; int rng_seed_ = 0; stream_executor::Stream* host_to_device_stream_ = nullptr; RunId run_id_; }; } // namespace xla #endif // TENSORFLOW_COMPILER_XLA_EXECUTABLE_RUN_OPTIONS_H_
{ "pile_set_name": "Github" }
/************************************************************* * * MathJax/jax/output/SVG/fonts/TeX/svg/Typewriter/Regular/BasicLatin.js * * Copyright (c) 2011-2017 The MathJax Consortium * * 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. * */ MathJax.Hub.Insert( MathJax.OutputJax.SVG.FONTDATA.FONTS['MathJax_Typewriter'], { // SPACE 0x20: [0,0,250,0,0,''], // EXCLAMATION MARK 0x21: [622,0,525,206,320,'206 565Q206 590 222 606T265 622Q287 621 303 606T319 565T314 392L308 216Q299 194 273 194H262Q247 194 241 195T228 200T217 216L211 392Q206 539 206 565ZM206 56Q206 83 223 99T265 115Q288 113 304 99T320 58Q320 33 303 17T262 0Q237 0 222 17T206 56'], // QUOTATION MARK 0x22: [623,-333,525,122,402,'122 575Q122 593 137 608T173 623Q196 623 210 608T225 575Q225 562 218 464Q212 373 211 361T201 341Q193 333 173 333Q154 333 146 341Q138 348 137 360T129 464Q122 561 122 575ZM299 575Q299 593 314 608T350 623Q373 623 387 608T402 575Q402 562 395 464Q389 373 388 361T378 341Q370 333 350 333Q331 333 323 341Q315 348 314 360T306 464Q299 561 299 575'], // NUMBER SIGN 0x23: [612,0,525,36,489,'93 163Q74 163 65 164T46 173T36 198Q36 210 40 215T61 233H131V236Q132 239 140 307T149 377Q149 379 105 379L61 380Q36 392 36 414Q36 450 86 450Q91 450 99 450T112 449H159Q163 480 167 517Q168 524 170 545T174 573T180 591T191 607T210 611Q223 611 232 604T243 588L245 580Q245 565 238 511T230 451Q230 449 282 449H333Q337 480 341 517Q342 524 343 537T345 556T348 573T352 589T359 600T370 608T384 611Q395 611 406 602T419 580Q419 565 412 511T404 451Q404 449 431 449H442Q477 449 485 429Q489 421 489 414Q489 392 463 380L428 379H394V376Q393 373 385 305T376 235Q376 233 419 233H463L468 230Q472 227 473 227T477 223T482 218T486 213T488 206T489 198Q489 162 436 162Q430 162 422 162T412 163H366V161Q364 159 357 92Q356 85 355 73T353 54T350 37T346 22T339 11T328 3T314 0Q303 0 292 9T279 31Q279 37 287 96T295 162Q295 163 244 163H192V161Q190 159 183 92Q182 85 181 73T179 54T176 37T172 22T165 11T154 3T140 0Q129 0 118 9T105 31Q105 37 113 96T121 162Q121 163 93 163ZM323 377Q323 379 272 379H220V376Q219 373 211 305T202 235Q202 233 253 233H305V236Q306 239 314 307T323 377'], // DOLLAR SIGN 0x24: [694,82,525,58,466,'415 397Q392 397 377 411T362 448Q362 464 376 485Q369 498 362 506T346 520T332 528T315 533T300 538V445L301 353L311 350Q382 334 424 284T466 174Q466 115 425 65T303 -2L300 -3V-30Q300 -64 291 -74Q283 -82 262 -82H255Q234 -82 225 -60L224 -32V-4L213 -2Q152 6 106 51T59 170V180Q59 197 74 213Q89 227 110 227T146 213T162 174Q162 156 147 137Q153 123 161 112T176 95T191 85T205 79T216 76T224 74V283L213 285Q147 298 103 343T58 449Q58 516 108 560T224 614V643V654Q224 666 226 673T237 687T264 694Q289 693 294 683T300 642V615H303Q355 607 390 587T440 540T460 493T466 453Q466 425 451 411T415 397ZM137 452Q137 425 158 404T198 376T223 369Q224 369 224 453T223 537Q198 532 168 509T137 452ZM301 75Q307 75 325 83T365 116T387 171Q387 238 300 267V171Q300 75 301 75'], // PERCENT SIGN 0x25: [694,83,525,35,489,'35 560Q35 607 54 645T110 693Q111 693 116 693T125 694Q165 692 187 651T210 560Q210 506 186 467T123 428Q84 428 60 466T35 560ZM139 560Q139 574 136 587T130 608T124 615Q122 617 120 614Q106 595 106 561Q106 516 121 506Q123 504 125 507Q139 526 139 560ZM123 -83Q107 -83 98 -73T88 -48Q88 -43 89 -41Q90 -37 229 316T370 675Q381 694 400 694Q416 694 426 684T436 659Q436 654 435 652Q434 647 295 294T153 -65Q144 -83 123 -83ZM314 50Q314 104 338 143T400 183Q439 183 464 144T489 50T465 -43T402 -82Q358 -82 336 -41T314 50ZM417 50Q417 71 413 85T405 102L401 106Q386 95 386 50Q386 29 390 15T398 -2L402 -6Q417 5 417 50'], // AMPERSAND 0x26: [622,11,525,28,490,'96 462Q96 546 132 584T211 622Q255 622 284 583T314 474Q314 395 224 305L208 288Q213 275 226 251L265 185L269 179Q273 184 299 246L332 333L342 363Q342 364 341 365Q334 365 334 393Q334 406 334 410T340 420T356 431H412H440Q467 431 478 424T490 393Q490 376 484 367T470 357T448 355H441H415L399 312Q349 176 322 127L315 115L323 106Q360 65 393 65Q405 65 410 80T416 109Q416 140 452 140Q487 140 487 105Q487 56 460 23T391 -11L286 41L273 53L262 42Q212 -11 151 -11Q97 -11 63 33T28 143Q28 161 30 176T38 205T47 227T60 247T72 261T84 274T94 283L122 311L119 323Q96 392 96 462ZM243 474Q243 533 218 545L215 546Q212 546 210 546Q182 546 169 501Q167 492 167 466Q167 419 179 368L188 377Q234 425 242 461Q243 465 243 474ZM217 129Q185 174 154 235Q121 214 115 176Q113 168 113 143Q113 83 139 67Q141 66 152 66Q191 66 228 112L217 129'], // APOSTROPHE 0x27: [611,-287,525,175,349,'205 554Q205 577 221 594T263 611Q302 611 325 577T349 490Q349 409 298 347Q285 330 258 309T214 287Q203 289 189 302T175 327Q175 341 185 349T213 369T245 402Q269 437 273 483V497Q264 496 263 496Q240 496 223 513T205 554'], // LEFT PARENTHESIS 0x28: [694,82,525,166,437,'437 -53Q437 -82 399 -82H394Q377 -82 342 -55Q259 7 213 102T166 306Q166 412 211 507T342 667Q377 694 393 694H399Q437 694 437 665Q437 654 426 643T397 620T356 584T311 525Q301 511 290 488T264 412T250 306Q250 191 300 105T422 -27Q437 -37 437 -53'], // RIGHT PARENTHESIS 0x29: [694,82,525,87,358,'87 664Q87 694 126 694Q138 694 147 690T183 667Q266 605 312 510T358 306Q358 193 307 93T161 -70Q142 -82 126 -82Q105 -82 96 -73T87 -53Q87 -47 88 -44Q92 -36 116 -19T173 34T230 119Q273 206 273 306Q273 408 231 494T109 635Q87 649 87 664'], // ASTERISK 0x2A: [520,-89,525,68,456,'222 487Q224 501 235 510T262 520Q279 520 289 510T302 487Q302 458 301 429Q301 421 301 413T301 398T300 386T300 377V374Q300 373 301 373Q304 373 353 403T416 434Q432 434 444 423T456 393Q456 389 456 386T454 379T451 373T448 368T442 363T436 358T427 353T417 348T405 342T391 334Q345 309 339 305L388 279Q400 273 412 266T432 255T441 250Q456 238 456 218Q456 200 445 189T417 177Q403 177 354 207T301 238Q300 238 300 237V234Q300 231 300 226T300 214T301 199T301 182Q302 153 302 124Q300 109 289 100T262 90T235 100T222 124Q222 153 223 182Q223 190 223 198T223 213T224 225T224 234V237Q224 238 223 238Q220 238 171 208T108 177Q92 177 80 188T68 218Q68 237 79 246T134 277Q180 303 185 306L136 332Q124 338 112 345T92 356T83 361Q68 373 68 393Q68 411 79 422T107 434Q121 434 170 404T223 373Q224 373 224 374V377Q224 380 224 385T224 397T223 412T223 429Q222 458 222 487'], // PLUS SIGN 0x2B: [531,-81,525,38,487,'147 271Q138 271 122 271T98 270Q68 270 53 277T38 306T53 335T98 342Q105 342 121 342T147 341H227V423L228 505Q241 531 262 531Q268 531 273 530T282 525T287 519T293 511L297 505V341H377H430Q457 341 467 338T483 321Q487 313 487 306Q487 295 480 286T463 273Q457 271 377 271H297V107Q281 81 262 81Q250 81 242 87T230 100L228 107L227 189V271H147'], // COMMA 0x2C: [140,139,525,173,353,'193 37T193 70T213 121T260 140Q302 140 327 108T353 36Q353 -7 336 -43T294 -98T249 -128T215 -139Q204 -139 189 -125Q177 -111 174 -101Q172 -84 183 -77T217 -61T253 -33Q261 -24 272 1L265 0Q234 0 214 18'], // HYPHEN-MINUS 0x2D: [341,-271,525,57,468,'57 306Q57 333 86 341H438Q468 332 468 306T438 271H86Q57 280 57 306'], // FULL STOP 0x2E: [140,-1,525,193,332,'193 70Q193 105 214 122T258 140Q291 140 311 120T332 70Q332 44 314 23T262 1Q234 1 214 18T193 70'], // SOLIDUS 0x2F: [694,83,525,58,466,'94 -83Q78 -83 68 -73T58 -48Q58 -44 60 -36Q62 -31 227 314T399 673Q410 694 431 694Q445 694 455 684T466 659Q466 656 464 648Q463 643 298 298T125 -62Q114 -83 94 -83'], // DIGIT ZERO 0x30: [621,10,525,42,482,'42 305Q42 450 111 535T257 621Q335 621 390 562Q482 468 482 306Q482 174 418 82T262 -10T106 82T42 305ZM257 545Q209 545 168 481T126 320Q126 220 162 147Q204 65 262 65Q318 65 358 139T398 320V328Q395 411 364 470T284 543Q270 545 257 545'], // DIGIT ONE 0x31: [622,-1,525,99,450,'99 461Q99 470 99 474T104 487T120 498T151 502Q213 517 251 596Q264 622 283 622Q308 622 319 597V76H373H401Q428 76 439 69T450 38Q450 11 428 1H127Q104 10 104 38Q104 62 115 69T153 76H181H235V269Q235 461 234 461Q184 426 137 424H133Q124 424 119 425T109 431T99 447V461'], // DIGIT TWO 0x32: [622,-1,525,52,472,'52 462Q52 528 110 575T247 622H250Q343 622 407 565T472 421Q472 371 446 324T390 248T308 178Q307 177 275 151T214 101L185 77Q185 76 286 76H388V87Q388 105 397 114T430 123T463 114Q470 107 471 100T472 61V42Q472 24 468 16T450 1H75Q53 10 53 32V38V48Q53 57 63 67T127 122Q153 144 169 157L289 256Q388 345 388 419Q388 473 346 509T231 545H224Q176 545 146 499L144 494Q155 476 155 459Q154 459 155 455T154 444T148 430T136 417T114 408Q113 408 110 408T104 407Q80 407 66 422T52 462'], // DIGIT THREE 0x33: [622,11,525,44,479,'260 546Q233 546 211 541T180 531T171 524L174 514Q177 505 177 497Q177 476 162 461T125 446Q106 446 90 459T73 504Q76 540 98 565T150 601T203 616T239 621Q241 622 265 622Q322 620 362 602T420 558T444 513T451 478Q451 386 369 329L375 326Q381 323 386 320T401 311T419 298T436 283T452 263T466 240T475 212T479 180Q479 99 416 44T259 -11T105 28T44 130Q44 154 59 168T95 183Q117 183 132 169T148 131Q148 119 139 101Q175 65 260 65Q316 65 355 97T395 179Q395 211 375 240Q336 292 253 292H234H215Q194 292 185 299T175 330Q175 350 184 359Q192 368 238 370T309 384Q336 398 351 423T367 474Q367 496 350 513Q321 546 260 546'], // DIGIT FOUR 0x34: [623,-1,525,29,495,'235 1Q213 10 213 32V38V46Q213 65 230 73Q236 76 274 76H314V168H183L52 169Q37 175 33 182T29 205V218L30 244Q53 283 155 443T264 613Q276 623 298 623H323H363Q378 616 385 601V244H429H450Q474 244 484 237T495 206Q495 179 477 171Q471 168 429 168H385V76H425H442Q466 76 476 69T487 38Q487 10 465 1H235ZM314 244V554L117 245L215 244H314'], // DIGIT FIVE 0x35: [612,10,525,52,472,'387 189Q387 244 354 278T273 313Q230 313 205 301T163 271T138 249H120Q102 249 97 251Q85 258 83 266T80 311Q80 320 80 359T81 430Q81 587 82 591Q88 605 103 610H108Q112 610 120 610T138 610T163 610T192 611T225 611T260 611H415Q416 610 421 607T428 602T432 596T436 587T437 573Q437 567 437 562T434 554T431 548T427 543T423 540T418 538L415 536L289 535H164V363L170 366Q175 368 184 372T207 380T238 386T276 389Q357 389 414 331T472 187Q472 116 412 53T245 -10Q218 -10 209 -9Q126 5 89 48T52 137Q52 164 68 177T104 191Q130 191 143 175T156 141Q156 132 154 125T149 113T146 107Q146 104 155 95T188 76T245 65Q298 65 342 98T387 189'], // DIGIT SIX 0x36: [622,11,525,44,479,'357 536Q357 546 318 546Q258 546 205 497T133 357V353L144 361Q210 402 285 402Q362 402 414 350Q479 285 479 193Q479 111 418 50T263 -11Q234 -11 207 -3T149 26T97 81T60 171T45 301Q45 444 129 533T319 622Q388 622 421 589T454 510Q454 491 442 475T402 458Q373 458 362 475T350 510Q350 520 354 528L357 536ZM319 326T269 326T179 298T136 223Q136 202 143 174T176 112T237 68Q246 66 265 66Q319 66 360 107Q395 146 395 197Q395 250 356 289Q319 326 269 326'], // DIGIT SEVEN 0x37: [627,10,525,44,480,'204 -10Q162 -10 162 40Q162 146 198 261T310 477Q311 478 321 491T342 517T358 535H128V524Q128 506 119 497Q111 489 86 489H78Q55 489 46 508Q44 513 44 557V580Q44 605 52 616T88 627H93Q114 627 125 611H458Q474 598 477 593T480 573Q480 559 478 553T469 543T446 521T408 477Q252 290 246 49Q246 43 246 37T246 27T245 22Q243 11 233 1T204 -10'], // DIGIT EIGHT 0x38: [621,10,525,45,480,'58 460Q58 523 117 572T254 621Q290 621 298 620Q376 607 421 560T466 460Q466 441 460 424T443 393T421 370T397 352T374 340T357 332L350 330L356 328Q363 325 371 321T392 310T415 295T439 274T459 249T473 217T479 179Q479 102 418 46T262 -10T106 46T45 179Q45 202 52 222T70 257T96 284T123 305T148 319T167 328L174 330L170 332Q166 333 159 336T145 343Q104 362 81 393T58 460ZM382 458Q382 491 349 518T263 546Q215 546 179 521T142 458Q142 421 178 395T262 368Q315 368 348 396T382 458ZM396 178Q396 223 358 257T263 292Q206 292 167 258T128 178Q128 137 163 102T262 66Q324 66 360 101T396 178'], // DIGIT NINE 0x39: [622,11,525,46,479,'392 259Q333 210 236 210H233Q163 210 109 262Q46 325 46 411T99 550Q164 622 264 622Q293 622 319 615T376 587T428 532T464 440T479 304Q479 167 400 78T217 -11Q140 -11 105 22T70 101Q70 124 84 138T122 153Q150 153 162 137T174 101Q174 91 168 76Q179 65 216 65Q267 65 300 93Q322 109 339 130T366 173T380 210T388 242T392 259ZM388 389Q388 438 357 492T268 546T185 520Q129 479 129 415Q129 384 138 363Q145 349 156 334T195 302T255 285Q305 285 345 313T388 389'], // COLON 0x3A: [431,-1,525,193,332,'193 361Q193 396 214 413T258 431Q291 431 311 411T332 361Q332 335 314 314T262 292Q234 292 214 309T193 361ZM193 70Q193 105 214 122T258 140Q291 140 311 120T332 70Q332 44 314 23T262 1Q234 1 214 18T193 70'], // SEMICOLON 0x3B: [431,139,525,175,337,'193 361Q193 396 214 413T258 431Q291 431 311 411T332 361Q332 335 314 314T262 292Q234 292 214 309T193 361ZM193 70Q193 105 214 122T259 140Q301 140 319 108T337 33Q337 -38 291 -88T214 -139Q203 -139 189 -126T175 -97Q175 -85 182 -78T200 -66T225 -50T249 -17Q256 -3 256 0Q252 1 248 1Q242 2 235 5T218 15T200 36T193 70'], // LESS-THAN SIGN 0x3C: [557,-55,525,57,469,'468 90Q468 76 458 66T433 55Q426 55 419 58Q413 61 243 168T68 280Q57 291 57 306T68 332Q72 335 241 442T416 553Q424 557 432 557Q447 557 457 547T468 522T456 496Q454 494 305 399L158 306L305 213Q341 190 390 159Q443 125 452 119T464 106V105Q468 97 468 90'], // EQUALS SIGN 0x3D: [417,-195,525,38,487,'38 382Q38 409 67 417H457Q487 408 487 382Q487 358 461 348H64Q51 352 45 360T38 376V382ZM67 195Q38 204 38 230Q38 255 62 264Q66 265 264 265H461L464 264Q467 262 469 261T475 256T481 249T485 240T487 230Q487 204 457 195H67'], // GREATER-THAN SIGN 0x3E: [557,-55,525,57,468,'57 522Q57 539 67 548T90 557Q98 557 105 554Q111 551 281 444T456 332Q468 320 468 306T456 280Q452 276 282 169T105 58Q98 55 91 55Q79 55 68 63T57 90Q57 105 68 116Q70 118 219 213L366 306L219 399Q75 491 71 494Q57 507 57 522'], // QUESTION MARK 0x3F: [617,1,525,62,462,'62 493Q62 540 107 578T253 617Q366 617 414 578T462 490Q462 459 445 434T411 400L394 390Q315 347 296 287Q294 278 293 247V217Q285 201 278 198T246 194T216 197T201 215V245V253Q201 379 351 456Q366 464 375 477Q377 482 377 490Q377 517 339 528T251 540Q182 540 159 517Q166 503 166 490Q166 468 151 453T114 438Q96 438 79 451T62 493ZM190 58Q190 85 208 100T249 115Q272 113 288 99T304 58Q304 33 287 17T246 0T206 16T190 58'], // COMMERCIAL AT 0x40: [617,6,525,44,481,'44 306Q44 445 125 531T302 617Q332 617 358 607T411 574T456 502T479 387Q481 361 481 321Q481 203 421 143Q381 103 332 103Q266 103 225 165T183 307Q183 390 227 449T332 508Q358 508 378 498Q350 541 304 541Q229 541 172 473T115 305Q115 208 171 140T306 71H310Q358 71 397 105Q409 115 436 115Q458 115 462 113Q481 106 481 86Q481 73 468 61Q401 -6 305 -6Q262 -6 217 14T133 71T69 170T44 306ZM410 306Q410 361 386 396T333 431Q300 431 277 394T254 305Q254 256 276 218T332 180Q364 180 387 217T410 306'], // LATIN CAPITAL LETTER A 0x41: [623,-1,525,28,496,'191 76Q212 75 220 68T229 38Q229 10 208 1H129H80Q48 1 38 7T28 38Q28 51 29 57T40 69T70 76Q89 76 89 78Q90 79 117 205T173 461T205 599Q212 623 250 623H262H273Q312 623 319 599Q322 591 350 461T406 205T435 78Q435 76 454 76H458Q484 76 493 59Q496 53 496 38Q496 11 478 3Q474 1 395 1H317Q295 8 295 38Q295 65 311 73Q316 75 333 76L348 77V78Q348 80 341 112L334 143H190L183 112Q176 80 176 78Q175 76 178 76Q180 76 191 76ZM318 221Q313 238 288 366T263 519Q263 526 262 527Q261 527 261 520Q261 493 236 365T206 221Q206 219 262 219T318 221'], // LATIN CAPITAL LETTER B 0x42: [611,-1,525,17,482,'39 1Q17 10 17 32V38V46Q17 65 34 73Q40 76 61 76H84V535H61H54Q27 535 19 553Q17 557 17 573Q17 583 17 587T23 599T39 610Q40 611 179 611Q320 610 332 607Q332 607 339 605Q394 591 427 547T461 454Q461 413 436 378T369 325L358 320Q405 311 443 270T482 169Q482 112 445 64T345 3L334 1H39ZM309 533Q302 535 234 535H168V356H230Q284 357 296 358T323 368Q346 380 361 402T377 452Q377 482 358 505T309 533ZM398 176Q396 218 371 246T315 279Q310 280 237 280H168V76H239Q316 77 327 81Q329 82 334 84Q398 107 398 176'], // LATIN CAPITAL LETTER C 0x43: [622,11,525,40,485,'40 305Q40 437 110 529T281 622Q315 622 343 611T387 589T404 578Q409 585 415 596T425 611T435 618T452 622Q472 622 478 609T485 566Q485 559 485 540T484 508V460Q484 413 478 403T442 393Q417 393 409 402Q400 409 400 420Q400 428 395 445T380 487T347 528T295 546Q235 546 180 483T124 306Q124 245 141 197T186 121T241 80T296 66Q346 66 373 103T400 178Q400 209 435 209H442H450Q484 209 484 172Q480 96 421 43T281 -11Q177 -11 109 84T40 305'], // LATIN CAPITAL LETTER D 0x44: [612,-1,525,16,485,'38 1Q16 8 16 38Q16 62 32 73Q39 76 58 76H78V535H58Q40 535 32 538Q16 548 16 573Q16 587 17 591Q23 604 34 607T83 611H166H176Q188 611 209 611T239 612Q299 612 337 597T415 530Q485 438 485 300Q485 180 431 100T301 3L291 1H38ZM400 301Q400 363 385 410T346 482T303 519T267 534Q261 535 210 535H162V76H214L267 77Q323 89 361 148T400 301'], // LATIN CAPITAL LETTER E 0x45: [612,-1,525,18,502,'374 271Q374 241 367 232T332 223Q307 223 299 231Q290 240 290 263V279H173V76H418V118V144Q418 167 426 176T460 186Q491 186 500 166Q502 161 502 93V52Q502 25 499 17T480 1H41Q19 9 19 32V38Q19 63 36 73Q42 76 65 76H89V535H65H55Q44 535 38 537T25 548T19 573Q19 602 41 610H47Q53 610 63 610T88 610T121 610T160 611T204 611T251 611H458Q460 609 465 606T471 602T475 598T478 593T479 586T480 576T480 562V526V488Q480 452 462 444Q458 442 438 442Q413 442 405 450Q398 457 397 463T396 501V535H173V355H290V371Q290 394 299 403T332 412Q363 412 372 392Q374 387 374 317V271'], // LATIN CAPITAL LETTER F 0x46: [612,-1,525,22,490,'384 260Q384 230 377 221T342 212Q317 212 309 220Q300 229 300 252V268H179V76H249Q264 67 267 61T271 38Q271 10 249 1H44Q22 9 22 32V38Q22 63 39 73Q45 76 69 76H95V535H69H59Q42 535 32 542T22 573Q22 602 44 610H50Q56 610 66 610T91 610T125 610T164 611T208 611T257 611H468Q470 609 475 606T481 602T485 598T488 593T489 586T490 576T490 562V526V488Q490 452 472 444Q468 442 448 442Q423 442 415 450Q408 457 407 463T406 501V535H179V344H300V360Q300 383 309 392T342 401Q373 401 382 381Q384 376 384 306V260'], // LATIN CAPITAL LETTER G 0x47: [623,11,525,38,496,'38 306Q38 447 105 534T261 622Q280 622 298 618T329 608T350 596T366 585L371 581Q373 581 377 591T390 612T417 622Q437 622 443 609T450 566Q450 559 450 540T449 508V460Q449 413 443 403T407 393Q392 393 386 394T373 402T364 426Q360 472 335 509T271 546Q214 546 168 477T121 308Q121 210 164 138T271 65Q293 65 310 78T337 109T352 147T360 180T362 195Q362 196 333 196L304 197Q282 204 282 227V234Q282 247 282 251T288 261T304 272H474Q488 263 492 256T496 234Q496 211 479 199Q475 197 461 196H449V21Q441 6 434 3T412 -1H407H402Q385 -1 379 3T364 28Q350 14 322 2T260 -11Q173 -11 106 76T38 306'], // LATIN CAPITAL LETTER H 0x48: [611,-1,525,16,508,'16 571Q16 597 27 604T74 611H125H208Q223 602 226 596T230 573Q230 559 227 551T217 540T204 536T186 535H165V356H359V535H338H333Q306 535 297 552Q295 556 295 573Q295 586 295 590T301 600T317 611H486Q501 602 504 596T508 573Q508 559 505 551T495 540T482 536T464 535H443V76H464H470Q482 76 489 75T502 64T508 38Q508 10 486 1H317Q306 5 301 11T296 21T295 38V44Q295 66 311 73Q318 76 338 76H359V280H165V76H186H192Q204 76 211 75T224 64T230 38Q230 10 208 1H39Q28 5 23 11T18 21T17 38V44Q17 66 33 73Q40 76 60 76H81V535H60Q45 535 38 536T24 545T16 571'], // LATIN CAPITAL LETTER I 0x49: [611,-1,525,72,452,'400 76Q431 76 441 69T452 38Q452 29 452 26T450 18T443 9T430 1H95Q84 6 79 12T73 23T72 38Q72 65 90 73Q96 76 157 76H220V535H157H124Q93 535 83 542T72 573Q72 603 93 610Q97 611 264 611H430Q432 609 436 607T444 602T449 594Q452 588 452 573Q452 546 434 538Q428 535 367 535H304V76H367H400'], // LATIN CAPITAL LETTER J 0x4A: [612,11,525,57,479,'202 543T202 573T224 610H228Q231 610 237 610T251 610T269 610T291 611T315 611T342 611H457Q471 602 475 595T479 573Q479 549 462 538Q454 535 432 535H408V328Q408 159 408 133T402 93Q386 48 340 19T229 -11Q158 -11 108 16T57 100Q57 129 73 141T108 154Q128 154 143 140T159 102Q159 93 155 79Q188 65 228 65H230Q290 65 318 106Q323 115 323 139T324 329V535H274L224 536Q202 543 202 573'], // LATIN CAPITAL LETTER K 0x4B: [611,-1,525,18,495,'18 549T18 573T29 604T70 611H118H193Q207 603 210 596T214 573Q214 549 198 538Q191 535 172 535H152V421Q152 344 152 326T153 309L242 422L329 534Q327 535 322 536T314 538T308 542T303 548T300 558T298 573Q298 600 316 608Q322 611 392 611H463Q477 602 481 595T485 573Q485 535 446 535H441H420L281 357L436 77L454 76Q473 75 478 73Q495 62 495 38Q495 10 473 1H345Q334 5 329 11T324 21T323 38Q323 51 324 56T332 68T355 77L233 296L152 192V76H172Q191 76 198 73Q214 63 214 38Q214 9 193 1H41Q18 8 18 38Q18 61 35 73Q42 76 61 76H81V535H61Q42 535 35 538Q18 549 18 573'], // LATIN CAPITAL LETTER L 0x4C: [611,0,525,25,488,'27 594Q34 605 43 608T84 611H154H213Q258 611 269 605T281 573Q281 546 263 538Q257 535 222 535H185V76H404V118V145Q404 168 411 177T446 186H453Q478 186 486 167Q488 161 488 93V50Q488 24 485 17T466 1L258 0H147H99Q47 0 36 6T25 38Q25 59 35 69Q44 76 76 76H101V535H76H64Q36 535 27 552Q25 557 25 573T27 594'], // LATIN CAPITAL LETTER M 0x4D: [611,-1,525,11,512,'50 535Q37 536 31 537T18 547T12 573Q12 598 22 604T62 611H91H121Q147 611 158 607T178 587Q183 579 222 446T261 293Q261 289 262 288Q263 288 263 292Q263 311 298 434T346 588Q353 603 365 607T402 611H435H450Q488 611 500 605T512 573Q512 556 506 547T493 537T474 535H459V76H474Q487 75 493 74T505 64T512 38Q512 11 494 3Q490 1 424 1H386Q355 1 345 7T335 38Q335 55 341 64T354 74T373 76H388V302Q388 512 387 519Q382 482 346 359T304 228Q292 204 262 204T220 228Q215 237 179 359T137 519Q136 512 136 302V76H151Q164 75 170 74T182 64T189 38Q189 11 171 3Q167 1 101 1H63Q32 1 22 7T12 38Q12 55 18 64T31 74T50 76H65V535H50'], // LATIN CAPITAL LETTER N 0x4E: [611,0,525,20,504,'20 571Q20 598 30 604T73 611H105H136Q152 611 160 611T177 607T189 601T198 587T206 568T217 537T231 497Q354 142 365 95L368 84V535H347H342Q314 535 306 552Q304 556 304 573Q304 586 304 590T310 600T326 611H482Q497 602 500 596T504 573Q504 559 501 551T491 540T478 536T460 535H439V25Q432 7 424 4T389 0H374Q334 0 322 31L293 115Q171 468 159 517L156 528V76H177H183Q195 76 202 75T215 64T221 38Q221 10 199 1H43Q32 5 27 11T22 21T21 38V44Q21 66 37 73Q44 76 64 76H85V535H64Q49 535 42 536T28 545T20 571'], // LATIN CAPITAL LETTER O 0x4F: [621,10,525,56,468,'102 588Q140 621 240 621Q323 621 335 620Q393 613 422 588Q450 560 459 493T468 306Q468 185 460 118T422 23Q382 -10 289 -10H262H235Q142 -10 102 23Q74 50 65 118T56 306Q56 427 64 494T102 588ZM363 513Q357 523 347 530T324 540T302 544T280 546H268Q192 546 167 521Q150 501 145 452T140 300Q140 235 142 197T151 130T172 89T207 71T262 65Q317 65 341 81T374 144T384 300Q384 474 363 513'], // LATIN CAPITAL LETTER P 0x50: [612,-1,525,19,480,'41 1Q19 9 19 32V38Q19 63 36 73Q42 76 65 76H89V535H65H55Q38 535 29 543T19 576Q19 603 41 610H49Q57 610 70 610T100 610T136 611T175 611Q190 611 216 611T255 612Q321 612 363 598T441 537Q480 486 480 427V421Q480 354 447 311T378 251Q339 230 275 230H239H173V76H197Q220 76 227 73Q244 62 244 38Q244 10 222 1H41ZM396 421Q396 461 369 491T300 533Q294 534 233 535H173V306H233Q294 307 300 308Q345 319 370 352T396 421'], // LATIN CAPITAL LETTER Q 0x51: [622,138,525,56,468,'56 306Q56 380 58 426T68 510T87 568T120 600T170 617T240 621Q323 621 335 620Q393 613 422 588Q450 560 459 493T468 306Q468 124 447 66Q433 23 394 6L424 -53Q454 -112 454 -118Q454 -128 441 -138H377Q367 -135 363 -129T333 -69L304 -11H254Q205 -10 180 -8T128 6T91 36T70 92T58 178T56 306ZM227 151Q227 171 262 171H276H281Q292 171 296 171T305 170T313 165T317 158T323 145T332 127L353 88Q356 88 361 95T372 131T382 202Q384 228 384 306Q384 452 371 492T304 544Q296 545 251 545Q230 545 215 543T188 534T169 520T155 497T147 466T143 423T141 371T140 306Q140 248 141 217T146 154T157 109T178 83T212 68T262 65H266L264 70Q261 75 256 85T247 105Q227 145 227 151'], // LATIN CAPITAL LETTER R 0x52: [612,11,525,16,522,'16 571Q16 598 27 605T76 612Q84 612 108 612T148 611Q268 611 294 605Q346 592 389 550T432 440Q432 394 410 359Q393 329 366 310L358 303Q387 273 399 239Q405 219 405 178T408 106T421 68Q426 65 428 65Q433 65 435 74T438 96T441 112Q450 130 480 130H485Q519 130 522 100Q522 79 516 56T488 11T434 -11Q421 -11 408 -8T377 5T344 37T324 93Q322 101 322 154L321 209Q304 257 257 267Q252 268 207 268H165V76H186H192Q204 76 211 75T224 64T230 38Q230 10 208 1H39Q28 5 23 11T18 21T17 38V44Q17 66 33 73Q40 76 60 76H81V535H60Q45 535 38 536T24 545T16 571ZM348 440Q348 478 321 502T260 532Q252 534 208 535H165V344H208Q212 344 223 344T239 345T252 346T266 348T278 351T293 358Q348 387 348 440'], // LATIN CAPITAL LETTER S 0x53: [622,11,525,51,472,'52 454Q52 524 107 572T229 621Q266 621 274 620Q326 610 360 588L371 581Q377 594 379 598T386 610T397 619T412 622Q433 622 439 610T446 570Q446 563 446 545T445 515V479Q445 441 444 432T436 417Q428 408 403 408T370 417Q361 424 361 434Q361 439 360 448T351 476T331 509T295 535T238 546Q194 546 163 522T132 458Q132 435 148 412Q155 401 166 393T192 380T218 371T247 364T270 359Q341 342 349 339Q389 325 418 296T461 229Q472 201 472 164Q469 92 417 41T287 -11Q240 -11 200 -1T143 19L126 29Q117 6 109 -2Q100 -11 84 -11Q64 -11 58 1T51 42Q51 49 51 66T52 95V135Q52 173 53 180T61 194Q70 203 95 203Q119 203 127 194Q136 186 136 168Q143 66 284 66H290Q325 66 350 85Q391 115 391 165Q391 204 369 228T322 260Q320 260 255 275T185 293Q123 309 88 355T52 454'], // LATIN CAPITAL LETTER T 0x54: [612,-1,525,26,498,'129 38Q129 51 129 55T135 65T151 76H220V535H110V501Q110 470 109 464T101 450Q93 442 68 442H60Q37 442 28 461Q26 466 26 527L27 589Q36 607 49 610H55Q61 610 72 610T97 610T131 610T170 611T215 611T264 611H476Q478 609 483 606T489 602T493 598T496 593T497 586T498 576T498 562V526V488Q498 452 480 444Q476 442 456 442Q431 442 423 450Q416 457 415 463T414 501V535H304V76H374Q389 67 392 61T396 38Q396 10 374 1H151Q140 5 135 11T130 21T129 38'], // LATIN CAPITAL LETTER U 0x55: [612,11,525,-4,528,'-3 573Q-3 597 8 604T50 612Q57 612 77 612T111 611H200Q214 602 218 595T222 573Q222 549 205 538Q198 535 175 535H151V359Q151 333 151 291Q152 177 156 162Q157 160 157 159Q165 123 193 95T262 66Q303 66 330 94T367 159Q371 175 371 191T373 359V535H349H339Q328 535 322 537T309 548T303 573T306 595T325 611H506Q520 602 524 595T528 573Q528 549 511 538Q504 535 481 535H457V364Q457 189 456 182Q448 101 394 45T262 -11Q189 -11 132 43T68 182Q67 189 67 364V535H43H33Q22 535 16 537T3 548T-3 573'], // LATIN CAPITAL LETTER V 0x56: [613,7,525,19,505,'19 578Q19 585 20 590T23 598T29 604T38 608T48 610T62 611T78 612T97 611T119 611H195Q210 602 213 596T217 573Q217 561 216 555T206 542T179 535H164Q166 529 188 435T235 231T261 94L262 84V88Q263 91 263 94Q265 121 289 231T336 438L360 535H345Q308 535 308 566V573Q308 586 308 590T314 600T330 611H484Q499 602 502 595T505 573Q505 560 504 554T493 541T465 535H447L384 278Q321 19 319 14Q309 -7 278 -7H262H246Q215 -7 205 14Q203 19 140 278L78 535H59Q45 535 38 536T25 547T19 573V578'], // LATIN CAPITAL LETTER W 0x57: [611,7,525,12,512,'459 611Q491 611 501 605T512 573Q512 538 482 535H474L439 276Q406 26 402 11Q398 2 389 -3Q387 -3 386 -4L380 -7H359H349Q324 -7 313 13Q307 29 285 139T263 275Q263 283 262 283Q261 282 261 274Q261 248 239 137T211 13Q200 -7 175 -7H165H144Q136 -3 127 3Q121 10 117 36T85 276L50 535H42Q26 536 19 545T12 564V573Q12 603 33 610Q37 611 101 611H134Q165 611 175 604T186 573Q186 563 186 559T182 547T169 538T143 535H122V531Q124 517 133 446T155 266T172 96V84L173 102Q176 157 192 243T215 346Q227 367 259 367H262H265Q297 367 309 346Q316 329 332 243T351 102L352 84V96Q356 161 368 266T390 444T402 531V535H381Q366 535 359 536T345 547T338 573Q338 600 356 608Q362 611 425 611H459'], // LATIN CAPITAL LETTER X 0x58: [611,-1,525,28,495,'39 571Q39 597 49 604T93 611H141H218Q233 602 236 595T239 573Q239 538 210 535Q202 535 202 534T215 507T243 454L257 428L307 535H298Q266 538 266 573Q266 584 267 588T273 598T289 611H366H401Q442 611 454 605T466 573Q466 546 448 538Q442 535 421 535H398L299 327Q299 323 362 201L426 77L449 76Q467 76 475 75T489 65T495 38Q495 11 477 3Q473 1 395 1H317Q295 8 295 38Q295 73 325 76L334 77Q333 78 314 117T276 196L257 235L239 196Q221 157 204 118T186 77Q190 76 196 76Q211 74 218 67T227 55T228 38Q228 28 227 24T221 13T206 1H50Q28 9 28 32V38Q28 63 45 73Q51 76 73 76H96L214 324Q215 327 162 431L108 535H85H79Q67 535 60 536T46 546T39 571'], // LATIN CAPITAL LETTER Y 0x59: [611,-1,525,20,505,'20 573Q20 597 30 604T72 611H121H198Q212 602 216 595T220 573Q220 568 219 563T217 555T214 549T211 544T207 541T203 538T198 537T194 536T190 536L188 535Q179 535 179 534L188 516Q196 497 208 470T232 415T252 363T261 332Q261 329 262 329T263 332Q263 354 333 508L345 534Q345 535 336 535Q305 538 305 567V573Q305 589 308 595T327 611H483Q505 598 505 573Q505 549 488 538Q481 535 460 535H438L304 245V76H325H331Q343 76 350 75T363 64T369 38Q369 10 347 1H178Q167 5 162 11T157 21T156 38V44Q156 66 172 73Q180 76 199 76H220V245L86 535H64Q44 535 36 538Q20 548 20 573'], // LATIN CAPITAL LETTER Z 0x5A: [612,-1,525,48,481,'71 1Q60 5 55 11T49 23T48 39V46Q48 56 58 73T131 183Q171 242 197 282L366 535H144V501Q144 470 143 464T135 450Q127 442 102 442H94Q71 442 62 461Q60 466 60 527L61 589Q70 607 83 610H88Q93 610 102 610T124 610T154 610T188 611T227 611T270 611H454Q456 609 461 606T467 601T471 597T474 591T475 584T476 572V565Q476 555 466 538T393 428Q353 369 327 329L158 76H397V120V146Q397 169 405 179T439 189Q470 189 479 169Q481 164 481 95V48Q481 24 478 16T459 1H71'], // LEFT SQUARE BRACKET 0x5B: [694,82,525,214,484,'237 -82Q221 -78 214 -58V305Q214 669 216 673Q220 687 231 690T278 694H350H461Q462 693 467 690T474 685T478 679T482 670T483 656Q483 632 471 625T428 617Q422 617 406 617T379 618H298V-7H379H420Q459 -7 471 -13T483 -45Q483 -55 483 -59T477 -70T461 -82H237'], // REVERSE SOLIDUS 0x5C: [694,83,525,58,466,'58 659Q58 673 68 683T93 694Q114 694 125 673Q132 659 297 314T464 -36Q466 -44 466 -48Q466 -66 454 -74T431 -83Q410 -83 399 -62Q391 -47 226 298T60 648Q58 656 58 659'], // RIGHT SQUARE BRACKET 0x5D: [695,82,525,41,310,'41 656Q41 681 53 688T99 695Q107 695 133 695T177 694H288Q307 681 310 669V-58Q303 -76 288 -82H64Q41 -73 41 -45Q41 -21 53 -14T96 -6Q102 -6 118 -6T145 -7H226V618H145H100Q67 618 54 625T41 656'], // CIRCUMFLEX ACCENT 0x5E: [611,-460,525,96,428,'138 460Q121 460 109 479T96 512Q96 527 106 534Q109 536 178 571T253 609Q256 611 264 611Q272 610 343 574Q357 567 369 561T389 550T402 543T411 538T416 535T420 532T422 529T425 525Q428 518 428 512Q428 498 416 479T386 460H384Q377 460 316 496L262 526L208 496Q147 460 138 460'], // LOW LINE 0x5F: [-25,95,525,57,468,'57 -60Q57 -33 86 -25H438Q468 -34 468 -60T438 -95H86Q57 -86 57 -60'], // GRAVE ACCENT 0x60: [681,-357,525,176,350,'176 479Q176 563 227 622T310 681Q324 680 337 667T350 641Q350 627 340 619T312 599T280 566Q256 531 252 485V471Q261 472 262 472Q285 472 302 455T320 414Q320 389 303 373T261 357Q223 357 200 391T176 479'], // LATIN SMALL LETTER A 0x61: [439,6,525,48,524,'126 306Q105 306 90 321T74 359Q74 439 211 439Q268 439 276 438Q343 426 383 390T430 306Q431 301 431 190V81Q446 79 465 78T492 76T509 72T521 60T524 38Q524 11 506 3Q502 1 466 1Q426 1 406 5T379 14T355 36L345 30Q284 -6 205 -6Q135 -6 92 39T48 141Q48 182 79 212T158 256T252 278T342 285H347V290Q347 315 325 335T267 362Q258 363 224 363Q189 363 185 362H179L178 358Q178 353 178 352T176 345T174 337T170 330T165 322T158 316T150 311T139 308T126 306ZM132 140Q132 115 157 93T224 70Q269 70 302 87T344 133Q346 139 347 175V211H339Q256 209 194 190T132 140'], // LATIN SMALL LETTER B 0x62: [611,6,525,4,492,'4 573Q4 596 15 603T52 611H90H124Q146 611 155 608T171 591Q173 586 173 491V396L182 402Q217 424 256 431Q280 437 309 437Q376 437 434 379T492 217Q492 162 473 118T422 47T358 8T293 -6Q229 -6 174 38Q171 13 163 7T135 1H131H122Q99 1 90 23L89 279V535H58L27 536Q4 543 4 573ZM409 215Q409 269 377 315T283 361Q255 361 224 344T177 297L173 290V167Q189 124 213 97T278 70Q330 70 369 111T409 215'], // LATIN SMALL LETTER C 0x63: [440,6,525,66,466,'291 -6Q196 -6 131 60T66 216Q66 296 119 361Q154 403 200 421T273 439Q275 440 293 440H313Q400 440 433 409Q454 388 454 359Q454 335 439 321T402 306Q380 306 365 321T350 357V362L340 363Q339 363 326 363T303 364Q280 364 266 362Q217 352 184 313T151 215Q151 153 199 112T313 70Q341 70 357 85T381 118T394 140Q402 146 424 146Q443 146 447 144Q466 137 466 117Q466 106 457 88T429 47T374 10T291 -6'], // LATIN SMALL LETTER D 0x64: [611,6,525,31,520,'266 573Q266 596 277 603T314 611H352H385Q411 611 419 607T435 586V76H498Q512 67 516 60T520 38Q520 9 498 1H436Q429 1 417 1T398 0Q375 0 363 7T351 34V43L342 36Q288 -6 223 -6Q143 -6 87 58T31 216Q31 307 88 372T230 437Q292 437 342 405L351 399V535H320L289 536Q266 543 266 573ZM351 290Q347 302 337 316T302 346T244 361Q193 361 154 319T115 215Q115 152 152 111T235 70Q314 70 351 170V290'], // LATIN SMALL LETTER E 0x65: [440,6,525,48,465,'48 217Q48 295 100 361T248 439L258 440Q268 440 274 440Q329 438 369 416T428 359T456 292T464 228Q464 215 461 208T454 198T442 190L288 189H135L138 179Q153 132 199 102T303 71Q336 71 353 86T380 120T398 143Q404 146 422 146Q453 146 462 126Q464 120 464 116Q464 84 416 39T285 -6Q187 -6 118 59T48 217ZM377 264Q371 291 365 306T341 338T294 362Q288 363 264 363Q225 363 190 336T139 264H377'], // LATIN SMALL LETTER F 0x66: [617,-1,525,35,437,'43 395Q44 405 44 408T47 416T53 423T66 431H176V461Q176 500 182 518Q201 570 252 593T353 617Q399 614 418 593T437 548Q437 528 424 514T387 499Q365 499 353 511T338 537V541H328Q275 536 261 494Q260 490 260 460V431H327Q334 431 346 431T364 432Q392 432 404 425T416 393T405 362T365 355H327H260V76H319Q375 76 388 71T401 38Q401 27 400 23T395 12T379 1H58Q47 6 42 12T36 23T35 38Q35 65 53 73Q59 76 117 76H176V355H121H93Q64 355 54 362T43 395'], // LATIN SMALL LETTER G 0x67: [442,229,525,28,510,'60 274Q60 337 107 386T233 436Q278 436 316 417L329 410L338 416Q384 442 427 442T489 423T509 381T494 345T460 332Q449 332 440 338Q432 341 427 348T419 360T415 365Q414 364 410 364L383 355Q406 320 406 274Q406 211 358 162T233 112Q189 112 155 128L146 133Q142 125 142 115Q142 99 150 85T175 71Q182 72 187 70Q188 70 195 70T218 70T254 69Q259 69 275 69T297 69T318 68T340 66T361 62T384 57T405 49T428 38Q495 -1 495 -76Q495 -143 427 -186T262 -229Q161 -229 94 -185T29 -73Q30 -60 33 -48T39 -26T47 -8T57 8T67 20T77 30T86 38L91 43Q91 44 86 53T75 80T70 117Q70 142 89 183L83 194Q60 232 60 274ZM321 274Q321 312 296 337T230 362Q197 362 171 338T145 274Q145 235 170 211T233 187Q273 187 297 212T321 274ZM422 -78Q422 -54 408 -38T366 -15T315 -6T255 -4H200Q198 -4 193 -4T183 -3Q148 -3 125 -26T102 -78Q102 -110 151 -132T261 -154Q321 -154 371 -132T422 -78'], // LATIN SMALL LETTER H 0x68: [611,-1,525,4,520,'4 573Q4 596 15 603T52 611H90H124Q146 611 155 608T171 591Q173 586 173 489Q173 394 175 394L186 402Q197 410 219 420T269 434Q278 436 306 436Q343 436 371 423Q411 402 423 365T436 265Q436 257 436 239T435 211V198V76H498Q512 67 516 60T520 38Q520 9 498 1H308Q286 10 286 32V38V46Q286 65 303 73Q309 76 329 76H351V188Q351 204 351 230T352 266Q352 321 341 341T288 361Q253 361 222 341T176 274L174 264L173 170V76H236Q250 67 254 60T258 38Q258 9 236 1H27Q4 8 4 38Q4 53 8 60T27 76H89V535H58L27 536Q4 543 4 573'], // LATIN SMALL LETTER I 0x69: [612,-1,525,72,462,'202 538T202 559T218 596T260 612Q283 612 300 597T317 560Q317 538 300 523T260 507Q235 507 219 522ZM411 76Q441 76 451 69T462 38Q462 29 462 26T460 18T453 9T440 1H94Q72 8 72 33V38Q72 46 72 49T74 58T81 68T94 76H233V355H167L102 356Q80 363 80 393Q80 418 91 425T138 432Q145 432 165 432T200 431H295Q297 429 303 425T310 420T314 415T317 404T317 389T318 363Q318 354 318 314T317 241V76H378H411'], // LATIN SMALL LETTER J 0x6A: [612,228,525,48,377,'261 559Q261 580 277 596T319 612Q342 612 359 597T376 560T360 523T320 507Q296 507 279 523T261 559ZM75 -91T100 -91T138 -107T152 -144V-150L160 -151H193H203Q241 -151 267 -121Q284 -97 288 -73T292 23V151V355H218L145 356Q123 365 123 387V393Q123 422 145 430H148Q151 430 156 430T169 430T185 430T205 431T227 431T251 431H354Q356 430 360 427T365 424T369 420T372 416T373 410T375 402T376 391T377 376T377 356Q377 345 377 286T376 176Q376 -67 371 -88Q362 -123 342 -151T299 -194Q254 -228 180 -228Q84 -226 56 -177Q49 -162 48 -148Q48 -122 61 -107'], // LATIN SMALL LETTER K 0x6B: [611,0,525,13,507,'13 42Q13 63 23 69T69 76H102V535H69H54Q34 535 24 542T13 573Q13 588 15 593Q22 605 29 608T56 611H95Q113 611 122 611T140 610T152 609T159 607T163 603T167 597T173 589V413L174 237L295 355H275Q260 355 253 356T239 367T232 393Q232 419 243 425T304 431H359H464Q479 422 482 415T485 393Q485 364 464 356L431 355H398L293 254L427 76H486Q501 67 504 60T507 38Q507 28 507 24T501 12T486 1H314Q292 8 292 38Q292 62 308 73Q312 75 326 76L338 77L290 140Q279 154 267 171T248 196L242 204L207 171L173 139V76H206H221Q241 76 251 69T262 38Q262 11 244 3Q240 1 138 1Q123 1 100 1T70 0Q32 0 23 7T13 42'], // LATIN SMALL LETTER L 0x6C: [612,-1,525,51,474,'51 573Q51 602 73 610H76Q79 610 84 610T97 610T113 610T133 611T155 611T179 611H282Q301 598 304 586V76H452Q466 67 470 60T474 38Q474 10 452 1H73Q51 9 51 32V38Q51 54 54 60T73 76H220V535H146L73 536Q51 545 51 567V573'], // LATIN SMALL LETTER M 0x6D: [437,-1,525,-12,536,'133 76Q156 74 164 67T172 38Q172 9 151 1H11Q-12 8 -12 38Q-12 61 5 73Q10 75 28 76H45V355H28Q10 356 5 358Q-12 370 -12 393Q-12 419 11 431H52H70Q91 431 100 427T116 405Q163 436 200 436Q255 436 281 390L285 394Q289 398 292 400T301 407T314 415T329 423T346 429T366 434T389 436H392Q425 436 448 411Q469 390 474 360T480 268V232V203V76H497Q520 74 528 67T536 38Q536 9 515 1H396Q374 9 374 32V38Q374 73 402 76H409V191V242Q409 317 404 339T375 361Q343 361 323 332T299 264Q298 258 298 165V76H315Q338 74 346 67T354 38Q354 9 333 1H214Q192 9 192 32V38Q192 73 220 76H227V191V242Q227 317 222 339T193 361Q161 361 141 332T117 264Q116 258 116 165V76H133'], // LATIN SMALL LETTER N 0x6E: [436,-1,525,4,520,'89 431Q94 431 105 431T122 432Q173 432 173 399Q173 394 175 394Q176 394 190 404T233 425T298 436Q343 436 371 423Q411 402 423 365T436 265Q436 257 436 239T435 211V198V76H498Q512 67 516 60T520 38Q520 9 498 1H308Q286 9 286 32V38V45Q286 65 303 73Q309 76 329 76H351V188Q351 204 351 230T352 266Q352 321 341 341T288 361Q253 361 222 341T176 274L174 264L173 170V76H236Q250 67 254 60T258 38Q258 9 236 1H27Q4 8 4 38Q4 53 8 60T27 76H89V355H58L27 356Q4 363 4 393Q4 408 8 415T27 431H89'], // LATIN SMALL LETTER O 0x6F: [440,6,525,52,472,'52 216Q52 318 118 379T261 440Q343 440 407 378T472 216Q472 121 410 58T262 -6Q176 -6 114 58T52 216ZM388 225Q388 281 351 322T261 364Q213 364 175 325T136 225Q136 158 174 114T262 70T350 114T388 225'], // LATIN SMALL LETTER P 0x70: [437,221,525,4,492,'89 431Q93 431 104 431T121 432Q173 432 173 401V396L182 402Q237 437 305 437Q376 437 434 378T492 217Q492 146 459 93T382 17T291 -6Q261 -6 232 5T188 26L174 37Q173 37 173 -54V-146H236Q250 -155 254 -162T258 -184Q258 -213 236 -221H27Q4 -214 4 -184Q4 -169 8 -162T27 -146H89V355H58L27 356Q4 363 4 393Q4 408 8 415T27 431H89ZM409 215Q409 269 377 315T283 361Q255 361 224 344T177 297L173 290V167Q189 124 213 97T278 70Q330 70 369 111T409 215'], // LATIN SMALL LETTER Q 0x71: [437,222,525,34,545,'34 215Q34 309 91 368T222 436Q224 436 231 436T242 437Q309 437 372 390V401Q372 419 381 428T414 437Q426 437 432 436T444 430T456 412V-146H489H504Q524 -146 534 -153T545 -184Q545 -211 527 -219Q523 -221 414 -221Q398 -221 374 -221T342 -222Q304 -222 294 -216T283 -184Q283 -157 301 -149Q307 -146 339 -146H372V-51Q372 43 371 43L364 38Q357 33 345 26T318 12T280 -1T236 -6Q155 -6 95 55T34 215ZM117 215Q117 152 157 111T250 70Q289 70 318 92T363 146Q372 163 372 192V215L371 263Q339 360 254 360Q206 360 162 321T117 215'], // LATIN SMALL LETTER R 0x72: [437,-1,525,24,487,'327 76Q359 76 369 70T380 38Q380 10 359 1H47Q24 8 24 38Q24 54 28 61T47 76H145V355H96L47 356Q24 363 24 393Q24 409 28 416T47 431H207Q223 419 226 414T229 393V387V369Q297 437 394 437Q436 437 461 417T487 368Q487 347 473 332T438 317Q428 317 420 320T407 327T398 337T393 347T390 356L388 361Q348 356 324 345Q228 299 228 170Q228 161 228 151T229 138V76H293H327'], // LATIN SMALL LETTER S 0x73: [440,6,525,71,458,'72 317Q72 361 108 396T229 439Q231 439 245 439T268 440Q303 439 324 435T353 427T363 423L372 432Q380 440 397 440Q430 440 430 395Q430 390 430 380T429 366V335Q429 311 422 302T387 293Q364 293 355 300T346 316T343 336T325 353Q306 364 257 364Q209 364 178 351T147 317Q147 284 231 272Q327 256 357 247Q458 210 458 129V121Q458 74 413 34T271 -6Q246 -6 224 -3T189 5T165 14T150 22T144 26Q142 23 139 18T135 11T132 6T128 1T124 -2T119 -4T113 -5T104 -6Q84 -6 78 6T71 43Q71 48 71 60T72 79Q72 132 73 141T81 157Q90 166 115 166Q135 166 142 162T157 140Q168 108 191 90T260 70Q297 70 323 76T361 91T379 110T384 129Q384 157 346 171T247 195T165 212Q119 228 96 256T72 317'], // LATIN SMALL LETTER T 0x74: [554,6,525,25,448,'25 395Q26 405 26 408T29 416T35 423T48 431H145V481L146 532Q154 547 161 550T184 554H189Q218 554 227 534Q229 529 229 480V431H405Q406 430 411 427T418 422T422 416T426 407T427 393Q427 387 427 382T424 374T421 368T417 363T413 360T408 358L405 356L317 355H229V249Q229 237 229 214T228 179Q228 126 241 98T295 70Q354 70 365 149Q366 167 375 174Q383 182 407 182H415Q438 182 446 166Q448 161 448 148Q448 84 398 39T282 -6Q226 -6 189 29T146 128Q145 134 145 247V355H96H72Q45 355 35 362T25 395'], // LATIN SMALL LETTER U 0x75: [431,5,525,4,520,'4 393Q4 416 15 423T52 431H90Q141 431 151 429T168 417Q171 412 173 409V254L174 100Q182 70 244 70Q320 70 344 119Q349 130 350 144T351 248V355H320L289 356Q266 363 266 393Q266 408 270 415T289 431H351H386Q409 431 418 428T433 411Q435 406 435 241V76H498Q512 67 516 60T520 38Q520 9 498 1H436H394Q372 1 364 5T351 26L342 21Q293 -5 227 -5Q118 -5 96 67Q91 82 90 101T89 227V355H58L27 356Q4 363 4 393'], // LATIN SMALL LETTER V 0x76: [432,4,525,24,500,'24 392Q24 417 36 424T79 432Q85 432 103 432T132 431H215Q229 422 233 415T237 393Q237 355 198 355H193H172L262 77L352 355H331H323Q288 355 288 393Q288 409 291 415T310 431H478Q491 423 495 416T500 393Q500 364 478 356L452 355H426L374 190Q320 24 318 20Q307 -4 273 -4H262H251Q217 -4 206 20Q204 24 150 190L98 355H72L47 356Q24 363 24 392'], // LATIN SMALL LETTER W 0x77: [431,4,525,16,508,'54 355Q16 355 16 388V393Q16 423 37 430Q41 431 125 431H162Q206 431 218 425T230 393Q230 366 212 358Q206 355 174 355Q141 355 141 354L150 296Q181 110 181 89V84Q182 85 183 96Q185 118 199 173T218 237Q223 247 245 259H264H268Q294 259 309 240Q315 229 329 174T343 92Q343 84 344 84V86Q344 88 344 91T345 97Q347 125 356 187T374 301T383 354Q383 355 350 355H333Q314 355 304 362T294 393Q294 420 312 428Q318 431 401 431H440Q485 431 496 425T508 393Q508 382 508 377T498 363T470 355L455 354Q455 353 441 271T413 104T396 16Q384 -4 355 -4H351Q315 -4 305 9T280 79Q278 90 276 96Q265 149 265 169Q265 176 264 169Q263 166 263 162Q261 130 248 79T230 18Q220 -4 183 -4H175L151 -3Q134 5 127 17L112 102Q97 188 83 270T69 354Q62 355 54 355'], // LATIN SMALL LETTER X 0x78: [432,-1,525,29,495,'35 393Q35 417 46 424T89 432Q95 432 112 432T141 431H223Q238 422 241 415T244 393Q244 389 244 383T237 367T216 355Q209 355 209 354L234 319Q259 286 260 286L308 354Q308 355 301 355Q285 356 278 365T270 384L271 393Q271 420 289 428Q295 431 376 431H459Q460 430 465 427T472 422T476 416T480 407T481 393Q481 368 470 362T434 355H425H392L344 290Q295 225 295 223Q294 223 309 203T350 149L405 77L439 76H453Q474 76 484 69T495 38Q495 10 473 1H303Q281 9 281 32V38Q281 49 282 54T290 67T313 76Q324 76 324 77L259 173L197 77Q202 76 209 76Q225 75 233 68T241 55T242 38Q242 28 242 24T236 12T221 1H51Q29 9 29 32V38Q29 48 29 51T31 59T38 67T51 76H117L171 149Q224 222 224 223L124 355H90H78Q54 355 45 361T35 393'], // LATIN SMALL LETTER Y 0x79: [431,228,525,26,501,'26 393Q26 417 37 424T80 431H134H217Q232 422 235 416T239 393Q239 379 236 371T226 360T214 356T197 355L179 354V353L188 330Q197 306 209 272T235 201T259 133T271 89V84L274 95Q279 122 298 185T335 300T352 354Q352 355 331 355Q312 355 304 358Q288 368 288 393Q288 408 291 415T310 431H478Q479 430 484 427T491 422T495 416T499 407T500 393Q500 376 493 367T479 357T458 355H452Q426 355 425 353Q420 337 351 124T280 -94Q240 -195 168 -220Q147 -228 125 -228Q89 -228 66 -201T42 -139Q42 -116 56 -102T93 -87Q117 -87 130 -102T144 -135V-138H126Q121 -148 121 -150T130 -152Q182 -147 207 -87Q211 -78 223 -40T236 1Q230 10 102 355H75L49 356Q26 363 26 393'], // LATIN SMALL LETTER Z 0x7A: [432,-1,525,34,475,'56 1Q40 7 37 14T34 41Q34 59 36 64Q39 67 43 73Q65 95 191 213T341 355H133V334Q133 306 124 297Q116 289 91 289H83Q60 289 51 308Q49 313 49 361L50 409Q59 427 72 430H78Q83 430 92 430T115 430T144 430T179 431T219 431T262 431H450Q452 430 455 428T459 424T463 422T466 419T468 416T469 413T470 409T471 404T472 398T472 391Q472 374 469 368L462 358Q453 349 315 218Q210 122 164 76H391V103Q391 136 400 146Q409 155 433 155Q464 155 473 135Q475 130 475 78V46Q475 24 472 16T453 1H56'], // LEFT CURLY BRACKET 0x7B: [694,83,525,50,475,'430 -7H436Q449 -7 456 -8T469 -19T475 -45Q475 -69 466 -76T434 -83H419Q386 -82 363 -80T308 -69T253 -41T223 7L221 17L220 118V220L218 224Q215 229 214 230T210 235T204 241T195 246T184 252T170 257T151 262T127 265Q118 267 100 267T69 270T52 283Q50 288 50 306V314Q50 335 67 341Q68 342 102 343T172 355T217 386L220 392V493L221 595Q225 611 230 621T251 650T304 679T395 693L406 694Q418 694 426 694Q458 694 466 685Q475 676 475 656T466 627Q458 618 430 618Q319 618 305 587L304 486Q304 476 304 458T305 431Q305 385 295 358T251 311L243 306Q243 305 254 298T281 274T302 231Q304 223 304 125L305 25Q309 16 316 10T352 -1T430 -7'], // VERTICAL LINE 0x7C: [694,82,525,228,297,'228 668Q241 694 262 694Q268 694 273 693T282 688T287 682T293 674L297 668V-57Q282 -82 262 -82Q239 -82 228 -57V668'], // RIGHT CURLY BRACKET 0x7D: [694,83,525,49,475,'49 655Q49 674 56 682T73 692T106 694Q141 693 167 690T224 677T275 647T303 595L305 392Q313 367 347 356T417 344T457 341Q475 335 475 306Q475 292 473 285T464 273T451 269T430 267Q352 262 327 246Q311 236 305 220L303 17L301 7Q294 -16 277 -33T242 -60T196 -74T150 -80T106 -83Q78 -83 72 -82T58 -74Q49 -65 49 -44Q49 -24 58 -16Q66 -7 94 -7Q143 -7 171 -1T207 10T220 25V125Q220 223 222 231Q228 257 243 274T270 299L281 306Q234 329 222 381Q220 387 220 486V587Q212 597 207 601T173 612T94 618Q66 618 58 627Q49 635 49 655'], // TILDE 0x7E: [611,-466,525,87,437,'125 467Q113 467 100 480T87 509Q88 520 111 543Q172 602 209 609Q219 611 224 611Q246 611 263 596T290 566T304 551Q319 551 367 594Q383 610 396 610H400Q411 610 424 597T437 568Q436 557 413 534Q348 469 305 466Q278 466 260 481T234 511T220 526Q205 526 157 483Q141 467 129 467H125'], // ?? 0x7F: [612,-519,525,104,421,'104 565Q104 590 120 600T155 611Q175 611 180 610Q217 599 217 565Q217 545 202 532T166 519H159H155Q120 519 107 547Q104 553 104 565ZM307 565Q307 580 317 593T346 610Q348 610 350 610T354 611Q355 612 367 612Q395 611 408 597T421 565T409 534T365 519H358Q336 519 322 532T307 565'] } ); MathJax.Ajax.loadComplete(MathJax.OutputJax.SVG.fontDir+"/Typewriter/Regular/BasicLatin.js");
{ "pile_set_name": "Github" }
// mksyscall.pl -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go // Code generated by the command above; see README.md. DO NOT EDIT. // +build linux,mips64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fchmodat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(newpath) if err != nil { return } _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(buf) > 0 { _p1 = unsafe.Pointer(&buf[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(newpath) if err != nil { return } _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlinkat(dirfd int, path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getcwd(buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func keyctlJoin(cmd int, arg2 string) (ret int, err error) { var _p0 *byte _p0, err = BytePtrFromString(arg2) if err != nil { return } r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { var _p0 *byte _p0, err = BytePtrFromString(arg3) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(arg4) if err != nil { return } r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { var _p0 unsafe.Pointer if len(payload) > 0 { _p0 = unsafe.Pointer(&payload[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(arg) if err != nil { return } _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { var _p0 *byte _p0, err = BytePtrFromString(source) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(target) if err != nil { return } var _p2 *byte _p2, err = BytePtrFromString(fstype) if err != nil { return } _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Acct(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { var _p0 *byte _p0, err = BytePtrFromString(keyType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(description) if err != nil { return } var _p2 unsafe.Pointer if len(payload) > 0 { _p2 = unsafe.Pointer(&payload[0]) } else { _p2 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) id = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtimex(buf *Timex) (state int, err error) { r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) state = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chdir(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chroot(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(oldfd int, newfd int, flags int) (err error) { _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func EpollCreate1(flag int) (fd int, err error) { r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Eventfd(initval uint, flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (val int, err error) { r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fdatasync(fd int) (err error) { _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } var _p1 unsafe.Pointer if len(dest) > 0 { _p1 = unsafe.Pointer(&dest[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { _p0 = unsafe.Pointer(&dest[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fremovexattr(fd int, attr string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } var _p1 unsafe.Pointer if len(dest) > 0 { _p1 = unsafe.Pointer(&dest[0]) } else { _p1 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getdents(fd int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpriority(which int, who int) (prio int, err error) { r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrandom(buf []byte, flags int) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getxattr(path string, attr string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(attr) if err != nil { return } var _p2 unsafe.Pointer if len(dest) > 0 { _p2 = unsafe.Pointer(&dest[0]) } else { _p2 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) if err != nil { return } r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) watchdesc = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func InotifyInit1(flags int) (fd int, err error) { r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) success = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, sig syscall.Signal) (err error) { _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Klogctl(typ int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(attr) if err != nil { return } var _p2 unsafe.Pointer if len(dest) > 0 { _p2 = unsafe.Pointer(&dest[0]) } else { _p2 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listxattr(path string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(dest) > 0 { _p1 = unsafe.Pointer(&dest[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Llistxattr(path string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(dest) > 0 { _p1 = unsafe.Pointer(&dest[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lremovexattr(path string, attr string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(attr) if err != nil { return } var _p2 unsafe.Pointer if len(data) > 0 { _p2 = unsafe.Pointer(&data[0]) } else { _p2 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdirat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func PivotRoot(newroot string, putold string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(newroot) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(putold) if err != nil { return } _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Removexattr(path string, attr string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(newpath) if err != nil { return } _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { var _p0 *byte _p0, err = BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(newpath) if err != nil { return } _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { var _p0 *byte _p0, err = BytePtrFromString(keyType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(description) if err != nil { return } var _p2 *byte _p2, err = BytePtrFromString(callback) if err != nil { return } r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) id = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setdomainname(p []byte) (err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sethostname(p []byte) (err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tv *Timeval) (err error) { _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setns(fd int, nstype int) (err error) { _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setxattr(path string, attr string, data []byte, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(attr) if err != nil { return } var _p2 unsafe.Pointer if len(data) > 0 { _p2 = unsafe.Pointer(&data[0]) } else { _p2 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() { SyscallNoError(SYS_SYNC, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Syncfs(fd int) (err error) { _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sysinfo(info *Sysinfo_t) (err error) { _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) n = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Times(tms *Tms) (ticks uintptr, err error) { r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) ticks = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Uname(buf *Utsname) (err error) { _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unmount(target string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(target) if err != nil { return } _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unshare(flags int) (err error) { _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func write(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func exitThread(code int) (err error) { _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readlen(fd int, p *byte, np int) (n int, err error) { r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func writelen(fd int, p *byte, np int) (n int, err error) { r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, advice int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mprotect(b []byte, prot int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlock(b []byte) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlock(b []byte) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func faccessat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func EpollCreate(size int) (fd int, err error) { r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { var _p0 unsafe.Pointer if len(events) > 0 { _p0 = unsafe.Pointer(&events[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fadvise(fd int, offset int64, length int64, advice int) (err error) { _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchown(fd int, uid int, gid int) (err error) { _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(resource int, rlim *Rlimit) (err error) { _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lchown(path string, uid int, gid int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, n int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pause() (err error) { _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pread(fd int, p []byte, offset int64) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pwrite(fd int, p []byte, offset int64) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seek(fd int, offset int64, whence int) (off int64, err error) { r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) off = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) written = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setfsgid(gid int) (err error) { _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setfsuid(uid int) (err error) { _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrlimit(resource int, rlim *Rlimit) (err error) { _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) n = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statfs(path string, buf *Statfs_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Truncate(path string, length int64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ustat(dev int, ubuf *Ustat_t) (err error) { _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getgroups(n int, list *_Gid_t) (nn int, err error) { r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) nn = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(n int, list *_Gid_t) (err error) { _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socket(domain int, typ int, proto int) (fd int, err error) { r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Utime(path string, buf *Utimbuf) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimes(path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstat(fd int, st *stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func lstat(path string, st *stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func stat(path string, st *stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return }
{ "pile_set_name": "Github" }
// +build !ignore_autogenerated /* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // This file was autogenerated by conversion-gen. Do not edit it manually! package v1beta1 import ( apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" unsafe "unsafe" ) func init() { SchemeBuilder.Register(RegisterConversions) } // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(scheme *runtime.Scheme) error { return scheme.AddGeneratedConversionFuncs( Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition, Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition, Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition, Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition, Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList, Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList, Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames, Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames, Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec, Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec, Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus, Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus, ) } func autoConvert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { return err } if err := Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } // Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { return err } if err := Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } // Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { out.Type = apiextensions.CustomResourceDefinitionConditionType(in.Type) out.Status = apiextensions.ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil } // Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { out.Type = CustomResourceDefinitionConditionType(in.Type) out.Status = ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil } // Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]apiextensions.CustomResourceDefinition)(unsafe.Pointer(&in.Items)) return nil } // Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items == nil { out.Items = make([]CustomResourceDefinition, 0) } else { out.Items = *(*[]CustomResourceDefinition)(unsafe.Pointer(&in.Items)) } return nil } // Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { out.Plural = in.Plural out.Singular = in.Singular out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind return nil } // Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { out.Plural = in.Plural out.Singular = in.Singular out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind return nil } // Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { out.Group = in.Group out.Version = in.Version if err := Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { return err } out.Scope = apiextensions.ResourceScope(in.Scope) return nil } // Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { out.Group = in.Group out.Version = in.Version if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { return err } out.Scope = ResourceScope(in.Scope) return nil } // Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in *CustomResourceDefinitionStatus, out *apiextensions.CustomResourceDefinitionStatus, s conversion.Scope) error { out.Conditions = *(*[]apiextensions.CustomResourceDefinitionCondition)(unsafe.Pointer(&in.Conditions)) if err := Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { return err } return nil } // Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus is an autogenerated conversion function. func Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in *CustomResourceDefinitionStatus, out *apiextensions.CustomResourceDefinitionStatus, s conversion.Scope) error { return autoConvert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in, out, s) } func autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(in *apiextensions.CustomResourceDefinitionStatus, out *CustomResourceDefinitionStatus, s conversion.Scope) error { if in.Conditions == nil { out.Conditions = make([]CustomResourceDefinitionCondition, 0) } else { out.Conditions = *(*[]CustomResourceDefinitionCondition)(unsafe.Pointer(&in.Conditions)) } if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { return err } return nil } // Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus is an autogenerated conversion function. func Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(in *apiextensions.CustomResourceDefinitionStatus, out *CustomResourceDefinitionStatus, s conversion.Scope) error { return autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(in, out, s) }
{ "pile_set_name": "Github" }
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package test.fixtures.module0; import com.facebook.swift.codec.*; import com.facebook.swift.codec.ThriftField.Requiredness; import com.facebook.swift.codec.ThriftField.Recursiveness; import com.google.common.collect.*; import java.util.*; import org.apache.thrift.*; import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; import org.apache.thrift.server.*; import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; import org.apache.thrift.meta_data.FieldValueMetaData; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.MoreObjects.ToStringHelper; @SwiftGenerated @ThriftStruct(value="Struct", builder=Struct.Builder.class) public final class Struct { private BitSet __isset_bit_vector = new BitSet(); @ThriftConstructor public Struct( @ThriftField(value=1, name="first", requiredness=Requiredness.NONE) final int first, @ThriftField(value=2, name="second", requiredness=Requiredness.NONE) final String second ) { this.first = first; this.second = second; } @ThriftConstructor protected Struct() { this.first = 0; this.second = null; } public static class Builder { private final BitSet __optional_isset = new BitSet(); private int first = 0; private String second = null; @ThriftField(value=1, name="first", requiredness=Requiredness.NONE) public Builder setFirst(int first) { this.first = first; return this; } public int getFirst() { return first; } @ThriftField(value=2, name="second", requiredness=Requiredness.NONE) public Builder setSecond(String second) { this.second = second; return this; } public String getSecond() { return second; } public Builder() { } public Builder(Struct other) { this.first = other.first; this.second = other.second; } @ThriftConstructor public Struct build() { Struct result = new Struct ( this.first, this.second ); result.__isset_bit_vector.or(__optional_isset); return result; } } public static final Map<String, Integer> NAMES_TO_IDS = new HashMap(); public static final Map<Integer, TField> FIELD_METADATA = new HashMap<>(); private static final TStruct STRUCT_DESC = new TStruct("Struct"); private final int first; public static final int _FIRST = 1; private static final TField FIRST_FIELD_DESC = new TField("first", TType.I32, (short)1); private final String second; public static final int _SECOND = 2; private static final TField SECOND_FIELD_DESC = new TField("second", TType.STRING, (short)2); static { NAMES_TO_IDS.put("first", 1); FIELD_METADATA.put(1, FIRST_FIELD_DESC); NAMES_TO_IDS.put("second", 2); FIELD_METADATA.put(2, SECOND_FIELD_DESC); } @ThriftField(value=1, name="first", requiredness=Requiredness.NONE) public int getFirst() { return first; } /** don't use this method for new code, it's here to make migrating to swift easier */ @Deprecated public boolean fieldIsSetFirst() { return __isset_bit_vector.get(_FIRST); } @ThriftField(value=2, name="second", requiredness=Requiredness.NONE) public String getSecond() { return second; } /** don't use this method for new code, it's here to make migrating to swift easier */ @Deprecated public boolean fieldIsSetSecond() { return this.second != null; } @Override public String toString() { ToStringHelper helper = toStringHelper(this); helper.add("first", first); helper.add("second", second); return helper.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Struct other = (Struct)o; return Objects.equals(first, other.first) && Objects.equals(second, other.second) && true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] { first, second }); } public static Struct read0(TProtocol oprot) throws TException { TField __field; oprot.readStructBegin(Struct.NAMES_TO_IDS, Struct.FIELD_METADATA); Struct.Builder builder = new Struct.Builder(); while (true) { __field = oprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case _FIRST: if (__field.type == TType.I32) { int first = oprot.readI32(); builder.setFirst(first); } else { TProtocolUtil.skip(oprot, __field.type); } break; case _SECOND: if (__field.type == TType.STRING) { String second = oprot.readString(); builder.setSecond(second); } else { TProtocolUtil.skip(oprot, __field.type); } break; default: TProtocolUtil.skip(oprot, __field.type); break; } oprot.readFieldEnd(); } oprot.readStructEnd(); return builder.build(); } public void write0(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(FIRST_FIELD_DESC); oprot.writeI32(this.first); oprot.writeFieldEnd(); if (this.second != null) { oprot.writeFieldBegin(SECOND_FIELD_DESC); oprot.writeString(this.second); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } }
{ "pile_set_name": "Github" }
# Copyright (c) Facebook, Inc. and its affiliates. # # 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. from thrift.py3.server import ServiceInterface class CppHandler(ServiceInterface): def __init__(self) -> None: ...
{ "pile_set_name": "Github" }
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package transformers import ( "fmt" "regexp" "strings" "sigs.k8s.io/kustomize/pkg/image" "sigs.k8s.io/kustomize/pkg/resmap" ) // imageTransformer replace image names and tags type imageTransformer struct { images []image.Image } var _ Transformer = &imageTransformer{} // NewImageTransformer constructs an imageTransformer. func NewImageTransformer(slice []image.Image) (Transformer, error) { return &imageTransformer{slice}, nil } // Transform finds the matching images and replaces name, tag and/or digest func (pt *imageTransformer) Transform(resources resmap.ResMap) error { if len(pt.images) == 0 { return nil } for _, res := range resources { err := pt.findAndReplaceImage(res.Map()) if err != nil { return err } } return nil } /* findAndReplaceImage replaces the image name and tags inside one object It searches the object for container session then loops though all images inside containers session, finds matched ones and update the image name and tag name */ func (pt *imageTransformer) findAndReplaceImage(obj map[string]interface{}) error { paths := []string{"containers", "initContainers"} found := false for _, path := range paths { _, found = obj[path] if found { err := pt.updateContainers(obj, path) if err != nil { return err } } } if !found { return pt.findContainers(obj) } return nil } func (pt *imageTransformer) updateContainers(obj map[string]interface{}, path string) error { containers, ok := obj[path].([]interface{}) if !ok { return fmt.Errorf("containers path is not of type []interface{} but %T", obj[path]) } for i := range containers { container := containers[i].(map[string]interface{}) containerImage, found := container["image"] if !found { continue } imageName := containerImage.(string) for _, img := range pt.images { if !isImageMatched(imageName, img.Name) { continue } name, tag := split(imageName) if img.NewName != "" { name = img.NewName } if img.NewTag != "" { tag = ":" + img.NewTag } if img.Digest != "" { tag = "@" + img.Digest } container["image"] = name + tag break } } return nil } func (pt *imageTransformer) findContainers(obj map[string]interface{}) error { for key := range obj { switch typedV := obj[key].(type) { case map[string]interface{}: err := pt.findAndReplaceImage(typedV) if err != nil { return err } case []interface{}: for i := range typedV { item := typedV[i] typedItem, ok := item.(map[string]interface{}) if ok { err := pt.findAndReplaceImage(typedItem) if err != nil { return err } } } } } return nil } func isImageMatched(s, t string) bool { // Tag values are limited to [a-zA-Z0-9_.-]. pattern, _ := regexp.Compile("^" + t + "(:[a-zA-Z0-9_.-]*)?$") return pattern.MatchString(s) } // split separates and returns the name and tag parts // from the image string using either colon `:` or at `@` separators. // Note that the returned tag keeps its separator. func split(imageName string) (name string, tag string) { // check if image name contains a domain // if domain is present, ignore domain and check for `:` ic := -1 if slashIndex := strings.Index(imageName, "/"); slashIndex < 0 { ic = strings.LastIndex(imageName, ":") } else { lastIc := strings.LastIndex(imageName[slashIndex:], ":") // set ic only if `:` is present if lastIc > 0 { ic = slashIndex + lastIc } } ia := strings.LastIndex(imageName, "@") if ic < 0 && ia < 0 { return imageName, "" } i := ic if ic < 0 { i = ia } name = imageName[:i] tag = imageName[i:] return }
{ "pile_set_name": "Github" }
<?php /* * Copyright 2014 Google 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. */ class Google_Service_TPU_ReimageNodeRequest extends Google_Model { public $tensorflowVersion; public function setTensorflowVersion($tensorflowVersion) { $this->tensorflowVersion = $tensorflowVersion; } public function getTensorflowVersion() { return $this->tensorflowVersion; } }
{ "pile_set_name": "Github" }
// (C) Copyright Gennadiy Rozental 2001. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // //!@file //!@brief suppress some warnings // *************************************************************************** #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4511) // copy constructor can't not be generated # pragma warning(disable: 4512) // assignment operator can't not be generated # pragma warning(disable: 4100) // unreferenced formal parameter # pragma warning(disable: 4996) // <symbol> was declared deprecated # pragma warning(disable: 4355) // 'this' : used in base member initializer list # pragma warning(disable: 4706) // assignment within conditional expression # pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B' # pragma warning(disable: 4127) // conditional expression is constant # pragma warning(disable: 4290) // C++ exception specification ignored except to ... # pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored # pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ... # pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data # pragma warning(disable: 4511) // 'class' : copy constructor could not be generated #endif #if BOOST_CLANG # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wvariadic-macros" #endif #if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wvariadic-macros" #endif
{ "pile_set_name": "Github" }
{ "": [ "--------------------------------------------------------------------------------------------", "Copyright (c) Microsoft Corporation. All rights reserved.", "Licensed under the Source EULA. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], "dashboard.container.gridtab.items": "La liste des widgets ou webviews qui s’afficheront dans cet onglet.", "gridContainer.invalidInputs": "les widgets ou les webviews doivent être dans un conteneur de widgets pour l'extension." }
{ "pile_set_name": "Github" }
// Copyright 2011-2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef WINCESOCKET_HPP #define WINCESOCKET_HPP #include <windows.h> #include <Psapi.h> #include <winsock.h> #include "../SocketConnection.hpp" SOCKET Bind_To_Socket(unsigned int port); SOCKET Wait_For_Connection(SOCKET sock); /** * Connection policy class for WinCE sockets. */ class WinCESocket : public SocketConnection { private: /** * The server socket on which the debug client listens for a BinNavi * connection. */ SOCKET localSocket; /** * The remote socket that is used to communicate with a connected BinNavi. */ SOCKET remoteSocket; protected: NaviError bindSocket(); NaviError closeSocket(); NaviError send(const char* buffer, unsigned int size) const; NaviError read(char* buffer, unsigned int size) const; public: /** * Creates a new WinCESocket object at a given port. * * @param port The port on which the debug client listens for BinNavi * connections. */ WinCESocket(unsigned int port) : SocketConnection(port) { } /** * Converts a value from host to network byte order. * * @param val The value in host order. * * @return The same value in network order. */ int htonl(int val) const { return ::htonl(val); } /** * Converts a value from network to host byte order. * * @param val The value in network order. * * @return The same value in byte order. */ int ntohl(int val) const { return ::ntohl(val); } bool hasData() const; NaviError waitForConnection(); void printConnectionInfo(); }; #endif
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> @class NSArray, NSBundle, NSLock, NSMutableDictionary, NSString; @protocol WFApplicationContextProvider; @interface WFApplicationContext : NSObject { BOOL _canLoadShortcutsDatabase; BOOL _inactive; BOOL _inBackground; BOOL _canLoadShortcutsDatabaseEntitlementChecked; id <WFApplicationContextProvider> _provider; NSBundle *_applicationBundle; NSMutableDictionary *_applicationStateObserversByEvent; NSLock *_observersLock; } + (id)sharedContext; + (id)imageNamed:(id)arg1; - (void).cxx_destruct; @property(nonatomic) BOOL canLoadShortcutsDatabaseEntitlementChecked; // @synthesize canLoadShortcutsDatabaseEntitlementChecked=_canLoadShortcutsDatabaseEntitlementChecked; @property(nonatomic) BOOL inBackground; // @synthesize inBackground=_inBackground; @property(nonatomic) BOOL inactive; // @synthesize inactive=_inactive; @property(readonly, nonatomic) NSLock *observersLock; // @synthesize observersLock=_observersLock; @property(retain, nonatomic) NSMutableDictionary *applicationStateObserversByEvent; // @synthesize applicationStateObserversByEvent=_applicationStateObserversByEvent; @property(readonly, nonatomic) BOOL canLoadShortcutsDatabase; // @synthesize canLoadShortcutsDatabase=_canLoadShortcutsDatabase; @property(nonatomic, getter=isIdleTimerDisabled) BOOL idleTimerDisabled; @property(readonly, nonatomic) BOOL shouldReverseLayoutDirection; @property(readonly, nonatomic) NSBundle *applicationBundle; // @synthesize applicationBundle=_applicationBundle; @property(readonly, nonatomic) NSString *currentUserInterfaceType; @property(readonly, nonatomic) NSBundle *bundle; @property(readonly, nonatomic) NSArray *applicationBundleURLSchemes; - (void)openURL:(id)arg1 withBundleIdentifier:(id)arg2 userInterface:(id)arg3 completionHandler:(CDUnknownBlockType)arg4; - (void)openURL:(id)arg1 userInterface:(id)arg2 completionHandler:(CDUnknownBlockType)arg3; - (void)openURL:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; - (void)openURL:(id)arg1; - (BOOL)canOpenURL:(id)arg1; @property(readonly, nonatomic) long long applicationState; - (void)removeApplicationStateObserver:(id)arg1 forEvent:(long long)arg2; - (void)addApplicationStateObserver:(id)arg1 forEvent:(long long)arg2; - (void)handleApplicationStateEvent:(long long)arg1; - (void)applicationWillEnterForeground; - (void)applicationDidEnterBackground; - (void)applicationWillResignActive; - (void)applicationDidBecomeActive; - (void)dealloc; @property(retain, nonatomic) id <WFApplicationContextProvider> provider; // @synthesize provider=_provider; - (id)init; @end
{ "pile_set_name": "Github" }
#pragma warning disable 0649 //------------------------------------------------------------------------------ // <auto-generated>This code was generated by LLBLGen Pro v4.1.</auto-generated> //------------------------------------------------------------------------------ using System; using System.Data.Linq; using System.Data.Linq.Mapping; using System.ComponentModel; namespace L2S.Bencher.EntityClasses { /// <summary>Class which represents the entity 'ProductModelIllustration', mapped on table 'AdventureWorks.Production.ProductModelIllustration'.</summary> [Table(Name="[Production].[ProductModelIllustration]")] public partial class ProductModelIllustration : INotifyPropertyChanging, INotifyPropertyChanged { #region Events /// <summary>Event which is raised when a property value is changing.</summary> public event PropertyChangingEventHandler PropertyChanging; /// <summary>Event which is raised when a property value changes.</summary> public event PropertyChangedEventHandler PropertyChanged; #endregion #region Class Member Declarations private System.Int32 _illustrationId; private System.DateTime _modifiedDate; private System.Int32 _productModelId; private EntityRef <Illustration> _illustration; private EntityRef <ProductModel> _productModel; #endregion #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIllustrationIdChanging(System.Int32 value); partial void OnIllustrationIdChanged(); partial void OnModifiedDateChanging(System.DateTime value); partial void OnModifiedDateChanged(); partial void OnProductModelIdChanging(System.Int32 value); partial void OnProductModelIdChanged(); #endregion /// <summary>Initializes a new instance of the <see cref="ProductModelIllustration"/> class.</summary> public ProductModelIllustration() { _illustration = default(EntityRef<Illustration>); _productModel = default(EntityRef<ProductModel>); OnCreated(); } /// <summary>Raises the PropertyChanging event</summary> /// <param name="propertyName">name of the property which is changing</param> protected virtual void SendPropertyChanging(string propertyName) { if((this.PropertyChanging != null)) { this.PropertyChanging(this, new PropertyChangingEventArgs(propertyName)); } } /// <summary>Raises the PropertyChanged event for the property specified</summary> /// <param name="propertyName">name of the property which was changed</param> protected virtual void SendPropertyChanged(string propertyName) { if((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } #region Class Property Declarations /// <summary>Gets or sets the IllustrationId field. Mapped on target field 'IllustrationID'. </summary> [Column(Name="IllustrationID", Storage="_illustrationId", CanBeNull=false, DbType="int NOT NULL", IsPrimaryKey=true)] public System.Int32 IllustrationId { get { return _illustrationId; } set { if((_illustrationId != value)) { if(_illustration.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } OnIllustrationIdChanging(value); SendPropertyChanging("IllustrationId"); _illustrationId = value; SendPropertyChanged("IllustrationId"); OnIllustrationIdChanged(); } } } /// <summary>Gets or sets the ModifiedDate field. Mapped on target field 'ModifiedDate'. </summary> [Column(Name="ModifiedDate", Storage="_modifiedDate", CanBeNull=false, DbType="datetime NOT NULL")] public System.DateTime ModifiedDate { get { return _modifiedDate; } set { if((_modifiedDate != value)) { OnModifiedDateChanging(value); SendPropertyChanging("ModifiedDate"); _modifiedDate = value; SendPropertyChanged("ModifiedDate"); OnModifiedDateChanged(); } } } /// <summary>Gets or sets the ProductModelId field. Mapped on target field 'ProductModelID'. </summary> [Column(Name="ProductModelID", Storage="_productModelId", CanBeNull=false, DbType="int NOT NULL", IsPrimaryKey=true)] public System.Int32 ProductModelId { get { return _productModelId; } set { if((_productModelId != value)) { if(_productModel.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } OnProductModelIdChanging(value); SendPropertyChanging("ProductModelId"); _productModelId = value; SendPropertyChanged("ProductModelId"); OnProductModelIdChanged(); } } } /// <summary>Represents the navigator which is mapped onto the association 'ProductModelIllustration.Illustration - Illustration.ProductModelIllustrations (m:1)'</summary> [Association(Name="ProductModelIllustration_Illustrationa5a27066452c47558be7c9d862a501ce", Storage="_illustration", ThisKey="IllustrationId", IsForeignKey=true)] public Illustration Illustration { get { return _illustration.Entity; } set { Illustration previousValue = _illustration.Entity; if((previousValue != value) || (_illustration.HasLoadedOrAssignedValue == false)) { this.SendPropertyChanging("Illustration"); if(previousValue != null) { _illustration.Entity = null; previousValue.ProductModelIllustrations.Remove(this); } _illustration.Entity = value; if(value == null) { _illustrationId = default(System.Int32); } else { value.ProductModelIllustrations.Add(this); _illustrationId = value.IllustrationId; } this.SendPropertyChanged("Illustration"); } } } /// <summary>Represents the navigator which is mapped onto the association 'ProductModelIllustration.ProductModel - ProductModel.ProductModelIllustrations (m:1)'</summary> [Association(Name="ProductModelIllustration_ProductModel3a9db1ea24f94a64ae6d1ae9345271f3", Storage="_productModel", ThisKey="ProductModelId", IsForeignKey=true)] public ProductModel ProductModel { get { return _productModel.Entity; } set { ProductModel previousValue = _productModel.Entity; if((previousValue != value) || (_productModel.HasLoadedOrAssignedValue == false)) { this.SendPropertyChanging("ProductModel"); if(previousValue != null) { _productModel.Entity = null; previousValue.ProductModelIllustrations.Remove(this); } _productModel.Entity = value; if(value == null) { _productModelId = default(System.Int32); } else { value.ProductModelIllustrations.Add(this); _productModelId = value.ProductModelId; } this.SendPropertyChanged("ProductModel"); } } } #endregion } } #pragma warning restore 0649
{ "pile_set_name": "Github" }
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2015-2017 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can * obtain a copy of the License at * https://oss.oracle.com/licenses/CDDL+GPL-1.1 * or LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at LICENSE.txt. * * GPL Classpath Exception: * Oracle designates this particular file as subject to the "Classpath" * exception as provided by Oracle in the GPL Version 2 section of the License * file that accompanied this code. * * Modifications: * If applicable, add the following below the License Header, with the fields * enclosed by brackets [] replaced by your own identifying information: * "Portions Copyright [year] [name of copyright owner]" * * Contributor(s): * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package org.glassfish.jersey.server.internal.inject; import javax.ws.rs.core.MultivaluedMap; import org.glassfish.jersey.internal.inject.ExtractorException; import org.glassfish.jersey.server.internal.LocalizationMessages; /** * Value extractor for {@link java.lang.Character} and {@code char} parameters. * * @author Pavel Bucek (pavel.bucek at oracle.com) */ class PrimitiveCharacterExtractor implements MultivaluedParameterExtractor<Object> { final String parameter; final String defaultStringValue; final Object defaultPrimitiveTypeValue; public PrimitiveCharacterExtractor(String parameter, String defaultStringValue, Object defaultPrimitiveTypeValue) { this.parameter = parameter; this.defaultStringValue = defaultStringValue; this.defaultPrimitiveTypeValue = defaultPrimitiveTypeValue; } @Override public String getName() { return parameter; } @Override public String getDefaultValueString() { return defaultStringValue; } @Override public Object extract(MultivaluedMap<String, String> parameters) { String v = parameters.getFirst(parameter); if (v != null && !v.trim().isEmpty()) { if (v.length() == 1) { return v.charAt(0); } else { throw new ExtractorException(LocalizationMessages.ERROR_PARAMETER_INVALID_CHAR_VALUE(v)); } } else if (defaultStringValue != null && !defaultStringValue.trim().isEmpty()) { if (defaultStringValue.length() == 1) { return defaultStringValue.charAt(0); } else { throw new ExtractorException(LocalizationMessages.ERROR_PARAMETER_INVALID_CHAR_VALUE(defaultStringValue)); } } return defaultPrimitiveTypeValue; } }
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "CDStructures.h" @class IDEArchive, IDEDistributionItem, NSString; @protocol IDEDistributionAppleProvidedContent @property(readonly) NSString *mainAppStubCopySubpath; @property(readonly) NSString *packagePath; @property(readonly) NSString *archivePath; @property(readonly) NSString *archiveOperationDestinationBuildSettingName; - (BOOL)isAppleProvidedContent:(IDEDistributionItem *)arg1; - (BOOL)shouldCopySidecarContentFromArchive:(IDEArchive *)arg1; - (BOOL)shouldRemoveForAppStoreDistributionDistributionItem:(IDEDistributionItem *)arg1 shouldRemoveParentDirectory:(char *)arg2; - (BOOL)shouldCodeSignDistributionItem:(IDEDistributionItem *)arg1; @end
{ "pile_set_name": "Github" }
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.client.indices; import java.util.Arrays; import java.util.List; /** * A request to check for the existence of index templates */ public class IndexTemplatesExistRequest extends GetIndexTemplatesRequest { /** * Create a request to check for the existence of index templates. At least one template index name must be provided * * @param names the names of templates to check for the existence of */ public IndexTemplatesExistRequest(String... names) { this(Arrays.asList(names)); } /** * Create a request to check for the existence of index templates. At least one template index name must be provided * * @param names the names of templates to check for the existence of */ public IndexTemplatesExistRequest(List<String> names) { super(names); if (names().isEmpty()) { throw new IllegalArgumentException("must provide at least one index template name"); } } }
{ "pile_set_name": "Github" }
/****************************************************************************** * * package: Log4Qt * file: factory.h * created: September 2007 * author: Martin Heinrich * * * Copyright 2007 Martin Heinrich * * 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. * ******************************************************************************/ #ifndef LOG4QT_HELPERS_FACTORY_H #define LOG4QT_HELPERS_FACTORY_H /****************************************************************************** * Dependencies ******************************************************************************/ #include <QtCore/QHash> #include <QtCore/QMutex> #include <QtCore/QStringList> QT_BEGIN_NAMESPACE class QMetaProperty; class QObject; QT_END_NAMESPACE /****************************************************************************** * Declarations ******************************************************************************/ namespace Log4Qt { class Appender; class Filter; class Layout; /*! * \brief The class Factory provides factories for Appender, Filter and * Layout objects. * * The functions createAppender(), createFilter() and createLayout() * allow to create objects by specifying their class names. By default * all classes of the package are recognised with their Log4j and Log4Qt * classanmes. For example an object of the class FileAppender can be * craeted using "org.apache.log4j.FileAppender" or "Log4Qt::FileAppender". * Additional classes can be registered using registerAppender(), * registerFilter() and registerLayout(). * * An QObject property can be set from a string value with * setObjectProperty(). The function handles the required error checking * and type conversion. * * \note All the functions declared in this class are thread-safe. * * \sa PropertyConfigurator */ class Factory { public: /*! * Prototype for an Appender factory function. The function creates * an Appender object on the heap and returns a pointer to it. * * \sa registerAppender(), createAppender() */ typedef Appender *(*AppenderFactoryFunc)(); /*! * Prototype for a Filter factory function. The function creates * a Filter object on the heap and returns a pointer to it. * * \sa registerFilter(), createFilter() */ typedef Filter *(*FilterFactoryFunc)(); /*! * Prototype for a Layout factory function. The function creates * a Layout object on the heap and returns a pointer to it. * * \sa registerLayout(), createLayout() */ typedef Layout *(*LayoutFactoryFunc)(); private: Factory(); Q_DISABLE_COPY(Factory) public: /*! * Creates an object for the class \a rAppenderClassName on the heap * and returns a pointer to it. If the class has no registered factory * function a null pointer is returned. * * \sa registerAppender(), unregisterAppender(), registeredAppenders() */ static Appender *createAppender(const QString &rAppenderClassName); /*! * This is an overloaded member function, provided for convenience. */ static Appender *createAppender(const char *pAppenderClassName); /*! * Creates an object for the class \a rFilterClassName on the heap * and returns a pointer to it. If the class has no registered factory * function a null pointer is returned. * * \sa registerFilter(), unregisterFilter(), registeredFilters() */ static Filter *createFilter(const QString &rFilterClassName); /*! * This is an overloaded member function, provided for convenience. */ static Filter *createFilter(const char *pFilterClassName); /*! * Creates an object for the class \a rLayoutClassName on the heap * and returns a pointer to it. If the class has no registered factory * function a null pointer is returned. * * \sa registerLayout(), unregisterLayout(), registeredLayouts() */ static Layout *createLayout(const QString &rLayoutClassName); /*! * This is an overloaded member function, provided for convenience. */ static Layout *createLayout(const char *pLayoutClassName); /*! * Returns the Factory instance. */ static Factory *instance(); /*! * Registers the Appender factory function \a pAppenderFactoryFunc * for the class \a rAppenderClassName. If a registered factory * function exists for the class, it is replaced with * \a pAppenderFactoryFunc. * * \sa unregisterAppender(), registeredAppenders(), createAppender() */ static void registerAppender(const QString &rAppenderClassName, AppenderFactoryFunc pAppenderFactoryFunc); /*! * This is an overloaded member function, provided for convenience. */ static void registerAppender(const char *pAppenderClassName, AppenderFactoryFunc pAppenderFactoryFunc); /*! * Registers the Filter factory function \a pFilterFactoryFunc * for the class \a rFilterClassName. If a registered factory * function exists for the class, it is replaced with * \a pFilterFactoryFunc. * * \sa unregisterFilter(), registeredFilters(), createFilter() */ static void registerFilter(const QString &rFilterClassName, FilterFactoryFunc pFilterFactoryFunc); /*! * This is an overloaded member function, provided for convenience. */ static void registerFilter(const char *pFilterClassName, FilterFactoryFunc pFilterFactoryFunc); /*! * Registers the Layout factory function \a pLayoutFactoryFunc * for the class \a rLayoutClassName. If a registered factory * function exists for the class, it is replaced with * \a pLayoutFactoryFunc. * * \sa unregisterLayout(), registeredLayout(), createLayout() */ static void registerLayout(const QString &rLayoutClassName, LayoutFactoryFunc pLayoutFactoryFunc); /*! * This is an overloaded member function, provided for convenience. */ static void registerLayout(const char *pLayoutClassName, LayoutFactoryFunc pLayoutFactoryFunc); /*! * Returns a list of the class names for registered Appender factory * functions. * * \sa registerAppender(), unregisterAppender() */ static QStringList registeredAppenders(); /*! * Returns a list of the class names for registered Filter factory * functions. * * \sa registerFilter(), unregisterFilter() */ static QStringList registeredFilters(); /*! * Returns a list of the class names for registered Layout factory * functions. * * \sa registerLayout(), unregisterLayout() */ static QStringList registeredLayouts(); /*! * Sets the property \a rProperty of the object \a pObject to the * value \a rValue. The function will test that the property * \a rProperty is writeable and of a type the function can convert to. * The types bool, int, Level and QString are supported. * * \sa OptionConverter */ static void setObjectProperty(QObject *pObject, const QString &rProperty, const QString &rValue); /*! * This is an overloaded member function, provided for convenience. */ static void setObjectProperty(QObject *pObject, const char *pProperty, const QString &rValue); /*! * Unregisters the Appender factory function for the class * \a rAppenderClassName. * * \sa registerAppender(), registeredAppenders() */ static void unregisterAppender(const QString &rAppenderClassName); /*! * This is an overloaded member function, provided for convenience. */ static void unregisterAppender(const char *pAppenderClassName); /*! * Unregisters the Filter factory function for the class * \a rFilterClassName. * * \sa registerFilter(), registeredFilters() */ static void unregisterFilter(const QString &rFilterClassName); /*! * This is an overloaded member function, provided for convenience. */ static void unregisterFilter(const char *pFilterClassName); /*! * Unregisters the Layout factory function for the class * \a rLayoutClassName. * * \sa registerLayout(), registeredLayouts() */ static void unregisterLayout(const QString &rLayoutClassName); /*! * This is an overloaded member function, provided for convenience. */ static void unregisterLayout(const char *pLayoutClassName); private: Appender *doCreateAppender(const QString &rAppenderClassName); Filter *doCreateFilter(const QString &rFilterClassName); Layout *doCreateLayout(const QString &rLayoutClassName); void doRegisterAppender(const QString &rAppenderClassName, AppenderFactoryFunc pAppenderFactoryFunc); void doRegisterFilter(const QString &rFilterClassName, FilterFactoryFunc pFilterFactoryFunc); void doRegisterLayout(const QString &rLayoutClassName, LayoutFactoryFunc pLayoutFactoryFunc); void doSetObjectProperty(QObject *pObject, const QString &rProperty, const QString &rValue); void doUnregisterAppender(const QString &rAppenderClassName); void doUnregisterFilter(const QString &rFilterClassName); void doUnregisterLayout(const QString &rLayoutClassName); void registerDefaultAppenders(); void registerDefaultFilters(); void registerDefaultLayouts(); bool validateObjectProperty(QMetaProperty &rMetaProperty, const QString &rProperty, QObject *pObject); private: mutable QMutex mObjectGuard; QHash<QString, AppenderFactoryFunc> mAppenderRegistry; QHash<QString, FilterFactoryFunc> mFilterRegistry; QHash<QString, LayoutFactoryFunc> mLayoutRegistry; }; /************************************************************************** * Operators, Helper **************************************************************************/ #ifndef QT_NO_DEBUG_STREAM /*! * \relates Factory * * Writes all object member variables to the given debug stream \a rDebug and * returns the stream. * * <tt> * %Factory(appenderfactories:("Log4Qt::DebugAppender", "Log4Qt::NullAppender", * "Log4Qt::ConsoleAppender", "org.apache.log4j.varia.DebugAppender", * "org.apache.log4j.FileAppender", "org.apache.log4j.RollingFileAppender", * "org.apache.log4j.DailyRollingFileAppender", * "org.apache.log4j.varia.ListAppender", * "org.apache.log4j.varia.NullAppender", * "Log4Qt::FileAppender", "org.apache.log4j.ConsoleAppender", * "Log4Qt::DailyRollingFileAppender", "Log4Qt::ListAppender", * "Log4Qt::RollingFileAppender") filterfactories: * ("Log4Qt::DenyAllFilter", "Log4Qt::StringMatchFilter", * "Log4Qt::LevelRangeFilter", "org.apache.log4j.varia.DenyAllFilter", * "org.apache.log4j.varia.LevelRangeFilter", * "org.apache.log4j.varia.StringMatchFilter", "Log4Qt::LevelMatchFilter", * "org.apache.log4j.varia.LevelMatchFilter") layoutfactories: * ("org.apache.log4j.SimpleLayout", "Log4Qt::PatternLayout", * "Log4Qt::SimpleLayout", "org.apache.log4j.TTCCLayout", * "Log4Qt::TTCCLayout", "org.apache.log4j.PatternLayout") ) * </tt> * \sa QDebug, Factory::logManager() */ QDebug operator<<(QDebug debug, const Factory &rFactory); #endif // QT_NO_DEBUG_STREAM /************************************************************************** * Inline **************************************************************************/ inline Appender *Factory::createAppender(const QString &rAppenderClassName) { return instance()->doCreateAppender(rAppenderClassName); } inline Appender *Factory::createAppender(const char *pAppenderClassName) { return instance()->doCreateAppender(QLatin1String(pAppenderClassName)); } inline Filter *Factory::createFilter(const QString &rFilterClassName) { return instance()->doCreateFilter(rFilterClassName); } inline Filter *Factory::createFilter(const char *pFilterClassName) { return instance()->doCreateFilter(QLatin1String(pFilterClassName)); } inline Layout *Factory::createLayout(const QString &rLayoutClassName) { return instance()->doCreateLayout(rLayoutClassName); } inline Layout *Factory::createLayout(const char *pLayoutClassName) { return instance()->doCreateLayout(QLatin1String(pLayoutClassName)); } inline void Factory::registerAppender(const QString &rAppenderClassName, AppenderFactoryFunc pAppenderFactoryFunc) { instance()->doRegisterAppender(rAppenderClassName, pAppenderFactoryFunc); } inline void Factory::registerAppender(const char *pAppenderClassName, AppenderFactoryFunc pAppenderFactoryFunc) { instance()->doRegisterAppender(QLatin1String(pAppenderClassName), pAppenderFactoryFunc); } inline void Factory::registerFilter(const QString &rFilterClassName, FilterFactoryFunc pFilterFactoryFunc) { instance()->doRegisterFilter(rFilterClassName, pFilterFactoryFunc); } inline void Factory::registerFilter(const char *pFilterClassName, FilterFactoryFunc pFilterFactoryFunc) { instance()->doRegisterFilter(QLatin1String(pFilterClassName), pFilterFactoryFunc); } inline void Factory::registerLayout(const QString &rLayoutClassName, LayoutFactoryFunc pLayoutFactoryFunc) { instance()->doRegisterLayout(rLayoutClassName, pLayoutFactoryFunc); } inline void Factory::registerLayout(const char *pLayoutClassName, LayoutFactoryFunc pLayoutFactoryFunc) { instance()->doRegisterLayout(QLatin1String(pLayoutClassName), pLayoutFactoryFunc); } inline QStringList Factory::registeredAppenders() { QMutexLocker locker(&instance()->mObjectGuard); return instance()->mAppenderRegistry.keys(); } inline QStringList Factory::registeredFilters() { QMutexLocker locker(&instance()->mObjectGuard); return instance()->mFilterRegistry.keys(); } inline QStringList Factory::registeredLayouts() { QMutexLocker locker(&instance()->mObjectGuard); return instance()->mLayoutRegistry.keys(); } inline void Factory::setObjectProperty(QObject *pObject, const QString &rProperty, const QString &rValue) { instance()->doSetObjectProperty(pObject, rProperty, rValue); } inline void Factory::setObjectProperty(QObject *pObject, const char *pProperty, const QString &rValue) { instance()->doSetObjectProperty(pObject, QLatin1String(pProperty), rValue); } inline void Factory::unregisterAppender(const QString &rAppenderClassName) { instance()->doUnregisterAppender(rAppenderClassName); } inline void Factory::unregisterAppender(const char *pAppenderClassName) { instance()->doUnregisterAppender(QLatin1String(pAppenderClassName)); } inline void Factory::unregisterFilter(const QString &rFilterClassName) { instance()->doUnregisterFilter(rFilterClassName); } inline void Factory::unregisterFilter(const char *pFilterClassName) { instance()->doUnregisterFilter(QLatin1String(pFilterClassName)); } inline void Factory::unregisterLayout(const QString &rLayoutClassName) { instance()->doUnregisterLayout(rLayoutClassName); } inline void Factory::unregisterLayout(const char *pLayoutClassName) { instance()->doUnregisterLayout(QLatin1String(pLayoutClassName)); } } // namespace Log4Qt // Q_DECLARE_TYPEINFO(Log4Qt::Factory, Q_COMPLEX_TYPE); // use default #endif // LOG4QT_HELPERS_FACTORY_H
{ "pile_set_name": "Github" }
package querier import ( "context" "fmt" "github.com/go-kit/kit/log" "github.com/oklog/ulid" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/cortexproject/cortex/pkg/ring" "github.com/cortexproject/cortex/pkg/ring/client" cortex_tsdb "github.com/cortexproject/cortex/pkg/storage/tsdb" "github.com/cortexproject/cortex/pkg/storegateway" "github.com/cortexproject/cortex/pkg/util" "github.com/cortexproject/cortex/pkg/util/services" "github.com/cortexproject/cortex/pkg/util/tls" ) // BlocksStoreSet implementation used when the blocks are sharded and replicated across // a set of store-gateway instances. type blocksStoreReplicationSet struct { services.Service storesRing *ring.Ring clientsPool *client.Pool shardingStrategy string limits BlocksStoreLimits // Subservices manager. subservices *services.Manager subservicesWatcher *services.FailureWatcher } func newBlocksStoreReplicationSet( storesRing *ring.Ring, shardingStrategy string, limits BlocksStoreLimits, tlsCfg tls.ClientConfig, logger log.Logger, reg prometheus.Registerer, ) (*blocksStoreReplicationSet, error) { s := &blocksStoreReplicationSet{ storesRing: storesRing, clientsPool: newStoreGatewayClientPool(client.NewRingServiceDiscovery(storesRing), tlsCfg, logger, reg), shardingStrategy: shardingStrategy, limits: limits, } var err error s.subservices, err = services.NewManager(s.storesRing, s.clientsPool) if err != nil { return nil, err } s.Service = services.NewBasicService(s.starting, s.running, s.stopping) return s, nil } func (s *blocksStoreReplicationSet) starting(ctx context.Context) error { s.subservicesWatcher.WatchManager(s.subservices) if err := services.StartManagerAndAwaitHealthy(ctx, s.subservices); err != nil { return errors.Wrap(err, "unable to start blocks store set subservices") } return nil } func (s *blocksStoreReplicationSet) running(ctx context.Context) error { for { select { case <-ctx.Done(): return nil case err := <-s.subservicesWatcher.Chan(): return errors.Wrap(err, "blocks store set subservice failed") } } } func (s *blocksStoreReplicationSet) stopping(_ error) error { return services.StopManagerAndAwaitStopped(context.Background(), s.subservices) } func (s *blocksStoreReplicationSet) GetClientsFor(userID string, blockIDs []ulid.ULID, exclude map[ulid.ULID][]string) (map[BlocksStoreClient][]ulid.ULID, error) { shards := map[string][]ulid.ULID{} // If shuffle sharding is enabled, we should build a subring for the user, // otherwise we just use the full ring. var userRing ring.ReadRing if s.shardingStrategy == storegateway.ShardingStrategyShuffle { userRing = storegateway.GetShuffleShardingSubring(s.storesRing, userID, s.limits) } else { userRing = s.storesRing } // Find the replication set of each block we need to query. for _, blockID := range blockIDs { // Buffer internally used by the ring (give extra room for a JOINING + LEAVING instance). // Do not reuse the same buffer across multiple Get() calls because we do retain the // returned replication set. buf := make([]ring.IngesterDesc, 0, userRing.ReplicationFactor()+2) set, err := userRing.Get(cortex_tsdb.HashBlockID(blockID), ring.BlocksRead, buf) if err != nil { return nil, errors.Wrapf(err, "failed to get store-gateway replication set owning the block %s", blockID.String()) } // Pick the first non excluded store-gateway instance. addr := getFirstNonExcludedInstanceAddr(set, exclude[blockID]) if addr == "" { return nil, fmt.Errorf("no store-gateway instance left after checking exclude for block %s", blockID.String()) } shards[addr] = append(shards[addr], blockID) } clients := map[BlocksStoreClient][]ulid.ULID{} // Get the client for each store-gateway. for addr, blockIDs := range shards { c, err := s.clientsPool.GetClientFor(addr) if err != nil { return nil, errors.Wrapf(err, "failed to get store-gateway client for %s", addr) } clients[c.(BlocksStoreClient)] = blockIDs } return clients, nil } func getFirstNonExcludedInstanceAddr(set ring.ReplicationSet, exclude []string) string { for _, instance := range set.Ingesters { if !util.StringsContain(exclude, instance.Addr) { return instance.Addr } } return "" }
{ "pile_set_name": "Github" }
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LITE_MINIMAL_LOGGING_H_ #define TENSORFLOW_LITE_MINIMAL_LOGGING_H_ #include <cstdarg> namespace tflite { enum LogSeverity { TFLITE_LOG_INFO = 0, TFLITE_LOG_WARNING = 1, TFLITE_LOG_ERROR = 2, }; namespace logging_internal { // Helper class for simple platform-specific console logging. Note that we // explicitly avoid the convenience of ostream-style logging to minimize binary // size impact. class MinimalLogger { public: // Logging hook that takes variadic args. static void Log(LogSeverity severity, const char* format, ...); // Logging hook that takes a formatted va_list. static void LogFormatted(LogSeverity severity, const char* format, va_list args); private: static const char* GetSeverityName(LogSeverity severity); }; } // namespace logging_internal } // namespace tflite // Convenience macro for basic internal logging in production builds. // Note: This should never be used for debug-type logs, as it will *not* be // stripped in release optimized builds. In general, prefer the error reporting // APIs for developer-facing errors, and only use this for diagnostic output // that should always be logged in user builds. #define TFLITE_LOG_PROD(severity, format, ...) \ tflite::logging_internal::MinimalLogger::Log(severity, format, ##__VA_ARGS__); // Convenience macro for logging a statement *once* for a given process lifetime // in production builds. #define TFLITE_LOG_PROD_ONCE(severity, format, ...) \ do { \ static const bool s_logged = [&] { \ TFLITE_LOG_PROD(severity, format, ##__VA_ARGS__) \ return true; \ }(); \ (void)s_logged; \ } while (false); #ifndef NDEBUG // In debug builds, always log. #define TFLITE_LOG TFLITE_LOG_PROD #define TFLITE_LOG_ONCE TFLITE_LOG_PROD_ONCE #else // In prod builds, never log, but ensure the code is well-formed and compiles. #define TFLITE_LOG(severity, format, ...) \ while (false) { \ TFLITE_LOG_PROD(severity, format, ##__VA_ARGS__); \ } #define TFLITE_LOG_ONCE TFLITE_LOG #endif #endif // TENSORFLOW_LITE_MINIMAL_LOGGING_H_
{ "pile_set_name": "Github" }
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2012 The ZAP Development Team * * 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 org.zaproxy.zap.extension.httpsessions; import java.awt.CardLayout; import java.awt.EventQueue; import java.awt.GridBagConstraints; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.KeyEvent; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JToolBar; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.renderer.DefaultTableRenderer; import org.jdesktop.swingx.renderer.IconValues; import org.jdesktop.swingx.renderer.MappedValue; import org.jdesktop.swingx.renderer.StringValues; import org.parosproxy.paros.Constant; import org.parosproxy.paros.control.Control; import org.parosproxy.paros.extension.AbstractPanel; import org.parosproxy.paros.model.SiteNode; import org.parosproxy.paros.view.View; import org.zaproxy.zap.utils.DisplayUtils; import org.zaproxy.zap.utils.SortedComboBoxModel; import org.zaproxy.zap.utils.TableExportButton; import org.zaproxy.zap.view.ScanPanel; import org.zaproxy.zap.view.table.decorator.AbstractTableCellItemIconHighlighter; /** * The HttpSessionsPanel used as a display panel for the {@link ExtensionHttpSessions}, allowing the * user to view and control the http sessions. */ public class HttpSessionsPanel extends AbstractPanel { /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1L; /** The Constant PANEL_NAME. */ public static final String PANEL_NAME = "httpsessions"; /** The extension. */ private ExtensionHttpSessions extension = null; private JPanel panelCommand = null; private JToolBar panelToolbar = null; private JScrollPane jScrollPane = null; private JComboBox<String> siteSelect = null; private JButton newSessionButton = null; private JXTable sessionsTable = null; private TableExportButton<JXTable> exportButton = null; private JButton optionsButton = null; /** The current site. */ private String currentSite = null; /** The site model. */ private SortedComboBoxModel<String> siteModel = new SortedComboBoxModel<>(); /** The sessions model. */ private HttpSessionsTableModel sessionsModel = new HttpSessionsTableModel(null); /** * Instantiates a new http session panel. * * @param extensionHttpSession the extension http session */ public HttpSessionsPanel(ExtensionHttpSessions extensionHttpSession) { super(); this.extension = extensionHttpSession; initialize(); } /** This method initializes this panel. */ private void initialize() { this.setLayout(new CardLayout()); this.setSize(474, 251); this.setName(Constant.messages.getString("httpsessions.panel.title")); this.setIcon( new ImageIcon( HttpSessionsPanel.class.getResource("/resource/icon/16/session.png"))); this.setDefaultAccelerator( extension .getView() .getMenuShortcutKeyStroke( KeyEvent.VK_H, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK, false)); this.setMnemonic(Constant.messages.getChar("httpsessions.panel.mnemonic")); this.add(getPanelCommand(), getPanelCommand().getName()); } /** * This method initializes the main panel. * * @return javax.swing.JPanel */ private javax.swing.JPanel getPanelCommand() { if (panelCommand == null) { panelCommand = new javax.swing.JPanel(); panelCommand.setLayout(new java.awt.GridBagLayout()); panelCommand.setName(Constant.messages.getString("httpsessions.panel.title")); // Add the two components: toolbar and work pane GridBagConstraints toolbarGridBag = new GridBagConstraints(); GridBagConstraints workPaneGridBag = new GridBagConstraints(); toolbarGridBag.gridx = 0; toolbarGridBag.gridy = 0; toolbarGridBag.weightx = 1.0d; toolbarGridBag.insets = new java.awt.Insets(2, 2, 2, 2); toolbarGridBag.anchor = java.awt.GridBagConstraints.NORTHWEST; toolbarGridBag.fill = java.awt.GridBagConstraints.HORIZONTAL; workPaneGridBag.gridx = 0; workPaneGridBag.gridy = 1; workPaneGridBag.weightx = 1.0; workPaneGridBag.weighty = 1.0; workPaneGridBag.insets = new java.awt.Insets(0, 0, 0, 0); workPaneGridBag.anchor = java.awt.GridBagConstraints.NORTHWEST; workPaneGridBag.fill = java.awt.GridBagConstraints.BOTH; panelCommand.add(this.getPanelToolbar(), toolbarGridBag); panelCommand.add(getWorkPane(), workPaneGridBag); } return panelCommand; } private TableExportButton<JXTable> getExportButton() { if (exportButton == null) { exportButton = new TableExportButton<>(getHttpSessionsTable()); } return exportButton; } /** * Gets the options button. * * @return the options button */ private JButton getOptionsButton() { if (optionsButton == null) { optionsButton = new JButton(); optionsButton.setToolTipText( Constant.messages.getString("httpsessions.toolbar.options.button")); optionsButton.setIcon( DisplayUtils.getScaledIcon( new ImageIcon( ScanPanel.class.getResource("/resource/icon/16/041.png")))); optionsButton.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { Control.getSingleton() .getMenuToolsControl() .options( Constant.messages.getString( "httpsessions.options.title")); } }); } return optionsButton; } /** * Gets the new session button. * * @return the new session button */ private JButton getNewSessionButton() { if (newSessionButton == null) { newSessionButton = new JButton(); newSessionButton.setText( Constant.messages.getString("httpsessions.toolbar.newsession.label")); newSessionButton.setIcon( DisplayUtils.getScaledIcon( new ImageIcon( HttpSessionsPanel.class.getResource( "/resource/icon/16/103.png")))); newSessionButton.setToolTipText( Constant.messages.getString("httpsessions.toolbar.newsession.tooltip")); newSessionButton.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { HttpSessionsSite site = getCurrentHttpSessionSite(); if (site != null) { site.createEmptySession(); } } }); } return newSessionButton; } /** * Gets the panel's toolbar. * * @return the panel toolbar */ private javax.swing.JToolBar getPanelToolbar() { if (panelToolbar == null) { // Initialize the toolbar panelToolbar = new javax.swing.JToolBar(); panelToolbar.setLayout(new java.awt.GridBagLayout()); panelToolbar.setEnabled(true); panelToolbar.setFloatable(false); panelToolbar.setRollover(true); panelToolbar.setPreferredSize(new java.awt.Dimension(800, 30)); panelToolbar.setName("HttpSessionToolbar"); // Add elements GridBagConstraints labelGridBag = new GridBagConstraints(); GridBagConstraints siteSelectGridBag = new GridBagConstraints(); GridBagConstraints newSessionGridBag = new GridBagConstraints(); GridBagConstraints emptyGridBag = new GridBagConstraints(); GridBagConstraints optionsGridBag = new GridBagConstraints(); GridBagConstraints exportButtonGbc = new GridBagConstraints(); labelGridBag.gridx = 0; labelGridBag.gridy = 0; labelGridBag.insets = new java.awt.Insets(0, 0, 0, 0); labelGridBag.anchor = java.awt.GridBagConstraints.WEST; siteSelectGridBag.gridx = 1; siteSelectGridBag.gridy = 0; siteSelectGridBag.insets = new java.awt.Insets(0, 0, 0, 0); siteSelectGridBag.anchor = java.awt.GridBagConstraints.WEST; newSessionGridBag.gridx = 2; newSessionGridBag.gridy = 0; newSessionGridBag.insets = new java.awt.Insets(0, 0, 0, 0); newSessionGridBag.anchor = java.awt.GridBagConstraints.WEST; exportButtonGbc.gridx = 3; exportButtonGbc.gridy = 0; exportButtonGbc.insets = new java.awt.Insets(0, 0, 0, 0); exportButtonGbc.anchor = java.awt.GridBagConstraints.WEST; emptyGridBag.gridx = 4; emptyGridBag.gridy = 0; emptyGridBag.weightx = 1.0; emptyGridBag.weighty = 1.0; emptyGridBag.insets = new java.awt.Insets(0, 0, 0, 0); emptyGridBag.anchor = java.awt.GridBagConstraints.WEST; emptyGridBag.fill = java.awt.GridBagConstraints.HORIZONTAL; optionsGridBag.gridx = 5; optionsGridBag.gridy = 0; optionsGridBag.insets = new java.awt.Insets(0, 0, 0, 0); optionsGridBag.anchor = java.awt.GridBagConstraints.EAST; JLabel label = new JLabel(Constant.messages.getString("httpsessions.toolbar.site.label")); panelToolbar.add(label, labelGridBag); panelToolbar.add(getSiteSelect(), siteSelectGridBag); panelToolbar.add(getNewSessionButton(), newSessionGridBag); panelToolbar.add(getExportButton(), exportButtonGbc); panelToolbar.add(getOptionsButton(), optionsGridBag); // Add an empty JLabel to fill the space panelToolbar.add(new JLabel(), emptyGridBag); } return panelToolbar; } /** * Gets the work pane where data is shown. * * @return the work pane */ private JScrollPane getWorkPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getHttpSessionsTable()); } return jScrollPane; } /** Sets the sessions table column sizes. */ private void setSessionsTableColumnSizes() { sessionsTable.getColumnModel().getColumn(0).setMinWidth(60); sessionsTable.getColumnModel().getColumn(0).setPreferredWidth(60); // active sessionsTable.getColumnModel().getColumn(1).setMinWidth(120); sessionsTable.getColumnModel().getColumn(1).setPreferredWidth(200); // name sessionsTable.getColumnModel().getColumn(3).setMinWidth(100); sessionsTable.getColumnModel().getColumn(3).setPreferredWidth(150); // matched } /** * Gets the http sessions table. * * @return the http sessions table */ private JXTable getHttpSessionsTable() { if (sessionsTable == null) { sessionsTable = new JXTable(sessionsModel); sessionsTable.setColumnSelectionAllowed(false); sessionsTable.setCellSelectionEnabled(false); sessionsTable.setRowSelectionAllowed(true); sessionsTable.setAutoCreateRowSorter(true); sessionsTable.setColumnControlVisible(true); sessionsTable.setAutoCreateColumnsFromModel(false); sessionsTable .getColumnExt(0) .setCellRenderer( new DefaultTableRenderer( new MappedValue(StringValues.EMPTY, IconValues.NONE), JLabel.CENTER)); sessionsTable.getColumnExt(0).setHighlighters(new ActiveSessionIconHighlighter(0)); this.setSessionsTableColumnSizes(); sessionsTable.setName(PANEL_NAME); sessionsTable.setDoubleBuffered(true); sessionsTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); sessionsTable.addMouseListener( new java.awt.event.MouseAdapter() { @Override public void mousePressed(java.awt.event.MouseEvent e) { showPopupMenuIfTriggered(e); } @Override public void mouseReleased(java.awt.event.MouseEvent e) { showPopupMenuIfTriggered(e); } private void showPopupMenuIfTriggered(java.awt.event.MouseEvent e) { if (e.isPopupTrigger()) { // Select table item int row = sessionsTable.rowAtPoint(e.getPoint()); if (row < 0 || !sessionsTable .getSelectionModel() .isSelectedIndex(row)) { sessionsTable.getSelectionModel().clearSelection(); if (row >= 0) { sessionsTable .getSelectionModel() .setSelectionInterval(row, row); } } View.getSingleton() .getPopupMenu() .show(e.getComponent(), e.getX(), e.getY()); } } }); } return sessionsTable; } /** * Gets the site select ComboBox. * * @return the site select */ private JComboBox<String> getSiteSelect() { if (siteSelect == null) { siteSelect = new JComboBox<>(siteModel); siteSelect.addItem(Constant.messages.getString("httpsessions.toolbar.site.select")); siteSelect.setSelectedIndex(0); // Add the item listener for when the site is selected siteSelect.addItemListener( new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (ItemEvent.SELECTED == e.getStateChange()) { if (siteSelect.getSelectedIndex() > 0) { siteSelected((String) e.getItem()); } // If the user selects the first option (empty one), force the // selection to // the first valid site else if (siteModel.getSize() > 1) { siteModel.setSelectedItem(siteModel.getElementAt(1)); } } } }); } return siteSelect; } /** * Adds a new site to the "Http Sessions" tab. * * <p>The method must be called in the EDT, failing to do so might result in thread interference * or memory consistency errors. * * @param site the site * @see #addSiteAsynchronously(String) * @see EventQueue */ public void addSite(String site) { if (siteModel.getIndexOf(site) < 0) { siteModel.addElement(site); if (currentSite == null) { // First site added, automatically select it siteModel.setSelectedItem(site); } } } /** * Adds a new site, asynchronously, to the "Http Sessions" tab. * * <p>The call to this method will return immediately and the site will be added in the EDT (by * calling the method {@code EventQueue#invokeLater(Runnable)}) after all pending events have * been processed. * * @param site the site * @see #addSite(String) * @see EventQueue#invokeLater(Runnable) */ public void addSiteAsynchronously(final String site) { EventQueue.invokeLater( new Runnable() { @Override public void run() { addSite(site); } }); } /** * A new Site was selected. * * @param site the site */ private void siteSelected(String site) { if (!site.equals(currentSite)) { this.sessionsModel = extension.getHttpSessionsSite(site).getModel(); this.getHttpSessionsTable().setModel(this.sessionsModel); this.setSessionsTableColumnSizes(); currentSite = site; } } /** * Node selected. * * @param node the node */ public void nodeSelected(SiteNode node) { if (node != null) { siteModel.setSelectedItem(ScanPanel.cleanSiteName(node, true)); } } /** Reset the panel. */ public void reset() { currentSite = null; siteModel.removeAllElements(); siteModel.addElement(Constant.messages.getString("httpsessions.toolbar.site.select")); sessionsModel = new HttpSessionsTableModel(null); getHttpSessionsTable().setModel(sessionsModel); } /** * Gets the current http session site. * * @return the current http session site, or null if no HttpSessionSite is selected */ public HttpSessionsSite getCurrentHttpSessionSite() { if (currentSite == null) { return null; } return extension.getHttpSessionsSite(currentSite); } /** * Gets the currently selected site. * * @return the current site */ public String getCurrentSite() { return currentSite; } /** * Gets the selected http session. * * @return the selected session, or null if nothing is selected */ public HttpSession getSelectedSession() { final int selectedRow = this.sessionsTable.getSelectedRow(); if (selectedRow == -1) { // No row selected return null; } final int rowIndex = sessionsTable.convertRowIndexToModel(selectedRow); return this.sessionsModel.getHttpSessionAt(rowIndex); } /** * A {@link org.jdesktop.swingx.decorator.Highlighter Highlighter} for a column that indicates, * using an icon, whether or not a session is active. * * <p>The expected type/class of the cell value is {@code Boolean}. */ private static class ActiveSessionIconHighlighter extends AbstractTableCellItemIconHighlighter { /** The icon that indicates that a session is active. */ private static final ImageIcon ACTIVE_ICON = new ImageIcon(HttpSessionsPanel.class.getResource("/resource/icon/16/102.png")); public ActiveSessionIconHighlighter(int columnIndex) { super(columnIndex); } @Override protected Icon getIcon(final Object cellItem) { return ACTIVE_ICON; } @Override protected boolean isHighlighted(final Object cellItem) { return (Boolean) cellItem; } } }
{ "pile_set_name": "Github" }
/* Copyright JS Foundation and other contributors, http://js.foundation * * 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. */ #define _BSD_SOURCE #include <stdarg.h> #include <stdlib.h> #include <sys/time.h> #include "jerry-core/include/jerryscript-port.h" #include "mbed-hal/us_ticker_api.h" /** * Provide log message implementation for the engine. */ void jerry_port_log (jerry_log_level_t level, /**< log level */ const char *format, /**< format string */ ...) /**< parameters */ { (void) level; /* ignore log level */ va_list args; va_start (args, format); vfprintf (stderr, format, args); va_end (args); } /* jerry_port_log */ /** * Implementation of jerry_port_fatal. */ void jerry_port_fatal (jerry_fatal_code_t code) /**< fatal code enum item */ { exit (code); } /* jerry_port_fatal */ /** * Implementation of jerry_port_get_time_zone. * * @return true - if success */ bool jerry_port_get_time_zone (jerry_time_zone_t *tz_p) /**< timezone pointer */ { tz_p->offset = 0; tz_p->daylight_saving_time = 0; return true; } /* jerry_port_get_time_zone */ /** * Implementation of jerry_port_get_current_time. * * @return current timer's counter value in milliseconds */ double jerry_port_get_current_time (void) { /* Note: if the target has its own RTC, this value should be extended by the * RTC's one. */ return (double) us_ticker_read () / 1000; } /* jerry_port_get_current_time */
{ "pile_set_name": "Github" }
[net] batch=2 channels=3 height=4 width=5 # Upsample is a nearest neighbor resize [upsample] stride=2
{ "pile_set_name": "Github" }
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Resource.Ml.Projects.Predict -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Performs prediction on the data in the request. Cloud ML Engine -- implements a custom \`predict\` verb on top of an HTTP POST method. -- -- For details of the request and response format, see the **guide to the -- [predict request format](\/ml-engine\/docs\/v1\/predict-request)**. -- -- /See:/ <https://cloud.google.com/ml/ Cloud Machine Learning Engine Reference> for @ml.projects.predict@. module Network.Google.Resource.Ml.Projects.Predict ( -- * REST Resource ProjectsPredictResource -- * Creating a Request , projectsPredict , ProjectsPredict -- * Request Lenses , ppXgafv , ppUploadProtocol , ppAccessToken , ppUploadType , ppPayload , ppName , ppCallback ) where import Network.Google.MachineLearning.Types import Network.Google.Prelude -- | A resource alias for @ml.projects.predict@ method which the -- 'ProjectsPredict' request conforms to. type ProjectsPredictResource = "v1" :> CaptureMode "name" "predict" Text :> QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "access_token" Text :> QueryParam "uploadType" Text :> QueryParam "callback" Text :> QueryParam "alt" AltJSON :> ReqBody '[JSON] GoogleCloudMlV1__PredictRequest :> Post '[JSON] GoogleAPI__HTTPBody -- | Performs prediction on the data in the request. Cloud ML Engine -- implements a custom \`predict\` verb on top of an HTTP POST method. -- -- For details of the request and response format, see the **guide to the -- [predict request format](\/ml-engine\/docs\/v1\/predict-request)**. -- -- /See:/ 'projectsPredict' smart constructor. data ProjectsPredict = ProjectsPredict' { _ppXgafv :: !(Maybe Xgafv) , _ppUploadProtocol :: !(Maybe Text) , _ppAccessToken :: !(Maybe Text) , _ppUploadType :: !(Maybe Text) , _ppPayload :: !GoogleCloudMlV1__PredictRequest , _ppName :: !Text , _ppCallback :: !(Maybe Text) } deriving (Eq, Show, Data, Typeable, Generic) -- | Creates a value of 'ProjectsPredict' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ppXgafv' -- -- * 'ppUploadProtocol' -- -- * 'ppAccessToken' -- -- * 'ppUploadType' -- -- * 'ppPayload' -- -- * 'ppName' -- -- * 'ppCallback' projectsPredict :: GoogleCloudMlV1__PredictRequest -- ^ 'ppPayload' -> Text -- ^ 'ppName' -> ProjectsPredict projectsPredict pPpPayload_ pPpName_ = ProjectsPredict' { _ppXgafv = Nothing , _ppUploadProtocol = Nothing , _ppAccessToken = Nothing , _ppUploadType = Nothing , _ppPayload = pPpPayload_ , _ppName = pPpName_ , _ppCallback = Nothing } -- | V1 error format. ppXgafv :: Lens' ProjectsPredict (Maybe Xgafv) ppXgafv = lens _ppXgafv (\ s a -> s{_ppXgafv = a}) -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). ppUploadProtocol :: Lens' ProjectsPredict (Maybe Text) ppUploadProtocol = lens _ppUploadProtocol (\ s a -> s{_ppUploadProtocol = a}) -- | OAuth access token. ppAccessToken :: Lens' ProjectsPredict (Maybe Text) ppAccessToken = lens _ppAccessToken (\ s a -> s{_ppAccessToken = a}) -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). ppUploadType :: Lens' ProjectsPredict (Maybe Text) ppUploadType = lens _ppUploadType (\ s a -> s{_ppUploadType = a}) -- | Multipart request metadata. ppPayload :: Lens' ProjectsPredict GoogleCloudMlV1__PredictRequest ppPayload = lens _ppPayload (\ s a -> s{_ppPayload = a}) -- | Required. The resource name of a model or a version. Authorization: -- requires the \`predict\` permission on the specified resource. ppName :: Lens' ProjectsPredict Text ppName = lens _ppName (\ s a -> s{_ppName = a}) -- | JSONP ppCallback :: Lens' ProjectsPredict (Maybe Text) ppCallback = lens _ppCallback (\ s a -> s{_ppCallback = a}) instance GoogleRequest ProjectsPredict where type Rs ProjectsPredict = GoogleAPI__HTTPBody type Scopes ProjectsPredict = '["https://www.googleapis.com/auth/cloud-platform"] requestClient ProjectsPredict'{..} = go _ppName _ppXgafv _ppUploadProtocol _ppAccessToken _ppUploadType _ppCallback (Just AltJSON) _ppPayload machineLearningService where go = buildClient (Proxy :: Proxy ProjectsPredictResource) mempty
{ "pile_set_name": "Github" }
package live //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. // // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // DescribeLiveDomainTranscodeData invokes the live.DescribeLiveDomainTranscodeData API synchronously func (client *Client) DescribeLiveDomainTranscodeData(request *DescribeLiveDomainTranscodeDataRequest) (response *DescribeLiveDomainTranscodeDataResponse, err error) { response = CreateDescribeLiveDomainTranscodeDataResponse() err = client.DoAction(request, response) return } // DescribeLiveDomainTranscodeDataWithChan invokes the live.DescribeLiveDomainTranscodeData API asynchronously func (client *Client) DescribeLiveDomainTranscodeDataWithChan(request *DescribeLiveDomainTranscodeDataRequest) (<-chan *DescribeLiveDomainTranscodeDataResponse, <-chan error) { responseChan := make(chan *DescribeLiveDomainTranscodeDataResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) response, err := client.DescribeLiveDomainTranscodeData(request) if err != nil { errChan <- err } else { responseChan <- response } }) if err != nil { errChan <- err close(responseChan) close(errChan) } return responseChan, errChan } // DescribeLiveDomainTranscodeDataWithCallback invokes the live.DescribeLiveDomainTranscodeData API asynchronously func (client *Client) DescribeLiveDomainTranscodeDataWithCallback(request *DescribeLiveDomainTranscodeDataRequest, callback func(response *DescribeLiveDomainTranscodeDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *DescribeLiveDomainTranscodeDataResponse var err error defer close(result) response, err = client.DescribeLiveDomainTranscodeData(request) callback(response, err) result <- 1 }) if err != nil { defer close(result) callback(nil, err) result <- 0 } return result } // DescribeLiveDomainTranscodeDataRequest is the request struct for api DescribeLiveDomainTranscodeData type DescribeLiveDomainTranscodeDataRequest struct { *requests.RpcRequest StartTime string `position:"Query" name:"StartTime"` DomainName string `position:"Query" name:"DomainName"` EndTime string `position:"Query" name:"EndTime"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } // DescribeLiveDomainTranscodeDataResponse is the response struct for api DescribeLiveDomainTranscodeData type DescribeLiveDomainTranscodeDataResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` TranscodeDataInfos TranscodeDataInfos `json:"TranscodeDataInfos" xml:"TranscodeDataInfos"` } // CreateDescribeLiveDomainTranscodeDataRequest creates a request to invoke DescribeLiveDomainTranscodeData API func CreateDescribeLiveDomainTranscodeDataRequest() (request *DescribeLiveDomainTranscodeDataRequest) { request = &DescribeLiveDomainTranscodeDataRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("live", "2016-11-01", "DescribeLiveDomainTranscodeData", "live", "openAPI") request.Method = requests.POST return } // CreateDescribeLiveDomainTranscodeDataResponse creates a response to parse from DescribeLiveDomainTranscodeData response func CreateDescribeLiveDomainTranscodeDataResponse() (response *DescribeLiveDomainTranscodeDataResponse) { response = &DescribeLiveDomainTranscodeDataResponse{ BaseResponse: &responses.BaseResponse{}, } return }
{ "pile_set_name": "Github" }
/* * Thrifty * * Copyright (c) Microsoft Corporation * * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, * FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. * * See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. */ package com.microsoft.thrifty.testing; public enum ServerTransport { /** * A standard blocking socket transport, i.e. TServerTransport. */ BLOCKING, /** * A framed, non-blocking server socket,i.e. TNonblockingServerTransport. */ NON_BLOCKING }
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.isis.persistence.jdo.datanucleus5.metamodel.facets.object.persistencecapable; import javax.jdo.annotations.IdentityType; import org.apache.isis.core.metamodel.facets.object.entity.EntityFacet; /** * Corresponds to annotating the class with the {@link javax.jdo.annotations.PersistenceCapable} annotation. */ public interface JdoPersistenceCapableFacet extends EntityFacet { IdentityType getIdentityType(); /** * Corresponds to {@link javax.jdo.annotations.PersistenceCapable#schema()}, or null if not specified. */ String getSchema(); /** * Corresponds to {@link javax.jdo.annotations.PersistenceCapable#table()}, or to the * class' {@link Class#getSimpleName() simple name} if no table specified. */ String getTable(); }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright 2015 Hippo Seven ~ ~ 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. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clipChildren="false"> <android.support.v7.widget.CardView android:id="@+id/swipable" style="@style/CardView" android:layout_width="wrap_content" android:layout_height="wrap_content" app:cardBackgroundColor="?attr/colorPure"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/keyline_margin_horizontal" android:paddingRight="@dimen/keyline_margin_horizontal" android:paddingTop="8dp" android:paddingBottom="8dp"> <include layout="@layout/item_feed_include"/> </RelativeLayout> </android.support.v7.widget.CardView> </FrameLayout>
{ "pile_set_name": "Github" }
/** * This header is generated by class-dump-z 0.2b. * * Source: /System/Library/PrivateFrameworks/Message.framework/Message */ #import <Message/MFMailDelivery.h> @class MFSMTPConnection; @interface MFSMTPDelivery : MFMailDelivery { MFSMTPConnection *_connection; // 52 = 0x34 } - (void)dealloc; // 0x39949 - (Class)deliveryClass; // 0x39041 - (void)_openConnection; // 0x398bd - (id)newMessageWriter; // 0x39779 - (int)deliverMessageData:(id)data toRecipients:(id)recipients; // 0x3905d @end
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> __attribute__((visibility("hidden"))) @interface OAVColor : NSObject { } + (id)readColorFromAttribute:(id)arg1 alpha:(float)arg2 manager:(id)arg3; + (int)readColorAdjustmentType:(id)arg1; + (int)readColorProperty:(id)arg1; + (id)readPropertyColorFromAttribute:(id)arg1 manager:(id)arg2; + (id)readColorProperty:(int)arg1 manager:(id)arg2; + (id)readRGBColorFromAttribute:(id)arg1; @end
{ "pile_set_name": "Github" }
// +build !linux /* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package procfs import ( "fmt" "syscall" ) type ProcFS struct{} func NewProcFS() ProcFSInterface { return &ProcFS{} } // GetFullContainerName gets the container name given the root process id of the container. func (pfs *ProcFS) GetFullContainerName(pid int) (string, error) { return "", fmt.Errorf("GetFullContainerName is unsupported in this build") } // Find process(es) using a regular expression and send a specified // signal to each process func PKill(name string, sig syscall.Signal) error { return fmt.Errorf("PKill is unsupported in this build") } // Find process(es) with a specified name (exact match) // and return their pid(s) func PidOf(name string) ([]int, error) { return []int{}, fmt.Errorf("PidOf is unsupported in this build") }
{ "pile_set_name": "Github" }
// Copyright 2018, OpenCensus Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package ochttp import ( "context" "io" "net/http" "strconv" "sync" "time" "go.opencensus.io/stats" "go.opencensus.io/tag" ) // statsTransport is an http.RoundTripper that collects stats for the outgoing requests. type statsTransport struct { base http.RoundTripper } // RoundTrip implements http.RoundTripper, delegating to Base and recording stats for the request. func (t statsTransport) RoundTrip(req *http.Request) (*http.Response, error) { ctx, _ := tag.New(req.Context(), tag.Upsert(KeyClientHost, req.Host), tag.Upsert(Host, req.Host), tag.Upsert(KeyClientPath, req.URL.Path), tag.Upsert(Path, req.URL.Path), tag.Upsert(KeyClientMethod, req.Method), tag.Upsert(Method, req.Method)) req = req.WithContext(ctx) track := &tracker{ start: time.Now(), ctx: ctx, } if req.Body == nil { // TODO: Handle cases where ContentLength is not set. track.reqSize = -1 } else if req.ContentLength > 0 { track.reqSize = req.ContentLength } stats.Record(ctx, ClientRequestCount.M(1)) // Perform request. resp, err := t.base.RoundTrip(req) if err != nil { track.statusCode = http.StatusInternalServerError track.end() } else { track.statusCode = resp.StatusCode if req.Method != "HEAD" { track.respContentLength = resp.ContentLength } if resp.Body == nil { track.end() } else { track.body = resp.Body resp.Body = wrappedBody(track, resp.Body) } } return resp, err } // CancelRequest cancels an in-flight request by closing its connection. func (t statsTransport) CancelRequest(req *http.Request) { type canceler interface { CancelRequest(*http.Request) } if cr, ok := t.base.(canceler); ok { cr.CancelRequest(req) } } type tracker struct { ctx context.Context respSize int64 respContentLength int64 reqSize int64 start time.Time body io.ReadCloser statusCode int endOnce sync.Once } var _ io.ReadCloser = (*tracker)(nil) func (t *tracker) end() { t.endOnce.Do(func() { latencyMs := float64(time.Since(t.start)) / float64(time.Millisecond) respSize := t.respSize if t.respSize == 0 && t.respContentLength > 0 { respSize = t.respContentLength } m := []stats.Measurement{ ClientSentBytes.M(t.reqSize), ClientReceivedBytes.M(respSize), ClientRoundtripLatency.M(latencyMs), ClientLatency.M(latencyMs), ClientResponseBytes.M(t.respSize), } if t.reqSize >= 0 { m = append(m, ClientRequestBytes.M(t.reqSize)) } stats.RecordWithTags(t.ctx, []tag.Mutator{ tag.Upsert(StatusCode, strconv.Itoa(t.statusCode)), tag.Upsert(KeyClientStatus, strconv.Itoa(t.statusCode)), }, m...) }) } func (t *tracker) Read(b []byte) (int, error) { n, err := t.body.Read(b) t.respSize += int64(n) switch err { case nil: return n, nil case io.EOF: t.end() } return n, err } func (t *tracker) Close() error { // Invoking endSpan on Close will help catch the cases // in which a read returned a non-nil error, we set the // span status but didn't end the span. t.end() return t.body.Close() }
{ "pile_set_name": "Github" }
#!/usr/bin/env bash # 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. # This script builds the static library of lz4 that can be used as dependency of mxnet. set -ex LZ4_VERSION=r130 if [[ ! -f $DEPS_PATH/lib/liblz4.a ]]; then # Download and build lz4 >&2 echo "Building lz4..." download \ https://github.com/lz4/lz4/archive/${LZ4_VERSION}.zip \ ${DEPS_PATH}/lz4.zip unzip -q $DEPS_PATH/lz4.zip -d $DEPS_PATH pushd . cd $DEPS_PATH/lz4-$LZ4_VERSION $MAKE $MAKE PREFIX=$DEPS_PATH install popd fi
{ "pile_set_name": "Github" }
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.i18n.client.impl.cldr; // DO NOT EDIT - GENERATED FROM CLDR AND ICU DATA /** * Implementation of DateTimeFormatInfo for the "cu" locale. */ public class DateTimeFormatInfoImpl_cu extends DateTimeFormatInfoImpl { @Override public String[] ampms() { return new String[] { "ДП", "ПП" }; } @Override public String dateFormatFull() { return "EEEE, d MMMM 'л'. y."; } @Override public String dateFormatShort() { return "y.MM.dd"; } @Override public String[] erasFull() { return new String[] { "пре́дъ р. х.", "по р. х." }; } @Override public String[] erasShort() { return new String[] { "пре́дъ р. х.", "ѿ р. х." }; } @Override public String formatMonthFullWeekdayDay() { return "EEEE, MMMM d"; } @Override public String formatMonthNumDay() { return "M/d"; } @Override public String formatYearMonthAbbrev() { return "MMM y"; } @Override public String formatYearMonthAbbrevDay() { return "MMM d, y"; } @Override public String formatYearMonthFull() { return "MMMM y"; } @Override public String formatYearMonthFullDay() { return "MMMM d, y"; } @Override public String formatYearMonthNum() { return "M/y"; } @Override public String formatYearMonthNumDay() { return "M/d/y"; } @Override public String formatYearMonthWeekdayDay() { return "EEE, MMM d, y"; } @Override public String formatYearQuarterFull() { return "QQQQ y"; } @Override public String formatYearQuarterShort() { return "Q y"; } @Override public String[] monthsFull() { return new String[] { "і҆аннꙋа́рїа", "феврꙋа́рїа", "ма́рта", "а҆прі́ллїа", "ма́їа", "і҆ꙋ́нїа", "і҆ꙋ́лїа", "а҆́ѵгꙋста", "септе́мврїа", "ѻ҆ктѡ́врїа", "ное́мврїа", "деке́мврїа" }; } @Override public String[] monthsFullStandalone() { return new String[] { "і҆аннꙋа́рїй", "феврꙋа́рїй", "ма́ртъ", "а҆прі́ллїй", "ма́їй", "і҆ꙋ́нїй", "і҆ꙋ́лїй", "а҆́ѵгꙋстъ", "септе́мврїй", "ѻ҆ктѡ́врїй", "ное́мврїй", "деке́мврїй" }; } @Override public String[] monthsNarrow() { return new String[] { "І҆", "Ф", "М", "А҆", "М", "І҆", "І҆", "А҆", "С", "Ѻ҆", "Н", "Д" }; } @Override public String[] monthsShort() { return new String[] { "і҆аⷩ҇", "феⷡ҇", "маⷬ҇", "а҆пⷬ҇", "маꙵ", "і҆ꙋⷩ҇", "і҆ꙋⷧ҇", "а҆́ѵⷢ҇", "сеⷫ҇", "ѻ҆кⷮ", "ноеⷨ", "деⷦ҇" }; } @Override public String[] quartersFull() { return new String[] { "а҃_ѧ че́тверть", "в҃_ѧ че́тверть", "г҃_ѧ че́тверть", "д҃_ѧ че́тверть" }; } @Override public String[] quartersShort() { return new String[] { "а҃_ѧ че́тверть", "в҃_ѧ че́тверть", "г҃_ѧ че́тверть", "д҃_ѧ че́тверть" }; } @Override public String[] weekdaysFull() { return new String[] { "недѣ́лѧ", "понедѣ́льникъ", "вто́рникъ", "среда̀", "четверто́къ", "пѧто́къ", "сꙋббѡ́та" }; } @Override public String[] weekdaysNarrow() { return new String[] { "Н", "П", "В", "С", "Ч", "П", "С" }; } @Override public String[] weekdaysShort() { return new String[] { "ндⷧ҇ѧ", "пнⷣе", "втоⷬ҇", "срⷣе", "чеⷦ҇", "пѧⷦ҇", "сꙋⷠ҇" }; } }
{ "pile_set_name": "Github" }
/* IMPORTANT! This file is auto-generated each time you save your project - if you alter its contents, your changes may be overwritten! */ #include "AppConfig.h" #include <juce_audio_plugin_client/juce_audio_plugin_client_VST_utils.mm>
{ "pile_set_name": "Github" }
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat, Inc., and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * 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 org.jboss.weld.tests.beanManager.injectionPoint; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.Arrays; import jakarta.enterprise.inject.Default; import jakarta.enterprise.inject.spi.AnnotatedConstructor; import jakarta.enterprise.inject.spi.AnnotatedField; import jakarta.enterprise.inject.spi.AnnotatedMethod; import jakarta.enterprise.inject.spi.AnnotatedParameter; import jakarta.enterprise.inject.spi.AnnotatedType; import jakarta.enterprise.inject.spi.BeanManager; import jakarta.enterprise.inject.spi.InjectionPoint; import jakarta.inject.Inject; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.BeanArchive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.weld.test.util.Utils; import org.jboss.weld.tests.util.BeanUtilities; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(Arquillian.class) public class CreateInjectionPointTest { @Inject private BeanManager manager; @Deployment public static Archive<?> getDeployment() { return ShrinkWrap.create(BeanArchive.class, Utils.getDeploymentNameAsHash(CreateInjectionPointTest.class)).addPackage(Book.class.getPackage()).addClass(BeanUtilities.class); } @Test public void testField() { AnnotatedType<?> type = manager.createAnnotatedType(Library.class); assertEquals(1, type.getFields().size()); AnnotatedField<?> field = type.getFields().iterator().next(); InjectionPoint ip = manager.createInjectionPoint(field); validateParameterizedType(ip.getType(), Book.class, String.class); BeanUtilities.verifyQualifierTypes(ip.getQualifiers(), Monograph.class, Fictional.class); assertNull(ip.getBean()); assertEquals(field.getJavaMember(), ip.getMember()); assertNotNull(ip.getAnnotated()); assertFalse(ip.isDelegate()); assertTrue(ip.isTransient()); } @Test public void testConstructorParameter() { AnnotatedType<?> type = manager.createAnnotatedType(Library.class); assertEquals(1, type.getConstructors().size()); AnnotatedConstructor<?> constructor = type.getConstructors().iterator().next(); AnnotatedParameter<?> parameter = constructor.getParameters().get(1); InjectionPoint ip = manager.createInjectionPoint(parameter); validateParameterizedType(ip.getType(), Book.class, String.class); BeanUtilities.verifyQualifierTypes(ip.getQualifiers(), Fictional.class); assertNull(ip.getBean()); assertEquals(constructor.getJavaMember(), ip.getMember()); assertNotNull(ip.getAnnotated()); assertFalse(ip.isDelegate()); assertFalse(ip.isTransient()); } @Test public void testMethodParameter() { AnnotatedType<?> type = manager.createAnnotatedType(Library.class); assertEquals(1, type.getMethods().size()); AnnotatedMethod<?> method = type.getMethods().iterator().next(); AnnotatedParameter<?> parameter = method.getParameters().get(2); InjectionPoint ip = manager.createInjectionPoint(parameter); validateParameterizedType(ip.getType(), Book.class, Integer.class); BeanUtilities.verifyQualifierTypes(ip.getQualifiers(), Default.class); assertNull(ip.getBean()); assertEquals(method.getJavaMember(), ip.getMember()); assertNotNull(ip.getAnnotated()); assertFalse(ip.isDelegate()); assertFalse(ip.isTransient()); } private static void validateParameterizedType(Type type, Class<?> rawType, Type... types) { assertTrue(type instanceof ParameterizedType); ParameterizedType parameterized = (ParameterizedType) type; assertEquals(rawType, parameterized.getRawType()); assertTrue(Arrays.equals(types, parameterized.getActualTypeArguments())); } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright 2019 Google LLC ~ ~ 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 ~ ~ https://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <resources> <string name="playstore_tagline">دستیار شما برای پیمایش I/O، چه به‌صورت حضوری شرکت داشته باشید چه از راه دور.</string> <string name="playstore_change">به‌روزرسانی‌شده برای Google I/O 2018‏\n• رزرو صندلی برای رویدادها جلوتر از زما‌ن‌بندی\n• مطالعه اطلاعات مهم درباره «رویداد»، جزئیات «سفر» و سوالات متداول.</string> <string name="playstore_required_permissions">مجوزهای لازم</string> <string name="playstore_optional_permissions">مجوزهای اختیاری</string> <string name="playstore_permission_location_information">اطلاعات مکان: برای نشان دادن نقشه محل برگزاری در اطراف مکان کاربر نیاز است.</string> </resources>
{ "pile_set_name": "Github" }
# 一对一 一对一是一种 A 只包含一个 B 实例,而 B 只包含一个 A 实例的关系。 我们以`User`和`Profile`实体为例。 用户只能拥有一个配置文件,并且一个配置文件仅由一个用户拥有。 ```typescript import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; @Entity() export class Profile { @PrimaryGeneratedColumn() id: number; @Column() gender: string; @Column() photo: string; } ``` ```typescript import { Entity, PrimaryGeneratedColumn, Column, OneToOne, JoinColumn } from "typeorm"; import { Profile } from "./Profile"; @Entity() export class User { @PrimaryGeneratedColumn() id: number; @Column() name: string; @OneToOne(type => Profile) @JoinColumn() profile: Profile; } ``` 这里我们将`@OneToOne`添加到`profile`并将目标关系类型指定为`Profile`。 我们还添加了`@JoinColumn`,这是必选项并且只能在关系的一侧设置。 你设置`@JoinColumn`的哪一方,哪一方的表将包含一个"relation id"和目标实体表的外键。 此示例将生成以下表: ```bash +-------------+--------------+----------------------------+ | profile | +-------------+--------------+----------------------------+ | id | int(11) | PRIMARY KEY AUTO_INCREMENT | | gender | varchar(255) | | | photo | varchar(255) | | +-------------+--------------+----------------------------+ +-------------+--------------+----------------------------+ | user | +-------------+--------------+----------------------------+ | id | int(11) | PRIMARY KEY AUTO_INCREMENT | | name | varchar(255) | | | profileId | int(11) | FOREIGN KEY | +-------------+--------------+----------------------------+ ``` 同样,`@JoinColumn`必须仅设置在关系的一侧且必须在数据库表中具有外键的一侧。 该例子展示如何保存这样的关系: ```typescript const profile = new Profile(); profile.gender = "male"; profile.photo = "me.jpg"; await connection.manager.save(profile); const user = new User(); user.name = "Joe Smith"; user.profile = profile; await connection.manager.save(user); ``` 启用级联后,只需一次`save`调用即可保存此关系。 要加载带有配置文件的用户,必须在`FindOptions`中指定关系: ```typescript const userRepository = connection.getRepository(User); const users = await userRepository.find({ relations: ["profile"] }); ``` 或者使用`QueryBuilder`: ```typescript const users = await connection .getRepository(User) .createQueryBuilder("user") .leftJoinAndSelect("user.profile", "profile") .getMany(); ``` 通过在关系上启用预先加载,你不必指定关系或手动加入,它将始终自动加载。 关系可以是单向的和双向的。 单向是仅在一侧与关系装饰器的关系。 双向是与关系两侧的装饰者的关系。 我们刚刚创建了一个单向关系。 让我们将它改为双向: ```typescript import { Entity, PrimaryGeneratedColumn, Column, OneToOne } from "typeorm"; import { User } from "./User"; @Entity() export class Profile { @PrimaryGeneratedColumn() id: number; @Column() gender: string; @Column() photo: string; @OneToOne(type => User, user => user.profile) // 将另一面指定为第二个参数 user: User; } ``` ```typescript import { Entity, PrimaryGeneratedColumn, Column, OneToOne, JoinColumn } from "typeorm"; import { Profile } from "./Profile"; @Entity() export class User { @PrimaryGeneratedColumn() id: number; @Column() name: string; @OneToOne(type => Profile, profile => profile.user) // 指定另一面作为第二个参数 @JoinColumn() profile: Profile; } ``` 我们只是创建了双向关系。 注意,反向关系没有`@JoinColumn`。 `@JoinColumn`必须只在关系的一侧且拥有外键的表上。 双向关系允许你使用`QueryBuilder`从双方加入关系: ```typescript const profiles = await connection .getRepository(Profile) .createQueryBuilder("profile") .leftJoinAndSelect("profile.user", "user") .getMany(); ```
{ "pile_set_name": "Github" }
/*! * 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. */ @mixin border-image($borders...) { $webkit-borders: (); $spec-borders: (); @each $border in $borders { $webkit-border: (); $spec-border: (); $border-type: type-of($border); @if $border-type == string or list { $border-str: if($border-type == list, nth($border, 1), $border); $url-str: str-slice($border-str, 1, 3); $gradient-type: str-slice($border-str, 1, 6); @if $url-str == "url" { $webkit-border: $border; $spec-border: $border; } @else if $gradient-type == "linear" { $gradients: _linear-gradient-parser("#{$border}"); $webkit-border: map-get($gradients, webkit-image); $spec-border: map-get($gradients, spec-image); } @else if $gradient-type == "radial" { $gradients: _radial-gradient-parser("#{$border}"); $webkit-border: map-get($gradients, webkit-image); $spec-border: map-get($gradients, spec-image); } @else { $webkit-border: $border; $spec-border: $border; } } @else { $webkit-border: $border; $spec-border: $border; } $webkit-borders: append($webkit-borders, $webkit-border, comma); $spec-borders: append($spec-borders, $spec-border, comma); } -webkit-border-image: $webkit-borders; border-image: $spec-borders; border-style: solid; } //Examples: // @include border-image(url("image.png")); // @include border-image(url("image.png") 20 stretch); // @include border-image(linear-gradient(45deg, orange, yellow)); // @include border-image(linear-gradient(45deg, orange, yellow) stretch); // @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round); // @include border-image(radial-gradient(top, cover, orange, yellow, orange));
{ "pile_set_name": "Github" }
#!/usr/bin/env ruby # Encoding: utf-8 # # Copyright:: Copyright 2016, Google Inc. All Rights Reserved. # # License:: 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. # # Updates the shipping settings for the specified account. require_relative "shipping_settings_common" def update_shipping_settings(content_api, merchant_id, account_id) settings = create_sample_shipping_settings content_api.update_shippingsetting( merchant_id, account_id, settings ) do |res, err| if err handle_errors(err) exit end print_shipping_settings(res) end end if __FILE__ == $0 options = ArgParser.parse(ARGV) if ARGV.size > 1 puts "Usage: #{$0} [ACCOUNT_ID]" exit end config, content_api = service_setup(options) if ARGV.empty? account_id = config.merchant_id else account_id = ARGV[0] unless account_id == config.merchant_id.to_s or config.is_mca raise "Non-MCA accounts can only set their own information." end end update_shipping_settings(content_api, config.merchant_id, account_id) end
{ "pile_set_name": "Github" }
/* * Copyright 2009-2010 WSO2, Inc. http://wso2.com * * 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. */ /** * adb_getBindingPolicy.c * * This file was auto-generated from WSDL * by the Apache Axis2/C version: SNAPSHOT Built on : Mar 10, 2008 (08:35:52 GMT+00:00) */ #include "adb_getBindingPolicy.h" /* * implmentation of the getBindingPolicy|http://org.apache.axis2/xsd element */ struct adb_getBindingPolicy { axis2_char_t *property_Type; axutil_qname_t* qname; axis2_char_t* property_serviceName; axis2_bool_t is_valid_serviceName; axis2_char_t* property_bindingName; axis2_bool_t is_valid_bindingName; }; /************************* Private Function prototypes ********************************/ /************************* Function Implmentations ********************************/ adb_getBindingPolicy_t* AXIS2_CALL adb_getBindingPolicy_create( const axutil_env_t *env) { adb_getBindingPolicy_t *_getBindingPolicy = NULL; axutil_qname_t* qname = NULL; AXIS2_ENV_CHECK(env, NULL); _getBindingPolicy = (adb_getBindingPolicy_t *) AXIS2_MALLOC(env-> allocator, sizeof(adb_getBindingPolicy_t)); if(NULL == _getBindingPolicy) { AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); return NULL; } memset(_getBindingPolicy, 0, sizeof(adb_getBindingPolicy_t)); _getBindingPolicy->property_Type = axutil_strdup(env, "adb_getBindingPolicy"); _getBindingPolicy->property_serviceName = NULL; _getBindingPolicy->is_valid_serviceName = AXIS2_FALSE; _getBindingPolicy->property_bindingName = NULL; _getBindingPolicy->is_valid_bindingName = AXIS2_FALSE; qname = axutil_qname_create (env, "getBindingPolicy", "http://org.apache.axis2/xsd", NULL); _getBindingPolicy->qname = qname; return _getBindingPolicy; } adb_getBindingPolicy_t* AXIS2_CALL adb_getBindingPolicy_create_with_values( const axutil_env_t *env, axis2_char_t* _serviceName, axis2_char_t* _bindingName) { adb_getBindingPolicy_t* adb_obj = NULL; axis2_status_t status = AXIS2_SUCCESS; adb_obj = adb_getBindingPolicy_create(env); status = adb_getBindingPolicy_set_serviceName( adb_obj, env, _serviceName); if(status == AXIS2_FAILURE) { adb_getBindingPolicy_free (adb_obj, env); return NULL; } status = adb_getBindingPolicy_set_bindingName( adb_obj, env, _bindingName); if(status == AXIS2_FAILURE) { adb_getBindingPolicy_free (adb_obj, env); return NULL; } return adb_obj; } axis2_char_t* AXIS2_CALL adb_getBindingPolicy_free_popping_value( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { axis2_char_t* value; value = _getBindingPolicy->property_serviceName; _getBindingPolicy->property_serviceName = (axis2_char_t*)NULL; adb_getBindingPolicy_free(_getBindingPolicy, env); return value; } axis2_status_t AXIS2_CALL adb_getBindingPolicy_free( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { return adb_getBindingPolicy_free_obj( _getBindingPolicy, env); } axis2_status_t AXIS2_CALL adb_getBindingPolicy_free_obj( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_FAILURE); if (_getBindingPolicy->property_Type != NULL) { AXIS2_FREE(env->allocator, _getBindingPolicy->property_Type); } adb_getBindingPolicy_reset_serviceName(_getBindingPolicy, env); adb_getBindingPolicy_reset_bindingName(_getBindingPolicy, env); if(_getBindingPolicy->qname) { axutil_qname_free (_getBindingPolicy->qname, env); _getBindingPolicy->qname = NULL; } if(_getBindingPolicy) { AXIS2_FREE(env->allocator, _getBindingPolicy); _getBindingPolicy = NULL; } return AXIS2_SUCCESS; } axis2_status_t AXIS2_CALL adb_getBindingPolicy_deserialize( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env, axiom_node_t **dp_parent, axis2_bool_t *dp_is_early_node_valid, axis2_bool_t dont_care_minoccurs) { return adb_getBindingPolicy_deserialize_obj( _getBindingPolicy, env, dp_parent, dp_is_early_node_valid, dont_care_minoccurs); } axis2_status_t AXIS2_CALL adb_getBindingPolicy_deserialize_obj( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env, axiom_node_t **dp_parent, axis2_bool_t *dp_is_early_node_valid, axis2_bool_t dont_care_minoccurs) { axiom_node_t *parent = *dp_parent; axis2_status_t status = AXIS2_SUCCESS; const axis2_char_t* text_value = NULL; axutil_qname_t *qname = NULL; axutil_qname_t *element_qname = NULL; axiom_node_t *first_node = NULL; axis2_bool_t is_early_node_valid = AXIS2_TRUE; axiom_node_t *current_node = NULL; axiom_element_t *current_element = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_FAILURE); while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT) { parent = axiom_node_get_next_sibling(parent, env); } if (NULL == parent) { /* This should be checked before everything */ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for getBindingPolicy : " "NULL element can not be passed to deserialize"); return AXIS2_FAILURE; } current_element = (axiom_element_t *)axiom_node_get_data_element(parent, env); qname = axiom_element_get_qname(current_element, env, parent); if (axutil_qname_equals(qname, env, _getBindingPolicy-> qname)) { first_node = axiom_node_get_first_child(parent, env); } else { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in building adb object for getBindingPolicy : " "Expected %s but returned %s", axutil_qname_to_string(_getBindingPolicy-> qname, env), axutil_qname_to_string(qname, env)); return AXIS2_FAILURE; } /* * building serviceName element */ current_node = first_node; is_early_node_valid = AXIS2_FALSE; while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, env); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env); qname = axiom_element_get_qname(current_element, env, current_node); } element_qname = axutil_qname_create(env, "serviceName", "http://org.apache.axis2/xsd", NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } text_value = axiom_element_get_text(current_element, env, current_node); if(text_value != NULL) { status = adb_getBindingPolicy_set_serviceName(_getBindingPolicy, env, text_value); } if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for serviceName "); if(element_qname) { axutil_qname_free(element_qname, env); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, env); element_qname = NULL; } /* * building bindingName element */ /* * because elements are ordered this works fine */ if(current_node != NULL && is_early_node_valid) { current_node = axiom_node_get_next_sibling(current_node, env); while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT) { current_node = axiom_node_get_next_sibling(current_node, env); } if(current_node != NULL) { current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env); qname = axiom_element_get_qname(current_element, env, current_node); } } is_early_node_valid = AXIS2_FALSE; element_qname = axutil_qname_create(env, "bindingName", "http://org.apache.axis2/xsd", NULL); if ( (current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))) { if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname))) { is_early_node_valid = AXIS2_TRUE; } text_value = axiom_element_get_text(current_element, env, current_node); if(text_value != NULL) { status = adb_getBindingPolicy_set_bindingName(_getBindingPolicy, env, text_value); } if(AXIS2_FAILURE == status) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for bindingName "); if(element_qname) { axutil_qname_free(element_qname, env); } return AXIS2_FAILURE; } } if(element_qname) { axutil_qname_free(element_qname, env); element_qname = NULL; } return status; } axis2_bool_t AXIS2_CALL adb_getBindingPolicy_is_particle() { return AXIS2_FALSE; } void AXIS2_CALL adb_getBindingPolicy_declare_parent_namespaces( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env, axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index) { /* Here this is an empty function, Nothing to declare */ } axiom_node_t* AXIS2_CALL adb_getBindingPolicy_serialize( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index) { return adb_getBindingPolicy_serialize_obj( _getBindingPolicy, env, parent, parent_element, parent_tag_closed, namespaces, next_ns_index); } axiom_node_t* AXIS2_CALL adb_getBindingPolicy_serialize_obj( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index) { axiom_node_t* current_node = NULL; int tag_closed = 0; axiom_namespace_t *ns1 = NULL; axis2_char_t *qname_uri = NULL; axis2_char_t *qname_prefix = NULL; axis2_char_t *p_prefix = NULL; axis2_bool_t ns_already_defined; axis2_char_t *text_value_1; axis2_char_t *text_value_1_temp; axis2_char_t *text_value_2; axis2_char_t *text_value_2_temp; axis2_char_t *start_input_str = NULL; axis2_char_t *end_input_str = NULL; unsigned int start_input_str_len = 0; unsigned int end_input_str_len = 0; axiom_data_source_t *data_source = NULL; axutil_stream_t *stream = NULL; int next_ns_index_value = 0; AXIS2_ENV_CHECK(env, NULL); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, NULL); namespaces = axutil_hash_make(env); next_ns_index = &next_ns_index_value; ns1 = axiom_namespace_create (env, "http://org.apache.axis2/xsd", "n"); axutil_hash_set(namespaces, "http://org.apache.axis2/xsd", AXIS2_HASH_KEY_STRING, axutil_strdup(env, "n")); parent_element = axiom_element_create (env, NULL, "getBindingPolicy", ns1 , &parent); axiom_element_set_namespace(parent_element, env, ns1, parent); data_source = axiom_data_source_create(env, parent, &current_node); stream = axiom_data_source_get_stream(data_source, env); if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://org.apache.axis2/xsd", AXIS2_HASH_KEY_STRING))) { p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT); sprintf(p_prefix, "n%d", (*next_ns_index)++); axutil_hash_set(namespaces, "http://org.apache.axis2/xsd", AXIS2_HASH_KEY_STRING, p_prefix); axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env, "http://org.apache.axis2/xsd", p_prefix)); } if (!_getBindingPolicy->is_valid_serviceName) { /* no need to complain for minoccurs=0 element */ } else { start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (4 + axutil_strlen(p_prefix) + axutil_strlen("serviceName"))); /* axutil_strlen("<:>") + 1 = 4 */ end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (5 + axutil_strlen(p_prefix) + axutil_strlen("serviceName"))); /* axutil_strlen("</:>") + 1 = 5 */ /* * parsing serviceName element */ sprintf(start_input_str, "<%s%sserviceName>", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); start_input_str_len = axutil_strlen(start_input_str); sprintf(end_input_str, "</%s%sserviceName>", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); end_input_str_len = axutil_strlen(end_input_str); text_value_1 = _getBindingPolicy->property_serviceName; axutil_stream_write(stream, env, start_input_str, start_input_str_len); text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE); if (text_value_1_temp) { axutil_stream_write(stream, env, text_value_1_temp, axutil_strlen(text_value_1_temp)); AXIS2_FREE(env->allocator, text_value_1_temp); } else { axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1)); } axutil_stream_write(stream, env, end_input_str, end_input_str_len); AXIS2_FREE(env->allocator,start_input_str); AXIS2_FREE(env->allocator,end_input_str); } if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://org.apache.axis2/xsd", AXIS2_HASH_KEY_STRING))) { p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT); sprintf(p_prefix, "n%d", (*next_ns_index)++); axutil_hash_set(namespaces, "http://org.apache.axis2/xsd", AXIS2_HASH_KEY_STRING, p_prefix); axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env, "http://org.apache.axis2/xsd", p_prefix)); } if (!_getBindingPolicy->is_valid_bindingName) { /* no need to complain for minoccurs=0 element */ } else { start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (4 + axutil_strlen(p_prefix) + axutil_strlen("bindingName"))); /* axutil_strlen("<:>") + 1 = 4 */ end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (5 + axutil_strlen(p_prefix) + axutil_strlen("bindingName"))); /* axutil_strlen("</:>") + 1 = 5 */ /* * parsing bindingName element */ sprintf(start_input_str, "<%s%sbindingName>", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); start_input_str_len = axutil_strlen(start_input_str); sprintf(end_input_str, "</%s%sbindingName>", p_prefix?p_prefix:"", (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); end_input_str_len = axutil_strlen(end_input_str); text_value_2 = _getBindingPolicy->property_bindingName; axutil_stream_write(stream, env, start_input_str, start_input_str_len); text_value_2_temp = axutil_xml_quote_string(env, text_value_2, AXIS2_TRUE); if (text_value_2_temp) { axutil_stream_write(stream, env, text_value_2_temp, axutil_strlen(text_value_2_temp)); AXIS2_FREE(env->allocator, text_value_2_temp); } else { axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2)); } axutil_stream_write(stream, env, end_input_str, end_input_str_len); AXIS2_FREE(env->allocator,start_input_str); AXIS2_FREE(env->allocator,end_input_str); } if(namespaces) { axutil_hash_index_t *hi; void *val; for (hi = axutil_hash_first(namespaces, env); hi; hi = axutil_hash_next(env, hi)) { axutil_hash_this(hi, NULL, NULL, &val); AXIS2_FREE(env->allocator, val); } axutil_hash_free(namespaces, env); } return parent; } /** * Getter for serviceName by Property Number 1 */ axis2_char_t* AXIS2_CALL adb_getBindingPolicy_get_property1( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { return adb_getBindingPolicy_get_serviceName(_getBindingPolicy, env); } /** * getter for serviceName. */ axis2_char_t* AXIS2_CALL adb_getBindingPolicy_get_serviceName( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { AXIS2_ENV_CHECK(env, NULL); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, NULL); return _getBindingPolicy->property_serviceName; } /** * setter for serviceName */ axis2_status_t AXIS2_CALL adb_getBindingPolicy_set_serviceName( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env, const axis2_char_t* arg_serviceName) { AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_FAILURE); if(_getBindingPolicy->is_valid_serviceName && arg_serviceName == _getBindingPolicy->property_serviceName) { return AXIS2_SUCCESS; } adb_getBindingPolicy_reset_serviceName(_getBindingPolicy, env); if(NULL == arg_serviceName) { /* We are already done */ return AXIS2_SUCCESS; } _getBindingPolicy->property_serviceName = (axis2_char_t *)axutil_strdup(env, arg_serviceName); if(NULL == _getBindingPolicy->property_serviceName) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for serviceName"); return AXIS2_FAILURE; } _getBindingPolicy->is_valid_serviceName = AXIS2_TRUE; return AXIS2_SUCCESS; } /** * resetter for serviceName */ axis2_status_t AXIS2_CALL adb_getBindingPolicy_reset_serviceName( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { int i = 0; int count = 0; void *element = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_FAILURE); if(_getBindingPolicy->property_serviceName != NULL) { AXIS2_FREE(env-> allocator, _getBindingPolicy->property_serviceName); _getBindingPolicy->property_serviceName = NULL; } _getBindingPolicy->is_valid_serviceName = AXIS2_FALSE; return AXIS2_SUCCESS; } /** * Check whether serviceName is nill */ axis2_bool_t AXIS2_CALL adb_getBindingPolicy_is_serviceName_nil( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { AXIS2_ENV_CHECK(env, AXIS2_TRUE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_TRUE); return !_getBindingPolicy->is_valid_serviceName; } /** * Set serviceName to nill (currently the same as reset) */ axis2_status_t AXIS2_CALL adb_getBindingPolicy_set_serviceName_nil( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { return adb_getBindingPolicy_reset_serviceName(_getBindingPolicy, env); } /** * Getter for bindingName by Property Number 2 */ axis2_char_t* AXIS2_CALL adb_getBindingPolicy_get_property2( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { return adb_getBindingPolicy_get_bindingName(_getBindingPolicy, env); } /** * getter for bindingName. */ axis2_char_t* AXIS2_CALL adb_getBindingPolicy_get_bindingName( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { AXIS2_ENV_CHECK(env, NULL); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, NULL); return _getBindingPolicy->property_bindingName; } /** * setter for bindingName */ axis2_status_t AXIS2_CALL adb_getBindingPolicy_set_bindingName( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env, const axis2_char_t* arg_bindingName) { AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_FAILURE); if(_getBindingPolicy->is_valid_bindingName && arg_bindingName == _getBindingPolicy->property_bindingName) { return AXIS2_SUCCESS; } adb_getBindingPolicy_reset_bindingName(_getBindingPolicy, env); if(NULL == arg_bindingName) { /* We are already done */ return AXIS2_SUCCESS; } _getBindingPolicy->property_bindingName = (axis2_char_t *)axutil_strdup(env, arg_bindingName); if(NULL == _getBindingPolicy->property_bindingName) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for bindingName"); return AXIS2_FAILURE; } _getBindingPolicy->is_valid_bindingName = AXIS2_TRUE; return AXIS2_SUCCESS; } /** * resetter for bindingName */ axis2_status_t AXIS2_CALL adb_getBindingPolicy_reset_bindingName( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { int i = 0; int count = 0; void *element = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_FAILURE); if(_getBindingPolicy->property_bindingName != NULL) { AXIS2_FREE(env-> allocator, _getBindingPolicy->property_bindingName); _getBindingPolicy->property_bindingName = NULL; } _getBindingPolicy->is_valid_bindingName = AXIS2_FALSE; return AXIS2_SUCCESS; } /** * Check whether bindingName is nill */ axis2_bool_t AXIS2_CALL adb_getBindingPolicy_is_bindingName_nil( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { AXIS2_ENV_CHECK(env, AXIS2_TRUE); AXIS2_PARAM_CHECK(env->error, _getBindingPolicy, AXIS2_TRUE); return !_getBindingPolicy->is_valid_bindingName; } /** * Set bindingName to nill (currently the same as reset) */ axis2_status_t AXIS2_CALL adb_getBindingPolicy_set_bindingName_nil( adb_getBindingPolicy_t* _getBindingPolicy, const axutil_env_t *env) { return adb_getBindingPolicy_reset_bindingName(_getBindingPolicy, env); }
{ "pile_set_name": "Github" }
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package firehose const ( // ErrCodeConcurrentModificationException for service response error code // "ConcurrentModificationException". // // Another modification has already happened. Fetch VersionId again and use // it to update the destination. ErrCodeConcurrentModificationException = "ConcurrentModificationException" // ErrCodeInvalidArgumentException for service response error code // "InvalidArgumentException". // // The specified input parameter has an value that is not valid. ErrCodeInvalidArgumentException = "InvalidArgumentException" // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // // You have already reached the limit for a requested resource. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // // The resource is already in use and not available for this operation. ErrCodeResourceInUseException = "ResourceInUseException" // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // // The specified resource could not be found. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // // The service is unavailable, back off and retry the operation. If you continue // to see the exception, throughput limits for the delivery stream may have // been exceeded. For more information about limits and how to request an increase, // see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). ErrCodeServiceUnavailableException = "ServiceUnavailableException" )
{ "pile_set_name": "Github" }
//////////////////////////////////////////////////////////////////////////////// // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// { "config": "royale", "compilerOptions": { "debug": false, "targets": ["JSRoyale"], "source-map": true, "html-template": "src/main/resources/jewel-example-index-template.html", "theme": "${royalelib}/themes/Jewel-Light-NoFlat-Primary-Blue-Theme/src/main/resources/defaults.css" }, "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions", "files": [ "src/main/royale/BE0007_Selecting_options_from_a_group_of_jewel_checkbox_controls.mxml" ] }
{ "pile_set_name": "Github" }
// Copyright 2013 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "syzygy/integration_tests/integration_tests_dll.h" #include <windows.h> // NOLINT #include <stdint.h> #include "syzygy/integration_tests/asan_check_tests.h" #include "syzygy/integration_tests/asan_interceptors_tests.h" #include "syzygy/integration_tests/asan_page_protection_tests.h" #ifndef __clang__ #include "syzygy/integration_tests/bb_entry_tests.h" #include "syzygy/integration_tests/behavior_tests.h" #include "syzygy/integration_tests/coverage_tests.h" #include "syzygy/integration_tests/profile_tests.h" #endif // __clang__ #include "syzygy/integration_tests/deferred_free_tests.h" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) { return TRUE; } unsigned int CALLBACK EndToEndTest(testing::EndToEndTestId test) { switch (test) { #define DECLARE_END_TO_END_SWITCH_TABLE(enum_name, function_to_call) \ case testing::enum_name: { \ return function_to_call(); \ } END_TO_END_TEST_ID_TABLE(DECLARE_END_TO_END_SWITCH_TABLE) #undef DECLARE_END_TO_END_SWITCH_TABLE default: return 0; } }
{ "pile_set_name": "Github" }
/// /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// /// Auto-generated by Stone, do not modify. /// #import <Foundation/Foundation.h> #import "DBSerializableProtocol.h" @class DBFILEPROPERTIESPropertyGroup; @class DBFILESCommitInfo; @class DBFILESWriteMode; NS_ASSUME_NONNULL_BEGIN #pragma mark - API Object /// /// The `CommitInfo` struct. /// /// This class implements the `DBSerializable` protocol (serialize and /// deserialize instance methods), which is required for all Obj-C SDK API route /// objects. /// @interface DBFILESCommitInfo : NSObject <DBSerializable, NSCopying> #pragma mark - Instance fields /// Path in the user's Dropbox to save the file. @property (nonatomic, readonly, copy) NSString *path; /// Selects what to do if the file already exists. @property (nonatomic, readonly) DBFILESWriteMode *mode; /// If there's a conflict, as determined by mode, have the Dropbox server try to /// autorename the file to avoid conflict. @property (nonatomic, readonly) NSNumber *autorename; /// The value to store as the clientModified timestamp. Dropbox automatically /// records the time at which the file was written to the Dropbox servers. It /// can also record an additional timestamp, provided by Dropbox desktop /// clients, mobile clients, and API apps of when the file was actually created /// or modified. @property (nonatomic, readonly, nullable) NSDate *clientModified; /// Normally, users are made aware of any file modifications in their Dropbox /// account via notifications in the client software. If true, this tells the /// clients that this modification shouldn't result in a user notification. @property (nonatomic, readonly) NSNumber *mute; /// List of custom properties to add to file. @property (nonatomic, readonly, nullable) NSArray<DBFILEPROPERTIESPropertyGroup *> *propertyGroups; /// Be more strict about how each WriteMode detects conflict. For example, /// always return a conflict error when mode = `update` in `DBFILESWriteMode` /// and the given "rev" doesn't match the existing file's "rev", even if the /// existing file has been deleted. @property (nonatomic, readonly) NSNumber *strictConflict; #pragma mark - Constructors /// /// Full constructor for the struct (exposes all instance variables). /// /// @param path Path in the user's Dropbox to save the file. /// @param mode Selects what to do if the file already exists. /// @param autorename If there's a conflict, as determined by mode, have the /// Dropbox server try to autorename the file to avoid conflict. /// @param clientModified The value to store as the clientModified timestamp. /// Dropbox automatically records the time at which the file was written to the /// Dropbox servers. It can also record an additional timestamp, provided by /// Dropbox desktop clients, mobile clients, and API apps of when the file was /// actually created or modified. /// @param mute Normally, users are made aware of any file modifications in /// their Dropbox account via notifications in the client software. If true, /// this tells the clients that this modification shouldn't result in a user /// notification. /// @param propertyGroups List of custom properties to add to file. /// @param strictConflict Be more strict about how each WriteMode detects /// conflict. For example, always return a conflict error when mode = `update` /// in `DBFILESWriteMode` and the given "rev" doesn't match the existing file's /// "rev", even if the existing file has been deleted. /// /// @return An initialized instance. /// - (instancetype)initWithPath:(NSString *)path mode:(nullable DBFILESWriteMode *)mode autorename:(nullable NSNumber *)autorename clientModified:(nullable NSDate *)clientModified mute:(nullable NSNumber *)mute propertyGroups:(nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups strictConflict:(nullable NSNumber *)strictConflict; /// /// Convenience constructor (exposes only non-nullable instance variables with /// no default value). /// /// @param path Path in the user's Dropbox to save the file. /// /// @return An initialized instance. /// - (instancetype)initWithPath:(NSString *)path; - (instancetype)init NS_UNAVAILABLE; @end #pragma mark - Serializer Object /// /// The serialization class for the `CommitInfo` struct. /// @interface DBFILESCommitInfoSerializer : NSObject /// /// Serializes `DBFILESCommitInfo` instances. /// /// @param instance An instance of the `DBFILESCommitInfo` API object. /// /// @return A json-compatible dictionary representation of the /// `DBFILESCommitInfo` API object. /// + (nullable NSDictionary<NSString *, id> *)serialize:(DBFILESCommitInfo *)instance; /// /// Deserializes `DBFILESCommitInfo` instances. /// /// @param dict A json-compatible dictionary representation of the /// `DBFILESCommitInfo` API object. /// /// @return An instantiation of the `DBFILESCommitInfo` object. /// + (DBFILESCommitInfo *)deserialize:(NSDictionary<NSString *, id> *)dict; @end NS_ASSUME_NONNULL_END
{ "pile_set_name": "Github" }
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.06.11 at 10:33:54 AM PDT // package com.sun.identity.liberty.ws.common.jaxb.ac; /** * Java content class for KeySharingType complex type. * <p>The following schema fragment specifies the expected content contained within this java content object. (defined at file:/Users/allan/A-SVN/trunk/opensso/products/federation/library/xsd/liberty/lib-arch-authentication-context.xsd line 590) * <p> * <pre> * &lt;complexType name="KeySharingType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="sharing" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * */ public interface KeySharingType { /** * Gets the value of the sharing property. * */ boolean isSharing(); /** * Sets the value of the sharing property. * */ void setSharing(boolean value); }
{ "pile_set_name": "Github" }
/** * Copyright © 2019 同程艺龙 (zhihui.li@ly.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * */ package com.ly.train.flower.registry; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import com.ly.train.flower.common.core.config.FlowConfig; import com.ly.train.flower.common.logging.Logger; import com.ly.train.flower.common.logging.LoggerFactory; import com.ly.train.flower.common.util.StringUtil; import com.ly.train.flower.common.util.URL; import com.ly.train.flower.common.util.concurrent.NamedThreadFactory; import com.ly.train.flower.registry.config.ServiceInfo; /** * @author leeyazhou * */ public abstract class AbstractRegistry implements Registry { protected final Logger logger = LoggerFactory.getLogger(getClass()); protected final ConcurrentMap<String, ServiceInfo> serviceInfoCache = new ConcurrentHashMap<>(); protected final ConcurrentMap<String, FlowConfig> flowConfigCache = new ConcurrentHashMap<>(); private static final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("flower-registry")); protected final String infoRoot = "flower:info"; protected final String configRoot = "flower:config"; protected final URL url; public AbstractRegistry(URL url) { this.url = url; executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { try { doRegisterServiceInfos(); List<ServiceInfo> tt = doGetProvider(null); if (tt != null && !tt.isEmpty()) { for (ServiceInfo info : tt) { serviceInfoCache.put(info.getServiceMeta().getServiceClassName(), info); } } List<FlowConfig> t2 = doGetFlowConfig(null); if (t2 != null && !t2.isEmpty()) { for (FlowConfig info : t2) { if (StringUtil.isNotBlank(info.getFlowName())) { flowConfigCache.put(info.getFlowName(), info); } } } } catch (Exception e) { logger.error("", e); } } }, 5L, 3L, TimeUnit.SECONDS); } @Override public boolean register(ServiceInfo serviceInfo) { serviceInfoCache.putIfAbsent(serviceInfo.getServiceMeta().getServiceClassName(), serviceInfo); return doRegister(serviceInfo); } @Override public List<ServiceInfo> getProvider(ServiceInfo serviceInfo) { List<ServiceInfo> ret = doGetProvider(serviceInfo); if (ret != null) { for (ServiceInfo i : ret) { serviceInfoCache.put(i.getServiceMeta().getServiceClassName(), i); } } return new ArrayList<ServiceInfo>(serviceInfoCache.values()); } private void doRegisterServiceInfos() { for (Map.Entry<String, ServiceInfo> entry : serviceInfoCache.entrySet()) { doRegister(entry.getValue()); } } @Override public URL getUrl() { return url; } @Override public boolean registerFlowConfig(FlowConfig flowConfig) { flowConfigCache.put(flowConfig.getFlowName(), flowConfig); return doRegisterFlowConfig(flowConfig); } @Override public List<FlowConfig> getFlowConfig(FlowConfig flowConfig) { List<FlowConfig> ret = doGetFlowConfig(flowConfig); if (ret != null) { for (FlowConfig i : ret) { if (StringUtil.isNotBlank(i.getFlowName())) { flowConfigCache.put(i.getFlowName(), i); } } } return new ArrayList<FlowConfig>(flowConfigCache.values()); } public abstract boolean doRegister(ServiceInfo serviceInfo); public abstract List<ServiceInfo> doGetProvider(ServiceInfo serviceInfo); public abstract boolean doRegisterFlowConfig(FlowConfig flowConfig); public abstract List<FlowConfig> doGetFlowConfig(FlowConfig flowConfig); }
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <configuration> <property> <name>mapreduce.job.split.metainfo.maxsize</name> <value>-1</value> <description>The maximum permissible size of the split metainfo file. The JobTracker won't attempt to read split metainfo files bigger than the configured value. No limits if set to -1. </description> </property> <property> <name>mapreduce.map.maxattempts</name> <value>2</value> </property> <property> <name>mapreduce.map.output.compress</name> <value>true</value> <description>Compress map outputs</description> </property> <property> <name>mapreduce.map.output.compress.codec</name> <value>org.apache.hadoop.io.compress.SnappyCodec</value> <description>The compression codec to use for map outputs </description> </property> <property> <name>mapreduce.output.fileoutputformat.compress</name> <value>true</value> <description>Compress the output of a MapReduce job</description> </property> <property> <name>mapreduce.output.fileoutputformat.compress.codec</name> <value>org.apache.hadoop.io.compress.SnappyCodec</value> <description>The compression codec to use for job outputs </description> </property> <!-- <property> <name>mapreduce.output.fileoutputformat.compress.type</name> <value>BLOCK</value> <description>The compression type to use for job outputs</description> </property> --> <property> <name>mapreduce.job.max.split.locations</name> <value>2000</value> <description>No description</description> </property> <property> <name>dfs.replication</name> <value>2</value> <description>Block replication</description> </property> <!-- memory configuration for sandbox --> <property> <name>mapreduce.map.memory.mb</name> <value>384</value> </property> <property> <name>mapreduce.map.java.opts</name> <value>-Xmx350m</value> </property> <property> <name>mapreduce.task.io.sort.mb</name> <value>30</value> </property> <property> <name>mapreduce.reduce.memory.mb</name> <value>384</value> </property> <property> <name>mapreduce.reduce.java.opts</name> <value>-Xmx350m</value> </property> </configuration>
{ "pile_set_name": "Github" }
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. package language // NumCompactTags is the number of common tags. The maximum tag is // NumCompactTags-1. const NumCompactTags = 768 var specialTags = []Tag{ // 2 elements 0: {lang: 0xd7, region: 0x6e, script: 0x0, pVariant: 0x5, pExt: 0xe, str: "ca-ES-valencia"}, 1: {lang: 0x139, region: 0x135, script: 0x0, pVariant: 0x5, pExt: 0x5, str: "en-US-u-va-posix"}, } // Size: 72 bytes var coreTags = map[uint32]uint16{ 0x0: 0, // und 0x01600000: 3, // af 0x016000d2: 4, // af-NA 0x01600161: 5, // af-ZA 0x01c00000: 6, // agq 0x01c00052: 7, // agq-CM 0x02100000: 8, // ak 0x02100080: 9, // ak-GH 0x02700000: 10, // am 0x0270006f: 11, // am-ET 0x03a00000: 12, // ar 0x03a00001: 13, // ar-001 0x03a00023: 14, // ar-AE 0x03a00039: 15, // ar-BH 0x03a00062: 16, // ar-DJ 0x03a00067: 17, // ar-DZ 0x03a0006b: 18, // ar-EG 0x03a0006c: 19, // ar-EH 0x03a0006d: 20, // ar-ER 0x03a00097: 21, // ar-IL 0x03a0009b: 22, // ar-IQ 0x03a000a1: 23, // ar-JO 0x03a000a8: 24, // ar-KM 0x03a000ac: 25, // ar-KW 0x03a000b0: 26, // ar-LB 0x03a000b9: 27, // ar-LY 0x03a000ba: 28, // ar-MA 0x03a000c9: 29, // ar-MR 0x03a000e1: 30, // ar-OM 0x03a000ed: 31, // ar-PS 0x03a000f3: 32, // ar-QA 0x03a00108: 33, // ar-SA 0x03a0010b: 34, // ar-SD 0x03a00115: 35, // ar-SO 0x03a00117: 36, // ar-SS 0x03a0011c: 37, // ar-SY 0x03a00120: 38, // ar-TD 0x03a00128: 39, // ar-TN 0x03a0015e: 40, // ar-YE 0x04000000: 41, // ars 0x04300000: 42, // as 0x04300099: 43, // as-IN 0x04400000: 44, // asa 0x0440012f: 45, // asa-TZ 0x04800000: 46, // ast 0x0480006e: 47, // ast-ES 0x05800000: 48, // az 0x0581f000: 49, // az-Cyrl 0x0581f032: 50, // az-Cyrl-AZ 0x05857000: 51, // az-Latn 0x05857032: 52, // az-Latn-AZ 0x05e00000: 53, // bas 0x05e00052: 54, // bas-CM 0x07100000: 55, // be 0x07100047: 56, // be-BY 0x07500000: 57, // bem 0x07500162: 58, // bem-ZM 0x07900000: 59, // bez 0x0790012f: 60, // bez-TZ 0x07e00000: 61, // bg 0x07e00038: 62, // bg-BG 0x08200000: 63, // bh 0x0a000000: 64, // bm 0x0a0000c3: 65, // bm-ML 0x0a500000: 66, // bn 0x0a500035: 67, // bn-BD 0x0a500099: 68, // bn-IN 0x0a900000: 69, // bo 0x0a900053: 70, // bo-CN 0x0a900099: 71, // bo-IN 0x0b200000: 72, // br 0x0b200078: 73, // br-FR 0x0b500000: 74, // brx 0x0b500099: 75, // brx-IN 0x0b700000: 76, // bs 0x0b71f000: 77, // bs-Cyrl 0x0b71f033: 78, // bs-Cyrl-BA 0x0b757000: 79, // bs-Latn 0x0b757033: 80, // bs-Latn-BA 0x0d700000: 81, // ca 0x0d700022: 82, // ca-AD 0x0d70006e: 83, // ca-ES 0x0d700078: 84, // ca-FR 0x0d70009e: 85, // ca-IT 0x0db00000: 86, // ccp 0x0db00035: 87, // ccp-BD 0x0db00099: 88, // ccp-IN 0x0dc00000: 89, // ce 0x0dc00106: 90, // ce-RU 0x0df00000: 91, // cgg 0x0df00131: 92, // cgg-UG 0x0e500000: 93, // chr 0x0e500135: 94, // chr-US 0x0e900000: 95, // ckb 0x0e90009b: 96, // ckb-IQ 0x0e90009c: 97, // ckb-IR 0x0fa00000: 98, // cs 0x0fa0005e: 99, // cs-CZ 0x0fe00000: 100, // cu 0x0fe00106: 101, // cu-RU 0x10000000: 102, // cy 0x1000007b: 103, // cy-GB 0x10100000: 104, // da 0x10100063: 105, // da-DK 0x10100082: 106, // da-GL 0x10800000: 107, // dav 0x108000a4: 108, // dav-KE 0x10d00000: 109, // de 0x10d0002e: 110, // de-AT 0x10d00036: 111, // de-BE 0x10d0004e: 112, // de-CH 0x10d00060: 113, // de-DE 0x10d0009e: 114, // de-IT 0x10d000b2: 115, // de-LI 0x10d000b7: 116, // de-LU 0x11700000: 117, // dje 0x117000d4: 118, // dje-NE 0x11f00000: 119, // dsb 0x11f00060: 120, // dsb-DE 0x12400000: 121, // dua 0x12400052: 122, // dua-CM 0x12800000: 123, // dv 0x12b00000: 124, // dyo 0x12b00114: 125, // dyo-SN 0x12d00000: 126, // dz 0x12d00043: 127, // dz-BT 0x12f00000: 128, // ebu 0x12f000a4: 129, // ebu-KE 0x13000000: 130, // ee 0x13000080: 131, // ee-GH 0x13000122: 132, // ee-TG 0x13600000: 133, // el 0x1360005d: 134, // el-CY 0x13600087: 135, // el-GR 0x13900000: 136, // en 0x13900001: 137, // en-001 0x1390001a: 138, // en-150 0x13900025: 139, // en-AG 0x13900026: 140, // en-AI 0x1390002d: 141, // en-AS 0x1390002e: 142, // en-AT 0x1390002f: 143, // en-AU 0x13900034: 144, // en-BB 0x13900036: 145, // en-BE 0x1390003a: 146, // en-BI 0x1390003d: 147, // en-BM 0x13900042: 148, // en-BS 0x13900046: 149, // en-BW 0x13900048: 150, // en-BZ 0x13900049: 151, // en-CA 0x1390004a: 152, // en-CC 0x1390004e: 153, // en-CH 0x13900050: 154, // en-CK 0x13900052: 155, // en-CM 0x1390005c: 156, // en-CX 0x1390005d: 157, // en-CY 0x13900060: 158, // en-DE 0x13900061: 159, // en-DG 0x13900063: 160, // en-DK 0x13900064: 161, // en-DM 0x1390006d: 162, // en-ER 0x13900072: 163, // en-FI 0x13900073: 164, // en-FJ 0x13900074: 165, // en-FK 0x13900075: 166, // en-FM 0x1390007b: 167, // en-GB 0x1390007c: 168, // en-GD 0x1390007f: 169, // en-GG 0x13900080: 170, // en-GH 0x13900081: 171, // en-GI 0x13900083: 172, // en-GM 0x1390008a: 173, // en-GU 0x1390008c: 174, // en-GY 0x1390008d: 175, // en-HK 0x13900096: 176, // en-IE 0x13900097: 177, // en-IL 0x13900098: 178, // en-IM 0x13900099: 179, // en-IN 0x1390009a: 180, // en-IO 0x1390009f: 181, // en-JE 0x139000a0: 182, // en-JM 0x139000a4: 183, // en-KE 0x139000a7: 184, // en-KI 0x139000a9: 185, // en-KN 0x139000ad: 186, // en-KY 0x139000b1: 187, // en-LC 0x139000b4: 188, // en-LR 0x139000b5: 189, // en-LS 0x139000bf: 190, // en-MG 0x139000c0: 191, // en-MH 0x139000c6: 192, // en-MO 0x139000c7: 193, // en-MP 0x139000ca: 194, // en-MS 0x139000cb: 195, // en-MT 0x139000cc: 196, // en-MU 0x139000ce: 197, // en-MW 0x139000d0: 198, // en-MY 0x139000d2: 199, // en-NA 0x139000d5: 200, // en-NF 0x139000d6: 201, // en-NG 0x139000d9: 202, // en-NL 0x139000dd: 203, // en-NR 0x139000df: 204, // en-NU 0x139000e0: 205, // en-NZ 0x139000e6: 206, // en-PG 0x139000e7: 207, // en-PH 0x139000e8: 208, // en-PK 0x139000eb: 209, // en-PN 0x139000ec: 210, // en-PR 0x139000f0: 211, // en-PW 0x13900107: 212, // en-RW 0x13900109: 213, // en-SB 0x1390010a: 214, // en-SC 0x1390010b: 215, // en-SD 0x1390010c: 216, // en-SE 0x1390010d: 217, // en-SG 0x1390010e: 218, // en-SH 0x1390010f: 219, // en-SI 0x13900112: 220, // en-SL 0x13900117: 221, // en-SS 0x1390011b: 222, // en-SX 0x1390011d: 223, // en-SZ 0x1390011f: 224, // en-TC 0x13900125: 225, // en-TK 0x13900129: 226, // en-TO 0x1390012c: 227, // en-TT 0x1390012d: 228, // en-TV 0x1390012f: 229, // en-TZ 0x13900131: 230, // en-UG 0x13900133: 231, // en-UM 0x13900135: 232, // en-US 0x13900139: 233, // en-VC 0x1390013c: 234, // en-VG 0x1390013d: 235, // en-VI 0x1390013f: 236, // en-VU 0x13900142: 237, // en-WS 0x13900161: 238, // en-ZA 0x13900162: 239, // en-ZM 0x13900164: 240, // en-ZW 0x13c00000: 241, // eo 0x13c00001: 242, // eo-001 0x13e00000: 243, // es 0x13e0001f: 244, // es-419 0x13e0002c: 245, // es-AR 0x13e0003f: 246, // es-BO 0x13e00041: 247, // es-BR 0x13e00048: 248, // es-BZ 0x13e00051: 249, // es-CL 0x13e00054: 250, // es-CO 0x13e00056: 251, // es-CR 0x13e00059: 252, // es-CU 0x13e00065: 253, // es-DO 0x13e00068: 254, // es-EA 0x13e00069: 255, // es-EC 0x13e0006e: 256, // es-ES 0x13e00086: 257, // es-GQ 0x13e00089: 258, // es-GT 0x13e0008f: 259, // es-HN 0x13e00094: 260, // es-IC 0x13e000cf: 261, // es-MX 0x13e000d8: 262, // es-NI 0x13e000e2: 263, // es-PA 0x13e000e4: 264, // es-PE 0x13e000e7: 265, // es-PH 0x13e000ec: 266, // es-PR 0x13e000f1: 267, // es-PY 0x13e0011a: 268, // es-SV 0x13e00135: 269, // es-US 0x13e00136: 270, // es-UY 0x13e0013b: 271, // es-VE 0x14000000: 272, // et 0x1400006a: 273, // et-EE 0x14500000: 274, // eu 0x1450006e: 275, // eu-ES 0x14600000: 276, // ewo 0x14600052: 277, // ewo-CM 0x14800000: 278, // fa 0x14800024: 279, // fa-AF 0x1480009c: 280, // fa-IR 0x14e00000: 281, // ff 0x14e00052: 282, // ff-CM 0x14e00084: 283, // ff-GN 0x14e000c9: 284, // ff-MR 0x14e00114: 285, // ff-SN 0x15100000: 286, // fi 0x15100072: 287, // fi-FI 0x15300000: 288, // fil 0x153000e7: 289, // fil-PH 0x15800000: 290, // fo 0x15800063: 291, // fo-DK 0x15800076: 292, // fo-FO 0x15e00000: 293, // fr 0x15e00036: 294, // fr-BE 0x15e00037: 295, // fr-BF 0x15e0003a: 296, // fr-BI 0x15e0003b: 297, // fr-BJ 0x15e0003c: 298, // fr-BL 0x15e00049: 299, // fr-CA 0x15e0004b: 300, // fr-CD 0x15e0004c: 301, // fr-CF 0x15e0004d: 302, // fr-CG 0x15e0004e: 303, // fr-CH 0x15e0004f: 304, // fr-CI 0x15e00052: 305, // fr-CM 0x15e00062: 306, // fr-DJ 0x15e00067: 307, // fr-DZ 0x15e00078: 308, // fr-FR 0x15e0007a: 309, // fr-GA 0x15e0007e: 310, // fr-GF 0x15e00084: 311, // fr-GN 0x15e00085: 312, // fr-GP 0x15e00086: 313, // fr-GQ 0x15e00091: 314, // fr-HT 0x15e000a8: 315, // fr-KM 0x15e000b7: 316, // fr-LU 0x15e000ba: 317, // fr-MA 0x15e000bb: 318, // fr-MC 0x15e000be: 319, // fr-MF 0x15e000bf: 320, // fr-MG 0x15e000c3: 321, // fr-ML 0x15e000c8: 322, // fr-MQ 0x15e000c9: 323, // fr-MR 0x15e000cc: 324, // fr-MU 0x15e000d3: 325, // fr-NC 0x15e000d4: 326, // fr-NE 0x15e000e5: 327, // fr-PF 0x15e000ea: 328, // fr-PM 0x15e00102: 329, // fr-RE 0x15e00107: 330, // fr-RW 0x15e0010a: 331, // fr-SC 0x15e00114: 332, // fr-SN 0x15e0011c: 333, // fr-SY 0x15e00120: 334, // fr-TD 0x15e00122: 335, // fr-TG 0x15e00128: 336, // fr-TN 0x15e0013f: 337, // fr-VU 0x15e00140: 338, // fr-WF 0x15e0015f: 339, // fr-YT 0x16900000: 340, // fur 0x1690009e: 341, // fur-IT 0x16d00000: 342, // fy 0x16d000d9: 343, // fy-NL 0x16e00000: 344, // ga 0x16e00096: 345, // ga-IE 0x17e00000: 346, // gd 0x17e0007b: 347, // gd-GB 0x19000000: 348, // gl 0x1900006e: 349, // gl-ES 0x1a300000: 350, // gsw 0x1a30004e: 351, // gsw-CH 0x1a300078: 352, // gsw-FR 0x1a3000b2: 353, // gsw-LI 0x1a400000: 354, // gu 0x1a400099: 355, // gu-IN 0x1a900000: 356, // guw 0x1ab00000: 357, // guz 0x1ab000a4: 358, // guz-KE 0x1ac00000: 359, // gv 0x1ac00098: 360, // gv-IM 0x1b400000: 361, // ha 0x1b400080: 362, // ha-GH 0x1b4000d4: 363, // ha-NE 0x1b4000d6: 364, // ha-NG 0x1b800000: 365, // haw 0x1b800135: 366, // haw-US 0x1bc00000: 367, // he 0x1bc00097: 368, // he-IL 0x1be00000: 369, // hi 0x1be00099: 370, // hi-IN 0x1d100000: 371, // hr 0x1d100033: 372, // hr-BA 0x1d100090: 373, // hr-HR 0x1d200000: 374, // hsb 0x1d200060: 375, // hsb-DE 0x1d500000: 376, // hu 0x1d500092: 377, // hu-HU 0x1d700000: 378, // hy 0x1d700028: 379, // hy-AM 0x1e100000: 380, // id 0x1e100095: 381, // id-ID 0x1e700000: 382, // ig 0x1e7000d6: 383, // ig-NG 0x1ea00000: 384, // ii 0x1ea00053: 385, // ii-CN 0x1f500000: 386, // io 0x1f800000: 387, // is 0x1f80009d: 388, // is-IS 0x1f900000: 389, // it 0x1f90004e: 390, // it-CH 0x1f90009e: 391, // it-IT 0x1f900113: 392, // it-SM 0x1f900138: 393, // it-VA 0x1fa00000: 394, // iu 0x20000000: 395, // ja 0x200000a2: 396, // ja-JP 0x20300000: 397, // jbo 0x20700000: 398, // jgo 0x20700052: 399, // jgo-CM 0x20a00000: 400, // jmc 0x20a0012f: 401, // jmc-TZ 0x20e00000: 402, // jv 0x21000000: 403, // ka 0x2100007d: 404, // ka-GE 0x21200000: 405, // kab 0x21200067: 406, // kab-DZ 0x21600000: 407, // kaj 0x21700000: 408, // kam 0x217000a4: 409, // kam-KE 0x21f00000: 410, // kcg 0x22300000: 411, // kde 0x2230012f: 412, // kde-TZ 0x22700000: 413, // kea 0x2270005a: 414, // kea-CV 0x23400000: 415, // khq 0x234000c3: 416, // khq-ML 0x23900000: 417, // ki 0x239000a4: 418, // ki-KE 0x24200000: 419, // kk 0x242000ae: 420, // kk-KZ 0x24400000: 421, // kkj 0x24400052: 422, // kkj-CM 0x24500000: 423, // kl 0x24500082: 424, // kl-GL 0x24600000: 425, // kln 0x246000a4: 426, // kln-KE 0x24a00000: 427, // km 0x24a000a6: 428, // km-KH 0x25100000: 429, // kn 0x25100099: 430, // kn-IN 0x25400000: 431, // ko 0x254000aa: 432, // ko-KP 0x254000ab: 433, // ko-KR 0x25600000: 434, // kok 0x25600099: 435, // kok-IN 0x26a00000: 436, // ks 0x26a00099: 437, // ks-IN 0x26b00000: 438, // ksb 0x26b0012f: 439, // ksb-TZ 0x26d00000: 440, // ksf 0x26d00052: 441, // ksf-CM 0x26e00000: 442, // ksh 0x26e00060: 443, // ksh-DE 0x27400000: 444, // ku 0x28100000: 445, // kw 0x2810007b: 446, // kw-GB 0x28a00000: 447, // ky 0x28a000a5: 448, // ky-KG 0x29100000: 449, // lag 0x2910012f: 450, // lag-TZ 0x29500000: 451, // lb 0x295000b7: 452, // lb-LU 0x2a300000: 453, // lg 0x2a300131: 454, // lg-UG 0x2af00000: 455, // lkt 0x2af00135: 456, // lkt-US 0x2b500000: 457, // ln 0x2b50002a: 458, // ln-AO 0x2b50004b: 459, // ln-CD 0x2b50004c: 460, // ln-CF 0x2b50004d: 461, // ln-CG 0x2b800000: 462, // lo 0x2b8000af: 463, // lo-LA 0x2bf00000: 464, // lrc 0x2bf0009b: 465, // lrc-IQ 0x2bf0009c: 466, // lrc-IR 0x2c000000: 467, // lt 0x2c0000b6: 468, // lt-LT 0x2c200000: 469, // lu 0x2c20004b: 470, // lu-CD 0x2c400000: 471, // luo 0x2c4000a4: 472, // luo-KE 0x2c500000: 473, // luy 0x2c5000a4: 474, // luy-KE 0x2c700000: 475, // lv 0x2c7000b8: 476, // lv-LV 0x2d100000: 477, // mas 0x2d1000a4: 478, // mas-KE 0x2d10012f: 479, // mas-TZ 0x2e900000: 480, // mer 0x2e9000a4: 481, // mer-KE 0x2ed00000: 482, // mfe 0x2ed000cc: 483, // mfe-MU 0x2f100000: 484, // mg 0x2f1000bf: 485, // mg-MG 0x2f200000: 486, // mgh 0x2f2000d1: 487, // mgh-MZ 0x2f400000: 488, // mgo 0x2f400052: 489, // mgo-CM 0x2ff00000: 490, // mk 0x2ff000c2: 491, // mk-MK 0x30400000: 492, // ml 0x30400099: 493, // ml-IN 0x30b00000: 494, // mn 0x30b000c5: 495, // mn-MN 0x31b00000: 496, // mr 0x31b00099: 497, // mr-IN 0x31f00000: 498, // ms 0x31f0003e: 499, // ms-BN 0x31f000d0: 500, // ms-MY 0x31f0010d: 501, // ms-SG 0x32000000: 502, // mt 0x320000cb: 503, // mt-MT 0x32500000: 504, // mua 0x32500052: 505, // mua-CM 0x33100000: 506, // my 0x331000c4: 507, // my-MM 0x33a00000: 508, // mzn 0x33a0009c: 509, // mzn-IR 0x34100000: 510, // nah 0x34500000: 511, // naq 0x345000d2: 512, // naq-NA 0x34700000: 513, // nb 0x347000da: 514, // nb-NO 0x34700110: 515, // nb-SJ 0x34e00000: 516, // nd 0x34e00164: 517, // nd-ZW 0x35000000: 518, // nds 0x35000060: 519, // nds-DE 0x350000d9: 520, // nds-NL 0x35100000: 521, // ne 0x35100099: 522, // ne-IN 0x351000db: 523, // ne-NP 0x36700000: 524, // nl 0x36700030: 525, // nl-AW 0x36700036: 526, // nl-BE 0x36700040: 527, // nl-BQ 0x3670005b: 528, // nl-CW 0x367000d9: 529, // nl-NL 0x36700116: 530, // nl-SR 0x3670011b: 531, // nl-SX 0x36800000: 532, // nmg 0x36800052: 533, // nmg-CM 0x36a00000: 534, // nn 0x36a000da: 535, // nn-NO 0x36c00000: 536, // nnh 0x36c00052: 537, // nnh-CM 0x36f00000: 538, // no 0x37500000: 539, // nqo 0x37600000: 540, // nr 0x37a00000: 541, // nso 0x38000000: 542, // nus 0x38000117: 543, // nus-SS 0x38700000: 544, // ny 0x38900000: 545, // nyn 0x38900131: 546, // nyn-UG 0x39000000: 547, // om 0x3900006f: 548, // om-ET 0x390000a4: 549, // om-KE 0x39500000: 550, // or 0x39500099: 551, // or-IN 0x39800000: 552, // os 0x3980007d: 553, // os-GE 0x39800106: 554, // os-RU 0x39d00000: 555, // pa 0x39d05000: 556, // pa-Arab 0x39d050e8: 557, // pa-Arab-PK 0x39d33000: 558, // pa-Guru 0x39d33099: 559, // pa-Guru-IN 0x3a100000: 560, // pap 0x3b300000: 561, // pl 0x3b3000e9: 562, // pl-PL 0x3bd00000: 563, // prg 0x3bd00001: 564, // prg-001 0x3be00000: 565, // ps 0x3be00024: 566, // ps-AF 0x3c000000: 567, // pt 0x3c00002a: 568, // pt-AO 0x3c000041: 569, // pt-BR 0x3c00004e: 570, // pt-CH 0x3c00005a: 571, // pt-CV 0x3c000086: 572, // pt-GQ 0x3c00008b: 573, // pt-GW 0x3c0000b7: 574, // pt-LU 0x3c0000c6: 575, // pt-MO 0x3c0000d1: 576, // pt-MZ 0x3c0000ee: 577, // pt-PT 0x3c000118: 578, // pt-ST 0x3c000126: 579, // pt-TL 0x3c400000: 580, // qu 0x3c40003f: 581, // qu-BO 0x3c400069: 582, // qu-EC 0x3c4000e4: 583, // qu-PE 0x3d400000: 584, // rm 0x3d40004e: 585, // rm-CH 0x3d900000: 586, // rn 0x3d90003a: 587, // rn-BI 0x3dc00000: 588, // ro 0x3dc000bc: 589, // ro-MD 0x3dc00104: 590, // ro-RO 0x3de00000: 591, // rof 0x3de0012f: 592, // rof-TZ 0x3e200000: 593, // ru 0x3e200047: 594, // ru-BY 0x3e2000a5: 595, // ru-KG 0x3e2000ae: 596, // ru-KZ 0x3e2000bc: 597, // ru-MD 0x3e200106: 598, // ru-RU 0x3e200130: 599, // ru-UA 0x3e500000: 600, // rw 0x3e500107: 601, // rw-RW 0x3e600000: 602, // rwk 0x3e60012f: 603, // rwk-TZ 0x3eb00000: 604, // sah 0x3eb00106: 605, // sah-RU 0x3ec00000: 606, // saq 0x3ec000a4: 607, // saq-KE 0x3f300000: 608, // sbp 0x3f30012f: 609, // sbp-TZ 0x3fa00000: 610, // sd 0x3fa000e8: 611, // sd-PK 0x3fc00000: 612, // sdh 0x3fd00000: 613, // se 0x3fd00072: 614, // se-FI 0x3fd000da: 615, // se-NO 0x3fd0010c: 616, // se-SE 0x3ff00000: 617, // seh 0x3ff000d1: 618, // seh-MZ 0x40100000: 619, // ses 0x401000c3: 620, // ses-ML 0x40200000: 621, // sg 0x4020004c: 622, // sg-CF 0x40800000: 623, // shi 0x40857000: 624, // shi-Latn 0x408570ba: 625, // shi-Latn-MA 0x408dc000: 626, // shi-Tfng 0x408dc0ba: 627, // shi-Tfng-MA 0x40c00000: 628, // si 0x40c000b3: 629, // si-LK 0x41200000: 630, // sk 0x41200111: 631, // sk-SK 0x41600000: 632, // sl 0x4160010f: 633, // sl-SI 0x41c00000: 634, // sma 0x41d00000: 635, // smi 0x41e00000: 636, // smj 0x41f00000: 637, // smn 0x41f00072: 638, // smn-FI 0x42200000: 639, // sms 0x42300000: 640, // sn 0x42300164: 641, // sn-ZW 0x42900000: 642, // so 0x42900062: 643, // so-DJ 0x4290006f: 644, // so-ET 0x429000a4: 645, // so-KE 0x42900115: 646, // so-SO 0x43100000: 647, // sq 0x43100027: 648, // sq-AL 0x431000c2: 649, // sq-MK 0x4310014d: 650, // sq-XK 0x43200000: 651, // sr 0x4321f000: 652, // sr-Cyrl 0x4321f033: 653, // sr-Cyrl-BA 0x4321f0bd: 654, // sr-Cyrl-ME 0x4321f105: 655, // sr-Cyrl-RS 0x4321f14d: 656, // sr-Cyrl-XK 0x43257000: 657, // sr-Latn 0x43257033: 658, // sr-Latn-BA 0x432570bd: 659, // sr-Latn-ME 0x43257105: 660, // sr-Latn-RS 0x4325714d: 661, // sr-Latn-XK 0x43700000: 662, // ss 0x43a00000: 663, // ssy 0x43b00000: 664, // st 0x44400000: 665, // sv 0x44400031: 666, // sv-AX 0x44400072: 667, // sv-FI 0x4440010c: 668, // sv-SE 0x44500000: 669, // sw 0x4450004b: 670, // sw-CD 0x445000a4: 671, // sw-KE 0x4450012f: 672, // sw-TZ 0x44500131: 673, // sw-UG 0x44e00000: 674, // syr 0x45000000: 675, // ta 0x45000099: 676, // ta-IN 0x450000b3: 677, // ta-LK 0x450000d0: 678, // ta-MY 0x4500010d: 679, // ta-SG 0x46100000: 680, // te 0x46100099: 681, // te-IN 0x46400000: 682, // teo 0x464000a4: 683, // teo-KE 0x46400131: 684, // teo-UG 0x46700000: 685, // tg 0x46700124: 686, // tg-TJ 0x46b00000: 687, // th 0x46b00123: 688, // th-TH 0x46f00000: 689, // ti 0x46f0006d: 690, // ti-ER 0x46f0006f: 691, // ti-ET 0x47100000: 692, // tig 0x47600000: 693, // tk 0x47600127: 694, // tk-TM 0x48000000: 695, // tn 0x48200000: 696, // to 0x48200129: 697, // to-TO 0x48a00000: 698, // tr 0x48a0005d: 699, // tr-CY 0x48a0012b: 700, // tr-TR 0x48e00000: 701, // ts 0x49400000: 702, // tt 0x49400106: 703, // tt-RU 0x4a400000: 704, // twq 0x4a4000d4: 705, // twq-NE 0x4a900000: 706, // tzm 0x4a9000ba: 707, // tzm-MA 0x4ac00000: 708, // ug 0x4ac00053: 709, // ug-CN 0x4ae00000: 710, // uk 0x4ae00130: 711, // uk-UA 0x4b400000: 712, // ur 0x4b400099: 713, // ur-IN 0x4b4000e8: 714, // ur-PK 0x4bc00000: 715, // uz 0x4bc05000: 716, // uz-Arab 0x4bc05024: 717, // uz-Arab-AF 0x4bc1f000: 718, // uz-Cyrl 0x4bc1f137: 719, // uz-Cyrl-UZ 0x4bc57000: 720, // uz-Latn 0x4bc57137: 721, // uz-Latn-UZ 0x4be00000: 722, // vai 0x4be57000: 723, // vai-Latn 0x4be570b4: 724, // vai-Latn-LR 0x4bee3000: 725, // vai-Vaii 0x4bee30b4: 726, // vai-Vaii-LR 0x4c000000: 727, // ve 0x4c300000: 728, // vi 0x4c30013e: 729, // vi-VN 0x4c900000: 730, // vo 0x4c900001: 731, // vo-001 0x4cc00000: 732, // vun 0x4cc0012f: 733, // vun-TZ 0x4ce00000: 734, // wa 0x4cf00000: 735, // wae 0x4cf0004e: 736, // wae-CH 0x4e500000: 737, // wo 0x4e500114: 738, // wo-SN 0x4f200000: 739, // xh 0x4fb00000: 740, // xog 0x4fb00131: 741, // xog-UG 0x50900000: 742, // yav 0x50900052: 743, // yav-CM 0x51200000: 744, // yi 0x51200001: 745, // yi-001 0x51800000: 746, // yo 0x5180003b: 747, // yo-BJ 0x518000d6: 748, // yo-NG 0x51f00000: 749, // yue 0x51f38000: 750, // yue-Hans 0x51f38053: 751, // yue-Hans-CN 0x51f39000: 752, // yue-Hant 0x51f3908d: 753, // yue-Hant-HK 0x52800000: 754, // zgh 0x528000ba: 755, // zgh-MA 0x52900000: 756, // zh 0x52938000: 757, // zh-Hans 0x52938053: 758, // zh-Hans-CN 0x5293808d: 759, // zh-Hans-HK 0x529380c6: 760, // zh-Hans-MO 0x5293810d: 761, // zh-Hans-SG 0x52939000: 762, // zh-Hant 0x5293908d: 763, // zh-Hant-HK 0x529390c6: 764, // zh-Hant-MO 0x5293912e: 765, // zh-Hant-TW 0x52f00000: 766, // zu 0x52f00161: 767, // zu-ZA } // Total table size 4676 bytes (4KiB); checksum: 17BE3673
{ "pile_set_name": "Github" }
/* * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #ifdef AWS_MULTI_FRAMEWORK #import <AWSRuntime/AmazonServiceRequest.h> #else #import "../AmazonServiceRequest.h" #endif #import "SNSRequest.h" #import "SNSListSubscriptionsRequest.h" /** * List Subscriptions Request Marshaller */ @interface SNSListSubscriptionsRequestMarshaller:NSObject { } +(AmazonServiceRequest *)createRequest:(SNSListSubscriptionsRequest *)listSubscriptionsRequest; @end
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> <year>2018</year><year>2020</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </legalnotice> <title>Socket Usage</title> <prepared>Micael Karlberg</prepared> <docno></docno> <date>2018-07-17</date> <rev>PA1</rev> <file>socket_usage.xml</file> </header> <section> <title>Introduction</title> <p>The socket interface (module) is basically a "thin" layer on top of the OS socket interface. It is assumed that, unless you have special needs, gen_[tcp|udp|sctp] should be sufficent (when they become available). </p> <p>Note that just because we have a documented and described option, it does <em>not</em> mean that the OS supports it. So its recommended that the user reads the platform specific documentation for the option used. </p> <section> <title>Asynchronous calls</title> <p>Some functions allow for an <i>asynchronous</i> call (<seeerl marker="socket#accept_async"><c>accept/2</c></seeerl>, <seeerl marker="socket#connect_async"><c>connect/3</c></seeerl>, <seeerl marker="socket#recv_async"><c>recv/3,4</c></seeerl>, <seeerl marker="socket#recvfrom_async"><c>recvfrom/3,4</c></seeerl>, <seeerl marker="socket#recvmsg_async"><c>recvmsg/2,3,5</c></seeerl>, <seeerl marker="socket#send_async"><c>send/3,4</c></seeerl>, <seeerl marker="socket#sendmsg_async"><c>sendmsg/3,4</c></seeerl> and <seeerl marker="socket#sendto_async"><c>sendto/4,5</c></seeerl>). This is achieved by setting the <c>Timeout</c> argument to <c>nowait</c>. For instance, if calling the <seeerl marker="socket#recv_async"><c>recv/3</c></seeerl> function with Timeout set to <c>nowait</c> (i.e. <c>recv(Sock, 0, nowait)</c>) when there is actually nothing to read, it will return with <c>{select, </c> <seetype marker="socket#select_info"><c>SelectInfo</c></seetype><c>}</c> (<c>SelectInfo</c> contains the <seetype marker="socket#select_handle"><c>SelectHandle</c></seetype>). When data eventually arrives a 'select message' will be sent to the caller:</p> <taglist> <!-- NOTE THAT THE EMPTY TAG IS INTENTIONAL --> <tag></tag> <item><c>{'$socket', socket(), select, SelectHandle}</c></item> </taglist> <p>The caller can then make another call to the recv function and now expect data.</p> <p>Note that all other users are <em>locked out</em> until the 'current user' has called the function (recv in this case). So either immediately call the function or <seemfa marker="socket#cancel/2"><c>cancel</c></seemfa>. </p> <p>The user must also be prepared to receive an abort message: </p> <taglist> <!-- NOTE THAT THE EMPTY TAG IS INTENTIONAL --> <tag></tag> <item><c>{'$socket', socket(), abort, Info}</c></item> </taglist> <p>If the operation is aborted for whatever reason (e.g. if the socket is closed "by someone else"). The <c>Info</c> part contains the abort reason (in this case that the socket has been closed <c>Info = {SelectHandle, closed}</c>). </p> <p>The general form of the 'socket' message is: </p> <taglist> <!-- NOTE THAT THE EMPTY TAG IS INTENTIONAL --> <tag></tag> <item><c>{'$socket', Sock :: socket(), Tag :: atom(), Info :: term()}</c></item> </taglist> <p>Where the format of <c>Info</c> is a function of <c>Tag</c>:</p> <table> <row> <cell><em>Tag</em></cell> <cell><em>Info value type</em></cell> </row> <row> <cell>select</cell> <cell>select_handle()</cell> </row> <row> <cell>abort</cell> <cell>{select_handle(), Reason :: term()}</cell> </row> <tcaption>socket message info value type</tcaption> </table> <p>The <c>select_handle()</c> is the same as was returned in the <seetype marker="socket#select_info"><c>SelectInfo</c></seetype>. </p> </section> </section> <section> <title>Socket Registry</title> <p>The <em>socket registry</em> is how we keep track of sockets. There are two functions that can be used for interaction: <seemfa marker="socket#number_of/0"><c>socket:number_of/0</c></seemfa> and <seemfa marker="socket#which_sockets/1"><c>socket:which_sockets/1</c></seemfa>. </p> <p>In systems which create and delete <em>many</em> sockets dynamically, it (the socket registry) could become a bottleneck. For such systems, there are a couple of ways to control the use of the socket registry. </p> <p>Firstly, its possible to effect the global default value when building OTP from source with the two configure options:</p> <code type="none">--enable-esock-socket-registry (default) | --disable-esock-socket-registry</code> <p>Second, its possible to effect the global default value by setting the environment variable <c>ESOCK_USE_SOCKET_REGISTRY</c> (boolean) before starting the erlang. </p> <p>Third, its possible to alter the global default value in runtime by calling the function <seemfa marker="socket#use_registry/1"><c>use_registry/1</c></seemfa>.</p> <p>And finally, its possible to override the global default when creating a socket (with <seemfa marker="socket#open/2"><c>open/2</c></seemfa> and <seemfa marker="socket#open/4"><c>open/4</c></seemfa>) by providing the attribute <c>use_registry</c> (boolean) in the their <c>Opts</c> argument (which effects <em>that</em> specific socket).</p> </section> <section> <marker id="socket_options"></marker> <title>Socket Options</title> <p>Options for level <c>otp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>assoc_id</cell> <cell>integer()</cell> <cell>no</cell> <cell>yes</cell> <cell>type = seqpacket, protocol = sctp, is an association</cell> </row> <row> <cell>debug</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>iow</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>controlling_process</cell> <cell>pid()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rcvbuf</cell> <cell>default | pos_integer() | {pos_integer(), pos_ineteger()}</cell> <cell>yes</cell> <cell>yes</cell> <cell>'default' only valid for set. The tuple form is only valid for type 'stream' and protocol 'tcp'.</cell> </row> <row> <cell>rcvctrlbuf</cell> <cell>default | pos_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>default only valid for set</cell> </row> <row> <cell>sndctrlbuf</cell> <cell>default | pos_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>default only valid for set</cell> </row> <row> <cell>fd</cell> <cell>integer()</cell> <cell>no</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>use_registry</cell> <cell>boolean()</cell> <cell>no</cell> <cell>yes</cell> <cell>the value is set when the socket is created, by a call to <seemfa marker="socket#open/2"><c>open/2</c></seemfa> or <seemfa marker="socket#open/4"><c>open/4</c></seemfa>.</cell> </row> <tcaption>option levels</tcaption> </table> <p>Options for level <c>socket</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>acceptconn</cell> <cell>boolean()</cell> <cell>no</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>bindtodevice</cell> <cell>string()</cell> <cell>yes</cell> <cell>yes</cell> <cell>Before Linux 3.8, this socket option could be set, but not get. Only works for some socket types (e.g. <c>inet</c>). If empty value is set, the binding is removed.</cell> </row> <row> <cell>broadcast</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram</cell> </row> <row> <cell>debug</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>may require admin capability</cell> </row> <row> <cell>domain</cell> <cell>domain()</cell> <cell>no</cell> <cell>yes</cell> <cell><em>Not</em> on FreeBSD (for instance)</cell> </row> <row> <cell>dontroute</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>keepalive</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>linger</cell> <cell>abort | linger()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>oobinline</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>peek_off</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>domain = local (unix). Currently disabled due to a possible infinite loop when calling recv([peek]) the second time. </cell> </row> <row> <cell>priority</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>protocol</cell> <cell>protocol()</cell> <cell>no</cell> <cell>yes</cell> <cell><em>Not</em> on (some) Darwin (for instance)</cell> </row> <row> <cell>rcvbuf</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rcvlowat</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rcvtimeo</cell> <cell>timeval()</cell> <cell>yes</cell> <cell>yes</cell> <cell> This option is not normally supported (see why below). OTP has to be explicitly built with the <c>--enable-esock-rcvsndtime</c> configure option for this to be available. Since our implementation is <em>nonblocking</em>, its unknown if and how this option works, or even if it may cause malfunctions. Therefor, we do not recommend setting this option. Instead, use the <c>Timeout</c> argument to, for instance, the <seemfa marker="socket#recv/3"><c>recv/3</c></seemfa> function. </cell> </row> <row> <cell>reuseaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>reuseport</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>domain = inet | inet6</cell> </row> <row> <cell>sndbuf</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>sndlowat</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>not changeable on Linux</cell> </row> <row> <cell>sndtimeo</cell> <cell>timeval()</cell> <cell>yes</cell> <cell>yes</cell> <cell> This option is not normally supported (see why below). OTP has to be explicitly built with the <c>--enable-esock-rcvsndtime</c> configure option for this to be available. Since our implementation is <em>nonblocking</em>, its unknown if and how this option works, or even if it may cause malfunctions. Therefor, we do not recommend setting this option. Instead, use the <c>Timeout</c> argument to, for instance, the <seemfa marker="socket#send/3"><c>send/3</c></seemfa> function. </cell> </row> <row> <cell>timestamp</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>type</cell> <cell>type()</cell> <cell>no</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>socket options</tcaption> </table> <p>Options for level <c>ip</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>add_membership</cell> <cell>ip_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>add_source_membership</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>block_source</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>drop_membership</cell> <cell>ip_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>drop_source_membership</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>freebind</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>hdrincl</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>minttl</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>msfilter</cell> <cell>null | ip_msfilter()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>mtu</cell> <cell>integer()</cell> <cell>no</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>mtu_discover</cell> <cell>ip_pmtudisc()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_all</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_if</cell> <cell>any | ip4_address()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_loop</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_ttl</cell> <cell>uint8()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>nodefrag</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>pktinfo</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram</cell> </row> <row> <cell>recvdstaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram</cell> </row> <row> <cell>recverr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recvif</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw</cell> </row> <row> <cell>recvopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type =/= stream</cell> </row> <row> <cell>recvorigdstaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recvttl</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type =/= stream</cell> </row> <row> <cell>retopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type =/= stream</cell> </row> <row> <cell>router_alert</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>sendsrcaddr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>tos</cell> <cell>ip_tos()</cell> <cell>yes</cell> <cell>yes</cell> <cell>some high-priority levels may require superuser capability</cell> </row> <row> <cell>transparent</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>requires admin capability</cell> </row> <row> <cell>ttl</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>unblock_source</cell> <cell>ip_mreq_source()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <tcaption>ip options</tcaption> </table> <p>Options for level <c>ipv6</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>addrform</cell> <cell>inet</cell> <cell>yes</cell> <cell>no</cell> <cell>allowed only for IPv6 sockets that are connected and bound to a v4-mapped-on-v6 address</cell> </row> <row> <cell>add_membership</cell> <cell>ipv6_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>authhdr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, obsolete?</cell> </row> <row> <cell>drop_membership</cell> <cell>ipv6_mreq()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>dstopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>flowinfo</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>hoplimit</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms (e.g. FreeBSD) is used to set in order to get <c>hoplimit</c> as a control message heeader. On others (e.g. Linux), <c>recvhoplimit</c> is set in order to get <c>hoplimit</c>. </cell> </row> <row> <cell>hopopts</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>mtu</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>Get: Only after the socket has been connected</cell> </row> <row> <cell>mtu_discover</cell> <cell>ipv6_pmtudisc()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_hops</cell> <cell>default | uint8()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>multicast_if</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw</cell> </row> <row> <cell>multicast_loop</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recverr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>recvhoplimit</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms (e.g. Linux), <c>recvhoplimit</c> is set in order to get <c>hoplimit</c></cell> </row> <row> <cell>recvpktinfo | pktinfo</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms (e.g. FreeBSD) is used to set in order to get <c>hoplimit</c> as a control message heeader. On others (e.g. Linux), <c>recvhoplimit</c> is set in order to get <c>hoplimit</c>. </cell> </row> <row> <cell>recvtclass</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms is used to set (=true) in order to get the <c>tclass</c> control message heeader. On others, <c>tclass</c> is set in order to get <c>tclass</c> control message heeader. </cell> </row> <row> <cell>router_alert</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = raw</cell> </row> <row> <cell>rthdr</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw, requires superuser privileges to update</cell> </row> <row> <cell>tclass</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>type = dgram | raw. On some platforms is used to set (=true) in order to get the <c>tclass</c> control message heeader. On others, <c>recvtclass</c> is set in order to get <c>tclass</c> control message heeader. </cell> </row> <row> <cell>unicast_hops</cell> <cell>default | uint8()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>v6only</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <tcaption>ipv6 options</tcaption> </table> <p>Options for level <c>tcp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>congestion</cell> <cell>string()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>maxseg</cell> <cell>integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>Set not allowed on all platforms.</cell> </row> <row> <cell>nodelay</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>tcp options</tcaption> </table> <p>Options for level <c>udp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>cork</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>udp options</tcaption> </table> <p>Options for level <c>sctp</c>: </p> <table> <row> <cell><em>Option Name</em></cell> <cell><em>Value Type</em></cell> <cell><em>Set</em></cell> <cell><em>Get</em></cell> <cell><em>Other Requirements and comments</em></cell> </row> <row> <cell>associnfo</cell> <cell>sctp_assocparams()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>autoclose</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>disable_fragments</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>events</cell> <cell>sctp_event_subscribe()</cell> <cell>yes</cell> <cell>no</cell> <cell>none</cell> </row> <row> <cell>initmsg</cell> <cell>sctp_initmsg()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>maxseg</cell> <cell>non_neg_integer()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>nodelay</cell> <cell>boolean()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <row> <cell>rtoinfo</cell> <cell>sctp_rtoinfo()</cell> <cell>yes</cell> <cell>yes</cell> <cell>none</cell> </row> <tcaption>sctp options</tcaption> </table> </section> </chapter>
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.table.codegen.calls import org.apache.flink.api.common.typeinfo.TypeInformation import org.apache.flink.table.codegen.CodeGenUtils._ import org.apache.flink.table.codegen.{CodeGenerator, GeneratedExpression} import org.apache.flink.table.typeutils.TypeCheckUtils trait CallGenerator { def generate( codeGenerator: CodeGenerator, operands: Seq[GeneratedExpression]) : GeneratedExpression } object CallGenerator { /** * Generates a call with a single result statement. */ def generateCallIfArgsNotNull( nullCheck: Boolean, returnType: TypeInformation[_], operands: Seq[GeneratedExpression]) (call: (Seq[String]) => String) : GeneratedExpression = { generateCallWithStmtIfArgsNotNull(nullCheck, returnType, operands) { (terms) => (None, call(terms)) } } /** * Generates a call with auxiliary statements and result expression. */ def generateCallWithStmtIfArgsNotNull( nullCheck: Boolean, returnType: TypeInformation[_], operands: Seq[GeneratedExpression]) (call: (Seq[String]) => (Option[String], String)) : GeneratedExpression = { val resultTerm = newName("result") val nullTerm = newName("isNull") val resultTypeTerm = primitiveTypeTermForTypeInfo(returnType) val defaultValue = primitiveDefaultValue(returnType) val (auxiliaryStmt, result) = call(operands.map(_.resultTerm)) val nullTermCode = if ( nullCheck && isReference(returnType) && !TypeCheckUtils.isTemporal(returnType)) { s""" |$nullTerm = ($resultTerm == null); """.stripMargin } else { "" } val resultCode = if (nullCheck && operands.nonEmpty) { s""" |${operands.map(_.code).mkString("\n")} |boolean $nullTerm = ${operands.map(_.nullTerm).mkString(" || ")}; |$resultTypeTerm $resultTerm = $defaultValue; |if (!$nullTerm) { | ${auxiliaryStmt.getOrElse("")} | $resultTerm = $result; | $nullTermCode |} |""".stripMargin } else if (nullCheck && operands.isEmpty) { s""" |${operands.map(_.code).mkString("\n")} |boolean $nullTerm = false; |${auxiliaryStmt.getOrElse("")} |$resultTypeTerm $resultTerm = $result; |$nullTermCode |""".stripMargin } else{ s""" |boolean $nullTerm = false; |${operands.map(_.code).mkString("\n")} |${auxiliaryStmt.getOrElse("")} |$resultTypeTerm $resultTerm = $result; |""".stripMargin } GeneratedExpression(resultTerm, nullTerm, resultCode, returnType) } }
{ "pile_set_name": "Github" }
; Copyright (c) 2009-2018 ARM Limited. All rights reserved. ; ; SPDX-License-Identifier: Apache-2.0 ; ; Licensed under the Apache License, Version 2.0 (the License); you may ; not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an AS IS BASIS, WITHOUT ; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. ; ; NOTICE: This file has been modified by Nordic Semiconductor ASA. ; The modules in this file are included in the libraries, and may be replaced ; by any user-defined modules that define the PUBLIC symbol _program_start or ; a user defined start symbol. ; To override the cstartup defined in the library, simply add your modified ; version to the workbench project. ; ; The vector table is normally located at address 0. ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. ; The name "__vector_table" has special meaning for C-SPY: ; it is where the SP start value is found, and the NVIC vector ; table register (VTOR) is initialized to this address if != 0. MODULE ?cstartup #if defined(__STARTUP_CONFIG) #include "startup_config.h" #ifndef __STARTUP_CONFIG_STACK_ALIGNEMENT #define __STARTUP_CONFIG_STACK_ALIGNEMENT 3 #endif SECTION CSTACK:DATA:NOROOT(__STARTUP_CONFIG_STACK_ALIGNEMENT) DS8 __STARTUP_CONFIG_STACK_SIZE SECTION HEAP:DATA:NOROOT(3) DS8 __STARTUP_CONFIG_HEAP_SIZE #else ;; Stack size default : Defined in *.icf (linker file). Can be modified inside EW. ;; Heap size default : Defined in *.icf (linker file). Can be modified inside EW. ;; Forward declaration of sections. SECTION CSTACK:DATA:NOROOT(3) #endif SECTION .intvec:CODE:NOROOT(2) EXTERN __iar_program_start EXTERN SystemInit PUBLIC __vector_table PUBLIC __Vectors PUBLIC __Vectors_End PUBLIC __Vectors_Size DATA __vector_table DCD sfe(CSTACK) DCD Reset_Handler DCD NMI_Handler DCD HardFault_Handler DCD MemoryManagement_Handler DCD BusFault_Handler DCD UsageFault_Handler DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD SVC_Handler DCD DebugMon_Handler DCD 0 ; Reserved DCD PendSV_Handler DCD SysTick_Handler ; External Interrupts DCD POWER_CLOCK_IRQHandler DCD RADIO_IRQHandler DCD UARTE0_UART0_IRQHandler DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler DCD NFCT_IRQHandler DCD GPIOTE_IRQHandler DCD SAADC_IRQHandler DCD TIMER0_IRQHandler DCD TIMER1_IRQHandler DCD TIMER2_IRQHandler DCD RTC0_IRQHandler DCD TEMP_IRQHandler DCD RNG_IRQHandler DCD ECB_IRQHandler DCD CCM_AAR_IRQHandler DCD WDT_IRQHandler DCD RTC1_IRQHandler DCD QDEC_IRQHandler DCD COMP_LPCOMP_IRQHandler DCD SWI0_EGU0_IRQHandler DCD SWI1_EGU1_IRQHandler DCD SWI2_EGU2_IRQHandler DCD SWI3_EGU3_IRQHandler DCD SWI4_EGU4_IRQHandler DCD SWI5_EGU5_IRQHandler DCD TIMER3_IRQHandler DCD TIMER4_IRQHandler DCD PWM0_IRQHandler DCD PDM_IRQHandler DCD 0 ; Reserved DCD 0 ; Reserved DCD MWU_IRQHandler DCD PWM1_IRQHandler DCD PWM2_IRQHandler DCD SPIM2_SPIS2_SPI2_IRQHandler DCD RTC2_IRQHandler DCD I2S_IRQHandler DCD FPU_IRQHandler DCD USBD_IRQHandler DCD UARTE1_IRQHandler DCD QSPI_IRQHandler DCD CRYPTOCELL_IRQHandler DCD 0 ; Reserved DCD 0 ; Reserved DCD PWM3_IRQHandler DCD 0 ; Reserved DCD SPIM3_IRQHandler DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved __Vectors_End __Vectors EQU __vector_table __Vectors_Size EQU __Vectors_End - __Vectors ; Default handlers. THUMB PUBWEAK Reset_Handler SECTION .text:CODE:REORDER:NOROOT(2) Reset_Handler LDR R0, =SystemInit BLX R0 LDR R0, =__iar_program_start BX R0 ; Dummy exception handlers PUBWEAK NMI_Handler SECTION .text:CODE:REORDER:NOROOT(1) NMI_Handler B . PUBWEAK HardFault_Handler SECTION .text:CODE:REORDER:NOROOT(1) HardFault_Handler B . PUBWEAK MemoryManagement_Handler SECTION .text:CODE:REORDER:NOROOT(1) MemoryManagement_Handler B . PUBWEAK BusFault_Handler SECTION .text:CODE:REORDER:NOROOT(1) BusFault_Handler B . PUBWEAK UsageFault_Handler SECTION .text:CODE:REORDER:NOROOT(1) UsageFault_Handler B . PUBWEAK SVC_Handler SECTION .text:CODE:REORDER:NOROOT(1) SVC_Handler B . PUBWEAK DebugMon_Handler SECTION .text:CODE:REORDER:NOROOT(1) DebugMon_Handler B . PUBWEAK PendSV_Handler SECTION .text:CODE:REORDER:NOROOT(1) PendSV_Handler B . PUBWEAK SysTick_Handler SECTION .text:CODE:REORDER:NOROOT(1) SysTick_Handler B . ; Dummy interrupt handlers PUBWEAK POWER_CLOCK_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) POWER_CLOCK_IRQHandler B . PUBWEAK RADIO_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RADIO_IRQHandler B . PUBWEAK UARTE0_UART0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) UARTE0_UART0_IRQHandler B . PUBWEAK SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler B . PUBWEAK SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler B . PUBWEAK NFCT_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) NFCT_IRQHandler B . PUBWEAK GPIOTE_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) GPIOTE_IRQHandler B . PUBWEAK SAADC_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SAADC_IRQHandler B . PUBWEAK TIMER0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER0_IRQHandler B . PUBWEAK TIMER1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER1_IRQHandler B . PUBWEAK TIMER2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER2_IRQHandler B . PUBWEAK RTC0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RTC0_IRQHandler B . PUBWEAK TEMP_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TEMP_IRQHandler B . PUBWEAK RNG_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RNG_IRQHandler B . PUBWEAK ECB_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) ECB_IRQHandler B . PUBWEAK CCM_AAR_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) CCM_AAR_IRQHandler B . PUBWEAK WDT_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) WDT_IRQHandler B . PUBWEAK RTC1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RTC1_IRQHandler B . PUBWEAK QDEC_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) QDEC_IRQHandler B . PUBWEAK COMP_LPCOMP_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) COMP_LPCOMP_IRQHandler B . PUBWEAK SWI0_EGU0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI0_EGU0_IRQHandler B . PUBWEAK SWI1_EGU1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI1_EGU1_IRQHandler B . PUBWEAK SWI2_EGU2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI2_EGU2_IRQHandler B . PUBWEAK SWI3_EGU3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI3_EGU3_IRQHandler B . PUBWEAK SWI4_EGU4_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI4_EGU4_IRQHandler B . PUBWEAK SWI5_EGU5_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SWI5_EGU5_IRQHandler B . PUBWEAK TIMER3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER3_IRQHandler B . PUBWEAK TIMER4_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) TIMER4_IRQHandler B . PUBWEAK PWM0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM0_IRQHandler B . PUBWEAK PDM_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PDM_IRQHandler B . PUBWEAK MWU_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) MWU_IRQHandler B . PUBWEAK PWM1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM1_IRQHandler B . PUBWEAK PWM2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM2_IRQHandler B . PUBWEAK SPIM2_SPIS2_SPI2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM2_SPIS2_SPI2_IRQHandler B . PUBWEAK RTC2_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) RTC2_IRQHandler B . PUBWEAK I2S_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) I2S_IRQHandler B . PUBWEAK FPU_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) FPU_IRQHandler B . PUBWEAK USBD_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) USBD_IRQHandler B . PUBWEAK UARTE1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) UARTE1_IRQHandler B . PUBWEAK QSPI_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) QSPI_IRQHandler B . PUBWEAK CRYPTOCELL_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) CRYPTOCELL_IRQHandler B . PUBWEAK PWM3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PWM3_IRQHandler B . PUBWEAK SPIM3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) SPIM3_IRQHandler B . END
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- /* //device/apps/common/assets/res/any/strings.xml ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <resources> <string msgid="735082772341716043" name="fingerprint_acquired_partial">"Odcisk palca został odczytany tylko częściowo. Spróbuj ponownie."</string> <string msgid="4596546021310923214" name="fingerprint_acquired_insufficient">"Nie udało się przetworzyć odcisku palca. Spróbuj ponownie."</string> <string msgid="1087209702421076105" name="fingerprint_acquired_imager_dirty">"Czytnik linii papilarnych jest zabrudzony. Wyczyść go i spróbuj ponownie."</string> <string msgid="6470642383109155969" name="fingerprint_acquired_too_fast">"Palec został podniesiony zbyt wcześnie. Spróbuj jeszcze raz."</string> <string msgid="59250885689661653" name="fingerprint_acquired_too_slow">"Palec został obrócony zbyt wolno. Spróbuj ponownie."</string> <string msgid="7955921658939936596" name="fingerprint_error_hw_not_available">"Czytnik linii papilarnych nie jest dostępny."</string> <string msgid="1055819001126053318" name="fingerprint_error_no_space">"Nie można zapisać odcisku palca. Usuń istniejący odcisk palca."</string> <string msgid="3927186043737732875" name="fingerprint_error_timeout">"Osiągnięto limit czasu odczytu linii papilarnych. Spróbuj ponownie."</string> <string msgid="4402024612660774395" name="fingerprint_error_canceled">"Odczyt odcisku palca został anulowany."</string> <string msgid="5536934748136933450" name="fingerprint_error_lockout">"Zbyt wiele prób. Spróbuj ponownie później."</string> <string msgid="6107816084103552441" name="fingerprint_error_unable_to_process">"Spróbuj ponownie."</string> <string msgid="4516019619850763049" name="fingerprints">"Odciski cyfrowe:"</string> <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nie rozpoznano odcisku palca."</string> </resources>
{ "pile_set_name": "Github" }
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package external.com.android.dx.rop.code; import external.com.android.dx.rop.type.StdTypeList; import external.com.android.dx.rop.type.Type; import external.com.android.dx.rop.type.TypeList; import external.com.android.dx.util.ToHuman; /** * A register-based instruction. An instruction is the combination of * an opcode (which specifies operation and source/result types), a * list of actual sources and result registers/values, and additional * information. */ public abstract class Insn implements ToHuman { /** {@code non-null;} opcode */ private final Rop opcode; /** {@code non-null;} source position */ private final SourcePosition position; /** {@code null-ok;} spec for the result of this instruction, if any */ private final RegisterSpec result; /** {@code non-null;} specs for all the sources of this instruction */ private final RegisterSpecList sources; /** * Constructs an instance. * * @param opcode {@code non-null;} the opcode * @param position {@code non-null;} source position * @param result {@code null-ok;} spec for the result, if any * @param sources {@code non-null;} specs for all the sources */ public Insn(Rop opcode, SourcePosition position, RegisterSpec result, RegisterSpecList sources) { if (opcode == null) { throw new NullPointerException("opcode == null"); } if (position == null) { throw new NullPointerException("position == null"); } if (sources == null) { throw new NullPointerException("sources == null"); } this.opcode = opcode; this.position = position; this.result = result; this.sources = sources; } /** * {@inheritDoc} * * Instances of this class compare by identity. That is, * {@code x.equals(y)} is only true if {@code x == y}. */ @Override public final boolean equals(Object other) { return (this == other); } /** * {@inheritDoc} * * This implementation returns the identity hashcode of this * instance. This is proper, since instances of this class compare * by identity (see {@link #equals}). */ @Override public final int hashCode() { return System.identityHashCode(this); } /** {@inheritDoc} */ @Override public String toString() { return toStringWithInline(getInlineString()); } /** * Gets a human-oriented (and slightly lossy) string for this instance. * * @return {@code non-null;} the human string form */ @Override public String toHuman() { return toHumanWithInline(getInlineString()); } /** * Gets an "inline" string portion for toHuman(), if available. This * is the portion that appears after the Rop opcode * * @return {@code null-ok;} if non-null, the inline text for toHuman() */ public String getInlineString() { return null; } /** * Gets the opcode. * * @return {@code non-null;} the opcode */ public final Rop getOpcode() { return opcode; } /** * Gets the source position. * * @return {@code non-null;} the source position */ public final SourcePosition getPosition() { return position; } /** * Gets the result spec, if any. A return value of {@code null} * means this instruction returns nothing. * * @return {@code null-ok;} the result spec, if any */ public final RegisterSpec getResult() { return result; } /** * Gets the spec of a local variable assignment that occurs at this * instruction, or null if no local variable assignment occurs. This * may be the result register, or for {@code mark-local} insns * it may be the source. * * @return {@code null-ok;} a named register spec or null */ public final RegisterSpec getLocalAssignment() { RegisterSpec assignment; if (opcode.getOpcode() == RegOps.MARK_LOCAL) { assignment = sources.get(0); } else { assignment = result; } if (assignment == null) { return null; } LocalItem localItem = assignment.getLocalItem(); if (localItem == null) { return null; } return assignment; } /** * Gets the source specs. * * @return {@code non-null;} the source specs */ public final RegisterSpecList getSources() { return sources; } /** * Gets whether this instruction can possibly throw an exception. This * is just a convenient wrapper for {@code getOpcode().canThrow()}. * * @return {@code true} iff this instruction can possibly throw */ public final boolean canThrow() { return opcode.canThrow(); } /** * Gets the list of possibly-caught exceptions. This returns {@link * StdTypeList#EMPTY} if this instruction has no handlers, * which can be <i>either</i> if this instruction can't possibly * throw or if it merely doesn't handle any of its possible * exceptions. To determine whether this instruction can throw, * use {@link #canThrow}. * * @return {@code non-null;} the catches list */ public abstract TypeList getCatches(); /** * Calls the appropriate method on the given visitor, depending on the * class of this instance. Subclasses must override this. * * @param visitor {@code non-null;} the visitor to call on */ public abstract void accept(Visitor visitor); /** * Returns an instance that is just like this one, except that it * has a catch list with the given item appended to the end. This * method throws an exception if this instance can't possibly * throw. To determine whether this instruction can throw, use * {@link #canThrow}. * * @param type {@code non-null;} type to append to the catch list * @return {@code non-null;} an appropriately-constructed instance */ public abstract Insn withAddedCatch(Type type); /** * Returns an instance that is just like this one, except that all * register references have been offset by the given delta. * * @param delta the amount to offset register references by * @return {@code non-null;} an appropriately-constructed instance */ public abstract Insn withRegisterOffset(int delta); /** * Returns an instance that is just like this one, except that, if * possible, the insn is converted into a version in which a source * (if it is a constant) is represented directly rather than as a * register reference. {@code this} is returned in cases where the * translation is not possible. * * @return {@code non-null;} an appropriately-constructed instance */ public Insn withSourceLiteral() { return this; } /** * Returns an exact copy of this Insn * * @return {@code non-null;} an appropriately-constructed instance */ public Insn copy() { return withRegisterOffset(0); } /** * Compares, handling nulls safely * * @param a first object * @param b second object * @return true if they're equal or both null. */ private static boolean equalsHandleNulls (Object a, Object b) { return (a == b) || ((a != null) && a.equals(b)); } /** * Compares Insn contents, since {@code Insn.equals()} is defined * to be an identity compare. Insn's are {@code contentEquals()} * if they have the same opcode, registers, source position, and other * metadata. * * @return true in the case described above */ public boolean contentEquals(Insn b) { return opcode == b.getOpcode() && position.equals(b.getPosition()) && (getClass() == b.getClass()) && equalsHandleNulls(result, b.getResult()) && equalsHandleNulls(sources, b.getSources()) && StdTypeList.equalContents(getCatches(), b.getCatches()); } /** * Returns an instance that is just like this one, except * with new result and source registers. * * @param result {@code null-ok;} new result register * @param sources {@code non-null;} new sources registers * @return {@code non-null;} an appropriately-constructed instance */ public abstract Insn withNewRegisters(RegisterSpec result, RegisterSpecList sources); /** * Returns the string form of this instance, with the given bit added in * the standard location for an inline argument. * * @param extra {@code null-ok;} the inline argument string * @return {@code non-null;} the string form */ protected final String toStringWithInline(String extra) { StringBuilder sb = new StringBuilder(80); sb.append("Insn{"); sb.append(position); sb.append(' '); sb.append(opcode); if (extra != null) { sb.append(' '); sb.append(extra); } sb.append(" :: "); if (result != null) { sb.append(result); sb.append(" <- "); } sb.append(sources); sb.append('}'); return sb.toString(); } /** * Returns the human string form of this instance, with the given * bit added in the standard location for an inline argument. * * @param extra {@code null-ok;} the inline argument string * @return {@code non-null;} the human string form */ protected final String toHumanWithInline(String extra) { StringBuilder sb = new StringBuilder(80); sb.append(position); sb.append(": "); sb.append(opcode.getNickname()); if (extra != null) { sb.append("("); sb.append(extra); sb.append(")"); } if (result == null) { sb.append(" ."); } else { sb.append(" "); sb.append(result.toHuman()); } sb.append(" <-"); int sz = sources.size(); if (sz == 0) { sb.append(" ."); } else { for (int i = 0; i < sz; i++) { sb.append(" "); sb.append(sources.get(i).toHuman()); } } return sb.toString(); } /** * Visitor interface for this (outer) class. */ public static interface Visitor { /** * Visits a {@link PlainInsn}. * * @param insn {@code non-null;} the instruction to visit */ public void visitPlainInsn(PlainInsn insn); /** * Visits a {@link PlainCstInsn}. * * @param insn {@code non-null;} the instruction to visit */ public void visitPlainCstInsn(PlainCstInsn insn); /** * Visits a {@link SwitchInsn}. * * @param insn {@code non-null;} the instruction to visit */ public void visitSwitchInsn(SwitchInsn insn); /** * Visits a {@link ThrowingCstInsn}. * * @param insn {@code non-null;} the instruction to visit */ public void visitThrowingCstInsn(ThrowingCstInsn insn); /** * Visits a {@link ThrowingInsn}. * * @param insn {@code non-null;} the instruction to visit */ public void visitThrowingInsn(ThrowingInsn insn); /** * Visits a {@link FillArrayDataInsn}. * * @param insn {@code non-null;} the instruction to visit */ public void visitFillArrayDataInsn(FillArrayDataInsn insn); /** * Visits a {@link InvokePolymorphicInsn}. * * @param insn {@code non-null;} the instruction to visit */ public void visitInvokePolymorphicInsn(InvokePolymorphicInsn insn); } /** * Base implementation of {@link Visitor}, which has empty method * bodies for all methods. */ public static class BaseVisitor implements Visitor { /** {@inheritDoc} */ @Override public void visitPlainInsn(PlainInsn insn) { // This space intentionally left blank. } /** {@inheritDoc} */ @Override public void visitPlainCstInsn(PlainCstInsn insn) { // This space intentionally left blank. } /** {@inheritDoc} */ @Override public void visitSwitchInsn(SwitchInsn insn) { // This space intentionally left blank. } /** {@inheritDoc} */ @Override public void visitThrowingCstInsn(ThrowingCstInsn insn) { // This space intentionally left blank. } /** {@inheritDoc} */ @Override public void visitThrowingInsn(ThrowingInsn insn) { // This space intentionally left blank. } /** {@inheritDoc} */ @Override public void visitFillArrayDataInsn(FillArrayDataInsn insn) { // This space intentionally left blank. } /** {@inheritDoc} */ @Override public void visitInvokePolymorphicInsn(InvokePolymorphicInsn insn) { // This space intentionally left blank. } } }
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.example.ordermessage; import java.util.List; import java.util.concurrent.atomic.AtomicLong; import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; import org.apache.rocketmq.client.consumer.listener.ConsumeOrderlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeOrderlyStatus; import org.apache.rocketmq.client.consumer.listener.MessageListenerOrderly; import org.apache.rocketmq.client.exception.MQClientException; import org.apache.rocketmq.common.consumer.ConsumeFromWhere; import org.apache.rocketmq.common.message.MessageExt; public class Consumer { public static void main(String[] args) throws MQClientException { DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("please_rename_unique_group_name_3"); consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET); consumer.subscribe("TopicTest", "TagA || TagC || TagD"); consumer.registerMessageListener(new MessageListenerOrderly() { AtomicLong consumeTimes = new AtomicLong(0); @Override public ConsumeOrderlyStatus consumeMessage(List<MessageExt> msgs, ConsumeOrderlyContext context) { context.setAutoCommit(true); System.out.printf("%s Receive New Messages: %s %n", Thread.currentThread().getName(), msgs); this.consumeTimes.incrementAndGet(); if ((this.consumeTimes.get() % 2) == 0) { return ConsumeOrderlyStatus.SUCCESS; } else if ((this.consumeTimes.get() % 3) == 0) { return ConsumeOrderlyStatus.ROLLBACK; } else if ((this.consumeTimes.get() % 4) == 0) { return ConsumeOrderlyStatus.COMMIT; } else if ((this.consumeTimes.get() % 5) == 0) { context.setSuspendCurrentQueueTimeMillis(3000); return ConsumeOrderlyStatus.SUSPEND_CURRENT_QUEUE_A_MOMENT; } return ConsumeOrderlyStatus.SUCCESS; } }); consumer.start(); System.out.printf("Consumer Started.%n"); } }
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.service.center.client.model; public class GetSchemaResponse { private String schema; public String getSchema() { return schema; } public void setSchema(String schema) { this.schema = schema; } }
{ "pile_set_name": "Github" }
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.MachineLearning.DescribeTags -- Copyright : (c) 2013-2018 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Describes one or more of the tags for your Amazon ML object. -- -- module Network.AWS.MachineLearning.DescribeTags ( -- * Creating a Request describeTags , DescribeTags -- * Request Lenses , dtResourceId , dtResourceType -- * Destructuring the Response , describeTagsResponse , DescribeTagsResponse -- * Response Lenses , dtrsResourceId , dtrsResourceType , dtrsTags , dtrsResponseStatus ) where import Network.AWS.Lens import Network.AWS.MachineLearning.Types import Network.AWS.MachineLearning.Types.Product import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response -- | /See:/ 'describeTags' smart constructor. data DescribeTags = DescribeTags' { _dtResourceId :: !Text , _dtResourceType :: !TaggableResourceType } deriving (Eq, Read, Show, Data, Typeable, Generic) -- | Creates a value of 'DescribeTags' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dtResourceId' - The ID of the ML object. For example, @exampleModelId@ . -- -- * 'dtResourceType' - The type of the ML object. describeTags :: Text -- ^ 'dtResourceId' -> TaggableResourceType -- ^ 'dtResourceType' -> DescribeTags describeTags pResourceId_ pResourceType_ = DescribeTags' {_dtResourceId = pResourceId_, _dtResourceType = pResourceType_} -- | The ID of the ML object. For example, @exampleModelId@ . dtResourceId :: Lens' DescribeTags Text dtResourceId = lens _dtResourceId (\ s a -> s{_dtResourceId = a}) -- | The type of the ML object. dtResourceType :: Lens' DescribeTags TaggableResourceType dtResourceType = lens _dtResourceType (\ s a -> s{_dtResourceType = a}) instance AWSRequest DescribeTags where type Rs DescribeTags = DescribeTagsResponse request = postJSON machineLearning response = receiveJSON (\ s h x -> DescribeTagsResponse' <$> (x .?> "ResourceId") <*> (x .?> "ResourceType") <*> (x .?> "Tags" .!@ mempty) <*> (pure (fromEnum s))) instance Hashable DescribeTags where instance NFData DescribeTags where instance ToHeaders DescribeTags where toHeaders = const (mconcat ["X-Amz-Target" =# ("AmazonML_20141212.DescribeTags" :: ByteString), "Content-Type" =# ("application/x-amz-json-1.1" :: ByteString)]) instance ToJSON DescribeTags where toJSON DescribeTags'{..} = object (catMaybes [Just ("ResourceId" .= _dtResourceId), Just ("ResourceType" .= _dtResourceType)]) instance ToPath DescribeTags where toPath = const "/" instance ToQuery DescribeTags where toQuery = const mempty -- | Amazon ML returns the following elements. -- -- -- -- /See:/ 'describeTagsResponse' smart constructor. data DescribeTagsResponse = DescribeTagsResponse' { _dtrsResourceId :: !(Maybe Text) , _dtrsResourceType :: !(Maybe TaggableResourceType) , _dtrsTags :: !(Maybe [Tag]) , _dtrsResponseStatus :: !Int } deriving (Eq, Read, Show, Data, Typeable, Generic) -- | Creates a value of 'DescribeTagsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dtrsResourceId' - The ID of the tagged ML object. -- -- * 'dtrsResourceType' - The type of the tagged ML object. -- -- * 'dtrsTags' - A list of tags associated with the ML object. -- -- * 'dtrsResponseStatus' - -- | The response status code. describeTagsResponse :: Int -- ^ 'dtrsResponseStatus' -> DescribeTagsResponse describeTagsResponse pResponseStatus_ = DescribeTagsResponse' { _dtrsResourceId = Nothing , _dtrsResourceType = Nothing , _dtrsTags = Nothing , _dtrsResponseStatus = pResponseStatus_ } -- | The ID of the tagged ML object. dtrsResourceId :: Lens' DescribeTagsResponse (Maybe Text) dtrsResourceId = lens _dtrsResourceId (\ s a -> s{_dtrsResourceId = a}) -- | The type of the tagged ML object. dtrsResourceType :: Lens' DescribeTagsResponse (Maybe TaggableResourceType) dtrsResourceType = lens _dtrsResourceType (\ s a -> s{_dtrsResourceType = a}) -- | A list of tags associated with the ML object. dtrsTags :: Lens' DescribeTagsResponse [Tag] dtrsTags = lens _dtrsTags (\ s a -> s{_dtrsTags = a}) . _Default . _Coerce -- | -- | The response status code. dtrsResponseStatus :: Lens' DescribeTagsResponse Int dtrsResponseStatus = lens _dtrsResponseStatus (\ s a -> s{_dtrsResponseStatus = a}) instance NFData DescribeTagsResponse where
{ "pile_set_name": "Github" }
/* * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.facebook.litho; import static com.facebook.litho.LifecycleStep.getSteps; import static org.assertj.core.api.Java6Assertions.assertThat; import com.facebook.litho.testing.LithoViewRule; import com.facebook.litho.testing.testrunner.LithoTestRunner; import com.facebook.litho.widget.LayoutSpecTriggerTester; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicReference; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(LithoTestRunner.class) public class LayoutSpecTriggerTest { public final @Rule LithoViewRule mLithoViewRule = new LithoViewRule(); @Test public void layoutSpec_setRootAndTriggerEvent_eventIsTriggered() { final ComponentContext componentContext = mLithoViewRule.getContext(); final AtomicReference<Object> triggerObjectRef = new AtomicReference<>(); final Handle triggerHandle = new Handle(); final List<LifecycleStep.StepInfo> info = new ArrayList<>(); final Component component = LayoutSpecTriggerTester.create(componentContext) .steps(info) .triggerObjectRef(triggerObjectRef) .handle(triggerHandle) .build(); mLithoViewRule.setRoot(component); mLithoViewRule.attachToWindow().measure().layout(); final Object bazObject = new Object(); // We need to use a ComponentContext with a ComponentTree on it LayoutSpecTriggerTester.triggerTestEvent( mLithoViewRule.getComponentTree().getContext(), triggerHandle, bazObject); assertThat(getSteps(info)) .describedAs("Should call @OnTrigger method") .containsExactly(LifecycleStep.ON_TRIGGER); assertThat(triggerObjectRef.get()) .describedAs("Event object is correctly passed") .isEqualTo(bazObject); } }
{ "pile_set_name": "Github" }
/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package labels import ( "fmt" "sort" "strings" ) // Labels allows you to present labels independently from their storage. type Labels interface { // Has returns whether the provided label exists. Has(label string) (exists bool) // Get returns the value for the provided label. Get(label string) (value string) } // Set is a map of label:value. It implements Labels. type Set map[string]string // String returns all labels listed as a human readable string. // Conveniently, exactly the format that ParseSelector takes. func (ls Set) String() string { selector := make([]string, 0, len(ls)) for key, value := range ls { selector = append(selector, key+"="+value) } // Sort for determinism. sort.StringSlice(selector).Sort() return strings.Join(selector, ",") } // Has returns whether the provided label exists in the map. func (ls Set) Has(label string) bool { _, exists := ls[label] return exists } // Get returns the value in the map for the provided label. func (ls Set) Get(label string) string { return ls[label] } // AsSelector converts labels into a selectors. func (ls Set) AsSelector() Selector { return SelectorFromSet(ls) } // AsSelectorPreValidated converts labels into a selector, but // assumes that labels are already validated and thus don't // preform any validation. // According to our measurements this is significantly faster // in codepaths that matter at high scale. func (ls Set) AsSelectorPreValidated() Selector { return SelectorFromValidatedSet(ls) } // FormatLabels convert label map into plain string func FormatLabels(labelMap map[string]string) string { l := Set(labelMap).String() if l == "" { l = "<none>" } return l } // Conflicts takes 2 maps and returns true if there a key match between // the maps but the value doesn't match, and returns false in other cases func Conflicts(labels1, labels2 Set) bool { small := labels1 big := labels2 if len(labels2) < len(labels1) { small = labels2 big = labels1 } for k, v := range small { if val, match := big[k]; match { if val != v { return true } } } return false } // Merge combines given maps, and does not check for any conflicts // between the maps. In case of conflicts, second map (labels2) wins func Merge(labels1, labels2 Set) Set { mergedMap := Set{} for k, v := range labels1 { mergedMap[k] = v } for k, v := range labels2 { mergedMap[k] = v } return mergedMap } // Equals returns true if the given maps are equal func Equals(labels1, labels2 Set) bool { if len(labels1) != len(labels2) { return false } for k, v := range labels1 { value, ok := labels2[k] if !ok { return false } if value != v { return false } } return true } // AreLabelsInWhiteList verifies if the provided label list // is in the provided whitelist and returns true, otherwise false. func AreLabelsInWhiteList(labels, whitelist Set) bool { if len(whitelist) == 0 { return true } for k, v := range labels { value, ok := whitelist[k] if !ok { return false } if value != v { return false } } return true } // ConvertSelectorToLabelsMap converts selector string to labels map // and validates keys and values func ConvertSelectorToLabelsMap(selector string) (Set, error) { labelsMap := Set{} if len(selector) == 0 { return labelsMap, nil } labels := strings.Split(selector, ",") for _, label := range labels { l := strings.Split(label, "=") if len(l) != 2 { return labelsMap, fmt.Errorf("invalid selector: %s", l) } key := strings.TrimSpace(l[0]) if err := validateLabelKey(key); err != nil { return labelsMap, err } value := strings.TrimSpace(l[1]) if err := validateLabelValue(key, value); err != nil { return labelsMap, err } labelsMap[key] = value } return labelsMap, nil }
{ "pile_set_name": "Github" }
/* * RelativeMeanAbsoluteDeviationMT.java * Copyright (C) 2017 University of Porto, Portugal * @author J. Duarte, J. Gama * * 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 moa.classifiers.rules.multilabel.errormeasurers; import com.yahoo.labs.samoa.instances.Prediction; /** * Relative Mean Absolute Deviation for multitarget and with fading factor */ public class RelativeMeanAbsoluteDeviationMT extends AbstractMultiTargetErrorMeasurer { /** * */ protected double weightSeen; protected double [] sumError; protected double [] sumY; protected double [] sumErrorToTargetMean; private static final long serialVersionUID = 1L; protected boolean hasStarted; protected int numLearnedOutputs; @Override public void addPrediction(Prediction prediction, Prediction trueClass, double weight) { int numOutputs=prediction.numOutputAttributes(); if (!hasStarted){ sumError=new double[numOutputs]; sumY=new double[numOutputs]; sumErrorToTargetMean=new double[numOutputs]; hasStarted=true; for(int i=0; i<numOutputs;i++) if(prediction.hasVotesForAttribute(i)) ++numLearnedOutputs; hasStarted=true; } weightSeen=weight+fadingErrorFactor*weightSeen; for(int i=0; i<numOutputs;i++){ if(prediction.hasVotesForAttribute(i)){ sumError[i]=Math.abs(prediction.getVote(i, 0)-trueClass.getVote(i, 0))*weight+fadingErrorFactor*sumError[i]; sumY[i]=trueClass.getVote(i, 0)*weight+fadingErrorFactor*sumY[i]; double errorOutputTM=Math.abs(prediction.getVote(i, 0)-sumY[i]/weightSeen); //error to target mean sumErrorToTargetMean[i]=errorOutputTM*weight+fadingErrorFactor*sumErrorToTargetMean[i]; } } } @Override public double getCurrentError() { if(weightSeen==0) return Double.MAX_VALUE; else { double sum=0; int numOutputs=sumError.length; for (int i=0; i<numOutputs; i++) sum+=getCurrentError(i); return sum/numLearnedOutputs; } } @Override public double getCurrentError(int index) { return sumError[index]/sumErrorToTargetMean[index]; } @Override public double[] getCurrentErrors() { double [] errors=null; if(sumError!=null){ errors=new double[sumError.length]; for (int i=0;i<sumError.length; i++) errors[i]=getCurrentError(i); } return errors; } }
{ "pile_set_name": "Github" }