content
stringlengths
4
1.04M
lang
stringclasses
358 values
score
int64
0
5
repo_name
stringlengths
5
114
repo_path
stringlengths
4
229
repo_licenses
listlengths
1
8
# Documentation Overview * [Configuration](./Config.md). * [Custom Commands](./Custom_Command_Keybindings.md) * [Custom Pagers](./Custom_Pagers.md) * [Keybindings](./keybindings) * [Undo/Redo](./Undoing.md)
Markdown
2
ikysil/lazygit
docs/README.md
[ "MIT" ]
/* * Copyright 2012-2021 the original author or 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 * * 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. */ package org.springframework.boot.actuate.endpoint.http; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; /** * Test for {@link ApiVersion}. * * @author Phillip Webb */ @Deprecated class ApiVersionTests { @Test void latestIsLatestVersion() { ApiVersion[] values = ApiVersion.values(); assertThat(ApiVersion.LATEST).isEqualTo(values[values.length - 1]); } @Test @Deprecated void fromHttpHeadersWhenEmptyReturnsLatest() { ApiVersion version = ApiVersion.fromHttpHeaders(Collections.emptyMap()); assertThat(version).isEqualTo(ApiVersion.V3); } @Test @Deprecated void fromHttpHeadersWhenHasSingleV2HeaderReturnsV2() { ApiVersion version = ApiVersion.fromHttpHeaders(acceptHeader(ActuatorMediaType.V2_JSON)); assertThat(version).isEqualTo(ApiVersion.V2); } @Test @Deprecated void fromHttpHeadersWhenHasSingleV3HeaderReturnsV3() { ApiVersion version = ApiVersion.fromHttpHeaders(acceptHeader(ActuatorMediaType.V3_JSON)); assertThat(version).isEqualTo(ApiVersion.V3); } @Test @Deprecated void fromHttpHeadersWhenHasV2AndV3HeaderReturnsV3() { ApiVersion version = ApiVersion .fromHttpHeaders(acceptHeader(ActuatorMediaType.V2_JSON, ActuatorMediaType.V3_JSON)); assertThat(version).isEqualTo(ApiVersion.V3); } @Test @Deprecated void fromHttpHeadersWhenHasV2AndV3AsOneHeaderReturnsV3() { ApiVersion version = ApiVersion .fromHttpHeaders(acceptHeader(ActuatorMediaType.V2_JSON + "," + ActuatorMediaType.V3_JSON)); assertThat(version).isEqualTo(ApiVersion.V3); } @Test @Deprecated void fromHttpHeadersWhenHasSingleHeaderWithoutJsonReturnsHeader() { ApiVersion version = ApiVersion.fromHttpHeaders(acceptHeader("application/vnd.spring-boot.actuator.v2")); assertThat(version).isEqualTo(ApiVersion.V2); } @Test @Deprecated void fromHttpHeadersWhenHasUnknownVersionReturnsLatest() { ApiVersion version = ApiVersion.fromHttpHeaders(acceptHeader("application/vnd.spring-boot.actuator.v200")); assertThat(version).isEqualTo(ApiVersion.V3); } @Test @Deprecated void fromHttpHeadersWhenAcceptsEverythingReturnsLatest() { ApiVersion version = ApiVersion.fromHttpHeaders(acceptHeader("*/*")); assertThat(version).isEqualTo(ApiVersion.V3); } private Map<String, List<String>> acceptHeader(String... types) { List<String> value = Arrays.asList(types); return value.isEmpty() ? Collections.emptyMap() : Collections.singletonMap("Accept", value); } }
Java
4
Cuiqingqiang/spring-boot
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/http/ApiVersionTests.java
[ "Apache-2.0" ]
--TEST-- curl_multi_close --CREDITS-- Stefan Koopmanschap <stefan@php.net> #testfest Utrecht 2009 --EXTENSIONS-- curl --FILE-- <?php $ch = curl_multi_init(); curl_multi_close($ch); var_dump($ch); ?> --EXPECT-- object(CurlMultiHandle)#1 (0) { }
PHP
3
NathanFreeman/php-src
ext/curl/tests/curl_multi_close_basic.phpt
[ "PHP-3.01" ]
export default { props: { user: { active: true } }, html: '<div class="active"></div>', test({ assert, component, target }) { component.user = { active: false }; assert.htmlEqual(target.innerHTML, ` <div class></div> `); } };
JavaScript
3
Theo-Steiner/svelte
test/runtime/samples/class-helper/_config.js
[ "MIT" ]
--TEST-- Test function posix_ttyname() by substituting argument 1 with int values. --CREDITS-- Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 --EXTENSIONS-- posix --FILE-- <?php echo "*** Test substituting argument 1 with int values ***\n"; $variation_array = array ( 'int 12345' => 12345, 'int -12345' => -2345, ); foreach ( $variation_array as $var ) { var_dump(posix_ttyname( $var ) ); } ?> --EXPECT-- *** Test substituting argument 1 with int values *** bool(false) bool(false)
PHP
3
NathanFreeman/php-src
ext/posix/tests/posix_ttyname_variation5.phpt
[ "PHP-3.01" ]
// run-pass // no-prefer-dynamic // aux-build:custom.rs // aux-build:helper.rs extern crate custom; extern crate helper; use custom::A; use std::sync::atomic::{AtomicUsize, Ordering}; fn main() { #[global_allocator] pub static GLOBAL: A = A(AtomicUsize::new(0)); let n = GLOBAL.0.load(Ordering::SeqCst); let s = Box::new(0); helper::work_with(&s); assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 1); drop(s); assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2); }
Rust
3
Eric-Arellano/rust
src/test/ui/allocator/custom-in-block.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
-- Copyright 2020-2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local url = require("url") local json = require("json") name = "CertSpotter" type = "cert" function start() set_rate_limit(2) end function vertical(ctx, domain) local page, err = request(ctx, {['url']=api_url(domain)}) if (err ~= nil and err ~= "") then log(ctx, "vertical request to service failed: " .. err) return end local resp = json.decode(page) if (resp == nil or #resp == 0) then return end for i, r in pairs(resp) do for i, name in pairs(r['dns_names']) do new_name(ctx, name) end end end function api_url(domain) local params = { ['domain']=domain, ['include_subdomains']="true", ['match_wildcards']="true", expand="dns_names", } return "https://api.certspotter.com/v1/issuances?" .. url.build_query_string(params) end
Ada
3
Elon143/Amass
resources/scripts/cert/certspotter.ads
[ "Apache-2.0" ]
unsigned int barFunc () // my comment { return 0; }
Arduino
1
Maniekkk/platformio-core
tests/ino2cpp/multifiles/bar.ino
[ "Apache-2.0" ]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Eiffel
1
aravi5/drill-test-framework
framework/resources/Functional/impersonation/dfs/secondaryusernestedviews.e
[ "Apache-2.0" ]
#!/bin/bash # Copyright Istio 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. function update_version() { local RELEASE_DIR="$1" local DOCKER_HUB="$2" local DOCKER_TAG="$3" # Update version string in profiles. sed -i "s|hub: gcr.io/istio-release|hub: ${DOCKER_HUB}|g" "${RELEASE_DIR}"/profiles/*.yaml sed -i "s|tag: .*-latest-daily|tag: ${DOCKER_TAG}|g" "${RELEASE_DIR}"/profiles/*.yaml # Update version string in global.yaml. sed -i "s|hub: gcr.io/istio-release|hub: ${DOCKER_HUB}|g" "${RELEASE_DIR}"/charts/global.yaml sed -i "s|tag: .*-latest-daily|tag: ${DOCKER_TAG}|g" "${RELEASE_DIR}"/charts/global.yaml }
Shell
4
rveerama1/istio
operator/scripts/update_version.sh
[ "Apache-2.0" ]
-- ============================================================== -- File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC -- Version: 2016.3 -- Copyright (C) 1986-2016 Xilinx, Inc. All Rights Reserved. -- -- ============================================================== library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity process_r_dds_0_fcud_rom is generic( dwidth : integer := 16; awidth : integer := 9; mem_size : integer := 512 ); port ( addr0 : in std_logic_vector(awidth-1 downto 0); ce0 : in std_logic; q0 : out std_logic_vector(dwidth-1 downto 0); clk : in std_logic ); end entity; architecture rtl of process_r_dds_0_fcud_rom is signal addr0_tmp : std_logic_vector(awidth-1 downto 0); type mem_array is array (0 to mem_size-1) of std_logic_vector (dwidth-1 downto 0); signal mem : mem_array := ( 0 => "0000000000000000", 1 => "0000000001100100", 2 => "0000000011001001", 3 => "0000000100101101", 4 => "0000000110010010", 5 => "0000000111110110", 6 => "0000001001011011", 7 => "0000001010111111", 8 => "0000001100100100", 9 => "0000001110001000", 10 => "0000001111101101", 11 => "0000010001010001", 12 => "0000010010110110", 13 => "0000010100011010", 14 => "0000010101111111", 15 => "0000010111100011", 16 => "0000011001001000", 17 => "0000011010101101", 18 => "0000011100010001", 19 => "0000011101110110", 20 => "0000011111011010", 21 => "0000100000111111", 22 => "0000100010100011", 23 => "0000100100001000", 24 => "0000100101101100", 25 => "0000100111010001", 26 => "0000101000110101", 27 => "0000101010011010", 28 => "0000101011111110", 29 => "0000101101100011", 30 => "0000101111000111", 31 => "0000110000101100", 32 => "0000110010010000", 33 => "0000110011110101", 34 => "0000110101011010", 35 => "0000110110111110", 36 => "0000111000100011", 37 => "0000111010000111", 38 => "0000111011101100", 39 => "0000111101010000", 40 => "0000111110110101", 41 => "0001000000011001", 42 => "0001000001111110", 43 => "0001000011100010", 44 => "0001000101000111", 45 => "0001000110101011", 46 => "0001001000010000", 47 => "0001001001110100", 48 => "0001001011011001", 49 => "0001001100111110", 50 => "0001001110100010", 51 => "0001010000000111", 52 => "0001010001101011", 53 => "0001010011010000", 54 => "0001010100110100", 55 => "0001010110011001", 56 => "0001010111111101", 57 => "0001011001100010", 58 => "0001011011000110", 59 => "0001011100101011", 60 => "0001011110001111", 61 => "0001011111110100", 62 => "0001100001011000", 63 => "0001100010111101", 64 => "0001100100100001", 65 => "0001100110000110", 66 => "0001100111101011", 67 => "0001101001001111", 68 => "0001101010110100", 69 => "0001101100011000", 70 => "0001101101111101", 71 => "0001101111100001", 72 => "0001110001000110", 73 => "0001110010101010", 74 => "0001110100001111", 75 => "0001110101110011", 76 => "0001110111011000", 77 => "0001111000111100", 78 => "0001111010100001", 79 => "0001111100000101", 80 => "0001111101101010", 81 => "0001111111001111", 82 => "0010000000110011", 83 => "0010000010011000", 84 => "0010000011111100", 85 => "0010000101100001", 86 => "0010000111000101", 87 => "0010001000101010", 88 => "0010001010001110", 89 => "0010001011110011", 90 => "0010001101010111", 91 => "0010001110111100", 92 => "0010010000100000", 93 => "0010010010000101", 94 => "0010010011101001", 95 => "0010010101001110", 96 => "0010010110110010", 97 => "0010011000010111", 98 => "0010011001111100", 99 => "0010011011100000", 100 => "0010011101000101", 101 => "0010011110101001", 102 => "0010100000001110", 103 => "0010100001110010", 104 => "0010100011010111", 105 => "0010100100111011", 106 => "0010100110100000", 107 => "0010101000000100", 108 => "0010101001101001", 109 => "0010101011001101", 110 => "0010101100110010", 111 => "0010101110010110", 112 => "0010101111111011", 113 => "0010110001011111", 114 => "0010110011000100", 115 => "0010110100101001", 116 => "0010110110001101", 117 => "0010110111110010", 118 => "0010111001010110", 119 => "0010111010111011", 120 => "0010111100011111", 121 => "0010111110000100", 122 => "0010111111101000", 123 => "0011000001001101", 124 => "0011000010110001", 125 => "0011000100010110", 126 => "0011000101111010", 127 => "0011000111011111", 128 => "0011001001000011", 129 => "0011001010101000", 130 => "0011001100001101", 131 => "0011001101110001", 132 => "0011001111010110", 133 => "0011010000111010", 134 => "0011010010011111", 135 => "0011010100000011", 136 => "0011010101101000", 137 => "0011010111001100", 138 => "0011011000110001", 139 => "0011011010010101", 140 => "0011011011111010", 141 => "0011011101011110", 142 => "0011011111000011", 143 => "0011100000100111", 144 => "0011100010001100", 145 => "0011100011110000", 146 => "0011100101010101", 147 => "0011100110111010", 148 => "0011101000011110", 149 => "0011101010000011", 150 => "0011101011100111", 151 => "0011101101001100", 152 => "0011101110110000", 153 => "0011110000010101", 154 => "0011110001111001", 155 => "0011110011011110", 156 => "0011110101000010", 157 => "0011110110100111", 158 => "0011111000001011", 159 => "0011111001110000", 160 => "0011111011010100", 161 => "0011111100111001", 162 => "0011111110011110", 163 => "0100000000000010", 164 => "0100000001100111", 165 => "0100000011001011", 166 => "0100000100110000", 167 => "0100000110010100", 168 => "0100000111111001", 169 => "0100001001011101", 170 => "0100001011000010", 171 => "0100001100100110", 172 => "0100001110001011", 173 => "0100001111101111", 174 => "0100010001010100", 175 => "0100010010111000", 176 => "0100010100011101", 177 => "0100010110000001", 178 => "0100010111100110", 179 => "0100011001001011", 180 => "0100011010101111", 181 => "0100011100010100", 182 => "0100011101111000", 183 => "0100011111011101", 184 => "0100100001000001", 185 => "0100100010100110", 186 => "0100100100001010", 187 => "0100100101101111", 188 => "0100100111010011", 189 => "0100101000111000", 190 => "0100101010011100", 191 => "0100101100000001", 192 => "0100101101100101", 193 => "0100101111001010", 194 => "0100110000101111", 195 => "0100110010010011", 196 => "0100110011111000", 197 => "0100110101011100", 198 => "0100110111000001", 199 => "0100111000100101", 200 => "0100111010001010", 201 => "0100111011101110", 202 => "0100111101010011", 203 => "0100111110110111", 204 => "0101000000011100", 205 => "0101000010000000", 206 => "0101000011100101", 207 => "0101000101001001", 208 => "0101000110101110", 209 => "0101001000010010", 210 => "0101001001110111", 211 => "0101001011011100", 212 => "0101001101000000", 213 => "0101001110100101", 214 => "0101010000001001", 215 => "0101010001101110", 216 => "0101010011010010", 217 => "0101010100110111", 218 => "0101010110011011", 219 => "0101011000000000", 220 => "0101011001100100", 221 => "0101011011001001", 222 => "0101011100101101", 223 => "0101011110010010", 224 => "0101011111110110", 225 => "0101100001011011", 226 => "0101100010111111", 227 => "0101100100100100", 228 => "0101100110001001", 229 => "0101100111101101", 230 => "0101101001010010", 231 => "0101101010110110", 232 => "0101101100011011", 233 => "0101101101111111", 234 => "0101101111100100", 235 => "0101110001001000", 236 => "0101110010101101", 237 => "0101110100010001", 238 => "0101110101110110", 239 => "0101110111011010", 240 => "0101111000111111", 241 => "0101111010100011", 242 => "0101111100001000", 243 => "0101111101101101", 244 => "0101111111010001", 245 => "0110000000110110", 246 => "0110000010011010", 247 => "0110000011111111", 248 => "0110000101100011", 249 => "0110000111001000", 250 => "0110001000101100", 251 => "0110001010010001", 252 => "0110001011110101", 253 => "0110001101011010", 254 => "0110001110111110", 255 => "0110010000100011", 256 => "0110010010000111", 257 => "0110010011101100", 258 => "0110010101010000", 259 => "0110010110110101", 260 => "0110011000011010", 261 => "0110011001111110", 262 => "0110011011100011", 263 => "0110011101000111", 264 => "0110011110101100", 265 => "0110100000010000", 266 => "0110100001110101", 267 => "0110100011011001", 268 => "0110100100111110", 269 => "0110100110100010", 270 => "0110101000000111", 271 => "0110101001101011", 272 => "0110101011010000", 273 => "0110101100110100", 274 => "0110101110011001", 275 => "0110101111111110", 276 => "0110110001100010", 277 => "0110110011000111", 278 => "0110110100101011", 279 => "0110110110010000", 280 => "0110110111110100", 281 => "0110111001011001", 282 => "0110111010111101", 283 => "0110111100100010", 284 => "0110111110000110", 285 => "0110111111101011", 286 => "0111000001001111", 287 => "0111000010110100", 288 => "0111000100011000", 289 => "0111000101111101", 290 => "0111000111100001", 291 => "0111001001000110", 292 => "0111001010101011", 293 => "0111001100001111", 294 => "0111001101110100", 295 => "0111001111011000", 296 => "0111010000111101", 297 => "0111010010100001", 298 => "0111010100000110", 299 => "0111010101101010", 300 => "0111010111001111", 301 => "0111011000110011", 302 => "0111011010011000", 303 => "0111011011111100", 304 => "0111011101100001", 305 => "0111011111000101", 306 => "0111100000101010", 307 => "0111100010001111", 308 => "0111100011110011", 309 => "0111100101011000", 310 => "0111100110111100", 311 => "0111101000100001", 312 => "0111101010000101", 313 => "0111101011101010", 314 => "0111101101001110", 315 => "0111101110110011", 316 => "0111110000010111", 317 => "0111110001111100", 318 => "0111110011100000", 319 => "0111110101000101", 320 => "0111110110101001", 321 => "0111111000001110", 322 => "0111111001110010", 323 => "0111111011010111", 324 => "0111111100111100", 325 => "0111111110100000", 326 => "1000000000000101", 327 => "1000000001101001", 328 => "1000000011001110", 329 => "1000000100110010", 330 => "1000000110010111", 331 => "1000000111111011", 332 => "1000001001100000", 333 => "1000001011000100", 334 => "1000001100101001", 335 => "1000001110001101", 336 => "1000001111110010", 337 => "1000010001010110", 338 => "1000010010111011", 339 => "1000010100011111", 340 => "1000010110000100", 341 => "1000010111101001", 342 => "1000011001001101", 343 => "1000011010110010", 344 => "1000011100010110", 345 => "1000011101111011", 346 => "1000011111011111", 347 => "1000100001000100", 348 => "1000100010101000", 349 => "1000100100001101", 350 => "1000100101110001", 351 => "1000100111010110", 352 => "1000101000111010", 353 => "1000101010011111", 354 => "1000101100000011", 355 => "1000101101101000", 356 => "1000101111001101", 357 => "1000110000110001", 358 => "1000110010010110", 359 => "1000110011111010", 360 => "1000110101011111", 361 => "1000110111000011", 362 => "1000111000101000", 363 => "1000111010001100", 364 => "1000111011110001", 365 => "1000111101010101", 366 => "1000111110111010", 367 => "1001000000011110", 368 => "1001000010000011", 369 => "1001000011100111", 370 => "1001000101001100", 371 => "1001000110110000", 372 => "1001001000010101", 373 => "1001001001111010", 374 => "1001001011011110", 375 => "1001001101000011", 376 => "1001001110100111", 377 => "1001010000001100", 378 => "1001010001110000", 379 => "1001010011010101", 380 => "1001010100111001", 381 => "1001010110011110", 382 => "1001011000000010", 383 => "1001011001100111", 384 => "1001011011001011", 385 => "1001011100110000", 386 => "1001011110010100", 387 => "1001011111111001", 388 => "1001100001011110", 389 => "1001100011000010", 390 => "1001100100100111", 391 => "1001100110001011", 392 => "1001100111110000", 393 => "1001101001010100", 394 => "1001101010111001", 395 => "1001101100011101", 396 => "1001101110000010", 397 => "1001101111100110", 398 => "1001110001001011", 399 => "1001110010101111", 400 => "1001110100010100", 401 => "1001110101111000", 402 => "1001110111011101", 403 => "1001111001000001", 404 => "1001111010100110", 405 => "1001111100001011", 406 => "1001111101101111", 407 => "1001111111010100", 408 => "1010000000111000", 409 => "1010000010011101", 410 => "1010000100000001", 411 => "1010000101100110", 412 => "1010000111001010", 413 => "1010001000101111", 414 => "1010001010010011", 415 => "1010001011111000", 416 => "1010001101011100", 417 => "1010001111000001", 418 => "1010010000100101", 419 => "1010010010001010", 420 => "1010010011101110", 421 => "1010010101010011", 422 => "1010010110111000", 423 => "1010011000011100", 424 => "1010011010000001", 425 => "1010011011100101", 426 => "1010011101001010", 427 => "1010011110101110", 428 => "1010100000010011", 429 => "1010100001110111", 430 => "1010100011011100", 431 => "1010100101000000", 432 => "1010100110100101", 433 => "1010101000001001", 434 => "1010101001101110", 435 => "1010101011010010", 436 => "1010101100110111", 437 => "1010101110011100", 438 => "1010110000000000", 439 => "1010110001100101", 440 => "1010110011001001", 441 => "1010110100101110", 442 => "1010110110010010", 443 => "1010110111110111", 444 => "1010111001011011", 445 => "1010111011000000", 446 => "1010111100100100", 447 => "1010111110001001", 448 => "1010111111101101", 449 => "1011000001010010", 450 => "1011000010110110", 451 => "1011000100011011", 452 => "1011000101111111", 453 => "1011000111100100", 454 => "1011001001001001", 455 => "1011001010101101", 456 => "1011001100010010", 457 => "1011001101110110", 458 => "1011001111011011", 459 => "1011010000111111", 460 => "1011010010100100", 461 => "1011010100001000", 462 => "1011010101101101", 463 => "1011010111010001", 464 => "1011011000110110", 465 => "1011011010011010", 466 => "1011011011111111", 467 => "1011011101100011", 468 => "1011011111001000", 469 => "1011100000101101", 470 => "1011100010010001", 471 => "1011100011110110", 472 => "1011100101011010", 473 => "1011100110111111", 474 => "1011101000100011", 475 => "1011101010001000", 476 => "1011101011101100", 477 => "1011101101010001", 478 => "1011101110110101", 479 => "1011110000011010", 480 => "1011110001111110", 481 => "1011110011100011", 482 => "1011110101000111", 483 => "1011110110101100", 484 => "1011111000010000", 485 => "1011111001110101", 486 => "1011111011011010", 487 => "1011111100111110", 488 => "1011111110100011", 489 => "1100000000000111", 490 => "1100000001101100", 491 => "1100000011010000", 492 => "1100000100110101", 493 => "1100000110011001", 494 => "1100000111111110", 495 => "1100001001100010", 496 => "1100001011000111", 497 => "1100001100101011", 498 => "1100001110010000", 499 => "1100001111110100", 500 => "1100010001011001", 501 => "1100010010111101", 502 => "1100010100100010", 503 => "1100010110000111", 504 => "1100010111101011", 505 => "1100011001010000", 506 => "1100011010110100", 507 => "1100011100011001", 508 => "1100011101111101", 509 => "1100011111100010", 510 => "1100100001000110", 511 => "1100100010101011" ); attribute EQUIVALENT_REGISTER_REMOVAL : string; begin memory_access_guard_0: process (addr0) begin addr0_tmp <= addr0; --synthesis translate_off if (CONV_INTEGER(addr0) > mem_size-1) then addr0_tmp <= (others => '0'); else addr0_tmp <= addr0; end if; --synthesis translate_on end process; p_rom_access: process (clk) begin if (clk'event and clk = '1') then if (ce0 = '1') then q0 <= mem(CONV_INTEGER(addr0_tmp)); end if; end if; end process; end rtl; Library IEEE; use IEEE.std_logic_1164.all; entity process_r_dds_0_fcud is generic ( DataWidth : INTEGER := 16; AddressRange : INTEGER := 512; AddressWidth : INTEGER := 9); port ( reset : IN STD_LOGIC; clk : IN STD_LOGIC; address0 : IN STD_LOGIC_VECTOR(AddressWidth - 1 DOWNTO 0); ce0 : IN STD_LOGIC; q0 : OUT STD_LOGIC_VECTOR(DataWidth - 1 DOWNTO 0)); end entity; architecture arch of process_r_dds_0_fcud is component process_r_dds_0_fcud_rom is port ( clk : IN STD_LOGIC; addr0 : IN STD_LOGIC_VECTOR; ce0 : IN STD_LOGIC; q0 : OUT STD_LOGIC_VECTOR); end component; begin process_r_dds_0_fcud_rom_U : component process_r_dds_0_fcud_rom port map ( clk => clk, addr0 => address0, ce0 => ce0, q0 => q0); end architecture;
VHDL
4
JimMadge/aws-fpga
hdk/common/shell_v04261818/hlx/design/ip/dds_v1_0/hdl/vhdl/process_r_dds_0_fcud.vhd
[ "Apache-2.0" ]
#Copyright (c) 2009, 2010, 2011, 2012, Tom Schoonjans #All rights reserved. #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. # * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission. #THIS SOFTWARE IS PROVIDED BY Tom Schoonjans ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Tom Schoonjans BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. MODULE XRAYLIB DESCRIPTION IDL XRAYLIB BINDINGS VERSION 2.16.0 SOURCE A.Brunetti, M. S. del Rio, T. Schoonjans, T. Ikonen, B. Golosio, A. Simionovici, A. Somogyi # #IDL bindings written by Tom Schoonjans of Ghent University (Tom.Schoonjans@UGent.be) # # #To enable this dlm, make sure that: # 1) you run xraylib.pro which can be found in this folder. # 2) the IDL_DLM_PATH environment variable points to this folder. FUNCTION GETEXITSTATUS 0 0 FUNCTION GETERRORMESSAGES 0 0 PROCEDURE XRAYINIT 0 0 PROCEDURE SETHARDEXIT 1 1 PROCEDURE SETEXITSTATUS 1 1 PROCEDURE SETERRORMESSAGES 1 1 FUNCTION ATOMICWEIGHT 1 1 FUNCTION ELEMENTDENSITY 1 1 FUNCTION CS_TOTAL 2 2 FUNCTION CS_PHOTO 2 2 FUNCTION CS_RAYL 2 2 FUNCTION CS_COMPT 2 2 FUNCTION CS_ENERGY 2 2 FUNCTION CSB_TOTAL 2 2 FUNCTION CSB_PHOTO 2 2 FUNCTION CSB_RAYL 2 2 FUNCTION CSB_COMPT 2 2 FUNCTION CS_KN 1 1 FUNCTION DCS_THOMS 1 1 FUNCTION DCS_KN 2 2 FUNCTION DCS_RAYL 3 3 FUNCTION DCS_COMPT 3 3 FUNCTION DCSB_RAYL 3 3 FUNCTION DCSB_COMPT 3 3 FUNCTION DCSP_THOMS 2 2 FUNCTION DCSP_KN 3 3 FUNCTION DCSP_RAYL 4 4 FUNCTION DCSP_COMPT 4 4 FUNCTION DCSPB_RAYL 4 4 FUNCTION DCSPB_COMPT 4 4 FUNCTION FF_RAYL 2 2 FUNCTION SF_COMPT 2 2 FUNCTION MOMENTTRANSF 2 2 FUNCTION LINEENERGY 2 2 FUNCTION FLUORYIELD 2 2 FUNCTION COSKRONTRANSPROB 2 2 FUNCTION EDGEENERGY 2 2 FUNCTION JUMPFACTOR 2 2 FUNCTION CS_FLUORLINE 3 3 FUNCTION CSB_FLUORLINE 3 3 FUNCTION RADRATE 2 2 FUNCTION COMPTONENERGY 2 2 FUNCTION FI 2 2 FUNCTION FII 2 2 FUNCTION CSB_PHOTO_TOTAL 2 2 FUNCTION CS_PHOTO_TOTAL 2 2 FUNCTION CSB_PHOTO_PARTIAL 3 3 FUNCTION CS_PHOTO_PARTIAL 3 3 FUNCTION CS_TOTAL_KISSEL 2 2 FUNCTION CSB_TOTAL_KISSEL 2 2 FUNCTION COMPOUNDPARSER 1 1 FUNCTION CS_TOTAL_CP 2 2 FUNCTION CS_PHOTO_CP 2 2 FUNCTION CS_RAYL_CP 2 2 FUNCTION CS_COMPT_CP 2 2 FUNCTION CS_ENERGY_CP 2 2 FUNCTION CSB_TOTAL_CP 2 2 FUNCTION CSB_PHOTO_CP 2 2 FUNCTION CSB_RAYL_CP 2 2 FUNCTION CSB_COMPT_CP 2 2 FUNCTION DCS_RAYL_CP 3 3 FUNCTION DCS_COMPT_CP 3 3 FUNCTION DCSB_RAYL_CP 3 3 FUNCTION DCSB_COMPT_CP 3 3 FUNCTION DCSP_RAYL_CP 4 4 FUNCTION DCSP_COMPT_CP 4 4 FUNCTION DCSPB_RAYL_CP 4 4 FUNCTION DCSPB_COMPT_CP 4 4 FUNCTION CS_PHOTO_TOTAL_CP 2 2 FUNCTION CSB_PHOTO_TOTAL_CP 2 2 FUNCTION CS_TOTAL_KISSEL_CP 2 2 FUNCTION CSB_TOTAL_KISSEL_CP 2 2 FUNCTION COMPTONPROFILE 2 2 FUNCTION COMPTONPROFILE_PARTIAL 3 3 FUNCTION ELECTRONCONFIG 2 2 FUNCTION ATOMICNUMBERTOSYMBOL 1 1 FUNCTION SYMBOLTOATOMICNUMBER 1 1 FUNCTION ATOMICLEVELWIDTH 2 2 FUNCTION AUGERRATE 2 2 FUNCTION AUGERYIELD 2 2 FUNCTION CS_FLUORLINE_KISSEL 3 3 FUNCTION CSB_FLUORLINE_KISSEL 3 3 FUNCTION CS_FLUORLINE_KISSEL_CASCADE 3 3 FUNCTION CSB_FLUORLINE_KISSEL_CASCADE 3 3 FUNCTION CS_FLUORLINE_KISSEL_NONRADIATIVE_CASCADE 3 3 FUNCTION CSB_FLUORLINE_KISSEL_NONRADIATIVE_CASCADE 3 3 FUNCTION CS_FLUORLINE_KISSEL_RADIATIVE_CASCADE 3 3 FUNCTION CSB_FLUORLINE_KISSEL_RADIATIVE_CASCADE 3 3 FUNCTION CS_FLUORLINE_KISSEL_NO_CASCADE 3 3 FUNCTION CSB_FLUORLINE_KISSEL_NO_CASCADE 3 3 FUNCTION REFRACTIVE_INDEX_RE 3 3 FUNCTION REFRACTIVE_INDEX_IM 3 3 FUNCTION REFRACTIVE_INDEX 3 3 FUNCTION PL1_PURE_KISSEL 2 2 FUNCTION PL1_RAD_CASCADE_KISSEL 3 3 FUNCTION PL1_AUGER_CASCADE_KISSEL 3 3 FUNCTION PL1_FULL_CASCADE_KISSEL 3 3 FUNCTION PL2_PURE_KISSEL 3 3 FUNCTION PL2_RAD_CASCADE_KISSEL 4 4 FUNCTION PL2_AUGER_CASCADE_KISSEL 4 4 FUNCTION PL2_FULL_CASCADE_KISSEL 4 4 FUNCTION PL3_PURE_KISSEL 4 4 FUNCTION PL3_RAD_CASCADE_KISSEL 5 5 FUNCTION PL3_AUGER_CASCADE_KISSEL 5 5 FUNCTION PL3_FULL_CASCADE_KISSEL 5 5 FUNCTION PM1_PURE_KISSEL 2 2 FUNCTION PM1_RAD_CASCADE_KISSEL 6 6 FUNCTION PM1_AUGER_CASCADE_KISSEL 6 6 FUNCTION PM1_FULL_CASCADE_KISSEL 6 6 FUNCTION PM2_PURE_KISSEL 3 3 FUNCTION PM2_RAD_CASCADE_KISSEL 7 7 FUNCTION PM2_AUGER_CASCADE_KISSEL 7 7 FUNCTION PM2_FULL_CASCADE_KISSEL 7 7 FUNCTION PM3_PURE_KISSEL 4 4 FUNCTION PM3_RAD_CASCADE_KISSEL 8 8 FUNCTION PM3_AUGER_CASCADE_KISSEL 8 8 FUNCTION PM3_FULL_CASCADE_KISSEL 8 8 FUNCTION PM4_PURE_KISSEL 5 5 FUNCTION PM4_RAD_CASCADE_KISSEL 9 9 FUNCTION PM4_AUGER_CASCADE_KISSEL 9 9 FUNCTION PM4_FULL_CASCADE_KISSEL 9 9 FUNCTION PM5_PURE_KISSEL 6 6 FUNCTION PM5_RAD_CASCADE_KISSEL 10 10 FUNCTION PM5_AUGER_CASCADE_KISSEL 10 10 FUNCTION PM5_FULL_CASCADE_KISSEL 10 10 FUNCTION CRYSTAL_GETCRYSTAL 1 1 FUNCTION BRAGG_ANGLE 5 5 FUNCTION Q_SCATTERING_AMPLITUDE 6 6 PROCEDURE ATOMIC_FACTORS 7 7 FUNCTION CRYSTAL_F_H_STRUCTUREFACTOR 7 7 FUNCTION CRYSTAL_F_H_STRUCTUREFACTOR_PARTIAL 10 10 FUNCTION CRYSTAL_UNITCELLVOLUME 1 1 FUNCTION CRYSTAL_DSPACING 4 4 FUNCTION GETCOMPOUNDDATANISTBYNAME 1 1 FUNCTION GETCOMPOUNDDATANISTBYINDEX 1 1 FUNCTION GETCOMPOUNDDATANISTLIST 0 0
IDL
4
golosio/xraylib
idl/libxrlidl.dlm
[ "BSD-3-Clause" ]
/* * Copyright 2007 The Fornax Project Team, including the original * author or 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 org.sculptor.generator.ext import java.util.List import java.util.Set import javax.inject.Inject import org.sculptor.generator.chain.ChainOverridable import org.sculptor.generator.util.PropertiesBase import org.sculptor.generator.util.SingularPluralConverter import sculptormetamodel.Application import sculptormetamodel.BasicType import sculptormetamodel.Consumer import sculptormetamodel.DomainObject import sculptormetamodel.Entity import sculptormetamodel.Enum import sculptormetamodel.Module import sculptormetamodel.NamedElement import sculptormetamodel.Reference import sculptormetamodel.Service import sculptormetamodel.ValueObject @ChainOverridable class UmlGraphHelper { @Inject var SingularPluralConverter singularPluralConverter @Inject extension PropertiesBase propertiesBase @Inject extension Helper helper def String referenceHeadLabel(Reference ref) { (if (ref.many) "0..n " else "") + ref.referenceLabelText() } def String referenceTailLabel(Reference ref) { if (ref.opposite === null) "" else (if (ref.opposite.many) "0..n " else "") + ref.opposite.referenceLabelText() } def String referenceLabelText(Reference ref) { if (ref.name.toSingular().toLowerCase() == ref.to.name.toLowerCase()) // almost same reference name as the to DomainObject, skip "" else ref.name } def boolean isAggregate(Reference ref) { ref.isOneToMany() && ref.to.isEntityOrPersistentValueObject() && !ref.to.aggregateRoot } def String dotFileName(Application app, Set<Module> focus, int detail, String subjectArea) { val detailPart = if (detail == 0) "-" + subjectArea else if (detail == 1) "" else if (detail == 2) "-core-domain" else if (detail == 3) "-overview" else "-dependencies" if (focus.size == app.visibleModules.size) "umlgraph" + detailPart + ".dot" else "umlgraph-" + focus.map[m|m.name].sortBy[it].join("-") + detailPart + ".dot" } def Set<DomainObject> serviceOperationDependencies(Service from) { val Set<DomainObject> retVal = newHashSet() retVal.addAll(from.operations.map[parameters].flatten.filter[e|e.domainObjectType !== null].map[domainObjectType].toSet) retVal.addAll(from.operations.filter[e|e.domainObjectType !== null].map[domainObjectType].toSet) retVal } // Get all the subject areas used throughout the application def dispatch Set<String> getSubjectAreas(Application application) { val retVal = newArrayList("entity") retVal.addAll(application.visibleModules().map[domainObjects].flatten.map[d | d.getSubjectAreas()].flatten) retVal.addAll(application.visibleModules().map[services].flatten.map[s | s.getSubjectAreas()].flatten) retVal.filterNull.toSet } def dispatch List<String> getSubjectAreas(NamedElement elem) { if (elem.hasHint("umlgraph.subject")) elem.getHint("umlgraph.subject").replaceAll(" ", "").split("\\|").toList else newArrayList() } def Set<Module> moduleDependencies(Module from) { val List<Module> retVal=newArrayList retVal.addAll(from.domainObjects.map[references].flatten.map[e|e.to.module]) retVal.addAll(from.domainObjects.filter[e|e.getExtends !== null].map[e|e.getExtends.module]) retVal.addAll(from.services.map[s | s.serviceDependencies as List<Service>].flatten.map[module]) retVal.addAll(from.services.map[s | s.serviceOperationDependencies].flatten.map[module]) retVal.addAll(from.consumers.map[serviceDependencies as List<Service>].flatten.map[module]) retVal.filter[e | e != from].toSet } def Iterable<Module> visibleModules(Application app) { app.modules.filter[e | e.visible()] } def boolean visible(NamedElement elem) { !elem.hide } def dispatch boolean hide(DomainObject elem) { elem.hasHideHint || elem.module.hide } def dispatch boolean hide(Service elem) { elem.hasHideHint || elem.module.hide } def dispatch boolean hide(Consumer elem) { elem.hasHideHint || elem.module.hide } def dispatch boolean hide(NamedElement elem) { elem.hasHideHint } def private hasHideHint(NamedElement elem) { elem.getHint("umlgraph") == "hide" } def boolean isShownInView(DomainObject domainObject, Set<Module> focus, int detail, String subjectArea) { detail < 4 && domainObject.visible() && focus.contains(domainObject.module) && (detail != 0 || domainObject.isInSubjectArea(subjectArea)) && (!(domainObject instanceof Enum) && !(domainObject instanceof BasicType) || (domainObject instanceof Enum && getBooleanProperty("generate.umlgraph.enum")) || (domainObject instanceof BasicType && getBooleanProperty("generate.umlgraph.basicType")) || (focus.size != domainObject.module.application.visibleModules().size)) } def bgcolor(NamedElement elem) { if (elem.hasHint("umlgraph.bgcolor")) elem.getHint("umlgraph.bgcolor") else bgcolorFromProperty(elem) } def fontcolor(NamedElement elem) { if (elem.hasHint("umlgraph.fontcolor")) elem.getHint("umlgraph.fontcolor") else fontcolorFromProperty(elem) } def String getStereoTypeName(NamedElement elem) { elem.simpleMetaTypeName() } def private bgcolorFromProperty(NamedElement elem) { val prop1 = "umlgraph.bgcolor." + (if (elem.isCoreDomain()) "core." else "") + elem.getStereoTypeName() val prop2 = "umlgraph.bgcolor." + elem.getStereoTypeName() if (hasProperty(prop1)) getProperty(prop1) else if (hasProperty(prop2)) getProperty(prop2) else "D0D0D0" } def private fontcolorFromProperty(NamedElement elem) { val prop1 = "umlgraph.fontcolor." + (if (elem.isCoreDomain()) "core." else "") + elem.getStereoTypeName() val prop2 = "umlgraph.fontcolor." + elem.getStereoTypeName() if (hasProperty(prop1)) getProperty(prop1) else if (hasProperty(prop2)) getProperty(prop2) else "black" } def existsCoreDomain(Application app) { app.modules.exists(e|e.isCoreDomain()) || app.modules.map[domainObjects as List<DomainObject>].flatten.exists(e|e.isCoreDomain()) || app.modules.map[services as List<Service>].flatten.exists(e|e.isCoreDomain()) || app.modules.map[consumers as List<Consumer>].flatten.exists(e|e.isCoreDomain()) } def dispatch boolean isCoreDomain(DomainObject elem) { elem.hasCoreDomainHint() || elem.module.isCoreDomain() } def dispatch boolean isCoreDomain(Service elem) { elem.hasCoreDomainHint() || elem.module.isCoreDomain() } def dispatch boolean isCoreDomain(Consumer elem) { elem.hasCoreDomainHint() || elem.module.isCoreDomain() } def dispatch boolean isCoreDomain(NamedElement elem) { elem.hasCoreDomainHint() } def private boolean hasCoreDomainHint(NamedElement elem) { elem.getHint("umlgraph") == "core" } def showCompartment(NamedElement elem, int detail) { detail <= 1 || (detail == 2 && elem.isCoreDomain()) } def String labeldistance(Reference ref) { getProperty("umlgraph.labeldistance") } def String labelangle(Reference ref) { getProperty("umlgraph.labelangle") } // Return true if the given element should be included in the diagram at the given level of detail and for the given subjectArea def boolean includeInDiagram(NamedElement elem, int detail, String subjectArea) { elem.visible() && (detail != 0 || elem.isInSubjectArea(subjectArea)) } def dispatch boolean isInSubjectArea(ValueObject v, String subjectArea) { if ("entity" == subjectArea) v.isPersistent() else v.getSubjectAreas().contains(subjectArea) } def dispatch boolean isInSubjectArea(Entity e, String subjectArea) { if ("entity" == subjectArea) e.isPersistent() else e.getSubjectAreas().contains(subjectArea) } def dispatch boolean isInSubjectArea(NamedElement elem, String subjectArea) { elem.getSubjectAreas().contains(subjectArea) } def String toSingular(String str) { singularPluralConverter.toSingular(str) } }
Xtend
5
sculptor/sculptor
sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/ext/UmlGraphHelper.xtend
[ "Apache-2.0" ]
// RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s // This used to crash with a nullptr dereference because we didn't store a // snapshot in the FileContents of primary.swift when it is opened for the first // time but we are trying to access the snapshot when trying determining if we // can reuse the AST for the cursor info request // RUN: %sourcekitd-test \ // RUN: -req=open %t/primary.swift -- %t/primary.swift %t/secondary.swift \ // RUN: == -req=close %t/primary.swift \ // RUN: == -req=open %t/primary.swift -- %t/primary.swift \ // RUN: == -req=cursor -pos 2:8 %t/primary.swift -- %t/primary.swift %t/secondary.swift \ // RUN: | %FileCheck %s // BEGIN primary.swift struct Foo {} // CHECK: source.lang.swift.decl.struct // CHECK-NEXT: Foo // CHECK-NEXT: s:4main3FooV // BEGIN secondary.swift
Swift
5
xjc90s/swift
test/SourceKit/Misc/no-crash-reopen-with-different-compiler-args.swift
[ "Apache-2.0" ]
import time import os import pyautogui from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument("nwapp=" + os.path.dirname(os.path.abspath(__file__))) def assert_dom(id, expect): elem = driver.find_element_by_id(id) print elem.get_attribute('innerHTML') assert(expect in elem.get_attribute('innerHTML')) def test_reg(keys, pykeys=None, expect="success"): key = '+'.join(keys) id = 'reg-' + '-'.join(keys) reg_script = 'reg("%s", "%s")' % (id, key) print reg_script driver.execute_script(reg_script) if pykeys is not None: pyautogui.hotkey(*pykeys) if expect is not None: assert_dom(id, expect) def test_unreg(keys, expect="success"): key = '+'.join(keys) id = 'unreg-' + '-'.join(keys) unreg_script = 'unreg("%s", "%s")' % (id, key) print unreg_script driver.execute_script(unreg_script) assert_dom(id, expect) def test_reg_twice(keys1, keys2): test_reg(keys1, expect=None) test_reg(keys2, expect="failure") test_unreg(keys1) driver = webdriver.Chrome(executable_path=os.environ['CHROMEDRIVER'], chrome_options=chrome_options) try: print driver.current_url time.sleep(1) driver.implicitly_wait(10) test_reg_twice(['a'], ['a']) test_reg_twice(['a'], ['keya']) test_reg_twice(['keya'], ['a']) test_reg_twice(['1'], ['digit1']) test_reg_twice(['comma'], [',']) test_reg_twice(['up'], ['arrowup']) test_reg_twice(['mediatracknext'], ['medianexttrack']) test_reg_twice(['mediaprevtrack'], ['mediatrackprevious']) test_reg_twice(['ctrl', 'shift', 'b'], ['shift', 'ctrl', 'b']) test_unreg(['ctrl','shift','p'], expect="failure") finally: driver.quit()
Python
3
namaljayathunga/nw.js
test/remoting/shortcut-failure/test.py
[ "MIT" ]
\sqrt{x} = y \Rightarrow y \times y = x
TeX
1
sethaldini/paip-lisp
docs/images/chapter14/si2_e.tex
[ "MIT" ]
very foo is new Bar with "wow","doge"
Dogescript
0
erinkeith/dogescript
test/spec/var/new/multi-args-comma-no-space/source.djs
[ "MIT" ]
-- Tests covering different scenarios with qualified column names -- Scenario: column resolution scenarios with datasource table CREATE DATABASE mydb1; USE mydb1; CREATE TABLE t1 USING parquet AS SELECT 1 AS i1; CREATE DATABASE mydb2; USE mydb2; CREATE TABLE t1 USING parquet AS SELECT 20 AS i1; USE mydb1; SELECT i1 FROM t1; SELECT i1 FROM mydb1.t1; SELECT t1.i1 FROM t1; SELECT t1.i1 FROM mydb1.t1; SELECT mydb1.t1.i1 FROM t1; SELECT mydb1.t1.i1 FROM mydb1.t1; USE mydb2; SELECT i1 FROM t1; SELECT i1 FROM mydb1.t1; SELECT t1.i1 FROM t1; SELECT t1.i1 FROM mydb1.t1; SELECT mydb1.t1.i1 FROM mydb1.t1; -- Scenario: resolve fully qualified table name in star expansion USE mydb1; SELECT t1.* FROM t1; SELECT mydb1.t1.* FROM mydb1.t1; SELECT t1.* FROM mydb1.t1; USE mydb2; SELECT t1.* FROM t1; SELECT mydb1.t1.* FROM mydb1.t1; SELECT t1.* FROM mydb1.t1; SELECT a.* FROM mydb1.t1 AS a; -- Scenario: resolve in case of subquery USE mydb1; CREATE TABLE t3 USING parquet AS SELECT * FROM VALUES (4,1), (3,1) AS t3(c1, c2); CREATE TABLE t4 USING parquet AS SELECT * FROM VALUES (4,1), (2,1) AS t4(c2, c3); SELECT * FROM t3 WHERE c1 IN (SELECT c2 FROM t4 WHERE t4.c3 = t3.c2); SELECT * FROM mydb1.t3 WHERE c1 IN (SELECT mydb1.t4.c2 FROM mydb1.t4 WHERE mydb1.t4.c3 = mydb1.t3.c2); -- Scenario: column resolution scenarios in join queries SET spark.sql.crossJoin.enabled = true; SELECT mydb1.t1.i1 FROM t1, mydb2.t1; SELECT mydb1.t1.i1 FROM mydb1.t1, mydb2.t1; USE mydb2; SELECT mydb1.t1.i1 FROM t1, mydb1.t1; SET spark.sql.crossJoin.enabled = false; -- Scenario: Table with struct column USE mydb1; CREATE TABLE t5(i1 INT, t5 STRUCT<i1:INT, i2:INT>) USING parquet; INSERT INTO t5 VALUES(1, (2, 3)); SELECT t5.i1 FROM t5; SELECT t5.t5.i1 FROM t5; SELECT t5.t5.i1 FROM mydb1.t5; SELECT t5.i1 FROM mydb1.t5; SELECT t5.* FROM mydb1.t5; SELECT t5.t5.* FROM mydb1.t5; SELECT mydb1.t5.t5.i1 FROM mydb1.t5; SELECT mydb1.t5.t5.i2 FROM mydb1.t5; SELECT mydb1.t5.* FROM mydb1.t5; SELECT mydb1.t5.* FROM t5; -- Cleanup and Reset USE default; DROP DATABASE mydb1 CASCADE; DROP DATABASE mydb2 CASCADE;
SQL
4
OlegPt/spark
sql/core/src/test/resources/sql-tests/inputs/columnresolution.sql
[ "Apache-2.0" ]
/* * Copyright (c) 2010, Oracle America, Inc. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the "Oracle America, Inc." nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ %/* % * Find out about remote users % */ const RUSERS_MAXUSERLEN = 32; const RUSERS_MAXLINELEN = 32; const RUSERS_MAXHOSTLEN = 257; struct rusers_utmp { string ut_user<RUSERS_MAXUSERLEN>; /* aka ut_name */ string ut_line<RUSERS_MAXLINELEN>; /* device */ string ut_host<RUSERS_MAXHOSTLEN>; /* host user logged on from */ int ut_type; /* type of entry */ int ut_time; /* time entry was made */ unsigned int ut_idle; /* minutes idle */ }; typedef rusers_utmp utmp_array<>; #ifdef RPC_HDR % %/* % * Values for ut_type field above. % */ #endif const RUSERS_EMPTY = 0; const RUSERS_RUN_LVL = 1; const RUSERS_BOOT_TIME = 2; const RUSERS_OLD_TIME = 3; const RUSERS_NEW_TIME = 4; const RUSERS_INIT_PROCESS = 5; const RUSERS_LOGIN_PROCESS = 6; const RUSERS_USER_PROCESS = 7; const RUSERS_DEAD_PROCESS = 8; const RUSERS_ACCOUNTING = 9; program RUSERSPROG { version RUSERSVERS_3 { int RUSERSPROC_NUM(void) = 1; utmp_array RUSERSPROC_NAMES(void) = 2; utmp_array RUSERSPROC_ALLNAMES(void) = 3; } = 3; } = 100002; #ifdef RPC_HDR % % %#ifdef __cplusplus %extern "C" { %#endif % %#include <rpc/xdr.h> % %/* % * The following structures are used by version 2 of the rusersd protocol. % * They were not developed with rpcgen, so they do not appear as RPCL. % */ % %#define RUSERSVERS_IDLE 2 %#define RUSERSVERS 3 /* current version */ %#define MAXUSERS 100 % %/* % * This is the structure used in version 2 of the rusersd RPC service. % * It corresponds to the utmp structure for BSD systems. % */ %struct ru_utmp { % char ut_line[8]; /* tty name */ % char ut_name[8]; /* user id */ % char ut_host[16]; /* host name, if remote */ % long int ut_time; /* time on */ %}; % %struct utmparr { % struct ru_utmp **uta_arr; % int uta_cnt; %}; %typedef struct utmparr utmparr; % %extern bool_t xdr_utmparr (XDR *xdrs, struct utmparr *objp) __THROW; % %struct utmpidle { % struct ru_utmp ui_utmp; % unsigned int ui_idle; %}; % %struct utmpidlearr { % struct utmpidle **uia_arr; % int uia_cnt; %}; % %extern bool_t xdr_utmpidlearr (XDR *xdrs, struct utmpidlearr *objp) __THROW; % %#ifdef __cplusplus %} %#endif #endif #ifdef RPC_XDR %bool_t xdr_utmp (XDR *xdrs, struct ru_utmp *objp); % %bool_t %xdr_utmp (XDR *xdrs, struct ru_utmp *objp) %{ % /* Since the fields are char foo [xxx], we should not free them. */ % if (xdrs->x_op != XDR_FREE) % { % char *ptr; % unsigned int size; % ptr = objp->ut_line; % size = sizeof (objp->ut_line); % if (!xdr_bytes (xdrs, &ptr, &size, size)) { % return (FALSE); % } % ptr = objp->ut_name; % size = sizeof (objp->ut_name); % if (!xdr_bytes (xdrs, &ptr, &size, size)) { % return (FALSE); % } % ptr = objp->ut_host; % size = sizeof (objp->ut_host); % if (!xdr_bytes (xdrs, &ptr, &size, size)) { % return (FALSE); % } % } % if (!xdr_long(xdrs, &objp->ut_time)) { % return (FALSE); % } % return (TRUE); %} % %bool_t xdr_utmpptr(XDR *xdrs, struct ru_utmp **objpp); % %bool_t %xdr_utmpptr (XDR *xdrs, struct ru_utmp **objpp) %{ % if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp), % (xdrproc_t) xdr_utmp)) { % return (FALSE); % } % return (TRUE); %} % %bool_t %xdr_utmparr (XDR *xdrs, struct utmparr *objp) %{ % if (!xdr_array(xdrs, (char **)&objp->uta_arr, (u_int *)&objp->uta_cnt, % MAXUSERS, sizeof(struct ru_utmp *), % (xdrproc_t) xdr_utmpptr)) { % return (FALSE); % } % return (TRUE); %} % %bool_t xdr_utmpidle(XDR *xdrs, struct utmpidle *objp); % %bool_t %xdr_utmpidle (XDR *xdrs, struct utmpidle *objp) %{ % if (!xdr_utmp(xdrs, &objp->ui_utmp)) { % return (FALSE); % } % if (!xdr_u_int(xdrs, &objp->ui_idle)) { % return (FALSE); % } % return (TRUE); %} % %bool_t xdr_utmpidleptr(XDR *xdrs, struct utmpidle **objp); % %bool_t %xdr_utmpidleptr (XDR *xdrs, struct utmpidle **objpp) %{ % if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle), % (xdrproc_t) xdr_utmpidle)) { % return (FALSE); % } % return (TRUE); %} % %bool_t %xdr_utmpidlearr (XDR *xdrs, struct utmpidlearr *objp) %{ % if (!xdr_array(xdrs, (char **)&objp->uia_arr, (u_int *)&objp->uia_cnt, % MAXUSERS, sizeof(struct utmpidle *), % (xdrproc_t) xdr_utmpidleptr)) { % return (FALSE); % } % return (TRUE); %} #endif
Logos
5
JavascriptID/sourcerer-app
src/test/resources/samples/langs/RPC/rusers.x
[ "MIT" ]
// Functions vs. SynthDefs { SinOsc.ar(440, 0, 0.2) }.play; SynthDef.new("tutorial-SinOsc", { Out.ar(0, SinOsc.ar(440, 0, 0.2)) }).play; // Getting and freeing the Synth x = { SinOsc.ar(440, 0, 0.2) }.play; y = SynthDef.new("tutorial-SinOsc", { Out.ar(0, SinOsc.ar(440, 0, 0.2)) }).play; x.free; // receiver notation free(y); // function notation // execute first, by itself SynthDef.new("tutorial-PinkNoise", { Out.ar(0, PinkNoise.ar(0.3)) }).add; // then: x = Synth.new("tutorial-PinkNoise"); y = Synth.new("tutorial-PinkNoise"); x.free; y.free;` // first with a Function. Note the random frequency each time 'play' is called. f = { SinOsc.ar(440 + 200.rand, 0, 0.2) }; x = f.play; y = f.play; z = f.play; x.free; y.free; z.free; // Now with a SynthDef. No randomness! SynthDef("tutorial-NoRand", { Out.ar(0, SinOsc.ar(440 + 200.rand, 0, 0.2)) }).add; x = Synth("tutorial-NoRand"); y = Synth("tutorial-NoRand"); z = Synth("tutorial-NoRand"); x.free; y.free; z.free; // With Rand, it works! SynthDef("tutorial-Rand", { Out.ar(0, SinOsc.ar(Rand(440, 660), 0, 0.2)) }).add; x = Synth("tutorial-Rand"); y = Synth("tutorial-Rand"); z = Synth("tutorial-Rand"); x.free; y.free; z.free; ( SynthDef("tutorial-args", { arg freq = 440, out = 0; Out.ar(out, SinOsc.ar(freq, 0, 0.2)); }).add; ) x = Synth("tutorial-args"); y = Synth("tutorial-args", ["freq", 660]); z = Synth("tutorial-args", ["freq", 880, "out", 1]); x.free; y.free; z.free; // Changing values on a Synth after is has been created. ( SynthDef.new(\tutorial_args, { arg freq = 440, out = 0; Out.ar(out, SinOsc.ar(freq, 0, 0.2)); }).add; ) s.scope; // scope so you can see the effect x = Synth.new(\tutorial_args); x.set(\freq, 660); x.set(\freq, 880, "out", 1); x.free;
SuperCollider
4
drichardson/examples
SuperCollider/SynthDefsAndSynths.scd
[ "Unlicense" ]
SUMMARY = "Google Cloud Platform Root Certificates" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = " \ git://github.com/GoogleCloudPlatform/python-docs-samples;branch=master \ " SRCREV = "47a39ccedf3cfdaa7825269800af7bf1294cc79c" S = "${WORKDIR}/git" B = "${WORKDIR}/build" inherit deploy do_deploy() { install -d ${DEPLOYDIR}/persist/gcp install -m 0700 ${S}/iot/api-client/mqtt_example/resources/roots.pem ${DEPLOYDIR}/persist/gcp } addtask do_deploy after do_install before do_package
BitBake
4
tjwebb/community
tutorials/cloud-iot-mender-ota/image/meta-gcp-iot/recipes-gcp/gcp-root-certs/gcp-root-certs_git.bb
[ "Apache-2.0", "CC-BY-4.0" ]
asdfdsa
TXL
3
pseudoPixels/SourceFlow
app_txl_cloud/txl_tmp_file_dir/81c9ea43-c7ae-4f55-bae4-31d30f56b898.txl
[ "MIT" ]
The following is a list of professional events on Machine Learning and Artificial Intelligence ## Machine Learning and Artificial Intelligence * [AI & ML Events](https://aiml.events) - The best upcoming hand-picked conferences and exhibitions in the field of artificial intelligence and machine learning
Markdown
0
cvley/awesome-machine-learning
events.md
[ "CC0-1.0" ]
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as eslint from 'eslint'; import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; export = new class ApiEventNaming implements eslint.Rule.RuleModule { private static _nameRegExp = /on(Did|Will)([A-Z][a-z]+)([A-Z][a-z]+)?/; readonly meta: eslint.Rule.RuleMetaData = { docs: { url: 'https://github.com/microsoft/vscode/wiki/Extension-API-guidelines#event-naming' }, messages: { naming: 'Event names must follow this patten: `on[Did|Will]<Verb><Subject>`', verb: 'Unknown verb \'{{verb}}\' - is this really a verb? Iff so, then add this verb to the configuration', subject: 'Unknown subject \'{{subject}}\' - This subject has not been used before but it should refer to something in the API', unknown: 'UNKNOWN event declaration, lint-rule needs tweaking' } }; create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { const config = <{ allowed: string[], verbs: string[] }>context.options[0]; const allowed = new Set(config.allowed); const verbs = new Set(config.verbs); return { ['TSTypeAnnotation TSTypeReference Identifier[name="Event"]']: (node: any) => { const def = (<TSESTree.Identifier>node).parent?.parent?.parent; const ident = this.getIdent(def); if (!ident) { // event on unknown structure... return context.report({ node, message: 'unknown' }); } if (allowed.has(ident.name)) { // configured exception return; } const match = ApiEventNaming._nameRegExp.exec(ident.name); if (!match) { context.report({ node: ident, messageId: 'naming' }); return; } // check that <verb> is spelled out (configured) as verb if (!verbs.has(match[2].toLowerCase())) { context.report({ node: ident, messageId: 'verb', data: { verb: match[2] } }); } // check that a subject (if present) has occurred if (match[3]) { const regex = new RegExp(match[3], 'ig'); const parts = context.getSourceCode().getText().split(regex); if (parts.length < 3) { context.report({ node: ident, messageId: 'subject', data: { subject: match[3] } }); } } } }; } private getIdent(def: TSESTree.Node | undefined): TSESTree.Identifier | undefined { if (!def) { return; } if (def.type === AST_NODE_TYPES.Identifier) { return def; } else if ((def.type === AST_NODE_TYPES.TSPropertySignature || def.type === AST_NODE_TYPES.ClassProperty) && def.key.type === AST_NODE_TYPES.Identifier) { return def.key; } return this.getIdent(def.parent); } };
TypeScript
5
chanmaoooo/vscode
build/lib/eslint/vscode-dts-event-naming.ts
[ "MIT" ]
#define ADD(x,y) x+y ADD(2,5);
C++
3
r00ster91/serenity
Userland/Libraries/LibCpp/Tests/preprocessor/macro1.cpp
[ "BSD-2-Clause" ]
# # 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. # resource "aws_security_group" "elb" { name = "pulsar-elb" vpc_id = "${aws_vpc.pulsar_vpc.id}" ingress { from_port = 6650 to_port = 6650 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } ingress { from_port = 8080 to_port = 8080 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } } resource "aws_security_group" "default" { name = "pulsar-terraform" vpc_id = "${aws_vpc.pulsar_vpc.id}" # SSH access from anywhere ingress { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } # All ports open within the VPC ingress { from_port = 0 to_port = 65535 protocol = "tcp" cidr_blocks = ["${var.base_cidr_block}"] } # outbound internet access egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } tags { Name = "Pulsar-Security-Group" } }
HCL
4
turtlequeue/pulsar
deployment/terraform-ansible/aws/security.tf
[ "Apache-2.0" ]
from common import field for i in sorted(field): for j in range(0, 256): print("{} ^ {} = {}".format(i, j, i ^ j))
Sage
3
MarcoPolo/rust-sssmc39
tests/fixtures/gf256/gf256_pow.sage
[ "Apache-2.0" ]
// run-pass #![allow(dead_code)] pub fn main() { enum State { BadChar, BadSyntax } match State::BadChar { _ if true => State::BadChar, State::BadChar | State::BadSyntax => panic!() , }; }
Rust
4
Eric-Arellano/rust
src/test/ui/issues/issue-3895.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
- page_title _("Manifest import") %h3.page-title = _('Manifest file import') = render 'import/githubish_status', provider: 'manifest'
Haml
4
Testiduk/gitlabhq
app/views/import/manifest/status.html.haml
[ "MIT" ]
$! INSTALL.COM -- Installs the files in a given directory tree $! $! Author: Richard Levitte <richard@levitte.org> $! Time of creation: 22-MAY-1998 10:13 $! $! Changes by Zoltan Arpadffy <zoli@polarhome.com> $! $! P1 root of the directory tree $! P2 "64" for 64-bit pointers. $! $! $! Announce/identify. $! $ proc = f$environment( "procedure") $ write sys$output "@@@ "+ - f$parse( proc, , , "name")+ f$parse( proc, , , "type") $! $ on error then goto tidy $ on control_c then goto tidy $! $ if (p1 .eqs. "") $ then $ write sys$output "First argument missing." $ write sys$output - "It should be the directory where you want things installed." $ exit $ endif $! $ if (f$getsyi( "cpu") .lt. 128) $ then $ arch = "VAX" $ else $ arch = f$edit( f$getsyi( "arch_name"), "upcase") $ if (arch .eqs. "") then arch = "UNK" $ endif $! $ archd = arch $ lib32 = "32" $ shr = "_SHR32" $! $ if (p2 .nes. "") $ then $ if (p2 .eqs. "64") $ then $ archd = arch+ "_64" $ lib32 = "" $ shr = "_SHR" $ else $ if (p2 .nes. "32") $ then $ write sys$output "Second argument invalid." $ write sys$output "It should be "32", "64", or nothing." $ exit $ endif $ endif $ endif $! $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" $ root_dev = f$parse( root, , , "device", "syntax_only") $ root_dir = f$parse( root, , , "directory", "syntax_only") - - "[000000." - "][" - "[" - "]" $ root = root_dev + "[" + root_dir $! $ define /nolog wrk_sslroot 'root'.] /trans=conc $ define /nolog wrk_sslinclude wrk_sslroot:[include] $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] $! $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - create /directory /log wrk_sslroot:[000000] $ if f$parse("wrk_sslinclude:") .eqs. "" then - create /directory /log wrk_sslinclude: $ if f$parse("wrk_sslxlib:") .eqs. "" then - create /directory /log wrk_sslxlib: $! $ sdirs := , - 'archd', - objects, - md2, md4, md5, sha, mdc2, hmac, ripemd, whrlpool, - des, aes, rc2, rc4, rc5, idea, bf, cast, camellia, seed, - bn, ec, rsa, dsa, ecdsa, dh, ecdh, dso, engine, - buffer, bio, stack, lhash, rand, err, - evp, asn1, pem, x509, x509v3, conf, txt_db, pkcs7, pkcs12, comp, ocsp, - ui, krb5, - store, cms, pqueue, ts, jpake $! $ exheader_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h $ exheader_'archd' := opensslconf.h $ exheader_objects := objects.h, obj_mac.h $ exheader_md2 := md2.h $ exheader_md4 := md4.h $ exheader_md5 := md5.h $ exheader_sha := sha.h $ exheader_mdc2 := mdc2.h $ exheader_hmac := hmac.h $ exheader_ripemd := ripemd.h $ exheader_whrlpool := whrlpool.h $ exheader_des := des.h, des_old.h $ exheader_aes := aes.h $ exheader_rc2 := rc2.h $ exheader_rc4 := rc4.h $ exheader_rc5 := rc5.h $ exheader_idea := idea.h $ exheader_bf := blowfish.h $ exheader_cast := cast.h $ exheader_camellia := camellia.h $ exheader_seed := seed.h $ exheader_modes := modes.h $ exheader_bn := bn.h $ exheader_ec := ec.h $ exheader_rsa := rsa.h $ exheader_dsa := dsa.h $ exheader_ecdsa := ecdsa.h $ exheader_dh := dh.h $ exheader_ecdh := ecdh.h $ exheader_dso := dso.h $ exheader_engine := engine.h $ exheader_buffer := buffer.h $ exheader_bio := bio.h $ exheader_stack := stack.h, safestack.h $ exheader_lhash := lhash.h $ exheader_rand := rand.h $ exheader_err := err.h $ exheader_evp := evp.h $ exheader_asn1 := asn1.h, asn1_mac.h, asn1t.h $ exheader_pem := pem.h, pem2.h $ exheader_x509 := x509.h, x509_vfy.h $ exheader_x509v3 := x509v3.h $ exheader_conf := conf.h, conf_api.h $ exheader_txt_db := txt_db.h $ exheader_pkcs7 := pkcs7.h $ exheader_pkcs12 := pkcs12.h $ exheader_comp := comp.h $ exheader_ocsp := ocsp.h $ exheader_ui := ui.h, ui_compat.h $ exheader_krb5 := krb5_asn.h $! exheader_store := store.h, str_compat.h $ exheader_store := store.h $ exheader_cms := cms.h $ exheader_pqueue := pqueue.h $ exheader_ts := ts.h $ exheader_jpake := jpake.h $ libs := ssl_libcrypto $! $ exe_dir := [-.'archd'.exe.crypto] $! $! Header files. $! $ i = 0 $ loop_sdirs: $ d = f$edit( f$element( i, ",", sdirs), "trim") $ i = i + 1 $ if d .eqs. "," then goto loop_sdirs_end $ tmp = exheader_'d' $ if (d .nes. "") then d = "."+ d $ copy /protection = w:re ['d']'tmp' wrk_sslinclude: /log $ goto loop_sdirs $ loop_sdirs_end: $! $! Object libraries, shareable images. $! $ i = 0 $ loop_lib: $ e = f$edit( f$element( i, ",", libs), "trim") $ i = i + 1 $ if e .eqs. "," then goto loop_lib_end $ set noon $ file = exe_dir+ e+ lib32+ ".olb" $ if f$search( file) .nes. "" $ then $ copy /protection = w:re 'file' wrk_sslxlib: /log $ endif $! $ file = exe_dir+ e+ shr+ ".exe" $ if f$search( file) .nes. "" $ then $ copy /protection = w:re 'file' wrk_sslxlib: /log $ endif $ set on $ goto loop_lib $ loop_lib_end: $! $ tidy: $! $ call deass wrk_sslroot $ call deass wrk_sslinclude $ call deass wrk_sslxlib $! $ exit $! $ deass: subroutine $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") $ then $ deassign /process 'p1' $ endif $ endsubroutine $!
DIGITAL Command Language
3
loganfsmyth/node
deps/openssl/openssl/crypto/install-crypto.com
[ "BSD-2-Clause" ]
// MIR for `move_out_from_end` 0 mir_map fn move_out_from_end() -> () { let mut _0: (); // return place in scope 0 at $DIR/uniform_array_move_out.rs:4:24: 4:24 let _1: [std::boxed::Box<i32>; 2]; // in scope 0 at $DIR/uniform_array_move_out.rs:5:9: 5:10 let mut _2: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 let mut _3: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 let mut _4: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 let mut _5: *mut u8; // in scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 let mut _6: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 let mut _7: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 let mut _8: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 let mut _9: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 let mut _10: *mut u8; // in scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 let mut _11: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 scope 1 { debug a => _1; // in scope 1 at $DIR/uniform_array_move_out.rs:5:9: 5:10 let _12: std::boxed::Box<i32>; // in scope 1 at $DIR/uniform_array_move_out.rs:6:14: 6:16 scope 4 { debug _y => _12; // in scope 4 at $DIR/uniform_array_move_out.rs:6:14: 6:16 } } scope 2 { } scope 3 { } bb0: { StorageLive(_1); // scope 0 at $DIR/uniform_array_move_out.rs:5:9: 5:10 StorageLive(_2); // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 _3 = SizeOf(i32); // scope 2 at $DIR/uniform_array_move_out.rs:5:14: 5:19 _4 = AlignOf(i32); // scope 2 at $DIR/uniform_array_move_out.rs:5:14: 5:19 _5 = alloc::alloc::exchange_malloc(move _3, move _4) -> [return: bb1, unwind: bb12]; // scope 2 at $DIR/uniform_array_move_out.rs:5:14: 5:19 // mir::Constant // + span: $DIR/uniform_array_move_out.rs:5:14: 5:19 // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar(<ZST>)) } } bb1: { StorageLive(_6); // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 _6 = ShallowInitBox(move _5, i32); // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 (*_6) = const 1_i32; // scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 _2 = move _6; // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 drop(_6) -> [return: bb2, unwind: bb11]; // scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 } bb2: { StorageDead(_6); // scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 StorageLive(_7); // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 _8 = SizeOf(i32); // scope 3 at $DIR/uniform_array_move_out.rs:5:21: 5:26 _9 = AlignOf(i32); // scope 3 at $DIR/uniform_array_move_out.rs:5:21: 5:26 _10 = alloc::alloc::exchange_malloc(move _8, move _9) -> [return: bb3, unwind: bb11]; // scope 3 at $DIR/uniform_array_move_out.rs:5:21: 5:26 // mir::Constant // + span: $DIR/uniform_array_move_out.rs:5:21: 5:26 // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(Scalar(<ZST>)) } } bb3: { StorageLive(_11); // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 _11 = ShallowInitBox(move _10, i32); // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 (*_11) = const 2_i32; // scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 _7 = move _11; // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 drop(_11) -> [return: bb4, unwind: bb10]; // scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 } bb4: { StorageDead(_11); // scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 _1 = [move _2, move _7]; // scope 0 at $DIR/uniform_array_move_out.rs:5:13: 5:27 drop(_7) -> [return: bb5, unwind: bb11]; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb5: { StorageDead(_7); // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 drop(_2) -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb6: { StorageDead(_2); // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 FakeRead(ForLet(None), _1); // scope 0 at $DIR/uniform_array_move_out.rs:5:9: 5:10 StorageLive(_12); // scope 1 at $DIR/uniform_array_move_out.rs:6:14: 6:16 _12 = move _1[1 of 2]; // scope 1 at $DIR/uniform_array_move_out.rs:6:14: 6:16 _0 = const (); // scope 0 at $DIR/uniform_array_move_out.rs:4:24: 7:2 drop(_12) -> [return: bb7, unwind: bb9]; // scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 } bb7: { StorageDead(_12); // scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 drop(_1) -> [return: bb8, unwind: bb12]; // scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 } bb8: { StorageDead(_1); // scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 return; // scope 0 at $DIR/uniform_array_move_out.rs:7:2: 7:2 } bb9 (cleanup): { drop(_1) -> bb12; // scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 } bb10 (cleanup): { drop(_7) -> bb11; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb11 (cleanup): { drop(_2) -> bb12; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb12 (cleanup): { resume; // scope 0 at $DIR/uniform_array_move_out.rs:4:1: 7:2 } }
Mirah
3
ohno418/rust
src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
.direct-child--type>Button { background-color: red; color: white; } .direct-child--class>.test-child { background-color: blue; color: white; } .direct-sibling--type Button+Label { background-color: green; color: white; } .direct-sibling--id #test-child+#test-child-2 { background-color: pink; } .direct-sibling--class .test-child+.test-child-2 { background-color: yellow; } .direct-sibling--attribute Button[data="test-child"]+Button[data="test-child-2"] { background-color: blueviolet; color: white; } .direct-sibling--pseudo-selector Button+Button:disabled { background-color: black; color: white; } .sibling-test-label { text-align: center; }
CSS
3
tralves/NativeScript
apps/ui/src/css/combinators-page.css
[ "Apache-2.0" ]
/******************************************************************************** * Copyright (c) {date} Red Hat Inc. and/or its affiliates and others * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * http://www.apache.org/licenses/LICENSE-2.0 * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ import ceylon.collection { HashMap } import org.eclipse.ceylon.ide.common.model { Severity } import org.eclipse.ceylon.ide.intellij.model { IdeaCeylonProject } class ProblemsModel() { value problemsByProject = HashMap<IdeaCeylonProject, Problems>(); class Problems(project, frontendMessages, backendMessages, projectMessages) { IdeaCeylonProject project; {SourceMsg*}? frontendMessages; {SourceMsg*}? backendMessages; {ProjectMsg*}? projectMessages; shared Integer count(Severity s) => [frontendMessages, backendMessages, projectMessages].coalesced.fold(0, (initial, messages) => initial + messages.count((msg) => msg.severity == s)); shared Integer countWarnings() => count(Severity.warning); shared Integer countErrors() => count(Severity.error); shared {BuildMsg*} allMessages => expand([frontendMessages, backendMessages, projectMessages].coalesced); } shared void updateProblems(IdeaCeylonProject project, {SourceMsg*}? frontendMessages, {SourceMsg*}? backendMessages, {ProjectMsg*}? projectMessages) { problemsByProject[project] = Problems { project = project; frontendMessages = frontendMessages; backendMessages = backendMessages; projectMessages = projectMessages; }; } shared Integer count(Severity s) => problemsByProject.items.fold(0, (sum, item) => sum + item.count(s)); shared Integer countWarnings() => problemsByProject.items.fold(0, (sum, item) => sum + item.countWarnings()); shared Integer countErrors() => problemsByProject.items.fold(0, (sum, item) => sum + item.countErrors()); shared {BuildMsg*} allMessages => expand(problemsByProject.items.map(Problems.allMessages)); shared void clear() { problemsByProject.clear(); } }
Ceylon
4
Kopilov/ceylon-ide-intellij
source/org/eclipse/ceylon/ide/intellij/messages/ProblemsModel.ceylon
[ "Apache-2.0" ]
# validate new test case (Figure8_7.java) with(simplex); Constraints := [ # conservation of units at each node e13+e14+e41+e15 = 400, # CHI e21+e23+e24+e25 = 400, # DC e13+e23 = 300, # HOU e14+e41+e24 = 200, # ATL e15+e25 = 300, # BOS # maximum flow on individual edges 0 <= e13, e13 <= 200, 0 <= e14, e14 <= 350, 0 <= e41, e41 <= 200, 0 <= e21, e21 <= 200, 0 <= e23, e23 <= 280, 0 <= e15, e15 <= 200, 0 <= e24, e24 <= 200, 0 <= e25, e25 <= 350 ]; Cost := 3*e41 + 7*e13 + 3*e14 + 4*e21 + 4*e23 + 7*e24 + 6*e15 + 6*e25; # Invoke linear programming to solve problem minimize (Cost, Constraints, NONNEGATIVE);
Maple
4
konny0311/algorithms-nutshell-2ed
Code/Maple/Chapter-8/testCommands.mpl
[ "MIT" ]
/******************************************************************************** * Copyright (c) {date} Red Hat Inc. and/or its affiliates and others * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * http://www.apache.org/licenses/LICENSE-2.0 * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ import org.eclipse.ceylon.model.typechecker.model { Declaration } shared interface CeylonLightElement { shared formal Declaration declaration; }
Ceylon
3
Kopilov/ceylon-ide-intellij
source/org/eclipse/ceylon/ide/intellij/lightpsi/CeylonLightElement.ceylon
[ "Apache-2.0" ]
$TTL 300 @ IN A 127.0.0.1 a IN CNAME b.domain.tld. aaa IN A 127.0.0.3 c IN CNAME d.domain.tld. sub IN A 127.0.0.7 bbb.sub IN A 127.0.0.4 ccc.sub IN A 127.0.0.5 e.sub IN CNAME f.sub.domain.tld. i.sub IN CNAME j.sub.domain.tld. ddd.sub.sub IN A 127.0.0.6 g.sub.sub IN CNAME h.sub.sub.domain.tld. www IN A 127.0.0.2
DNS Zone
3
hosting-de-labs/dnscontrol
pkg/js/parse_tests/030-dextenddoc/domain.tld.zone
[ "MIT" ]
#!/bin/bash set -eu SCRIPT_DIR=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd) ROOT_DIR="$(realpath "$SCRIPT_DIR"/..)"; if ! [ -x "$(command -v shellcheck)" ]; then echo '' echo 'ShellCheck not found.' echo 'For more info: https://github.com/koalaman/shellcheck#installing"' echo '' exit 1 fi shellcheck "$ROOT_DIR"/**/*.sh
Shell
4
JQuinnie/gatsby
scripts/lint-shell-scripts.sh
[ "MIT" ]
/* 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_DELEGATES_GPU_GL_EGL_CONTEXT_H_ #define TENSORFLOW_LITE_DELEGATES_GPU_GL_EGL_CONTEXT_H_ #include "tensorflow/lite/delegates/gpu/common/status.h" #include "tensorflow/lite/delegates/gpu/gl/portable_egl.h" namespace tflite { namespace gpu { namespace gl { // EglContext is an RAII wrapper for an EGLContext. // // EglContext is moveable but not copyable. // // See https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglIntro.xhtml for // more info. class EglContext { public: // Creates an invalid EglContext. EglContext() : context_(EGL_NO_CONTEXT), display_(EGL_NO_DISPLAY), config_(EGL_NO_CONFIG_KHR), has_ownership_(false) {} EglContext(EGLContext context, EGLDisplay display, EGLConfig config, bool has_ownership) : context_(context), display_(display), config_(config), has_ownership_(has_ownership) {} // Move only EglContext(EglContext&& other); EglContext& operator=(EglContext&& other); EglContext(const EglContext&) = delete; EglContext& operator=(const EglContext&) = delete; ~EglContext() { Invalidate(); } EGLContext context() const { return context_; } EGLDisplay display() const { return display_; } EGLConfig config() const { return config_; } // Make this EglContext the current EGL context on this thread, replacing // the existing current. absl::Status MakeCurrent(EGLSurface read, EGLSurface write); absl::Status MakeCurrentSurfaceless() { return MakeCurrent(EGL_NO_SURFACE, EGL_NO_SURFACE); } // Returns true if this is the currently bound EGL context. bool IsCurrent() const; // Returns true if this object actually owns corresponding EGL context // and manages it's lifetime. bool has_ownership() const { return has_ownership_; } private: void Invalidate(); EGLContext context_; EGLDisplay display_; EGLConfig config_; bool has_ownership_; }; // It uses the EGL_KHR_no_config_context extension to create a no config context // since most modern hardware supports the extension. absl::Status CreateConfiglessContext(EGLDisplay display, EGLContext shared_context, EglContext* egl_context); absl::Status CreateSurfacelessContext(EGLDisplay display, EGLContext shared_context, EglContext* egl_context); absl::Status CreatePBufferContext(EGLDisplay display, EGLContext shared_context, EglContext* egl_context); } // namespace gl } // namespace gpu } // namespace tflite #endif // TENSORFLOW_LITE_DELEGATES_GPU_GL_EGL_CONTEXT_H_
C
5
yage99/tensorflow
tensorflow/lite/delegates/gpu/gl/egl_context.h
[ "Apache-2.0" ]
/****************************************************************************** * Copyright 2020 The Beijing Smarter Eye Technology Co.Ltd 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 PROTOCOL_H #define PROTOCOL_H #include <cstdint> namespace SATP { class BlockHandler; class Protocol { public: enum TramsmitPriority { DropWhenBusy = 0, EnqueueForcedly, WaitToSend }; virtual bool isConnected() = 0; virtual bool isAppendable() = 0; virtual void sendBlock(uint32_t dataType, const char *block, int size, TramsmitPriority priority = DropWhenBusy) = 0; virtual void registerBlockHandler(BlockHandler *blockHandler) = 0; virtual void unregisterBlockHandler(BlockHandler *blockHandler) = 0; }; } #endif // PROTOCOL_H
C
4
jzjonah/apollo
third_party/camera_library/smartereye/include/protocol.h
[ "Apache-2.0" ]
INSERT INTO t VALUES (), (), ();
SQL
0
imtbkcat/tidb-lightning
tests/default-columns/data/defcol.t.2.sql
[ "Apache-2.0" ]
.[] .head .label
JSONiq
0
hjyuan/reapoc
2019/CVE-2019-1020010/vultarget/web/source/.autogen/check_pr.jq
[ "Apache-2.0" ]
@GrabResolver(name="test", root="file:./src/test/plugins") @Grab("custom:custom:0.0.1") @Controller class Foo {} println "Hello Grab"
Groovy
3
Martin-real/spring-boot-2.1.0.RELEASE
spring-boot-project/spring-boot-cli/src/test/resources/grab.groovy
[ "Apache-2.0" ]
datatype smbus_status = | SMBusOk of () | SMBusBadLen of () | SMBusNack of () | SMBusOther of () fun send_byte (address: uint8, command: uint8): smbus_status fun write_byte (address: uint8, command: uint8, data: uint8): smbus_status fun write_word (address: uint8, command: uint8, data: uint16): smbus_status fun read_byte (address: uint8, command: uint8): (smbus_status, uint8) fun read_word (address: uint8, command: uint8): (smbus_status, uint16) fun show_smbus_status (status: smbus_status): void
ATS
3
Proclivis/arduino-ats
SATS/smbus.sats
[ "MIT" ]
{} (:package |app) :configs $ {} (:init-fn |app.main/main!) (:reload-fn |app.main/reload!) :modules $ [] |respo.calcit/ |lilac/ |memof/ |respo-ui.calcit/ |respo-markdown.calcit/ |reel.calcit/ |respo-cirru-editor.calcit/ :version nil :files $ {} |app.comp.candidates $ {} :ns $ quote ns app.comp.candidates $ :require [] respo-ui.core :refer $ [] hsl [] respo.core :refer $ [] defcomp list-> <> div span a textarea button [] respo.comp.space :refer $ [] =< [] app.style.widget :as widget [] app.style.typeset :as typeset [] respo-ui.core :as ui [] keycode.core :as keycode [] app.code :as code app.schema :refer $ examples :defs $ {} |comp-candidates $ quote defcomp comp-candidates () $ list-> {} $ :style merge ui/row $ {} (:height 48) :color $ hsl 230 80 80 0.8 :font-family "|Josefin Sans, serif-sans" -> examples (.to-list) .map-pair $ fn (alias example) [] alias $ div {} :style $ {} (:margin 8) (:cursor :pointer) :on-click $ fn (e d!) (d! :load-tree example) <> $ turn-string alias |app.comp.container $ {} :ns $ quote ns app.comp.container $ :require [] respo-ui.core :refer $ [] hsl [] respo.core :refer $ [] defcomp <> div span a textarea button [] respo.comp.space :refer $ [] =< [] app.style.widget :as widget [] app.style.typeset :as typeset [] respo-ui.core :as ui [] cirru-editor.comp.editor :refer $ [] comp-editor [] cirru-editor.util.dom :refer $ [] focus! [] fipp.edn :refer $ [] pprint [] app.comp.candidates :refer $ [] comp-candidates [] respo-md.comp.md :refer $ [] comp-md-block comp-md app.config :as config :defs $ {} |on-command $ quote defn on-command (snapshot dispatch! e) (println |command e) let event $ :event e if and (.-metaKey event) = config/key-s $ .-keyCode event do dispatch! :write-code $ format-to-lisp (:tree snapshot) .preventDefault event |comp-explorer $ quote defcomp comp-explorer (states store snapshot) div {} $ :style (merge ui/center ui/row style-theme) div {} $ :style (merge ui/flex ui/column) comp-candidates comp-editor states snapshot on-update! on-command ; div $ {} :style $ {} (:width 1) :background-color $ hsl 0 0 100 0.3 div {} $ :style merge ui/column $ {} (:width |38.2%) (:background-color :white) div {} $ :style {} $ :padding 8 button {} (:style ui/button) :on-click $ fn (e d!) d! :write-code $ js/JSON.stringify to-js-data $ :tree snapshot , nil 2 <> |JSON =< 8 nil button {} (:style ui/button) :on-click $ fn (e d!) d! :write-code $ format-cirru-edn (:tree snapshot) <> |EDN =< 8 nil button {} (:style ui/button) :on-click $ fn (e d!) d! :write-code $ format-cirru (:tree snapshot) <> "|Indentation Syntax" =< 8 nil button {} (:style ui/button) :on-click $ fn (e d!) d! :write-code $ format-to-lisp (:tree snapshot) <> |S-Expression textarea $ {} :style $ merge ui/textarea ui/flex {} (:font-family "|Source Code Pro, Menlo, Consolas, monospace") (:width |100%) (:white-space :pre) :value $ :code store :disabled true |style-theme $ quote def style-theme $ {} (:height "\"100vh") :background-color $ hsl 300 80 10 |comp-container $ quote defcomp comp-container (store) let states $ :states store snapshot $ :snapshot store div {} $ :style (merge ui/global) render-banner div {} $ :style {} $ :padding 16 comp-md-block "\"Cirru project is now concentrated on [calcit-editor](https://github.com/Cirru/calcit-editor), you can install it with:\n\n```bash\nnpm install -g calcit-editor\n```" $ {} (:text-align :center) comp-explorer states store snapshot render-code-intro |render-code-intro $ quote defn render-code-intro () $ div {} $ :style merge $ {} (:width 1000) (:margin :auto) (:padding "|120px 0 120px 0") comp-md-block "|### Tree Editor\n\nCirru Project's main purpose is to replacing parentheses with moderner tools like graphical editors. I finished creating one and now it's called \"Calcit Editor\". I use it for my daily personal projects including building this page.\n\n* [Calcit Editor](https://github.com/Cirru/calcit-editor) -- main tool of Cirru project, which edits S-expressions and generates Clojure code. It uses a snapshot file called `calcit.edn`.\n* [Calcit Viewer](https://github.com/Cirru/calcit-viewer) -- displays `calcit.edn` with DOM.\n* [Respo Cirru Editor](https://github.com/Cirru/respo-cirru-editor) -- old library to realise S-expressions editing on Web.\n\n### Old Indentation-based Syntax\n\n[Cirru Indentation Format](http://text.cirru.org/) has been shadowed by the new editor. Only a small portion of libraries are maintained, but you can still access some of them like Parser and Writer.\n\n* [Cirru Writer](https://github.com/Cirru/writer.clj) -- ClojureScript library to generate Cirru Indentation Format.\n* [Cirru Parser](https://github.com/Cirru/parser.clj) -- ClojureScript library to parse Cirru Indentation Format.\n* [Cirru Indentation Format home page](https://github.com/Cirru/text.cirru.org) -- a list of old resources related to the format.\n\n### Updates\n\n\nYou may find old entries related to Cirru on [Medium](https://medium.com/cirru-project) and [Twitter](https://twitter.com/cirrulang). More information are just spread on my Twitter and Weibo or blogs, you may find them by searching anyway. We may [discuss on Twitter](https://twitter.com/jiyinyiyong).\n" $ {} |style-project $ quote def style-project $ {} :color $ hsl 200 80 60 |style-banner-text $ quote def style-banner-text $ {} (:font-size |64px) |style-content $ quote def style-content $ {} (:font-size |16px) |on-update! $ quote defn on-update! (snapshot dispatch!) (dispatch! :save snapshot) (focus!) |style-banner $ quote def style-banner $ {} (:height 320) :background-color $ hsl 200 100 70 :color $ hsl 0 0 100 |style-link $ quote def style-link $ {} (:font-size |20px) :color $ hsl 0 0 100 :font-weight |lighter :text-decoration |none |render-banner $ quote defn render-banner () $ div {} $ :style (merge ui/center style-banner) div {} $ :style (merge typeset/title style-banner-text) <> "|Cirru: modern interface for S-expressions" div ({}) a $ {} (:href |https://github.com/Cirru/respo-cirru-editor/wiki/Keyboard-Shortcuts) (:inner-text "|Keyboard Shortcuts") (:target |_blank) (:style style-link) =< 80 nil a $ {} (:href |https://www.youtube.com/playlist?list=PLyvBXLgHYHy1AIK6i5uw3_H5BIUP4CQx6) (:inner-text |Videos) (:target |_blank) (:style style-link) =< 80 nil a $ {} (:href |http://text.cirru.org) (:inner-text "|Text syntax") (:target |_blank) (:style style-link) |app.schema $ {} :ns $ quote ns app.schema $ :require ([] app.code :as code) :defs $ {} |store $ quote def store $ {} :states $ {} :snapshot snapshot :code | |snapshot $ quote def snapshot $ {} :tree $ parse-cirru (inline "\"component.cirru") :focus $ [] :clipboard $ [] |inline $ quote defmacro inline (path) read-file $ str "\"examples/" path |examples $ quote def examples $ {} :case $ parse-cirru (inline "\"case.cirru") :comment $ parse-cirru (inline "\"comment.cirru") :cond $ parse-cirru (inline "\"cond.cirru") :def $ parse-cirru (inline "\"def.cirru") :doseq $ parse-cirru (inline "\"doseq.cirru") :fn* $ parse-cirru (inline "\"fn-star.cirru") :fn $ parse-cirru (inline "\"fn.cirru") :let $ parse-cirru (inline "\"let.cirru") :loop $ parse-cirru (inline "\"loop.cirru") :map $ parse-cirru (inline "\"map.cirru") :namespace $ parse-cirru (inline "\"namespace.cirru") :vector $ parse-cirru (inline "\"vector.cirru") :component $ parse-cirru (inline "\"component.cirru") |app.style.typeset $ {} :ns $ quote (ns app.style.typeset) :defs $ {} |title $ quote def title $ {} (:font-family "|'Josefin Sans', sans-serif") (:font-weight |lighter) |app.main $ {} :ns $ quote ns app.main $ :require [] respo.core :refer $ [] render! clear-cache! realize-ssr! [] respo.cursor :refer $ [] update-states [] app.comp.container :refer $ [] comp-container [] cljs.reader :refer $ [] read-string [] app.schema :as schema [] keycode.core :as keycode [] cirru-sepal.core :refer $ [] write-code [] app.config :as config "\"./calcit.build-errors" :default build-errors "\"bottom-tip" :default hud! :defs $ {} |render-app! $ quote defn render-app! () $ render! mount-target (comp-container @*store) dispatch! |mount-target $ quote def mount-target $ .querySelector js/document |.app |main! $ quote defn main! () println "\"Running mode:" $ if config/dev? "\"dev" "\"release" render-app! add-watch *store :changes $ fn (s p) (render-app!) .addEventListener js/window |keydown $ fn (event) if and (.-metaKey event) = config/key-s $ .-keyCode event do (println |Build) (.preventDefault event) dispatch! :write-code $ format-to-lisp :tree $ :snapshot @*store println "\"App started!" |*store $ quote (defatom *store schema/store) |dispatch! $ quote defn dispatch! (op op-data) when config/dev? $ println "\"Dispatch:" op let next-store $ case op :save $ assoc @*store :snapshot op-data :write-code $ assoc @*store :code op-data :load-tree $ assoc-in @*store ([] :snapshot :tree) op-data , @*store reset! *store next-store |reload! $ quote defn reload! () $ if (nil? build-errors) do (remove-watch *store :changes) (clear-cache!) add-watch *store :changes $ fn (r prev) (render-app!) render-app! hud! "\"ok~" "\"Ok" hud! "\"error" build-errors |app.style.widget $ {} :ns $ quote ns app.style.widget $ :require [] hsl.core :refer $ [] hsl :defs $ {} |button $ quote def button $ {} (:color |white) (:line-height 2) :background-color $ hsl 200 90 60 :display |inline-block :padding "|0 8px" |global $ quote def global $ {} (:font-family |Verdana) |app.config $ {} :ns $ quote (ns app.config) :defs $ {} |dev? $ quote def dev? $ = "\"dev" (get-env "\"mode") |site $ quote def site $ {} (:dev-ui "\"http://localhost:8100/main-fonts.css") (:release-ui "\"http://cdn.tiye.me/favored-fonts/main-fonts.css") (:cdn-url "\"http://cdn.tiye.me/cirru-org/") (:cdn-folder "\"tiye.me:cdn/cirru-org") (:title "\"Cirru: an editor for AST") (:icon "\"http://cdn.tiye.me/logo/cirru.png") (:storage-key "\"cirru-org") (:upload-folder "\"tiye.me:repo/Cirru/cirru.org/") |key-s $ quote (def key-s 83)
Cirru
5
Cirru/cirru.org
compact.cirru
[ "MIT" ]
namespace DebugStub // Helper functions which make it easier to use serial stuff function ComReadEAX { repeat 4 times { ComReadAL() EAX ~> 8 } } // Input: EDI // Output: [EDI] // Modified: AL, DX, EDI (+1) // // Reads a byte into [EDI] and does EDI + 1 function ComRead8 { ComReadAL() [EDI] = AL EDI += 1 } function ComRead16 { repeat 2 times { ComRead8() } } function ComRead32 { repeat 4 times { ComRead8() } } // Input: AL // Output: None // Modifies: EDX function ComWriteAL { +ESI +EAX ESI = ESP ComWrite8() // Is a local var, cant use Return(4). X// issues the return. // This also allows the function to preserve EAX. -EAX -ESI } function ComWriteAX { // Input: AX // Output: None // Modifies: EDX, ESI +EAX ESI = ESP ComWrite16() // Is a local var, cant use Return(4). X// issues the return. // This also allow the function to preserve EAX. -EAX } function ComWriteEAX { // Input: EAX // Output: None // Modifies: EDX, ESI +EAX ESI = ESP ComWrite32() // Is a local var, cant use Return(4). X// issues the return. // This also allow the function to preserve EAX. -EAX } function ComWrite16 { ComWrite8() ComWrite8() } function ComWrite32 { ComWrite8() ComWrite8() ComWrite8() ComWrite8() } function ComWriteX { More: ComWrite8() ECX-- if !0 goto More }
XS
4
marcelocaetano/XSharp
playground/SerialHelpers.xs
[ "BSD-3-Clause" ]
<?php /* ***************************************************************************** *** *** Laudanum Project *** A Collection of Injectable Files used during a Penetration Test *** *** More information is available at: *** http://laudanum.secureideas.net *** laudanum@secureideas.net *** *** Project Leads: *** Kevin Johnson <kjohnson@secureideas.net *** Tim Medin <tim@securitywhole.com> *** *** Copyright 2012 by Kevin Johnson and the Laudanum Team *** ******************************************************************************** *** *** This file allows browsing of the file system. *** Written by Tim Medin <tim@securitywhole.com> *** ******************************************************************************** *** This program is free software; you can redistribute it and/or *** modify it under the terms of the GNU General Public License *** as published by the Free Software Foundation; either version 2 *** of the License, or (at your option) any later version. *** *** This program is distributed in the hope that it will be useful, *** but WITHOUT ANY WARRANTY; without even the implied warranty of *** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *** GNU General Public License for more details. *** *** You can get a copy of the GNU General Public License from this *** address: http://www.gnu.org/copyleft/gpl.html#SEC1 *** You can also write to the Free Software Foundation, Inc., 59 Temple *** Place - Suite 330, Boston, MA 02111-1307, USA. *** ***************************************************************************** */ // ***************** Config entries below *********************** // IPs are enterable as individual addresses TODO: add CIDR support $allowedIPs = array("192.168.1.1","127.0.0.1"); # *********** No editable content below this line ************** $allowed = 0; foreach ($allowedIPs as $IP) { if ($_SERVER["REMOTE_ADDR"] == $IP) $allowed = 1; } if ($allowed == 0) { header("HTTP/1.0 404 Not Found"); die(); } /* This error handler will turn all notices, warnings, and errors into fatal * errors, unless they have been suppressed with the @-operator. */ function error_handler($errno, $errstr, $errfile, $errline, $errcontext) { /* The @-opertor (used with chdir() below) temporarely makes * error_reporting() return zero, and we don't want to die in that case. * We do note the error in the output, though. */ if (error_reporting() == 0) { $_SESSION['output'] .= $errstr . "\n"; } else { die('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Laudanum PHP File Browser</title> </head> <body> <h1>Fatal Error!</h1> <p><b>' . $errstr . '</b></p> <p>in <b>' . $errfile . '</b>, line <b>' . $errline . '</b>.</p> <hr> <address> Copyright &copy; 2012, <a href="mailto:laudanum@secureideas.net">Kevin Johnson</a> and the Laudanum team.<br/> Written by Tim Medin.<br/> Get the latest version at <a href="http://laudanum.secureideas.net">laudanum.secureideas.net</a>. </address> </body> </html>'); } } set_error_handler('error_handler'); /* Initialize some variables we need again and again. */ $dir = isset($_GET["dir"]) ? $_GET["dir"] : "."; $file = isset($_GET["file"]) ? $_GET["file"] : ""; if ($file != "") { if(file_exists($file)) { $s = split("/", $file); $filename = $s[count($s) - 1]; header("Content-type: application/x-download"); header("Content-Length: ".filesize($file)); header("Content-Disposition: attachment; filename=\"".$filename."\""); readfile($file); die(); } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Laudanum File Browser</title> <link rel="stylesheet" href="style.css" type="text/css"> <script type="text/javascript"> </script> </head> <body onload="init()"> <h1>Laudanum File Browser 0.1</h1> <a href="<?php echo $_SERVER['PHP_SELF'] ?>">Home</a><br/> <?php // get the actual path, add an ending / if necessary $curdir = realpath($dir); $curdir .= substr($curdir, -1) != "/" ? "/" : ""; $dirs = split("/",$curdir); // Create the breadcrumb echo "<h2>Directory listing of <a href=\"" . $_SERVER['PHP_SELF'] . "?dir=/\">/</a> "; $breadcrumb = '/'; foreach ($dirs as $d) { if ($d != '') { $breadcrumb .= $d . "/"; echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?dir=" . urlencode($breadcrumb) . "\">$d/</a> "; } } echo "</h2>"; // translate .. to a real dir $parentdir = ""; for ($i = 0; $i < count($dirs) - 2; $i++) { $parentdir .= $dirs[$i] . "/"; } echo "<table>"; echo "<tr><th>Name</th><th>Date</th><th>Size</th></tr>"; echo "<tr><td><a href=\"" . $_SERVER['PHP_SELF'] . "?dir=$parentdir\">../</a></td><td> </td><td> </td></tr>"; //get listing, separate into directories and files $listingfiles = array(); $listingdirs = array(); if ($handle = @opendir($curdir)) { while ($o = readdir($handle)) { if ($o == "." || $o == "..") continue; if (@filetype($curdir . $o) == "dir") { $listingdirs[] = $o . "/"; } else { $listingfiles[] = $o; } } @natcasesort($listingdirs); @natcasesort($listingfiles); //display directories foreach ($listingdirs as $f) { echo "<tr><td><a href=\"" . $_SERVER['PHP_SELF'] . "?dir=" . urlencode($curdir . $f) . "\">" . $f . "</a></td><td align=\"right\">" . "</td><td> <td></tr>"; } //display files foreach ($listingfiles as $f) { echo "<tr><td><a href=\"" . $_SERVER['PHP_SELF'] . "?file=" . urlencode($curdir . $f) . "\">" . $f . "</a></td><td align=\"right\">" . "</td><td align=\"right\">" . number_format(@filesize($curdir . $f)) . "<td></tr>"; } } else { echo "<tr><td colspan=\"3\"><h1>Can't open directory</h1></td></tr>"; } ?> </table> <hr> <address> Copyright &copy; 2012, <a href="mailto:laudanum@secureideas.net">Kevin Johnson</a> and the Laudanum team.<br/> Written by Tim Medin.<br/> Get the latest version at <a href="http://laudanum.secureideas.net">laudanum.secureideas.net</a>. </address> </body> </html>
PHP
3
5tr1x/SecLists
Web-Shells/laudanum-0.8/php/file.php
[ "MIT" ]
package io.swagger.client.model { import io.swagger.client.model.ByteArray; [XmlRootNode(name="FormatTest")] public class FormatTest { [XmlElement(name="integer")] public var integer: Number = NaN; [XmlElement(name="int32")] public var int32: Number = 0; [XmlElement(name="int64")] public var int64: Number = 0; [XmlElement(name="number")] public var number: Number = NaN; [XmlElement(name="float")] public var float: Number = 0.0; [XmlElement(name="double")] public var double: Number = 0.0; [XmlElement(name="string")] public var string: String = null; [XmlElement(name="byte")] public var byte: ByteArray = NaN; [XmlElement(name="binary")] public var binary: String = NaN; [XmlElement(name="date")] public var date: Date = null; [XmlElement(name="dateTime")] public var dateTime: Date = null; [XmlElement(name="password")] public var password: String = null; public function toString(): String { var str: String = "FormatTest: "; str += " (integer: " + integer + ")"; str += " (int32: " + int32 + ")"; str += " (int64: " + int64 + ")"; str += " (number: " + number + ")"; str += " (float: " + float + ")"; str += " (double: " + double + ")"; str += " (string: " + string + ")"; str += " (byte: " + byte + ")"; str += " (binary: " + binary + ")"; str += " (date: " + date + ")"; str += " (dateTime: " + dateTime + ")"; str += " (password: " + password + ")"; return str; } } }
ActionScript
3
wwadge/swagger-codegen
samples/client/petstore/flash/flash/src/io/swagger/client/model/FormatTest.as
[ "Apache-2.0" ]
/// <reference path='fourslash.ts' /> ////let a = { b: 0 }; ////let x = { y: 0 }; ////a && a.b && /*a*/x && x.y;/*b*/ // Verify that we stop at a prefix sequence that is otherwise valid. goTo.select("a", "b"); edit.applyRefactor({ refactorName: "Convert to optional chain expression", actionName: "Convert to optional chain expression", actionDescription: "Convert to optional chain expression", newContent: `let a = { b: 0 }; let x = { y: 0 }; a && a.b && x?.y;` });
TypeScript
4
monciego/TypeScript
tests/cases/fourslash/refactorConvertToOptionalChainExpression_SubexpressionsWithPrefix2.ts
[ "Apache-2.0" ]
/** * */ import Util; import OpenApi; import EndpointUtil; extends OpenApi; init(config: OpenApi.Config){ super(config); @endpointRule = 'regional'; checkConfig(config); @endpoint = getEndpoint('vs', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); } function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ if (!Util.empty(endpoint)) { return endpoint; } if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { return endpointMap[regionId]; } return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } model AddDeviceRequest { ownerId?: long(name='OwnerId'), groupId?: string(name='GroupId'), protocol?: string(name='Protocol'), config?: string(name='Config'), } model AddDeviceResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model AddDeviceResponse = { headers: map[string]string(name='headers'), body: AddDeviceResponseBody(name='body'), } async function addDeviceWithOptions(request: AddDeviceRequest, runtime: Util.RuntimeOptions): AddDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('AddDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function addDevice(request: AddDeviceRequest): AddDeviceResponse { var runtime = new Util.RuntimeOptions{}; return addDeviceWithOptions(request, runtime); } model AddVsPullStreamInfoConfigRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), appName?: string(name='AppName'), streamName?: string(name='StreamName'), sourceUrl?: string(name='SourceUrl'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), always?: string(name='Always'), } model AddVsPullStreamInfoConfigResponseBody = { requestId?: string(name='RequestId'), } model AddVsPullStreamInfoConfigResponse = { headers: map[string]string(name='headers'), body: AddVsPullStreamInfoConfigResponseBody(name='body'), } async function addVsPullStreamInfoConfigWithOptions(request: AddVsPullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): AddVsPullStreamInfoConfigResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('AddVsPullStreamInfoConfig', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function addVsPullStreamInfoConfig(request: AddVsPullStreamInfoConfigRequest): AddVsPullStreamInfoConfigResponse { var runtime = new Util.RuntimeOptions{}; return addVsPullStreamInfoConfigWithOptions(request, runtime); } model BatchBindDirectoriesRequest { ownerId?: long(name='OwnerId'), directoryId?: string(name='DirectoryId'), deviceId?: string(name='DeviceId'), } model BatchBindDirectoriesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), directoryId?: string(name='DirectoryId'), deviceId?: string(name='DeviceId'), } ](name='Results'), } model BatchBindDirectoriesResponse = { headers: map[string]string(name='headers'), body: BatchBindDirectoriesResponseBody(name='body'), } async function batchBindDirectoriesWithOptions(request: BatchBindDirectoriesRequest, runtime: Util.RuntimeOptions): BatchBindDirectoriesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchBindDirectories', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchBindDirectories(request: BatchBindDirectoriesRequest): BatchBindDirectoriesResponse { var runtime = new Util.RuntimeOptions{}; return batchBindDirectoriesWithOptions(request, runtime); } model BatchBindParentPlatformDevicesRequest { ownerId?: long(name='OwnerId'), parentPlatformId?: string(name='ParentPlatformId'), deviceId?: string(name='DeviceId'), } model BatchBindParentPlatformDevicesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), parentPlatformId?: string(name='ParentPlatformId'), deviceId?: string(name='DeviceId'), } ](name='Results'), } model BatchBindParentPlatformDevicesResponse = { headers: map[string]string(name='headers'), body: BatchBindParentPlatformDevicesResponseBody(name='body'), } async function batchBindParentPlatformDevicesWithOptions(request: BatchBindParentPlatformDevicesRequest, runtime: Util.RuntimeOptions): BatchBindParentPlatformDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchBindParentPlatformDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchBindParentPlatformDevices(request: BatchBindParentPlatformDevicesRequest): BatchBindParentPlatformDevicesResponse { var runtime = new Util.RuntimeOptions{}; return batchBindParentPlatformDevicesWithOptions(request, runtime); } model BatchBindPurchasedDevicesRequest { ownerId?: long(name='OwnerId'), region?: string(name='Region'), groupId?: string(name='GroupId'), deviceId?: string(name='DeviceId'), } model BatchBindPurchasedDevicesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), groupId?: string(name='GroupId'), deviceId?: string(name='DeviceId'), region?: string(name='Region'), } ](name='Results'), } model BatchBindPurchasedDevicesResponse = { headers: map[string]string(name='headers'), body: BatchBindPurchasedDevicesResponseBody(name='body'), } async function batchBindPurchasedDevicesWithOptions(request: BatchBindPurchasedDevicesRequest, runtime: Util.RuntimeOptions): BatchBindPurchasedDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchBindPurchasedDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchBindPurchasedDevices(request: BatchBindPurchasedDevicesRequest): BatchBindPurchasedDevicesResponse { var runtime = new Util.RuntimeOptions{}; return batchBindPurchasedDevicesWithOptions(request, runtime); } model BatchBindTemplateRequest { ownerId?: long(name='OwnerId'), templateId?: string(name='TemplateId'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), applyAll?: boolean(name='ApplyAll'), replace?: boolean(name='Replace'), } model BatchBindTemplateResponseBody = { requestId?: string(name='RequestId'), bindings?: [ { error?: string(name='Error'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), templateId?: string(name='TemplateId'), } ](name='Bindings'), } model BatchBindTemplateResponse = { headers: map[string]string(name='headers'), body: BatchBindTemplateResponseBody(name='body'), } async function batchBindTemplateWithOptions(request: BatchBindTemplateRequest, runtime: Util.RuntimeOptions): BatchBindTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchBindTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchBindTemplate(request: BatchBindTemplateRequest): BatchBindTemplateResponse { var runtime = new Util.RuntimeOptions{}; return batchBindTemplateWithOptions(request, runtime); } model BatchBindTemplatesRequest { ownerId?: long(name='OwnerId'), templateId?: string(name='TemplateId'), templateType?: string(name='TemplateType'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), applyAll?: boolean(name='ApplyAll'), replace?: boolean(name='Replace'), } model BatchBindTemplatesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), templateId?: string(name='TemplateId'), } ](name='Results'), } model BatchBindTemplatesResponse = { headers: map[string]string(name='headers'), body: BatchBindTemplatesResponseBody(name='body'), } async function batchBindTemplatesWithOptions(request: BatchBindTemplatesRequest, runtime: Util.RuntimeOptions): BatchBindTemplatesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchBindTemplates', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchBindTemplates(request: BatchBindTemplatesRequest): BatchBindTemplatesResponse { var runtime = new Util.RuntimeOptions{}; return batchBindTemplatesWithOptions(request, runtime); } model BatchDeleteDevicesRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model BatchDeleteDevicesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), id?: string(name='Id'), } ](name='Results'), } model BatchDeleteDevicesResponse = { headers: map[string]string(name='headers'), body: BatchDeleteDevicesResponseBody(name='body'), } async function batchDeleteDevicesWithOptions(request: BatchDeleteDevicesRequest, runtime: Util.RuntimeOptions): BatchDeleteDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchDeleteDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchDeleteDevices(request: BatchDeleteDevicesRequest): BatchDeleteDevicesResponse { var runtime = new Util.RuntimeOptions{}; return batchDeleteDevicesWithOptions(request, runtime); } model BatchDeleteVsDomainConfigsRequest { ownerId?: long(name='OwnerId'), domainNames?: string(name='DomainNames'), functionNames?: string(name='FunctionNames'), } model BatchDeleteVsDomainConfigsResponseBody = { requestId?: string(name='RequestId'), } model BatchDeleteVsDomainConfigsResponse = { headers: map[string]string(name='headers'), body: BatchDeleteVsDomainConfigsResponseBody(name='body'), } async function batchDeleteVsDomainConfigsWithOptions(request: BatchDeleteVsDomainConfigsRequest, runtime: Util.RuntimeOptions): BatchDeleteVsDomainConfigsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchDeleteVsDomainConfigs', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchDeleteVsDomainConfigs(request: BatchDeleteVsDomainConfigsRequest): BatchDeleteVsDomainConfigsResponse { var runtime = new Util.RuntimeOptions{}; return batchDeleteVsDomainConfigsWithOptions(request, runtime); } model BatchForbidVsStreamRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), channel?: string(name='Channel'), liveStreamType?: string(name='LiveStreamType'), oneshot?: string(name='Oneshot'), controlStreamAction?: string(name='ControlStreamAction'), resumeTime?: string(name='ResumeTime'), } model BatchForbidVsStreamResponseBody = { requestId?: string(name='RequestId'), forbidResult?: { forbidResultInfo?: [ { result?: string(name='Result'), count?: int32(name='Count'), detail?: string(name='Detail'), channels?: { channel?: [ string ](name='Channel') }(name='Channels'), } ](name='ForbidResultInfo') }(name='ForbidResult'), } model BatchForbidVsStreamResponse = { headers: map[string]string(name='headers'), body: BatchForbidVsStreamResponseBody(name='body'), } async function batchForbidVsStreamWithOptions(request: BatchForbidVsStreamRequest, runtime: Util.RuntimeOptions): BatchForbidVsStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchForbidVsStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchForbidVsStream(request: BatchForbidVsStreamRequest): BatchForbidVsStreamResponse { var runtime = new Util.RuntimeOptions{}; return batchForbidVsStreamWithOptions(request, runtime); } model BatchResumeVsStreamRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), channel?: string(name='Channel'), liveStreamType?: string(name='LiveStreamType'), controlStreamAction?: string(name='ControlStreamAction'), } model BatchResumeVsStreamResponseBody = { requestId?: string(name='RequestId'), resumeResult?: { resumeResultInfo?: [ { result?: string(name='Result'), count?: int32(name='Count'), detail?: string(name='Detail'), channels?: { channel?: [ string ](name='Channel') }(name='Channels'), } ](name='ResumeResultInfo') }(name='ResumeResult'), } model BatchResumeVsStreamResponse = { headers: map[string]string(name='headers'), body: BatchResumeVsStreamResponseBody(name='body'), } async function batchResumeVsStreamWithOptions(request: BatchResumeVsStreamRequest, runtime: Util.RuntimeOptions): BatchResumeVsStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchResumeVsStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchResumeVsStream(request: BatchResumeVsStreamRequest): BatchResumeVsStreamResponse { var runtime = new Util.RuntimeOptions{}; return batchResumeVsStreamWithOptions(request, runtime); } model BatchSetVsDomainConfigsRequest { ownerId?: long(name='OwnerId'), domainNames?: string(name='DomainNames'), functions?: string(name='Functions'), } model BatchSetVsDomainConfigsResponseBody = { requestId?: string(name='RequestId'), } model BatchSetVsDomainConfigsResponse = { headers: map[string]string(name='headers'), body: BatchSetVsDomainConfigsResponseBody(name='body'), } async function batchSetVsDomainConfigsWithOptions(request: BatchSetVsDomainConfigsRequest, runtime: Util.RuntimeOptions): BatchSetVsDomainConfigsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchSetVsDomainConfigs', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchSetVsDomainConfigs(request: BatchSetVsDomainConfigsRequest): BatchSetVsDomainConfigsResponse { var runtime = new Util.RuntimeOptions{}; return batchSetVsDomainConfigsWithOptions(request, runtime); } model BatchStartDevicesRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model BatchStartDevicesResponseBody = { requestId?: string(name='RequestId'), results?: [ { id?: string(name='Id'), streams?: [ { error?: string(name='Error'), name?: string(name='Name'), id?: string(name='Id'), } ](name='Streams'), } ](name='Results'), } model BatchStartDevicesResponse = { headers: map[string]string(name='headers'), body: BatchStartDevicesResponseBody(name='body'), } async function batchStartDevicesWithOptions(request: BatchStartDevicesRequest, runtime: Util.RuntimeOptions): BatchStartDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchStartDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchStartDevices(request: BatchStartDevicesRequest): BatchStartDevicesResponse { var runtime = new Util.RuntimeOptions{}; return batchStartDevicesWithOptions(request, runtime); } model BatchStartStreamsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model BatchStartStreamsResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), name?: string(name='Name'), id?: string(name='Id'), } ](name='Results'), } model BatchStartStreamsResponse = { headers: map[string]string(name='headers'), body: BatchStartStreamsResponseBody(name='body'), } async function batchStartStreamsWithOptions(request: BatchStartStreamsRequest, runtime: Util.RuntimeOptions): BatchStartStreamsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchStartStreams', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchStartStreams(request: BatchStartStreamsRequest): BatchStartStreamsResponse { var runtime = new Util.RuntimeOptions{}; return batchStartStreamsWithOptions(request, runtime); } model BatchStopDevicesRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), startTime?: string(name='StartTime'), } model BatchStopDevicesResponseBody = { requestId?: string(name='RequestId'), results?: [ { id?: string(name='Id'), streams?: [ { error?: string(name='Error'), name?: string(name='Name'), id?: string(name='Id'), } ](name='Streams'), } ](name='Results'), } model BatchStopDevicesResponse = { headers: map[string]string(name='headers'), body: BatchStopDevicesResponseBody(name='body'), } async function batchStopDevicesWithOptions(request: BatchStopDevicesRequest, runtime: Util.RuntimeOptions): BatchStopDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchStopDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchStopDevices(request: BatchStopDevicesRequest): BatchStopDevicesResponse { var runtime = new Util.RuntimeOptions{}; return batchStopDevicesWithOptions(request, runtime); } model BatchStopStreamsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), startTime?: string(name='StartTime'), } model BatchStopStreamsResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), name?: string(name='Name'), id?: string(name='Id'), } ](name='Results'), } model BatchStopStreamsResponse = { headers: map[string]string(name='headers'), body: BatchStopStreamsResponseBody(name='body'), } async function batchStopStreamsWithOptions(request: BatchStopStreamsRequest, runtime: Util.RuntimeOptions): BatchStopStreamsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchStopStreams', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchStopStreams(request: BatchStopStreamsRequest): BatchStopStreamsResponse { var runtime = new Util.RuntimeOptions{}; return batchStopStreamsWithOptions(request, runtime); } model BatchUnbindDirectoriesRequest { ownerId?: long(name='OwnerId'), directoryId?: string(name='DirectoryId'), deviceId?: string(name='DeviceId'), } model BatchUnbindDirectoriesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), directoryId?: string(name='DirectoryId'), deviceId?: string(name='DeviceId'), } ](name='Results'), } model BatchUnbindDirectoriesResponse = { headers: map[string]string(name='headers'), body: BatchUnbindDirectoriesResponseBody(name='body'), } async function batchUnbindDirectoriesWithOptions(request: BatchUnbindDirectoriesRequest, runtime: Util.RuntimeOptions): BatchUnbindDirectoriesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchUnbindDirectories', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchUnbindDirectories(request: BatchUnbindDirectoriesRequest): BatchUnbindDirectoriesResponse { var runtime = new Util.RuntimeOptions{}; return batchUnbindDirectoriesWithOptions(request, runtime); } model BatchUnbindParentPlatformDevicesRequest { ownerId?: long(name='OwnerId'), parentPlatformId?: string(name='ParentPlatformId'), deviceId?: string(name='DeviceId'), } model BatchUnbindParentPlatformDevicesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), parentPlatformId?: string(name='ParentPlatformId'), deviceId?: string(name='DeviceId'), } ](name='Results'), } model BatchUnbindParentPlatformDevicesResponse = { headers: map[string]string(name='headers'), body: BatchUnbindParentPlatformDevicesResponseBody(name='body'), } async function batchUnbindParentPlatformDevicesWithOptions(request: BatchUnbindParentPlatformDevicesRequest, runtime: Util.RuntimeOptions): BatchUnbindParentPlatformDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchUnbindParentPlatformDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchUnbindParentPlatformDevices(request: BatchUnbindParentPlatformDevicesRequest): BatchUnbindParentPlatformDevicesResponse { var runtime = new Util.RuntimeOptions{}; return batchUnbindParentPlatformDevicesWithOptions(request, runtime); } model BatchUnbindPurchasedDevicesRequest { ownerId?: long(name='OwnerId'), deviceId?: string(name='DeviceId'), } model BatchUnbindPurchasedDevicesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), deviceId?: string(name='DeviceId'), } ](name='Results'), } model BatchUnbindPurchasedDevicesResponse = { headers: map[string]string(name='headers'), body: BatchUnbindPurchasedDevicesResponseBody(name='body'), } async function batchUnbindPurchasedDevicesWithOptions(request: BatchUnbindPurchasedDevicesRequest, runtime: Util.RuntimeOptions): BatchUnbindPurchasedDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchUnbindPurchasedDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchUnbindPurchasedDevices(request: BatchUnbindPurchasedDevicesRequest): BatchUnbindPurchasedDevicesResponse { var runtime = new Util.RuntimeOptions{}; return batchUnbindPurchasedDevicesWithOptions(request, runtime); } model BatchUnbindTemplateRequest { ownerId?: long(name='OwnerId'), templateId?: string(name='TemplateId'), templateType?: string(name='TemplateType'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), } model BatchUnbindTemplateResponseBody = { requestId?: string(name='RequestId'), bindings?: [ { error?: string(name='Error'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), templateId?: string(name='TemplateId'), } ](name='Bindings'), } model BatchUnbindTemplateResponse = { headers: map[string]string(name='headers'), body: BatchUnbindTemplateResponseBody(name='body'), } async function batchUnbindTemplateWithOptions(request: BatchUnbindTemplateRequest, runtime: Util.RuntimeOptions): BatchUnbindTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchUnbindTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchUnbindTemplate(request: BatchUnbindTemplateRequest): BatchUnbindTemplateResponse { var runtime = new Util.RuntimeOptions{}; return batchUnbindTemplateWithOptions(request, runtime); } model BatchUnbindTemplatesRequest { ownerId?: long(name='OwnerId'), templateId?: string(name='TemplateId'), templateType?: string(name='TemplateType'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), } model BatchUnbindTemplatesResponseBody = { requestId?: string(name='RequestId'), results?: [ { error?: string(name='Error'), templateType?: string(name='TemplateType'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), templateId?: string(name='TemplateId'), } ](name='Results'), } model BatchUnbindTemplatesResponse = { headers: map[string]string(name='headers'), body: BatchUnbindTemplatesResponseBody(name='body'), } async function batchUnbindTemplatesWithOptions(request: BatchUnbindTemplatesRequest, runtime: Util.RuntimeOptions): BatchUnbindTemplatesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchUnbindTemplates', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchUnbindTemplates(request: BatchUnbindTemplatesRequest): BatchUnbindTemplatesResponse { var runtime = new Util.RuntimeOptions{}; return batchUnbindTemplatesWithOptions(request, runtime); } model BindDirectoryRequest { ownerId?: long(name='OwnerId'), directoryId?: string(name='DirectoryId'), deviceId?: string(name='DeviceId'), } model BindDirectoryResponseBody = { requestId?: string(name='RequestId'), } model BindDirectoryResponse = { headers: map[string]string(name='headers'), body: BindDirectoryResponseBody(name='body'), } async function bindDirectoryWithOptions(request: BindDirectoryRequest, runtime: Util.RuntimeOptions): BindDirectoryResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BindDirectory', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function bindDirectory(request: BindDirectoryRequest): BindDirectoryResponse { var runtime = new Util.RuntimeOptions{}; return bindDirectoryWithOptions(request, runtime); } model BindParentPlatformDeviceRequest { ownerId?: long(name='OwnerId'), parentPlatformId?: string(name='ParentPlatformId'), deviceId?: string(name='DeviceId'), } model BindParentPlatformDeviceResponseBody = { requestId?: string(name='RequestId'), } model BindParentPlatformDeviceResponse = { headers: map[string]string(name='headers'), body: BindParentPlatformDeviceResponseBody(name='body'), } async function bindParentPlatformDeviceWithOptions(request: BindParentPlatformDeviceRequest, runtime: Util.RuntimeOptions): BindParentPlatformDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BindParentPlatformDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function bindParentPlatformDevice(request: BindParentPlatformDeviceRequest): BindParentPlatformDeviceResponse { var runtime = new Util.RuntimeOptions{}; return bindParentPlatformDeviceWithOptions(request, runtime); } model BindPurchasedDeviceRequest { ownerId?: long(name='OwnerId'), region?: string(name='Region'), groupId?: string(name='GroupId'), deviceId?: string(name='DeviceId'), } model BindPurchasedDeviceResponseBody = { requestId?: string(name='RequestId'), } model BindPurchasedDeviceResponse = { headers: map[string]string(name='headers'), body: BindPurchasedDeviceResponseBody(name='body'), } async function bindPurchasedDeviceWithOptions(request: BindPurchasedDeviceRequest, runtime: Util.RuntimeOptions): BindPurchasedDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BindPurchasedDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function bindPurchasedDevice(request: BindPurchasedDeviceRequest): BindPurchasedDeviceResponse { var runtime = new Util.RuntimeOptions{}; return bindPurchasedDeviceWithOptions(request, runtime); } model BindTemplateRequest { ownerId?: long(name='OwnerId'), templateId?: string(name='TemplateId'), templateType?: string(name='TemplateType'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), applyAll?: boolean(name='ApplyAll'), replace?: boolean(name='Replace'), } model BindTemplateResponseBody = { requestId?: string(name='RequestId'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), templateId?: string(name='TemplateId'), } model BindTemplateResponse = { headers: map[string]string(name='headers'), body: BindTemplateResponseBody(name='body'), } async function bindTemplateWithOptions(request: BindTemplateRequest, runtime: Util.RuntimeOptions): BindTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BindTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function bindTemplate(request: BindTemplateRequest): BindTemplateResponse { var runtime = new Util.RuntimeOptions{}; return bindTemplateWithOptions(request, runtime); } model ContinuousAdjustRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), iris?: string(name='Iris'), focus?: string(name='Focus'), subProtocol?: string(name='SubProtocol'), } model ContinuousAdjustResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model ContinuousAdjustResponse = { headers: map[string]string(name='headers'), body: ContinuousAdjustResponseBody(name='body'), } async function continuousAdjustWithOptions(request: ContinuousAdjustRequest, runtime: Util.RuntimeOptions): ContinuousAdjustResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ContinuousAdjust', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function continuousAdjust(request: ContinuousAdjustRequest): ContinuousAdjustResponse { var runtime = new Util.RuntimeOptions{}; return continuousAdjustWithOptions(request, runtime); } model ContinuousMoveRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), pan?: string(name='Pan'), tilt?: string(name='Tilt'), zoom?: string(name='Zoom'), subProtocol?: string(name='SubProtocol'), } model ContinuousMoveResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model ContinuousMoveResponse = { headers: map[string]string(name='headers'), body: ContinuousMoveResponseBody(name='body'), } async function continuousMoveWithOptions(request: ContinuousMoveRequest, runtime: Util.RuntimeOptions): ContinuousMoveResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ContinuousMove', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function continuousMove(request: ContinuousMoveRequest): ContinuousMoveResponse { var runtime = new Util.RuntimeOptions{}; return continuousMoveWithOptions(request, runtime); } model CreateDeviceRequest { ownerId?: long(name='OwnerId'), name?: string(name='Name'), description?: string(name='Description'), groupId?: string(name='GroupId'), parentId?: string(name='ParentId'), directoryId?: string(name='DirectoryId'), type?: string(name='Type'), autoStart?: boolean(name='AutoStart'), gbId?: string(name='GbId'), ip?: string(name='Ip'), port?: long(name='Port'), url?: string(name='Url'), username?: string(name='Username'), password?: string(name='Password'), vendor?: string(name='Vendor'), dsn?: string(name='Dsn'), longitude?: string(name='Longitude'), latitude?: string(name='Latitude'), autoPos?: boolean(name='AutoPos'), posInterval?: long(name='PosInterval'), alarmMethod?: string(name='AlarmMethod'), params?: string(name='Params'), } model CreateDeviceResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model CreateDeviceResponse = { headers: map[string]string(name='headers'), body: CreateDeviceResponseBody(name='body'), } async function createDeviceWithOptions(request: CreateDeviceRequest, runtime: Util.RuntimeOptions): CreateDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createDevice(request: CreateDeviceRequest): CreateDeviceResponse { var runtime = new Util.RuntimeOptions{}; return createDeviceWithOptions(request, runtime); } model CreateDeviceAlarmRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), channelId?: int32(name='ChannelId'), objectType?: int32(name='ObjectType'), alarm?: int32(name='Alarm'), subAlarm?: int32(name='SubAlarm'), startTime?: long(name='StartTime'), endTime?: long(name='EndTime'), expire?: long(name='Expire'), } model CreateDeviceAlarmResponseBody = { url?: string(name='Url'), alarmId?: string(name='AlarmId'), requestId?: string(name='RequestId'), expire?: long(name='Expire'), alarmDelay?: long(name='AlarmDelay'), } model CreateDeviceAlarmResponse = { headers: map[string]string(name='headers'), body: CreateDeviceAlarmResponseBody(name='body'), } async function createDeviceAlarmWithOptions(request: CreateDeviceAlarmRequest, runtime: Util.RuntimeOptions): CreateDeviceAlarmResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateDeviceAlarm', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createDeviceAlarm(request: CreateDeviceAlarmRequest): CreateDeviceAlarmResponse { var runtime = new Util.RuntimeOptions{}; return createDeviceAlarmWithOptions(request, runtime); } model CreateDeviceSnapshotRequest { ownerId?: long(name='OwnerId'), deviceId?: string(name='DeviceId'), streamId?: string(name='StreamId'), mode?: string(name='Mode'), snapshotConfig?: string(name='SnapshotConfig'), } model CreateDeviceSnapshotResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model CreateDeviceSnapshotResponse = { headers: map[string]string(name='headers'), body: CreateDeviceSnapshotResponseBody(name='body'), } async function createDeviceSnapshotWithOptions(request: CreateDeviceSnapshotRequest, runtime: Util.RuntimeOptions): CreateDeviceSnapshotResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateDeviceSnapshot', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createDeviceSnapshot(request: CreateDeviceSnapshotRequest): CreateDeviceSnapshotResponse { var runtime = new Util.RuntimeOptions{}; return createDeviceSnapshotWithOptions(request, runtime); } model CreateDirectoryRequest { ownerId?: long(name='OwnerId'), name?: string(name='Name'), description?: string(name='Description'), groupId?: string(name='GroupId'), parentId?: string(name='ParentId'), } model CreateDirectoryResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model CreateDirectoryResponse = { headers: map[string]string(name='headers'), body: CreateDirectoryResponseBody(name='body'), } async function createDirectoryWithOptions(request: CreateDirectoryRequest, runtime: Util.RuntimeOptions): CreateDirectoryResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateDirectory', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createDirectory(request: CreateDirectoryRequest): CreateDirectoryResponse { var runtime = new Util.RuntimeOptions{}; return createDirectoryWithOptions(request, runtime); } model CreateGroupRequest { ownerId?: long(name='OwnerId'), name?: string(name='Name'), description?: string(name='Description'), app?: string(name='App'), region?: string(name='Region'), inProtocol?: string(name='InProtocol'), outProtocol?: string(name='OutProtocol'), pushDomain?: string(name='PushDomain'), playDomain?: string(name='PlayDomain'), lazyPull?: boolean(name='LazyPull'), callback?: string(name='Callback'), captureInterval?: int32(name='CaptureInterval'), captureImage?: int32(name='CaptureImage'), captureVideo?: int32(name='CaptureVideo'), captureOssBucket?: string(name='CaptureOssBucket'), captureOssPath?: string(name='CaptureOssPath'), } model CreateGroupResponseBody = { gbId?: string(name='GbId'), gbIp?: string(name='GbIp'), requestId?: string(name='RequestId'), gbPort?: long(name='GbPort'), id?: string(name='Id'), } model CreateGroupResponse = { headers: map[string]string(name='headers'), body: CreateGroupResponseBody(name='body'), } async function createGroupWithOptions(request: CreateGroupRequest, runtime: Util.RuntimeOptions): CreateGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateGroup', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createGroup(request: CreateGroupRequest): CreateGroupResponse { var runtime = new Util.RuntimeOptions{}; return createGroupWithOptions(request, runtime); } model CreateParentPlatformRequest { ownerId?: long(name='OwnerId'), name?: string(name='Name'), description?: string(name='Description'), protocol?: string(name='Protocol'), gbId?: string(name='GbId'), ip?: string(name='Ip'), port?: long(name='Port'), clientAuth?: boolean(name='ClientAuth'), clientUsername?: string(name='ClientUsername'), clientPassword?: string(name='ClientPassword'), autoStart?: boolean(name='AutoStart'), } model CreateParentPlatformResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model CreateParentPlatformResponse = { headers: map[string]string(name='headers'), body: CreateParentPlatformResponseBody(name='body'), } async function createParentPlatformWithOptions(request: CreateParentPlatformRequest, runtime: Util.RuntimeOptions): CreateParentPlatformResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateParentPlatform', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createParentPlatform(request: CreateParentPlatformRequest): CreateParentPlatformResponse { var runtime = new Util.RuntimeOptions{}; return createParentPlatformWithOptions(request, runtime); } model CreateStreamSnapshotRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), location?: string(name='Location'), } model CreateStreamSnapshotResponseBody = { ossObject?: string(name='OssObject'), requestId?: string(name='RequestId'), width?: long(name='Width'), height?: long(name='Height'), url?: string(name='Url'), timestamp?: long(name='Timestamp'), ossBucket?: string(name='OssBucket'), format?: string(name='Format'), ossEndpoint?: string(name='OssEndpoint'), id?: string(name='Id'), } model CreateStreamSnapshotResponse = { headers: map[string]string(name='headers'), body: CreateStreamSnapshotResponseBody(name='body'), } async function createStreamSnapshotWithOptions(request: CreateStreamSnapshotRequest, runtime: Util.RuntimeOptions): CreateStreamSnapshotResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateStreamSnapshot', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createStreamSnapshot(request: CreateStreamSnapshotRequest): CreateStreamSnapshotResponse { var runtime = new Util.RuntimeOptions{}; return createStreamSnapshotWithOptions(request, runtime); } model CreateTemplateRequest { ownerId?: long(name='OwnerId'), name?: string(name='Name'), description?: string(name='Description'), type?: string(name='Type'), region?: string(name='Region'), ossBucket?: string(name='OssBucket'), ossEndpoint?: string(name='OssEndpoint'), ossFilePrefix?: string(name='OssFilePrefix'), trigger?: string(name='Trigger'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), interval?: long(name='Interval'), retention?: long(name='Retention'), fileFormat?: string(name='FileFormat'), jpgOverwrite?: string(name='JpgOverwrite'), jpgSequence?: string(name='JpgSequence'), jpgOnDemand?: string(name='JpgOnDemand'), mp4?: string(name='Mp4'), flv?: string(name='Flv'), hlsM3u8?: string(name='HlsM3u8'), hlsTs?: string(name='HlsTs'), callback?: string(name='Callback'), transConfigsJSON?: string(name='TransConfigsJSON'), } model CreateTemplateResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model CreateTemplateResponse = { headers: map[string]string(name='headers'), body: CreateTemplateResponseBody(name='body'), } async function createTemplateWithOptions(request: CreateTemplateRequest, runtime: Util.RuntimeOptions): CreateTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createTemplate(request: CreateTemplateRequest): CreateTemplateResponse { var runtime = new Util.RuntimeOptions{}; return createTemplateWithOptions(request, runtime); } model DeleteBucketRequest { ownerId?: long(name='OwnerId'), bucketName?: string(name='BucketName'), } model DeleteBucketResponseBody = { requestId?: string(name='RequestId'), } model DeleteBucketResponse = { headers: map[string]string(name='headers'), body: DeleteBucketResponseBody(name='body'), } async function deleteBucketWithOptions(request: DeleteBucketRequest, runtime: Util.RuntimeOptions): DeleteBucketResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteBucket', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteBucket(request: DeleteBucketRequest): DeleteBucketResponse { var runtime = new Util.RuntimeOptions{}; return deleteBucketWithOptions(request, runtime); } model DeleteDeviceRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DeleteDeviceResponseBody = { requestId?: string(name='RequestId'), } model DeleteDeviceResponse = { headers: map[string]string(name='headers'), body: DeleteDeviceResponseBody(name='body'), } async function deleteDeviceWithOptions(request: DeleteDeviceRequest, runtime: Util.RuntimeOptions): DeleteDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteDevice(request: DeleteDeviceRequest): DeleteDeviceResponse { var runtime = new Util.RuntimeOptions{}; return deleteDeviceWithOptions(request, runtime); } model DeleteDirectoryRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DeleteDirectoryResponseBody = { requestId?: string(name='RequestId'), } model DeleteDirectoryResponse = { headers: map[string]string(name='headers'), body: DeleteDirectoryResponseBody(name='body'), } async function deleteDirectoryWithOptions(request: DeleteDirectoryRequest, runtime: Util.RuntimeOptions): DeleteDirectoryResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteDirectory', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteDirectory(request: DeleteDirectoryRequest): DeleteDirectoryResponse { var runtime = new Util.RuntimeOptions{}; return deleteDirectoryWithOptions(request, runtime); } model DeleteGroupRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DeleteGroupResponseBody = { requestId?: string(name='RequestId'), } model DeleteGroupResponse = { headers: map[string]string(name='headers'), body: DeleteGroupResponseBody(name='body'), } async function deleteGroupWithOptions(request: DeleteGroupRequest, runtime: Util.RuntimeOptions): DeleteGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteGroup', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteGroup(request: DeleteGroupRequest): DeleteGroupResponse { var runtime = new Util.RuntimeOptions{}; return deleteGroupWithOptions(request, runtime); } model DeleteParentPlatformRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DeleteParentPlatformResponseBody = { requestId?: string(name='RequestId'), } model DeleteParentPlatformResponse = { headers: map[string]string(name='headers'), body: DeleteParentPlatformResponseBody(name='body'), } async function deleteParentPlatformWithOptions(request: DeleteParentPlatformRequest, runtime: Util.RuntimeOptions): DeleteParentPlatformResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteParentPlatform', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteParentPlatform(request: DeleteParentPlatformRequest): DeleteParentPlatformResponse { var runtime = new Util.RuntimeOptions{}; return deleteParentPlatformWithOptions(request, runtime); } model DeletePresetRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), presetId?: string(name='PresetId'), subProtocol?: string(name='SubProtocol'), } model DeletePresetResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model DeletePresetResponse = { headers: map[string]string(name='headers'), body: DeletePresetResponseBody(name='body'), } async function deletePresetWithOptions(request: DeletePresetRequest, runtime: Util.RuntimeOptions): DeletePresetResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeletePreset', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deletePreset(request: DeletePresetRequest): DeletePresetResponse { var runtime = new Util.RuntimeOptions{}; return deletePresetWithOptions(request, runtime); } model DeleteTemplateRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DeleteTemplateResponseBody = { requestId?: string(name='RequestId'), } model DeleteTemplateResponse = { headers: map[string]string(name='headers'), body: DeleteTemplateResponseBody(name='body'), } async function deleteTemplateWithOptions(request: DeleteTemplateRequest, runtime: Util.RuntimeOptions): DeleteTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteTemplate(request: DeleteTemplateRequest): DeleteTemplateResponse { var runtime = new Util.RuntimeOptions{}; return deleteTemplateWithOptions(request, runtime); } model DeleteVsPullStreamInfoConfigRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), appName?: string(name='AppName'), streamName?: string(name='StreamName'), } model DeleteVsPullStreamInfoConfigResponseBody = { requestId?: string(name='RequestId'), } model DeleteVsPullStreamInfoConfigResponse = { headers: map[string]string(name='headers'), body: DeleteVsPullStreamInfoConfigResponseBody(name='body'), } async function deleteVsPullStreamInfoConfigWithOptions(request: DeleteVsPullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): DeleteVsPullStreamInfoConfigResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteVsPullStreamInfoConfig', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteVsPullStreamInfoConfig(request: DeleteVsPullStreamInfoConfigRequest): DeleteVsPullStreamInfoConfigResponse { var runtime = new Util.RuntimeOptions{}; return deleteVsPullStreamInfoConfigWithOptions(request, runtime); } model DeleteVsStreamsNotifyUrlConfigRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), } model DeleteVsStreamsNotifyUrlConfigResponseBody = { requestId?: string(name='RequestId'), } model DeleteVsStreamsNotifyUrlConfigResponse = { headers: map[string]string(name='headers'), body: DeleteVsStreamsNotifyUrlConfigResponseBody(name='body'), } async function deleteVsStreamsNotifyUrlConfigWithOptions(request: DeleteVsStreamsNotifyUrlConfigRequest, runtime: Util.RuntimeOptions): DeleteVsStreamsNotifyUrlConfigResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteVsStreamsNotifyUrlConfig', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteVsStreamsNotifyUrlConfig(request: DeleteVsStreamsNotifyUrlConfigRequest): DeleteVsStreamsNotifyUrlConfigResponse { var runtime = new Util.RuntimeOptions{}; return deleteVsStreamsNotifyUrlConfigWithOptions(request, runtime); } model DescribeAccountStatRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DescribeAccountStatResponseBody = { templateNum?: long(name='TemplateNum'), groupLimit?: long(name='GroupLimit'), requestId?: string(name='RequestId'), templateLimit?: long(name='TemplateLimit'), groupNum?: long(name='GroupNum'), id?: string(name='Id'), } model DescribeAccountStatResponse = { headers: map[string]string(name='headers'), body: DescribeAccountStatResponseBody(name='body'), } async function describeAccountStatWithOptions(request: DescribeAccountStatRequest, runtime: Util.RuntimeOptions): DescribeAccountStatResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAccountStat', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAccountStat(request: DescribeAccountStatRequest): DescribeAccountStatResponse { var runtime = new Util.RuntimeOptions{}; return describeAccountStatWithOptions(request, runtime); } model DescribeDeviceRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), includeStats?: boolean(name='IncludeStats'), includeDirectory?: boolean(name='IncludeDirectory'), } model DescribeDeviceResponseBody = { type?: string(name='Type'), status?: string(name='Status'), alarmMethod?: string(name='AlarmMethod'), dsn?: string(name='Dsn'), port?: long(name='Port'), posInterval?: long(name='PosInterval'), parentId?: string(name='ParentId'), password?: string(name='Password'), autoPos?: boolean(name='AutoPos'), params?: string(name='Params'), requestId?: string(name='RequestId'), description?: string(name='Description'), enabled?: boolean(name='Enabled'), name?: string(name='Name'), channelSyncTime?: string(name='ChannelSyncTime'), createdTime?: string(name='CreatedTime'), directoryId?: string(name='DirectoryId'), registeredTime?: string(name='RegisteredTime'), protocol?: string(name='Protocol'), ip?: string(name='Ip'), url?: string(name='Url'), autoStart?: boolean(name='AutoStart'), vendor?: string(name='Vendor'), gbId?: string(name='GbId'), groupId?: string(name='GroupId'), longitude?: string(name='Longitude'), latitude?: string(name='Latitude'), id?: string(name='Id'), username?: string(name='Username'), stats?: { failedNum?: long(name='FailedNum'), streamNum?: long(name='StreamNum'), channelNum?: long(name='ChannelNum'), onlineNum?: long(name='OnlineNum'), offlineNum?: long(name='OfflineNum'), }(name='Stats'), directory?: { parentId?: string(name='ParentId'), description?: string(name='Description'), groupId?: string(name='GroupId'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), }(name='Directory'), } model DescribeDeviceResponse = { headers: map[string]string(name='headers'), body: DescribeDeviceResponseBody(name='body'), } async function describeDeviceWithOptions(request: DescribeDeviceRequest, runtime: Util.RuntimeOptions): DescribeDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDevice(request: DescribeDeviceRequest): DescribeDeviceResponse { var runtime = new Util.RuntimeOptions{}; return describeDeviceWithOptions(request, runtime); } model DescribeDeviceChannelsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model DescribeDeviceChannelsResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), channels?: [ { streamStatus?: string(name='StreamStatus'), gbId?: string(name='GbId'), params?: string(name='Params'), deviceId?: string(name='DeviceId'), channelId?: long(name='ChannelId'), deviceStatus?: string(name='DeviceStatus'), name?: string(name='Name'), streamId?: string(name='StreamId'), } ](name='Channels'), } model DescribeDeviceChannelsResponse = { headers: map[string]string(name='headers'), body: DescribeDeviceChannelsResponseBody(name='body'), } async function describeDeviceChannelsWithOptions(request: DescribeDeviceChannelsRequest, runtime: Util.RuntimeOptions): DescribeDeviceChannelsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDeviceChannels', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDeviceChannels(request: DescribeDeviceChannelsRequest): DescribeDeviceChannelsResponse { var runtime = new Util.RuntimeOptions{}; return describeDeviceChannelsWithOptions(request, runtime); } model DescribeDeviceGatewayRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), clientIp?: string(name='ClientIp'), expire?: long(name='Expire'), } model DescribeDeviceGatewayResponseBody = { host?: string(name='Host'), token?: string(name='Token'), requestId?: string(name='RequestId'), port?: long(name='Port'), protocol?: string(name='Protocol'), } model DescribeDeviceGatewayResponse = { headers: map[string]string(name='headers'), body: DescribeDeviceGatewayResponseBody(name='body'), } async function describeDeviceGatewayWithOptions(request: DescribeDeviceGatewayRequest, runtime: Util.RuntimeOptions): DescribeDeviceGatewayResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDeviceGateway', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDeviceGateway(request: DescribeDeviceGatewayRequest): DescribeDeviceGatewayResponse { var runtime = new Util.RuntimeOptions{}; return describeDeviceGatewayWithOptions(request, runtime); } model DescribeDevicesRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), type?: string(name='Type'), groupId?: string(name='GroupId'), parentId?: string(name='ParentId'), directoryId?: string(name='DirectoryId'), gbId?: string(name='GbId'), status?: string(name='Status'), vendor?: string(name='Vendor'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), includeStats?: boolean(name='IncludeStats'), includeDirectory?: boolean(name='IncludeDirectory'), } model DescribeDevicesResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), devices?: [ { type?: string(name='Type'), status?: string(name='Status'), alarmMethod?: string(name='AlarmMethod'), dsn?: string(name='Dsn'), port?: long(name='Port'), posInterval?: long(name='PosInterval'), parentId?: string(name='ParentId'), password?: string(name='Password'), autoPos?: boolean(name='AutoPos'), params?: string(name='Params'), description?: string(name='Description'), enabled?: boolean(name='Enabled'), name?: string(name='Name'), channelSyncTime?: string(name='ChannelSyncTime'), createdTime?: string(name='CreatedTime'), directoryId?: string(name='DirectoryId'), registeredTime?: string(name='RegisteredTime'), protocol?: string(name='Protocol'), ip?: string(name='Ip'), url?: string(name='Url'), autoStart?: boolean(name='AutoStart'), vendor?: string(name='Vendor'), gbId?: string(name='GbId'), groupId?: string(name='GroupId'), longitude?: string(name='Longitude'), latitude?: string(name='Latitude'), id?: string(name='Id'), username?: string(name='Username'), stats?: { failedNum?: long(name='FailedNum'), streamNum?: long(name='StreamNum'), channelNum?: long(name='ChannelNum'), onlineNum?: long(name='OnlineNum'), offlineNum?: long(name='OfflineNum'), }(name='Stats'), directory?: { parentId?: string(name='ParentId'), description?: string(name='Description'), groupId?: string(name='GroupId'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), }(name='Directory'), } ](name='Devices'), } model DescribeDevicesResponse = { headers: map[string]string(name='headers'), body: DescribeDevicesResponseBody(name='body'), } async function describeDevicesWithOptions(request: DescribeDevicesRequest, runtime: Util.RuntimeOptions): DescribeDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDevices(request: DescribeDevicesRequest): DescribeDevicesResponse { var runtime = new Util.RuntimeOptions{}; return describeDevicesWithOptions(request, runtime); } model DescribeDeviceURLRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), stream?: string(name='Stream'), outProtocol?: string(name='OutProtocol'), mode?: string(name='Mode'), type?: string(name='Type'), auth?: boolean(name='Auth'), expire?: long(name='Expire'), } model DescribeDeviceURLResponseBody = { url?: string(name='Url'), requestId?: string(name='RequestId'), expireTime?: long(name='ExpireTime'), } model DescribeDeviceURLResponse = { headers: map[string]string(name='headers'), body: DescribeDeviceURLResponseBody(name='body'), } async function describeDeviceURLWithOptions(request: DescribeDeviceURLRequest, runtime: Util.RuntimeOptions): DescribeDeviceURLResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDeviceURL', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDeviceURL(request: DescribeDeviceURLRequest): DescribeDeviceURLResponse { var runtime = new Util.RuntimeOptions{}; return describeDeviceURLWithOptions(request, runtime); } model DescribeDirectoriesRequest { ownerId?: long(name='OwnerId'), groupId?: string(name='GroupId'), parentId?: string(name='ParentId'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), noPagination?: boolean(name='NoPagination'), } model DescribeDirectoriesResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), directories?: [ { parentId?: string(name='ParentId'), description?: string(name='Description'), groupId?: string(name='GroupId'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), } ](name='Directories'), } model DescribeDirectoriesResponse = { headers: map[string]string(name='headers'), body: DescribeDirectoriesResponseBody(name='body'), } async function describeDirectoriesWithOptions(request: DescribeDirectoriesRequest, runtime: Util.RuntimeOptions): DescribeDirectoriesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDirectories', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDirectories(request: DescribeDirectoriesRequest): DescribeDirectoriesResponse { var runtime = new Util.RuntimeOptions{}; return describeDirectoriesWithOptions(request, runtime); } model DescribeDirectoryRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DescribeDirectoryResponseBody = { parentId?: string(name='ParentId'), requestId?: string(name='RequestId'), description?: string(name='Description'), groupId?: string(name='GroupId'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), } model DescribeDirectoryResponse = { headers: map[string]string(name='headers'), body: DescribeDirectoryResponseBody(name='body'), } async function describeDirectoryWithOptions(request: DescribeDirectoryRequest, runtime: Util.RuntimeOptions): DescribeDirectoryResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDirectory', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDirectory(request: DescribeDirectoryRequest): DescribeDirectoryResponse { var runtime = new Util.RuntimeOptions{}; return describeDirectoryWithOptions(request, runtime); } model DescribeGroupRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), includeStats?: boolean(name='IncludeStats'), } model DescribeGroupResponseBody = { status?: string(name='Status'), lazyPull?: boolean(name='LazyPull'), callback?: string(name='Callback'), requestId?: string(name='RequestId'), description?: string(name='Description'), app?: string(name='App'), region?: string(name='Region'), enabled?: boolean(name='Enabled'), inProtocol?: string(name='InProtocol'), outProtocol?: string(name='OutProtocol'), name?: string(name='Name'), pushDomain?: string(name='PushDomain'), createdTime?: string(name='CreatedTime'), captureVideo?: int32(name='CaptureVideo'), playDomain?: string(name='PlayDomain'), captureInterval?: int32(name='CaptureInterval'), gbPort?: long(name='GbPort'), gbId?: string(name='GbId'), gbIp?: string(name='GbIp'), captureImage?: int32(name='CaptureImage'), aliasId?: string(name='AliasId'), captureOssBucket?: string(name='CaptureOssBucket'), captureOssPath?: string(name='CaptureOssPath'), id?: string(name='Id'), gbTcpPorts?: [ string ](name='GbTcpPorts'), gbUdpPorts?: [ string ](name='GbUdpPorts'), stats?: { platformNum?: long(name='PlatformNum'), deviceNum?: long(name='DeviceNum'), ipcNum?: long(name='IpcNum'), iedNum?: long(name='IedNum'), }(name='Stats'), } model DescribeGroupResponse = { headers: map[string]string(name='headers'), body: DescribeGroupResponseBody(name='body'), } async function describeGroupWithOptions(request: DescribeGroupRequest, runtime: Util.RuntimeOptions): DescribeGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeGroup', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeGroup(request: DescribeGroupRequest): DescribeGroupResponse { var runtime = new Util.RuntimeOptions{}; return describeGroupWithOptions(request, runtime); } model DescribeGroupsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), region?: string(name='Region'), inProtocol?: string(name='InProtocol'), status?: string(name='Status'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), includeStats?: boolean(name='IncludeStats'), } model DescribeGroupsResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), groups?: [ { status?: string(name='Status'), lazyPull?: boolean(name='LazyPull'), playDomain?: string(name='PlayDomain'), gbPort?: long(name='GbPort'), captureInterval?: int32(name='CaptureInterval'), callback?: string(name='Callback'), gbId?: string(name='GbId'), gbIp?: string(name='GbIp'), captureImage?: int32(name='CaptureImage'), description?: string(name='Description'), region?: string(name='Region'), app?: string(name='App'), aliasId?: string(name='AliasId'), enabled?: boolean(name='Enabled'), inProtocol?: string(name='InProtocol'), captureOssPath?: string(name='CaptureOssPath'), captureOssBucket?: string(name='CaptureOssBucket'), outProtocol?: string(name='OutProtocol'), pushDomain?: string(name='PushDomain'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), captureVideo?: int32(name='CaptureVideo'), id?: string(name='Id'), gbTcpPorts?: [ string ](name='GbTcpPorts'), gbUdpPorts?: [ string ](name='GbUdpPorts'), stats?: { platformNum?: long(name='PlatformNum'), deviceNum?: long(name='DeviceNum'), ipcNum?: long(name='IpcNum'), iedNum?: long(name='IedNum'), }(name='Stats'), } ](name='Groups'), } model DescribeGroupsResponse = { headers: map[string]string(name='headers'), body: DescribeGroupsResponseBody(name='body'), } async function describeGroupsWithOptions(request: DescribeGroupsRequest, runtime: Util.RuntimeOptions): DescribeGroupsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeGroups', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeGroups(request: DescribeGroupsRequest): DescribeGroupsResponse { var runtime = new Util.RuntimeOptions{}; return describeGroupsWithOptions(request, runtime); } model DescribeParentPlatformRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DescribeParentPlatformResponseBody = { status?: string(name='Status'), clientPort?: long(name='ClientPort'), clientGbId?: string(name='ClientGbId'), protocol?: string(name='Protocol'), ip?: string(name='Ip'), port?: long(name='Port'), clientPassword?: string(name='ClientPassword'), clientUsername?: string(name='ClientUsername'), autoStart?: boolean(name='AutoStart'), clientAuth?: boolean(name='ClientAuth'), gbId?: string(name='GbId'), requestId?: string(name='RequestId'), description?: string(name='Description'), clientIp?: string(name='ClientIp'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), } model DescribeParentPlatformResponse = { headers: map[string]string(name='headers'), body: DescribeParentPlatformResponseBody(name='body'), } async function describeParentPlatformWithOptions(request: DescribeParentPlatformRequest, runtime: Util.RuntimeOptions): DescribeParentPlatformResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeParentPlatform', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeParentPlatform(request: DescribeParentPlatformRequest): DescribeParentPlatformResponse { var runtime = new Util.RuntimeOptions{}; return describeParentPlatformWithOptions(request, runtime); } model DescribeParentPlatformDevicesRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model DescribeParentPlatformDevicesResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), devices?: [ { parentId?: string(name='ParentId'), gbId?: string(name='GbId'), groupId?: string(name='GroupId'), name?: string(name='Name'), id?: string(name='Id'), } ](name='Devices'), } model DescribeParentPlatformDevicesResponse = { headers: map[string]string(name='headers'), body: DescribeParentPlatformDevicesResponseBody(name='body'), } async function describeParentPlatformDevicesWithOptions(request: DescribeParentPlatformDevicesRequest, runtime: Util.RuntimeOptions): DescribeParentPlatformDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeParentPlatformDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeParentPlatformDevices(request: DescribeParentPlatformDevicesRequest): DescribeParentPlatformDevicesResponse { var runtime = new Util.RuntimeOptions{}; return describeParentPlatformDevicesWithOptions(request, runtime); } model DescribeParentPlatformsRequest { ownerId?: long(name='OwnerId'), gbId?: string(name='GbId'), status?: string(name='Status'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model DescribeParentPlatformsResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), platforms?: [ { status?: string(name='Status'), clientPort?: long(name='ClientPort'), protocol?: string(name='Protocol'), clientGbId?: string(name='ClientGbId'), ip?: string(name='Ip'), port?: long(name='Port'), clientUsername?: string(name='ClientUsername'), clientPassword?: string(name='ClientPassword'), autoStart?: boolean(name='AutoStart'), clientAuth?: boolean(name='ClientAuth'), gbId?: string(name='GbId'), description?: string(name='Description'), clientIp?: string(name='ClientIp'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), } ](name='Platforms'), } model DescribeParentPlatformsResponse = { headers: map[string]string(name='headers'), body: DescribeParentPlatformsResponseBody(name='body'), } async function describeParentPlatformsWithOptions(request: DescribeParentPlatformsRequest, runtime: Util.RuntimeOptions): DescribeParentPlatformsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeParentPlatforms', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeParentPlatforms(request: DescribeParentPlatformsRequest): DescribeParentPlatformsResponse { var runtime = new Util.RuntimeOptions{}; return describeParentPlatformsWithOptions(request, runtime); } model DescribePresetsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), subProtocol?: string(name='SubProtocol'), } model DescribePresetsResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), presets?: [ { name?: string(name='Name'), id?: string(name='Id'), } ](name='Presets'), } model DescribePresetsResponse = { headers: map[string]string(name='headers'), body: DescribePresetsResponseBody(name='body'), } async function describePresetsWithOptions(request: DescribePresetsRequest, runtime: Util.RuntimeOptions): DescribePresetsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribePresets', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describePresets(request: DescribePresetsRequest): DescribePresetsResponse { var runtime = new Util.RuntimeOptions{}; return describePresetsWithOptions(request, runtime); } model DescribePurchasedDeviceRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DescribePurchasedDeviceResponseBody = { type?: string(name='Type'), subType?: string(name='SubType'), vendor?: string(name='Vendor'), requestId?: string(name='RequestId'), description?: string(name='Description'), registerCode?: string(name='RegisterCode'), groupId?: string(name='GroupId'), groupName?: string(name='GroupName'), region?: string(name='Region'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), orderId?: string(name='OrderId'), } model DescribePurchasedDeviceResponse = { headers: map[string]string(name='headers'), body: DescribePurchasedDeviceResponseBody(name='body'), } async function describePurchasedDeviceWithOptions(request: DescribePurchasedDeviceRequest, runtime: Util.RuntimeOptions): DescribePurchasedDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribePurchasedDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describePurchasedDevice(request: DescribePurchasedDeviceRequest): DescribePurchasedDeviceResponse { var runtime = new Util.RuntimeOptions{}; return describePurchasedDeviceWithOptions(request, runtime); } model DescribePurchasedDevicesRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), type?: string(name='Type'), subType?: string(name='SubType'), groupId?: string(name='GroupId'), vendor?: string(name='Vendor'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model DescribePurchasedDevicesResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), devices?: [ { type?: string(name='Type'), subType?: string(name='SubType'), vendor?: string(name='Vendor'), description?: string(name='Description'), registerCode?: string(name='RegisterCode'), groupId?: string(name='GroupId'), groupName?: string(name='GroupName'), region?: string(name='Region'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), orderId?: string(name='OrderId'), } ](name='Devices'), } model DescribePurchasedDevicesResponse = { headers: map[string]string(name='headers'), body: DescribePurchasedDevicesResponseBody(name='body'), } async function describePurchasedDevicesWithOptions(request: DescribePurchasedDevicesRequest, runtime: Util.RuntimeOptions): DescribePurchasedDevicesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribePurchasedDevices', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describePurchasedDevices(request: DescribePurchasedDevicesRequest): DescribePurchasedDevicesResponse { var runtime = new Util.RuntimeOptions{}; return describePurchasedDevicesWithOptions(request, runtime); } model DescribeRecordsRequest { ownerId?: long(name='OwnerId'), type?: string(name='Type'), streamId?: string(name='StreamId'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), privateBucket?: boolean(name='PrivateBucket'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model DescribeRecordsResponseBody = { pageNum?: long(name='PageNum'), requestId?: string(name='RequestId'), nextStartTime?: string(name='NextStartTime'), pageSize?: long(name='PageSize'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), records?: [ { type?: string(name='Type'), height?: long(name='Height'), url?: string(name='Url'), ossBucket?: string(name='OssBucket'), fileFormat?: string(name='FileFormat'), streamId?: string(name='StreamId'), ossObject?: string(name='OssObject'), endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), width?: long(name='Width'), templateId?: string(name='TemplateId'), id?: string(name='Id'), ossEndpoint?: string(name='OssEndpoint'), } ](name='Records'), } model DescribeRecordsResponse = { headers: map[string]string(name='headers'), body: DescribeRecordsResponseBody(name='body'), } async function describeRecordsWithOptions(request: DescribeRecordsRequest, runtime: Util.RuntimeOptions): DescribeRecordsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeRecords', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeRecords(request: DescribeRecordsRequest): DescribeRecordsResponse { var runtime = new Util.RuntimeOptions{}; return describeRecordsWithOptions(request, runtime); } model DescribeStreamRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DescribeStreamResponseBody = { status?: string(name='Status'), playDomain?: string(name='PlayDomain'), protocol?: string(name='Protocol'), deviceId?: string(name='DeviceId'), height?: int32(name='Height'), requestId?: string(name='RequestId'), groupId?: string(name='GroupId'), width?: int32(name='Width'), app?: string(name='App'), enabled?: boolean(name='Enabled'), name?: string(name='Name'), pushDomain?: string(name='PushDomain'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), } model DescribeStreamResponse = { headers: map[string]string(name='headers'), body: DescribeStreamResponseBody(name='body'), } async function describeStreamWithOptions(request: DescribeStreamRequest, runtime: Util.RuntimeOptions): DescribeStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeStream(request: DescribeStreamRequest): DescribeStreamResponse { var runtime = new Util.RuntimeOptions{}; return describeStreamWithOptions(request, runtime); } model DescribeStreamsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), groupId?: string(name='GroupId'), deviceId?: string(name='DeviceId'), parentId?: string(name='ParentId'), name?: string(name='Name'), domain?: string(name='Domain'), app?: string(name='App'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model DescribeStreamsResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), streams?: [ { status?: string(name='Status'), playDomain?: string(name='PlayDomain'), protocol?: string(name='Protocol'), deviceId?: string(name='DeviceId'), height?: int32(name='Height'), groupId?: string(name='GroupId'), app?: string(name='App'), width?: int32(name='Width'), enabled?: boolean(name='Enabled'), name?: string(name='Name'), pushDomain?: string(name='PushDomain'), createdTime?: string(name='CreatedTime'), id?: string(name='Id'), } ](name='Streams'), } model DescribeStreamsResponse = { headers: map[string]string(name='headers'), body: DescribeStreamsResponseBody(name='body'), } async function describeStreamsWithOptions(request: DescribeStreamsRequest, runtime: Util.RuntimeOptions): DescribeStreamsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeStreams', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeStreams(request: DescribeStreamsRequest): DescribeStreamsResponse { var runtime = new Util.RuntimeOptions{}; return describeStreamsWithOptions(request, runtime); } model DescribeStreamURLRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), type?: string(name='Type'), outProtocol?: string(name='OutProtocol'), outHostType?: string(name='OutHostType'), location?: string(name='Location'), auth?: boolean(name='Auth'), authKey?: string(name='AuthKey'), expire?: long(name='Expire'), startTime?: long(name='StartTime'), endTime?: long(name='EndTime'), transcode?: string(name='Transcode'), } model DescribeStreamURLResponseBody = { url?: string(name='Url'), requestId?: string(name='RequestId'), expireTime?: long(name='ExpireTime'), } model DescribeStreamURLResponse = { headers: map[string]string(name='headers'), body: DescribeStreamURLResponseBody(name='body'), } async function describeStreamURLWithOptions(request: DescribeStreamURLRequest, runtime: Util.RuntimeOptions): DescribeStreamURLResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeStreamURL', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeStreamURL(request: DescribeStreamURLRequest): DescribeStreamURLResponse { var runtime = new Util.RuntimeOptions{}; return describeStreamURLWithOptions(request, runtime); } model DescribeStreamVodListRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), startTime?: long(name='StartTime'), endTime?: long(name='EndTime'), } model DescribeStreamVodListResponseBody = { requestId?: string(name='RequestId'), records?: [ { endTime?: long(name='EndTime'), startTime?: long(name='StartTime'), } ](name='Records'), } model DescribeStreamVodListResponse = { headers: map[string]string(name='headers'), body: DescribeStreamVodListResponseBody(name='body'), } async function describeStreamVodListWithOptions(request: DescribeStreamVodListRequest, runtime: Util.RuntimeOptions): DescribeStreamVodListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeStreamVodList', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeStreamVodList(request: DescribeStreamVodListRequest): DescribeStreamVodListResponse { var runtime = new Util.RuntimeOptions{}; return describeStreamVodListWithOptions(request, runtime); } model DescribeTemplateRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model DescribeTemplateResponseBody = { type?: string(name='Type'), trigger?: string(name='Trigger'), hlsTs?: string(name='HlsTs'), mp4?: string(name='Mp4'), jpgOverwrite?: string(name='JpgOverwrite'), callback?: string(name='Callback'), requestId?: string(name='RequestId'), description?: string(name='Description'), region?: string(name='Region'), retention?: long(name='Retention'), hlsM3u8?: string(name='HlsM3u8'), name?: string(name='Name'), flv?: string(name='Flv'), createdTime?: string(name='CreatedTime'), ossEndpoint?: string(name='OssEndpoint'), ossFilePrefix?: string(name='OssFilePrefix'), jpgOnDemand?: string(name='JpgOnDemand'), ossBucket?: string(name='OssBucket'), fileFormat?: string(name='FileFormat'), jpgSequence?: string(name='JpgSequence'), endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), interval?: long(name='Interval'), id?: string(name='Id'), transConfigs?: [ { gop?: long(name='Gop'), width?: long(name='Width'), videoBitrate?: long(name='VideoBitrate'), height?: long(name='Height'), videoCodec?: string(name='VideoCodec'), fps?: long(name='Fps'), name?: string(name='Name'), id?: string(name='Id'), } ](name='TransConfigs'), } model DescribeTemplateResponse = { headers: map[string]string(name='headers'), body: DescribeTemplateResponseBody(name='body'), } async function describeTemplateWithOptions(request: DescribeTemplateRequest, runtime: Util.RuntimeOptions): DescribeTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeTemplate(request: DescribeTemplateRequest): DescribeTemplateResponse { var runtime = new Util.RuntimeOptions{}; return describeTemplateWithOptions(request, runtime); } model DescribeTemplatesRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), type?: string(name='Type'), instanceId?: string(name='InstanceId'), sortBy?: string(name='SortBy'), sortDirection?: string(name='SortDirection'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model DescribeTemplatesResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), templates?: [ { type?: string(name='Type'), trigger?: string(name='Trigger'), ossFilePrefix?: string(name='OssFilePrefix'), hlsTs?: string(name='HlsTs'), mp4?: string(name='Mp4'), jpgOnDemand?: string(name='JpgOnDemand'), ossBucket?: string(name='OssBucket'), jpgSequence?: string(name='JpgSequence'), jpgOverwrite?: string(name='JpgOverwrite'), fileFormat?: string(name='FileFormat'), callback?: string(name='Callback'), endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), interval?: long(name='Interval'), description?: string(name='Description'), region?: string(name='Region'), retention?: long(name='Retention'), hlsM3u8?: string(name='HlsM3u8'), flv?: string(name='Flv'), name?: string(name='Name'), createdTime?: string(name='CreatedTime'), ossEndpoint?: string(name='OssEndpoint'), id?: string(name='Id'), transConfigs?: [ { gop?: long(name='Gop'), width?: long(name='Width'), videoBitrate?: long(name='VideoBitrate'), height?: long(name='Height'), videoCodec?: string(name='VideoCodec'), fps?: long(name='Fps'), name?: string(name='Name'), id?: string(name='id'), } ](name='TransConfigs'), } ](name='Templates'), } model DescribeTemplatesResponse = { headers: map[string]string(name='headers'), body: DescribeTemplatesResponseBody(name='body'), } async function describeTemplatesWithOptions(request: DescribeTemplatesRequest, runtime: Util.RuntimeOptions): DescribeTemplatesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeTemplates', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeTemplates(request: DescribeTemplatesRequest): DescribeTemplatesResponse { var runtime = new Util.RuntimeOptions{}; return describeTemplatesWithOptions(request, runtime); } model DescribeVodStreamURLRequest { ownerId?: long(name='OwnerId'), url?: string(name='Url'), txId?: string(name='TxId'), } model DescribeVodStreamURLResponseBody = { url?: string(name='Url'), outProtocol?: string(name='OutProtocol'), requestId?: string(name='RequestId'), port?: long(name='Port'), txId?: string(name='TxId'), } model DescribeVodStreamURLResponse = { headers: map[string]string(name='headers'), body: DescribeVodStreamURLResponseBody(name='body'), } async function describeVodStreamURLWithOptions(request: DescribeVodStreamURLRequest, runtime: Util.RuntimeOptions): DescribeVodStreamURLResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVodStreamURL', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVodStreamURL(request: DescribeVodStreamURLRequest): DescribeVodStreamURLResponse { var runtime = new Util.RuntimeOptions{}; return describeVodStreamURLWithOptions(request, runtime); } model DescribeVsCertificateDetailRequest { ownerId?: long(name='OwnerId'), certName?: string(name='CertName'), } model DescribeVsCertificateDetailResponseBody = { certName?: string(name='CertName'), key?: string(name='Key'), cert?: string(name='Cert'), certId?: long(name='CertId'), requestId?: string(name='RequestId'), } model DescribeVsCertificateDetailResponse = { headers: map[string]string(name='headers'), body: DescribeVsCertificateDetailResponseBody(name='body'), } async function describeVsCertificateDetailWithOptions(request: DescribeVsCertificateDetailRequest, runtime: Util.RuntimeOptions): DescribeVsCertificateDetailResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsCertificateDetail', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsCertificateDetail(request: DescribeVsCertificateDetailRequest): DescribeVsCertificateDetailResponse { var runtime = new Util.RuntimeOptions{}; return describeVsCertificateDetailWithOptions(request, runtime); } model DescribeVsCertificateListRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), } model DescribeVsCertificateListResponseBody = { requestId?: string(name='RequestId'), certificateListModel?: { count?: int32(name='Count'), certList?: [ { lastTime?: long(name='LastTime'), fingerprint?: string(name='Fingerprint'), certName?: string(name='CertName'), issuer?: string(name='Issuer'), certId?: long(name='CertId'), common?: string(name='Common'), } ](name='CertList'), }(name='CertificateListModel'), } model DescribeVsCertificateListResponse = { headers: map[string]string(name='headers'), body: DescribeVsCertificateListResponseBody(name='body'), } async function describeVsCertificateListWithOptions(request: DescribeVsCertificateListRequest, runtime: Util.RuntimeOptions): DescribeVsCertificateListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsCertificateList', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsCertificateList(request: DescribeVsCertificateListRequest): DescribeVsCertificateListResponse { var runtime = new Util.RuntimeOptions{}; return describeVsCertificateListWithOptions(request, runtime); } model DescribeVsDomainBpsDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), interval?: string(name='Interval'), ispNameEn?: string(name='IspNameEn'), locationNameEn?: string(name='LocationNameEn'), } model DescribeVsDomainBpsDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), bpsDataPerInterval?: { dataModule?: [ { bpsValue?: string(name='BpsValue'), timeStamp?: string(name='TimeStamp'), } ](name='DataModule') }(name='BpsDataPerInterval'), } model DescribeVsDomainBpsDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainBpsDataResponseBody(name='body'), } async function describeVsDomainBpsDataWithOptions(request: DescribeVsDomainBpsDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainBpsDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainBpsData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainBpsData(request: DescribeVsDomainBpsDataRequest): DescribeVsDomainBpsDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainBpsDataWithOptions(request, runtime); } model DescribeVsDomainCertificateInfoRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), } model DescribeVsDomainCertificateInfoResponseBody = { requestId?: string(name='RequestId'), certInfos?: { certInfo?: [ { status?: string(name='Status'), certLife?: string(name='CertLife'), certExpireTime?: string(name='CertExpireTime'), SSLPub?: string(name='SSLPub'), certType?: string(name='CertType'), serverCertificateStatus?: string(name='ServerCertificateStatus'), certDomainName?: string(name='CertDomainName'), certName?: string(name='CertName'), certOrg?: string(name='CertOrg'), domainName?: string(name='DomainName'), } ](name='CertInfo') }(name='CertInfos'), } model DescribeVsDomainCertificateInfoResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainCertificateInfoResponseBody(name='body'), } async function describeVsDomainCertificateInfoWithOptions(request: DescribeVsDomainCertificateInfoRequest, runtime: Util.RuntimeOptions): DescribeVsDomainCertificateInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainCertificateInfo', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainCertificateInfo(request: DescribeVsDomainCertificateInfoRequest): DescribeVsDomainCertificateInfoResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainCertificateInfoWithOptions(request, runtime); } model DescribeVsDomainConfigsRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), functionNames?: string(name='FunctionNames'), } model DescribeVsDomainConfigsResponseBody = { requestId?: string(name='RequestId'), domainConfigs?: [ { status?: string(name='Status'), configId?: string(name='ConfigId'), functionName?: string(name='FunctionName'), functionArgs?: [ { argName?: string(name='ArgName'), argValue?: string(name='ArgValue'), } ](name='FunctionArgs'), } ](name='DomainConfigs'), } model DescribeVsDomainConfigsResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainConfigsResponseBody(name='body'), } async function describeVsDomainConfigsWithOptions(request: DescribeVsDomainConfigsRequest, runtime: Util.RuntimeOptions): DescribeVsDomainConfigsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainConfigs', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainConfigs(request: DescribeVsDomainConfigsRequest): DescribeVsDomainConfigsResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainConfigsWithOptions(request, runtime); } model DescribeVsDomainDetailRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), } model DescribeVsDomainDetailResponseBody = { requestId?: string(name='RequestId'), domainConfig?: { gmtCreated?: string(name='GmtCreated'), description?: string(name='Description'), SSLProtocol?: string(name='SSLProtocol'), region?: string(name='Region'), scope?: string(name='Scope'), cname?: string(name='Cname'), domainStatus?: string(name='DomainStatus'), gmtModified?: string(name='GmtModified'), domainName?: string(name='DomainName'), domainType?: string(name='DomainType'), }(name='DomainConfig'), } model DescribeVsDomainDetailResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainDetailResponseBody(name='body'), } async function describeVsDomainDetailWithOptions(request: DescribeVsDomainDetailRequest, runtime: Util.RuntimeOptions): DescribeVsDomainDetailResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainDetail', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainDetail(request: DescribeVsDomainDetailRequest): DescribeVsDomainDetailResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainDetailWithOptions(request, runtime); } model DescribeVsDomainPvDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), } model DescribeVsDomainPvDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), pvDataInterval?: { usageData?: [ { value?: string(name='Value'), timeStamp?: string(name='TimeStamp'), } ](name='UsageData') }(name='PvDataInterval'), } model DescribeVsDomainPvDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainPvDataResponseBody(name='body'), } async function describeVsDomainPvDataWithOptions(request: DescribeVsDomainPvDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainPvDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainPvData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainPvData(request: DescribeVsDomainPvDataRequest): DescribeVsDomainPvDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainPvDataWithOptions(request, runtime); } model DescribeVsDomainPvUvDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), } model DescribeVsDomainPvUvDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), pvUvDataInfos?: { pvUvDataInfo?: [ { PV?: string(name='PV'), timeStamp?: string(name='TimeStamp'), UV?: string(name='UV'), } ](name='PvUvDataInfo') }(name='PvUvDataInfos'), } model DescribeVsDomainPvUvDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainPvUvDataResponseBody(name='body'), } async function describeVsDomainPvUvDataWithOptions(request: DescribeVsDomainPvUvDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainPvUvDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainPvUvData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainPvUvData(request: DescribeVsDomainPvUvDataRequest): DescribeVsDomainPvUvDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainPvUvDataWithOptions(request, runtime); } model DescribeVsDomainRecordDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), } model DescribeVsDomainRecordDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), recordDataPerInterval?: { dataModule?: [ { recordValue?: string(name='RecordValue'), timeStamp?: string(name='TimeStamp'), } ](name='DataModule') }(name='RecordDataPerInterval'), } model DescribeVsDomainRecordDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainRecordDataResponseBody(name='body'), } async function describeVsDomainRecordDataWithOptions(request: DescribeVsDomainRecordDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainRecordDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainRecordData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainRecordData(request: DescribeVsDomainRecordDataRequest): DescribeVsDomainRecordDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainRecordDataWithOptions(request, runtime); } model DescribeVsDomainRegionDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), } model DescribeVsDomainRegionDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), value?: { regionProportionData?: [ { totalQuery?: string(name='TotalQuery'), totalBytes?: string(name='TotalBytes'), avgResponseRate?: string(name='AvgResponseRate'), avgResponseTime?: string(name='AvgResponseTime'), reqErrRate?: string(name='ReqErrRate'), avgObjectSize?: string(name='AvgObjectSize'), bps?: string(name='Bps'), qps?: string(name='Qps'), regionEname?: string(name='RegionEname'), region?: string(name='Region'), proportion?: string(name='Proportion'), bytesProportion?: string(name='BytesProportion'), } ](name='RegionProportionData') }(name='Value'), } model DescribeVsDomainRegionDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainRegionDataResponseBody(name='body'), } async function describeVsDomainRegionDataWithOptions(request: DescribeVsDomainRegionDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainRegionDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainRegionData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainRegionData(request: DescribeVsDomainRegionDataRequest): DescribeVsDomainRegionDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainRegionDataWithOptions(request, runtime); } model DescribeVsDomainReqBpsDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), interval?: string(name='Interval'), ispNameEn?: string(name='IspNameEn'), locationNameEn?: string(name='LocationNameEn'), } model DescribeVsDomainReqBpsDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), reqBpsDataPerInterval?: { dataModule?: [ { timeStamp?: string(name='TimeStamp'), reqBpsValue?: string(name='ReqBpsValue'), } ](name='DataModule') }(name='ReqBpsDataPerInterval'), } model DescribeVsDomainReqBpsDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainReqBpsDataResponseBody(name='body'), } async function describeVsDomainReqBpsDataWithOptions(request: DescribeVsDomainReqBpsDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainReqBpsDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainReqBpsData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainReqBpsData(request: DescribeVsDomainReqBpsDataRequest): DescribeVsDomainReqBpsDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainReqBpsDataWithOptions(request, runtime); } model DescribeVsDomainReqTrafficDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), interval?: string(name='Interval'), ispNameEn?: string(name='IspNameEn'), locationNameEn?: string(name='LocationNameEn'), } model DescribeVsDomainReqTrafficDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), reqTrafficDataPerInterval?: { dataModule?: [ { reqTrafficValue?: string(name='ReqTrafficValue'), timeStamp?: string(name='TimeStamp'), } ](name='DataModule') }(name='ReqTrafficDataPerInterval'), } model DescribeVsDomainReqTrafficDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainReqTrafficDataResponseBody(name='body'), } async function describeVsDomainReqTrafficDataWithOptions(request: DescribeVsDomainReqTrafficDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainReqTrafficDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainReqTrafficData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainReqTrafficData(request: DescribeVsDomainReqTrafficDataRequest): DescribeVsDomainReqTrafficDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainReqTrafficDataWithOptions(request, runtime); } model DescribeVsDomainSnapshotDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), } model DescribeVsDomainSnapshotDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), snapshotDataPerInterval?: { dataModule?: [ { snapshotValue?: string(name='SnapshotValue'), timeStamp?: string(name='TimeStamp'), } ](name='DataModule') }(name='SnapshotDataPerInterval'), } model DescribeVsDomainSnapshotDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainSnapshotDataResponseBody(name='body'), } async function describeVsDomainSnapshotDataWithOptions(request: DescribeVsDomainSnapshotDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainSnapshotDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainSnapshotData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainSnapshotData(request: DescribeVsDomainSnapshotDataRequest): DescribeVsDomainSnapshotDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainSnapshotDataWithOptions(request, runtime); } model DescribeVsDomainTrafficDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), interval?: string(name='Interval'), ispNameEn?: string(name='IspNameEn'), locationNameEn?: string(name='LocationNameEn'), } model DescribeVsDomainTrafficDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), trafficDataPerInterval?: { dataModule?: [ { trafficValue?: string(name='TrafficValue'), timeStamp?: string(name='TimeStamp'), } ](name='DataModule') }(name='TrafficDataPerInterval'), } model DescribeVsDomainTrafficDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainTrafficDataResponseBody(name='body'), } async function describeVsDomainTrafficDataWithOptions(request: DescribeVsDomainTrafficDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainTrafficDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainTrafficData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainTrafficData(request: DescribeVsDomainTrafficDataRequest): DescribeVsDomainTrafficDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainTrafficDataWithOptions(request, runtime); } model DescribeVsDomainUvDataRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), } model DescribeVsDomainUvDataResponseBody = { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainName?: string(name='DomainName'), dataInterval?: string(name='DataInterval'), uvDataInterval?: { usageData?: [ { value?: string(name='Value'), timeStamp?: string(name='TimeStamp'), } ](name='UsageData') }(name='UvDataInterval'), } model DescribeVsDomainUvDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsDomainUvDataResponseBody(name='body'), } async function describeVsDomainUvDataWithOptions(request: DescribeVsDomainUvDataRequest, runtime: Util.RuntimeOptions): DescribeVsDomainUvDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsDomainUvData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsDomainUvData(request: DescribeVsDomainUvDataRequest): DescribeVsDomainUvDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsDomainUvDataWithOptions(request, runtime); } model DescribeVsPullStreamInfoConfigRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), } model DescribeVsPullStreamInfoConfigResponseBody = { requestId?: string(name='RequestId'), liveAppRecordList?: { liveAppRecord?: [ { endTime?: string(name='EndTime'), appName?: string(name='AppName'), sourceUrl?: string(name='SourceUrl'), startTime?: string(name='StartTime'), streamName?: string(name='StreamName'), domainName?: string(name='DomainName'), } ](name='LiveAppRecord') }(name='LiveAppRecordList'), } model DescribeVsPullStreamInfoConfigResponse = { headers: map[string]string(name='headers'), body: DescribeVsPullStreamInfoConfigResponseBody(name='body'), } async function describeVsPullStreamInfoConfigWithOptions(request: DescribeVsPullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): DescribeVsPullStreamInfoConfigResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsPullStreamInfoConfig', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsPullStreamInfoConfig(request: DescribeVsPullStreamInfoConfigRequest): DescribeVsPullStreamInfoConfigResponse { var runtime = new Util.RuntimeOptions{}; return describeVsPullStreamInfoConfigWithOptions(request, runtime); } model DescribeVsStorageUsageDataRequest { ownerId?: long(name='OwnerId'), bucket?: string(name='Bucket'), splitBy?: string(name='SplitBy'), interval?: string(name='Interval'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), } model DescribeVsStorageUsageDataResponseBody = { requestId?: string(name='RequestId'), storageUsage?: { storageUsageDataModule?: [ { storageDataValue?: int32(name='StorageDataValue'), timeStamp?: string(name='TimeStamp'), bucket?: string(name='Bucket'), } ](name='StorageUsageDataModule') }(name='StorageUsage'), } model DescribeVsStorageUsageDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsStorageUsageDataResponseBody(name='body'), } async function describeVsStorageUsageDataWithOptions(request: DescribeVsStorageUsageDataRequest, runtime: Util.RuntimeOptions): DescribeVsStorageUsageDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsStorageUsageData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsStorageUsageData(request: DescribeVsStorageUsageDataRequest): DescribeVsStorageUsageDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsStorageUsageDataWithOptions(request, runtime); } model DescribeVsStreamsNotifyUrlConfigRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), } model DescribeVsStreamsNotifyUrlConfigResponseBody = { requestId?: string(name='RequestId'), liveStreamsNotifyConfig?: { authType?: string(name='AuthType'), authKey?: string(name='AuthKey'), domainName?: string(name='DomainName'), notifyUrl?: string(name='NotifyUrl'), }(name='LiveStreamsNotifyConfig'), } model DescribeVsStreamsNotifyUrlConfigResponse = { headers: map[string]string(name='headers'), body: DescribeVsStreamsNotifyUrlConfigResponseBody(name='body'), } async function describeVsStreamsNotifyUrlConfigWithOptions(request: DescribeVsStreamsNotifyUrlConfigRequest, runtime: Util.RuntimeOptions): DescribeVsStreamsNotifyUrlConfigResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsStreamsNotifyUrlConfig', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsStreamsNotifyUrlConfig(request: DescribeVsStreamsNotifyUrlConfigRequest): DescribeVsStreamsNotifyUrlConfigResponse { var runtime = new Util.RuntimeOptions{}; return describeVsStreamsNotifyUrlConfigWithOptions(request, runtime); } model DescribeVsStreamsOnlineListRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), appName?: string(name='AppName'), streamName?: string(name='StreamName'), pageSize?: int32(name='PageSize'), pageNum?: int32(name='PageNum'), streamType?: string(name='StreamType'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), queryType?: string(name='QueryType'), orderBy?: string(name='OrderBy'), } model DescribeVsStreamsOnlineListResponseBody = { totalPage?: int32(name='TotalPage'), pageNum?: int32(name='PageNum'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), totalNum?: int32(name='TotalNum'), onlineInfo?: { liveStreamOnlineInfo?: [ { publishTime?: string(name='PublishTime'), appName?: string(name='AppName'), publishType?: string(name='PublishType'), publishUrl?: string(name='PublishUrl'), transcoded?: string(name='Transcoded'), streamName?: string(name='StreamName'), domainName?: string(name='DomainName'), transcodeId?: string(name='TranscodeId'), publishDomain?: string(name='PublishDomain'), } ](name='LiveStreamOnlineInfo') }(name='OnlineInfo'), } model DescribeVsStreamsOnlineListResponse = { headers: map[string]string(name='headers'), body: DescribeVsStreamsOnlineListResponseBody(name='body'), } async function describeVsStreamsOnlineListWithOptions(request: DescribeVsStreamsOnlineListRequest, runtime: Util.RuntimeOptions): DescribeVsStreamsOnlineListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsStreamsOnlineList', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsStreamsOnlineList(request: DescribeVsStreamsOnlineListRequest): DescribeVsStreamsOnlineListResponse { var runtime = new Util.RuntimeOptions{}; return describeVsStreamsOnlineListWithOptions(request, runtime); } model DescribeVsStreamsPublishListRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), appName?: string(name='AppName'), streamName?: string(name='StreamName'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), pageSize?: int32(name='PageSize'), pageNumber?: int32(name='PageNumber'), streamType?: string(name='StreamType'), queryType?: string(name='QueryType'), orderBy?: string(name='OrderBy'), } model DescribeVsStreamsPublishListResponseBody = { totalPage?: int32(name='TotalPage'), pageNum?: int32(name='PageNum'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), totalNum?: int32(name='TotalNum'), publishInfo?: { liveStreamPublishInfo?: [ { edgeNodeAddr?: string(name='EdgeNodeAddr'), publishUrl?: string(name='PublishUrl'), streamName?: string(name='StreamName'), domainName?: string(name='DomainName'), stopTime?: string(name='StopTime'), transcodeId?: string(name='TranscodeId'), publishDomain?: string(name='PublishDomain'), appName?: string(name='AppName'), publishTime?: string(name='PublishTime'), publishType?: string(name='PublishType'), transcoded?: string(name='Transcoded'), clientAddr?: string(name='ClientAddr'), streamUrl?: string(name='StreamUrl'), } ](name='LiveStreamPublishInfo') }(name='PublishInfo'), } model DescribeVsStreamsPublishListResponse = { headers: map[string]string(name='headers'), body: DescribeVsStreamsPublishListResponseBody(name='body'), } async function describeVsStreamsPublishListWithOptions(request: DescribeVsStreamsPublishListRequest, runtime: Util.RuntimeOptions): DescribeVsStreamsPublishListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsStreamsPublishList', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsStreamsPublishList(request: DescribeVsStreamsPublishListRequest): DescribeVsStreamsPublishListResponse { var runtime = new Util.RuntimeOptions{}; return describeVsStreamsPublishListWithOptions(request, runtime); } model DescribeVsTopDomainsByFlowRequest { ownerId?: long(name='OwnerId'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), limit?: long(name='Limit'), } model DescribeVsTopDomainsByFlowResponseBody = { domainOnlineCount?: long(name='DomainOnlineCount'), endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), requestId?: string(name='RequestId'), domainCount?: long(name='DomainCount'), topDomains?: { topDomain?: [ { maxBps?: long(name='MaxBps'), rank?: long(name='Rank'), totalAccess?: long(name='TotalAccess'), trafficPercent?: string(name='TrafficPercent'), domainName?: string(name='DomainName'), totalTraffic?: string(name='TotalTraffic'), maxBpsTime?: string(name='MaxBpsTime'), } ](name='TopDomain') }(name='TopDomains'), } model DescribeVsTopDomainsByFlowResponse = { headers: map[string]string(name='headers'), body: DescribeVsTopDomainsByFlowResponseBody(name='body'), } async function describeVsTopDomainsByFlowWithOptions(request: DescribeVsTopDomainsByFlowRequest, runtime: Util.RuntimeOptions): DescribeVsTopDomainsByFlowResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsTopDomainsByFlow', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsTopDomainsByFlow(request: DescribeVsTopDomainsByFlowRequest): DescribeVsTopDomainsByFlowResponse { var runtime = new Util.RuntimeOptions{}; return describeVsTopDomainsByFlowWithOptions(request, runtime); } model DescribeVsUpPeakPublishStreamDataRequest { ownerId?: long(name='OwnerId'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), domainSwitch?: string(name='DomainSwitch'), domainName?: string(name='DomainName'), } model DescribeVsUpPeakPublishStreamDataResponseBody = { requestId?: string(name='RequestId'), describeVsUpPeakPublishStreamDatas?: { describeVsUpPeakPublishStreamData?: [ { queryTime?: string(name='QueryTime'), bandWidth?: string(name='BandWidth'), statName?: string(name='StatName'), peakTime?: string(name='PeakTime'), publishStreamNum?: int32(name='PublishStreamNum'), } ](name='DescribeVsUpPeakPublishStreamData') }(name='DescribeVsUpPeakPublishStreamDatas'), } model DescribeVsUpPeakPublishStreamDataResponse = { headers: map[string]string(name='headers'), body: DescribeVsUpPeakPublishStreamDataResponseBody(name='body'), } async function describeVsUpPeakPublishStreamDataWithOptions(request: DescribeVsUpPeakPublishStreamDataRequest, runtime: Util.RuntimeOptions): DescribeVsUpPeakPublishStreamDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsUpPeakPublishStreamData', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsUpPeakPublishStreamData(request: DescribeVsUpPeakPublishStreamDataRequest): DescribeVsUpPeakPublishStreamDataResponse { var runtime = new Util.RuntimeOptions{}; return describeVsUpPeakPublishStreamDataWithOptions(request, runtime); } model DescribeVsUserResourcePackageRequest { securityToken?: string(name='SecurityToken'), ownerId?: long(name='OwnerId'), } model DescribeVsUserResourcePackageResponseBody = { requestId?: string(name='RequestId'), resourcePackageInfos?: { resourcePackageInfo?: [ { displayName?: string(name='DisplayName'), status?: string(name='Status'), commodityCode?: string(name='CommodityCode'), currCapacity?: string(name='CurrCapacity'), initCapacity?: string(name='InitCapacity'), instanceId?: string(name='InstanceId'), } ](name='ResourcePackageInfo') }(name='ResourcePackageInfos'), } model DescribeVsUserResourcePackageResponse = { headers: map[string]string(name='headers'), body: DescribeVsUserResourcePackageResponseBody(name='body'), } async function describeVsUserResourcePackageWithOptions(request: DescribeVsUserResourcePackageRequest, runtime: Util.RuntimeOptions): DescribeVsUserResourcePackageResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeVsUserResourcePackage', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeVsUserResourcePackage(request: DescribeVsUserResourcePackageRequest): DescribeVsUserResourcePackageResponse { var runtime = new Util.RuntimeOptions{}; return describeVsUserResourcePackageWithOptions(request, runtime); } model ForbidVsStreamRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), appName?: string(name='AppName'), streamName?: string(name='StreamName'), liveStreamType?: string(name='LiveStreamType'), oneshot?: string(name='Oneshot'), controlStreamAction?: string(name='ControlStreamAction'), resumeTime?: string(name='ResumeTime'), } model ForbidVsStreamResponseBody = { requestId?: string(name='RequestId'), } model ForbidVsStreamResponse = { headers: map[string]string(name='headers'), body: ForbidVsStreamResponseBody(name='body'), } async function forbidVsStreamWithOptions(request: ForbidVsStreamRequest, runtime: Util.RuntimeOptions): ForbidVsStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ForbidVsStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function forbidVsStream(request: ForbidVsStreamRequest): ForbidVsStreamResponse { var runtime = new Util.RuntimeOptions{}; return forbidVsStreamWithOptions(request, runtime); } model GetBucketInfoRequest { ownerId?: long(name='OwnerId'), bucketName?: string(name='BucketName'), } model GetBucketInfoResponseBody = { requestId?: string(name='RequestId'), bucketInfo?: { storageClass?: string(name='StorageClass'), dataRedundancyType?: string(name='DataRedundancyType'), resourceType?: string(name='ResourceType'), comment?: string(name='Comment'), dispatcherType?: string(name='DispatcherType'), createTime?: string(name='CreateTime'), endpoint?: string(name='Endpoint'), bucketAcl?: string(name='BucketAcl'), bucketName?: string(name='BucketName'), modifyTime?: string(name='ModifyTime'), }(name='BucketInfo'), } model GetBucketInfoResponse = { headers: map[string]string(name='headers'), body: GetBucketInfoResponseBody(name='body'), } async function getBucketInfoWithOptions(request: GetBucketInfoRequest, runtime: Util.RuntimeOptions): GetBucketInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetBucketInfo', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getBucketInfo(request: GetBucketInfoRequest): GetBucketInfoResponse { var runtime = new Util.RuntimeOptions{}; return getBucketInfoWithOptions(request, runtime); } model GotoPresetRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), presetId?: string(name='PresetId'), subProtocol?: string(name='SubProtocol'), } model GotoPresetResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model GotoPresetResponse = { headers: map[string]string(name='headers'), body: GotoPresetResponseBody(name='body'), } async function gotoPresetWithOptions(request: GotoPresetRequest, runtime: Util.RuntimeOptions): GotoPresetResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GotoPreset', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function gotoPreset(request: GotoPresetRequest): GotoPresetResponse { var runtime = new Util.RuntimeOptions{}; return gotoPresetWithOptions(request, runtime); } model ListBucketsRequest { ownerId?: long(name='OwnerId'), prefix?: string(name='Prefix'), keyword?: string(name='Keyword'), marker?: string(name='Marker'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), } model ListBucketsResponseBody = { totalCount?: long(name='TotalCount'), requestId?: string(name='RequestId'), bucketInfos?: [ { storageClass?: string(name='StorageClass'), dataRedundancyType?: string(name='DataRedundancyType'), resourceType?: string(name='ResourceType'), comment?: string(name='Comment'), dispatcherType?: string(name='DispatcherType'), createTime?: string(name='CreateTime'), endpoint?: string(name='Endpoint'), bucketAcl?: string(name='BucketAcl'), bucketName?: string(name='BucketName'), modifyTime?: string(name='ModifyTime'), } ](name='BucketInfos'), } model ListBucketsResponse = { headers: map[string]string(name='headers'), body: ListBucketsResponseBody(name='body'), } async function listBucketsWithOptions(request: ListBucketsRequest, runtime: Util.RuntimeOptions): ListBucketsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListBuckets', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listBuckets(request: ListBucketsRequest): ListBucketsResponse { var runtime = new Util.RuntimeOptions{}; return listBucketsWithOptions(request, runtime); } model ListDeviceChannelsRequest { ownerId?: long(name='OwnerId'), deviceId?: string(name='DeviceId'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model ListDeviceChannelsResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), channels?: [ { channelId?: long(name='ChannelId'), params?: string(name='Params'), deviceStatus?: string(name='DeviceStatus'), name?: string(name='Name'), deviceId?: string(name='DeviceId'), } ](name='Channels'), } model ListDeviceChannelsResponse = { headers: map[string]string(name='headers'), body: ListDeviceChannelsResponseBody(name='body'), } async function listDeviceChannelsWithOptions(request: ListDeviceChannelsRequest, runtime: Util.RuntimeOptions): ListDeviceChannelsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListDeviceChannels', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listDeviceChannels(request: ListDeviceChannelsRequest): ListDeviceChannelsResponse { var runtime = new Util.RuntimeOptions{}; return listDeviceChannelsWithOptions(request, runtime); } model ListDeviceRecordsRequest { ownerId?: long(name='OwnerId'), deviceId?: string(name='DeviceId'), streamId?: string(name='StreamId'), searchCriteria?: string(name='SearchCriteria'), pageSize?: long(name='PageSize'), pageNum?: long(name='PageNum'), } model ListDeviceRecordsResponseBody = { pageNum?: long(name='PageNum'), pageSize?: long(name='PageSize'), requestId?: string(name='RequestId'), totalCount?: long(name='TotalCount'), pageCount?: long(name='PageCount'), records?: [ { endTime?: string(name='EndTime'), startTime?: string(name='StartTime'), recordType?: string(name='RecordType'), filename?: string(name='Filename'), fileSize?: long(name='FileSize'), } ](name='Records'), } model ListDeviceRecordsResponse = { headers: map[string]string(name='headers'), body: ListDeviceRecordsResponseBody(name='body'), } async function listDeviceRecordsWithOptions(request: ListDeviceRecordsRequest, runtime: Util.RuntimeOptions): ListDeviceRecordsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListDeviceRecords', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listDeviceRecords(request: ListDeviceRecordsRequest): ListDeviceRecordsResponse { var runtime = new Util.RuntimeOptions{}; return listDeviceRecordsWithOptions(request, runtime); } model ListObjectsRequest { ownerId?: long(name='OwnerId'), bucketName?: string(name='BucketName'), delimiter?: string(name='Delimiter'), encodingType?: string(name='EncodingType'), marker?: string(name='Marker'), maxKeys?: int32(name='MaxKeys'), prefix?: string(name='Prefix'), continuationToken?: string(name='ContinuationToken'), startAfter?: string(name='StartAfter'), } model ListObjectsResponseBody = { marker?: string(name='Marker'), maxKeys?: int32(name='MaxKeys'), prefix?: string(name='Prefix'), continuationToken?: string(name='ContinuationToken'), nextContinuationToken?: string(name='NextContinuationToken'), encodingType?: string(name='EncodingType'), nextMarker?: string(name='NextMarker'), delimiter?: string(name='Delimiter'), requestId?: string(name='RequestId'), bucketName?: string(name='BucketName'), isTruncated?: boolean(name='IsTruncated'), keyCount?: int32(name='KeyCount'), commonPrefixes?: [ string ](name='CommonPrefixes'), contents?: [ { storageClass?: string(name='StorageClass'), lastModified?: string(name='LastModified'), key?: string(name='Key'), ETag?: string(name='ETag'), size?: long(name='Size'), } ](name='Contents'), } model ListObjectsResponse = { headers: map[string]string(name='headers'), body: ListObjectsResponseBody(name='body'), } async function listObjectsWithOptions(request: ListObjectsRequest, runtime: Util.RuntimeOptions): ListObjectsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListObjects', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listObjects(request: ListObjectsRequest): ListObjectsResponse { var runtime = new Util.RuntimeOptions{}; return listObjectsWithOptions(request, runtime); } model ModifyDeviceRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), description?: string(name='Description'), groupId?: string(name='GroupId'), parentId?: string(name='ParentId'), directoryId?: string(name='DirectoryId'), type?: string(name='Type'), autoStart?: boolean(name='AutoStart'), gbId?: string(name='GbId'), ip?: string(name='Ip'), port?: long(name='Port'), url?: string(name='Url'), username?: string(name='Username'), password?: string(name='Password'), vendor?: string(name='Vendor'), longitude?: string(name='Longitude'), latitude?: string(name='Latitude'), autoPos?: boolean(name='AutoPos'), posInterval?: long(name='PosInterval'), alarmMethod?: string(name='AlarmMethod'), params?: string(name='Params'), } model ModifyDeviceResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model ModifyDeviceResponse = { headers: map[string]string(name='headers'), body: ModifyDeviceResponseBody(name='body'), } async function modifyDeviceWithOptions(request: ModifyDeviceRequest, runtime: Util.RuntimeOptions): ModifyDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyDevice(request: ModifyDeviceRequest): ModifyDeviceResponse { var runtime = new Util.RuntimeOptions{}; return modifyDeviceWithOptions(request, runtime); } model ModifyDeviceAlarmRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), channelId?: int32(name='ChannelId'), alarmId?: string(name='AlarmId'), status?: int32(name='Status'), } model ModifyDeviceAlarmResponseBody = { requestId?: string(name='RequestId'), } model ModifyDeviceAlarmResponse = { headers: map[string]string(name='headers'), body: ModifyDeviceAlarmResponseBody(name='body'), } async function modifyDeviceAlarmWithOptions(request: ModifyDeviceAlarmRequest, runtime: Util.RuntimeOptions): ModifyDeviceAlarmResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyDeviceAlarm', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyDeviceAlarm(request: ModifyDeviceAlarmRequest): ModifyDeviceAlarmResponse { var runtime = new Util.RuntimeOptions{}; return modifyDeviceAlarmWithOptions(request, runtime); } model ModifyDeviceCaptureRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), image?: int32(name='Image'), video?: int32(name='Video'), } model ModifyDeviceCaptureResponseBody = { requestId?: string(name='RequestId'), } model ModifyDeviceCaptureResponse = { headers: map[string]string(name='headers'), body: ModifyDeviceCaptureResponseBody(name='body'), } async function modifyDeviceCaptureWithOptions(request: ModifyDeviceCaptureRequest, runtime: Util.RuntimeOptions): ModifyDeviceCaptureResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyDeviceCapture', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyDeviceCapture(request: ModifyDeviceCaptureRequest): ModifyDeviceCaptureResponse { var runtime = new Util.RuntimeOptions{}; return modifyDeviceCaptureWithOptions(request, runtime); } model ModifyDeviceChannelsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), dsn?: string(name='Dsn'), deviceStatus?: string(name='DeviceStatus'), channels?: string(name='Channels'), } model ModifyDeviceChannelsResponseBody = { requestId?: string(name='RequestId'), } model ModifyDeviceChannelsResponse = { headers: map[string]string(name='headers'), body: ModifyDeviceChannelsResponseBody(name='body'), } async function modifyDeviceChannelsWithOptions(request: ModifyDeviceChannelsRequest, runtime: Util.RuntimeOptions): ModifyDeviceChannelsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyDeviceChannels', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyDeviceChannels(request: ModifyDeviceChannelsRequest): ModifyDeviceChannelsResponse { var runtime = new Util.RuntimeOptions{}; return modifyDeviceChannelsWithOptions(request, runtime); } model ModifyDirectoryRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), description?: string(name='Description'), } model ModifyDirectoryResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model ModifyDirectoryResponse = { headers: map[string]string(name='headers'), body: ModifyDirectoryResponseBody(name='body'), } async function modifyDirectoryWithOptions(request: ModifyDirectoryRequest, runtime: Util.RuntimeOptions): ModifyDirectoryResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyDirectory', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyDirectory(request: ModifyDirectoryRequest): ModifyDirectoryResponse { var runtime = new Util.RuntimeOptions{}; return modifyDirectoryWithOptions(request, runtime); } model ModifyGroupRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), description?: string(name='Description'), region?: string(name='Region'), inProtocol?: string(name='InProtocol'), outProtocol?: string(name='OutProtocol'), enabled?: boolean(name='Enabled'), pushDomain?: string(name='PushDomain'), playDomain?: string(name='PlayDomain'), lazyPull?: boolean(name='LazyPull'), callback?: string(name='Callback'), captureInterval?: int32(name='CaptureInterval'), captureImage?: int32(name='CaptureImage'), captureVideo?: int32(name='CaptureVideo'), captureOssBucket?: string(name='CaptureOssBucket'), captureOssPath?: string(name='CaptureOssPath'), } model ModifyGroupResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model ModifyGroupResponse = { headers: map[string]string(name='headers'), body: ModifyGroupResponseBody(name='body'), } async function modifyGroupWithOptions(request: ModifyGroupRequest, runtime: Util.RuntimeOptions): ModifyGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyGroup', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyGroup(request: ModifyGroupRequest): ModifyGroupResponse { var runtime = new Util.RuntimeOptions{}; return modifyGroupWithOptions(request, runtime); } model ModifyParentPlatformRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), description?: string(name='Description'), gbId?: string(name='GbId'), ip?: string(name='Ip'), port?: long(name='Port'), clientAuth?: boolean(name='ClientAuth'), clientUsername?: string(name='ClientUsername'), clientPassword?: string(name='ClientPassword'), autoStart?: boolean(name='AutoStart'), } model ModifyParentPlatformResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model ModifyParentPlatformResponse = { headers: map[string]string(name='headers'), body: ModifyParentPlatformResponseBody(name='body'), } async function modifyParentPlatformWithOptions(request: ModifyParentPlatformRequest, runtime: Util.RuntimeOptions): ModifyParentPlatformResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyParentPlatform', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyParentPlatform(request: ModifyParentPlatformRequest): ModifyParentPlatformResponse { var runtime = new Util.RuntimeOptions{}; return modifyParentPlatformWithOptions(request, runtime); } model ModifyTemplateRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), description?: string(name='Description'), region?: string(name='Region'), ossBucket?: string(name='OssBucket'), ossEndpoint?: string(name='OssEndpoint'), ossFilePrefix?: string(name='OssFilePrefix'), trigger?: string(name='Trigger'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), interval?: long(name='Interval'), retention?: long(name='Retention'), fileFormat?: string(name='FileFormat'), jpgOverwrite?: string(name='JpgOverwrite'), jpgSequence?: string(name='JpgSequence'), jpgOnDemand?: string(name='JpgOnDemand'), mp4?: string(name='Mp4'), flv?: string(name='Flv'), hlsM3u8?: string(name='HlsM3u8'), hlsTs?: string(name='HlsTs'), callback?: string(name='Callback'), transConfigsJSON?: string(name='TransConfigsJSON'), } model ModifyTemplateResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model ModifyTemplateResponse = { headers: map[string]string(name='headers'), body: ModifyTemplateResponseBody(name='body'), } async function modifyTemplateWithOptions(request: ModifyTemplateRequest, runtime: Util.RuntimeOptions): ModifyTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ModifyTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function modifyTemplate(request: ModifyTemplateRequest): ModifyTemplateResponse { var runtime = new Util.RuntimeOptions{}; return modifyTemplateWithOptions(request, runtime); } model OpenVsServiceResponseBody = { orderId?: string(name='OrderId'), requestId?: string(name='RequestId'), } model OpenVsServiceResponse = { headers: map[string]string(name='headers'), body: OpenVsServiceResponseBody(name='body'), } async function openVsServiceWithOptions(runtime: Util.RuntimeOptions): OpenVsServiceResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('OpenVsService', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function openVsService(): OpenVsServiceResponse { var runtime = new Util.RuntimeOptions{}; return openVsServiceWithOptions(runtime); } model PrepareUploadRequest { ownerId?: long(name='OwnerId'), bucketName?: string(name='BucketName'), clientIp?: string(name='ClientIp'), } model PrepareUploadResponseBody = { requestId?: string(name='RequestId'), bucketName?: string(name='BucketName'), endpoint?: string(name='Endpoint'), } model PrepareUploadResponse = { headers: map[string]string(name='headers'), body: PrepareUploadResponseBody(name='body'), } async function prepareUploadWithOptions(request: PrepareUploadRequest, runtime: Util.RuntimeOptions): PrepareUploadResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PrepareUpload', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function prepareUpload(request: PrepareUploadRequest): PrepareUploadResponse { var runtime = new Util.RuntimeOptions{}; return prepareUploadWithOptions(request, runtime); } model PutBucketRequest { ownerId?: long(name='OwnerId'), bucketName?: string(name='BucketName'), endpoint?: string(name='Endpoint'), comment?: string(name='Comment'), dispatcherType?: string(name='DispatcherType'), bucketAcl?: string(name='BucketAcl'), storageClass?: string(name='StorageClass'), resourceType?: string(name='ResourceType'), dataRedundancyType?: string(name='DataRedundancyType'), } model PutBucketResponseBody = { requestId?: string(name='RequestId'), } model PutBucketResponse = { headers: map[string]string(name='headers'), body: PutBucketResponseBody(name='body'), } async function putBucketWithOptions(request: PutBucketRequest, runtime: Util.RuntimeOptions): PutBucketResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutBucket', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putBucket(request: PutBucketRequest): PutBucketResponse { var runtime = new Util.RuntimeOptions{}; return putBucketWithOptions(request, runtime); } model ResumeVsStreamRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), appName?: string(name='AppName'), streamName?: string(name='StreamName'), liveStreamType?: string(name='LiveStreamType'), controlStreamAction?: string(name='ControlStreamAction'), } model ResumeVsStreamResponseBody = { requestId?: string(name='RequestId'), } model ResumeVsStreamResponse = { headers: map[string]string(name='headers'), body: ResumeVsStreamResponseBody(name='body'), } async function resumeVsStreamWithOptions(request: ResumeVsStreamRequest, runtime: Util.RuntimeOptions): ResumeVsStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ResumeVsStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function resumeVsStream(request: ResumeVsStreamRequest): ResumeVsStreamResponse { var runtime = new Util.RuntimeOptions{}; return resumeVsStreamWithOptions(request, runtime); } model SetPresetRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), presetId?: string(name='PresetId'), subProtocol?: string(name='SubProtocol'), } model SetPresetResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model SetPresetResponse = { headers: map[string]string(name='headers'), body: SetPresetResponseBody(name='body'), } async function setPresetWithOptions(request: SetPresetRequest, runtime: Util.RuntimeOptions): SetPresetResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SetPreset', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function setPreset(request: SetPresetRequest): SetPresetResponse { var runtime = new Util.RuntimeOptions{}; return setPresetWithOptions(request, runtime); } model SetVsDomainCertificateRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), SSLProtocol?: string(name='SSLProtocol'), certName?: string(name='CertName'), certType?: string(name='CertType'), SSLPub?: string(name='SSLPub'), SSLPri?: string(name='SSLPri'), region?: string(name='Region'), forceSet?: string(name='ForceSet'), } model SetVsDomainCertificateResponseBody = { requestId?: string(name='RequestId'), } model SetVsDomainCertificateResponse = { headers: map[string]string(name='headers'), body: SetVsDomainCertificateResponseBody(name='body'), } async function setVsDomainCertificateWithOptions(request: SetVsDomainCertificateRequest, runtime: Util.RuntimeOptions): SetVsDomainCertificateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SetVsDomainCertificate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function setVsDomainCertificate(request: SetVsDomainCertificateRequest): SetVsDomainCertificateResponse { var runtime = new Util.RuntimeOptions{}; return setVsDomainCertificateWithOptions(request, runtime); } model SetVsStreamsNotifyUrlConfigRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), notifyUrl?: string(name='NotifyUrl'), authType?: string(name='AuthType'), authKey?: string(name='AuthKey'), } model SetVsStreamsNotifyUrlConfigResponseBody = { requestId?: string(name='RequestId'), } model SetVsStreamsNotifyUrlConfigResponse = { headers: map[string]string(name='headers'), body: SetVsStreamsNotifyUrlConfigResponseBody(name='body'), } async function setVsStreamsNotifyUrlConfigWithOptions(request: SetVsStreamsNotifyUrlConfigRequest, runtime: Util.RuntimeOptions): SetVsStreamsNotifyUrlConfigResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SetVsStreamsNotifyUrlConfig', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function setVsStreamsNotifyUrlConfig(request: SetVsStreamsNotifyUrlConfigRequest): SetVsStreamsNotifyUrlConfigResponse { var runtime = new Util.RuntimeOptions{}; return setVsStreamsNotifyUrlConfigWithOptions(request, runtime); } model StartDeviceRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model StartDeviceResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model StartDeviceResponse = { headers: map[string]string(name='headers'), body: StartDeviceResponseBody(name='body'), } async function startDeviceWithOptions(request: StartDeviceRequest, runtime: Util.RuntimeOptions): StartDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StartDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function startDevice(request: StartDeviceRequest): StartDeviceResponse { var runtime = new Util.RuntimeOptions{}; return startDeviceWithOptions(request, runtime); } model StartParentPlatformRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model StartParentPlatformResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model StartParentPlatformResponse = { headers: map[string]string(name='headers'), body: StartParentPlatformResponseBody(name='body'), } async function startParentPlatformWithOptions(request: StartParentPlatformRequest, runtime: Util.RuntimeOptions): StartParentPlatformResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StartParentPlatform', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function startParentPlatform(request: StartParentPlatformRequest): StartParentPlatformResponse { var runtime = new Util.RuntimeOptions{}; return startParentPlatformWithOptions(request, runtime); } model StartRecordStreamRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), playDomain?: string(name='PlayDomain'), app?: string(name='App'), name?: string(name='Name'), } model StartRecordStreamResponseBody = { requestId?: string(name='RequestId'), } model StartRecordStreamResponse = { headers: map[string]string(name='headers'), body: StartRecordStreamResponseBody(name='body'), } async function startRecordStreamWithOptions(request: StartRecordStreamRequest, runtime: Util.RuntimeOptions): StartRecordStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StartRecordStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function startRecordStream(request: StartRecordStreamRequest): StartRecordStreamResponse { var runtime = new Util.RuntimeOptions{}; return startRecordStreamWithOptions(request, runtime); } model StartStreamRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), startTime?: long(name='StartTime'), endTime?: long(name='EndTime'), } model StartStreamResponseBody = { requestId?: string(name='RequestId'), name?: string(name='Name'), id?: string(name='Id'), } model StartStreamResponse = { headers: map[string]string(name='headers'), body: StartStreamResponseBody(name='body'), } async function startStreamWithOptions(request: StartStreamRequest, runtime: Util.RuntimeOptions): StartStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StartStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function startStream(request: StartStreamRequest): StartStreamResponse { var runtime = new Util.RuntimeOptions{}; return startStreamWithOptions(request, runtime); } model StartTransferStreamRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), url?: string(name='Url'), transcode?: string(name='Transcode'), } model StartTransferStreamResponseBody = { requestId?: string(name='RequestId'), } model StartTransferStreamResponse = { headers: map[string]string(name='headers'), body: StartTransferStreamResponseBody(name='body'), } async function startTransferStreamWithOptions(request: StartTransferStreamRequest, runtime: Util.RuntimeOptions): StartTransferStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StartTransferStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function startTransferStream(request: StartTransferStreamRequest): StartTransferStreamResponse { var runtime = new Util.RuntimeOptions{}; return startTransferStreamWithOptions(request, runtime); } model StopAdjustRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), iris?: boolean(name='Iris'), focus?: boolean(name='Focus'), subProtocol?: string(name='SubProtocol'), } model StopAdjustResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model StopAdjustResponse = { headers: map[string]string(name='headers'), body: StopAdjustResponseBody(name='body'), } async function stopAdjustWithOptions(request: StopAdjustRequest, runtime: Util.RuntimeOptions): StopAdjustResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StopAdjust', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function stopAdjust(request: StopAdjustRequest): StopAdjustResponse { var runtime = new Util.RuntimeOptions{}; return stopAdjustWithOptions(request, runtime); } model StopDeviceRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), startTime?: string(name='StartTime'), } model StopDeviceResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model StopDeviceResponse = { headers: map[string]string(name='headers'), body: StopDeviceResponseBody(name='body'), } async function stopDeviceWithOptions(request: StopDeviceRequest, runtime: Util.RuntimeOptions): StopDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StopDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function stopDevice(request: StopDeviceRequest): StopDeviceResponse { var runtime = new Util.RuntimeOptions{}; return stopDeviceWithOptions(request, runtime); } model StopMoveRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), pan?: boolean(name='Pan'), tilt?: boolean(name='Tilt'), zoom?: boolean(name='Zoom'), subProtocol?: string(name='SubProtocol'), } model StopMoveResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model StopMoveResponse = { headers: map[string]string(name='headers'), body: StopMoveResponseBody(name='body'), } async function stopMoveWithOptions(request: StopMoveRequest, runtime: Util.RuntimeOptions): StopMoveResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StopMove', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function stopMove(request: StopMoveRequest): StopMoveResponse { var runtime = new Util.RuntimeOptions{}; return stopMoveWithOptions(request, runtime); } model StopRecordStreamRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), playDomain?: string(name='PlayDomain'), app?: string(name='App'), name?: string(name='Name'), } model StopRecordStreamResponseBody = { requestId?: string(name='RequestId'), } model StopRecordStreamResponse = { headers: map[string]string(name='headers'), body: StopRecordStreamResponseBody(name='body'), } async function stopRecordStreamWithOptions(request: StopRecordStreamRequest, runtime: Util.RuntimeOptions): StopRecordStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StopRecordStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function stopRecordStream(request: StopRecordStreamRequest): StopRecordStreamResponse { var runtime = new Util.RuntimeOptions{}; return stopRecordStreamWithOptions(request, runtime); } model StopStreamRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), name?: string(name='Name'), startTime?: string(name='StartTime'), } model StopStreamResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model StopStreamResponse = { headers: map[string]string(name='headers'), body: StopStreamResponseBody(name='body'), } async function stopStreamWithOptions(request: StopStreamRequest, runtime: Util.RuntimeOptions): StopStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StopStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function stopStream(request: StopStreamRequest): StopStreamResponse { var runtime = new Util.RuntimeOptions{}; return stopStreamWithOptions(request, runtime); } model StopTransferStreamRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), transcode?: string(name='Transcode'), } model StopTransferStreamResponseBody = { requestId?: string(name='RequestId'), } model StopTransferStreamResponse = { headers: map[string]string(name='headers'), body: StopTransferStreamResponseBody(name='body'), } async function stopTransferStreamWithOptions(request: StopTransferStreamRequest, runtime: Util.RuntimeOptions): StopTransferStreamResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('StopTransferStream', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function stopTransferStream(request: StopTransferStreamRequest): StopTransferStreamResponse { var runtime = new Util.RuntimeOptions{}; return stopTransferStreamWithOptions(request, runtime); } model SyncCatalogsRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model SyncCatalogsResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model SyncCatalogsResponse = { headers: map[string]string(name='headers'), body: SyncCatalogsResponseBody(name='body'), } async function syncCatalogsWithOptions(request: SyncCatalogsRequest, runtime: Util.RuntimeOptions): SyncCatalogsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SyncCatalogs', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function syncCatalogs(request: SyncCatalogsRequest): SyncCatalogsResponse { var runtime = new Util.RuntimeOptions{}; return syncCatalogsWithOptions(request, runtime); } model SyncDeviceChannelsRequest { ownerId?: long(name='OwnerId'), deviceId?: string(name='DeviceId'), } model SyncDeviceChannelsResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model SyncDeviceChannelsResponse = { headers: map[string]string(name='headers'), body: SyncDeviceChannelsResponseBody(name='body'), } async function syncDeviceChannelsWithOptions(request: SyncDeviceChannelsRequest, runtime: Util.RuntimeOptions): SyncDeviceChannelsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SyncDeviceChannels', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function syncDeviceChannels(request: SyncDeviceChannelsRequest): SyncDeviceChannelsResponse { var runtime = new Util.RuntimeOptions{}; return syncDeviceChannelsWithOptions(request, runtime); } model UnbindDirectoryRequest { ownerId?: long(name='OwnerId'), directoryId?: string(name='DirectoryId'), deviceId?: string(name='DeviceId'), } model UnbindDirectoryResponseBody = { requestId?: string(name='RequestId'), } model UnbindDirectoryResponse = { headers: map[string]string(name='headers'), body: UnbindDirectoryResponseBody(name='body'), } async function unbindDirectoryWithOptions(request: UnbindDirectoryRequest, runtime: Util.RuntimeOptions): UnbindDirectoryResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UnbindDirectory', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function unbindDirectory(request: UnbindDirectoryRequest): UnbindDirectoryResponse { var runtime = new Util.RuntimeOptions{}; return unbindDirectoryWithOptions(request, runtime); } model UnbindParentPlatformDeviceRequest { ownerId?: long(name='OwnerId'), parentPlatformId?: string(name='ParentPlatformId'), deviceId?: string(name='DeviceId'), } model UnbindParentPlatformDeviceResponseBody = { requestId?: string(name='RequestId'), } model UnbindParentPlatformDeviceResponse = { headers: map[string]string(name='headers'), body: UnbindParentPlatformDeviceResponseBody(name='body'), } async function unbindParentPlatformDeviceWithOptions(request: UnbindParentPlatformDeviceRequest, runtime: Util.RuntimeOptions): UnbindParentPlatformDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UnbindParentPlatformDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function unbindParentPlatformDevice(request: UnbindParentPlatformDeviceRequest): UnbindParentPlatformDeviceResponse { var runtime = new Util.RuntimeOptions{}; return unbindParentPlatformDeviceWithOptions(request, runtime); } model UnbindPurchasedDeviceRequest { ownerId?: long(name='OwnerId'), deviceId?: string(name='DeviceId'), } model UnbindPurchasedDeviceResponseBody = { requestId?: string(name='RequestId'), } model UnbindPurchasedDeviceResponse = { headers: map[string]string(name='headers'), body: UnbindPurchasedDeviceResponseBody(name='body'), } async function unbindPurchasedDeviceWithOptions(request: UnbindPurchasedDeviceRequest, runtime: Util.RuntimeOptions): UnbindPurchasedDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UnbindPurchasedDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function unbindPurchasedDevice(request: UnbindPurchasedDeviceRequest): UnbindPurchasedDeviceResponse { var runtime = new Util.RuntimeOptions{}; return unbindPurchasedDeviceWithOptions(request, runtime); } model UnbindTemplateRequest { ownerId?: long(name='OwnerId'), templateId?: string(name='TemplateId'), templateType?: string(name='TemplateType'), instanceId?: string(name='InstanceId'), instanceType?: string(name='InstanceType'), } model UnbindTemplateResponseBody = { templateType?: string(name='TemplateType'), instanceId?: string(name='InstanceId'), requestId?: string(name='RequestId'), instanceType?: string(name='InstanceType'), templateId?: string(name='TemplateId'), } model UnbindTemplateResponse = { headers: map[string]string(name='headers'), body: UnbindTemplateResponseBody(name='body'), } async function unbindTemplateWithOptions(request: UnbindTemplateRequest, runtime: Util.RuntimeOptions): UnbindTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UnbindTemplate', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function unbindTemplate(request: UnbindTemplateRequest): UnbindTemplateResponse { var runtime = new Util.RuntimeOptions{}; return unbindTemplateWithOptions(request, runtime); } model UnlockDeviceRequest { ownerId?: long(name='OwnerId'), id?: string(name='Id'), } model UnlockDeviceResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model UnlockDeviceResponse = { headers: map[string]string(name='headers'), body: UnlockDeviceResponseBody(name='body'), } async function unlockDeviceWithOptions(request: UnlockDeviceRequest, runtime: Util.RuntimeOptions): UnlockDeviceResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UnlockDevice', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function unlockDevice(request: UnlockDeviceRequest): UnlockDeviceResponse { var runtime = new Util.RuntimeOptions{}; return unlockDeviceWithOptions(request, runtime); } model UpdateBucketInfoRequest { ownerId?: long(name='OwnerId'), bucketName?: string(name='BucketName'), comment?: string(name='Comment'), } model UpdateBucketInfoResponseBody = { requestId?: string(name='RequestId'), } model UpdateBucketInfoResponse = { headers: map[string]string(name='headers'), body: UpdateBucketInfoResponseBody(name='body'), } async function updateBucketInfoWithOptions(request: UpdateBucketInfoRequest, runtime: Util.RuntimeOptions): UpdateBucketInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UpdateBucketInfo', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function updateBucketInfo(request: UpdateBucketInfoRequest): UpdateBucketInfoResponse { var runtime = new Util.RuntimeOptions{}; return updateBucketInfoWithOptions(request, runtime); } model UpdateVsPullStreamInfoConfigRequest { ownerId?: long(name='OwnerId'), domainName?: string(name='DomainName'), appName?: string(name='AppName'), streamName?: string(name='StreamName'), sourceUrl?: string(name='SourceUrl'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), always?: string(name='Always'), } model UpdateVsPullStreamInfoConfigResponseBody = { requestId?: string(name='RequestId'), } model UpdateVsPullStreamInfoConfigResponse = { headers: map[string]string(name='headers'), body: UpdateVsPullStreamInfoConfigResponseBody(name='body'), } async function updateVsPullStreamInfoConfigWithOptions(request: UpdateVsPullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): UpdateVsPullStreamInfoConfigResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UpdateVsPullStreamInfoConfig', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function updateVsPullStreamInfoConfig(request: UpdateVsPullStreamInfoConfigRequest): UpdateVsPullStreamInfoConfigResponse { var runtime = new Util.RuntimeOptions{}; return updateVsPullStreamInfoConfigWithOptions(request, runtime); } model UploadDeviceRecordRequest { ownerId?: long(name='OwnerId'), deviceId?: string(name='DeviceId'), streamId?: string(name='StreamId'), searchCriteria?: string(name='SearchCriteria'), uploadType?: string(name='UploadType'), uploadId?: string(name='UploadId'), uploadMode?: string(name='UploadMode'), uploadParams?: string(name='UploadParams'), } model UploadDeviceRecordResponseBody = { id?: string(name='Id'), requestId?: string(name='RequestId'), } model UploadDeviceRecordResponse = { headers: map[string]string(name='headers'), body: UploadDeviceRecordResponseBody(name='body'), } async function uploadDeviceRecordWithOptions(request: UploadDeviceRecordRequest, runtime: Util.RuntimeOptions): UploadDeviceRecordResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UploadDeviceRecord', '2018-12-12', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function uploadDeviceRecord(request: UploadDeviceRecordRequest): UploadDeviceRecordResponse { var runtime = new Util.RuntimeOptions{}; return uploadDeviceRecordWithOptions(request, runtime); }
Tea
4
aliyun/alibabacloud-sdk
vs-20181212/main.tea
[ "Apache-2.0" ]
CREATE TABLE account2( user_id serial PRIMARY KEY, username VARCHAR (50) UNIQUE NOT NULL, password VARCHAR (50) NOT NULL, email VARCHAR (355) UNIQUE NOT NULL, created_on TIMESTAMP NOT NULL, last_login TIMESTAMP );
SQL
3
gh-oss-contributor/graphql-engine-1
cli/integration_test/v2/seeds/1591867862419_test2.sql
[ "Apache-2.0", "MIT" ]
xquery version "1.0-ml"; (: : This is an implementation library, not an interface to the Smart Mastering functionality. : : Code in this library simply returns information about known Entity Services : entity descriptors. :) module namespace es-impl = "http://marklogic.com/smart-mastering/entity-services-impl"; import module namespace const = "http://marklogic.com/smart-mastering/constants" at "/com.marklogic.smart-mastering/constants.xqy"; import module namespace helper-impl = "http://marklogic.com/smart-mastering/helper-impl" at "/com.marklogic.smart-mastering/matcher-impl/helper-impl.xqy"; import module namespace sem = "http://marklogic.com/semantics" at "/MarkLogic/semantics.xqy"; import module namespace httputils = "http://marklogic.com/data-hub/http-utils" at "/data-hub/5/impl/http-utils.xqy"; declare namespace es = "http://marklogic.com/entity-services"; declare variable $_entity-descriptors as array-node() := array-node { let $entities := sem:sparql("SELECT ?entityIRI ?entityTitle ?entityVersion WHERE { ?entityIRI a <http://marklogic.com/entity-services#EntityType>; <http://marklogic.com/entity-services#title> ?entityTitle; <http://marklogic.com/entity-services#version> ?entityVersion. OPTIONAL { ?entityIRI <http://marklogic.com/entity-services#primaryKey> ?primaryKey. } } ORDER BY ?entityTitle") for $entity in $entities let $entity-version := map:get($entity, "entityVersion") let $entity-title := map:get($entity, "entityTitle") let $nc-name := helper-impl:NCName-compatible($entity-title) let $raw-def := fn:collection("http://marklogic.com/entity-services/models") /(object-node()|es:model)[(es:info/es:version|info/version) = $entity-version] /(es:definitions|definitions)/*[fn:string(fn:node-name(.)) eq $nc-name] let $namespace-uri := fn:string(fn:head($raw-def/(es:namespace-uri|namespaceUri|es:namespace|namespace))) let $primary-key := fn:head((map:get($entity, "primaryKey"), $raw-def/(es:primary-key|primaryKey) ! fn:string(.),null-node{})) return object-node { "entityIRI": map:get($entity, "entityIRI"), "entityTitle": $entity-title, "entityVersion": $entity-version, "namespaceUri": $namespace-uri, "primaryKey": $primary-key, "properties": array-node { let $properties := sem:sparql("SELECT ?propertyIRI ?primaryKey ?ref ?datatype ?collation ?items ?title ?itemsDatatype ?itemsRef WHERE { ?entityIRI <http://marklogic.com/entity-services#property> ?propertyIRI. ?propertyIRI <http://marklogic.com/entity-services#title> ?title. OPTIONAL { ?propertyIRI <http://marklogic.com/entity-services#ref> ?ref. } OPTIONAL { ?propertyIRI <http://marklogic.com/entity-services#datatype> ?datatype. } OPTIONAL { ?propertyIRI <http://marklogic.com/entity-services#items> ?items. OPTIONAL { ?items <http://marklogic.com/entity-services#datatype> ?itemsDatatype. } OPTIONAL { ?items <http://marklogic.com/entity-services#ref> ?itemsRef. } } }", $entity) for $property in $properties let $datatype := map:entry("datatype", fn:substring-after(map:get($property, "datatype"), "#")) let $items-datatype := if (fn:exists(map:get($property, "itemsDatatype"))) then map:entry("itemsDatatype", fn:substring-after(map:get($property, "itemsDatatype"), "#")) else () return map:new(( $property, $datatype, $items-datatype )) } } }; declare function es-impl:get-entity-descriptors() as array-node() { $_entity-descriptors }; declare variable $_cached-entities as map:map := map:map(); declare function es-impl:get-entity-def($target-entity as item()?) as object-node()? { if (fn:exists($target-entity)) then if (map:contains($_cached-entities, $target-entity)) then map:get($_cached-entities, $target-entity) else let $entity-def := fn:head(es-impl:get-entity-descriptors()/object-node()[(entityIRI,entityTitle) = $target-entity]) (: try a second time with title, if not with IRI found since external entities give different IRIs :) let $entity-def := if (fn:empty($entity-def) and fn:matches($target-entity, "/[^/]+$")) then let $title := fn:tokenize($target-entity, "/")[fn:last()] return fn:head(es-impl:get-entity-descriptors()/object-node()[entityTitle = $title]) else $entity-def return if (fn:exists($entity-def)) then ( map:put($_cached-entities, $target-entity, $entity-def), $entity-def ) else httputils:throw-not-found($const:ENTITY-NOT-FOUND-ERROR, ("Specified entity not found", $target-entity)) else () }; declare variable $_cached-entity-properties as map:map := map:map(); declare function es-impl:get-entity-def-property( $entity-def as object-node()?, $property-title as xs:string? ) as object-node()? { if (fn:exists($entity-def)) then let $key := fn:generate-id($entity-def) || "|" || $property-title return if (map:contains($_cached-entity-properties, $key)) then map:get($_cached-entity-properties, $key) else let $property-def := $entity-def/properties[title = $property-title] return if (fn:exists($property-def)) then ( map:put($_cached-entity-properties, $key, $property-def), $property-def ) else httputils:throw-not-found($const:ENTITY-PROPERTY-NOT-FOUND-ERROR, ("Specified entity property not found", $entity-def, $property-title)) else () }; declare variable $indexes-by-property-names := map:map(); (: Provide information about a property for the purpose of querying and extracting values. @param $entity-type-iri The IRI string of the Entity Type the property belongs. (The first-level Entity Type, not strutured property) @param $property-path A dot notation to select a path. e.g, Customer with a billing property of type Address can access city with "billing.city" @return map:map { "propertyTitle": string of property title, "propertyPath": string of property's full dot notation, "pathExpression": string of full XPath to property in the document, "indexType": sem:iri if there is an index this is the IRI of range index type, "indexReference": cts:reference if a range index for the property exists, "firstEntityType": sem:iri of the top-level Entity Type for the property, "entityType": sem:iri of the most immediate Entity Type for the property including structured properties, "entityTitle": string of the title of the most immediate Entity Type for the property } :) declare function es-impl:get-entity-property-info($entity-type-iri as xs:string, $property-path as xs:string) as map:map? { let $property-info := es-impl:get-entity-property-info($entity-type-iri) => map:get($property-path) return ( $property-info, if (xdmp:trace-enabled($const:TRACE-MATCH-RESULTS)) then xdmp:trace($const:TRACE-MATCH-RESULTS, "Retrieving property information '<"|| $entity-type-iri || ">" || $property-path ||"' : " || xdmp:to-json-string($property-info)) else () ) }; declare variable $entity-properties-by-model-iri as map:map := map:map(); declare function es-impl:get-entity-property-info($entity-type-iri as xs:string) as map:map { let $entity-model-iri := fn:substring($entity-type-iri, 1, fn:head(fn:reverse(fn:index-of(fn:string-to-codepoints($entity-type-iri), fn:string-to-codepoints("/"))))) let $entity-type-title := fn:substring-after($entity-type-iri, $entity-model-iri) return if (map:contains($entity-properties-by-model-iri, $entity-model-iri)) then $entity-properties-by-model-iri => map:get($entity-model-iri) => map:get($entity-type-title) else let $entity-model-descriptor := fn:head(cts:search(fn:collection("http://marklogic.com/entity-services/models"), cts:triple-range-query(sem:iri($entity-type-iri), sem:curie-expand("rdf:type"), sem:iri("http://marklogic.com/entity-services#EntityType"), "="))) let $entity-descriptor-maps := map:map() let $entity-property-info := es-impl:get-definition-properties($entity-model-descriptor, $entity-descriptor-maps, $entity-type-title, get-entity-type-namespaces($entity-type-iri)) return ( map:put($entity-properties-by-model-iri, $entity-model-iri, $entity-descriptor-maps), $entity-property-info ) }; declare variable $envelope-instance-expression as xs:string := "/(es:envelope|envelope)/(es:instance|instance)"; declare function es-impl:get-definition-properties( $entity-model-descriptor as document-node(), $definitions-map as map:map, $definition-name as xs:string, $namespaces as map:map ) { let $properties-map := es-impl:get-sub-map($definitions-map, $definition-name) return if (map:count($properties-map) gt 0) then $properties-map else let $definition := $entity-model-descriptor/definitions/*[fn:string(fn:node-name(.)) eq $definition-name] let $definition-namespace-prefix := fn:string($definition/namespacePrefix[fn:normalize-space(.)] ! (. || ":")) let $namespace := fn:string($definition/namespace) let $_properties := for $property in $definition/properties/* let $property-title := fn:string(fn:node-name($property)) let $path-expression := $envelope-instance-expression || "/" || $definition-namespace-prefix || $definition-name || "/" || $definition-namespace-prefix || $property-title let $property-path := $property-title let $collation := fn:head(($property/collation, fn:default-collation())) let $datatype := if (fn:exists($property/items/datatype)) then $property/items/datatype else $property/datatype let $allows-multiple-values := $property/datatype = "array" let $options := ( "type=" || $datatype, if ($datatype eq "string") then "collation=" || $collation else () ) let $is-indexed := $property/(facetable|sortable) = fn:true() return ( map:put( $properties-map, $property-title, map:map() => map:with("propertyLineage", ()) => map:with("entityTitle", $definition-name) => map:with("namespace", $namespace) => map:with("namespaces", $namespaces) => map:with("propertyTitle", $property-title) => map:with("pathExpression", $path-expression) => map:with("propertyPath", $property-path) => map:with("isIndexed", $is-indexed) => map:with("allowsMultipleValues", $allows-multiple-values) => map:with("datatype", $datatype) => map:with("indexOptions", $options) => map:with("indexReference", if ($property/(facetable|sortable) = fn:true()) then try { cts:path-reference($path-expression, $options, $namespaces) } catch ($e) { () } else () ) ), for $reference in $property//node("$ref")[fn:starts-with(., "#/definitions/")] let $ref-entity-title := fn:substring-after($reference, "#/definitions/") let $ref-entity-definition-properties := es-impl:get-definition-properties($entity-model-descriptor, $definitions-map, $ref-entity-title, $namespaces) for $sub-property-title in map:keys($ref-entity-definition-properties) let $sub-property-map := map:get($ref-entity-definition-properties, $sub-property-title) let $sub-path-expression := $path-expression || fn:substring-after($sub-property-map => map:get("pathExpression"), $envelope-instance-expression) let $sub-path-property-path := $property-path || "." || $sub-property-map => map:get("propertyPath") let $sub-property-is-indexed := $sub-property-map => map:get("isIndexed") let $sub-property-info := map:new($sub-property-map) => map:with("namespaceLineage", ($namespace, $sub-property-map => map:get("namespaceLineage"))) => map:with("propertyLineage", ($property-title, $sub-property-map => map:get("propertyLineage"))) => map:with("pathExpression", $sub-path-expression) => map:with("propertyPath", $sub-path-property-path) => map:with("indexReference", if ($sub-property-is-indexed) then try { cts:path-reference($sub-path-expression, $sub-property-map => map:get("indexOptions"), $namespaces) } catch ($e) {()} else () ) return ( map:put( $properties-map, $ref-entity-title || "." || $sub-property-title, $sub-property-info ), map:put( $properties-map, $sub-path-property-path, $sub-property-info ) ) ) return ( $properties-map ) }; declare function es-impl:get-sub-map($parent-map as map:map, $map-key as xs:string) { if (map:contains($parent-map, $map-key)) then map:get($parent-map, $map-key) else let $map := map:map() return ( map:put($parent-map, $map-key, $map), $map ) }; declare variable $namespaces-by-entity-type := map:map(); declare function es-impl:get-entity-type-namespaces($entity-type-iri as xs:string) as map:map { if (map:contains($namespaces-by-entity-type, $entity-type-iri)) then map:get($namespaces-by-entity-type, $entity-type-iri) else let $entity-namespaces := map:entry("es", "http://marklogic.com/entity-services") let $_populate-namespaces := for $namespace-pair in sem:sparql(' PREFIX es: <http://marklogic.com/entity-services#> PREFIX fn: <http://www.w3.org/2005/xpath-functions#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT DISTINCT ?namespacePrefix ?namespaceURI WHERE { $entityType (es:ref|es:property|es:items)* ?path. ?path es:namespace ?namespaceURI; es:namespacePrefix ?namespacePrefix. }', map:entry("entityType", sem:iri($entity-type-iri))) let $prefix := fn:string($namespace-pair => map:get("namespacePrefix")) let $uri := fn:string($namespace-pair => map:get("namespaceURI")) where $prefix ne '' return ( if (xdmp:trace-enabled($const:TRACE-MATCH-RESULTS)) then xdmp:trace($const:TRACE-MATCH-RESULTS, "Namespace for <"|| $entity-type-iri ||"> found. " || $prefix || " : " || $uri) else (), $entity-namespaces => map:put($prefix, $uri) ) return ( $namespaces-by-entity-type => map:put($entity-type-iri, $entity-namespaces), $entity-namespaces ) };
XQuery
5
xmlnovelist/marklogic-data-hub
marklogic-data-hub/src/main/resources/ml-modules/root/com.marklogic.smart-mastering/impl/sm-es-impl.xqy
[ "Apache-2.0" ]
<template src="./main.pug"></template> <style src="./style.scss"></style> <script src="./script.ts"></script>
Vue
1
acidburn0zzz/parcel
packages/core/integration-tests/test/integration/vue-external-files/App.vue
[ "MIT" ]
module Issue4267.A0 where record RA0 : Set₁ where field A : Set
Agda
4
cruhland/agda
test/Succeed/Issue4267/A0.agda
[ "MIT" ]
<div class="ui video"> <div class="play"></div> <div class="placeholder"></div> <div class="embed"></div> </div>
HTML
2
292388900/Semantic-UI
test/fixtures/video.html
[ "MIT" ]
#!/bin/bash if git status --porcelain yarn.lock | grep "M yarn.lock" then echo "yarn.lock is dirty. Please ensure changes have been committed" exit 1 else exit 0 fi
Shell
2
waltercruz/gatsby
scripts/check-lockfile.sh
[ "MIT" ]
#include <metal_stdlib> #include <simd/simd.h> using namespace metal; struct Uniforms { half a; half b; half c; half4 d; half4 e; }; struct Inputs { }; struct Outputs { half4 sk_FragColor [[color(0)]]; }; fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; _out.sk_FragColor.x = (refract(float2(_uniforms.a, 0), float2(_uniforms.b, 0), _uniforms.c).x); _out.sk_FragColor = refract(_uniforms.d, _uniforms.e, _uniforms.c); _out.sk_FragColor.xy = half2(0.5h, -0.86602538824081421h); _out.sk_FragColor.xyz = half3(0.5h, 0.0h, -0.86602538824081421h); _out.sk_FragColor = half4(0.5h, 0.0h, 0.0h, -0.86602538824081421h); return _out; }
Metal
3
fourgrad/skia
tests/sksl/intrinsics/Refract.metal
[ "BSD-3-Clause" ]
const std = @import("std"); const testing = std.testing; const mem = std.mem; const assert = std.debug.assert; const ArrayList = std.ArrayList; const Allocator = std.mem.Allocator; const DW = std.dwarf; // zig fmt: off /// Definitions of all of the x64 registers. The order is semantically meaningful. /// The registers are defined such that IDs go in descending order of 64-bit, /// 32-bit, 16-bit, and then 8-bit, and each set contains exactly sixteen /// registers. This results in some useful properties: /// /// Any 64-bit register can be turned into its 32-bit form by adding 16, and /// vice versa. This also works between 32-bit and 16-bit forms. With 8-bit, it /// works for all except for sp, bp, si, and di, which do *not* have an 8-bit /// form. /// /// If (register & 8) is set, the register is extended. /// /// The ID can be easily determined by figuring out what range the register is /// in, and then subtracting the base. pub const Register = enum(u7) { // 0 through 15, 64-bit registers. 8-15 are extended. // id is just the int value. rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15, // 16 through 31, 32-bit registers. 24-31 are extended. // id is int value - 16. eax, ecx, edx, ebx, esp, ebp, esi, edi, r8d, r9d, r10d, r11d, r12d, r13d, r14d, r15d, // 32-47, 16-bit registers. 40-47 are extended. // id is int value - 32. ax, cx, dx, bx, sp, bp, si, di, r8w, r9w, r10w, r11w, r12w, r13w, r14w, r15w, // 48-63, 8-bit registers. 56-63 are extended. // id is int value - 48. al, cl, dl, bl, ah, ch, dh, bh, r8b, r9b, r10b, r11b, r12b, r13b, r14b, r15b, // Pseudo, used only for MIR to signify that the // operand is not a register but an immediate, etc. none, /// Returns the bit-width of the register. pub fn size(self: Register) u7 { return switch (@enumToInt(self)) { 0...15 => 64, 16...31 => 32, 32...47 => 16, 48...64 => 8, else => unreachable, }; } /// Returns whether the register is *extended*. Extended registers are the /// new registers added with amd64, r8 through r15. This also includes any /// other variant of access to those registers, such as r8b, r15d, and so /// on. This is needed because access to these registers requires special /// handling via the REX prefix, via the B or R bits, depending on context. pub fn isExtended(self: Register) bool { return @enumToInt(self) & 0x08 != 0; } /// This returns the 4-bit register ID, which is used in practically every /// opcode. Note that bit 3 (the highest bit) is *never* used directly in /// an instruction (@see isExtended), and requires special handling. The /// lower three bits are often embedded directly in instructions (such as /// the B8 variant of moves), or used in R/M bytes. pub fn id(self: Register) u4 { return @truncate(u4, @enumToInt(self)); } /// Like id, but only returns the lower 3 bits. pub fn lowId(self: Register) u3 { return @truncate(u3, @enumToInt(self)); } /// Returns the index into `callee_preserved_regs`. pub fn allocIndex(self: Register) ?u4 { return switch (self) { .rcx, .ecx, .cx, .cl => 0, .rsi, .esi, .si => 1, .rdi, .edi, .di => 2, .r8, .r8d, .r8w, .r8b => 3, .r9, .r9d, .r9w, .r9b => 4, .r10, .r10d, .r10w, .r10b => 5, .r11, .r11d, .r11w, .r11b => 6, else => null, }; } /// Convert from any register to its 64 bit alias. pub fn to64(self: Register) Register { return @intToEnum(Register, self.id()); } /// Convert from any register to its 32 bit alias. pub fn to32(self: Register) Register { return @intToEnum(Register, @as(u8, self.id()) + 16); } /// Convert from any register to its 16 bit alias. pub fn to16(self: Register) Register { return @intToEnum(Register, @as(u8, self.id()) + 32); } /// Convert from any register to its 8 bit alias. pub fn to8(self: Register) Register { return @intToEnum(Register, @as(u8, self.id()) + 48); } pub fn dwarfLocOp(self: Register) u8 { return switch (self.to64()) { .rax => DW.OP.reg0, .rdx => DW.OP.reg1, .rcx => DW.OP.reg2, .rbx => DW.OP.reg3, .rsi => DW.OP.reg4, .rdi => DW.OP.reg5, .rbp => DW.OP.reg6, .rsp => DW.OP.reg7, .r8 => DW.OP.reg8, .r9 => DW.OP.reg9, .r10 => DW.OP.reg10, .r11 => DW.OP.reg11, .r12 => DW.OP.reg12, .r13 => DW.OP.reg13, .r14 => DW.OP.reg14, .r15 => DW.OP.reg15, else => unreachable, }; } }; // zig fmt: on /// TODO this set is actually a set of caller-saved registers. /// These registers need to be preserved (saved on the stack) and restored by the callee before getting clobbered /// and when the callee returns. pub const callee_preserved_regs = [_]Register{ .rcx, .rsi, .rdi, .r8, .r9, .r10, .r11 }; pub const c_abi_int_param_regs = [_]Register{ .rdi, .rsi, .rdx, .rcx, .r8, .r9 }; pub const c_abi_int_return_regs = [_]Register{ .rax, .rdx }; /// Encoding helper functions for x86_64 instructions /// /// Many of these helpers do very little, but they can help make things /// slightly more readable with more descriptive field names / function names. /// /// Some of them also have asserts to ensure that we aren't doing dumb things. /// For example, trying to use register 4 (esp) in an indirect modr/m byte is illegal, /// you need to encode it with an SIB byte. /// /// Note that ALL of these helper functions will assume capacity, /// so ensure that the `code` has sufficient capacity before using them. /// The `init` method is the recommended way to ensure capacity. pub const Encoder = struct { /// Non-owning reference to the code array code: *ArrayList(u8), const Self = @This(); /// Wrap `code` in Encoder to make it easier to call these helper functions /// /// maximum_inst_size should contain the maximum number of bytes /// that the encoded instruction will take. /// This is because the helper functions will assume capacity /// in order to avoid bounds checking. pub fn init(code: *ArrayList(u8), maximum_inst_size: u8) !Self { try code.ensureUnusedCapacity(maximum_inst_size); return Self{ .code = code }; } /// Directly write a number to the code array with big endianness pub fn writeIntBig(self: Self, comptime T: type, value: T) void { mem.writeIntBig( T, self.code.addManyAsArrayAssumeCapacity(@divExact(@typeInfo(T).Int.bits, 8)), value, ); } /// Directly write a number to the code array with little endianness pub fn writeIntLittle(self: Self, comptime T: type, value: T) void { mem.writeIntLittle( T, self.code.addManyAsArrayAssumeCapacity(@divExact(@typeInfo(T).Int.bits, 8)), value, ); } // -------- // Prefixes // -------- pub const LegacyPrefixes = packed struct { /// LOCK prefix_f0: bool = false, /// REPNZ, REPNE, REP, Scalar Double-precision prefix_f2: bool = false, /// REPZ, REPE, REP, Scalar Single-precision prefix_f3: bool = false, /// CS segment override or Branch not taken prefix_2e: bool = false, /// DS segment override prefix_36: bool = false, /// ES segment override prefix_26: bool = false, /// FS segment override prefix_64: bool = false, /// GS segment override prefix_65: bool = false, /// Branch taken prefix_3e: bool = false, /// Operand size override (enables 16 bit operation) prefix_66: bool = false, /// Address size override (enables 16 bit address size) prefix_67: bool = false, padding: u5 = 0, }; /// Encodes legacy prefixes pub fn legacyPrefixes(self: Self, prefixes: LegacyPrefixes) void { if (@bitCast(u16, prefixes) != 0) { // Hopefully this path isn't taken very often, so we'll do it the slow way for now // LOCK if (prefixes.prefix_f0) self.code.appendAssumeCapacity(0xf0); // REPNZ, REPNE, REP, Scalar Double-precision if (prefixes.prefix_f2) self.code.appendAssumeCapacity(0xf2); // REPZ, REPE, REP, Scalar Single-precision if (prefixes.prefix_f3) self.code.appendAssumeCapacity(0xf3); // CS segment override or Branch not taken if (prefixes.prefix_2e) self.code.appendAssumeCapacity(0x2e); // DS segment override if (prefixes.prefix_36) self.code.appendAssumeCapacity(0x36); // ES segment override if (prefixes.prefix_26) self.code.appendAssumeCapacity(0x26); // FS segment override if (prefixes.prefix_64) self.code.appendAssumeCapacity(0x64); // GS segment override if (prefixes.prefix_65) self.code.appendAssumeCapacity(0x65); // Branch taken if (prefixes.prefix_3e) self.code.appendAssumeCapacity(0x3e); // Operand size override if (prefixes.prefix_66) self.code.appendAssumeCapacity(0x66); // Address size override if (prefixes.prefix_67) self.code.appendAssumeCapacity(0x67); } } /// Use 16 bit operand size /// /// Note that this flag is overridden by REX.W, if both are present. pub fn prefix16BitMode(self: Self) void { self.code.appendAssumeCapacity(0x66); } /// From section 2.2.1.2 of the manual, REX is encoded as b0100WRXB pub const Rex = struct { /// Wide, enables 64-bit operation w: bool = false, /// Extends the reg field in the ModR/M byte r: bool = false, /// Extends the index field in the SIB byte x: bool = false, /// Extends the r/m field in the ModR/M byte, /// or the base field in the SIB byte, /// or the reg field in the Opcode byte b: bool = false, }; /// Encodes a REX prefix byte given all the fields /// /// Use this byte whenever you need 64 bit operation, /// or one of reg, index, r/m, base, or opcode-reg might be extended. /// /// See struct `Rex` for a description of each field. /// /// Does not add a prefix byte if none of the fields are set! pub fn rex(self: Self, byte: Rex) void { var value: u8 = 0b0100_0000; if (byte.w) value |= 0b1000; if (byte.r) value |= 0b0100; if (byte.x) value |= 0b0010; if (byte.b) value |= 0b0001; if (value != 0b0100_0000) { self.code.appendAssumeCapacity(value); } } // ------ // Opcode // ------ /// Encodes a 1 byte opcode pub fn opcode_1byte(self: Self, opcode: u8) void { self.code.appendAssumeCapacity(opcode); } /// Encodes a 2 byte opcode /// /// e.g. IMUL has the opcode 0x0f 0xaf, so you use /// /// encoder.opcode_2byte(0x0f, 0xaf); pub fn opcode_2byte(self: Self, prefix: u8, opcode: u8) void { self.code.appendAssumeCapacity(prefix); self.code.appendAssumeCapacity(opcode); } /// Encodes a 1 byte opcode with a reg field /// /// Remember to add a REX prefix byte if reg is extended! pub fn opcode_withReg(self: Self, opcode: u8, reg: u3) void { assert(opcode & 0b111 == 0); self.code.appendAssumeCapacity(opcode | reg); } // ------ // ModR/M // ------ /// Construct a ModR/M byte given all the fields /// /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm(self: Self, mod: u2, reg_or_opx: u3, rm: u3) void { self.code.appendAssumeCapacity( @as(u8, mod) << 6 | @as(u8, reg_or_opx) << 3 | rm, ); } /// Construct a ModR/M byte using direct r/m addressing /// r/m effective address: r/m /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_direct(self: Self, reg_or_opx: u3, rm: u3) void { self.modRm(0b11, reg_or_opx, rm); } /// Construct a ModR/M byte using indirect r/m addressing /// r/m effective address: [r/m] /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_indirectDisp0(self: Self, reg_or_opx: u3, rm: u3) void { assert(rm != 4 and rm != 5); self.modRm(0b00, reg_or_opx, rm); } /// Construct a ModR/M byte using indirect SIB addressing /// r/m effective address: [SIB] /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_SIBDisp0(self: Self, reg_or_opx: u3) void { self.modRm(0b00, reg_or_opx, 0b100); } /// Construct a ModR/M byte using RIP-relative addressing /// r/m effective address: [RIP + disp32] /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_RIPDisp32(self: Self, reg_or_opx: u3) void { self.modRm(0b00, reg_or_opx, 0b101); } /// Construct a ModR/M byte using indirect r/m with a 8bit displacement /// r/m effective address: [r/m + disp8] /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_indirectDisp8(self: Self, reg_or_opx: u3, rm: u3) void { assert(rm != 4); self.modRm(0b01, reg_or_opx, rm); } /// Construct a ModR/M byte using indirect SIB with a 8bit displacement /// r/m effective address: [SIB + disp8] /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_SIBDisp8(self: Self, reg_or_opx: u3) void { self.modRm(0b01, reg_or_opx, 0b100); } /// Construct a ModR/M byte using indirect r/m with a 32bit displacement /// r/m effective address: [r/m + disp32] /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_indirectDisp32(self: Self, reg_or_opx: u3, rm: u3) void { assert(rm != 4); self.modRm(0b10, reg_or_opx, rm); } /// Construct a ModR/M byte using indirect SIB with a 32bit displacement /// r/m effective address: [SIB + disp32] /// /// Note reg's effective address is always just reg for the ModR/M byte. /// Remember to add a REX prefix byte if reg or rm are extended! pub fn modRm_SIBDisp32(self: Self, reg_or_opx: u3) void { self.modRm(0b10, reg_or_opx, 0b100); } // --- // SIB // --- /// Construct a SIB byte given all the fields /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib(self: Self, scale: u2, index: u3, base: u3) void { self.code.appendAssumeCapacity( @as(u8, scale) << 6 | @as(u8, index) << 3 | base, ); } /// Construct a SIB byte with scale * index + base, no frills. /// r/m effective address: [base + scale * index] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_scaleIndexBase(self: Self, scale: u2, index: u3, base: u3) void { assert(base != 5); self.sib(scale, index, base); } /// Construct a SIB byte with scale * index + disp32 /// r/m effective address: [scale * index + disp32] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_scaleIndexDisp32(self: Self, scale: u2, index: u3) void { assert(index != 4); // scale is actually ignored // index = 4 means no index // base = 5 means no base, if mod == 0. self.sib(scale, index, 5); } /// Construct a SIB byte with just base /// r/m effective address: [base] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_base(self: Self, base: u3) void { assert(base != 5); // scale is actually ignored // index = 4 means no index self.sib(0, 4, base); } /// Construct a SIB byte with just disp32 /// r/m effective address: [disp32] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_disp32(self: Self) void { // scale is actually ignored // index = 4 means no index // base = 5 means no base, if mod == 0. self.sib(0, 4, 5); } /// Construct a SIB byte with scale * index + base + disp8 /// r/m effective address: [base + scale * index + disp8] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_scaleIndexBaseDisp8(self: Self, scale: u2, index: u3, base: u3) void { self.sib(scale, index, base); } /// Construct a SIB byte with base + disp8, no index /// r/m effective address: [base + disp8] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_baseDisp8(self: Self, base: u3) void { // scale is ignored // index = 4 means no index self.sib(0, 4, base); } /// Construct a SIB byte with scale * index + base + disp32 /// r/m effective address: [base + scale * index + disp32] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_scaleIndexBaseDisp32(self: Self, scale: u2, index: u3, base: u3) void { self.sib(scale, index, base); } /// Construct a SIB byte with base + disp32, no index /// r/m effective address: [base + disp32] /// /// Remember to add a REX prefix byte if index or base are extended! pub fn sib_baseDisp32(self: Self, base: u3) void { // scale is ignored // index = 4 means no index self.sib(0, 4, base); } // ------------------------- // Trivial (no bit fiddling) // ------------------------- /// Encode an 8 bit immediate /// /// It is sign-extended to 64 bits by the cpu. pub fn imm8(self: Self, imm: i8) void { self.code.appendAssumeCapacity(@bitCast(u8, imm)); } /// Encode an 8 bit displacement /// /// It is sign-extended to 64 bits by the cpu. pub fn disp8(self: Self, disp: i8) void { self.code.appendAssumeCapacity(@bitCast(u8, disp)); } /// Encode an 16 bit immediate /// /// It is sign-extended to 64 bits by the cpu. pub fn imm16(self: Self, imm: i16) void { self.writeIntLittle(i16, imm); } /// Encode an 32 bit immediate /// /// It is sign-extended to 64 bits by the cpu. pub fn imm32(self: Self, imm: i32) void { self.writeIntLittle(i32, imm); } /// Encode an 32 bit displacement /// /// It is sign-extended to 64 bits by the cpu. pub fn disp32(self: Self, disp: i32) void { self.writeIntLittle(i32, disp); } /// Encode an 64 bit immediate /// /// It is sign-extended to 64 bits by the cpu. pub fn imm64(self: Self, imm: u64) void { self.writeIntLittle(u64, imm); } }; test "x86_64 Encoder helpers" { var code = ArrayList(u8).init(testing.allocator); defer code.deinit(); // simple integer multiplication // imul eax,edi // 0faf c7 { try code.resize(0); const encoder = try Encoder.init(&code, 4); encoder.rex(.{ .r = Register.eax.isExtended(), .b = Register.edi.isExtended(), }); encoder.opcode_2byte(0x0f, 0xaf); encoder.modRm_direct( Register.eax.lowId(), Register.edi.lowId(), ); try testing.expectEqualSlices(u8, &[_]u8{ 0x0f, 0xaf, 0xc7 }, code.items); } // simple mov // mov eax,edi // 89 f8 { try code.resize(0); const encoder = try Encoder.init(&code, 3); encoder.rex(.{ .r = Register.edi.isExtended(), .b = Register.eax.isExtended(), }); encoder.opcode_1byte(0x89); encoder.modRm_direct( Register.edi.lowId(), Register.eax.lowId(), ); try testing.expectEqualSlices(u8, &[_]u8{ 0x89, 0xf8 }, code.items); } // signed integer addition of 32-bit sign extended immediate to 64 bit register // add rcx, 2147483647 // // Using the following opcode: REX.W + 81 /0 id, we expect the following encoding // // 48 : REX.W set for 64 bit operand (*r*cx) // 81 : opcode for "<arithmetic> with immediate" // c1 : id = rcx, // : c1 = 11 <-- mod = 11 indicates r/m is register (rcx) // : 000 <-- opcode_extension = 0 because opcode extension is /0. /0 specifies ADD // : 001 <-- 001 is rcx // ffffff7f : 2147483647 { try code.resize(0); const encoder = try Encoder.init(&code, 7); encoder.rex(.{ .w = true }); // use 64 bit operation encoder.opcode_1byte(0x81); encoder.modRm_direct( 0, Register.rcx.lowId(), ); encoder.imm32(2147483647); try testing.expectEqualSlices(u8, &[_]u8{ 0x48, 0x81, 0xc1, 0xff, 0xff, 0xff, 0x7f }, code.items); } } // TODO add these registers to the enum and populate dwarfLocOp // // Return Address register. This is stored in `0(%rsp, "")` and is not a physical register. // RA = (16, "RA"), // // XMM0 = (17, "xmm0"), // XMM1 = (18, "xmm1"), // XMM2 = (19, "xmm2"), // XMM3 = (20, "xmm3"), // XMM4 = (21, "xmm4"), // XMM5 = (22, "xmm5"), // XMM6 = (23, "xmm6"), // XMM7 = (24, "xmm7"), // // XMM8 = (25, "xmm8"), // XMM9 = (26, "xmm9"), // XMM10 = (27, "xmm10"), // XMM11 = (28, "xmm11"), // XMM12 = (29, "xmm12"), // XMM13 = (30, "xmm13"), // XMM14 = (31, "xmm14"), // XMM15 = (32, "xmm15"), // // ST0 = (33, "st0"), // ST1 = (34, "st1"), // ST2 = (35, "st2"), // ST3 = (36, "st3"), // ST4 = (37, "st4"), // ST5 = (38, "st5"), // ST6 = (39, "st6"), // ST7 = (40, "st7"), // // MM0 = (41, "mm0"), // MM1 = (42, "mm1"), // MM2 = (43, "mm2"), // MM3 = (44, "mm3"), // MM4 = (45, "mm4"), // MM5 = (46, "mm5"), // MM6 = (47, "mm6"), // MM7 = (48, "mm7"), // // RFLAGS = (49, "rFLAGS"), // ES = (50, "es"), // CS = (51, "cs"), // SS = (52, "ss"), // DS = (53, "ds"), // FS = (54, "fs"), // GS = (55, "gs"), // // FS_BASE = (58, "fs.base"), // GS_BASE = (59, "gs.base"), // // TR = (62, "tr"), // LDTR = (63, "ldtr"), // MXCSR = (64, "mxcsr"), // FCW = (65, "fcw"), // FSW = (66, "fsw"), // // XMM16 = (67, "xmm16"), // XMM17 = (68, "xmm17"), // XMM18 = (69, "xmm18"), // XMM19 = (70, "xmm19"), // XMM20 = (71, "xmm20"), // XMM21 = (72, "xmm21"), // XMM22 = (73, "xmm22"), // XMM23 = (74, "xmm23"), // XMM24 = (75, "xmm24"), // XMM25 = (76, "xmm25"), // XMM26 = (77, "xmm26"), // XMM27 = (78, "xmm27"), // XMM28 = (79, "xmm28"), // XMM29 = (80, "xmm29"), // XMM30 = (81, "xmm30"), // XMM31 = (82, "xmm31"), // // K0 = (118, "k0"), // K1 = (119, "k1"), // K2 = (120, "k2"), // K3 = (121, "k3"), // K4 = (122, "k4"), // K5 = (123, "k5"), // K6 = (124, "k6"), // K7 = (125, "k7"),
Zig
5
lukekras/zig
src/arch/x86_64/bits.zig
[ "MIT" ]
class Object { # Let's define false, true & nil =) dynamic_method(':false) |g| { g push_false() g ret() } dynamic_method(':true) |g| { g push_true() g ret() } dynamic_method(':nil) |g| { g push_nil() g ret() } } class Class { def alias_method: new for: old { alias_method(new, old) } def ruby_alias: method_name { alias_method(":" + (method_name to_s), method_name) } def ruby_aliases: method_names { method_names each() |m| { ruby_alias: m } } } class String { alias_method: ":+" for: "+" alias_method: ":to_sym" for: "to_sym" } class Module { def included: module def include: modules { modules = modules to_a() modules reverse_each() |mod| { mod append_features: self mod send('included, self) } } } class Class{ def include: modules { modules = modules to_a() modules reverse_each() |mod| { mod append_features: self mod send('included, self) mod included: self } } } class Fancy { class Documentation { def self for: obj is: docstring { true } } }
Fancy
3
bakkdoor/fancy
lib/rbx/alpha.fy
[ "BSD-3-Clause" ]
#!/usr/bin/env sh # Copyright 2021 The Terasology Foundation, 2015 the original author or authors. # SPDX-License-Identifier: Apache-2.0 # # Derived from # https://github.com/gradle/gradle/blob/f38a522/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # # Alternatively use our Launcher from: https://github.com/MovingBlocks/TerasologyLauncher/releases ############################################################################## ## ## ${applicationName} start up script for UN*X ## ############################################################################## # Attempt to set APP_HOME # Resolve links: \$0 may be a link PRG="\$0" # Need this for relative symlinks. while [ -h "\$PRG" ] ; do ls=`ls -ld "\$PRG"` link=`expr "\$ls" : '.*-> \\(.*\\)\$'` if expr "\$link" : '/.*' > /dev/null; then PRG="\$link" else PRG=`dirname "\$PRG"`"/\$link" fi done SAVED="`pwd`" cd "`dirname \"\$PRG\"`/${appHomeRelativePath}" >/dev/null APP_HOME="`pwd -P`" cd "\$SAVED" >/dev/null APP_NAME="${applicationName}" APP_BASE_NAME=`basename "\$0"` # Add default JVM options here. You can also use JAVA_OPTS and ${optsEnvironmentVar} to pass JVM options to this script. DEFAULT_JVM_OPTS=${defaultJvmOpts} # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn () { echo "\$*" } die () { echo echo "\$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; NONSTOP* ) nonstop=true ;; esac <% if ( mainClassName.startsWith('--module ') ) { %>MODULE_PATH=$modulePath<% } %> # Determine the Java command to use to start the JVM. if [ -n "\$JAVA_HOME" ] ; then if [ -x "\$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="\$JAVA_HOME/jre/sh/java" else JAVACMD="\$JAVA_HOME/bin/java" fi if [ ! -x "\$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: \$JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "\$cygwin" = "false" -a "\$darwin" = "false" -a "\$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ \$? -eq 0 ] ; then if [ "\$MAX_FD" = "maximum" -o "\$MAX_FD" = "max" ] ; then MAX_FD="\$MAX_FD_LIMIT" fi ulimit -n \$MAX_FD if [ \$? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: \$MAX_FD" fi else warn "Could not query maximum file descriptor limit: \$MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if \$darwin; then GRADLE_OPTS="\$GRADLE_OPTS \\"-Xdock:name=\$APP_NAME\\" \\"-Xdock:icon=\$APP_HOME/media/gradle.icns\\"" fi # For Cygwin or MSYS, switch paths to Windows format before running java if [ "\$cygwin" = "true" -o "\$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "\$APP_HOME"` CLASSPATH=`cygpath --path --mixed "\$CLASSPATH"` <% if ( mainClassName.startsWith('--module ') ) { %> MODULE_PATH=`cygpath --path --mixed "\$MODULE_PATH"`<% } %> JAVACMD=`cygpath --unix "\$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in \$ROOTDIRSRAW ; do ROOTDIRS="\$ROOTDIRS\$SEP\$dir" SEP="|" done OURCYGPATTERN="(^(\$ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "\$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="\$OURCYGPATTERN|(\$GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "\$@" ; do CHECK=`echo "\$arg"|egrep -c "\$OURCYGPATTERN" -` CHECK2=`echo "\$arg"|egrep -c "^-"` ### Determine if an option if [ \$CHECK -ne 0 ] && [ \$CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args\$i`=`cygpath --path --ignore --mixed "\$arg"` else eval `echo args\$i`="\"\$arg\"" fi i=`expr \$i + 1` done case \$i in 0) set -- ;; 1) set -- "\$args0" ;; 2) set -- "\$args0" "\$args1" ;; 3) set -- "\$args0" "\$args1" "\$args2" ;; 4) set -- "\$args0" "\$args1" "\$args2" "\$args3" ;; 5) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" ;; 6) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" ;; 7) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" "\$args6" ;; 8) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" "\$args6" "\$args7" ;; 9) set -- "\$args0" "\$args1" "\$args2" "\$args3" "\$args4" "\$args5" "\$args6" "\$args7" "\$args8" ;; esac fi # Escape application args save () { for i do printf %s\\\\n "\$i" | sed "s/'/'\\\\\\\\''/g;1s/^/'/;\\\$s/\\\$/' \\\\\\\\/" ; done echo " " } APP_ARGS=`save "\$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- \$DEFAULT_JVM_OPTS \$JAVA_OPTS \$${optsEnvironmentVar} <% if ( appNameSystemProperty ) { %>"\"-D${appNameSystemProperty}=\$APP_BASE_NAME\"" <% } %> <% if ( mainClassName.startsWith('--module ') ) { %>--module-path "\"\$MODULE_PATH\"" <% } %>-jar lib/Terasology.jar "\$APP_ARGS" exec "\$JAVACMD" "\$@"
Groovy Server Pages
4
Elyahu41/Terasology
facades/PC/src/main/startScripts/unixStartScript.gsp
[ "Apache-2.0" ]
import torch.nn as nn import torch.nn.functional as F class DummyModel(nn.Module): def __init__( self, num_embeddings: int, embedding_dim: int, dense_input_size: int, dense_output_size: int, dense_layers_count: int, sparse: bool ): r""" A dummy model with an EmbeddingBag Layer and Dense Layer. Args: num_embeddings (int): size of the dictionary of embeddings embedding_dim (int): the size of each embedding vector dense_input_size (int): size of each input sample dense_output_size (int): size of each output sample dense_layers_count: (int): number of dense layers in dense Sequential module sparse (bool): if True, gradient w.r.t. weight matrix will be a sparse tensor """ super().__init__() self.embedding = nn.EmbeddingBag( num_embeddings, embedding_dim, sparse=sparse ) self.dense = nn.Sequential(*[nn.Linear(dense_input_size, dense_output_size) for _ in range(dense_layers_count)]) def forward(self, x): x = self.embedding(x) return F.softmax(self.dense(x), dim=1)
Python
5
Hacky-DH/pytorch
benchmarks/distributed/rpc/parameter_server/models/DummyModel.py
[ "Intel" ]
[Files] Source: "RevitPythonShell\bin\Release\2014\PythonConsoleControl.dll"; DestDir: "{app}"; Flags: replacesameversion Source: "RevitPythonShell\bin\Release\2014\RevitPythonShell.dll"; DestDir: "{app}"; Flags: replacesameversion Source: "RevitPythonShell\bin\Release\2014\RpsRuntime.dll"; DestDir: "{app}"; Flags: replacesameversion Source: "RevitPythonShell\bin\Release\2014\RevitPythonShell.addin"; DestDir: "{userappdata}\Autodesk\Revit\Addins\2014"; Flags: replacesameversion Source: "RevitPythonShell\bin\Release\2014\ICSharpCode.AvalonEdit.dll"; DestDir: "{app}" Source: "RevitPythonShell\bin\Release\2014\IronPython.dll"; DestDir: "{app}" Source: "RevitPythonShell\bin\Release\2014\IronPython.Modules.dll"; DestDir: "{app}" Source: "RevitPythonShell\bin\Release\2014\Microsoft.Scripting.Metadata.dll"; DestDir: "{app}" Source: "RevitPythonShell\bin\Release\2014\Microsoft.Dynamic.dll"; DestDir: "{app}" Source: "RevitPythonShell\bin\Release\2014\Microsoft.Scripting.dll"; DestDir: "{app}" Source: "RevitPythonShell\bin\Release\2014\DefaultConfig\RevitPythonShell.xml"; DestDir: "{userappdata}\RevitPythonShell\2014"; Flags: onlyifdoesntexist Source: "RevitPythonShell\bin\Release\2014\DefaultConfig\init.py"; DestDir: {userappdata}\RevitPythonShell\2014; Flags: confirmoverwrite; Source: "RevitPythonShell\bin\Release\2014\DefaultConfig\startup.py"; DestDir: {userappdata}\RevitPythonShell\2014; Flags: confirmoverwrite; [code] { HANDLE INSTALL PROCESS STEPS } procedure CurStepChanged(CurStep: TSetupStep); var AddInFilePath: String; LoadedFile : TStrings; AddInFileContents: String; ReplaceString: String; SearchString: String; begin if CurStep = ssPostInstall then begin AddinFilePath := ExpandConstant('{userappdata}\Autodesk\Revit\Addins\2014\RevitPythonShell.addin'); LoadedFile := TStringList.Create; SearchString := 'Assembly>RevitPythonShell.dll<'; ReplaceString := 'Assembly>' + ExpandConstant('{app}') + '\RevitPythonShell.dll<'; try LoadedFile.LoadFromFile(AddInFilePath); AddInFileContents := LoadedFile.Text; { Only save if text has been changed. } if StringChangeEx(AddInFileContents, SearchString, ReplaceString, True) > 0 then begin; LoadedFile.Text := AddInFileContents; LoadedFile.SaveToFile(AddInFilePath); end; finally LoadedFile.Free; end; end; end; [Setup] AppName=RevitPythonShell for Autodesk Revit 2014 AppVerName=RevitPythonShell for Autodesk Revit 2014 RestartIfNeededByRun=false DefaultDirName={pf32}\RevitPythonShell\2014 OutputBaseFilename=Setup_RevitPythonShell_2014 ShowLanguageDialog=auto FlatComponentsList=false UninstallFilesDir={app}\Uninstall UninstallDisplayName=RevitPythonShell for Autodesk Revit 2014 AppVersion=2014.0 VersionInfoVersion=2014.0 VersionInfoDescription=RevitPythonShell for Autodesk Revit 2014 VersionInfoTextVersion=RevitPythonShell for Autodesk Revit 2014
Inno Setup
4
PavelAltynnikov/revitpythonshell
Setup_RevitPythonShell_2014.iss
[ "MIT" ]
"""Constants for the Steamist integration.""" import asyncio import aiohttp DOMAIN = "steamist" CONNECTION_EXCEPTIONS = (asyncio.TimeoutError, aiohttp.ClientError) STARTUP_SCAN_TIMEOUT = 5 DISCOVER_SCAN_TIMEOUT = 10 DISCOVERY = "discovery"
Python
3
MrDelik/core
homeassistant/components/steamist/const.py
[ "Apache-2.0" ]
insert into non_pk values ('one'), ('two'), ('three'), ('four'), ('five'), ('six'), ('seven'), ('eight'), ('nine'), ('ten');
SQL
2
imtbkcat/tidb-lightning
tests/tidb_rowid/data/rowid.non_pk.sql
[ "Apache-2.0" ]
scriptname _DE_FoodDetect extends ReferenceAlias GlobalVariable property _DE_ExposurePoints auto formlist property _DE_Drinks10 auto formlist property _DE_Drinks15 auto formlist property _DE_Drinks20 auto formlist property _DE_Foods5 auto formlist property _DE_Foods10 auto formlist property _DE_Foods15 auto Keyword property _DE_FoodBuffKeyword10 auto Keyword property _DE_FoodBuffKeyword15 auto Keyword property _DE_FoodBuffKeyword20 auto Keyword property _DE_FoodBuffKeyword25 auto Keyword property _DE_SpellBuffKW auto Keyword property _DE_SootheKW auto MagicEffect property _DE_SootheEffect1 auto MagicEffect property _DE_SootheEffect2 auto MagicEffect property _DE_SootheEffect3 auto Keyword property _DE_DrinkKW1 auto Keyword property _DE_DrinkKW2 auto Keyword property _DE_DrinkKW3 auto Potion property _DE_DrinkDummy1 auto Potion property _DE_DrinkDummy2 auto Potion property _DE_DrinkDummy3 auto Potion property _DE_FoodDummy10 auto Potion property _DE_FoodDummy15 auto Potion property _DE_FoodDummy20 auto Potion property _DE_FoodDummy25 auto Potion property _DE_SootheDummy1 auto Potion property _DE_SootheDummy2 auto Potion property _DE_SootheDummy3 auto _DE_ExposureMeterUpdate property ExposureMeter auto Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Potion ;Soups and Stews ;Catch multiple eating here ;5% Exposure Resist if _DE_Foods5.HasForm(akBaseObject) if !(Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword10) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword15) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword20) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword25)) Game.GetPlayer().EquipItem(_DE_FoodDummy10, false, true) EndIf ;10% Exposure Resist elseif _DE_Foods10.HasForm(akBaseObject) if !(Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword10) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword15) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword20) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword25)) Game.GetPlayer().EquipItem(_DE_FoodDummy15, false, true) EndIf ;15% Exposure Resist elseif _DE_Foods15.HasForm(akBaseObject) if !(Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword10) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword15) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword20) || Game.GetPlayer().HasEffectKeyword(_DE_FoodBuffKeyword25)) Game.GetPlayer().EquipItem(_DE_FoodDummy25, false, true) EndIf ;Alcohols ;Restore 10 EP elseif _DE_Drinks10.HasForm(akBaseObject) if !(Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW1) || Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW2) || Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW3)) _DE_ExposurePoints.SetValue(_DE_ExposurePoints.GetValue() + 10.0) ExposureMeter.ForceDisplayAndUpdate() Game.GetPlayer().EquipItem(_DE_DrinkDummy1, false, true) endif ;Restore 15 EP elseif _DE_Drinks15.HasForm(akBaseObject) if !(Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW1) || Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW2) || Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW3)) _DE_ExposurePoints.SetValue(_DE_ExposurePoints.GetValue() + 15.0) ExposureMeter.ForceDisplayAndUpdate() Game.GetPlayer().EquipItem(_DE_DrinkDummy2, false, true) endif ;Restore 20 EP elseif _DE_Drinks20.HasForm(akBaseObject) if !(Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW1) || Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW2) || Game.GetPlayer().HasEffectKeyword(_DE_DrinkKW3)) _DE_ExposurePoints.SetValue(_DE_ExposurePoints.GetValue() + 20.0) ExposureMeter.ForceDisplayAndUpdate() Game.GetPlayer().EquipItem(_DE_DrinkDummy3, false, true) endif endif endif EndEvent Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect) if akEffect.HasKeyword(_DE_SpellBuffKW) if Game.GetPlayer().HasEffectKeyword(_DE_SootheKW) ;Do nothing. else if akEffect == _DE_SootheEffect1 Game.GetPlayer().EquipItem(_DE_SootheDummy1, false, true) _DE_ExposurePoints.SetValue(_DE_ExposurePoints.GetValue() + 10.0) ExposureMeter.ForceDisplayAndUpdate() elseif akEffect == _DE_SootheEffect2 Game.GetPlayer().EquipItem(_DE_SootheDummy2, false, true) _DE_ExposurePoints.SetValue(_DE_ExposurePoints.GetValue() + 20.0) ExposureMeter.ForceDisplayAndUpdate() elseif akEffect == _DE_SootheEffect3 Game.GetPlayer().EquipItem(_DE_SootheDummy3, false, true) _DE_ExposurePoints.SetValue(_DE_ExposurePoints.GetValue() + 30.0) ExposureMeter.ForceDisplayAndUpdate() EndIf EndIf EndIf endEvent
Papyrus
4
chesko256/Campfire
Scripts/Source/_de_fooddetect.psc
[ "MIT" ]
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. ' vbc /t:library /vbruntime- /r:Pia1.dll,Pia5.dll Library2.vb Imports System.Collections.Generic Imports System.Reflection Imports System.Runtime.CompilerServices Imports System.Runtime.InteropServices <Assembly: Guid("f9c2d51d-4f44-45f0-9eda-c9d599b58260")> <Assembly: ImportedFromTypeLib("Library2.dll")> <ComImport(), Guid("27e3e649-994b-4f58-b3c6-f8089a5f2002"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ Public Interface I7 Function Goo() As List(Of I5) Function Bar() As List(Of I1) End Interface
Visual Basic
4
ffMathy/roslyn
src/Compilers/Test/Resources/Core/SymbolsTests/NoPia/Library2.vb
[ "MIT" ]
--- prev: finagle.textile title: 검색조(Searchbird) layout: post --- 스칼라와 앞에서 논의한 "피네이글":https://github.com/twitter/finagle 프레임워크를 사용해 간단한 분산 검색 엔진을 만들고자 한다. h3. 설계 목표: 전체 그림 넓게 보면, 우리의 설계 목표에는 _추상화_ (내부 구조를 몰라도 만들어진 시스템을 사용할 수 있어야 한다), _모듈화_ (시스템을 이해하기 쉽고 대치하기 쉬운 더 작은 덩어리들로 나눈다), 그리고 _확장성_ (쉽게 시스템의 용량을 확대할 수 있어야 한다)이 포함된다. 여기서 설명할 시스템은 세 부분으로 되어있다. (1) _클라이언트_ 는 요청을 (2) _서버_ 에 보낸다. _서버_는 그에 대해 응답한다. (3) _전송_ 메카니즘이 있어서 이런 통신을 감싸고 있다. 보통 클라이언트와 서버는 서로 다른 기계에 존재하며 특정 "_포트_":https://en.wikipedia.org/wiki/Port_(computer_networking) 로 네트워크를 통해 통신한다. 하지만 이 예제에서 서버와 클라이언트는 같은 기계에 존재하한다(하지만, 통신은 여전히 특정 포트를 사용한다). 예제에서 클라이언트와 서버는 모두 스칼라로 작성되어 있으며, 전송은 "쓰리프트(Thrift)":https://thrift.apache.org/ 를 사용해 이루어진다. 이 자습서의 목적은 성능 향상을 위해 확장 가능한 서버와 클라이언트를 보여주는 것이다. h3. 기본 시작 프로젝트 살펴보기 우선, 뼈대 프로젝트("Searchbird")를 "scala-bootstrapper":https://github.com/twitter/scala-bootstrapper 를 이용해 만들자. 이 명령어는 메모리 내장 키-값 저장소를 외부로 노출시키는 간단한 "피네이글":https://twitter.github.com/finagle/ 기반 스칼라 서비스를 만든다. 이를 사용해 값을 검색하도록 확장할 것이다. 그리고 다시 이를 여러 프로세스들이 제공하는 여러 메모리 저장소에서 검색 가능 하도록 확장할 것이다. <pre> $ mkdir searchbird ; cd searchbird $ scala-bootstrapper searchbird writing build.sbt writing config/development.scala writing config/production.scala writing config/staging.scala writing config/test.scala writing console writing Gemfile writing project/plugins.sbt writing README.md writing sbt writing src/main/scala/com/twitter/searchbird/SearchbirdConsoleClient.scala writing src/main/scala/com/twitter/searchbird/SearchbirdServiceImpl.scala writing src/main/scala/com/twitter/searchbird/config/SearchbirdServiceConfig.scala writing src/main/scala/com/twitter/searchbird/Main.scala writing src/main/thrift/searchbird.thrift writing src/scripts/searchbird.sh writing src/scripts/config.sh writing src/scripts/devel.sh writing src/scripts/server.sh writing src/scripts/service.sh writing src/test/scala/com/twitter/searchbird/AbstractSpec.scala writing src/test/scala/com/twitter/searchbird/SearchbirdServiceSpec.scala writing TUTORIAL.md </pre> 우선 @scala-bootstrapper@ 가 만든 기본 프로젝트를 살펴보자. 이 프로젝트는 템플릿 역할을 하도록 만들어져 있다. 결국 대부분은 변경해야 할 것이다. 하지만, 사용하기 편한 뼈대 역할을 할 수 있다. 간단한 (하지만 완전한) 키-값 저장소가 정의되어 있다. 설정과 쓰리프트 인터페이스, 로그 기능 모두 포함되어 있다. 코드를 보기 전에 서버와 클라이언트를 실행하고 동작하는 모습을 보자. 다음은 우리가 만들고 있는 것이다. !searchbird-1.svg(검색조 구현. 리비전 1)! 그리고 여기 우리 서비스가 노출하고 있는 인터페이스가 있다. 검색조 서비스는 "쓰리프트":https://thrift.apache.org/ 서비스이기도 하다(다른 대부분의 우리 서비스도 마찬가지이다). 외부 인터페이스는 쓰리프트 IDL("interface description language, 인터페이스 정의 언어")로 정의되어 있다. h5. src/main/thrift/searchbird.thrift <pre> service SearchbirdService { string get(1: string key) throws(1: SearchbirdException ex) void put(1: string key, 2: string value) } </pre> 이 부부은 아주 단순하다. 서비스 @SearchbirdService@ 는 2개의 RPC 메소드 @get@ 과 @put@ 을 노출한다. 이 둘은 간단한 키-값 저장소의 인터페이스를 구성한다. 이제 기본 서비스를 실행하고, 그 서비스에 접속하는 클라이언트를 실행하자. 그리고 위의 인터페이스를 통해 서비스를 탐험해 보자. 창을 두개 열어서 하나는 서버, 하나는 클라이언트를 실행할 것이다. 첫번째 창에서 sbt를 대화식으로 시작하라 (@./sbt@ 를 명령행[1]에서 실행한다). 그리고 sbt로 프로젝트를 빌드해 실행하자. 그러면 @Main.scala@의 @main@ 루틴이 실행된다. <pre> $ ./sbt ... > compile > run -f config/development.scala ... [info] Running com.twitter.searchbird.Main -f config/development.scala </pre> 설정 파일(@development.scala@)은 새 서비스를 활성화하고 로컬 기계의 포트 9999에 이를 노출한다. 클라이언트는 9999번 포트에 연결해 서비스와 통신할 수 있다. 이제 제공된 @console@ 셀 스크립트를 활용해 클라이언트를 실행하자. 이 스크립트는 @SearchbirdConsoleClient@의 인스턴스를 (@SearchbirdConsoleClient.scala@로부터) 만든다. 이 스크립트를 다른 창에서 실행하라. <pre> $ ./console 127.0.0.1 9999 [info] Running com.twitter.searchbird.SearchbirdConsoleClient 127.0.0.1 9999 'client' is bound to your thrift client. finagle-client> </pre> 클라이언트 객체 @client@는 이제 9999 포트에 접속했으며, 앞에서 같은 포트에 실행했던 서버와 통신이 가능하다. 이제 요청을 몇 개 보내 보자. <pre> scala> client.put("marius", "Marius Eriksen") res0: ... scala> client.put("stevej", "Steve Jenson") res1: ... scala> client.get("marius") res2: com.twitter.util.Future[String] = ... scala> Await.result(client.get("marius")) res3: String = Marius Eriksen </pre> (마지막 줄의 두번째 @Await.result()@ 호출은 @client.get()@의 결과인 @Future@ 타입의 객체를 값이 준비될 때까지 블록시킨다.) 서버는 런타임 통계 정보도 제공한다(설정 파일에는 9000번 포트에서 이를 찾도록 되어 있다). 이 통계는 개별 서버를 관찰하거나, 전체 서비스의 통계를 내기 위해 통합될 수 있다(이를 위해 기계가 읽을 수 있는 JSON 인터페이스도 제공한다). 세번째 창을 열어서 이 통계를 확인해 보자. <pre> $ curl localhost:9900/stats.txt counters: Searchbird/connects: 1 Searchbird/received_bytes: 264 Searchbird/requests: 3 Searchbird/sent_bytes: 128 Searchbird/success: 3 jvm_gc_ConcurrentMarkSweep_cycles: 1 jvm_gc_ConcurrentMarkSweep_msec: 15 jvm_gc_ParNew_cycles: 24 jvm_gc_ParNew_msec: 191 jvm_gc_cycles: 25 jvm_gc_msec: 206 gauges: Searchbird/connections: 1 Searchbird/pending: 0 jvm_fd_count: 135 jvm_fd_limit: 10240 jvm_heap_committed: 85000192 jvm_heap_max: 530186240 jvm_heap_used: 54778640 jvm_nonheap_committed: 89657344 jvm_nonheap_max: 136314880 jvm_nonheap_used: 66238144 jvm_num_cpus: 4 jvm_post_gc_CMS_Old_Gen_used: 36490088 jvm_post_gc_CMS_Perm_Gen_used: 54718880 jvm_post_gc_Par_Eden_Space_used: 0 jvm_post_gc_Par_Survivor_Space_used: 1315280 jvm_post_gc_used: 92524248 jvm_start_time: 1345072684280 jvm_thread_count: 16 jvm_thread_daemon_count: 7 jvm_thread_peak_count: 16 jvm_uptime: 1671792 labels: metrics: Searchbird/handletime_us: (average=9598, count=4, maximum=19138, minimum=637, p25=637, p50=4265, p75=14175, p90=19138, p95=19138, p99=19138, p999=19138, p9999=19138, sum=38393) Searchbird/request_latency_ms: (average=4, count=3, maximum=9, minimum=0, p25=0, p50=5, p75=9, p90=9, p95=9, p99=9, p999=9, p9999=9, sum=14) </pre> 서비스 통계와 더불어 일반적인 JVM 상태 정보도 제공된다. 이런 정보도 유용할 때가 있다. h5. .../config/SearchbirdServiceConfig.scala 설정은 우리가 만들고 싶은 @T@ 를 만드는 @apply: RuntimeEnvironment => T@ 메소드를 제공하는 스칼라 트레잇이다. 이런 의미에서 설정은 "팩토리"이기도 하다. 실행시 설정 파일은 스크립트처럼 해석되고 (이때 스칼라 컴파일러를 라이브러리로 사용한다), 앞에서 말한 설정 객체를 생성해 낼 것이다. @RuntimeEnvironment@ 에게 여러 런타임 매개변수(명령행 플래그, JVM 버전, 빌드 타임 스탬프 등)를 질의할 수 있다. @SearchbirdServiceConfig@ 클래스는 이런 설정 클래스의 구현이다. @SearchbirdServiceConfig@ 는 설정 매개변수와 기본 값을 지정한다. (피네이글은 일반적 추적 시스템을 제공하지만, 이 글에서는 다룰 필요가 없어 넘어간다. "집킨(Zipkin)":https://github.com/twitter/zipkin 은 분산 트레이싱 시스템으로 피네이글의 추적 시스템과 같은 것에서 나온 여러 추적 내용을 수집/통합한다.) <pre> class SearchbirdServiceConfig extends ServerConfig[SearchbirdService.ThriftServer] { var thriftPort: Int = 9999 var tracerFactory: Tracer.Factory = NullTracer.factory def apply(runtime: RuntimeEnvironment) = new SearchbirdServiceImpl(this) } </pre> 여기서 우리는 @SearchbirdService.ThriftServer@ 를 만들고 싶다. 이는 쓰리프트 코드 생성자[2]가 만들어주는 서버 타입이다. h5. .../Main.scala "run"을 sbt 콘솔에서 입력하면 @main@을 호출한다. @main@은 서버를 설정하고 서버 인스턴스를 만든다. 설정 정보(@development.scala@에 지정되거나 "run" 명령의 인자로 넘길 수 있음)를 읽고, @SearchbirdService.ThriftServer@를 만들고, 시작한다. @RuntimeEnvironment.loadRuntimeConfig@ 는 설정을 평가(컴파일 및 실행)하고, 그 설정의 @apply@ 메소드에 자기 자신을 넘긴다. <pre> object Main { private val log = Logger.get(getClass) def main(args: Array[String]) { val runtime = RuntimeEnvironment(this, args) val server = runtime.loadRuntimeConfig[SearchbirdService.ThriftServer] try { log.info("Starting SearchbirdService") server.start() } catch { case e: Exception => log.error(e, "Failed starting SearchbirdService, exiting") ServiceTracker.shutdown() System.exit(1) } } } </pre> h5. .../SearchbirdServiceImpl.scala 이 부분이 서비스의 핵심이다. @SearchbirdService.ThriftServer@ 를 확장해 우리가 필요한 구현을 추가한다. @SearchbirdService.ThriftServer@ 는 쓰리프트 코드 생성기에 의해 만들어졌다는 점을 기억하라. 코드 생성기는 쓰리프트 메소드마다 스칼라 메소드를 만들어준다. 우리 예제에서 이렇게 만들어진 인터페이스는 다음과 같다. <pre> trait SearchbirdService { def put(key: String, value: String): Future[Void] def get(key: String): Future[String] } </pre> @Future[Value]@ 라는 형태의 값이 Value 대신 쓰이는 이유는 계산이 지연될 수 있기 때문이다(피네이글의 "문서":finagle.html 에서 @Future@ 에 대해 더 자세히 다룬다). 이번 강좌에서는 @Future@ 가 있으면 그 값을 나중에 @get()@ 을 사용해 얻을 수 있다는 것만 알면 충분하다. @scala-bootstrapper@ 가 제공하는 키-값 저장소의 기본 구현은 단순하다. @database@ 데이터 구조를 가지고 있고, @get@ 과 @put@ 호출은 이 데이터 구조를 읽거나 쓴다. <pre> class SearchbirdServiceImpl(config: SearchbirdServiceConfig) extends SearchbirdService.ThriftServer { val serverName = "Searchbird" val thriftPort = config.thriftPort override val tracerFactory = config.tracerFactory val database = new mutable.HashMap[String, String]() def get(key: String) = { database.get(key) match { case None => log.debug("get %s: miss", key) Future.exception(SearchbirdException("No such key")) case Some(value) => log.debug("get %s: hit", key) Future(value) } } def put(key: String, value: String) = { log.debug("put %s", key) database(key) = value Future.Unit } def shutdown() = { super.shutdown(0.seconds) } } </pre> 결과적으로 스칼라 @HashMap@ 에 간단한 쓰리프트 인터페이스를 제공하는 셈이다. h2. 간단한 검색 엔진 이제 우리 예제를 확장해 간단한 검색 엔진을 만들자. 그 검색엔진을 더 확장해서 기계 한 대에 넣을 수 없을 정도로 큰 검색어 목록도 처리할 수 있도록 _분산_ 검색 엔진을 만들 것이다. 단순화하기 위해 현재의 쓰리프트 서비스를 가능한 적게 고쳐서 검색 연산을 지원하게 하자. 사용 모델은 @put@ 으로 문서를 검색 엔진에 넣는다. 이때 각 문서는 토큰(단어)을 여럿 포함한다. 검색시에는 여러 토큰으로 구성된 문자열을 사용하여 모든 토큰이 포함된 문서를 반환할 것이다. 기본 구조는 앞의 예제와 같지만, 추가로 @search@ 호출을 사용한다. !searchbird-2.svg(검색조 구현. 리비전 2)! 이런 검색엔진을 구현하려면 아래와 같이 파일 둘을 변경해야 한다. h5. src/main/thrift/searchbird.thrift <pre> service SearchbirdService { string get(1: string key) throws(1: SearchbirdException ex) void put(1: string key, 2: string value) list<string> search(1: string query) } </pre> 현재의 해시테이블을 검색하는 @search@ 메소드를 추가했다. 이 메소드는 질의와 일치하는 키의 목록을 반환한다. 구현은 상당히 단순하다. h5. .../SearchbirdServiceImpl.scala 변경이 주로 이루어진 파일이 바로 이 파일이다. 현재의 @database@ 해시맵은 키와 문서를 연결하는 정방향 색인(forward index)을 저장한다. 이 맵의 이름을 @forward@로 바꾸고, 역방향 색인(토큰을 해당 토큰을 포함한 문서의 집합으로 연결하는 색인) 역할을 하는 두번째 맵을 @reverse@라는 이름으로 추가하자. 따라서 @SearchbirdServiceImpl.scala@에서 @database@ 정의는 다음과 같이 바뀐다. <pre> val forward = new mutable.HashMap[String, String] with mutable.SynchronizedMap[String, String] val reverse = new mutable.HashMap[String, Set[String]] with mutable.SynchronizedMap[String, Set[String]] </pre> @get@ 호출에서 @database@를 @forward@로 바꾼다. 대신 @get@ 의 나머지 부분은 그대로 둔다(해당 함수는 정방향 검색만을 수행한다). 하지만 @put@은 변경해야 한다. 문서가 추가될 때마다, 문서에서 토큰을 추출해 각 토큰마다 해당 문서의 키를 추가해야 하기 때문이다. @put@ 호출을 다음 코드로 바꾸자. 이제 검색 토큰이 주어지면 @reverse@ 맵을 사용해 문서를 찾을 수 있다. <pre> def put(key: String, value: String) = { log.debug("put %s", key) forward(key) = value // serialize updaters synchronized { value.split(" ").toSet foreach { token => val current = reverse.getOrElse(token, Set()) reverse(token) = current + key } } Future.Unit } </pre> (@HashMap@이 쓰레드 안전하긴 하지만) 특정 맵 원소에 대한 읽고-변경하고-쓰기 연산의 원자성을 보장하기 위해 오직 한번에 한 쓰레드만 @reverse@ 맵을 업데이트 할 수 있음을 기억하라. (지금 코드는 너무 보수적이다. 개별 읽고-변경하고-쓰기 연산에 락을 거는 대신 전체 맵에 락을 걸고 있다.) 또한 데이터 구조로 @Set@을 사용하고 있음을 기억하라. 집합을 사용하면 같은 토큰이 문서에 두번 이상 나타나도 @foreach@ 루프에서 한번만 처리되도록 할 수 있다. 이 구현에는 여전히 문제점이 있다. 어떤 키를 새 문서로 덮어쓰더라도 기존의 문서를 기반으로 만들어졌던 역 색인 정보는 제거되지 않는다. 이는 연습문제로 독자들에게 남겨둔다. 이제 검색 엔진의 핵심부분인 @search@ 메소드를 보자. 질의가 들어오면 토큰을 분리하고, 토큰마다 매치되는 문서 목록을 구한 다음, 각각의 교집합을 구한다. 따라서 질의에 있는 모든 토큰이 포함된 문서의 목록이 구해진다. 스칼라로 이를 표현하는 것은 쉽다. 다음을 @SearchbirdServiceImpl@ 클래스에 추가하라. <pre> def search(query: String) = Future.value { val tokens = query.split(" ") val hits = tokens map { token => reverse.getOrElse(token, Set()) } val intersected = hits reduceLeftOption { _ & _ } getOrElse Set() intersected.toList } </pre> 이 길지 않은 코드에서도 알아둘만한 사항이 몇 가지 있다. hits 목록을 만들 때 키(@token@)가 없다면 @getOrElse@의 두번째 인자가 기본 값으로 제공된다(여기서는 빈 @Set@이다). 실제 교집합은 왼쪽 리듀스(left reduce)로 구한다. 특히 @reduceLeftOption@는 @hits@가 비어있는 경우 리듀스를 시도하지 않고 대신 @None@을 반환한다. 따라서 예외를 겪지 않고 기본 값을 제공할 수 있다. 실제 이는 다음과 동일하다. <pre> def search(query: String) = Future.value { val tokens = query.split(" ") val hits = tokens map { token => reverse.getOrElse(token, Set()) } if (hits.isEmpty) Nil else hits reduceLeft { _ & _ } toList } </pre> 어느쪽을 사용하던 취향의 문제이지만, 함수 언어 다운 것은 조건식을 가능한 삼가고 적절한 기본 값을 활용하는 것이다. 이제 콘솔에서 만든 검색 엔진을 실험해볼 수 있다. 서버를 다시 시작하자. <pre> $ ./sbt ... > compile > run -f config/development.scala ... [info] Running com.twitter.searchbird.Main -f config/development.scala </pre> 그리고 searchbird 디렉터리에서 클라이언트를 시작하자. <pre> $ ./console 127.0.0.1 9999 ... [info] Running com.twitter.searchbird.SearchbirdConsoleClient 127.0.0.1 9999 'client' is bound to your thrift client. finagle-client> </pre> 다음 본 학교의 강의 목록을 콘솔에 붙여넣도록 하라. <!-- grep -h '^(desc|title):' ../web/_posts/* | tr A-Z a-z | tr '=''\-+.,:' ' ' | awk ' /^title/ { title=$2 } /^desc/ { d="" for(i = 2; i < NF; i++) { d = d " " $i } print "$client.put(\"" title "\", \"" d "\")" }' --> <pre> client.put("basics", " values functions classes methods inheritance try catch finally expression oriented") client.put("basics", " case classes objects packages apply update functions are objects (uniform access principle) pattern") client.put("collections", " lists maps functional combinators (map foreach filter zip") client.put("pattern", " more functions! partialfunctions more pattern") client.put("type", " basic types and type polymorphism type inference variance bounds") client.put("advanced", " advanced types view bounds higher kinded types recursive types structural") client.put("simple", " all about sbt the standard scala build") client.put("more", " tour of the scala collections") client.put("testing", " write tests with specs a bdd testing framework for") client.put("concurrency", " runnable callable threads futures twitter") client.put("java", " java interop using scala from") client.put("searchbird", " building a distributed search engine using") </pre> 이제 검색을 해볼 수 있다. 설명에 검색어를 포함하고 있는 모든 강의의 키를 반환한다. <pre> > Await.result(client.search("functions")) res12: Seq[String] = ArrayBuffer(basics) > Await.result(client.search("java")) res13: Seq[String] = ArrayBuffer(java) > Await.result(client.search("java scala")) res14: Seq[String] = ArrayBuffer(java) > Await.result(client.search("functional")) res15: Seq[String] = ArrayBuffer(collections) > Await.result(client.search("sbt")) res16: Seq[String] = ArrayBuffer(simple) > Await.result(client.search("types")) res17: Seq[String] = ArrayBuffer(type, advanced) </pre> 호출이 @Future@를 반환하면 @get()@을 사용해 블록해야만 해당 future에서 값을 얻어올 수 있다는 사실을 잊지 마라. 또한 @Future.collect@를 사용해 여러 요청을 동시에 처리하고, 모든 요청이 성공할 때까지 기다릴 수 있다. <pre> > import com.twitter.util.{Await, Future} ... > Await.result(Future.collect(Seq( client.search("types"), client.search("sbt"), client.search("functional") ))) res18: Seq[Seq[String]] = ArrayBuffer(ArrayBuffer(type, advanced), ArrayBuffer(simple), ArrayBuffer(collections)) </pre> h2. 서비스를 분산시키기 기계가 하나 밖에 없다면, 앞의 간단한 메모리 검색 엔진이 검색할 수 있는 사전의 크기는 메모리 제한에 따를 수 밖에 없다. 이제 이 문제를 간단한 분산 정책(sharding scheme)을 사용해 서비스를 분산시켜 해결해 보자. 다음은 블록도이다. !searchbird-3.svg(분산 검색조 서비스)! h3. 추상화 작업을 쉽게 하기 위해 우선 다른 추상 레이어(@Index@)를 도입해 색인 구현과 @SearchbirdService@를 분리할 것이다. 이렇게 리팩토링 하는 것은 간단하다. 우선 색인 파일을 도입하는 것을 시작점으로 삼자(@searchbird/src/main/scala/com/twitter/searchbird/Index.scala@라는 파일을 만들 것이다). h5. .../Index.scala <pre> package com.twitter.searchbird import scala.collection.mutable import com.twitter.util._ import com.twitter.conversions.time._ import com.twitter.logging.Logger import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.thrift.ThriftClientFramedCodec trait Index { def get(key: String): Future[String] def put(key: String, value: String): Future[Unit] def search(key: String): Future[List[String]] } class ResidentIndex extends Index { val log = Logger.get(getClass) val forward = new mutable.HashMap[String, String] with mutable.SynchronizedMap[String, String] val reverse = new mutable.HashMap[String, Set[String]] with mutable.SynchronizedMap[String, Set[String]] def get(key: String) = { forward.get(key) match { case None => log.debug("get %s: miss", key) Future.exception(SearchbirdException("No such key")) case Some(value) => log.debug("get %s: hit", key) Future(value) } } def put(key: String, value: String) = { log.debug("put %s", key) forward(key) = value // admit only one updater. synchronized { (Set() ++ value.split(" ")) foreach { token => val current = reverse.get(token) getOrElse Set() reverse(token) = current + key } } Future.Unit } def search(query: String) = Future.value { val tokens = query.split(" ") val hits = tokens map { token => reverse.getOrElse(token, Set()) } val intersected = hits reduceLeftOption { _ & _ } getOrElse Set() intersected.toList } } </pre> 이제 우리가 개발한 쓰리프트 서비스를 간단한 디스패치 메카니즘으로 변경하자. 이제는 모든 @Index@ 인스턴스에 대해 쓰리프트 인터페이스를 제공하게 될것이다. 이렇게 추상화 하는 것은 매우 유용하다. 왜냐하면 이렇게 하면 서비스 구현과 색인 구현을 분리할 구 있기 때문이다. 서비스는 더 이상 색인의 내부에 대해 알 필요가 없다. 색인의 위치는 로컬이나 원격 어느곳에나 있을 수 있고, 경우에 따라서는 여러 원격 색인을 조합한 것일 수도 있다. 하지만, 서비스가 이를 신경쓸 필요가 없다. 또한 색인을 변경하더라도 서비스를 변경할 필요는 없다. 기존 @SearchbirdServiceImpl@ 클래스 정의를 다음의 (색인에 대한 정의를 포함하지 않아서 더 간단한) 정의로 바꾸자. 이제 서버를 초기화하기 위해서는 두번째 인자 @Index@가 필요하다는 사실에 유의하라. h5. .../SearchbirdServiceImpl.scala <pre> class SearchbirdServiceImpl(config: SearchbirdServiceConfig, index: Index) extends SearchbirdService.ThriftServer { val serverName = "Searchbird" val thriftPort = config.thriftPort def get(key: String) = index.get(key) def put(key: String, value: String) = index.put(key, value) flatMap { _ => Future.Unit } def search(query: String) = index.search(query) def shutdown() = { super.shutdown(0.seconds) } } </pre> h5. .../config/SearchbirdServiceConfig.scala @SearchbirdServiceConfig@의 @apply@ 호출도 적절히 바꿔줘야 한다. <pre> class SearchbirdServiceConfig extends ServerConfig[SearchbirdService.ThriftServer] { var thriftPort: Int = 9999 var tracerFactory: Tracer.Factory = NullTracer.factory def apply(runtime: RuntimeEnvironment) = new SearchbirdServiceImpl(this, new ResidentIndex) } </pre> 간단한 분산 시스템을 설정하되 자식 노드에게 질의를 하는 것을 조정하기 위한 별도의 노드를 하나 만들 것이다. 이를 위해 두가지 유형의 @Index@를 추가할 팔요가 있다. 하나는 원격 색인을 표현하고, 나머지는 여러 다른 @Index@ 인스턴스를 조합한 복합 색인을 표현한다. 두 @Index@ 모두 인터페이스는 같다. 따라서 서버는 실제 연결하려는 색인이 어떤 종류인지를 구별할 필요가 없다. h5. .../Index.scala @Index.scala@에 @CompositeIndex@를 정의하자: <pre> class CompositeIndex(indices: Seq[Index]) extends Index { require(!indices.isEmpty) def get(key: String) = { val queries = indices.map { idx => idx.get(key) map { r => Some(r) } handle { case e => None } } Future.collect(queries) flatMap { results => results.find { _.isDefined } map { _.get } match { case Some(v) => Future.value(v) case None => Future.exception(SearchbirdException("No such key")) } } } def put(key: String, value: String) = Future.exception(SearchbirdException("put() not supported by CompositeIndex")) def search(query: String) = { val queries = indices.map { _.search(query) rescue { case _=> Future.value(Nil) } } Future.collect(queries) map { results => (Set() ++ results.flatten) toList } } } </pre> 복합 색인은 여러 내부 @Index@ 인스턴스에 대해 동작한다. 이때 내부 @Index@ 들이 어떻게 구현되었는지에 대해서는 신경쓰지 않는다는 사실이 중요하다. 그렇기 때문에 여러 질의 방식을 만들 때 유연성이 엄청나게 커질 수 있다. 분산 정책을 따로 정의하지는 않았다. 따라서 복합 색인은 @put@ 연산을 지원하지 않는다. 대신 이를 직접 자식 노드에 전달한다. @get@은 모든 자식 노드에 질의를 던져서 가장 먼저 도착하는 성공적인 응답을 채택하는 방식으로 이루어진다. 만약 모든 자식들이 실패한다면 예외를 발생시킨다. 값이 없는 경우에는 예외를 통해 상황 전달이 이루어진다. 따라서 이를 @Future@에서 @None@ 값으로 변환하는 방식으로 @handle@ 한다. 실제 시스템에서라면 예외를 사용하는 것 보다 적절한 오류 코드를 사용하는 것이 나을 것이다. 예외는 쓰기 편하고 프로토타입을 만들 때는 빠르게 써먹을 수 있지만, 서로 조합할 때는 문제가 되기 쉽다. 실제 예외상황과 값이 없는 경우를 구별하기 위해서 예외 자체를 검사해야만 한다. 그러느니, 이런 구별을 반환되는 값의 타입에 직접 집어넣는 편이 더 좋은 방식이다. <!-- *_HELP 이렇게 구현하면 이전의 방식보다 더 확장성이 좋아지는 것 같지 않다. 왜냐하면 색인이 모든 클라이언트 기계에 복제되기 때문에, 처리할 수 있는 데이터의 크기가 더 늘어날 수가 없다. 아마도 더 복잡한 @put()@ 스킴을 만들어서 데이터를 한 색인에만 넣도록 해야할 것이다. 아닌가? 또는 @get()@ 요청을 모든 노드에 보내는 대신에 한 노드에만 보내도록 하면 시스템의 처리량(throughput)을 향상시킬 수 있을 것이다. _* --> @search@는 앞에서와 비슷한 방식으로 동작한다. 최초의 결과만을 선택하는 대신 모든 결과를 한데 모은다. 그 후 @Set@ 을 만들어서 유일성을 보장한다. @RemoteIndex@ 는 원격 서버에 대한 @Index@ 인터페이스를 제공한다. <pre> class RemoteIndex(hosts: String) extends Index { val transport = ClientBuilder() .name("remoteIndex") .hosts(hosts) .codec(ThriftClientFramedCodec()) .hostConnectionLimit(1) .timeout(500.milliseconds) .build() val client = new SearchbirdService.FinagledClient(transport) def get(key: String) = client.get(key) def put(key: String, value: String) = client.put(key, value) map { _ => () } def search(query: String) = client.search(query) map { _.toList } } </pre> 위 코드는 몇가지 적절한 기본 값을 사용해 피네이글 쓰리프트 클라이언트를 만든다. 그리고 호출 프락시 역할을 수행한다. 이를 위해 타입을 적절히 변경하였다. h3. 한 곳으로 모으기 이제 필요한 모든 조각을 마련했다. 설정을 약간 바꿔서 어떤 노드가 데이터 분산 노드인지 조정을 위해 구별된 노드인지 지정할 수 있게 만들 필요가 있다. 이를 위해 시스템의 분산 노드들을 지정할 수 있는 설정 아이템을 도입하여 구분할 것이다. 또한 @SearchbirdServiceImpl@의 인스턴스에 @Index@ 인자를 추가해야 한다. 그리고 나서 명령행 인자(@Config@가 이 인자를 활용한다는 사실을 기억하라)를 사용해 서버 시작시 어떤 노드를 시작하는 지 지정할 수 있게 할 것이다. h5. .../config/SearchbirdServiceConfig.scala <pre> class SearchbirdServiceConfig extends ServerConfig[SearchbirdService.ThriftServer] { var thriftPort: Int = 9999 var shards: Seq[String] = Seq() def apply(runtime: RuntimeEnvironment) = { val index = runtime.arguments.get("shard") match { case Some(arg) => val which = arg.toInt if (which >= shards.size || which < 0) throw new Exception("invalid shard number %d".format(which)) // override with the shard port val Array(_, port) = shards(which).split(":") thriftPort = port.toInt new ResidentIndex case None => require(!shards.isEmpty) val remotes = shards map { new RemoteIndex(_) } new CompositeIndex(remotes) } new SearchbirdServiceImpl(this, index) } } </pre> 이제 설정을 조정하자. "shards" 목록을 @SearchbirdServiceConfig@ 인스턴스에서 초기화하게 하자(샤드 0번은 포트 9000, 1번은 9001 등의 순서로 접속하게 할 것이다). h5. config/development.scala <pre> new SearchbirdServiceConfig { // Add your own config here shards = Seq( "localhost:9000", "localhost:9001", "localhost:9002" ) ... </pre> @admin.httpPort@ 설정을 코맨트로 가리자(여러 서비스를 같은 기계에서 실행시키지는 않을 것이다. 그렇게 하면 같은 포트를 사용하려고 시도하게 되어 오류가 발생한다.): <pre> // admin.httpPort = 9900 </pre> 서버에 인자를 주지 않고 실행하면 모든 샤드에 송신하는 특별한 노드가 시작된다. 샤드 정보를 인자로 주면 해당 샤드 번호에 대응하는 서버를 앞에 지정한 포트를 사용해 시작한다. 한번 실행해 보자. 3개의 서비스를 시작할 것이다. 1개는 특별 노드이고, 2개는 샤드이다. 우선 변경사항을 컴파일해야 한다. <pre> $ ./sbt > compile ... > exit </pre> 그 후 서버를 시작하면 된다. <pre> $ ./sbt 'run -f config/development.scala -D shard=0' $ ./sbt 'run -f config/development.scala -D shard=1' $ ./sbt 'run -f config/development.scala' </pre> 이 셋을 각각 다른 창에서 실행할 수도 있고, (한 창에서) 한 명령어씩 실행해서 ctrl-z를 눌러 작업을 일지중지시킨 후, @bg@를 사용해 백그라운드 작업으로 돌리는 방식으로 실행할 수도 있다. 이제 콘솔을 사용해 이 서비스를 사용해 보자. 우선 두 샤드 노드에 데이터를 집어넣어야 한다. 검색조 디렉터리에서 다음과 같이 실행하자. <pre> $ ./console localhost 9000 ... > client.put("fromShardA", "a value from SHARD_A") > client.put("hello", "world") </pre> <pre> $ ./console localhost 9001 ... > client.put("fromShardB", "a value from SHARD_B") > client.put("hello", "world again") </pre> 작업을 완료하고 나면 콘솔 세션을 중단해도 좋다. 이제 특별 노드(port 9999)에서 데이터베이스에 질의를 넣어 보자. <pre> $ ./console localhost 9999 [info] Running com.twitter.searchbird.SearchbirdConsoleClient localhost 9999 'client' is bound to your thrift client. finagle-client> Await.result(client.get("hello")) res0: String = world finagle-client> Await.result(client.get("fromShardC")) SearchbirdException(No such key) ... finagle-client> Await.result(client.get("fromShardA")) res2: String = a value from SHARD_A finagle-client> Await.result(client.search("hello")) res3: Seq[String] = ArrayBuffer() finagle-client> Await.result(client.search("world")) res4: Seq[String] = ArrayBuffer(hello) finagle-client> Await.result(client.search("value")) res5: Seq[String] = ArrayBuffer(fromShardA, fromShardB) </pre> 여러 데이터 추상화를 포함하는 이런 방식으로 설계하면 더 모둘화되고 확장 가능한 구현이 가능하다. * @ResidentIndex@ 데이터 구조는 네트워크, 서버, 클라이언트 등에 대해서는 아무 정보를 가지고 있을 필요가 없다. * @CompositeIndex@ 에서는 하위 색인이 어떻게 구현되었는지나 그 데이터 구조에 대해 알 필요가 없다. 단지 요청을 하위 색인에 나누어 전달하면 된다. * 동일한 @search@ 인터페이스(트레잇)을 사용하기 때문에, 서버가 자기 자신의 로컬 데이터 구조(@ResidentIndex@)나 다른 서비스(@CompositeIndex@)를 별도로 구분하지 않고 처리할 수 있다. 호출하는 쪽에서는 이 둘 사이의 차이를 알지 못한다. * @SearchbirdServiceImpl@과 @Index@ 가 이제 분리된 모듈이기 때문에, 서비스 구현을 단순화하고 그 서비스가 억세스하는 데이터 구조의 구현과 서비스의 구현을 분리할 수 있다. * 새로운 설계가 가지는 유연성 덕분에 하나 이상의 원격 색인을 지원할 수 있다. 원격 색인은 같은 기계에 있을 수도 있고 원격 기계에 있을 수도 있다. <!-- *_HELP Are the possible improvements below accurate?_* --> 아마도 이 구현을 다음과 같이 더 향상시킬 수 있을 것이다: * 현재 구현은 모든 노드에 @put()@ 호출을 보낸다. 대신에 해시 테이블을 써서 @put()@ 호출을 한 노드에만 보내서, 저장소를 여러 노드에 분산시킬 수 있을 것이다. ** 하지만, 이런 전략을 사용하면 중복성을 잃게 된다는 점에 유의하라. 전체 복제를 사용하지는 않으면서도 이런 중복성을 유지할 방법은 없을까? * 시스템에서 발생할 수 있는 실패에 대해서는 특별히 처리하지 않았다(예를 들어 예외가 발생해도 처리하지 않았다). fn1. 로컬 @./sbt@ 스크립트를 실행하면, 우리가 사용하는 sbt 버전이 적절한 라이브러리를 모두 포함하고 있도록 보장해준다. fn2. @target/gen-scala/com/twitter/searchbird/SearchbirdService.scala@ 에 있다. fn3. 오스트리치(Ostrich)의 "README":https://github.com/twitter/ostrich/blob/master/README.md 에서 더 자세한 정보를 찾아보라.
Textile
5
AstronomiaDev/scala_school
web/ko/searchbird.textile
[ "Apache-2.0" ]
/* * Copyright (C) 2016 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. */ // Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* * rs_allocation_create.rsh: Allocation Creation Functions * * The functions below can be used to create Allocations from a Script. * * These functions can be called directly or indirectly from an invokable * function. If some control-flow path can result in a call to these functions * from a RenderScript kernel function, a compiler error will be generated. */ #ifndef RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH #define RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH /* * rsCreateElement: Creates an rs_element object of the specified data type * * Creates an rs_element object of the specified data type. The data kind of * the Element will be set to RS_KIND_USER and vector_width will be set to 1, * indicating non-vector. * * Parameters: * data_type: Data type of the Element */ #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_element __attribute__((overloadable)) rsCreateElement(rs_data_type data_type); #endif /* * rsCreateVectorElement: Creates an rs_element object of the specified data type and vector width * * Creates an rs_element object of the specified data type and vector width. * Value of vector_width must be 2, 3 or 4. The data kind of the Element will * be set to RS_KIND_USER. * * Parameters: * data_type: Data type of the Element * vector_width: Vector width (either 2, 3, or 4) */ #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_element __attribute__((overloadable)) rsCreateVectorElement(rs_data_type data_type, uint32_t vector_width); #endif /* * rsCreatePixelElement: Creates an rs_element object of the specified data type and data kind * * Creates an rs_element object of the specified data type and data kind. The * vector_width of the Element will be set to 1, indicating non-vector. * * Parameters: * data_type: Data type of the Element * data_kind: Data kind of the Element */ #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_element __attribute__((overloadable)) rsCreatePixelElement(rs_data_type data_type, rs_data_kind data_kind); #endif /* * rsCreateType: Creates an rs_type object with the specified Element and shape attributes * * Creates an rs_type object with the specified Element and shape attributes. * * dimX specifies the size of the X dimension. * * dimY, if present and non-zero, indicates that the Y dimension is present and * indicates its size. * * dimZ, if present and non-zero, indicates that the Z dimension is present and * indicates its size. * * mipmaps indicates the presence of level of detail (LOD). * * faces indicates the presence of cubemap faces. * * yuv_format indicates the associated YUV format (or RS_YUV_NONE). * * Parameters: * element: Element to be associated with the Type * dimX: Size along the X dimension * dimY: Size along the Y dimension * dimZ: Size along the Z dimension * mipmaps: Flag indicating if the Type has a mipmap chain * faces: Flag indicating if the Type is a cubemap * yuv_format: YUV layout for the Type */ #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_type __attribute__((overloadable)) rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY, uint32_t dimZ, bool mipmaps, bool faces, rs_yuv_format yuv_format); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_type __attribute__((overloadable)) rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY, uint32_t dimZ); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_type __attribute__((overloadable)) rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_type __attribute__((overloadable)) rsCreateType(rs_element element, uint32_t dimX); #endif /* * rsCreateAllocation: Create an rs_allocation object of given Type. * * Creates an rs_allocation object of the given Type and usage. * * RS_ALLOCATION_USAGE_SCRIPT and RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE are the * only supported usage flags for Allocations created from within a RenderScript * Script. * * You can also use rsCreateAllocation_ wrapper functions to directly * create Allocations of scalar and vector numerical types without creating * intermediate rs_element or rs_type objects. * * E.g. rsCreateAllocation_int4() returns an Allocation of int4 data type of * specified dimensions. * * Parameters: * type: Type of the Allocation * usage: Usage flag for the allocation */ #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_allocation __attribute__((overloadable)) rsCreateAllocation(rs_type type, uint32_t usage); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) extern rs_allocation __attribute__((overloadable)) rsCreateAllocation(rs_type type); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_16); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_32); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_64); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_8); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_8); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_16); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_16); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_32); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_32); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_64); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_64); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 2); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 3); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 4); rs_type t = rsCreateType(e, dimX, dimY, dimZ); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_16); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_32); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_64); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_8); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_8); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_16); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_16); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_32); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_32); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_64); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_64); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong2(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 2); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong3(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 3); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong4(uint32_t dimX, uint32_t dimY) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 4); rs_type t = rsCreateType(e, dimX, dimY); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_16); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_32); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_FLOAT_64); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_8); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_8); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_16); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_16); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_32); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_32); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_SIGNED_64); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong(uint32_t dimX) { rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_64); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_half4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_float4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_double4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_char4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uchar4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_short4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ushort4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_int4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_uint4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_long4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong2(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 2); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong3(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 3); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 24)) static inline rs_allocation __attribute__((overloadable)) rsCreateAllocation_ulong4(uint32_t dimX) { rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 4); rs_type t = rsCreateType(e, dimX); return rsCreateAllocation(t); } #endif #endif // RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH
RenderScript
5
Theonlirosaaay/backdoor-apk
backdoor-apk/third-party/android-sdk-linux/build-tools/25.0.2/renderscript/include/rs_allocation_create.rsh
[ "Apache-2.0" ]
MSTRINGIFY( cbuffer PrepareLinksCB : register( b0 ) { int numLinks; int padding0; int padding1; int padding2; }; // Node indices for each link StructuredBuffer<int2> g_linksVertexIndices : register( t0 ); StructuredBuffer<float> g_linksMassLSC : register( t1 ); StructuredBuffer<float4> g_nodesPreviousPosition : register( t2 ); RWStructuredBuffer<float> g_linksLengthRatio : register( u0 ); RWStructuredBuffer<float4> g_linksCurrentLength : register( u1 ); [numthreads(128, 1, 1)] void PrepareLinksKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) { int linkID = DTid.x; if( linkID < numLinks ) { int2 nodeIndices = g_linksVertexIndices[linkID]; int node0 = nodeIndices.x; int node1 = nodeIndices.y; float4 nodePreviousPosition0 = g_nodesPreviousPosition[node0]; float4 nodePreviousPosition1 = g_nodesPreviousPosition[node1]; float massLSC = g_linksMassLSC[linkID]; float4 linkCurrentLength = nodePreviousPosition1 - nodePreviousPosition0; float linkLengthRatio = dot(linkCurrentLength, linkCurrentLength)*massLSC; linkLengthRatio = 1./linkLengthRatio; g_linksCurrentLength[linkID] = linkCurrentLength; g_linksLengthRatio[linkID] = linkLengthRatio; } } );
HLSL
4
BonJovi1/Bullet-the-Blue-Sky
external/bullet-2.81-rev2613/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/PrepareLinks.hlsl
[ "WTFPL" ]
label.string.required.col-xs-8.control-label for="two_factor_otp" abbr == "*&nbsp;" span = t('two_factors.auth.sms') .col-xs-14 .input-group style="width:100%;" input.two_factor_auth_type type="hidden" name="two_factor[type]" value="sms" input.string.required.form-control id="two_factor_otp" name="two_factor[otp]" placeholder=t('two_factors.auth.otp_placeholder') .input-group-btn.send-code-button button.btn.btn-primary type='submit' name="commit" value="send_code" data-orig-name=t('two_factors.auth.send_code') data-alt-name=t('two_factors.auth.send_code_alt') = t('two_factors.auth.send_code') span.hint.sms = t('two_factors.auth.hints.sms') .captcha-wrap
Slim
4
gsmlg/peatio
app/views/shared/_two_factor_sms.html.slim
[ "MIT" ]
// JVM_ANNOTATIONS package test; import kotlin.annotations.jvm.*; import org.jetbrains.annotations.NotNull; import java.util.*; public interface ReadOnlyExtendsWildcard { void bar(); // Non-SAM void foo(@ReadOnly List<? extends CharSequence> x, @NotNull Comparable<? super String> y); }
Java
4
AndrewReitz/kotlin
compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java
[ "ECL-2.0", "Apache-2.0" ]
doPlus : Nat -> Nat -> Nat doPlus x y = x `plus` y doMult : Nat -> Nat -> Nat doMult x y = x `mult` y doMinus : Nat -> Nat -> Nat doMinus x y = x `minus` y
Idris
3
mmhelloworld/idris-jvm
tests/idris2/reg042/NatOpts.idr
[ "BSD-3-Clause" ]
(ns lt.objs.editor.file "Provide behaviors for a file-based editor object" (:require [lt.object :as object] [lt.objs.editor :as ed] [lt.objs.document :as doc] [lt.objs.notifos :as notifos] [lt.objs.command :as cmd] [clojure.string :as string] [lt.objs.files :as files]) (:require-macros [lt.macros :refer [behavior]])) (behavior ::file-save :triggers #{:save} :reaction (fn [editor] (let [{:keys [path]} (@editor :info) final (object/raise-reduce editor :save+ (ed/->val editor))] (when (not= final (ed/->val editor)) (let [y-position (.-top (.getScrollInfo (ed/->cm-ed editor)))] (ed/set-val-and-keep-cursor editor final) (ed/scroll-to editor 0 y-position))) (doc/save path final (fn [] (object/merge! editor {:dirty false :editor.generation (ed/->generation editor)}) (object/raise editor :saved) ;; TODO: :clean trigger unused internally. Consider removing (object/raise editor :clean)))))) (behavior ::dirty-on-change :throttle 100 :triggers #{:change} :reaction (fn [obj] (let [dirty? (ed/dirty? obj (:editor.generation @obj 0))] (when (not= (:dirty @obj) dirty?) (if dirty? (do (object/merge! obj {:dirty true}) (object/raise obj :dirty)) (do (object/merge! obj {:dirty false}) (object/raise obj :clean))))))) (behavior ::preserve-line-endings :triggers #{:save+} :reaction (fn [editor content] (if (= "\r\n" (or (-> @editor :info :line-ending) files/line-ending)) (string/replace content (js/RegExp. "(\r?\n|\n)" "gm") "\r\n") content))) (behavior ::remove-trailing-whitespace :triggers #{:save+} :type :user :desc "Save: Remove trailing whitespace" :exclusive true :reaction (fn [editor content] (.replace content (js/RegExp. "[ \\t]+$" "gm") ""))) (behavior ::last-char-newline :desc "Save: Ensure the file ends with a new-line" :type :user :exclusive true :triggers #{:save+} :reaction (fn [editor content] (let [line-ending (-> @editor :info :line-ending)] (if (= (last content) "\n") content (str content line-ending))))) (behavior ::on-save :triggers #{:save} :type :user :desc "Editor: On save execute command" :params [{:label "command"}] :reaction (fn [this cmd & args] (apply cmd/exec! cmd args)))
Clojure
4
sam-aldis/LightTable
src/lt/objs/editor/file.cljs
[ "MIT" ]
'reach 0.1'; export const main = Reach.App( {}, [], () => { const arr = [1, 2, 3]; return arr["hello"]; } );
RenderScript
3
chikeabuah/reach-lang
hs/t/n/Err_Eval_RefNotInt.rsh
[ "Apache-2.0" ]
c:\tools\msys64\usr\bin\bash -l %cd%/tensorflow/tools/ci_build/windows/libtensorflow_cpu.sh %*
Batchfile
0
abhaikollara/tensorflow
tensorflow/tools/ci_build/windows/cpu/bazel/run_libtensorflow.bat
[ "Apache-2.0" ]
package universe_test import "testing" option now = () => 2030-01-01T00:00:00Z inData = " #datatype,string,long,string,string,dateTime:RFC3339,double #group,false,false,true,true,false,false #default,_result,,,,, ,result,table,_measurement,_field,_time,_value ,,0,SOYcRk,NC7N,2018-12-18T21:12:45Z,55 ,,0,SOYcRk,NC7N,2018-12-18T21:12:55Z,15 ,,0,SOYcRk,NC7N,2018-12-18T21:13:05Z,25 ,,0,SOYcRk,NC7N,2018-12-18T21:13:15Z,5 ,,0,SOYcRk,NC7N,2018-12-18T21:13:25Z,105 ,,0,SOYcRk,NC7N,2018-12-18T21:13:35Z,45 " outData = " #datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,double #group,false,false,true,true,true,true,false #default,_result,,,,,, ,result,table,_start,_stop,_measurement,_field,_value ,,0,2018-12-01T00:00:00Z,2030-01-01T00:00:00Z,SOYcRk,NC7N,41.666666666666664 " test _median = () => ({ input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: (tables=<-) => tables |> range(start: 2018-12-01T00:00:00Z) |> median(compression: 1.0), })
FLUX
4
metrico/flux
stdlib/universe/median_compression_test.flux
[ "MIT" ]
domain: "[M, N] -> { S3[i0, i1] : i0 >= 0 and i0 <= M and i1 >= 0 and i1 <= N; S1[i0, i1] : i0 >= 0 and i0 <= M and i1 >= 0 and i1 <= N; S2[i0, i1] : i0 >= 0 and i0 <= M and i1 >= 0 and i1 <= N }" child: context: "[M, N] -> { [] }" child: schedule: "[M, N] -> [{ S1[i0, i1] -> [(-4 + 3i0 + i1)]; S2[i0, i1] -> [(3i0 + i1)]; S3[i0, i1] -> [(3i0 + i1)] }]" options: "[M, N] -> { separate[i0] }" child: sequence: - filter: "[M, N] -> { S1[i0, i1]; S2[i0, i1] }" child: schedule: "[M, N] -> [{ S1[i0, i1] -> [(i1)]; S2[i0, i1] -> [(i1)] }]" options: "[M, N] -> { separate[i0] }" - filter: "[M, N] -> { S3[i0, i1] }" child: schedule: "[M, N] -> [{ S3[i0, i1] -> [(i1)] }]" options: "[M, N] -> { separate[i0] }"
Smalltalk
2
chelini/isl-haystack
test_inputs/codegen/cloog/reservoir-liu-zhuge1.st
[ "MIT" ]
#import "GeneratedPluginRegistrant.h"
C
0
hmeranda/flutter_link_preview
example/ios/Runner/Runner-Bridging-Header.h
[ "MIT" ]
theory Wallet imports "../Parse" "../Hoare/HoareTripleForBasicBlocks" "./ToyExamplesBlocks" "../Word_Lib/Word_Lemmas_32" begin (* pragma solidity ^0.4.0; contract Wallet { uint256 balance; address owner; function Wallet() public { balance = 0; owner = msg.sender; } function addfund() payable public returns (uint256) { require (msg.sender == owner); balance += msg.value; return balance; } function withdraw() public { require (msg.sender == owner); selfdestruct(owner); } } Compiled with: solc --overwrite -o wallet-data --bin-runtime --asm --hashes wallet.sol 8f9595d4: addfund() 3ccfd60b: withdraw() *) value"(parse_bytecode ''60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633ccfd60b146100485780638f9595d41461005d57600080fd5b341561005357600080fd5b61005b61007b565b005b610065610112565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156100d757600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b3460008082825401925050819055506000549050905600a165627a7a7230582059db8450799f53c1abb1b9ef52ddf2a321e908f3226fb5b962e230f25dfa14ec0029'')" definition insts_ex where "insts_ex == [Stack (PUSH_N [0x60]), Stack (PUSH_N [0x40]), Memory MSTORE, Stack (PUSH_N [0]), Stack CALLDATALOAD, Stack (PUSH_N [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), Swap 0, Arith DIV, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Dup 0, Stack (PUSH_N [0x3C, 0xCF, 0xD6, 0xB]), Arith inst_EQ, Stack (PUSH_N [0, 0x48]), Pc JUMPI, Dup 0, Stack (PUSH_N [0x8F, 0x95, 0x95, 0xD4]), Arith inst_EQ, Stack (PUSH_N [0, 0x5D]), Pc JUMPI, Stack (PUSH_N [0]), Dup 0, Unknown 0xFD, Pc JUMPDEST, Info CALLVALUE, Arith ISZERO, Stack (PUSH_N [0, 0x53]), Pc JUMPI, Stack (PUSH_N [0]), Dup 0, Unknown 0xFD, Pc JUMPDEST, Stack (PUSH_N [0, 0x5B]), Stack (PUSH_N [0, 0x7B]), Pc JUMP, Pc JUMPDEST, Misc STOP, Pc JUMPDEST, Stack (PUSH_N [0, 0x65]), Stack (PUSH_N [1, 0x12]), Pc JUMP, Pc JUMPDEST, Stack (PUSH_N [0x40]), Memory MLOAD, Dup 0, Dup 2, Dup 1, Memory MSTORE, Stack (PUSH_N [0x20]), Arith ADD, Swap 1, Stack POP, Stack POP, Stack (PUSH_N [0x40]), Memory MLOAD, Dup 0, Swap 1, Arith SUB, Swap 0, Misc RETURN, Pc JUMPDEST, Stack (PUSH_N [1]), Stack (PUSH_N [0]), Swap 0, Storage SLOAD, Swap 0, Stack (PUSH_N [1, 0]), Arith EXP, Swap 0, Arith DIV, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Info CALLER, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Arith inst_EQ, Arith ISZERO, Arith ISZERO, Stack (PUSH_N [0, 0xD7]), Pc JUMPI, Stack (PUSH_N [0]), Dup 0, Unknown 0xFD, Pc JUMPDEST, Stack (PUSH_N [1]), Stack (PUSH_N [0]), Swap 0, Storage SLOAD, Swap 0, Stack (PUSH_N [1, 0]), Arith EXP, Swap 0, Arith DIV, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Misc SUICIDE, Pc JUMPDEST, Stack (PUSH_N [0]), Stack (PUSH_N [1]), Stack (PUSH_N [0]), Swap 0, Storage SLOAD, Swap 0, Stack (PUSH_N [1, 0]), Arith EXP, Swap 0, Arith DIV, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Info CALLER, Stack (PUSH_N [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), Bits inst_AND, Arith inst_EQ, Arith ISZERO, Arith ISZERO, Stack (PUSH_N [1, 0x70]), Pc JUMPI, Stack (PUSH_N [0]), Dup 0, Unknown 0xFD, Pc JUMPDEST, Info CALLVALUE, Stack (PUSH_N [0]), Dup 0, Dup 2, Dup 2, Storage SLOAD, Arith ADD, Swap 2, Stack POP, Stack POP, Dup 1, Swap 0, Storage SSTORE, Stack POP, Stack (PUSH_N [0]), Storage SLOAD, Swap 0, Stack POP, Swap 0, Pc JUMP, Misc STOP, Log LOG1, Stack (PUSH_N [0x62, 0x7A, 0x7A, 0x72, 0x30, 0x58]), Arith SHA3, Memory MSIZE, Unknown 0xDB, Dup 4, Stack POP, Stack (PUSH_N [0x9F, 0x53, 0xC1, 0xAB, 0xB1, 0xB9, 0xEF, 0x52, 0xDD, 0xF2, 0xA3, 0x21, 0xE9, 8, 0xF3, 0x22, 0x6F, 0xB5, 0xB9, 0x62, 0xE2, 0x30, 0xF2, 0x5D, 0xFA, 0x14]), Unknown 0xEC, Misc STOP, Unknown 0x29]" (* 159 instructions *) lemma "parse_bytecode ''60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633ccfd60b146100485780638f9595d41461005d57600080fd5b341561005357600080fd5b61005b61007b565b005b610065610112565b6040518082815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156100d757600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b3460008082825401925050819055506000549050905600a165627a7a7230582059db8450799f53c1abb1b9ef52ddf2a321e908f3226fb5b962e230f25dfa14ec0029'' = insts_ex" unfolding insts_ex_def by eval definition "blocks_wallet == build_blocks insts_ex" definition addfund_hash :: "32 word" where "addfund_hash = 0x8f9595d4" definition withdraw_hash :: "32 word" where "withdraw_hash = 0x8f9595d4" definition "contract_fail \<equiv> ContractFail [ShouldNotHappen]" definition return_action ::"address \<Rightarrow> address \<Rightarrow> 32 word \<Rightarrow> 256 word \<Rightarrow> contract_action" where "return_action sender owner hash new_balance = (if hash = addfund_hash \<and> sender = owner then ContractReturn (word_rsplit (new_balance::w256)) else if hash = withdraw_hash \<and> sender = owner then ContractSuicide owner else contract_fail)" definition return_storage ::"address \<Rightarrow> address \<Rightarrow> 32 word \<Rightarrow> 256 word \<Rightarrow> contract_action" where "return_storage sender owner hash new_balance = (if hash = addfund_hash \<and> sender = owner then ContractReturn (word_rsplit (new_balance::w256)) else if hash = withdraw_hash \<and> sender = owner then ContractSuicide owner else contract_fail)" lemma verify_wallet_return: shows "\<exists>r. triple (program_counter 0 ** stack_height 0 ** (sent_data (word_rsplit (hash::32 word)::byte list)) ** sent_value v ** caller sender ** memory_usage 0 ** continuing ** gas_pred 3000 ** storage 0 cur_balance ** storage 1 (ucast owner) ** memory (word_rcat [64::byte]) (word_rcat [x::byte]::256 word) ** memory (word_rcat [96::byte]) (word_rcat [y::byte]::256 word)) blocks_wallet (action (return_action sender owner hash (v + cur_balance)) ** r)" apply(simp add: return_action_def blocks_simps triple_def addfund_hash_def withdraw_hash_def) oops lemma verify_wallet_storage: assumes owner_not_sender: "owner \<noteq> sender" shows "\<exists>r. triple (program_counter 0 ** stack_height 0 ** (sent_data (word_rsplit (hash::32 word)::byte list)) ** sent_value v ** caller sender ** memory_usage 0 ** continuing ** gas_pred 3000 ** storage 0 cur_balance ** storage 1 (ucast owner) ** memory (word_rcat [64::byte]) (word_rcat [x::byte]::256 word) ** memory (word_rcat [96::byte]) (word_rcat [y::byte]::256 word)) blocks_wallet (storage 0 cur_balance ** r)" oops end
Isabelle
4
pirapira/eth-isabelle
example/Wallet.thy
[ "Apache-2.0" ]
/* * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include <LibGfx/Forward.h> #include <LibWeb/CSS/ComputedValues.h> namespace Web::Painting { struct BorderRadiusData { float top_left { 0 }; float top_right { 0 }; float bottom_right { 0 }; float bottom_left { 0 }; }; BorderRadiusData normalized_border_radius_data(Layout::Node const&, Gfx::FloatRect const&, CSS::Length top_left_radius, CSS::Length top_right_radius, CSS::Length bottom_right_radius, CSS::Length bottom_left_radius); enum class BorderEdge { Top, Right, Bottom, Left, }; struct BordersData { CSS::BorderData top; CSS::BorderData right; CSS::BorderData bottom; CSS::BorderData left; }; void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const& rect, BorderRadiusData const& border_radius_data, BordersData const& borders_data); void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiusData const& border_radius_data, BordersData const&); }
C
4
r00ster91/serenity
Userland/Libraries/LibWeb/Painting/BorderPainting.h
[ "BSD-2-Clause" ]
[attr="--"] {}
CSS
0
mengxy/swc
crates/swc_css_parser/tests/fixture/esbuild/misc/QLHVnSGDdGN_iDeP3OAXfQ/input.css
[ "Apache-2.0" ]
{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "id": "AEigJ-mOGOk9" }, "outputs": [], "source": [ "# Copyright 2021 DeepMind Technologies Limited\n", "#\n", "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", "# You may obtain a copy of the License at\n", "#\n", "# https://www.apache.org/licenses/LICENSE-2.0\n", "#\n", "# Unless required by applicable law or agreed to in writing, software\n", "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "YyGBRVPJxLzo" }, "outputs": [], "source": [ "# Install dependencies for Google Colab.\n", "# If you want to run this notebook on your own machine, you can skip this cell\n", "!pip install dm-haiku\n", "!pip install einops\n", "\n", "!mkdir /content/perceiver\n", "!touch /content/perceiver/__init__.py\n", "!wget -O /content/perceiver/io_processors.py https://raw.githubusercontent.com/deepmind/deepmind-research/master/perceiver/io_processors.py\n", "!wget -O /content/perceiver/perceiver.py https://raw.githubusercontent.com/deepmind/deepmind-research/master/perceiver/perceiver.py\n", "!wget -O /content/perceiver/position_encoding.py https://raw.githubusercontent.com/deepmind/deepmind-research/master/perceiver/position_encoding.py" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "VHzUTH5KqNEt" }, "outputs": [], "source": [ "#@title Imports\n", "\n", "import functools\n", "import itertools\n", "import pickle\n", "\n", "import haiku as hk\n", "import jax\n", "import jax.numpy as jnp\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", "import cv2\n", "import imageio\n", "\n", "from perceiver import perceiver, io_processors" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "uxeP5yit7hJg" }, "outputs": [], "source": [ "#@title Model construction\n", "\n", "FLOW_SCALE_FACTOR = 20\n", "# The network assumes images are of the following size\n", "TRAIN_SIZE = (368, 496)\n", "\n", "def optical_flow(images):\n", " \"\"\"Perceiver IO model for optical flow.\n", "\n", " Args:\n", " images: Array of two stacked images, of shape [B, 2, H, W, C]\n", " Returns:\n", " Optical flow field, of shape [B, H, W, 2].\n", " \"\"\"\n", " input_preprocessor = io_processors.ImagePreprocessor(\n", " position_encoding_type='fourier',\n", " fourier_position_encoding_kwargs=dict(\n", " num_bands=64,\n", " max_resolution=TRAIN_SIZE,\n", " sine_only=False,\n", " concat_pos=True,\n", " ),\n", " n_extra_pos_mlp=0,\n", " prep_type='patches',\n", " spatial_downsample=1,\n", " conv_after_patching=True,\n", " temporal_downsample=2)\n", "\n", " encoder = encoder = perceiver.PerceiverEncoder(\n", " num_self_attends_per_block=24,\n", " # Weights won't be shared if num_blocks is set to 1.\n", " num_blocks=1,\n", " z_index_dim=2048,\n", " num_cross_attend_heads=1,\n", " num_z_channels=512,\n", " num_self_attend_heads=16,\n", " cross_attend_widening_factor=1,\n", " self_attend_widening_factor=1,\n", " dropout_prob=0.0,\n", " z_pos_enc_init_scale=0.02,\n", " cross_attention_shape_for_attn='kv',\n", " name='perceiver_encoder')\n", "\n", " decoder = perceiver.FlowDecoder(\n", " TRAIN_SIZE,\n", " rescale_factor=100.0,\n", " use_query_residual=False,\n", " output_num_channels=2,\n", " output_w_init=jnp.zeros,\n", " # We query the decoder using the first frame features\n", " # rather than a standard decoder position encoding.\n", " position_encoding_type='fourier',\n", " fourier_position_encoding_kwargs=dict(\n", " concat_pos=True,\n", " max_resolution=TRAIN_SIZE,\n", " num_bands=64,\n", " sine_only=False\n", " )\n", " )\n", "\n", " model = perceiver.Perceiver(\n", " input_preprocessor=input_preprocessor,\n", " encoder=encoder,\n", " decoder=decoder,\n", " output_postprocessor=None)\n", "\n", " return model(io_processors.patches_for_flow(images),\n", " is_training=False) * FLOW_SCALE_FACTOR\n", "\n", "\n", "optical_flow = hk.transform(optical_flow)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "dmvRv3o-6ASw" }, "outputs": [], "source": [ "#@title Function to compute flow between pairs of images\n", "\n", "# If you encounter GPU memory errors while running the function below,\n", "# you can run it on the CPU instead:\n", "# _apply_optical_flow_model = jax.jit(optical_flow.apply, backend=\"cpu\")\n", "_apply_optical_flow_model = jax.jit(optical_flow.apply)\n", "\n", "def compute_grid_indices(image_shape, patch_size=TRAIN_SIZE, min_overlap=20):\n", " if min_overlap \u003e= TRAIN_SIZE[0] or min_overlap \u003e= TRAIN_SIZE[1]:\n", " raise ValueError(\n", " f\"Overlap should be less than size of patch (got {min_overlap}\"\n", " f\"for patch size {patch_size}).\")\n", " ys = list(range(0, image_shape[0], TRAIN_SIZE[0] - min_overlap))\n", " xs = list(range(0, image_shape[1], TRAIN_SIZE[1] - min_overlap))\n", " # Make sure the final patch is flush with the image boundary\n", " ys[-1] = image_shape[0] - patch_size[0]\n", " xs[-1] = image_shape[1] - patch_size[1]\n", " return itertools.product(ys, xs)\n", "\n", "def compute_optical_flow(params, rng, img1, img2, grid_indices,\n", " patch_size=TRAIN_SIZE):\n", " \"\"\"Function to compute optical flow between two images.\n", "\n", " To compute the flow between images of arbitrary sizes, we divide the image\n", " into patches, compute the flow for each patch, and stitch the flows together.\n", "\n", " Args:\n", " params: model parameters\n", " rng: jax.random.PRNGKey, not used in this model\n", " img1: first image\n", " img2: second image\n", " grid_indices: indices of the upper left corner for each patch.\n", " patch_size: size of patch, should be TRAIN_SIZE.\n", " \"\"\"\n", " imgs = jnp.stack([img1, img2], axis=0)[None]\n", " height = imgs.shape[-3]\n", " width = imgs.shape[-2]\n", "\n", " if height \u003c patch_size[0]:\n", " raise ValueError(\n", " f\"Height of image (shape: {imgs.shape}) must be at least {patch_size[0]}.\"\n", " \"Please pad or resize your image to the minimum dimension.\"\n", " )\n", " if width \u003c patch_size[1]:\n", " raise ValueError(\n", " f\"Width of image (shape: {imgs.shape}) must be at least {patch_size[1]}.\"\n", " \"Please pad or resize your image to the minimum dimension.\"\n", " )\n", "\n", " flows = 0\n", " flow_count = 0\n", "\n", " for y, x in grid_indices:\n", " inp_piece = imgs[..., y : y + patch_size[0],\n", " x : x + patch_size[1], :]\n", " flow_piece = _apply_optical_flow_model(params, rng, inp_piece)\n", " weights_x, weights_y = jnp.meshgrid(\n", " jnp.arange(patch_size[1]), jnp.arange(patch_size[0]))\n", "\n", " weights_x = jnp.minimum(weights_x + 1, patch_size[1] - weights_x)\n", " weights_y = jnp.minimum(weights_y + 1, patch_size[0] - weights_y)\n", " weights = jnp.minimum(weights_x, weights_y)[jnp.newaxis, :, :,\n", " jnp.newaxis]\n", " padding = [(0, 0), (y, height - y - patch_size[0]),\n", " (x, width - x - patch_size[1]), (0, 0)]\n", " flows += jnp.pad(flow_piece * weights, padding)\n", " flow_count += jnp.pad(weights, padding)\n", "\n", " flows /= flow_count\n", " return flows" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "EVRWatw4LXFx" }, "outputs": [], "source": [ "#@title Load parameters from checkpoint\n", "\n", "!wget -O optical_flow_checkpoint.pystate https://storage.googleapis.com/perceiver_io/optical_flow_checkpoint.pystate\n", "\n", "rng = jax.random.PRNGKey(42)\n", "with open(\"optical_flow_checkpoint.pystate\", \"rb\") as f:\n", " params = pickle.loads(f.read())\n", "\n", "state = {}" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "MAfLTtEXeE3-" }, "outputs": [], "source": [ "# Download two example frames from the Sintel dataset.\n", "# These files are obtained from the Sintel dataset test split,\n", "# downloaded from http://sintel.is.tue.mpg.de/downloads.\n", "# They correspond to MPI-Sintel-testing/test/clean/cave_3/frame_0001.png\n", "# and MPI-Sintel-testing/test/clean/cave_3/frame_0002.png.\n", "#\n", "# Citation for Sintel dataset:\n", "# D. J. Butler, J. Wulff, G. B. Stanley, and M. J. Black.\n", "# A naturalistic open source movie for optical flow evaluation.\n", "# European Conf. on Computer Vision (ECCV), 2012.\n", "# https://files.is.tue.mpg.de/black/papers/ButlerECCV2012.pdf\n", "#\n", "# The Sintel images are originally generated for the Durian Open Movie project\n", "# and are licensed under the Creative Commons Attribution 3.0 license (https://durian.blender.org/sharing/).\n", "# The images are copyrighted by the Blender Foundation (https://durian.blender.org).\n", "\n", "\n", "!wget -O sintel_frame1.png https://storage.googleapis.com/perceiver_io/sintel_frame1.png\n", "!wget -O sintel_frame2.png https://storage.googleapis.com/perceiver_io/sintel_frame2.png\n", "\n", "with open(\"sintel_frame1.png\", \"rb\") as f:\n", " im1 = imageio.imread(f)\n", "with open(\"sintel_frame2.png\", \"rb\") as f:\n", " im2 = imageio.imread(f)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "Z7ZQJ2auy4Lt" }, "outputs": [], "source": [ "#@title Image Utility Functions\n", "\n", "def normalize(im):\n", " return im / 255.0 * 2 - 1\n", "\n", "def visualize_flow(flow):\n", " flow = np.array(flow)\n", " # Use Hue, Saturation, Value colour model \n", " hsv = np.zeros((flow.shape[0], flow.shape[1], 3), dtype=np.uint8)\n", " hsv[..., 2] = 255\n", "\n", " mag, ang = cv2.cartToPolar(flow[..., 0], flow[..., 1])\n", " hsv[..., 0] = ang / np.pi / 2 * 180\n", " hsv[..., 1] = np.clip(mag * 255 / 24, 0, 255)\n", " bgr = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)\n", " plt.imshow(bgr)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "FfWpBNZJLib4" }, "outputs": [], "source": [ "# Compute optical flow\n", "\n", "# Divide images into patches, compute flow between corresponding patches\n", "# of both images, and stitch the flows together\n", "grid_indices = compute_grid_indices(im1.shape)\n", "flow = compute_optical_flow(params, rng, normalize(im1), normalize(im2), grid_indices)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "Bz7G04rmtHVI" }, "outputs": [], "source": [ "# Visualize the computed flow\n", "visualize_flow(flow[0])" ] } ], "metadata": { "colab": { "collapsed_sections": [], "name": "Perceiver IO: Optical Flow Visualization.ipynb", "private_outputs": true, "provenance": [ { "file_id": "1bt4J3-jS7C-xZQrtx0AgAeKSBxOUoOPy", "timestamp": 1627577366926 } ], "toc_visible": true }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 0 }
Jupyter Notebook
5
kawa-work/deepmind-research
perceiver/colabs/optical_flow.ipynb
[ "Apache-2.0" ]
FORMAT: 1A # Beehive API # Honey [/honey] ## Retrieve Honey [GET] + Request (application/json) + Headers Accept: application/json + Response 200 (application/json) + Headers X-Test: Adam + Body {}
API Blueprint
3
tomoyamachi/dredd
packages/dredd-transactions/test/fixtures/apib/http-headers.apib
[ "MIT" ]
import "./no-warn" it("global", () => { expect(typeof global).toBe("object"); }); it("__filename", () => { expect(typeof __filename).toBe("string"); }); it("__dirname", () => { expect(typeof __dirname).toBe("string"); });
JavaScript
3
fourstash/webpack
test/configCases/web/node-source-future-defaults/index.js
[ "MIT" ]
@program lib-ignore def noisy_pmatch "$lib/match" match "noisy_pmatch" call q @register lib-ignore=lib/ignore do @set $lib/ignore=_defs/ref_lib_ignore:{ref:$lib/ignore} @set $lib/ignore=_docs:@list $lib/ignore=1-59 @set $lib/ignore=_defs/ignores?:ref_lib_ignore "rtn-ignores?" call @set $lib/ignore=_defs/ignore-listify:"_prefs/%s/ignore" fmtstring @set $lib/ignore=_defs/ignore-add:ignore-listify swap reflist_add @set $lib/ignore=_defs/ignore-del:ignore-listify swap reflist_del @set $lib/ignore=_defs/ignore-list:ignore-listify swap array_get_reflist array_vals @set $lib/ignore=_defs/cmd-ignore-add:ref_lib_ignore "cmd-add" call @set $lib/ignore=_defs/cmd-ignore-del:ref_lib_ignore "cmd-del" call @set $lib/ignore=_defs/array_get_ignorers:ignore-listify swap "*{%d}*" fmtstring array_filter_prop @set $lib/ignore=_defs/array_filter_ignorers:ref_lib_ignore "rtn-array-filter" call @set $lib/ignore=_defs/notify_exclude_ignorers:ref_lib_ignore "rtn-notify-exclude" call @set $lib/ignore=_defs/notify_except_ignorers:1 -3 rotate notify_exclude_ignorers @edit $lib/ignore 1 1000 d i ( lib-ignore by Natasha@HLM Easily $includable, program specific #ignore function. cmd-ignore-add { str strProgram -- } Parses str as a space-delimited list of names, adding the valid and not- already-#ignored ones to the active user's strProgram #ignore list. Emits appropriate messages for each name in the list. cmd-ignore-del { str strProgram -- } Parses str as a space-delimited list of names, adding the valid and #ignored ones to the active user's strProgram #ignore list. Emits appropriate messages for each name in the list. ignores? { db dbWhom strProgram -- bool } Returns true if db has dbWhom on her strProgram #ignore list. array_get_ignorers { arrDb db strProgram -- arrDb' } Returns only the dbrefs of players who are strProgram #ignoring db. array_filter_ignorers { arrDb db strProgram -- arrDb' } Returns only the dbrefs of players who are *not* strProgram #ignoring db. notify_exclude_ignorers { dbRoom dbN..db1 intN str strProgram -- } Notifies str to everyone in dbRoom except those in the list and those who have strProgram #ignored me@. ignore-add { db dbWhom strProgram -- } Adds dbWhom to db's strProgram #ignore list. If dbWhom is already #ignored, puts him at the end of the list {which doesn't really mean anything}. ignore-del { db dbWhom strProgram -- } Removes dbWhom from db's strProgram #ignore list. If dbWhom is not #ignored, fails silently. ignore-list { db strProgram -- dbN..db1 intN } Returns the list of who is in db's strProgram #ignore list. ignore-listify { str -- str' } Turns the given program code into an ignore reflist property. You don't need to call this yourself if you're just using the above functions. __Version history 1.1 19 October 2002: rtn-ignores? is an in-library call, and honors in-server ignores. 1.2 12 January 2003: notify_exclude_ignorers uses a real notify_exclude. 1.3 3 January 2004: Added array_get_ignorers, fixed backwards description of array_filter_ignorers. Copyright 2002-2003 Natasha Snunkmeox. Copyright 2002-2003 Here Lie Monsters. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files {the "Software"}, to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ) $author Natasha Snunkmeox <natmeox@neologasm.org> $version 1.003 $lib-version 1.003 $note Easily $includable, program specific #ignore function. $include $lib/reflist $include $lib/ignore : rtn-add reflist_add ; : rtn-del reflist_del ; : rtn-add-del[ str:names str:ignlist str:succmsg str:failmsg int:failifign adr:fn -- ] me @ ignlist @ ignore-listify ( dbMe strProp ) names @ " " explode_array foreach swap pop ( dbMe strProp strName ) .noisy_pmatch dup ok? if ( dbMe strProp db ) 3 dupn reflist_find not not failifign @ = if ( dbMe strProp db ) failmsg @ fmtstring .tellbad ( dbMe strProp ) else ( dbMe strProp db ) 3 dupn fn @ execute ( dbMe strProp db ) succmsg @ fmtstring .tellgood ( dbMe strProp ) then ( dbMe strProp ) else pop then ( dbMe strProp ) repeat pop pop ( ) ; ( strNames strProgram -- } Central commands for #ignoring and #!ignoring people. ) : cmd-add ( strNames strProgram ) over if "Ignored %D." "You are already ignoring %D." 1 'rtn-add rtn-add-del else swap pop ( strProgram ) me @ swap ignore-listify REF-list "You are ignoring: %s" fmtstring .tellgood ( ) then ; : cmd-del "Unignored %D." "You are already not ignoring %D." 0 'rtn-del rtn-add-del ; : rtn-array-filter ( arrDb db strProgram -- arrDb' } Removes anyone strProgram #ignoring db from arrDb. ) 3 pick -4 rotate ( arrDb arrDb db strProgram ) ignore-listify swap "*{%d}*" fmtstring ( arrDb arrDb strProp strSmatch ) array_filter_prop ( arrDb arrIgnoring ) swap array_diff ( arrDb' ) ; : rtn-notify-exclude ( dbRoom dbN..db1 intN str strProgram -- } Notify str to everyone in dbRoom except those listed and those strProgram #ignoring me@. ) var! program var! mesg ( dbRoom dbN..db1 intN ) array_make over ( dbRoom arrDb dbRoom ) (dup mesg @ notify ( dbRoom arrDb dbRoom ) contents_array ( dbRoom arrDb arrContents ) dup me @ program @ rtn-array-filter ( dbRoom arrDb arrContents arrOkContents ) swap array_diff ( dbRoom arrDb arrIgnorers ) array_union ( dbRoom arrExcept ) array_vals mesg @ ( dbRoom dbN..db1 intN str ) notify_exclude ( ) ; : rtn-ignores? ( dbAlice dbBob strProgram -- bool } Returns true if dbAlice is ignoring dbBob for the purposes of strProgram. ) 3 pick 3 pick ignoring? if ( dbAlice dbBob strProgram ) pop pop pop 1 ( bool ) else ignore-listify swap reflist_find ( bool ) then ( bool ) ; : main "Go away! Nyeh!" abort ; PUBLIC cmd-add PUBLIC cmd-del PUBLIC rtn-array-filter PUBLIC rtn-notify-exclude PUBLIC rtn-ignores? . c q
MUF
4
natmeox/hlm-suite
lib-ignore.muf
[ "MIT" ]
// run-pass pub fn foo() -> isize { 10 }
Rust
1
Eric-Arellano/rust
src/test/ui-fulldeps/mod_dir_simple/test.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
<div class="hidden"> \begin{code} main = putStrLn "Easter Egg: to force Makefile" \end{code} </div> {#ASD} ======= Abstract Refinement Types ------------------------- <br> <br> **Ranjit Jhala** University of California, San Diego <br> <br> Joint work with: N. Vazou, E. Seidel, P. Rondon, D. Vytiniotis, S. Peyton-Jones <br> <div class="fragment"> [[continue]](00_Motivation.lhs.slides.html) </div> Plan ---- + <a href="00_Motivation.lhs.slides.html" target="_blank">Motivation</a> + <div class="fragment"><a href="01_SimpleRefinements.lhs.slides.html" target="_blank">Refinements</a></div> + <div class="fragment"><a href="02_Measures.lhs.slides.html" target= "_blank">Measures</a></div> + <div class="fragment"><a href="04_AbstractRefinements.lhs.slides.html" target= "_blank">Abstract Refinements:</a> <a href="06_Inductive.lhs.slides.html" target="_blank">Functions</a>,<a href="08_Inductive.lhs.slides.html" target="_blank">Trees</a>,<a href="07_Array.lhs.slides.html" target= "_blank">Arrays</a></div> + <div class="fragment"><a href="11_Evaluation.lhs.slides.html" target="_blank">Evaluation</a></div> + <div class="fragment"><a href="12_Conclusion.lhs.slides.html" target="_blank">Conclusion</a></div>
Literate Haskell
1
curiousleo/liquidhaskell
docs/slides/BOS14/lhs/Index.lhs
[ "MIT", "BSD-3-Clause" ]
%!PS % chars-12.ps /inch {72 mul} def /Palatino-Roman 12 72 div inch selectfont % 25 chars in first row: 33-57 0.3 inch 2.0 inch moveto 3. 0. (!"#$%&'()*+,-./0123456789) ashow % 34 chars in second row: 58-91 0.3 inch 1.4 inch moveto 3. 0. (:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[) ashow % 34 chars in third row: 93-126 0.3 inch 0.8 inch moveto 3. 0. (]^_`abcdefghijklmnopqrstuvwxyz{|}~) ashow showpage
PostScript
4
andyfuturex/tess-two
tess-two/jni/com_googlecode_leptonica_android/src/prog/fonts/chars-12.ps
[ "Apache-2.0" ]
component { public string function getStringFromStruct(required struct shelfLevelX,required string keyToCheck) { if(!isNull(shelfLevelX )) { if(StructKeyExists(shelfLevelX , keyToCheck)) { return shelfLevelX [keyToCheck]; } } return ''; } }
ColdFusion CFC
4
tonym128/CFLint
src/test/resources/com/cflint/tests/VariableNameChecker/sample1_635.cfc
[ "BSD-3-Clause" ]
// Copyright 2020 The gRPC 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. // Local copy of Envoy xDS proto file, used for testing only. syntax = "proto3"; package envoy.extensions.filters.common.fault.v3; import "src/proto/grpc/testing/xds/v3/percent.proto"; import "google/protobuf/duration.proto"; // Delay specification is used to inject latency into the // HTTP/gRPC/Mongo/Redis operation or delay proxying of TCP connections. message FaultDelay { // Fault delays are controlled via an HTTP header (if applicable). See the // :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` // documentation for more information. message HeaderDelay {} oneof fault_delay_secifier { // Add a fixed delay before forwarding the operation upstream. See // https://developers.google.com/protocol-buffers/docs/proto3#json for // the JSON/YAML Duration mapping. For HTTP/Mongo/Redis, the specified // delay will be injected before a new request/operation. For TCP // connections, the proxying of the connection upstream will be delayed // for the specified period. This is required if type is FIXED. google.protobuf.Duration fixed_delay = 3; // Fault delays are controlled via an HTTP header (if applicable). HeaderDelay header_delay = 5; } // The percentage of operations/connections/requests on which the delay will // be injected. type.v3.FractionalPercent percentage = 4; }
Protocol Buffer
4
warlock135/grpc
src/proto/grpc/testing/xds/v3/fault_common.proto
[ "Apache-2.0" ]
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { PersistentProtocol, ProtocolConstants, ISocket } from 'vs/base/parts/ipc/common/ipc.net'; import { ILogService } from 'vs/platform/log/common/log'; import { Emitter, Event } from 'vs/base/common/event'; import { VSBuffer } from 'vs/base/common/buffer'; import { ProcessTimeRunOnceScheduler } from 'vs/base/common/async'; import { NativeParsedArgs } from 'vs/platform/environment/common/argv'; export interface IExtensionsManagementProcessInitData { args: NativeParsedArgs; } export function printTime(ms: number): string { let h = 0; let m = 0; let s = 0; if (ms >= 1000) { s = Math.floor(ms / 1000); ms -= s * 1000; } if (s >= 60) { m = Math.floor(s / 60); s -= m * 60; } if (m >= 60) { h = Math.floor(m / 60); m -= h * 60; } const _h = h ? `${h}h` : ``; const _m = m ? `${m}m` : ``; const _s = s ? `${s}s` : ``; const _ms = ms ? `${ms}ms` : ``; return `${_h}${_m}${_s}${_ms}`; } export class ManagementConnection { private _onClose = new Emitter<void>(); public readonly onClose: Event<void> = this._onClose.event; private readonly _reconnectionGraceTime: number; private readonly _reconnectionShortGraceTime: number; private _remoteAddress: string; public readonly protocol: PersistentProtocol; private _disposed: boolean; private _disconnectRunner1: ProcessTimeRunOnceScheduler; private _disconnectRunner2: ProcessTimeRunOnceScheduler; constructor( private readonly _logService: ILogService, private readonly _reconnectionToken: string, remoteAddress: string, protocol: PersistentProtocol ) { this._reconnectionGraceTime = ProtocolConstants.ReconnectionGraceTime; this._reconnectionShortGraceTime = ProtocolConstants.ReconnectionShortGraceTime; this._remoteAddress = remoteAddress; this.protocol = protocol; this._disposed = false; this._disconnectRunner1 = new ProcessTimeRunOnceScheduler(() => { this._log(`The reconnection grace time of ${printTime(this._reconnectionGraceTime)} has expired, so the connection will be disposed.`); this._cleanResources(); }, this._reconnectionGraceTime); this._disconnectRunner2 = new ProcessTimeRunOnceScheduler(() => { this._log(`The reconnection short grace time of ${printTime(this._reconnectionShortGraceTime)} has expired, so the connection will be disposed.`); this._cleanResources(); }, this._reconnectionShortGraceTime); this.protocol.onDidDispose(() => { this._log(`The client has disconnected gracefully, so the connection will be disposed.`); this._cleanResources(); }); this.protocol.onSocketClose(() => { this._log(`The client has disconnected, will wait for reconnection ${printTime(this._reconnectionGraceTime)} before disposing...`); // The socket has closed, let's give the renderer a certain amount of time to reconnect this._disconnectRunner1.schedule(); }); this._log(`New connection established.`); } private _log(_str: string): void { this._logService.info(`[${this._remoteAddress}][${this._reconnectionToken.substr(0, 8)}][ManagementConnection] ${_str}`); } public shortenReconnectionGraceTimeIfNecessary(): void { if (this._disconnectRunner2.isScheduled()) { // we are disconnected and already running the short reconnection timer return; } if (this._disconnectRunner1.isScheduled()) { this._log(`Another client has connected, will shorten the wait for reconnection ${printTime(this._reconnectionShortGraceTime)} before disposing...`); // we are disconnected and running the long reconnection timer this._disconnectRunner2.schedule(); } } private _cleanResources(): void { if (this._disposed) { // already called return; } this._disposed = true; this._disconnectRunner1.dispose(); this._disconnectRunner2.dispose(); const socket = this.protocol.getSocket(); this.protocol.sendDisconnect(); this.protocol.dispose(); socket.end(); this._onClose.fire(undefined); } public acceptReconnection(remoteAddress: string, socket: ISocket, initialDataChunk: VSBuffer): void { this._remoteAddress = remoteAddress; this._log(`The client has reconnected.`); this._disconnectRunner1.cancel(); this._disconnectRunner2.cancel(); this.protocol.beginAcceptReconnection(socket, initialDataChunk); this.protocol.endAcceptReconnection(); } }
TypeScript
4
sbj42/vscode
src/vs/server/node/remoteExtensionManagement.ts
[ "MIT" ]
KIDS Distribution saved on Jan 12, 2022@14:21:26 Test Release SAMI*18.0*15 SEQ #15 (sami-18-x-15) **KIDS**:SAMI*18.0*15^ **INSTALL NAME** SAMI*18.0*15 "BLD",11517,0) SAMI*18.0*15^SAMI^0^3220112^n "BLD",11517,4,0) ^9.64PA^^0 "BLD",11517,6.3) 6 "BLD",11517,"INID") ^n "BLD",11517,"INIT") "BLD",11517,"KRN",0) ^9.67PA^1.5^25 "BLD",11517,"KRN",.4,0) .4 "BLD",11517,"KRN",.401,0) .401 "BLD",11517,"KRN",.402,0) .402 "BLD",11517,"KRN",.403,0) .403 "BLD",11517,"KRN",.5,0) .5 "BLD",11517,"KRN",.84,0) .84 "BLD",11517,"KRN",1.5,0) 1.5 "BLD",11517,"KRN",1.6,0) 1.6 "BLD",11517,"KRN",1.61,0) 1.61 "BLD",11517,"KRN",1.62,0) 1.62 "BLD",11517,"KRN",3.6,0) 3.6 "BLD",11517,"KRN",3.8,0) 3.8 "BLD",11517,"KRN",9.2,0) 9.2 "BLD",11517,"KRN",9.8,0) 9.8 "BLD",11517,"KRN",9.8,"NM",0) ^9.68A^9^2 "BLD",11517,"KRN",9.8,"NM",8,0) SAMIHOM4^^0^B977083192 "BLD",11517,"KRN",9.8,"NM",9,0) SAMIHUL^^0^B115804 "BLD",11517,"KRN",9.8,"NM","B","SAMIHOM4",8) "BLD",11517,"KRN",9.8,"NM","B","SAMIHUL",9) "BLD",11517,"KRN",19,0) 19 "BLD",11517,"KRN",19.1,0) 19.1 "BLD",11517,"KRN",101,0) 101 "BLD",11517,"KRN",409.61,0) 409.61 "BLD",11517,"KRN",771,0) 771 "BLD",11517,"KRN",779.2,0) 779.2 "BLD",11517,"KRN",870,0) 870 "BLD",11517,"KRN",8989.51,0) 8989.51 "BLD",11517,"KRN",8989.52,0) 8989.52 "BLD",11517,"KRN",8989.52,"NM",0) ^9.68A^^ "BLD",11517,"KRN",8993,0) 8993 "BLD",11517,"KRN",8994,0) 8994 "BLD",11517,"KRN","B",.4,.4) "BLD",11517,"KRN","B",.401,.401) "BLD",11517,"KRN","B",.402,.402) "BLD",11517,"KRN","B",.403,.403) "BLD",11517,"KRN","B",.5,.5) "BLD",11517,"KRN","B",.84,.84) "BLD",11517,"KRN","B",1.5,1.5) "BLD",11517,"KRN","B",1.6,1.6) "BLD",11517,"KRN","B",1.61,1.61) "BLD",11517,"KRN","B",1.62,1.62) "BLD",11517,"KRN","B",3.6,3.6) "BLD",11517,"KRN","B",3.8,3.8) "BLD",11517,"KRN","B",9.2,9.2) "BLD",11517,"KRN","B",9.8,9.8) "BLD",11517,"KRN","B",19,19) "BLD",11517,"KRN","B",19.1,19.1) "BLD",11517,"KRN","B",101,101) "BLD",11517,"KRN","B",409.61,409.61) "BLD",11517,"KRN","B",771,771) "BLD",11517,"KRN","B",779.2,779.2) "BLD",11517,"KRN","B",870,870) "BLD",11517,"KRN","B",8989.51,8989.51) "BLD",11517,"KRN","B",8989.52,8989.52) "BLD",11517,"KRN","B",8993,8993) "BLD",11517,"KRN","B",8994,8994) "BLD",11517,"QUES",0) ^9.62^^ "BLD",11517,"REQB",0) ^9.611^13^12 "BLD",11517,"REQB",1,0) SAMI*18.0*1^0 "BLD",11517,"REQB",2,0) SAMI*18.0*2^0 "BLD",11517,"REQB",3,0) SAMI*18.0*3^0 "BLD",11517,"REQB",4,0) SAMI*18.0*4^0 "BLD",11517,"REQB",5,0) SAMI 18.0T05^0 "BLD",11517,"REQB",6,0) SAMI*18.0*6^0 "BLD",11517,"REQB",8,0) SAMI*18.0*8^0 "BLD",11517,"REQB",9,0) SAMI*18.0*9^0 "BLD",11517,"REQB",10,0) SAMI*18.0*10^0 "BLD",11517,"REQB",11,0) SAMI*18.0*11^0 "BLD",11517,"REQB",12,0) SAMI*18.0*12^0 "BLD",11517,"REQB",13,0) SAMI*18.0*13^0 "BLD",11517,"REQB","B","SAMI 18.0T05",5) "BLD",11517,"REQB","B","SAMI*18.0*1",1) "BLD",11517,"REQB","B","SAMI*18.0*10",10) "BLD",11517,"REQB","B","SAMI*18.0*11",11) "BLD",11517,"REQB","B","SAMI*18.0*12",12) "BLD",11517,"REQB","B","SAMI*18.0*13",13) "BLD",11517,"REQB","B","SAMI*18.0*2",2) "BLD",11517,"REQB","B","SAMI*18.0*3",3) "BLD",11517,"REQB","B","SAMI*18.0*4",4) "BLD",11517,"REQB","B","SAMI*18.0*6",6) "BLD",11517,"REQB","B","SAMI*18.0*8",8) "BLD",11517,"REQB","B","SAMI*18.0*9",9) "MBREQ") 0 "PKG",230,-1) 1^1 "PKG",230,0) SAMI^SAMI^SCREENING APPLICATIONS MANAGEMENT - IELCAP "PKG",230,22,0) ^9.49I^1^1 "PKG",230,22,1,0) 18.0^3191203 "PKG",230,22,1,"PAH",1,0) 15^3220112 "QUES","XPF1",0) Y "QUES","XPF1","??") ^D REP^XPDH "QUES","XPF1","A") Shall I write over your |FLAG| File "QUES","XPF1","B") YES "QUES","XPF1","M") D XPF1^XPDIQ "QUES","XPF2",0) Y "QUES","XPF2","??") ^D DTA^XPDH "QUES","XPF2","A") Want my data |FLAG| yours "QUES","XPF2","B") YES "QUES","XPF2","M") D XPF2^XPDIQ "QUES","XPI1",0) YO "QUES","XPI1","??") ^D INHIBIT^XPDH "QUES","XPI1","A") Want KIDS to INHIBIT LOGONs during the install "QUES","XPI1","B") NO "QUES","XPI1","M") D XPI1^XPDIQ "QUES","XPM1",0) PO^VA(200,:EM "QUES","XPM1","??") ^D MG^XPDH "QUES","XPM1","A") Enter the Coordinator for Mail Group '|FLAG|' "QUES","XPM1","B") "QUES","XPM1","M") D XPM1^XPDIQ "QUES","XPO1",0) Y "QUES","XPO1","??") ^D MENU^XPDH "QUES","XPO1","A") Want KIDS to Rebuild Menu Trees Upon Completion of Install "QUES","XPO1","B") NO "QUES","XPO1","M") D XPO1^XPDIQ "QUES","XPZ1",0) Y "QUES","XPZ1","??") ^D OPT^XPDH "QUES","XPZ1","A") Want to DISABLE Scheduled Options, Menu Options, and Protocols "QUES","XPZ1","B") NO "QUES","XPZ1","M") D XPZ1^XPDIQ "QUES","XPZ2",0) Y "QUES","XPZ2","??") ^D RTN^XPDH "QUES","XPZ2","A") Want to MOVE routines to other CPUs "QUES","XPZ2","B") NO "QUES","XPZ2","M") D XPZ2^XPDIQ "RTN") 2 "RTN","SAMIHOM4") 0^8^B977083192 "RTN","SAMIHOM4",1,0) SAMIHOM4 ;ven/gpl,arc - homepage web services ;;2022-01-12t21:45z "RTN","SAMIHOM4",2,0) ;;18.0;SAMI;**1,4,5,6,9,12,15,16**;2020-01;Build 6 "RTN","SAMIHOM4",3,0) ;18-15 "RTN","SAMIHOM4",4,0) ; "RTN","SAMIHOM4",5,0) ; SAMIHOM4 contains web services & other subroutines for producing "RTN","SAMIHOM4",6,0) ; the ELCAP Home Page. "RTN","SAMIHOM4",7,0) ; "RTN","SAMIHOM4",8,0) quit ; no entry from top "RTN","SAMIHOM4",9,0) ; "RTN","SAMIHOM4",10,0) ; "RTN","SAMIHOM4",11,0) ; "RTN","SAMIHOM4",12,0) ;@section 0 primary development "RTN","SAMIHOM4",13,0) ; "RTN","SAMIHOM4",14,0) ; "RTN","SAMIHOM4",15,0) ; "RTN","SAMIHOM4",16,0) ;@license see routine SAMIUL "RTN","SAMIHOM4",17,0) ;@documentation see SAMIHUL "RTN","SAMIHOM4",18,0) ;@contents "RTN","SAMIHOM4",19,0) ; "RTN","SAMIHOM4",20,0) ; web service get vapals & related subroutines "RTN","SAMIHOM4",21,0) ; "RTN","SAMIHOM4",22,0) ; WSHOME code for wsi WSHOME^SAMIHOM3 "RTN","SAMIHOM4",23,0) ; get vapals (vapals-elcap homepage) "RTN","SAMIHOM4",24,0) ; DEVHOME code for wpi DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",25,0) ; development home page "RTN","SAMIHOM4",26,0) ; GETHOME code for wpi GETHOME^SAMIHOM3 "RTN","SAMIHOM4",27,0) ; get homepage (not subsequent visit) "RTN","SAMIHOM4",28,0) ; "RTN","SAMIHOM4",29,0) ; web service post vapals & related subroutines "RTN","SAMIHOM4",30,0) ; "RTN","SAMIHOM4",31,0) ; WSVAPALS code for wsi WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",32,0) ; post vapals (main gateway) "RTN","SAMIHOM4",33,0) ; "RTN","SAMIHOM4",34,0) ; other "RTN","SAMIHOM4",35,0) ; "RTN","SAMIHOM4",36,0) ; REG manual registration "RTN","SAMIHOM4",37,0) ; MKPTLK creates patient-lookup record "RTN","SAMIHOM4",38,0) ; UPDTFRMS update demographics in all forms for patient "RTN","SAMIHOM4",39,0) ; MERGE merge participant records "RTN","SAMIHOM4",40,0) ; ADDUNMAT adds unmatched report web service to system "RTN","SAMIHOM4",41,0) ; DELUNMAT deletes unmatched web service "RTN","SAMIHOM4",42,0) ; WSUNMAT navigates to unmatched report "RTN","SAMIHOM4",43,0) ; $$DUPSSN true if duplicate ssn "RTN","SAMIHOM4",44,0) ; $$DUPICN true if duplicate icn "RTN","SAMIHOM4",45,0) ; $$BADICN true if ICN checkdigits are wrong "RTN","SAMIHOM4",46,0) ; SAVE save patient-lookup record after edit "RTN","SAMIHOM4",47,0) ; $$REMATCH possible match ien "RTN","SAMIHOM4",48,0) ; SETINFO set information message text "RTN","SAMIHOM4",49,0) ; SETWARN set warning message text "RTN","SAMIHOM4",50,0) ; RTNERR redisplay page w/error message "RTN","SAMIHOM4",51,0) ; RTNPAGE display page "RTN","SAMIHOM4",52,0) ; REINDXPL reindex patient lookup "RTN","SAMIHOM4",53,0) ; INDXPTLK generate index entries in patient-lookup graph "RTN","SAMIHOM4",54,0) ; UNINDXPT remove index entries from patient-lookup graph "RTN","SAMIHOM4",55,0) ; $$UCASE uppercase "RTN","SAMIHOM4",56,0) ; WSNEWCAS code for wr newcase (creates new case) "RTN","SAMIHOM4",57,0) ; "RTN","SAMIHOM4",58,0) ;@to-do "RTN","SAMIHOM4",59,0) ; Add label comments "RTN","SAMIHOM4",60,0) ; "RTN","SAMIHOM4",61,0) ; "RTN","SAMIHOM4",62,0) ; "RTN","SAMIHOM4",63,0) ;@section 1 web service get vapals & related subroutines "RTN","SAMIHOM4",64,0) ; "RTN","SAMIHOM4",65,0) ; "RTN","SAMIHOM4",66,0) ; "RTN","SAMIHOM4",67,0) ;@wsi-code WSHOME^SAMIHOM3 "RTN","SAMIHOM4",68,0) WSHOME ; get vapals (vapals-elcap homepage) "RTN","SAMIHOM4",69,0) ; "RTN","SAMIHOM4",70,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",71,0) ; "RTN","SAMIHOM4",72,0) ;ven/gpl;wsi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",73,0) ;@signature "RTN","SAMIHOM4",74,0) ; do WSHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) "RTN","SAMIHOM4",75,0) ;@branches-from "RTN","SAMIHOM4",76,0) ; WSHOME^SAMIHOM3 "RTN","SAMIHOM4",77,0) ;@wsi-called-by "RTN","SAMIHOM4",78,0) ; web service get vapals "RTN","SAMIHOM4",79,0) ; WSVAPALS^SAMIHOM4 "RTN","SAMIHOM4",80,0) ; LOGIN^SAMISITE "RTN","SAMIHOM4",81,0) ;@called-by none "RTN","SAMIHOM4",82,0) ;@calls "RTN","SAMIHOM4",83,0) ; DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",84,0) ; WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",85,0) ; GETHOME^SAMIHOM3 "RTN","SAMIHOM4",86,0) ;@input "RTN","SAMIHOM4",87,0) ; SAMIFILTER (no parameters required) "RTN","SAMIHOM4",88,0) ;@output "RTN","SAMIHOM4",89,0) ; .SAMIRTN "RTN","SAMIHOM4",90,0) ;@examples [tbd] "RTN","SAMIHOM4",91,0) ;@tests "RTN","SAMIHOM4",92,0) ; UTWSHM^SAMIUTH3 "RTN","SAMIHOM4",93,0) ; UTWSHM1^SAMIUTH3 "RTN","SAMIHOM4",94,0) ; UTWSHM2^SAMIUTH3 "RTN","SAMIHOM4",95,0) ; "RTN","SAMIHOM4",96,0) ; "RTN","SAMIHOM4",97,0) ;@stanza 2 route to appropriate homepage or bypass to other webpage "RTN","SAMIHOM4",98,0) ; "RTN","SAMIHOM4",99,0) ; present development homepage for testing "RTN","SAMIHOM4",100,0) if $get(SAMIFILTER("test"))=1 do quit "RTN","SAMIHOM4",101,0) . do DEVHOME^SAMIHOM3(.SAMIRTN,.SAMIFILTER) "RTN","SAMIHOM4",102,0) . quit "RTN","SAMIHOM4",103,0) ; "RTN","SAMIHOM4",104,0) ; bypass for get access to pages "RTN","SAMIHOM4",105,0) if $g(SAMIFILTER("samiroute"))'="" do quit "RTN","SAMIHOM4",106,0) . new SAMIBODY set SAMIBODY(1)="" "RTN","SAMIHOM4",107,0) . do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIBODY,.SAMIRTN) "RTN","SAMIHOM4",108,0) . quit "RTN","SAMIHOM4",109,0) ; "RTN","SAMIHOM4",110,0) ; V4W/DLW - bypass for get access from CPRS "RTN","SAMIHOM4",111,0) if $get(SAMIFILTER("dfn"))'="" do quit "RTN","SAMIHOM4",112,0) . new dfn set dfn=$get(SAMIFILTER("dfn")) "RTN","SAMIHOM4",113,0) . new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",114,0) . new studyid set studyid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIHOM4",115,0) . new SAMIBODY "RTN","SAMIHOM4",116,0) . if studyid'="" do "RTN","SAMIHOM4",117,0) . . set SAMIBODY(1)="samiroute=casereview&dfn="_dfn_"&studyid="_studyid "RTN","SAMIHOM4",118,0) . . quit "RTN","SAMIHOM4",119,0) . else do "RTN","SAMIHOM4",120,0) . . set SAMIBODY(1)="samiroute=lookup&dfn="_dfn_"&studyid="_studyid "RTN","SAMIHOM4",121,0) . . quit "RTN","SAMIHOM4",122,0) . do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIBODY,.SAMIRTN) "RTN","SAMIHOM4",123,0) . quit "RTN","SAMIHOM4",124,0) ; "RTN","SAMIHOM4",125,0) ; default to VAPALS homepage "RTN","SAMIHOM4",126,0) do GETHOME^SAMIHOM3(.SAMIRTN,.SAMIFILTER) "RTN","SAMIHOM4",127,0) ; "RTN","SAMIHOM4",128,0) ; "RTN","SAMIHOM4",129,0) ;@stanza 3 termination "RTN","SAMIHOM4",130,0) ; "RTN","SAMIHOM4",131,0) quit ; end of wsi WSHOME^SAMIHOM3 "RTN","SAMIHOM4",132,0) ; "RTN","SAMIHOM4",133,0) ; "RTN","SAMIHOM4",134,0) ; "RTN","SAMIHOM4",135,0) ;@wpi-code DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",136,0) DEVHOME ; development home page "RTN","SAMIHOM4",137,0) ; "RTN","SAMIHOM4",138,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",139,0) ; "RTN","SAMIHOM4",140,0) ;ven/gpl;wpi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",141,0) ;@signature "RTN","SAMIHOM4",142,0) ; do DEVHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) "RTN","SAMIHOM4",143,0) ;@branches-from "RTN","SAMIHOM4",144,0) ; DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",145,0) ;@wpi-called-by "RTN","SAMIHOM4",146,0) ; wsi WSHOME^SAMIHOM3 [web service get vapals] "RTN","SAMIHOM4",147,0) ;@called-by none "RTN","SAMIHOM4",148,0) ;@calls "RTN","SAMIHOM4",149,0) ; htmltb2^%yottaweb "RTN","SAMIHOM4",150,0) ; PATLIST^SAMIHOM3 "RTN","SAMIHOM4",151,0) ; genhtml^%yottautl "RTN","SAMIHOM4",152,0) ; addary^%yottautl "RTN","SAMIHOM4",153,0) ;@input "RTN","SAMIHOM4",154,0) ; SAMIFILTER = "RTN","SAMIHOM4",155,0) ;@output "RTN","SAMIHOM4",156,0) ;.SAMIRTN = "RTN","SAMIHOM4",157,0) ;@examples [tbd] "RTN","SAMIHOM4",158,0) ;@tests [tbd] "RTN","SAMIHOM4",159,0) ; "RTN","SAMIHOM4",160,0) ; "RTN","SAMIHOM4",161,0) ;@stanza 2 present development homepage "RTN","SAMIHOM4",162,0) ; "RTN","SAMIHOM4",163,0) new gtop,gbot "RTN","SAMIHOM4",164,0) do htmltb2^%yottaweb(.gtop,.gbot,"SAMI Test Patients") "RTN","SAMIHOM4",165,0) ; "RTN","SAMIHOM4",166,0) new html,ary,hpat "RTN","SAMIHOM4",167,0) do PATLIST^SAMIHOM3("hpat") "RTN","SAMIHOM4",168,0) quit:'$data(hpat) "RTN","SAMIHOM4",169,0) ; "RTN","SAMIHOM4",170,0) set ary("title")="SAMI Test Patients on this system" "RTN","SAMIHOM4",171,0) set ary("header",1)="StudyId" "RTN","SAMIHOM4",172,0) set ary("header",2)="Name" "RTN","SAMIHOM4",173,0) ; "RTN","SAMIHOM4",174,0) new cnt set cnt=0 "RTN","SAMIHOM4",175,0) new zi set zi="" "RTN","SAMIHOM4",176,0) for do quit:zi="" "RTN","SAMIHOM4",177,0) . set zi=$order(hpat(zi)) "RTN","SAMIHOM4",178,0) . quit:zi="" "RTN","SAMIHOM4",179,0) . ; "RTN","SAMIHOM4",180,0) . set cnt=cnt+1 "RTN","SAMIHOM4",181,0) . new url set url="<a href=""/cform.cgi?studyId="_zi_""">"_zi_"</a>" "RTN","SAMIHOM4",182,0) . set ary(cnt,1)=url "RTN","SAMIHOM4",183,0) . set ary(cnt,2)="" "RTN","SAMIHOM4",184,0) . quit "RTN","SAMIHOM4",185,0) ; "RTN","SAMIHOM4",186,0) do genhtml^%yottautl("html","ary") "RTN","SAMIHOM4",187,0) ; "RTN","SAMIHOM4",188,0) do addary^%yottautl("SAMIRTN","gtop") "RTN","SAMIHOM4",189,0) do addary^%yottautl("SAMIRTN","html") "RTN","SAMIHOM4",190,0) set SAMIRTN($order(SAMIRTN(""),-1)+1)=gbot "RTN","SAMIHOM4",191,0) kill SAMIRTN(0) "RTN","SAMIHOM4",192,0) ; "RTN","SAMIHOM4",193,0) set HTTPRSP("mime")="text/html" "RTN","SAMIHOM4",194,0) ; "RTN","SAMIHOM4",195,0) ; "RTN","SAMIHOM4",196,0) ;@stanza 3 termination "RTN","SAMIHOM4",197,0) ; "RTN","SAMIHOM4",198,0) quit ; end of wpi DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",199,0) ; "RTN","SAMIHOM4",200,0) ; "RTN","SAMIHOM4",201,0) ; "RTN","SAMIHOM4",202,0) ;@wpi-code GETHOME^SAMIHOM3 "RTN","SAMIHOM4",203,0) GETHOME ; get homepage (not subsequent visit) "RTN","SAMIHOM4",204,0) ; "RTN","SAMIHOM4",205,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",206,0) ; "RTN","SAMIHOM4",207,0) ;ven/gpl;wpi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",208,0) ;@signature "RTN","SAMIHOM4",209,0) ; do GETHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) "RTN","SAMIHOM4",210,0) ;@branches-from "RTN","SAMIHOM4",211,0) ; GETHOME^SAMIHOM3 "RTN","SAMIHOM4",212,0) ;@wpi-called-by "RTN","SAMIHOM4",213,0) ; WSHOME "RTN","SAMIHOM4",214,0) ; WSVAPALS "RTN","SAMIHOM4",215,0) ; SAVE "RTN","SAMIHOM4",216,0) ; WSNEWCAS [commented out] "RTN","SAMIHOM4",217,0) ; WSNFPOST^SAMICAS3 "RTN","SAMIHOM4",218,0) ; WSLOOKUP^SAMISRC2 "RTN","SAMIHOM4",219,0) ; WSREPORT^SAMIUR "RTN","SAMIHOM4",220,0) ; WSREPORT^SAMIUR1 "RTN","SAMIHOM4",221,0) ;@called-by none "RTN","SAMIHOM4",222,0) ;@calls "RTN","SAMIHOM4",223,0) ; $$FINDSITE^SAMISITE "RTN","SAMIHOM4",224,0) ; GETTMPL^SAMICASE "RTN","SAMIHOM4",225,0) ; MERGEHTM^%wf "RTN","SAMIHOM4",226,0) ; ADDCRLF^VPRJRUT "RTN","SAMIHOM4",227,0) ;@input "RTN","SAMIHOM4",228,0) ; SAMIFILTER "RTN","SAMIHOM4",229,0) ;@output "RTN","SAMIHOM4",230,0) ; .SAMIRTN "RTN","SAMIHOM4",231,0) ;@examples [tbd] "RTN","SAMIHOM4",232,0) ;@tests "RTN","SAMIHOM4",233,0) ; UTGETHM^SAMIUTH3 "RTN","SAMIHOM4",234,0) ; UTSCAN4^SAMIUTH3 "RTN","SAMIHOM4",235,0) ; "RTN","SAMIHOM4",236,0) ; "RTN","SAMIHOM4",237,0) ;@stanza 2 get template for homepage "RTN","SAMIHOM4",238,0) ; "RTN","SAMIHOM4",239,0) ; Processing for multi-tenancy "RTN","SAMIHOM4",240,0) ; "RTN","SAMIHOM4",241,0) i $g(HTTPREQ("method"))="GET" d ; "RTN","SAMIHOM4",242,0) . s SAMIFILTER("siteid")="" "RTN","SAMIHOM4",243,0) ; "RTN","SAMIHOM4",244,0) if $get(SAMIFILTER("siteid"))="" if '$$FINDSITE^SAMISITE(.SAMIRTN,.SAMIFILTER) quit 0 "RTN","SAMIHOM4",245,0) new SAMISITE,SAMITITL "RTN","SAMIHOM4",246,0) set SAMISITE=$get(SAMIFILTER("siteid")) "RTN","SAMIHOM4",247,0) set SAMITITL=$get(SAMIFILTER("sitetitle")) "RTN","SAMIHOM4",248,0) ; "RTN","SAMIHOM4",249,0) new VASITE set VASITE=$$GET1PARM^SAMIPARM("veteransAffairsSite",SAMISITE) "RTN","SAMIHOM4",250,0) set SAMIFILTER("veteransAffairsSite")=VASITE "RTN","SAMIHOM4",251,0) ; "RTN","SAMIHOM4",252,0) new temp,tout,form "RTN","SAMIHOM4",253,0) set form="vapals:home" "RTN","SAMIHOM4",254,0) do GETTMPL^SAMICASE("temp",form) "RTN","SAMIHOM4",255,0) quit:'$data(temp) "RTN","SAMIHOM4",256,0) ; "RTN","SAMIHOM4",257,0) ; "RTN","SAMIHOM4",258,0) ;@stanza 3 process homepage template "RTN","SAMIHOM4",259,0) ; "RTN","SAMIHOM4",260,0) new err "RTN","SAMIHOM4",261,0) do MERGEHTM^%wf(.temp,.SAMIFILTER,.err) "RTN","SAMIHOM4",262,0) ; "RTN","SAMIHOM4",263,0) do ADDCRLF^VPRJRUT(.temp) "RTN","SAMIHOM4",264,0) merge SAMIRTN=temp "RTN","SAMIHOM4",265,0) ; "RTN","SAMIHOM4",266,0) ; "RTN","SAMIHOM4",267,0) ;@stanza 4 termination "RTN","SAMIHOM4",268,0) ; "RTN","SAMIHOM4",269,0) quit ; end of wpi GETHOME^SAMIHOM3 "RTN","SAMIHOM4",270,0) ; "RTN","SAMIHOM4",271,0) ; "RTN","SAMIHOM4",272,0) ; "RTN","SAMIHOM4",273,0) ; below is redacted from GETHOME^SAMIHOM3 "RTN","SAMIHOM4",274,0) ; "RTN","SAMIHOM4",275,0) ;@old-calls "RTN","SAMIHOM4",276,0) ; FIXHREF^SAMIFORM "RTN","SAMIHOM4",277,0) ; FIXSRC^SAMIFORM "RTN","SAMIHOM4",278,0) ; $$GET^XPAR "RTN","SAMIHOM4",279,0) ; findReplace^%ts "RTN","SAMIHOM4",280,0) ; ADDCRLF^VPRJRUT "RTN","SAMIHOM4",281,0) ; "RTN","SAMIHOM4",282,0) new cnt set cnt=0 "RTN","SAMIHOM4",283,0) new zi set zi=0 "RTN","SAMIHOM4",284,0) for set zi=$order(temp(zi)) quit:+zi=0 do ; "RTN","SAMIHOM4",285,0) . ; "RTN","SAMIHOM4",286,0) . n ln s ln=temp(zi) "RTN","SAMIHOM4",287,0) . n touched s touched=0 "RTN","SAMIHOM4",288,0) . ; "RTN","SAMIHOM4",289,0) . i ln["href" i 'touched d ; "RTN","SAMIHOM4",290,0) . . d FIXHREF^SAMIFORM(.ln) "RTN","SAMIHOM4",291,0) . . s temp(zi)=ln "RTN","SAMIHOM4",292,0) . ; "RTN","SAMIHOM4",293,0) . i ln["src" d ; "RTN","SAMIHOM4",294,0) . . d FIXSRC^SAMIFORM(.ln) "RTN","SAMIHOM4",295,0) . . s temp(zi)=ln "RTN","SAMIHOM4",296,0) . ; "RTN","SAMIHOM4",297,0) . i ln["id" i ln["studyIdMenu" d ; "RTN","SAMIHOM4",298,0) . . s zi=zi+4 "RTN","SAMIHOM4",299,0) . ; "RTN","SAMIHOM4",300,0) . if ln["@@MANUALREGISTRATION@@" do ; turn off manual registration "RTN","SAMIHOM4",301,0) . . n setman,setparm "RTN","SAMIHOM4",302,0) . . s setman="true" "RTN","SAMIHOM4",303,0) . . s setparm=$$GET^XPAR("SYS","SAMI ALLOW MANUAL ENTRY",,"Q") "RTN","SAMIHOM4",304,0) . . i setparm=0 s setman="false" "RTN","SAMIHOM4",305,0) . . do findReplace^%ts(.ln,"@@MANUALREGISTRATION@@",setman) "RTN","SAMIHOM4",306,0) . . s temp(zi)=ln "RTN","SAMIHOM4",307,0) . . quit "RTN","SAMIHOM4",308,0) . set cnt=cnt+1 "RTN","SAMIHOM4",309,0) . set tout(cnt)=temp(zi) "RTN","SAMIHOM4",310,0) . quit "RTN","SAMIHOM4",311,0) ; "RTN","SAMIHOM4",312,0) ; "RTN","SAMIHOM4",313,0) ;@old-stanza 4 add cr/lf & save to return array "RTN","SAMIHOM4",314,0) ; "RTN","SAMIHOM4",315,0) do ADDCRLF^VPRJRUT(.tout) "RTN","SAMIHOM4",316,0) merge SAMIRTN=tout "RTN","SAMIHOM4",317,0) ; "RTN","SAMIHOM4",318,0) ; "RTN","SAMIHOM4",319,0) ;@old-stanza 5 termination "RTN","SAMIHOM4",320,0) ; "RTN","SAMIHOM4",321,0) quit ; old end of wpi GETHOME^SAMIHOM3 "RTN","SAMIHOM4",322,0) ; "RTN","SAMIHOM4",323,0) ; "RTN","SAMIHOM4",324,0) ; "RTN","SAMIHOM4",325,0) ;@section 2 web service post vapals & related subroutines "RTN","SAMIHOM4",326,0) ; "RTN","SAMIHOM4",327,0) ; "RTN","SAMIHOM4",328,0) ; "RTN","SAMIHOM4",329,0) ;@wsi-code WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",330,0) WSVAPALS ; post vapals (main gateway) "RTN","SAMIHOM4",331,0) ; "RTN","SAMIHOM4",332,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",333,0) ; "RTN","SAMIHOM4",334,0) ;ven/gpl;wsi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",335,0) ;@signature "RTN","SAMIHOM4",336,0) ; do WSVAPALS^SAMIHOM3(SAMIARG,SAMIBODY,SAMIRESULT) "RTN","SAMIHOM4",337,0) ;@branches-from "RTN","SAMIHOM4",338,0) ; WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",339,0) ;@wsi-called-by "RTN","SAMIHOM4",340,0) ;@called-by "RTN","SAMIHOM4",341,0) ;@calls "RTN","SAMIHOM4",342,0) ;@input [tbd] "RTN","SAMIHOM4",343,0) ;@output [tbd] "RTN","SAMIHOM4",344,0) ;@examples [tbd] "RTN","SAMIHOM4",345,0) ;@tests [tbd] "RTN","SAMIHOM4",346,0) ; "RTN","SAMIHOM4",347,0) ; all calls come through this gateway "RTN","SAMIHOM4",348,0) ; "RTN","SAMIHOM4",349,0) k ^SAMIUL("vapals") "RTN","SAMIHOM4",350,0) m ^SAMIUL("vapals")=SAMIARG "RTN","SAMIHOM4",351,0) m ^SAMIUL("vapals","BODY")=SAMIBODY "RTN","SAMIHOM4",352,0) ; "RTN","SAMIHOM4",353,0) new vars,SAMIBDY "RTN","SAMIHOM4",354,0) set SAMIBDY=$get(SAMIBODY(1)) "RTN","SAMIHOM4",355,0) do parseBody^%wf("vars",.SAMIBDY) "RTN","SAMIHOM4",356,0) m vars=SAMIARG "RTN","SAMIHOM4",357,0) i $g(vars("siteid"))'="" d ; "RTN","SAMIHOM4",358,0) . i $g(vars("site"))'=$g(vars("siteid")) s vars("site")=$g(vars("siteid")) "RTN","SAMIHOM4",359,0) i $g(vars("site"))="SYS" s vars("site")="" "RTN","SAMIHOM4",360,0) i $g(HTTPREQ("method"))="GET" d ; "RTN","SAMIHOM4",361,0) . s vars("site")="" "RTN","SAMIHOM4",362,0) m SAMIARG=vars "RTN","SAMIHOM4",363,0) m SAMIARG=SAMIBODY "RTN","SAMIHOM4",364,0) ;D ^ZTER "RTN","SAMIHOM4",365,0) ; "RTN","SAMIHOM4",366,0) ; Processing for multi-tenancy "RTN","SAMIHOM4",367,0) ; "RTN","SAMIHOM4",368,0) if '$d(vars("siteid")) d ; "RTN","SAMIHOM4",369,0) . if $g(vars("studyid"))="" q "RTN","SAMIHOM4",370,0) . n sym s sym=$e(vars("studyid"),1,3) ; first 3 chars in studyid "RTN","SAMIHOM4",371,0) . i $$SITENM2^SAMISITE(sym)=-1 q "RTN","SAMIHOM4",372,0) . s vars("siteid")=sym "RTN","SAMIHOM4",373,0) . s vars("site")=sym "RTN","SAMIHOM4",374,0) ; "RTN","SAMIHOM4",375,0) if $G(vars("site"))'="" d ; "RTN","SAMIHOM4",376,0) . n siteid s siteid=vars("site") "RTN","SAMIHOM4",377,0) . s SAMIARG("siteid")=siteid "RTN","SAMIHOM4",378,0) . s SAMIARG("sitetitle")=$$SITENM2^SAMISITE(siteid)_" - "_siteid "RTN","SAMIHOM4",379,0) k ^gpl("siteselect") "RTN","SAMIHOM4",380,0) m ^gpl("siteselect")=SAMIARG "RTN","SAMIHOM4",381,0) m ^gpl("siteselect","vars")=vars "RTN","SAMIHOM4",382,0) if $G(SAMIARG("siteid"))="" if '$$FINDSITE^SAMISITE(.SAMIRESULT,.SAMIARG) Q 0 "RTN","SAMIHOM4",383,0) new SAMISITE,SAMITITL "RTN","SAMIHOM4",384,0) s SAMISITE=$G(SAMIARG("siteid")) "RTN","SAMIHOM4",385,0) i $G(SAMIARG("sitetitle"))="" d ; "RTN","SAMIHOM4",386,0) . s SAMIARG("sitetitle")=$$SITENM2^SAMISITE(SAMISITE)_" - "_SAMISITE "RTN","SAMIHOM4",387,0) s SAMITITL=$G(SAMIARG("sitetitle")) "RTN","SAMIHOM4",388,0) m vars=SAMIARG "RTN","SAMIHOM4",389,0) ; "RTN","SAMIHOM4",390,0) k ^SAMIUL("vapals","vars") "RTN","SAMIHOM4",391,0) merge ^SAMIUL("vapals","vars")=vars "RTN","SAMIHOM4",392,0) merge ^SAMIUL("vapals","vars")=SAMIBODY "RTN","SAMIHOM4",393,0) ; "RTN","SAMIHOM4",394,0) n route s route=$g(vars("samiroute")) "RTN","SAMIHOM4",395,0) ;i route="" d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",396,0) i route="" d q 0 "RTN","SAMIHOM4",397,0) . n vals "RTN","SAMIHOM4",398,0) . s vals("siteid")="" "RTN","SAMIHOM4",399,0) . s vals("sitetitle")="Unknown Site" "RTN","SAMIHOM4",400,0) . s vals("errorMessage")="" "RTN","SAMIHOM4",401,0) . d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:login",.vals) "RTN","SAMIHOM4",402,0) ; "RTN","SAMIHOM4",403,0) i route="lookup" d q 0 "RTN","SAMIHOM4",404,0) . m SAMIARG=vars "RTN","SAMIHOM4",405,0) . d WSLOOKUP^SAMISRC2(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",406,0) ; "RTN","SAMIHOM4",407,0) i route="login" d q 0 "RTN","SAMIHOM4",408,0) . m SAMIARG=vars "RTN","SAMIHOM4",409,0) . d LOGIN^SAMISITE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",410,0) ; "RTN","SAMIHOM4",411,0) i route="home" d q 0 "RTN","SAMIHOM4",412,0) . k ^gpl("home") "RTN","SAMIHOM4",413,0) . m ^gpl("home")=SAMIARG "RTN","SAMIHOM4",414,0) . s SAMIARG("samiroute")="" "RTN","SAMIHOM4",415,0) . d WSHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",416,0) ; "RTN","SAMIHOM4",417,0) i route="logout" d q 0 "RTN","SAMIHOM4",418,0) . ;s SAMIARG("samiroute")="home" "RTN","SAMIHOM4",419,0) . ;do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIARG,.SAMIRESULT) "RTN","SAMIHOM4",420,0) . ;Q "RTN","SAMIHOM4",421,0) . s SAMIARG("sitetitle")="Unknown Site" "RTN","SAMIHOM4",422,0) . s SAMIARG("siteid")="" "RTN","SAMIHOM4",423,0) . s SAMIARG("errorMessage")="" "RTN","SAMIHOM4",424,0) . d RTNERR^SAMIHOM4(.SAMIRESULT,"vapals:login",.SAMIARG) "RTN","SAMIHOM4",425,0) ; "RTN","SAMIHOM4",426,0) i route="newcase" d q 0 "RTN","SAMIHOM4",427,0) . m SAMIARG=vars "RTN","SAMIHOM4",428,0) . d WSNEWCAS^SAMIHOM3(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",429,0) ; "RTN","SAMIHOM4",430,0) i route="casereview" d q 0 "RTN","SAMIHOM4",431,0) . m SAMIARG=vars "RTN","SAMIHOM4",432,0) . d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",433,0) ; "RTN","SAMIHOM4",434,0) i route="nuform" d q 0 "RTN","SAMIHOM4",435,0) . m SAMIARG=vars "RTN","SAMIHOM4",436,0) . d WSNUFORM^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",437,0) ; "RTN","SAMIHOM4",438,0) i route="addform" d q 0 "RTN","SAMIHOM4",439,0) . m SAMIARG=vars "RTN","SAMIHOM4",440,0) . d WSNFPOST^SAMICASE(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",441,0) ; "RTN","SAMIHOM4",442,0) i route="form" d q 0 "RTN","SAMIHOM4",443,0) . m SAMIARG=vars "RTN","SAMIHOM4",444,0) . d wsGetForm^%wf(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",445,0) ; "RTN","SAMIHOM4",446,0) i route="postform" d q 0 "RTN","SAMIHOM4",447,0) . m SAMIARG=vars "RTN","SAMIHOM4",448,0) . d wsPostForm^%wf(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",449,0) . i $g(SAMIARG("form"))["siform" d ; "RTN","SAMIHOM4",450,0) . . n notr s notr=0 ; note return 0 if failure, 1 or greater if success "RTN","SAMIHOM4",451,0) . . ; returns the ien of the note that was created and should be sent "RTN","SAMIHOM4",452,0) . . s notr=$$NOTE^SAMINOT1(.SAMIARG) "RTN","SAMIHOM4",453,0) . . if +notr>0 d ; "RTN","SAMIHOM4",454,0) . . . n SAMIFILTER "RTN","SAMIHOM4",455,0) . . . s SAMIFILTER("sid")=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",456,0) . . . s SAMIFILTER("key")=$g(SAMIARG("form")) ; "RTN","SAMIHOM4",457,0) . . . n tiuien "RTN","SAMIHOM4",458,0) . . . s tiuien=+notr "RTN","SAMIHOM4",459,0) . . . s SAMIFILTER("notenmbr")=tiuien "RTN","SAMIHOM4",460,0) . . . n sendrslt "RTN","SAMIHOM4",461,0) . . . ;s sendrslt="1^MSG9239010" "RTN","SAMIHOM4",462,0) . . . s SAMIFILTER("sendprotocol")=SAMISITE_" ENROLL ORU EVN" "RTN","SAMIHOM4",463,0) . . . s sendrslt=$$EN^SAMIORU(.SAMIFILTER) ; send the note to VistA "RTN","SAMIHOM4",464,0) . . . i +sendrslt>0 d ; success "RTN","SAMIHOM4",465,0) . . . . n rtnid s rtnid=$p(sendrslt,"^",2) ; return id from HL7 "RTN","SAMIHOM4",466,0) . . . . ; post the id to the graph here "RTN","SAMIHOM4",467,0) . . . . n sid s sid=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",468,0) . . . . n form s form=$G(SAMIARG("form")) "RTN","SAMIHOM4",469,0) . . . . n nien s nien=$$NTIEN^SAMINOT1(sid,form) ; latest note ien "RTN","SAMIHOM4",470,0) . . . . n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",471,0) . . . . s @root@("graph",sid,form,"notes",nien,"hl7id")=rtnid "RTN","SAMIHOM4",472,0) . . . . s SAMIARG("errorMessage")="Note successfully sent to VistA ID: "_rtnid "RTN","SAMIHOM4",473,0) . . . else d ; "RTN","SAMIHOM4",474,0) . . . . n rtnmsg s rtnmsg=$p(sendrslt,"^",2) "RTN","SAMIHOM4",475,0) . . . . s SAMIARG("errorMessage")=rtnmsg "RTN","SAMIHOM4",476,0) . . . d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",477,0) . i $g(SAMIARG("form"))["fuform" d ; "RTN","SAMIHOM4",478,0) . . n notr s notr=0 ; note return 0 if failure, 1 or greater if success "RTN","SAMIHOM4",479,0) . . ; returns the ien of the note that was created and should be sent "RTN","SAMIHOM4",480,0) . . s notr=$$NOTE^SAMINOT2(.SAMIARG) "RTN","SAMIHOM4",481,0) . . if +notr>0 d ; "RTN","SAMIHOM4",482,0) . . . n SAMIFILTER "RTN","SAMIHOM4",483,0) . . . s SAMIFILTER("sid")=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",484,0) . . . s SAMIFILTER("key")=$g(SAMIARG("form")) ; "RTN","SAMIHOM4",485,0) . . . n tiuien "RTN","SAMIHOM4",486,0) . . . s tiuien=+notr "RTN","SAMIHOM4",487,0) . . . s SAMIFILTER("notenmbr")=tiuien "RTN","SAMIHOM4",488,0) . . . n sendrslt "RTN","SAMIHOM4",489,0) . . . ;s sendrslt="0^Missing ORM Message" "RTN","SAMIHOM4",490,0) . . . s SAMIFILTER("sendprotocol")=SAMISITE_" ENROLL ORU EVN" "RTN","SAMIHOM4",491,0) . . . s sendrslt=$$EN^SAMIORU(.SAMIFILTER) ; send the note to VistA "RTN","SAMIHOM4",492,0) . . . i +sendrslt>0 d ; success "RTN","SAMIHOM4",493,0) . . . . n rtnid s rtnid=$p(sendrslt,"^",2) ; return id from HL7 "RTN","SAMIHOM4",494,0) . . . . ; post the id to the graph here "RTN","SAMIHOM4",495,0) . . . . n sid s sid=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",496,0) . . . . n form s form=$G(SAMIARG("form")) "RTN","SAMIHOM4",497,0) . . . . n nien s nien=$$NTIEN^SAMINOT1(sid,form) ; latest note ien "RTN","SAMIHOM4",498,0) . . . . n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",499,0) . . . . s @root@("graph",sid,form,"notes",nien,"hl7id")=rtnid "RTN","SAMIHOM4",500,0) . . . . s SAMIARG("errorMessage")="Note successfully sent to VistA ID: "_rtnid "RTN","SAMIHOM4",501,0) . . . else d ; "RTN","SAMIHOM4",502,0) . . . . n rtnmsg s rtnmsg=$p(sendrslt,"^",2) "RTN","SAMIHOM4",503,0) . . . . i $g(SAMIARG("errorMessage"))="" d ; "RTN","SAMIHOM4",504,0) . . . . . s SAMIARG("errorMessage")=rtnmsg "RTN","SAMIHOM4",505,0) . . . d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",506,0) . . e d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",507,0) . e d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",508,0) ; "RTN","SAMIHOM4",509,0) i route="deleteform" d q 0 "RTN","SAMIHOM4",510,0) . m SAMIARG=vars "RTN","SAMIHOM4",511,0) . d DELFORM^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",512,0) ; "RTN","SAMIHOM4",513,0) i route="ctreport" d q 0 "RTN","SAMIHOM4",514,0) . m SAMIARG=vars "RTN","SAMIHOM4",515,0) . n format s format="html" "RTN","SAMIHOM4",516,0) . s format="text" "RTN","SAMIHOM4",517,0) . i format="text" d WSNOTE^SAMINOT3(.SAMIRESULT,.SAMIARG) q ; "RTN","SAMIHOM4",518,0) . i format="html" d WSREPORT^SAMICTR0(.SAMIRESULT,.SAMIARG) q ; "RTN","SAMIHOM4",519,0) . ;d wsReport^SAMICTRT(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",520,0) ; "RTN","SAMIHOM4",521,0) i route="note" d q 0 "RTN","SAMIHOM4",522,0) . m SAMIARG=vars "RTN","SAMIHOM4",523,0) . d WSNOTE^SAMINOT1(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",524,0) ; "RTN","SAMIHOM4",525,0) i route="report" d q 0 "RTN","SAMIHOM4",526,0) . m SAMIARG=vars "RTN","SAMIHOM4",527,0) . d WSREPORT^SAMIUR(.SAMIRESULT,.vars) "RTN","SAMIHOM4",528,0) ; "RTN","SAMIHOM4",529,0) i route="about" d q 0 "RTN","SAMIHOM4",530,0) . m SAMIARG=vars "RTN","SAMIHOM4",531,0) . n form "RTN","SAMIHOM4",532,0) . s form="vapals:about" "RTN","SAMIHOM4",533,0) . d RTNPAGE^SAMIHOM4(.SAMIRESULT,form,.SAMIARG) q ; "RTN","SAMIHOM4",534,0) ; "RTN","SAMIHOM4",535,0) i route="addperson" d q 0 "RTN","SAMIHOM4",536,0) . m SAMIARG=vars "RTN","SAMIHOM4",537,0) . n form "RTN","SAMIHOM4",538,0) . s form="vapals:addperson" "RTN","SAMIHOM4",539,0) . d RTNPAGE^SAMIHOM4(.SAMIRESULT,form,.SAMIARG) q ; "RTN","SAMIHOM4",540,0) ; "RTN","SAMIHOM4",541,0) i route="editperson" d q 0 "RTN","SAMIHOM4",542,0) . m SAMIARG=vars "RTN","SAMIHOM4",543,0) . n dfn s dfn=$g(vars("dfn")) ; must have a dfn "RTN","SAMIHOM4",544,0) . i dfn="" d q ; "RTN","SAMIHOM4",545,0) . . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",546,0) . n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",547,0) . n sien s sien=$o(@root@("dfn",dfn,"")) "RTN","SAMIHOM4",548,0) . i sien="" d q ; "RTN","SAMIHOM4",549,0) . . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",550,0) . s vars("name")=$g(@root@(sien,"saminame")) "RTN","SAMIHOM4",551,0) . s tdob=$g(@root@(sien,"dob")) "RTN","SAMIHOM4",552,0) . s vars("dob")=$p(tdob,"-",2)_"/"_$p(tdob,"-",3)_"/"_$p(tdob,"-",1) "RTN","SAMIHOM4",553,0) . s vars("sbdob")=$g(@root@(sien,"dob")) "RTN","SAMIHOM4",554,0) . s vars("gender")=$g(@root@(sien,"sex")) "RTN","SAMIHOM4",555,0) . ; s vars("icn")=$g(@root@(sien,"icn")) "RTN","SAMIHOM4",556,0) . n tssn s tssn=$g(@root@(sien,"ssn")) "RTN","SAMIHOM4",557,0) . s vars("ssn")=$e(tssn,1,3)_"-"_$e(tssn,4,5)_"-"_$e(tssn,6,9) "RTN","SAMIHOM4",558,0) . s vars("last5")=$g(@root@(sien,"last5")) "RTN","SAMIHOM4",559,0) . s vars("dfn")=$g(@root@(sien,"dfn")) "RTN","SAMIHOM4",560,0) . m SAMIARG=vars "RTN","SAMIHOM4",561,0) . n form,err,zhtml "RTN","SAMIHOM4",562,0) . s form="vapals:editparticipant" "RTN","SAMIHOM4",563,0) . d RTNPAGE^SAMIHOM4(.SAMIRESULT,form,.SAMIARG) q ; "RTN","SAMIHOM4",564,0) ; "RTN","SAMIHOM4",565,0) i route="register" d q 0 "RTN","SAMIHOM4",566,0) . m SAMIARG=vars "RTN","SAMIHOM4",567,0) . d REG^SAMIHOM4(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",568,0) ; "RTN","SAMIHOM4",569,0) i route="editsave" d q 0 "RTN","SAMIHOM4",570,0) . m SAMIARG=vars "RTN","SAMIHOM4",571,0) . d SAVE^SAMIHOM4(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",572,0) ; "RTN","SAMIHOM4",573,0) i route="merge" d q 0 "RTN","SAMIHOM4",574,0) . m SAMIARG=vars "RTN","SAMIHOM4",575,0) . d MERGE^SAMIHOM4(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",576,0) ; "RTN","SAMIHOM4",577,0) quit 0 ; end of wsi WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",578,0) ; "RTN","SAMIHOM4",579,0) ; "RTN","SAMIHOM4",580,0) ; "RTN","SAMIHOM4",581,0) ;@section 3 other "RTN","SAMIHOM4",582,0) ; "RTN","SAMIHOM4",583,0) ; "RTN","SAMIHOM4",584,0) ; "RTN","SAMIHOM4",585,0) REG(SAMIRTN,SAMIARG) ; manual registration "RTN","SAMIHOM4",586,0) ; "RTN","SAMIHOM4",587,0) n name s name=$g(SAMIARG("name")) "RTN","SAMIHOM4",588,0) ; "RTN","SAMIHOM4",589,0) m ^gpl("reg")=SAMIARG "RTN","SAMIHOM4",590,0) n ssn s ssn=SAMIARG("ssn") "RTN","SAMIHOM4",591,0) s ssn=$tr(ssn,"-") "RTN","SAMIHOM4",592,0) s SAMIARG("errorMessage")="" "RTN","SAMIHOM4",593,0) s SAMIARG("errorField")="" "RTN","SAMIHOM4",594,0) ; test for duplicate ssn "RTN","SAMIHOM4",595,0) ; "RTN","SAMIHOM4",596,0) ;i $$DUPSSN(ssn) d ; "RTN","SAMIHOM4",597,0) ;. ;s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate SSN." "RTN","SAMIHOM4",598,0) ;. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate SSN error. A person with that SSN is already entered in the system." "RTN","SAMIHOM4",599,0) ;. s SAMIARG("errorField")="ssn" "RTN","SAMIHOM4",600,0) ; "RTN","SAMIHOM4",601,0) ; test for duplicate icn "RTN","SAMIHOM4",602,0) ; "RTN","SAMIHOM4",603,0) ;n icn s icn=$g(SAMIARG("icn")) "RTN","SAMIHOM4",604,0) ;i icn'="" i $$DUPICN(icn) d ; "RTN","SAMIHOM4",605,0) ;. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate ICN error. A person with that ICN is already entered in the system." "RTN","SAMIHOM4",606,0) ;. s SAMIARG("errorField")="icn" "RTN","SAMIHOM4",607,0) ;; "RTN","SAMIHOM4",608,0) ;; test for wellformed ICN "RTN","SAMIHOM4",609,0) ;; "RTN","SAMIHOM4",610,0) ;i icn'="" i $$BADICN(icn) d ; "RTN","SAMIHOM4",611,0) ;. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Invalid ICN error. The check digits in the ICN do not match" "RTN","SAMIHOM4",612,0) ;. s SAMIARG("errorField")="icn" "RTN","SAMIHOM4",613,0) ;; "RTN","SAMIHOM4",614,0) ; if there is an error, send back to edit with error message "RTN","SAMIHOM4",615,0) i $g(SAMIARG("errorMessage"))'="" d q ; "RTN","SAMIHOM4",616,0) . n form "RTN","SAMIHOM4",617,0) . s form="vapals:addperson" "RTN","SAMIHOM4",618,0) . d RTNERR(.SAMIRESULT,form,.SAMIARG) "RTN","SAMIHOM4",619,0) ; "RTN","SAMIHOM4",620,0) n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",621,0) n proot s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",622,0) n ptlkien s ptlkien="" "RTN","SAMIHOM4",623,0) n dfn s dfn="" "RTN","SAMIHOM4",624,0) n sien s sien="" "RTN","SAMIHOM4",625,0) i ptlkien="" s ptlkien=$o(@root@("AAAAAA"),-1)+1 "RTN","SAMIHOM4",626,0) n zm "RTN","SAMIHOM4",627,0) k SAMIARG("MATCHLOG") "RTN","SAMIHOM4",628,0) s zm=$$REMATCH(sien,.SAMIARG) "RTN","SAMIHOM4",629,0) i zm>0 d ; "RTN","SAMIHOM4",630,0) . s SAMIARG("MATCHLOG")=zm "RTN","SAMIHOM4",631,0) d MKPTLK(ptlkien,.SAMIARG) ; make the patient-lookup record "RTN","SAMIHOM4",632,0) ; "RTN","SAMIHOM4",633,0) s dfn=$o(@root@("dfn"," "),-1)+1 "RTN","SAMIHOM4",634,0) n pdfn "RTN","SAMIHOM4",635,0) s pdfn=$o(@proot@("dfn"," "),-1)+1 "RTN","SAMIHOM4",636,0) i pdfn>dfn s dfn=pdfn ; need a dfn that has not been used "RTN","SAMIHOM4",637,0) i dfn<9000001 s dfn=9000001 "RTN","SAMIHOM4",638,0) s @root@(ptlkien,"dfn")=dfn "RTN","SAMIHOM4",639,0) s SAMIARG("dfn")=dfn ; pass the new dfn back to the caller "RTN","SAMIHOM4",640,0) ; note: this is the only way to link to the new record via dfn "RTN","SAMIHOM4",641,0) ; since nothing else is unique "RTN","SAMIHOM4",642,0) d INDXPTLK(ptlkien) "RTN","SAMIHOM4",643,0) s SAMIFILTER("samiroute")="addperson" "RTN","SAMIHOM4",644,0) s SAMIFILTER("siteid")=$G(SAMIARG("siteid")) "RTN","SAMIHOM4",645,0) s SAMIFILTER("sitetitle")=$G(SAMIARG("sitetitle")) "RTN","SAMIHOM4",646,0) D ; slight of hand for handing back SAMIARGS while also returning a form "RTN","SAMIHOM4",647,0) . n SAMIARG ; return to a blank manual registration form "RTN","SAMIHOM4",648,0) . s SAMIARG("siteid")=$G(SAMIFILTER("siteid")) "RTN","SAMIHOM4",649,0) . s SAMIARG("sitetitle")=$G(SAMIFILTER("sitetitle")) "RTN","SAMIHOM4",650,0) . d SETINFO(.SAMIFILTER,name_" was successfully entered") "RTN","SAMIHOM4",651,0) . ;d SETWARN(.SAMIFILTER,"We might want to give you a warning") "RTN","SAMIHOM4",652,0) . do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIARG,.SAMIRESULT) "RTN","SAMIHOM4",653,0) ; "RTN","SAMIHOM4",654,0) quit ; end of REG "RTN","SAMIHOM4",655,0) ; "RTN","SAMIHOM4",656,0) ; "RTN","SAMIHOM4",657,0) ; "RTN","SAMIHOM4",658,0) MKPTLK(ptlkien,SAMIARG) ; creates patient-lookup record "RTN","SAMIHOM4",659,0) ; "RTN","SAMIHOM4",660,0) n ssn s ssn=SAMIARG("ssn") "RTN","SAMIHOM4",661,0) s ssn=$tr(ssn,"-") "RTN","SAMIHOM4",662,0) n name s name=$g(SAMIARG("name")) "RTN","SAMIHOM4",663,0) n sinamef,sinamel "RTN","SAMIHOM4",664,0) s sinamel=$p(name,","),sinamel=$$TRIM^XLFSTR(sinamel,"LR") "RTN","SAMIHOM4",665,0) s sinamef=$p(name,",",2),sinamef=$$TRIM^XLFSTR(sinamef,"LR") "RTN","SAMIHOM4",666,0) s name=sinamel_","_sinamef "RTN","SAMIHOM4",667,0) n siteid s siteid=$g(SAMIARG("siteid")) "RTN","SAMIHOM4",668,0) i siteid="" s siteid=$g(SAMIARG("site")) "RTN","SAMIHOM4",669,0) ; "RTN","SAMIHOM4",670,0) s @root@(ptlkien,"siteid")=siteid "RTN","SAMIHOM4",671,0) s @root@(ptlkien,"saminame")=name "RTN","SAMIHOM4",672,0) s @root@(ptlkien,"sinamef")=sinamef "RTN","SAMIHOM4",673,0) s @root@(ptlkien,"sinamel")=sinamel "RTN","SAMIHOM4",674,0) n dob s dob=$g(SAMIARG("dob")) "RTN","SAMIHOM4",675,0) i dob="" s dob=$g(SAMIARG("sidob")) "RTN","SAMIHOM4",676,0) n fmdob s fmdob=$$FMDT^SAMIUR2(dob) "RTN","SAMIHOM4",677,0) n ptlkdob s ptlkdob=$$FMTE^XLFDT(fmdob,7) "RTN","SAMIHOM4",678,0) s ptlkdob=$TR(ptlkdob,"/","-") "RTN","SAMIHOM4",679,0) s @root@(ptlkien,"dob")=ptlkdob "RTN","SAMIHOM4",680,0) s @root@(ptlkien,"sbdob")=ptlkdob "RTN","SAMIHOM4",681,0) n gender s gender=$g(SAMIARG("gender")) "RTN","SAMIHOM4",682,0) i gender="" s gender=$g(SAMIARG("sex")) "RTN","SAMIHOM4",683,0) s @root@(ptlkien,"gender")=$s(gender="M":"M^MALE",1:"F^FEMALE") "RTN","SAMIHOM4",684,0) s @root@(ptlkien,"sex")=$g(SAMIARG("gender")) "RTN","SAMIHOM4",685,0) ; s @root@(ptlkien,"icn")=SAMIARG("icn") "RTN","SAMIHOM4",686,0) s @root@(ptlkien,"ssn")=ssn "RTN","SAMIHOM4",687,0) n last5 s last5=$$UCASE($e(name,1))_$e(ssn,6,9) "RTN","SAMIHOM4",688,0) s @root@(ptlkien,"last5")=last5 "RTN","SAMIHOM4",689,0) n mymatch s mymatch=$g(SAMIARG("MATCHLOG")) "RTN","SAMIHOM4",690,0) i mymatch'="" s @root@(ptlkien,"MATCHLOG")=mymatch "RTN","SAMIHOM4",691,0) ; "RTN","SAMIHOM4",692,0) quit ; end of MKPTLK "RTN","SAMIHOM4",693,0) ; "RTN","SAMIHOM4",694,0) ; "RTN","SAMIHOM4",695,0) ; "RTN","SAMIHOM4",696,0) UPDTFRMS(dfn) ; update demographics in all forms for patient "RTN","SAMIHOM4",697,0) ; "RTN","SAMIHOM4",698,0) n lroot s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",699,0) n proot s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",700,0) n lien s lien=$o(@lroot@("dfn",dfn,"")) "RTN","SAMIHOM4",701,0) q:lien="" "RTN","SAMIHOM4",702,0) n pien s pien=$o(@proot@("dfn",dfn,"")) "RTN","SAMIHOM4",703,0) q:pien="" "RTN","SAMIHOM4",704,0) ; this patient has forms "RTN","SAMIHOM4",705,0) m @proot@(pien)=@lroot@(lien) ; refresh the demos in the patient record "RTN","SAMIHOM4",706,0) n ssn s ssn=$g(@proot@(pien,"ssn")) "RTN","SAMIHOM4",707,0) s @proot@(pien,"sissn")=$e(ssn,1,3)_"-"_$e(ssn,4,5)_"-"_$e(ssn,6,9) "RTN","SAMIHOM4",708,0) n sid s sid=$g(@proot@("sisid")) ; studyid "RTN","SAMIHOM4",709,0) q:sid="" ; no studyid "RTN","SAMIHOM4",710,0) n zi s zi="" "RTN","SAMIHOM4",711,0) f s zi=$o(@proot@("graph",sid,zi)) q:zi="" d ; for each form "RTN","SAMIHOM4",712,0) . m @proot@("graph",sid,zi)=@proot@(pien) ; stamp each form with new demos "RTN","SAMIHOM4",713,0) ; "RTN","SAMIHOM4",714,0) quit ; end of UPDTFRMS "RTN","SAMIHOM4",715,0) ; "RTN","SAMIHOM4",716,0) ; "RTN","SAMIHOM4",717,0) ; "RTN","SAMIHOM4",718,0) MERGE(SAMIRESULT,SAMIARGS) ; merge participant records "RTN","SAMIHOM4",719,0) ; "RTN","SAMIHOM4",720,0) ; called from pressing the merge button on the unmatched report "RTN","SAMIHOM4",721,0) ; "RTN","SAMIHOM4",722,0) n toien s toien=$g(SAMIARGS("toien")) "RTN","SAMIHOM4",723,0) i toien="" d q ; "RTN","SAMIHOM4",724,0) . d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",725,0) n lroot s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",726,0) n fromien s fromien=$g(@lroot@(toien,"MATCHLOG")) "RTN","SAMIHOM4",727,0) i fromien="" d q ; "RTN","SAMIHOM4",728,0) . d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",729,0) ; "RTN","SAMIHOM4",730,0) ; test for remotedfn in from record - not valid if absent "RTN","SAMIHOM4",731,0) ; "RTN","SAMIHOM4",732,0) i $g(@lroot@(fromien,"remotedfn"))="" d q ; "RTN","SAMIHOM4",733,0) . d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",734,0) ; "RTN","SAMIHOM4",735,0) ; remove index entries for from and to records "RTN","SAMIHOM4",736,0) ; "RTN","SAMIHOM4",737,0) d UNINDXPT(fromien) ; delete index entries "RTN","SAMIHOM4",738,0) d UNINDXPT(toien) "RTN","SAMIHOM4",739,0) ; "RTN","SAMIHOM4",740,0) ; create changelog entry in to record - contains from record "RTN","SAMIHOM4",741,0) ; "RTN","SAMIHOM4",742,0) m @lroot@(toien,"changelog",$$FMTE^XLFDT($$NOW^XLFDT,5))=@lroot@(fromien) "RTN","SAMIHOM4",743,0) ; "RTN","SAMIHOM4",744,0) ; change the dfn in the from record to the to record dfn for merging "RTN","SAMIHOM4",745,0) ; "RTN","SAMIHOM4",746,0) s @lroot@(fromien,"dfn")=@lroot@(toien,"dfn") "RTN","SAMIHOM4",747,0) n dfn s dfn=@lroot@(toien,"dfn") ; for use in updating forms "RTN","SAMIHOM4",748,0) ; "RTN","SAMIHOM4",749,0) ; merge the from record to the to record "RTN","SAMIHOM4",750,0) ; "RTN","SAMIHOM4",751,0) m @lroot@(toien)=@lroot@(fromien) "RTN","SAMIHOM4",752,0) ; "RTN","SAMIHOM4",753,0) ; delete the from record "RTN","SAMIHOM4",754,0) ; "RTN","SAMIHOM4",755,0) k @lroot@(fromien) "RTN","SAMIHOM4",756,0) ; "RTN","SAMIHOM4",757,0) ; reindex the to record "RTN","SAMIHOM4",758,0) ; "RTN","SAMIHOM4",759,0) d INDXPTLK(toien) "RTN","SAMIHOM4",760,0) ; "RTN","SAMIHOM4",761,0) ; propagate the updated from record to every form "RTN","SAMIHOM4",762,0) ; "RTN","SAMIHOM4",763,0) d UPDTFRMS(dfn) ; updates the patient in the vapals-patient graph "RTN","SAMIHOM4",764,0) ; "RTN","SAMIHOM4",765,0) ; leave and return to the unmatched report "RTN","SAMIHOM4",766,0) ; note that the form and to records will no longer be in the report "RTN","SAMIHOM4",767,0) ; "RTN","SAMIHOM4",768,0) d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",769,0) ; "RTN","SAMIHOM4",770,0) quit ; end of MERGE "RTN","SAMIHOM4",771,0) ; "RTN","SAMIHOM4",772,0) ; "RTN","SAMIHOM4",773,0) ; "RTN","SAMIHOM4",774,0) ADDUNMAT ; adds unmatched report web service to system "RTN","SAMIHOM4",775,0) ; "RTN","SAMIHOM4",776,0) d addService^%webutils("GET","unmatched","WSUNMAT^SAMIHOM4") "RTN","SAMIHOM4",777,0) ; "RTN","SAMIHOM4",778,0) quit ; end of ADDUNMAT "RTN","SAMIHOM4",779,0) ; "RTN","SAMIHOM4",780,0) ; "RTN","SAMIHOM4",781,0) ; "RTN","SAMIHOM4",782,0) DELUNMAT ; deletes unmatched web service "RTN","SAMIHOM4",783,0) ; "RTN","SAMIHOM4",784,0) d deleteService^%webutils("GET","unmatched") "RTN","SAMIHOM4",785,0) ; "RTN","SAMIHOM4",786,0) quit ; end of DELUNMAT "RTN","SAMIHOM4",787,0) ; "RTN","SAMIHOM4",788,0) ; "RTN","SAMIHOM4",789,0) ; "RTN","SAMIHOM4",790,0) WSUNMAT(SAMIRESULT,SAMIARGS) ; navigates to unmatched report "RTN","SAMIHOM4",791,0) ; "RTN","SAMIHOM4",792,0) n filter,bdy "RTN","SAMIHOM4",793,0) s bdy="" "RTN","SAMIHOM4",794,0) ;s filter("siteid")="PHX" "RTN","SAMIHOM4",795,0) s filter("samiroute")="report" "RTN","SAMIHOM4",796,0) s filter("samireporttype")="unmatched" "RTN","SAMIHOM4",797,0) d WSVAPALS^SAMIHOM3(.filter,.bdy,.SAMIRESULT) ; back to the unmatched report "RTN","SAMIHOM4",798,0) ; "RTN","SAMIHOM4",799,0) quit ; end of WSUNMAT "RTN","SAMIHOM4",800,0) ; "RTN","SAMIHOM4",801,0) ; "RTN","SAMIHOM4",802,0) ; "RTN","SAMIHOM4",803,0) DUPSSN(ssn) ; extrinsic returns true if duplicate ssn "RTN","SAMIHOM4",804,0) ; "RTN","SAMIHOM4",805,0) n proot s proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",806,0) i $d(@proot@("ssn",ssn)) q 1 "RTN","SAMIHOM4",807,0) ; "RTN","SAMIHOM4",808,0) quit 0 ; end of $$DUPSSN "RTN","SAMIHOM4",809,0) ; "RTN","SAMIHOM4",810,0) ; "RTN","SAMIHOM4",811,0) ; "RTN","SAMIHOM4",812,0) DUPICN(icn) ; extrinsic returns true if duplicate icn "RTN","SAMIHOM4",813,0) ; "RTN","SAMIHOM4",814,0) n proot s proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",815,0) n tmpicn s tmpicn=$p(icn,"V",1) "RTN","SAMIHOM4",816,0) i $d(@proot@("icn",icn)) q 1 "RTN","SAMIHOM4",817,0) i $d(@proot@("icn",tmpicn)) q 1 "RTN","SAMIHOM4",818,0) ; "RTN","SAMIHOM4",819,0) quit 0 ; end of $$DUPICN "RTN","SAMIHOM4",820,0) ; "RTN","SAMIHOM4",821,0) ; "RTN","SAMIHOM4",822,0) ; "RTN","SAMIHOM4",823,0) BADICN(icn) ; extrinsic returns true if ICN checkdigits are wrong "RTN","SAMIHOM4",824,0) ; "RTN","SAMIHOM4",825,0) n zchk s zchk=$p(icn,"V",2) "RTN","SAMIHOM4",826,0) n zicn s zicn=$p(icn,"V",1) "RTN","SAMIHOM4",827,0) q:zchk="" 1 "RTN","SAMIHOM4",828,0) i zchk'=$$CHECKDG^MPIFSPC(zicn) q 1 "RTN","SAMIHOM4",829,0) ; "RTN","SAMIHOM4",830,0) quit 0 "RTN","SAMIHOM4",831,0) ; "RTN","SAMIHOM4",832,0) ; "RTN","SAMIHOM4",833,0) ; "RTN","SAMIHOM4",834,0) SAVE(SAMIRESULT,SAMIARG) ; save patient-lookup record after edit "RTN","SAMIHOM4",835,0) ; "RTN","SAMIHOM4",836,0) n dfn s dfn=$g(vars("dfn")) ; must have a dfn "RTN","SAMIHOM4",837,0) i dfn="" d q ; "RTN","SAMIHOM4",838,0) . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",839,0) n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",840,0) n sien s sien=$o(@root@("dfn",dfn,"")) "RTN","SAMIHOM4",841,0) i sien="" d q ; "RTN","SAMIHOM4",842,0) . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",843,0) d UNINDXPT(sien) ; remove old index entries "RTN","SAMIHOM4",844,0) n zm "RTN","SAMIHOM4",845,0) k SAMIARG("MATCHLOG") "RTN","SAMIHOM4",846,0) s zm=$$REMATCH(sien,.SAMIARG) "RTN","SAMIHOM4",847,0) i zm>0 d ; "RTN","SAMIHOM4",848,0) . s SAMIARG("MATCHLOG")=zm "RTN","SAMIHOM4",849,0) d MKPTLK(sien,.SAMIARG) ; add the updated fields "RTN","SAMIHOM4",850,0) d INDXPTLK(sien) ; create new index entries "RTN","SAMIHOM4",851,0) d UPDTFRMS(dfn) ; update demographic info in all forms "RTN","SAMIHOM4",852,0) n filter,bdy "RTN","SAMIHOM4",853,0) s bdy="" "RTN","SAMIHOM4",854,0) m filter=SAMIARG "RTN","SAMIHOM4",855,0) s filter("samiroute")="report" "RTN","SAMIHOM4",856,0) s filter("samireporttype")="unmatched" "RTN","SAMIHOM4",857,0) d WSVAPALS^SAMIHOM3(.filter,.bdy,.SAMIRESULT) ; back to the unmatched report "RTN","SAMIHOM4",858,0) ; "RTN","SAMIHOM4",859,0) quit ; end of SAVE "RTN","SAMIHOM4",860,0) ; "RTN","SAMIHOM4",861,0) ; "RTN","SAMIHOM4",862,0) ; "RTN","SAMIHOM4",863,0) REMATCH(sien,SAMIARG) ; extrinsic returns possible match ien "RTN","SAMIHOM4",864,0) ; "RTN","SAMIHOM4",865,0) ; else zero "RTN","SAMIHOM4",866,0) ; "RTN","SAMIHOM4",867,0) n lroot s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",868,0) n ssn,name,icn,x,y "RTN","SAMIHOM4",869,0) s ssn=$g(SAMIARG("ssn")) "RTN","SAMIHOM4",870,0) i ssn["-" s ssn=$tr(ssn,"-") "RTN","SAMIHOM4",871,0) s name=$g(SAMIARG("saminame")) "RTN","SAMIHOM4",872,0) i name="" s name=$g(SAMIARG("name")) "RTN","SAMIHOM4",873,0) s name=$$UCASE(name) "RTN","SAMIHOM4",874,0) ; s icn=$g(SAMIARG("icn")) "RTN","SAMIHOM4",875,0) s x=0 "RTN","SAMIHOM4",876,0) i ssn'="" s x=$o(@lroot@("ssn",ssn,"")) "RTN","SAMIHOM4",877,0) i x=sien s x=$o(@lroot@("ssn",ssn,x)) "RTN","SAMIHOM4",878,0) i +x'=0 d ; "RTN","SAMIHOM4",879,0) . s y=$g(@lroot@(x,"dfn")) "RTN","SAMIHOM4",880,0) . ;i y>9000000 s x=0 "RTN","SAMIHOM4",881,0) i x>0 q x "RTN","SAMIHOM4",882,0) i name'="" s x=$o(@lroot@("name",name,"")) "RTN","SAMIHOM4",883,0) i x=sien s x=$o(@lroot@("name",name,x)) "RTN","SAMIHOM4",884,0) i +x'=0 d ; "RTN","SAMIHOM4",885,0) . s y=$g(@lroot@(x,"dfn")) "RTN","SAMIHOM4",886,0) . ;i y>9000000 s x=0 "RTN","SAMIHOM4",887,0) i x>0 q x "RTN","SAMIHOM4",888,0) ;i icn'="" s x=$o(@lroot@("icn",icn,"")) "RTN","SAMIHOM4",889,0) ;i x=sien s x=$o(@lroot@("icn",icn,x)) "RTN","SAMIHOM4",890,0) ;i +x'=0 d ; "RTN","SAMIHOM4",891,0) ;. s y=$g(@lroot@(x,"dfn")) "RTN","SAMIHOM4",892,0) ;. i y>9000000 s x=0 "RTN","SAMIHOM4",893,0) ;i x>0 q x "RTN","SAMIHOM4",894,0) ; "RTN","SAMIHOM4",895,0) quit 0 ; end of $$REMATCH "RTN","SAMIHOM4",896,0) ; "RTN","SAMIHOM4",897,0) ; "RTN","SAMIHOM4",898,0) ; "RTN","SAMIHOM4",899,0) SETINFO(vars,msg) ; set information message text "RTN","SAMIHOM4",900,0) ; "RTN","SAMIHOM4",901,0) ; vars are the screen variables passed by reference "RTN","SAMIHOM4",902,0) ; "RTN","SAMIHOM4",903,0) s vars("infoMessage")=msg "RTN","SAMIHOM4",904,0) ; "RTN","SAMIHOM4",905,0) quit ; end of SETINFO "RTN","SAMIHOM4",906,0) ; "RTN","SAMIHOM4",907,0) ; "RTN","SAMIHOM4",908,0) ; "RTN","SAMIHOM4",909,0) SETWARN(vars,msg) ; set warning message text "RTN","SAMIHOM4",910,0) ; "RTN","SAMIHOM4",911,0) ; vars are the screen variables passed by reference "RTN","SAMIHOM4",912,0) ; "RTN","SAMIHOM4",913,0) s vars("warnMessage")=msg "RTN","SAMIHOM4",914,0) ; "RTN","SAMIHOM4",915,0) quit ; end of SETWARN "RTN","SAMIHOM4",916,0) ; "RTN","SAMIHOM4",917,0) ; "RTN","SAMIHOM4",918,0) ; "RTN","SAMIHOM4",919,0) RTNERR(rtn,form,vals,msg,fld) ; redisplay page w/error message "RTN","SAMIHOM4",920,0) ; "RTN","SAMIHOM4",921,0) ; rtn is the return array "RTN","SAMIHOM4",922,0) ; form is the form the page requires "RTN","SAMIHOM4",923,0) ; vals are the values for the page. passed by reference "RTN","SAMIHOM4",924,0) ; msg is the error message to be displayed "RTN","SAMIHOM4",925,0) ; fld is the name of the field where the cursor should be put "RTN","SAMIHOM4",926,0) ; "RTN","SAMIHOM4",927,0) n zhtml ; work area for the tempate "RTN","SAMIHOM4",928,0) d SAMIHTM^%wf(.zhtml,form,.err) "RTN","SAMIHOM4",929,0) d MERGEHTM^%wf(.zhtml,.vals,.err) "RTN","SAMIHOM4",930,0) m rtn=zhtml "RTN","SAMIHOM4",931,0) set HTTPRSP("mime")="text/html" ; set mime type "RTN","SAMIHOM4",932,0) ; "RTN","SAMIHOM4",933,0) quit ; end of RTNERR "RTN","SAMIHOM4",934,0) ; "RTN","SAMIHOM4",935,0) ; "RTN","SAMIHOM4",936,0) ; "RTN","SAMIHOM4",937,0) RTNPAGE(rtn,form,vals) ; display page "RTN","SAMIHOM4",938,0) ; "RTN","SAMIHOM4",939,0) ; rtn is the return array "RTN","SAMIHOM4",940,0) ; form is the form the page requires "RTN","SAMIHOM4",941,0) ; vals are the values for the page. passed by reference "RTN","SAMIHOM4",942,0) ; "RTN","SAMIHOM4",943,0) n err "RTN","SAMIHOM4",944,0) n zhtml ; work area for the tempate "RTN","SAMIHOM4",945,0) d SAMIHTM^%wf(.zhtml,form,.err) "RTN","SAMIHOM4",946,0) d MERGEHTM^%wf(.zhtml,.vals,.err) "RTN","SAMIHOM4",947,0) m SAMIRESULT=zhtml "RTN","SAMIHOM4",948,0) set HTTPRSP("mime")="text/html" ; set mime type "RTN","SAMIHOM4",949,0) ; "RTN","SAMIHOM4",950,0) quit ; end of RTNPAGE "RTN","SAMIHOM4",951,0) ; "RTN","SAMIHOM4",952,0) ; "RTN","SAMIHOM4",953,0) ; "RTN","SAMIHOM4",954,0) REINDXPL ; reindex patient lookup "RTN","SAMIHOM4",955,0) ; "RTN","SAMIHOM4",956,0) n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",957,0) n zi s zi=0 "RTN","SAMIHOM4",958,0) k @root@("dfn") "RTN","SAMIHOM4",959,0) k @root@("ssn") "RTN","SAMIHOM4",960,0) k @root@("name") "RTN","SAMIHOM4",961,0) k @root@("last5") "RTN","SAMIHOM4",962,0) k @root@("sinamef") "RTN","SAMIHOM4",963,0) k @root@("sinamel") "RTN","SAMIHOM4",964,0) ; k @root@("icn") "RTN","SAMIHOM4",965,0) f s zi=$o(@root@(zi)) q:+zi=0 d ; "RTN","SAMIHOM4",966,0) . d INDXPTLK(zi) "RTN","SAMIHOM4",967,0) ; "RTN","SAMIHOM4",968,0) quit ; end of REINDXPL "RTN","SAMIHOM4",969,0) ; "RTN","SAMIHOM4",970,0) ; "RTN","SAMIHOM4",971,0) ; "RTN","SAMIHOM4",972,0) INDXPTLK(ien) ; generate index entries in patient-lookup graph "RTN","SAMIHOM4",973,0) ; "RTN","SAMIHOM4",974,0) ; for entry ien "RTN","SAMIHOM4",975,0) ; "RTN","SAMIHOM4",976,0) n proot set proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",977,0) n name s name=$g(@proot@(ien,"saminame")) "RTN","SAMIHOM4",978,0) s @proot@("name",name,ien)="" "RTN","SAMIHOM4",979,0) n ucname s ucname=$$UCASE(name) "RTN","SAMIHOM4",980,0) s @proot@("name",ucname,ien)="" "RTN","SAMIHOM4",981,0) n x "RTN","SAMIHOM4",982,0) s x=$g(@proot@(ien,"dfn")) ;w !,x "RTN","SAMIHOM4",983,0) i x="" d ; "RTN","SAMIHOM4",984,0) . s x=$o(@proot@("dfn"," "),-1)+1 "RTN","SAMIHOM4",985,0) . s @proot@(ien,"dfn")=x "RTN","SAMIHOM4",986,0) s:x'="" @proot@("dfn",x,ien)="" "RTN","SAMIHOM4",987,0) s x=$g(@proot@(ien,"last5")) ;w !,x "RTN","SAMIHOM4",988,0) s:x'="" @proot@("last5",x,ien)="" "RTN","SAMIHOM4",989,0) ; "RTN","SAMIHOM4",990,0) ; s x=$g(@proot@(ien,"icn")) ;w !,x "RTN","SAMIHOM4",991,0) ; i x'["V" d ; "RTN","SAMIHOM4",992,0) ; . i x="" q "RTN","SAMIHOM4",993,0) ; . n chk s chk=$$CHECKDG^MPIFSPC(x) "RTN","SAMIHOM4",994,0) ; . s @proot@(ien,"icn")=x_"V"_chk "RTN","SAMIHOM4",995,0) ; . s x=x_"V"_chk "RTN","SAMIHOM4",996,0) ; s:x'="" @proot@("icn",x,ien)="" "RTN","SAMIHOM4",997,0) ; "RTN","SAMIHOM4",998,0) s x=$g(@proot@(ien,"ssn")) ;w !,x "RTN","SAMIHOM4",999,0) s:x'="" @proot@("ssn",x,ien)="" "RTN","SAMIHOM4",1000,0) s x=$g(@proot@(ien,"sinamef")) ;w !,x "RTN","SAMIHOM4",1001,0) s:x'="" @proot@("sinamef",x,ien)="" "RTN","SAMIHOM4",1002,0) s x=$g(@proot@(ien,"sinamel")) ;w !,x "RTN","SAMIHOM4",1003,0) s:x'="" @proot@("sinamel",x,ien)="" "RTN","SAMIHOM4",1004,0) set @proot@("Date Last Updated")=$$HTE^XLFDT($horolog) "RTN","SAMIHOM4",1005,0) ; "RTN","SAMIHOM4",1006,0) quit ; end of INDXPTLK "RTN","SAMIHOM4",1007,0) ; "RTN","SAMIHOM4",1008,0) ; "RTN","SAMIHOM4",1009,0) ; "RTN","SAMIHOM4",1010,0) UNINDXPT(ien) ; remove index entries from patient-lookup graph "RTN","SAMIHOM4",1011,0) ; "RTN","SAMIHOM4",1012,0) ; for entry ien "RTN","SAMIHOM4",1013,0) ; "RTN","SAMIHOM4",1014,0) n proot set proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",1015,0) n name s name=$g(@proot@(ien,"saminame")) "RTN","SAMIHOM4",1016,0) k @proot@("name",name,ien) "RTN","SAMIHOM4",1017,0) n ucname s ucname=$$UCASE(name) "RTN","SAMIHOM4",1018,0) k @proot@("name",ucname,ien) "RTN","SAMIHOM4",1019,0) n x "RTN","SAMIHOM4",1020,0) s x=$g(@proot@(ien,"dfn")) ;w !,x "RTN","SAMIHOM4",1021,0) k:x'="" @proot@("dfn",x,ien) "RTN","SAMIHOM4",1022,0) s x=$g(@proot@(ien,"last5")) ;w !,x "RTN","SAMIHOM4",1023,0) k:x'="" @proot@("last5",x,ien) "RTN","SAMIHOM4",1024,0) ; "RTN","SAMIHOM4",1025,0) ; s x=$g(@proot@(ien,"icn")) ;w !,x "RTN","SAMIHOM4",1026,0) ; i x'["V" d ; "RTN","SAMIHOM4",1027,0) ; . i x="" q "RTN","SAMIHOM4",1028,0) ; . n chk s chk=$$CHECKDG^MPIFSPC(x) "RTN","SAMIHOM4",1029,0) ; . s @proot@(ien,"icn")=x_"V"_chk "RTN","SAMIHOM4",1030,0) ; . s x=x_"V"_chk "RTN","SAMIHOM4",1031,0) ; k:x'="" @proot@("icn",x,ien) "RTN","SAMIHOM4",1032,0) ; "RTN","SAMIHOM4",1033,0) s x=$g(@proot@(ien,"ssn")) ;w !,x "RTN","SAMIHOM4",1034,0) k:x'="" @proot@("ssn",x,ien) "RTN","SAMIHOM4",1035,0) s x=$g(@proot@(ien,"sinamef")) ;w !,x "RTN","SAMIHOM4",1036,0) k:x'="" @proot@("sinamef",x,ien) "RTN","SAMIHOM4",1037,0) s x=$g(@proot@(ien,"sinamel")) w !,x "RTN","SAMIHOM4",1038,0) k:x'="" @proot@("sinamel",x,ien) "RTN","SAMIHOM4",1039,0) set @proot@("Date Last Updated")=$$HTE^XLFDT($horolog) "RTN","SAMIHOM4",1040,0) ; "RTN","SAMIHOM4",1041,0) quit ; end of UNINDXPT "RTN","SAMIHOM4",1042,0) ; "RTN","SAMIHOM4",1043,0) ; "RTN","SAMIHOM4",1044,0) ; "RTN","SAMIHOM4",1045,0) UCASE(STR) ; extrinsic returns uppercase of STR "RTN","SAMIHOM4",1046,0) ; "RTN","SAMIHOM4",1047,0) N X,Y "RTN","SAMIHOM4",1048,0) S X=STR "RTN","SAMIHOM4",1049,0) X ^%ZOSF("UPPERCASE") "RTN","SAMIHOM4",1050,0) ; "RTN","SAMIHOM4",1051,0) quit Y ; end of $$UCASE "RTN","SAMIHOM4",1052,0) ; "RTN","SAMIHOM4",1053,0) ; "RTN","SAMIHOM4",1054,0) ; "RTN","SAMIHOM4",1055,0) ;@wri-code WSNEWCAS^SAMIHOM3 "RTN","SAMIHOM4",1056,0) WSNEWCAS ; web route newcase (creates new case) "RTN","SAMIHOM4",1057,0) ; "RTN","SAMIHOM4",1058,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",1059,0) ; "RTN","SAMIHOM4",1060,0) ;ven/gpl;wri;procedure; "RTN","SAMIHOM4",1061,0) ;@signature "RTN","SAMIHOM4",1062,0) ; do WSNEWCAS^SAMIHOM3(SAMIARGS,SAMIBODY,SAMIRESULT) "RTN","SAMIHOM4",1063,0) ;@branches-from "RTN","SAMIHOM4",1064,0) ; wri WSNEWCAS^SAMIHOM3 [wr newcase] "RTN","SAMIHOM4",1065,0) ;@wri-called-by "RTN","SAMIHOM4",1066,0) ; wsi WSVAPALS^SAMIHOM3 [ws post vapals] "RTN","SAMIHOM4",1067,0) ;@called-by none "RTN","SAMIHOM4",1068,0) ;@calls "RTN","SAMIHOM4",1069,0) ; parseBody^%wf "RTN","SAMIHOM4",1070,0) ; $$setroot^%wd "RTN","SAMIHOM4",1071,0) ; $$VALDTNM [commented out] "RTN","SAMIHOM4",1072,0) ; GETHOME [commented out] "RTN","SAMIHOM4",1073,0) ; $$NEXTNUM [commented out] "RTN","SAMIHOM4",1074,0) ; $$GENSTDID^SAMIHOM3 "RTN","SAMIHOM4",1075,0) ; $$NOW^XLFDT "RTN","SAMIHOM4",1076,0) ; $$KEYDATE^SAMIHOM3 "RTN","SAMIHOM4",1077,0) ; PREFILL^SAMIHOM3 "RTN","SAMIHOM4",1078,0) ; makeSbform [commented out] "RTN","SAMIHOM4",1079,0) ; $$MKSIFORM^SAMIHOM3 "RTN","SAMIHOM4",1080,0) ; wsGetForm^%wf "RTN","SAMIHOM4",1081,0) ; WSCASE^SAMICASE [commented out] "RTN","SAMIHOM4",1082,0) ;@input "RTN","SAMIHOM4",1083,0) ;.ARGS = "RTN","SAMIHOM4",1084,0) ; BODY = "RTN","SAMIHOM4",1085,0) ;.RESULT = "RTN","SAMIHOM4",1086,0) ;@output: ? "RTN","SAMIHOM4",1087,0) ;@examples [tbd] "RTN","SAMIHOM4",1088,0) ;@tests [tbd] "RTN","SAMIHOM4",1089,0) ; "RTN","SAMIHOM4",1090,0) ; "RTN","SAMIHOM4",1091,0) ;@stanza 2 create new case "RTN","SAMIHOM4",1092,0) ; "RTN","SAMIHOM4",1093,0) merge ^SAMIUL("newCase","ARGS")=SAMIARGS "RTN","SAMIHOM4",1094,0) merge ^SAMIUL("newCase","BODY")=SAMIBODY "RTN","SAMIHOM4",1095,0) ; "RTN","SAMIHOM4",1096,0) new vars,bdy "RTN","SAMIHOM4",1097,0) set SAMIBDY=$get(SAMIBODY(1)) "RTN","SAMIHOM4",1098,0) if SAMIBDY="" M vars=SAMIARGS "RTN","SAMIHOM4",1099,0) else do parseBody^%wf("vars",.SAMIBDY) "RTN","SAMIHOM4",1100,0) merge ^SAMIUL("newCase","vars")=vars "RTN","SAMIHOM4",1101,0) ; "RTN","SAMIHOM4",1102,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",1103,0) ; "RTN","SAMIHOM4",1104,0) new saminame set saminame=$get(vars("name")) "RTN","SAMIHOM4",1105,0) if saminame="" s saminame=$get(vars("saminame")) "RTN","SAMIHOM4",1106,0) ;if $$VALDTNM(saminame,.ARGS)=-1 do quit ; "RTN","SAMIHOM4",1107,0) ;. new r1 "RTN","SAMIHOM4",1108,0) ;. do GETHOME(.r1,.ARGS) ; home page to redisplay "RTN","SAMIHOM4",1109,0) ;. merge RESULT=r1 "RTN","SAMIHOM4",1110,0) ;. quit "RTN","SAMIHOM4",1111,0) ; "RTN","SAMIHOM4",1112,0) new dfn s dfn=$get(vars("dfn")) "RTN","SAMIHOM4",1113,0) ;if dfn="" do quit ; "RTN","SAMIHOM4",1114,0) ;. new r1 "RTN","SAMIHOM4",1115,0) ;. do GETHOME(.r1,.ARGS) ; home page to redisplay "RTN","SAMIHOM4",1116,0) ;. merge RESULT=r1 "RTN","SAMIHOM4",1117,0) ;. quit "RTN","SAMIHOM4",1118,0) ; "RTN","SAMIHOM4",1119,0) ; new gien set gien=$$NEXTNUM "RTN","SAMIHOM4",1120,0) new gien set gien=dfn "RTN","SAMIHOM4",1121,0) ; "RTN","SAMIHOM4",1122,0) merge ^SAMIUL("newCase","G1")=root "RTN","SAMIHOM4",1123,0) ; create dfn index "RTN","SAMIHOM4",1124,0) set @root@("dfn",dfn,gien)="" "RTN","SAMIHOM4",1125,0) ; "RTN","SAMIHOM4",1126,0) set @root@(gien,"saminum")=gien "RTN","SAMIHOM4",1127,0) set @root@(gien,"saminame")=saminame "RTN","SAMIHOM4",1128,0) ; "RTN","SAMIHOM4",1129,0) new studyid set studyid=$$GENSTDID^SAMIHOM3(gien,.SAMIARGS) "RTN","SAMIHOM4",1130,0) set @root@(gien,"samistudyid")=studyid "RTN","SAMIHOM4",1131,0) set @root@("sid",studyid,gien)="" "RTN","SAMIHOM4",1132,0) ; "RTN","SAMIHOM4",1133,0) new datekey set datekey=$$KEYDATE^SAMIHOM3($$NOW^XLFDT) "RTN","SAMIHOM4",1134,0) set @root@(gien,"samicreatedate")=datekey "RTN","SAMIHOM4",1135,0) ; "RTN","SAMIHOM4",1136,0) merge ^SAMIUL("newCase",gien)=@root@(gien) "RTN","SAMIHOM4",1137,0) ; "RTN","SAMIHOM4",1138,0) ; "RTN","SAMIHOM4",1139,0) do PREFILL^SAMIHOM3(dfn) ; prefills from the "patient-lookup" graph "RTN","SAMIHOM4",1140,0) ; "RTN","SAMIHOM4",1141,0) new siformkey "RTN","SAMIHOM4",1142,0) ; do makeSbform(gien) ; create background form for new patient "RTN","SAMIHOM4",1143,0) set siformkey=$$MKSIFORM^SAMIHOM3(gien) ; create intake for new patient "RTN","SAMIHOM4",1144,0) ; "RTN","SAMIHOM4",1145,0) set SAMIARGS("studyid")=studyid "RTN","SAMIHOM4",1146,0) set SAMIARGS("form")="vapals:"_siformkey "RTN","SAMIHOM4",1147,0) do wsGetForm^%wf(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",1148,0) ; do WSCASE^SAMICASE(.SAMIRESULT,.SAMIARGS) ; navigate to case review page "RTN","SAMIHOM4",1149,0) ; "RTN","SAMIHOM4",1150,0) ; "RTN","SAMIHOM4",1151,0) ;@stanza 3 termination "RTN","SAMIHOM4",1152,0) ; "RTN","SAMIHOM4",1153,0) quit ; end of wri WSNEWCAS^SAMIHOM3 "RTN","SAMIHOM4",1154,0) ; "RTN","SAMIHOM4",1155,0) ; "RTN","SAMIHOM4",1156,0) ; "RTN","SAMIHOM4",1157,0) EOR ; end of routine SAMIHOM4 "RTN","SAMIHUL") 0^9^B115804 "RTN","SAMIHUL",1,0) SAMIHUL ;ven/gpl - ielcap: home page log ;2022-01-12t21:49z "RTN","SAMIHUL",2,0) ;;18.0;SAMI;**9,12,15,16**;2020-01;Build 6 "RTN","SAMIHUL",3,0) ;18-15 "RTN","SAMIHUL",4,0) ; "RTN","SAMIHUL",5,0) ; SAMIHOM3 contains subroutines for producing the ELCAP Home Page. "RTN","SAMIHUL",6,0) ; SAMIHUL contains the development log for the SAMIHOM* routines. "RTN","SAMIHUL",7,0) ; It contains no executable code. "RTN","SAMIHUL",8,0) ; "RTN","SAMIHUL",9,0) quit ; no entry from top "RTN","SAMIHUL",10,0) ; "RTN","SAMIHUL",11,0) ; "RTN","SAMIHUL",12,0) ; "RTN","SAMIHUL",13,0) ;@section 0 primary development "RTN","SAMIHUL",14,0) ; "RTN","SAMIHUL",15,0) ; "RTN","SAMIHUL",16,0) ; "RTN","SAMIHUL",17,0) ;@routine-credits "RTN","SAMIHUL",18,0) ;@dev-main George P. Lilly (gpl) "RTN","SAMIHUL",19,0) ; gpl@vistaexpertise.net "RTN","SAMIHUL",20,0) ;@dev-org-main Vista Expertise Network (ven) "RTN","SAMIHUL",21,0) ; http://vistaexpertise.net "RTN","SAMIHUL",22,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMIHUL",23,0) ;@license see routine SAMIUL "RTN","SAMIHUL",24,0) ; "RTN","SAMIHUL",25,0) ;@last-update 2022-01-12t21:49z "RTN","SAMIHUL",26,0) ;@application Screening Applications Management (SAM) "RTN","SAMIHUL",27,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIHUL",28,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIHUL",29,0) ;@version 18-15 "RTN","SAMIHUL",30,0) ;@release-date 2020-01 "RTN","SAMIHUL",31,0) ;@patch-list **9,12,15,16** "RTN","SAMIHUL",32,0) ; "RTN","SAMIHUL",33,0) ;@dev-add Frederick D. S. Marshall (toad) "RTN","SAMIHUL",34,0) ; toad@vistaexpertise.net "RTN","SAMIHUL",35,0) ;@dev-add Kenneth W. McGlothlen (mcglk) "RTN","SAMIHUL",36,0) ; mcglk@vistaexpertise.net "RTN","SAMIHUL",37,0) ;@dev-add Linda M. R. Yaw (lmry) "RTN","SAMIHUL",38,0) ; linda.yaw@vistaexpertise.net "RTN","SAMIHUL",39,0) ;@dev-add Larry G. Carlson (lgc) "RTN","SAMIHUL",40,0) ; larry.g.carlson@gmail.com "RTN","SAMIHUL",41,0) ;@dev-add Alexis R. Carlson (arc) "RTN","SAMIHUL",42,0) ; whatisthehumanspirit@gmail.com "RTN","SAMIHUL",43,0) ;@dev-add Domenick DiNatale (ddn) "RTN","SAMIHUL",44,0) ; domenic@intellitechinnovations.com "RTN","SAMIHUL",45,0) ; "RTN","SAMIHUL",46,0) ;@module-credits "RTN","SAMIHUL",47,0) ;@project VA Partnership to Increase Access to Lung Screening "RTN","SAMIHUL",48,0) ; (VA-PALS) "RTN","SAMIHUL",49,0) ; http://va-pals.org/ "RTN","SAMIHUL",50,0) ;@funding 2017/2021, Bristol-Myers Squibb Foundation (bmsf) "RTN","SAMIHUL",51,0) ; https://www.bms.com/about-us/responsibility/bristol-myers-squibb-foundation.html "RTN","SAMIHUL",52,0) ;@partner-org Veterans Affairs Office of Rural health "RTN","SAMIHUL",53,0) ; https://www.ruralhealth.va.gov/ "RTN","SAMIHUL",54,0) ;@partner-org International Early Lung Cancer Action Program (I-ELCAP) "RTN","SAMIHUL",55,0) ; http://ielcap.com/ "RTN","SAMIHUL",56,0) ;@partner-org Paraxial Technologies (par) "RTN","SAMIHUL",57,0) ; http://paraxialtech.com/ "RTN","SAMIHUL",58,0) ;@partner-org Open Source Electronic Health Record Alliance (OSEHRA) "RTN","SAMIHUL",59,0) ; https://www.osehra.org/groups/va-pals-open-source-project-group "RTN","SAMIHUL",60,0) ; "RTN","SAMIHUL",61,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIHUL",62,0) ; "RTN","SAMIHUL",63,0) ; 2018-01-13 ven/gpl 18.0-t4 "RTN","SAMIHUL",64,0) ; SAMIHOM3 create routine from SAMIFRM to implement ELCAP Home Page. "RTN","SAMIHUL",65,0) ; "RTN","SAMIHUL",66,0) ; 2018-02-05 ven/toad 18.0-t4 "RTN","SAMIHUL",67,0) ; SAMIHOM3 update license & attribution & hdr comments, add white "RTN","SAMIHUL",68,0) ; space & do-dot quits, spell out language elements. "RTN","SAMIHUL",69,0) ; "RTN","SAMIHUL",70,0) ; 2018-02-27 ven/gpl 18.0-t4 "RTN","SAMIHUL",71,0) ; SAMIHOM3 new subroutines PREFIX,GETHOME,SCANFOR,WSNEWCAS,PREFILL, "RTN","SAMIHUL",72,0) ; MKSBFORM,MKSIFORM,VALDTNM,SID2NUM,KEYDATE,GENSTDID,NEXTNUM to "RTN","SAMIHUL",73,0) ; support creation of new cases. "RTN","SAMIHUL",74,0) ; "RTN","SAMIHUL",75,0) ; 2018-03-01 ven/toad 18.0-t4 "RTN","SAMIHUL",76,0) ; SAMIHOM3 refactor & reorganize new code, add hdr comments, "RTN","SAMIHUL",77,0) ; r/findReplaceAll^%wf w/findReplace^%ts. "RTN","SAMIHUL",78,0) ; "RTN","SAMIHUL",79,0) ; 2018-03-06 ven/gpl 18.0-t4 "RTN","SAMIHUL",80,0) ; SAMIHOM3 ? "RTN","SAMIHUL",81,0) ; "RTN","SAMIHUL",82,0) ; 2018-03-07 ven/toad 18.0-t4 "RTN","SAMIHUL",83,0) ; SAMIHOM3 in $$SID2NUM add WSNUFORM^SAMICASE to called-by; in "RTN","SAMIHUL",84,0) ; keyDate,GETHOME update called-by. "RTN","SAMIHUL",85,0) ; "RTN","SAMIHUL",86,0) ; 2018-05-18/25 ven/lgc&arc 18.0-t4 76020fd,81b1048,65afd99 "RTN","SAMIHUL",87,0) ; SAMIHOM3 new SAMIHOM3 for new patient search page, chg submit "RTN","SAMIHUL",88,0) ; processing on forms, fix bug in postform. "RTN","SAMIHUL",89,0) ; "RTN","SAMIHUL",90,0) ; 2018-06-14/07-10 ven/lgc&arc 18.0-t4 d71f4fe,8b0a432,ce345db, "RTN","SAMIHUL",91,0) ; 402b6a8,14f991d,2e9662b "RTN","SAMIHUL",92,0) ; SAMIHOM3 make background form optional; 1st version of CT Eval "RTN","SAMIHUL",93,0) ; Report; reorg ctreport routines & 1st crack at impressions & "RTN","SAMIHUL",94,0) ; recommendations; note produced for intake form on submit; add "RTN","SAMIHUL",95,0) ; support for routing by patient in CPRS Tools Menu, modify "RTN","SAMIHUL",96,0) ; wsHOME^SAMIHOM3 to properly route VA-PALS web app when launced via "RTN","SAMIHUL",97,0) ; CPRS Tools Menu; repair SAMIHOM3 & redact report link. "RTN","SAMIHUL",98,0) ; "RTN","SAMIHUL",99,0) ; 2018-08-22 ven/gpl 18.0-t4 6e696a9 "RTN","SAMIHUL",100,0) ; SAMIHOM3 add PTINFO call to vista to pull ssn. "RTN","SAMIHUL",101,0) ; "RTN","SAMIHUL",102,0) ; 2018-09-30/11-01 ven/lgc&arc 18.0-t4 d93c640,482f522,a8e4226, "RTN","SAMIHUL",103,0) ; ee5e8a1 "RTN","SAMIHUL",104,0) ; SAMIHOM3 hdr & prefill of intake; new input form features, report "RTN","SAMIHUL",105,0) ; menu fix; set urban/rural status at siform setup; handle zip code "RTN","SAMIHUL",106,0) ; unknown. "RTN","SAMIHUL",107,0) ; "RTN","SAMIHUL",108,0) ; 2018-11-09/2019-01-22 ven/lgc&arc&lmry 18.0-t4 bac4f73,5400035, "RTN","SAMIHUL",109,0) ; dd341e0,a953946,e2a44e6,2356c2b,3ceb74b,3088307,4271b46,7a5d340, "RTN","SAMIHUL",110,0) ; dfbb0bc,fd1bcee,8dd6f34,51eb163,dbdb5a4,0880027,ccba017,5368121 "RTN","SAMIHUL",111,0) ; SAMIHOM3 unit tests, annotation, sac compliance, XINDEX bugs, fix "RTN","SAMIHUL",112,0) ; accidental reversions, add license info. "RTN","SAMIHUL",113,0) ; "RTN","SAMIHUL",114,0) ; 2018-12-18/20 ven/arc 18.0-t4 3088307f,4271b46b,dfbb0bca, "RTN","SAMIHUL",115,0) ; b8ff6da9,fd1bceee "RTN","SAMIHUL",116,0) ; SAMIHOM4 va sac compliance & variable namespacing. "RTN","SAMIHUL",117,0) ; "RTN","SAMIHUL",118,0) ; 2019-01-01/02-18 ven/lgc 18.0-t4 0880027c,18aa0fec,fcd635c1, "RTN","SAMIHUL",119,0) ; 53681219,76874314 "RTN","SAMIHUL",120,0) ; SAMIHOM3 update w/ recent changes. "RTN","SAMIHUL",121,0) ; SAMIHOM4 updates for va sac & code coverage, add license info. "RTN","SAMIHUL",122,0) ; "RTN","SAMIHUL",123,0) ; 2019-04-15 ven/gpl 18.0-t4 b403bf01 "RTN","SAMIHUL",124,0) ; SAMIHOM4 support for new intake notes. "RTN","SAMIHUL",125,0) ; "RTN","SAMIHUL",126,0) ; 2019-04-16 ven/lgc 18.0-t4 e54b76d1 "RTN","SAMIHUL",127,0) ; SAMIHOM4 update for SAMIFORM project. "RTN","SAMIHUL",128,0) ; "RTN","SAMIHUL",129,0) ; 2019-04-17 ven/gpl 18.0-t4 7d1f86db "RTN","SAMIHUL",130,0) ; SAMIHOM3 prefill date on intake prelim discussion section. "RTN","SAMIHUL",131,0) ; "RTN","SAMIHUL",132,0) ; 2019-06-18 ven/arc 18.0-t4 91022482 "RTN","SAMIHUL",133,0) ; SAMIHOM4 switch fr/global ^SAMIGPL to/^SAMIUL. "RTN","SAMIHUL",134,0) ; "RTN","SAMIHUL",135,0) ; 2019-08-05 ven/gpl 18.0-t4 9c0c2ed3 "RTN","SAMIHUL",136,0) ; SAMIHOM3 add GETPRFX to get right prefix at registration. "RTN","SAMIHUL",137,0) ; "RTN","SAMIHUL",138,0) ; 2019-08-07 ven/lgc&arc 18.0-t4 603194b9,37967fc5 "RTN","SAMIHUL",139,0) ; SAMIHOM3 consolidate calls to retrieve facility prefix. "RTN","SAMIHUL",140,0) ; "RTN","SAMIHUL",141,0) ; 2019-11-22 par/ddn 18.0-t4 b2cc389d vap-458 "RTN","SAMIHUL",142,0) ; SAMIHOM4 manual registration. "RTN","SAMIHUL",143,0) ; "RTN","SAMIHUL",144,0) ; 2020-01-01/05 ven/lgc 18.0-t4 c169f4b1,5928064a,62e3200f "RTN","SAMIHUL",145,0) ; SAMIHOM4 support for unmatched patient processing, more changes "RTN","SAMIHUL",146,0) ; for participant matching, unmatched participant processing ready "RTN","SAMIHUL",147,0) ; for testing. "RTN","SAMIHUL",148,0) ; "RTN","SAMIHUL",149,0) ; 2020-01-08/10 ven/gpl 18.0 a002f850,47dfe3cd "RTN","SAMIHUL",150,0) ; SAMIHOM4 bug fix for unmatched processing, turn off & on manual "RTN","SAMIHUL",151,0) ; registration link on home page. "RTN","SAMIHUL",152,0) ; "RTN","SAMIHUL",153,0) ; 2020-01-10 ven/gpl 18.0 4c8e6ebc,76b465cb "RTN","SAMIHUL",154,0) ; SAMIHOM4 3 quits with returns for cache. "RTN","SAMIHUL",155,0) ; "RTN","SAMIHUL",156,0) ; 2020-01-16 ven/lgc 18.0 0a2af965 "RTN","SAMIHUL",157,0) ; SAMIHOM4 bulk commit due to switch to cache. "RTN","SAMIHUL",158,0) ; "RTN","SAMIHUL",159,0) ; 2020-01-17/20 ven/lgc 18.1 8557207f,dc5f618c "RTN","SAMIHUL",160,0) ; SAMIHOM4 followup note, limit to one note per followup form. "RTN","SAMIHUL",161,0) ; "RTN","SAMIHUL",162,0) ; 2020-02-01/02 ven/lgc 18.4 3065146d,36ae0ed1 "RTN","SAMIHUL",163,0) ; SAMIHOM4 set options for text based ctreport, switch default "RTN","SAMIHUL",164,0) ; ctreport to text. "RTN","SAMIHUL",165,0) ; "RTN","SAMIHUL",166,0) ; 2020-04-02/11 ven/gpl 18.5 d36b7cad,36607664,befde317,56bfaed6, "RTN","SAMIHUL",167,0) ; 666f5b91,2f2c29c1 "RTN","SAMIHUL",168,0) ; SAMIHOM3 multitenancy; in GENSTDID add ARG param, determin prefix "RTN","SAMIHUL",169,0) ; from site or siteid (ARG) instead of calling $$GETPRFX^SAMIFORM. "RTN","SAMIHUL",170,0) ; SAMIHOM4 multitenancy + fix bug in WSVAPALS. "RTN","SAMIHUL",171,0) ; "RTN","SAMIHUL",172,0) ; 2020-04-18/05-07 ven/gpl 18.5 29d7dba7,d55de214,521e0bdc,d018f52e, "RTN","SAMIHUL",173,0) ; 476b2ff4,61c7d208 "RTN","SAMIHUL",174,0) ; SAMIHOM4 fix bug & weird error in manual registration, fix bug in "RTN","SAMIHUL",175,0) ; logout, logout working, superuser site selection, worklist "RTN","SAMIHUL",176,0) ; functionality. "RTN","SAMIHUL",177,0) ; "RTN","SAMIHUL",178,0) ; 2020-08-06 ven/gpl 18.6 781744c3 "RTN","SAMIHUL",179,0) ; SAMIHOM4 changes to support hl7 transmission of notes. "RTN","SAMIHUL",180,0) ; "RTN","SAMIHUL",181,0) ; 2020-09-22 ven/gpl 18.9 06459eda "RTN","SAMIHUL",182,0) ; SAMIHOM4 correct to match kids file. "RTN","SAMIHUL",183,0) ; "RTN","SAMIHUL",184,0) ; 2021-03-02 ven/gpl 18.9 479dc041 "RTN","SAMIHUL",185,0) ; SAMIHOM4 return error message if no ct eval form exists when "RTN","SAMIHUL",186,0) ; generating a fu note. "RTN","SAMIHUL",187,0) ; "RTN","SAMIHUL",188,0) ; 2021-03-11 ven/toad 18.9 a46a2cc1 "RTN","SAMIHUL",189,0) ; SAMIHUL create routine. "RTN","SAMIHUL",190,0) ; SAMIHOM4 bump date & patch list, add contents, lt refactor. "RTN","SAMIHUL",191,0) ; "RTN","SAMIHUL",192,0) ; 2021-03-17 ven/toad 18.9 "RTN","SAMIHUL",193,0) ; SAMIHOM4 remove blank from end of 1 line. "RTN","SAMIHUL",194,0) ; "RTN","SAMIHUL",195,0) ; 2021-05-29 ven/gpl 18.12-t2 59ea0811 "RTN","SAMIHUL",196,0) ; SAMIHOM3 in SID2NUM look up by pien instead of relying on sid "RTN","SAMIHUL",197,0) ; containing pien. "RTN","SAMIHUL",198,0) ; "RTN","SAMIHUL",199,0) ; 2021-06-15 ven/gpl 18.12-t2 e247ea59 "RTN","SAMIHUL",200,0) ; SAMIHOM4 eliminate icn. "RTN","SAMIHUL",201,0) ; "RTN","SAMIHUL",202,0) ; 2021-06-15/16 ven/mcglk&toad 18.12-t2 cbf7e46b,fa794d60 "RTN","SAMIHUL",203,0) ; SAMIHOM3 move log to SAMIHUL, bump dates & versions, annotate, "RTN","SAMIHUL",204,0) ; reorg, lt refactor. "RTN","SAMIHUL",205,0) ; SAMIHOM4 bump dates & versions; begin annotate, reorg, lt refactor "RTN","SAMIHUL",206,0) ; but interrupted by addition of critical fix to patch & bronchitis, "RTN","SAMIHUL",207,0) ; so leave refactor unfinished (but stable as far as it went). "RTN","SAMIHUL",208,0) ; SAMIUTH3 bump dates & versions, lt refactor, add COVER, in UTSCAN4 "RTN","SAMIHUL",209,0) ; fix $random bug, but after discovering the SAMI test suite is so "RTN","SAMIHUL",210,0) ; far out of date that it fails catastrophically with thousands of "RTN","SAMIHUL",211,0) ; errors, back out changes and leave as it was. "RTN","SAMIHUL",212,0) ; "RTN","SAMIHUL",213,0) ; 2021-08-01 ven/gpl 18.12 5bd7c627 "RTN","SAMIHUL",214,0) ; SAMIHOM3 set intake form to incomplete on creation: in MKSIFORM "RTN","SAMIHUL",215,0) ; r/complete w/incomplete. "RTN","SAMIHUL",216,0) ; "RTN","SAMIHUL",217,0) ; 2021-09-20/23 ven/gpl 18-x-16 db1b173a,465b009d "RTN","SAMIHUL",218,0) ; SAMIHOM4 (with new routine SAMIZPH1) developed to import data from "RTN","SAMIHUL",219,0) ; Philadelphia VA's previous LCS database in Red Cap, bump dates & versions. "RTN","SAMIHUL",220,0) ; "RTN","SAMIHUL",221,0) ; 2021-9-24 ven/lmry 18-16 465b009d "RTN","SAMIHUL",222,0) ; SAMIHOM4 bumped versions and dates "RTN","SAMIHUL",223,0) ; "RTN","SAMIHUL",224,0) ; 2021-10-19 ven/gpl 18-15 138d45e5 "RTN","SAMIHUL",225,0) ; SAMIHOM4 parameterize veteran vs participant or candidate for notes "RTN","SAMIHUL",226,0) ; "RTN","SAMIHUL",227,0) ; 2021-10-29 ven/lmry 18-15 4267917c "RTN","SAMIHUL",228,0) ; SAMIHOM4 and SAMIHUL bumped versions and dates "RTN","SAMIHUL",229,0) ; "RTN","SAMIHUL",230,0) ; 2021-11-01 ven/gpl 18-15 e4722e8f0 "RTN","SAMIHUL",231,0) ; SAMIHOM4 prevent using SYS as a site "RTN","SAMIHUL",232,0) ; "RTN","SAMIHUL",233,0) ; 2021-11-09 ven/gpl 18-15 34367ef0 "RTN","SAMIHUL",234,0) ; SAMIHOM4 change GETHOME to cut off GET requests "RTN","SAMIHUL",235,0) ; "RTN","SAMIHUL",236,0) ; 2021-11-10 ven/gpl 18-15 ed2a3480 "RTN","SAMIHUL",237,0) ; SAMIHOM4 support for samiroute=about points to vapals:about "RTN","SAMIHUL",238,0) ; "RTN","SAMIHUL",239,0) ; 2021-11-18 ven/lmry 18-15 "RTN","SAMIHUL",240,0) ; SAMIHOM4 and SAMIHUL bumped versions and dates "RTN","SAMIHUL",241,0) ; "RTN","SAMIHUL",242,0) ; 2022-01-12 ven/gpl 18-15 "RTN","SAMIHUL",243,0) ; SAMIHOM4 change calls to SAMIORU to use a parameterized site "RTN","SAMIHUL",244,0) ; "RTN","SAMIHUL",245,0) ; 2022-01-12 ven/lmry 18-15 "RTN","SAMIHUL",246,0) ; SAMIHOM4 and SAMIHUL bumped versions and dates "RTN","SAMIHUL",247,0) ; "RTN","SAMIHUL",248,0) ; "RTN","SAMIHUL",249,0) ;@contents "RTN","SAMIHUL",250,0) ; SAMIHOM3 homepage interface library "RTN","SAMIHUL",251,0) ; SAMIHOM4 homepage subroutines "RTN","SAMIHUL",252,0) ; SAMIHUL homepage development log "RTN","SAMIHUL",253,0) ; SAMIUTH3 tests for SAMIHOM3 "RTN","SAMIHUL",254,0) ; SAMIUTH4 tests for SAMIHOM4 "RTN","SAMIHUL",255,0) ; "RTN","SAMIHUL",256,0) ; "RTN","SAMIHUL",257,0) ; "RTN","SAMIHUL",258,0) EOR ; end of routine SAMIHUL "VER") 8.0^22.2 **END** **END**
Genshi
5
OSEHRA/SAMI-VAPALS-ELCAP
dist/18-15/t3/sami-18-15-t3.kid
[ "Apache-2.0" ]
!macro customInstall WriteRegStr SHCTX "SOFTWARE\RegisteredApplications" "Wexond" "Software\Clients\StartMenuInternet\Wexond\Capabilities" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond" "" "Wexond HTML Document" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond\Application" "AppUserModelId" "Wexond" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond\Application" "ApplicationIcon" "$INSTDIR\Wexond.exe,0" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond\Application" "ApplicationName" "Wexond" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond\Application" "ApplicationCompany" "Wexond" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond\Application" "ApplicationDescription" "A privacy-focused, extensible and beautiful web browser" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond\DefaultIcon" "DefaultIcon" "$INSTDIR\Wexond.exe,0" WriteRegStr SHCTX "SOFTWARE\Classes\Wexond\shell\open\command" "" '"$INSTDIR\Wexond.exe" "%1"' WriteRegStr SHCTX "SOFTWARE\Classes\.htm\OpenWithProgIds" "Wexond" "" WriteRegStr SHCTX "SOFTWARE\Classes\.html\OpenWithProgIds" "Wexond" "" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond" "" "Wexond" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\DefaultIcon" "" "$INSTDIR\Wexond.exe,0" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities" "ApplicationDescription" "A privacy-focused, extensible and beautiful web browser" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities" "ApplicationName" "Wexond" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities" "ApplicationIcon" "$INSTDIR\Wexond.exe,0" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities\FileAssociations" ".htm" "Wexond" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities\FileAssociations" ".html" "Wexond" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities\URLAssociations" "http" "Wexond" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities\URLAssociations" "https" "Wexond" WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\Capabilities\StartMenu" "StartMenuInternet" "Wexond" WriteRegDWORD SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\InstallInfo" "IconsVisible" 1 WriteRegStr SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond\shell\open\command" "" "$INSTDIR\Wexond.exe" !macroend !macro customUnInstall DeleteRegKey SHCTX "SOFTWARE\Classes\Wexond" DeleteRegKey SHCTX "SOFTWARE\Clients\StartMenuInternet\Wexond" DeleteRegValue SHCTX "SOFTWARE\RegisteredApplications" "Wexond" !macroend
NSIS
3
sentialx/wexond
static/installer.nsh
[ "MIT" ]
#ifndef _NetClient_H_ #define _NetClient_H_ #include <map> #include <string> #include <cstring> #include <stdbool.h> #include <stdlib.h> #include <glib.h> #include <glib/gstdio.h> #include <glib-object.h> #include <json-glib/json-glib.h> #include <curl/curl.h> using namespace std; typedef enum { {{prefix}}_ERROR_NONE = 0, /**< Successful */ {{prefix}}_ERROR_UNKNOWN, /**< Unknown error */ {{prefix}}_ERROR_NO_RESPONSE_BODY, /**< No response body error */ {{prefix}}_ERROR_JSON_PARSING_FAIL, /**< Parsing fail of json data */ {{prefix}}_ERROR_UNREACHED_TO_SERVER, /**< Unreached to artik cloud server */ {{prefix}}_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ {{prefix}}_ERROR_PERMISSION_DENIED /**< Permission denied */ } {{prefix}}_error_e; typedef enum { NET_HTTP_GET = 0, NET_HTTP_POST, NET_HTTP_PUT, NET_HTTP_DELETE, NET_HTTP_HEAD, NET_HTTP_TRACE, NET_HTTP_OPTIONS, NET_HTTP_CONNECT, NET_HTTP_PATCH } NetHttpMethod; struct MemoryStruct_s { char *memory; size_t size; }; class NetClient { public: NetClient(); virtual ~NetClient(); static int easycurl(string host, string path, string method, map<string, string> queryParams, string mBody, struct curl_slist* headerList, MemoryStruct_s* p_chunk, long* code, char* errormsg); }; #endif /* NetClient_H_ */
HTML+Django
4
MalcolmScoffable/openapi-generator
modules/openapi-generator/src/main/resources/cpp-tizen-client/netclient-header.mustache
[ "Apache-2.0" ]
package io.swagger.common { import io.swagger.common.ApiUserCredentials; /** * @private * Internal class for the Rest client */ internal class ApiUrlHelper { private static const API_URL_KEY:String = "api_key"; private static const AUTH_TOKEN_URL_KEY:String = "auth_token"; private static const HTTP_URL_PREFIX:String = "http://"; internal static function appendTokenInfo(restUrl:String, requestHeader: Object, credentials: ApiUserCredentials): String { //checks for the presence api credentials on client initialization and not repeated here if(restUrl.indexOf("?") == -1){ restUrl += ( "?" + API_URL_KEY + "=" + credentials.apiToken ); } else{ restUrl += ( "&" + API_URL_KEY + "=" + credentials.apiToken ); } requestHeader.api_key = credentials.apiToken; if(credentials.authToken != null && credentials.authToken != ""){ restUrl += ( "&" + AUTH_TOKEN_URL_KEY + "=" + credentials.authToken ); requestHeader.auth_token = credentials.authToken; } return restUrl; } internal static function getProxyUrl(hostName: String, proxyPath: String): String{ if (hostName..charAt(hostName.length) == "/") //remove trailing slash { hostName = hostName.substring(0, hostName.length - 1); } return HTTP_URL_PREFIX + hostName + proxyPath; } } }
ActionScript
5
wwadge/swagger-codegen
samples/client/petstore/flash/flash/src/io/swagger/common/ApiUrlHelper.as
[ "Apache-2.0" ]
filedesc:// ... text/plain 1 1 URL IP-address Archive-date Content-type Archive-length
Arc
0
CodeMR-Models/droid
droid-core/test-skeletons/fmt/fmt-410-signature-id-580.arc
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
(* Generic lens for shell-script config files like the ones found *) (* in /etc/sysconfig, where a string needs to be split into *) (* single words. *) module Shellvars_list = autoload xfm let eol = Util.eol let key_re = /[A-Za-z0-9_]+/ let eq = Util.del_str "=" let comment = Util.comment let comment_or_eol = Util.comment_or_eol let empty = Util.empty let indent = Util.indent let sqword = /[^ '\t\n]+/ let dqword = /([^ "\\\t\n]|\\\\.)+/ let uqword = /([^ `"'\\\t\n]|\\\\.)+/ let bqword = /`[^`\n]*`/ let space_or_nl = /[ \t\n]+/ let space_or_cl = space_or_nl | Rx.cl (* lists values of the form ... val1 val2 val3 ... *) let list (word:regexp) (sep:regexp) = let list_value = store word in indent . [ label "value" . list_value ] . [ del sep " " . label "value" . list_value ]* . indent (* handle single quoted lists *) let squote_arr = [ label "quote" . store /'/ ] . (list sqword space_or_nl)? . del /'/ "'" (* similarly handle double qouted lists *) let dquote_arr = [ label "quote" . store /"/ ] . (list dqword space_or_cl)? . del /"/ "\"" (* handle unquoted single value *) let unquot_val = [ label "quote" . store "" ] . [ label "value" . store (uqword+ | bqword)]? (* lens for key value pairs *) let kv = [ key key_re . eq . ( (squote_arr | dquote_arr) . comment_or_eol | unquot_val . eol ) ] let lns = ( comment | empty | kv )* let filter = incl "/etc/sysconfig/bootloader" . incl "/etc/sysconfig/kernel" let xfm = transform lns filter (* Local Variables: *) (* mode: caml *) (* End: *)
Augeas
4
ckaenzig/puppet-varnish
lib/augeas/lenses/shellvars_list.aug
[ "Apache-2.0" ]
=pod =head1 NAME PKCS7_type_is_other - determine content type of PKCS#7 envelopedData structure =head1 SYNOPSIS #include <openssl/pkcs7.h> int PKCS7_type_is_other(PKCS7 *p7); =head1 DESCRIPTION PKCS7_type_is_other() returns the whether the content type of a PKCS#7 envelopedData structure is one of the following content types: NID_pkcs7_data NID_pkcs7_signed NID_pkcs7_enveloped NID_pkcs7_signedAndEnveloped NID_pkcs7_digest NID_pkcs7_encrypted =head1 RETURN VALUES PKCS7_type_is_other() returns either 0 if the content type is matched or 1 otherwise. =head1 SEE ALSO L<PKCS7_type_is_data(3)>, L<PKCS7_get_octet_string(3)> =head1 COPYRIGHT Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L<https://www.openssl.org/source/license.html>. =cut
Pod
3
pmesnier/openssl
doc/man3/PKCS7_type_is_other.pod
[ "Apache-2.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. */ package ajswing; import javax.swing.JComponent; import java.awt.EventQueue; import java.awt.Component; import java.awt.Container; aspect SwingThreadRuleCheck { pointcut swingMethods(JComponent comp) : target(comp) && execution(public * javax.swing..*(..)); pointcut threadsafeMethods() : execution(* *..repaint(..)) || execution(* *..revalidate(..)) || execution(* *..get*(..)) || execution(* *..is*(..)) || execution(* *..putClientProperty(..)) || execution(* *..reshape(..)) || execution(* *..addNotify()) || execution(* *..setVisible(..)) || execution(* *..add*Listener(..)) || execution(* *..remove*Listener(..)); before(JComponent comp) : ! threadsafeMethods() && swingMethods(comp) && ! if (EventQueue.isDispatchThread()) && if (comp.isShowing()) && ! cflow(call(public void java.awt.Window.pack())) { if (thisJoinPointStaticPart.getSignature().getDeclaringType().getName().startsWith("javax.swing.")) { System.err.println("SwingThreadRuleCheck: Swing Single-Thread rule is being violated"); Thread.dumpStack(); } } }
AspectJ
4
Antholoj/netbeans
java/performance/aspectj/SwingThreadRuleCheck.aj
[ "Apache-2.0" ]
/* Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #ifndef TF2SIMD_QUADWORD_H #define TF2SIMD_QUADWORD_H #include "Scalar.h" #include "MinMax.h" #if defined (__CELLOS_LV2) && defined (__SPU__) #include <altivec.h> #endif namespace tf2 { /**@brief The QuadWord class is base class for Vector3 and Quaternion. * Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword. */ #ifndef USE_LIBSPE2 ATTRIBUTE_ALIGNED16(class) QuadWord #else class QuadWord #endif { protected: #if defined (__SPU__) && defined (__CELLOS_LV2__) union { vec_float4 mVec128; tf2Scalar m_floats[4]; }; public: vec_float4 get128() const { return mVec128; } protected: #else //__CELLOS_LV2__ __SPU__ tf2Scalar m_floats[4]; #endif //__CELLOS_LV2__ __SPU__ public: /**@brief Return the x value */ TF2SIMD_FORCE_INLINE const tf2Scalar& getX() const { return m_floats[0]; } /**@brief Return the y value */ TF2SIMD_FORCE_INLINE const tf2Scalar& getY() const { return m_floats[1]; } /**@brief Return the z value */ TF2SIMD_FORCE_INLINE const tf2Scalar& getZ() const { return m_floats[2]; } /**@brief Set the x value */ TF2SIMD_FORCE_INLINE void setX(tf2Scalar x) { m_floats[0] = x;}; /**@brief Set the y value */ TF2SIMD_FORCE_INLINE void setY(tf2Scalar y) { m_floats[1] = y;}; /**@brief Set the z value */ TF2SIMD_FORCE_INLINE void setZ(tf2Scalar z) { m_floats[2] = z;}; /**@brief Set the w value */ TF2SIMD_FORCE_INLINE void setW(tf2Scalar w) { m_floats[3] = w;}; /**@brief Return the x value */ TF2SIMD_FORCE_INLINE const tf2Scalar& x() const { return m_floats[0]; } /**@brief Return the y value */ TF2SIMD_FORCE_INLINE const tf2Scalar& y() const { return m_floats[1]; } /**@brief Return the z value */ TF2SIMD_FORCE_INLINE const tf2Scalar& z() const { return m_floats[2]; } /**@brief Return the w value */ TF2SIMD_FORCE_INLINE const tf2Scalar& w() const { return m_floats[3]; } //TF2SIMD_FORCE_INLINE tf2Scalar& operator[](int i) { return (&m_floats[0])[i]; } //TF2SIMD_FORCE_INLINE const tf2Scalar& operator[](int i) const { return (&m_floats[0])[i]; } ///operator tf2Scalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons. TF2SIMD_FORCE_INLINE operator tf2Scalar *() { return &m_floats[0]; } TF2SIMD_FORCE_INLINE operator const tf2Scalar *() const { return &m_floats[0]; } TF2SIMD_FORCE_INLINE bool operator==(const QuadWord& other) const { return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0])); } TF2SIMD_FORCE_INLINE bool operator!=(const QuadWord& other) const { return !(*this == other); } /**@brief Set x,y,z and zero w * @param x Value of x * @param y Value of y * @param z Value of z */ TF2SIMD_FORCE_INLINE void setValue(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z) { m_floats[0]=x; m_floats[1]=y; m_floats[2]=z; m_floats[3] = 0.f; } /* void getValue(tf2Scalar *m) const { m[0] = m_floats[0]; m[1] = m_floats[1]; m[2] = m_floats[2]; } */ /**@brief Set the values * @param x Value of x * @param y Value of y * @param z Value of z * @param w Value of w */ TF2SIMD_FORCE_INLINE void setValue(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z,const tf2Scalar& w) { m_floats[0]=x; m_floats[1]=y; m_floats[2]=z; m_floats[3]=w; } /**@brief No initialization constructor */ TF2SIMD_FORCE_INLINE QuadWord() // :m_floats[0](tf2Scalar(0.)),m_floats[1](tf2Scalar(0.)),m_floats[2](tf2Scalar(0.)),m_floats[3](tf2Scalar(0.)) { } /**@brief Three argument constructor (zeros w) * @param x Value of x * @param y Value of y * @param z Value of z */ TF2SIMD_FORCE_INLINE QuadWord(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z) { m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = 0.0f; } /**@brief Initializing constructor * @param x Value of x * @param y Value of y * @param z Value of z * @param w Value of w */ TF2SIMD_FORCE_INLINE QuadWord(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z,const tf2Scalar& w) { m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = w; } /**@brief Set each element to the max of the current values and the values of another QuadWord * @param other The other QuadWord to compare with */ TF2SIMD_FORCE_INLINE void setMax(const QuadWord& other) { tf2SetMax(m_floats[0], other.m_floats[0]); tf2SetMax(m_floats[1], other.m_floats[1]); tf2SetMax(m_floats[2], other.m_floats[2]); tf2SetMax(m_floats[3], other.m_floats[3]); } /**@brief Set each element to the min of the current values and the values of another QuadWord * @param other The other QuadWord to compare with */ TF2SIMD_FORCE_INLINE void setMin(const QuadWord& other) { tf2SetMin(m_floats[0], other.m_floats[0]); tf2SetMin(m_floats[1], other.m_floats[1]); tf2SetMin(m_floats[2], other.m_floats[2]); tf2SetMin(m_floats[3], other.m_floats[3]); } }; } #endif //TF2SIMD_QUADWORD_H
C
5
seeclong/apollo
third_party/tf2/include/tf2/LinearMath/QuadWord.h
[ "Apache-2.0" ]
/* @generated */ digraph cfg { "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_1" [label="1: Start Test.dealloc\nFormals: self:Test*\nLocals: \n " color=yellow style=filled] "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_1" -> "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_3" ; "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_2" [label="2: Exit Test.dealloc \n " color=yellow style=filled] "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_3" [label="3: Call dealloc \n " shape="box"] "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_3" -> "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_2" ; "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_1" [label="1: Start MyProtocol.numberOfFiles\nFormals: self:MyProtocol*\nLocals: \n " color=yellow style=filled] "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_1" -> "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_3" ; "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_2" [label="2: Exit MyProtocol.numberOfFiles \n " color=yellow style=filled] "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_3" [label="3: BinaryOperatorStmt: Node \n n$0=*&self:MyProtocol* [line 12, column 15]\n n$1=*n$0.numberOfFiles:int [line 12, column 15]\n *&return:int=n$1 [line 12, column 15]\n " shape="box"] "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_3" -> "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_2" ; "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_1" [label="1: Start MyProtocol.setNumberOfFiles:\nFormals: self:MyProtocol* numberOfFiles:int\nLocals: \n " color=yellow style=filled] "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_1" -> "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_3" ; "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_2" [label="2: Exit MyProtocol.setNumberOfFiles: \n " color=yellow style=filled] "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_3" [label="3: BinaryOperatorStmt: Node \n n$0=*&self:MyProtocol* [line 12, column 15]\n n$1=*&numberOfFiles:int [line 12, column 15]\n *n$0.numberOfFiles:int=n$1 [line 12, column 15]\n " shape="box"] "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_3" -> "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_2" ; }
Graphviz (DOT)
4
livinlife6751/infer
infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.m.dot
[ "MIT" ]