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 |
|---|---|---|---|---|---|
Written by Bertram Felgenhauer
>---->-->+>++++>++>+>+>+>+>-->->->>>>->-->-->-->-->->>+>-->->>>>>>+>--->++>>>>>>
++>->>>>>>>>>>>>>>>+>>>>++>->>>>+>--->++>--->--->--->++>+>+>-->->->->++++>+>>+>+
>>++>->->-->->>>>>+>>++>>>>>>-->-->+>+>>->->>++>->>>+>++>->>++++>>>+>+>-->->->>>
>>>>>>>>+>+>--->++>>>>>>>->->-->+>++>+>+>-->->-->->++>--->+>+>>++>>++>--->->->>>
>>->-->>>>>+>-->+>+>+>>->->->>++>++>>>>++++[[+>>>+<<<]<++++]>++++>>-[+[+<<-[>]>]
<<[<]>>++++++[-<<++++++++++>>]<<++.+>[<++>[+>>+<<]]+++++[+<++++>]>>[+<<+<.>>>]<<
[---[-<+++>[+++<++++++++++++++>[+++++[-<+++++>]<+>]]]]>+++>>]<<<<[.<]0
| Brainfuck | 1 | RubenNL/brainheck | examples/quine/quine-550.bf | [
"Apache-2.0"
] |
digraph Cov_0_3 {
graph [fontname="Courier, monospace"];
node [fontname="Courier, monospace"];
edge [fontname="Courier, monospace"];
bcb3__Cov_0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">bcb3</td></tr><tr><td align="left" balign="left">Counter(bcb3) at 13:10-13:10<br/> 13:10-13:10: @5[0]: Coverage::Counter(2) for $DIR/coverage_graphviz.rs:13:10 - 13:11</td></tr><tr><td align="left" balign="left">bb5: Goto</td></tr></table>>];
bcb2__Cov_0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">bcb2</td></tr><tr><td align="left" balign="left">Expression(bcb1:(bcb0 + bcb3) - bcb3) at 12:13-12:18<br/> 12:13-12:18: @4[0]: Coverage::Expression(4294967293) = 4294967294 + 0 for $DIR/coverage_graphviz.rs:15:1 - 15:2<br/>Expression(bcb2:(bcb1:(bcb0 + bcb3) - bcb3) + 0) at 15:2-15:2<br/> 15:2-15:2: @4.Return: return</td></tr><tr><td align="left" balign="left">bb4: Return</td></tr></table>>];
bcb1__Cov_0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">bcb1</td></tr><tr><td align="left" balign="left">Expression(bcb0 + bcb3) at 10:5-11:17<br/> 11:12-11:17: @2.Call: _2 = bar() -> [return: bb3, unwind: bb6]</td></tr><tr><td align="left" balign="left">bb1: FalseUnwind<br/>bb2: Call</td></tr><tr><td align="left" balign="left">bb3: SwitchInt</td></tr></table>>];
bcb0__Cov_0_3 [shape="none", label=<<table border="0" cellborder="1" cellspacing="0"><tr><td bgcolor="gray" align="center" colspan="1">bcb0</td></tr><tr><td align="left" balign="left"></td></tr><tr><td align="left" balign="left">Counter(bcb0) at 9:1-9:11<br/> </td></tr><tr><td align="left" balign="left">bb0: Goto</td></tr></table>>];
bcb3__Cov_0_3 -> bcb1__Cov_0_3 [label=<>];
bcb1__Cov_0_3 -> bcb3__Cov_0_3 [label=<false>];
bcb1__Cov_0_3 -> bcb2__Cov_0_3 [label=<otherwise>];
bcb0__Cov_0_3 -> bcb1__Cov_0_3 [label=<>];
}
| Graphviz (DOT) | 3 | ohno418/rust | src/test/mir-opt/coverage_graphviz.main.InstrumentCoverage.0.dot | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
#include <torch/nn/modules/embedding.h>
#include <torch/types.h>
#include <torch/utils.h>
#include <torch/nn/init.h>
#include <cstddef>
#include <ostream>
#include <utility>
#include <vector>
namespace F = torch::nn::functional;
namespace torch {
namespace nn {
EmbeddingImpl::EmbeddingImpl(const EmbeddingOptions& options_) : options(options_) { // NOLINT(modernize-pass-by-value)
// NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
reset();
}
void EmbeddingImpl::reset() {
if (options.padding_idx() != c10::nullopt) {
if (*options.padding_idx() > 0) {
TORCH_CHECK(*options.padding_idx() < options.num_embeddings(), "Padding_idx must be within num_embeddings");
}
else if (*options.padding_idx() < 0) {
TORCH_CHECK(*options.padding_idx() >= -options.num_embeddings(), "Padding_idx must be within num_embedding");
options.padding_idx(options.num_embeddings() + *options.padding_idx());
}
}
if (!options._weight().defined()) {
weight = register_parameter(
"weight", torch::empty({options.num_embeddings(), options.embedding_dim()}));
reset_parameters();
} else {
TORCH_CHECK(options._weight().sizes() == torch::IntArrayRef({options.num_embeddings(), options.embedding_dim()}), "Shape of _weight does not match num_embeddings and embedding_dim");
weight = register_parameter("weight", options._weight());
}
}
void EmbeddingImpl::reset_parameters() {
torch::nn::init::normal_(weight);
if (options.padding_idx() != c10::nullopt) {
torch::NoGradGuard no_grad;
weight[*options.padding_idx()].fill_(0);
}
}
void EmbeddingImpl::pretty_print(std::ostream& stream) const {
stream << "torch::nn::Embedding(num_embeddings=" << options.num_embeddings()
<< ", embedding_dim=" << options.embedding_dim();
if (options.padding_idx() != c10::nullopt) {
stream << ", padding_idx=" << *options.padding_idx();
}
if (options.max_norm() != c10::nullopt) {
stream << ", max_norm=" << *options.max_norm();
}
if (options.norm_type() != 2) {
stream << ", norm_type=" << options.norm_type();
}
if (options.scale_grad_by_freq()) {
stream << ", scale_grad_by_freq=" << std::boolalpha << options.scale_grad_by_freq();
}
if (options.sparse()) {
stream << ", sparse=" << std::boolalpha << options.sparse();
}
stream << ")";
}
torch::Tensor EmbeddingImpl::forward(const Tensor& input) {
return F::detail::embedding(
input,
weight,
options.padding_idx(),
options.max_norm(),
options.norm_type(),
options.scale_grad_by_freq(),
options.sparse());
}
EmbeddingBagImpl::EmbeddingBagImpl(const EmbeddingBagOptions& options_) : options(options_) { // NOLINT(modernize-pass-by-value)
// NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
reset();
}
void EmbeddingBagImpl::reset() {
if (options.padding_idx().has_value()) {
auto padding_idx = options.padding_idx().value();
if (padding_idx > 0) {
TORCH_CHECK(padding_idx < options.num_embeddings(), "Padding_idx must be within num_embeddings");
}
else if (padding_idx < 0) {
TORCH_CHECK(padding_idx >= -options.num_embeddings(), "Padding_idx must be within num_embedding");
options.padding_idx(options.num_embeddings() + padding_idx);
}
}
if (!options._weight().defined()) {
weight = register_parameter(
"weight", torch::empty({options.num_embeddings(), options.embedding_dim()}));
reset_parameters();
} else {
TORCH_CHECK(
options._weight().sizes() == torch::IntArrayRef({options.num_embeddings(), options.embedding_dim()}),
"Shape of weight does not match num_embeddings and embedding_dim");
weight = register_parameter("weight", options._weight());
}
}
void EmbeddingBagImpl::reset_parameters() {
if (options.padding_idx().has_value()) {
torch::NoGradGuard no_grad;
weight[options.padding_idx().value()].fill_(0);
}
torch::nn::init::normal_(weight);
}
torch::Tensor EmbeddingBagImpl::forward(const Tensor& input, const Tensor& offsets, const Tensor& per_sample_weights) {
return F::detail::embedding_bag(
input,
weight,
offsets,
options.max_norm(),
options.norm_type(),
options.scale_grad_by_freq(),
options.mode(),
options.sparse(),
per_sample_weights,
options.include_last_offset(),
options.padding_idx());
}
void EmbeddingBagImpl::pretty_print(std::ostream& stream) const {
stream << "torch::nn::EmbeddingBag(num_embeddings=" << options.num_embeddings()
<< ", embedding_dim=" << options.embedding_dim();
if (options.max_norm() != c10::nullopt) {
stream << ", max_norm=" << *options.max_norm();
}
if (options.norm_type() != 2) {
stream << ", norm_type=" << options.norm_type();
}
if (options.scale_grad_by_freq()) {
stream << ", scale_grad_by_freq=" << std::boolalpha << options.scale_grad_by_freq();
}
if (options.sparse()) {
stream << ", sparse=" << std::boolalpha << options.sparse();
}
if (!c10::get_if<enumtype::kMean>(&options.mode())) {
stream << ", mode=" << torch::enumtype::get_enum_name(options.mode());
}
if (options.include_last_offset()) {
stream << ", include_last_offset=" << std::boolalpha << options.include_last_offset();
}
if (options.padding_idx().has_value()) {
stream << ", padding_idx=" << options.padding_idx().value();
}
stream << ")";
}
} // namespace nn
} // namespace torch
| C++ | 4 | Hacky-DH/pytorch | torch/csrc/api/src/nn/modules/embedding.cpp | [
"Intel"
] |
--TEST--
yield from parses too greedily
--FILE--
<?php
function from1234($x) {
return $x;
}
function bar() {
yield 24;
}
function foo() {
yield from1234(42);
yield from(bar());
}
foreach (foo() as $value) {
var_dump($value);
}
?>
--EXPECT--
int(42)
int(24)
| PHP | 4 | NathanFreeman/php-src | Zend/tests/generators/yield_from_greedy_parse.phpt | [
"PHP-3.01"
] |
(***********************************************************
EVENT TEST EXAMPLE
Website: https://sourceforge.net/projects/amx-test-suite/
An example of how to use an include file that was set up
for event testing within the production environment.
************************************************************)
PROGRAM_NAME='event-test-example'
(***********************************************************)
(***********************************************************)
(* System Type : NetLinx *)
(***********************************************************)
(* REV HISTORY: *)
(***********************************************************)
(*
History:
*)
(***********************************************************)
(* INCLUDES GO BELOW *)
(***********************************************************)
#include 'projector'
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
dvProjector = 5001:1:0; // Fictitious projector attached to the RS232 port.
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
(***********************************************************)
(* DATA TYPE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
(***********************************************************)
(* LATCHING DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_LATCHING
(***********************************************************)
(* MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_MUTUALLY_EXCLUSIVE
(***********************************************************)
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)
(***********************************************************)
(* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *)
(* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *)
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
combine_devices(vdvProjector, dvProjector); // Combine the projector virtual device to the physical device.
send_command vdvProjector, "'SET BAUD 9600,N,8,1 485 DISABLE'";
projectorOn();
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
(***********************************************************)
(* THE MAINLINE GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)
| NetLinx | 3 | RBSystems/amx-test-suite | examples/(2) events/event-test-example.axs | [
"Apache-2.0"
] |
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Whole genome shotgun assembler using phrap (for Sanger-based reads)"
HOMEPAGE="https://sourceforge.net/projects/phusion2"
SRC_URI="https://downloads.sourceforge.net/project/${PN}/${P}.tar.gz"
LICENSE="all-rights-reserved" # temporarily placed value
# from http://genome.cshlp.org/content/13/1/81.full
# Availability
# Phusion is undergoing a rewrite of the code to make this a portable package. It will be made available free of charge to academic sites, but requires licensing for commercial use. For more information please contact the authors.
SLOT="0"
KEYWORDS="~amd64"
DEPEND="app-shells/tcsh
sys-cluster/openmpi"
RDEPEND="${DEPEND}
sci-biology/phrap
dev-lang/perl"
# contains bundled ssaha
# file collision with sci-biology/shrimp on /usr/bin/fasta2fastq
S="${WORKDIR}"
src_prepare(){
default
rm -f phusion2 *.o
sed -e 's/^CFLAGS =/# CFLAGS =/' -i Makefile || die
}
src_install(){
dobin ctgreads.pl phusion2
dodoc how_to_make_mates
}
| Gentoo Ebuild | 4 | justxi/sci | sci-biology/phusion2/phusion2-3.0.ebuild | [
"BSD-3-Clause"
] |
#tag Class
Protected Class HeapEntryInformationWFS
#tag Method, Flags = &h0
Sub Constructor()
// Default constructor, do nothing
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub Constructor(mb as MemoryBlock)
// Ensure that things are sane
if mb = nil or mb.Long( 0 ) <> mb.Size then return
// Get the handle to the heap
Handle = mb.Long( 4 )
// As well as the address and size
Address = mb.Long( 8 )
BlockSize = mb.Long( 12 )
Const LF32_FIXED = &h1
Const LF32_FREE = &h2
Const LF32_MOVEABLE = &h4
// Get the flags
dim flags as Integer = mb.Long( 16 )
Fixed = Bitwise.BitAnd( flags, LF32_FIXED ) <> 0
Free = Bitwise.BitAnd( flags, LF32_FREE ) <> 0
Moveable = Bitwise.BitAnd( flags, LF32_MOVEABLE ) <> 0
// Then comes the lock count
LockCount = mb.Long( 20 )
// Skip the reserved stuff and get the IDs
OwnerProcessID = mb.Long( 28 )
OwnerHeapListID = mb.Long( 32 )
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub LoadData()
#if TargetWin32
Soft Declare Function Toolhelp32ReadProcessMemory Lib "Kernel32" ( processID as Integer, baseAddress as Integer, _
buffer as Ptr, bytesToRead as Integer, ByRef numBytesRead as Integer ) as Boolean
// Allocate a block large enough to hold all our data
Data = new MemoryBlock( BlockSize )
if Data = nil then return
// And try to read the data in
dim bytesRead as Integer = 0
if not Toolhelp32ReadProcessMemory( OwnerProcessID, Address, Data, Data.size, bytesRead ) then
Data = nil
else
Data.Size = bytesRead
end if
#endif
End Sub
#tag EndMethod
#tag Property, Flags = &h0
Address As Integer
#tag EndProperty
#tag Property, Flags = &h0
BlockSize As Integer
#tag EndProperty
#tag Property, Flags = &h0
Data As MemoryBlock
#tag EndProperty
#tag Property, Flags = &h0
Fixed As Boolean
#tag EndProperty
#tag Property, Flags = &h0
Free As Boolean
#tag EndProperty
#tag Property, Flags = &h0
Handle As Integer
#tag EndProperty
#tag Property, Flags = &h0
LockCount As Integer
#tag EndProperty
#tag Property, Flags = &h0
Moveable As Boolean
#tag EndProperty
#tag Property, Flags = &h0
OwnerHeapListID As Integer
#tag EndProperty
#tag Property, Flags = &h0
OwnerProcessID As Integer
#tag EndProperty
#tag ViewBehavior
#tag ViewProperty
Name="Address"
Group="Behavior"
InitialValue="0"
Type="Integer"
#tag EndViewProperty
#tag ViewProperty
Name="BlockSize"
Group="Behavior"
InitialValue="0"
Type="Integer"
#tag EndViewProperty
#tag ViewProperty
Name="Fixed"
Group="Behavior"
InitialValue="0"
Type="Boolean"
#tag EndViewProperty
#tag ViewProperty
Name="Free"
Group="Behavior"
InitialValue="0"
Type="Boolean"
#tag EndViewProperty
#tag ViewProperty
Name="Handle"
Group="Behavior"
InitialValue="0"
Type="Integer"
#tag EndViewProperty
#tag ViewProperty
Name="Index"
Visible=true
Group="ID"
InitialValue="-2147483648"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="Left"
Visible=true
Group="Position"
InitialValue="0"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="LockCount"
Group="Behavior"
InitialValue="0"
Type="Integer"
#tag EndViewProperty
#tag ViewProperty
Name="Moveable"
Group="Behavior"
InitialValue="0"
Type="Boolean"
#tag EndViewProperty
#tag ViewProperty
Name="Name"
Visible=true
Group="ID"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="OwnerHeapListID"
Group="Behavior"
InitialValue="0"
Type="Integer"
#tag EndViewProperty
#tag ViewProperty
Name="OwnerProcessID"
Group="Behavior"
InitialValue="0"
Type="Integer"
#tag EndViewProperty
#tag ViewProperty
Name="Super"
Visible=true
Group="ID"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="Top"
Visible=true
Group="Position"
InitialValue="0"
InheritedFrom="Object"
#tag EndViewProperty
#tag EndViewBehavior
End Class
#tag EndClass
| REALbasic | 4 | bskrtich/WFS | Windows Functionality Suite/Process Management/Classes/HeapEntryInformationWFS.rbbas | [
"MIT"
] |
/******************************************************************************
* Copyright 2018 The Apollo 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.
*****************************************************************************/
#include "modules/canbus/vehicle/gem/protocol/accel_cmd_67.h"
#include "modules/drivers/canbus/common/byte.h"
namespace apollo {
namespace canbus {
namespace gem {
using ::apollo::drivers::canbus::Byte;
const int32_t Accelcmd67::ID = 0x67;
// public
Accelcmd67::Accelcmd67() { Reset(); }
uint32_t Accelcmd67::GetPeriod() const {
// TODO(QiL) :modify every protocol's period manually
static const uint32_t PERIOD = 20 * 1000;
return PERIOD;
}
void Accelcmd67::UpdateData(uint8_t* data) {
set_p_accel_cmd(data, accel_cmd_);
}
void Accelcmd67::Reset() {
// TODO(QiL) :you should check this manually
accel_cmd_ = 0.0;
}
Accelcmd67* Accelcmd67::set_accel_cmd(double accel_cmd) {
accel_cmd_ = accel_cmd;
return this;
}
// config detail: {'name': 'ACCEL_CMD', 'offset': 0.0, 'precision': 0.001,
// 'len': 16, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 7,
// 'type': 'double', 'order': 'motorola', 'physical_unit': '%'}
void Accelcmd67::set_p_accel_cmd(uint8_t* data, double accel_cmd) {
accel_cmd = ProtocolData::BoundedValue(0.0, 1.0, accel_cmd);
int x = static_cast<int>(accel_cmd / 0.001000);
uint8_t t = 0;
t = static_cast<uint8_t>(x & 0xFF);
Byte to_set0(data + 1);
to_set0.set_value(t, 0, 8);
x >>= 8;
t = static_cast<uint8_t>(x & 0xFF);
Byte to_set1(data + 0);
to_set1.set_value(t, 0, 8);
}
} // namespace gem
} // namespace canbus
} // namespace apollo
| C++ | 5 | seeclong/apollo | modules/canbus/vehicle/gem/protocol/accel_cmd_67.cc | [
"Apache-2.0"
] |
(module
(type $t0 (func (result i32)))
(type $t1 (func (param i32) (result i32)))
(import "./wasm-table-export.wat" "table" (table $./wasm-table-export.wasm.table 2 anyfunc))
(func $callByIndex (export "callByIndex") (type $t1) (param $i i32) (result i32)
(call_indirect (type $t0)
(get_local $i))))
| WebAssembly | 3 | 1shenxi/webpack | test/cases/wasm/table/wasm-table-imported.wat | [
"MIT"
] |
use std::ops::Deref;
struct DerefWithHelper<H, T> {
pub helper: H,
pub value: Option<T>
}
trait Helper<T> {
fn helper_borrow(&self) -> &T;
}
impl<T> Helper<T> for Option<T> {
fn helper_borrow(&self) -> &T {
self.as_ref().unwrap()
}
}
impl<T, H: Helper<T>> Deref for DerefWithHelper<H, T> {
type Target = T;
fn deref(&self) -> &T {
self.helper.helper_borrow()
}
}
// Test cross-crate autoderef + vtable.
pub fn check<T: PartialEq>(x: T, y: T) -> bool {
let d: DerefWithHelper<Option<T>, T> = DerefWithHelper { helper: Some(x), value: None };
d.eq(&y)
}
| Rust | 4 | Eric-Arellano/rust | src/test/ui/overloaded/auxiliary/overloaded_autoderef_xc.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
package com.alibaba.json.bvt.parser.deser.deny;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.parser.ParserConfig;
import junit.framework.TestCase;
public class DenyTest6 extends TestCase {
public void test_autoTypeDeny() throws Exception {
ParserConfig config = new ParserConfig();
assertFalse(config.isAutoTypeSupport());
config.setAutoTypeSupport(true);
assertTrue(config.isAutoTypeSupport());
config.addDeny("com.alibaba.json.bvt.parser.deser.deny.DenyTest6");
config.setAutoTypeSupport(false);
Exception error = null;
try {
Object obj = JSON.parseObject("{\"@type\":\"com.alibaba.json.bvt.parser.deser.deny.DenyTest6$Model\"}", Object.class, config);
System.out.println(obj.getClass());
} catch (JSONException ex) {
error = ex;
}
assertNotNull(error);
}
public static class Model {
}
}
| Java | 4 | Czarek93/fastjson | src/test/java/com/alibaba/json/bvt/parser/deser/deny/DenyTest6.java | [
"Apache-2.0"
] |
struct LLVM::GlobalCollection
def initialize(@mod : Module)
end
def add(type, name)
# check_type_context(type, name)
Value.new LibLLVM.add_global(@mod, type, name)
end
def []?(name)
global = LibLLVM.get_named_global(@mod, name)
global ? Value.new(global) : nil
end
def [](name)
global = self[name]?
if global
global
else
raise "Global not found: #{name}"
end
end
# The next lines are for ease debugging when a types/values
# are incorrectly used across contexts.
# private def check_type_context(type, name)
# if @mod.context != type.context
# Context.wrong(@mod.context, type.context, "wrong context for global #{name} in #{@mod.name}, type #{type}")
# end
# end
end
| Crystal | 4 | n00p3/crystal | src/llvm/global_collection.cr | [
"Apache-2.0"
] |
# Config for production
# This is turned off in development as it is relatively slow.
# This is needed to get accurate lastMod and Git commit info
# on the docs pages.
enableGitInfo = true | TOML | 3 | jlevon/hugo | docs/config/production/config.toml | [
"Apache-2.0"
] |
CREATE TABLE `tb_quilrfojmp` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year DEFAULT '2019',
`col_aqqnunnega` varbinary(225),
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 DEFAULT 'enum_or_set_0',
UNIQUE `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rpuyybsdob` (
`col_qmvlxemsmt` datetime(6),
`col_wcntsrfsjf` int NULL DEFAULT '1',
`col_kekvofvtus` integer(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_qfmtewribz` (
`col_hocmjkikme` int unsigned,
`col_qbggcmwxyh` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NOT NULL,
`col_fulwqoqveo` mediumint unsigned zerofill,
`col_eniifaecwj` integer(159) NOT NULL DEFAULT '1',
PRIMARY KEY (`col_qbggcmwxyh`,`col_eniifaecwj`),
UNIQUE INDEX `uk_fmvsmeqnst` (`col_fulwqoqveo`),
CONSTRAINT `symb_xifnljgzcv` UNIQUE (`col_qbggcmwxyh`,`col_fulwqoqveo`)
) DEFAULT CHARSET=latin1;
CREATE TABLE `tb_odnffrvnvl` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_lttgkqunzl` (
`col_nllztggwyd` smallint unsigned DEFAULT '1'
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rkvcdukyuq` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_erkppdannn` (
`col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
`col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NULL DEFAULT 'enum_or_set_0',
`col_hwnlilelpf` smallint unsigned DEFAULT '1',
`col_oyeoemafea` date NULL DEFAULT '2019-07-04',
CONSTRAINT `symb_biynehpjlu` UNIQUE (`col_hwnlilelpf`,`col_oyeoemafea`),
CONSTRAINT `symb_yrommseaif` UNIQUE `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_knsgjmsufx` LIKE `tb_odnffrvnvl`;
CREATE TABLE `tb_ljqeyzesru` LIKE `tb_rpuyybsdob`;
CREATE TABLE `tb_szlgabmztl` (
`col_hfydymybbg` tinytext CHARACTER SET latin1,
CONSTRAINT `symb_gpchhhvhwm` UNIQUE KEY (`col_hfydymybbg`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
RENAME TABLE `tb_qfmtewribz` TO `tb_qeokuaneue`;
RENAME TABLE `tb_lttgkqunzl` TO `tb_uhjgsigdfr`, `tb_erkppdannn` TO `tb_xeoclzosgr`;
RENAME TABLE `tb_quilrfojmp` TO `tb_hycsuwyoxr`, `tb_knsgjmsufx` TO `tb_bbvvzzczcw`;
RENAME TABLE `tb_xeoclzosgr` TO `tb_fxxptceefr`;
RENAME TABLE `tb_odnffrvnvl` TO `tb_rtnozmledi`;
RENAME TABLE `tb_fxxptceefr` TO `tb_tekgceqrmv`;
RENAME TABLE `tb_hycsuwyoxr` TO `tb_hcvvpyqbtd`, `tb_szlgabmztl` TO `tb_yfjonexaag`;
RENAME TABLE `tb_tekgceqrmv` TO `tb_wewsxxqmxd`, `tb_uhjgsigdfr` TO `tb_mbvuditpbx`;
DROP TABLE tb_mbvuditpbx, tb_rkvcdukyuq;
DROP TABLE tb_rtnozmledi, tb_qeokuaneue;
CREATE TABLE `tb_quilrfojmp` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year DEFAULT '2019',
`col_aqqnunnega` varbinary(225),
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 DEFAULT 'enum_or_set_0',
UNIQUE `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rpuyybsdob` (
`col_qmvlxemsmt` datetime(6),
`col_wcntsrfsjf` int NULL DEFAULT '1',
`col_kekvofvtus` integer(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_qfmtewribz` (
`col_hocmjkikme` int unsigned,
`col_qbggcmwxyh` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NOT NULL,
`col_fulwqoqveo` mediumint unsigned zerofill,
`col_eniifaecwj` integer(159) NOT NULL DEFAULT '1',
PRIMARY KEY (`col_qbggcmwxyh`,`col_eniifaecwj`),
UNIQUE INDEX `uk_fmvsmeqnst` (`col_fulwqoqveo`),
CONSTRAINT `symb_xifnljgzcv` UNIQUE (`col_qbggcmwxyh`,`col_fulwqoqveo`)
) DEFAULT CHARSET=latin1;
CREATE TABLE `tb_odnffrvnvl` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_lttgkqunzl` (
`col_nllztggwyd` smallint unsigned DEFAULT '1'
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rkvcdukyuq` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_erkppdannn` (
`col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
`col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NULL DEFAULT 'enum_or_set_0',
`col_hwnlilelpf` smallint unsigned DEFAULT '1',
`col_oyeoemafea` date NULL DEFAULT '2019-07-04',
CONSTRAINT `symb_biynehpjlu` UNIQUE (`col_hwnlilelpf`,`col_oyeoemafea`),
CONSTRAINT `symb_yrommseaif` UNIQUE `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_knsgjmsufx` LIKE `tb_odnffrvnvl`;
CREATE TABLE `tb_ljqeyzesru` LIKE `tb_rpuyybsdob`;
CREATE TABLE `tb_szlgabmztl` (
`col_hfydymybbg` tinytext CHARACTER SET latin1,
CONSTRAINT `symb_gpchhhvhwm` UNIQUE KEY (`col_hfydymybbg`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
RENAME TABLE `tb_qfmtewribz` TO `tb_qeokuaneue`;
RENAME TABLE `tb_lttgkqunzl` TO `tb_uhjgsigdfr`, `tb_erkppdannn` TO `tb_xeoclzosgr`;
RENAME TABLE `tb_quilrfojmp` TO `tb_hycsuwyoxr`, `tb_knsgjmsufx` TO `tb_bbvvzzczcw`;
RENAME TABLE `tb_xeoclzosgr` TO `tb_fxxptceefr`;
RENAME TABLE `tb_odnffrvnvl` TO `tb_rtnozmledi`;
RENAME TABLE `tb_fxxptceefr` TO `tb_tekgceqrmv`;
RENAME TABLE `tb_hycsuwyoxr` TO `tb_hcvvpyqbtd`, `tb_szlgabmztl` TO `tb_yfjonexaag`;
RENAME TABLE `tb_tekgceqrmv` TO `tb_wewsxxqmxd`, `tb_uhjgsigdfr` TO `tb_mbvuditpbx`;
DROP TABLE tb_mbvuditpbx, tb_rkvcdukyuq;
DROP TABLE tb_rtnozmledi, tb_qeokuaneue;
CREATE TABLE `tb_quilrfojmp` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year DEFAULT '2019',
`col_aqqnunnega` varbinary(225),
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 DEFAULT 'enum_or_set_0',
UNIQUE `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rpuyybsdob` (
`col_qmvlxemsmt` datetime(6),
`col_wcntsrfsjf` int NULL DEFAULT '1',
`col_kekvofvtus` integer(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_qfmtewribz` (
`col_hocmjkikme` int unsigned,
`col_qbggcmwxyh` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NOT NULL,
`col_fulwqoqveo` mediumint unsigned zerofill,
`col_eniifaecwj` integer(159) NOT NULL DEFAULT '1',
PRIMARY KEY (`col_qbggcmwxyh`,`col_eniifaecwj`),
UNIQUE INDEX `uk_fmvsmeqnst` (`col_fulwqoqveo`),
CONSTRAINT `symb_xifnljgzcv` UNIQUE (`col_qbggcmwxyh`,`col_fulwqoqveo`)
) DEFAULT CHARSET=latin1;
CREATE TABLE `tb_odnffrvnvl` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_lttgkqunzl` (
`col_nllztggwyd` smallint unsigned DEFAULT '1'
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rkvcdukyuq` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_erkppdannn` (
`col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
`col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NULL DEFAULT 'enum_or_set_0',
`col_hwnlilelpf` smallint unsigned DEFAULT '1',
`col_oyeoemafea` date NULL DEFAULT '2019-07-04',
CONSTRAINT `symb_biynehpjlu` UNIQUE (`col_hwnlilelpf`,`col_oyeoemafea`),
CONSTRAINT `symb_yrommseaif` UNIQUE `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_knsgjmsufx` LIKE `tb_odnffrvnvl`;
CREATE TABLE `tb_ljqeyzesru` LIKE `tb_rpuyybsdob`;
CREATE TABLE `tb_szlgabmztl` (
`col_hfydymybbg` tinytext CHARACTER SET latin1,
CONSTRAINT `symb_gpchhhvhwm` UNIQUE KEY (`col_hfydymybbg`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
RENAME TABLE `tb_qfmtewribz` TO `tb_qeokuaneue`;
RENAME TABLE `tb_lttgkqunzl` TO `tb_uhjgsigdfr`, `tb_erkppdannn` TO `tb_xeoclzosgr`;
RENAME TABLE `tb_quilrfojmp` TO `tb_hycsuwyoxr`, `tb_knsgjmsufx` TO `tb_bbvvzzczcw`;
RENAME TABLE `tb_xeoclzosgr` TO `tb_fxxptceefr`;
RENAME TABLE `tb_odnffrvnvl` TO `tb_rtnozmledi`;
RENAME TABLE `tb_fxxptceefr` TO `tb_tekgceqrmv`;
RENAME TABLE `tb_hycsuwyoxr` TO `tb_hcvvpyqbtd`, `tb_szlgabmztl` TO `tb_yfjonexaag`;
RENAME TABLE `tb_tekgceqrmv` TO `tb_wewsxxqmxd`, `tb_uhjgsigdfr` TO `tb_mbvuditpbx`;
DROP TABLE tb_mbvuditpbx, tb_rkvcdukyuq;
DROP TABLE tb_rtnozmledi, tb_qeokuaneue;
CREATE TABLE `tb_quilrfojmp` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year DEFAULT '2019',
`col_aqqnunnega` varbinary(225),
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 DEFAULT 'enum_or_set_0',
UNIQUE `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rpuyybsdob` (
`col_qmvlxemsmt` datetime(6),
`col_wcntsrfsjf` int NULL DEFAULT '1',
`col_kekvofvtus` integer(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_qfmtewribz` (
`col_hocmjkikme` int unsigned,
`col_qbggcmwxyh` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NOT NULL,
`col_fulwqoqveo` mediumint unsigned zerofill,
`col_eniifaecwj` integer(159) NOT NULL DEFAULT '1',
PRIMARY KEY (`col_qbggcmwxyh`,`col_eniifaecwj`),
UNIQUE INDEX `uk_fmvsmeqnst` (`col_fulwqoqveo`),
CONSTRAINT `symb_xifnljgzcv` UNIQUE (`col_qbggcmwxyh`,`col_fulwqoqveo`)
) DEFAULT CHARSET=latin1;
CREATE TABLE `tb_odnffrvnvl` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_lttgkqunzl` (
`col_nllztggwyd` smallint unsigned DEFAULT '1'
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rkvcdukyuq` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_erkppdannn` (
`col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
`col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NULL DEFAULT 'enum_or_set_0',
`col_hwnlilelpf` smallint unsigned DEFAULT '1',
`col_oyeoemafea` date NULL DEFAULT '2019-07-04',
CONSTRAINT `symb_biynehpjlu` UNIQUE (`col_hwnlilelpf`,`col_oyeoemafea`),
CONSTRAINT `symb_yrommseaif` UNIQUE `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_knsgjmsufx` LIKE `tb_odnffrvnvl`;
CREATE TABLE `tb_ljqeyzesru` LIKE `tb_rpuyybsdob`;
CREATE TABLE `tb_szlgabmztl` (
`col_hfydymybbg` tinytext CHARACTER SET latin1,
CONSTRAINT `symb_gpchhhvhwm` UNIQUE KEY (`col_hfydymybbg`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
RENAME TABLE `tb_qfmtewribz` TO `tb_qeokuaneue`;
RENAME TABLE `tb_lttgkqunzl` TO `tb_uhjgsigdfr`, `tb_erkppdannn` TO `tb_xeoclzosgr`;
RENAME TABLE `tb_quilrfojmp` TO `tb_hycsuwyoxr`, `tb_knsgjmsufx` TO `tb_bbvvzzczcw`;
RENAME TABLE `tb_xeoclzosgr` TO `tb_fxxptceefr`;
RENAME TABLE `tb_odnffrvnvl` TO `tb_rtnozmledi`;
RENAME TABLE `tb_fxxptceefr` TO `tb_tekgceqrmv`;
RENAME TABLE `tb_hycsuwyoxr` TO `tb_hcvvpyqbtd`, `tb_szlgabmztl` TO `tb_yfjonexaag`;
RENAME TABLE `tb_tekgceqrmv` TO `tb_wewsxxqmxd`, `tb_uhjgsigdfr` TO `tb_mbvuditpbx`;
DROP TABLE tb_mbvuditpbx, tb_rkvcdukyuq;
DROP TABLE tb_rtnozmledi, tb_qeokuaneue;
CREATE TABLE `tb_quilrfojmp` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year DEFAULT '2019',
`col_aqqnunnega` varbinary(225),
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 DEFAULT 'enum_or_set_0',
UNIQUE `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rpuyybsdob` (
`col_qmvlxemsmt` datetime(6),
`col_wcntsrfsjf` int NULL DEFAULT '1',
`col_kekvofvtus` integer(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_qfmtewribz` (
`col_hocmjkikme` int unsigned,
`col_qbggcmwxyh` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NOT NULL,
`col_fulwqoqveo` mediumint unsigned zerofill,
`col_eniifaecwj` integer(159) NOT NULL DEFAULT '1',
PRIMARY KEY (`col_qbggcmwxyh`,`col_eniifaecwj`),
UNIQUE INDEX `uk_fmvsmeqnst` (`col_fulwqoqveo`),
CONSTRAINT `symb_xifnljgzcv` UNIQUE (`col_qbggcmwxyh`,`col_fulwqoqveo`)
) DEFAULT CHARSET=latin1;
CREATE TABLE `tb_odnffrvnvl` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_lttgkqunzl` (
`col_nllztggwyd` smallint unsigned DEFAULT '1'
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rkvcdukyuq` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_erkppdannn` (
`col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
`col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NULL DEFAULT 'enum_or_set_0',
`col_hwnlilelpf` smallint unsigned DEFAULT '1',
`col_oyeoemafea` date NULL DEFAULT '2019-07-04',
CONSTRAINT `symb_biynehpjlu` UNIQUE (`col_hwnlilelpf`,`col_oyeoemafea`),
CONSTRAINT `symb_yrommseaif` UNIQUE `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_knsgjmsufx` LIKE `tb_odnffrvnvl`;
CREATE TABLE `tb_ljqeyzesru` LIKE `tb_rpuyybsdob`;
CREATE TABLE `tb_szlgabmztl` (
`col_hfydymybbg` tinytext CHARACTER SET latin1,
CONSTRAINT `symb_gpchhhvhwm` UNIQUE KEY (`col_hfydymybbg`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
RENAME TABLE `tb_qfmtewribz` TO `tb_qeokuaneue`;
RENAME TABLE `tb_lttgkqunzl` TO `tb_uhjgsigdfr`, `tb_erkppdannn` TO `tb_xeoclzosgr`;
RENAME TABLE `tb_quilrfojmp` TO `tb_hycsuwyoxr`, `tb_knsgjmsufx` TO `tb_bbvvzzczcw`;
RENAME TABLE `tb_xeoclzosgr` TO `tb_fxxptceefr`;
RENAME TABLE `tb_odnffrvnvl` TO `tb_rtnozmledi`;
RENAME TABLE `tb_fxxptceefr` TO `tb_tekgceqrmv`;
RENAME TABLE `tb_hycsuwyoxr` TO `tb_hcvvpyqbtd`, `tb_szlgabmztl` TO `tb_yfjonexaag`;
RENAME TABLE `tb_tekgceqrmv` TO `tb_wewsxxqmxd`, `tb_uhjgsigdfr` TO `tb_mbvuditpbx`;
DROP TABLE tb_mbvuditpbx, tb_rkvcdukyuq;
DROP TABLE tb_rtnozmledi, tb_qeokuaneue;
CREATE TABLE `tb_quilrfojmp` (
`col_ruygkecjzp` longblob,
`col_orycjbfrss` year DEFAULT '2019',
`col_aqqnunnega` varbinary(225),
`col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 DEFAULT 'enum_or_set_0',
UNIQUE `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rpuyybsdob` (
`col_qmvlxemsmt` datetime(6),
`col_wcntsrfsjf` int NULL DEFAULT '1',
`col_kekvofvtus` integer(70) unsigned DEFAULT '1',
`col_bhbfokpfhm` float
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `tb_qfmtewribz` (
`col_hocmjkikme` int unsigned,
`col_qbggcmwxyh` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NOT NULL,
`col_fulwqoqveo` mediumint unsigned zerofill,
`col_eniifaecwj` integer(159) NOT NULL DEFAULT '1',
PRIMARY KEY (`col_qbggcmwxyh`,`col_eniifaecwj`),
UNIQUE INDEX `uk_fmvsmeqnst` (`col_fulwqoqveo`),
CONSTRAINT `symb_xifnljgzcv` UNIQUE (`col_qbggcmwxyh`,`col_fulwqoqveo`)
) DEFAULT CHARSET=latin1;
CREATE TABLE `tb_odnffrvnvl` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_lttgkqunzl` (
`col_nllztggwyd` smallint unsigned DEFAULT '1'
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_rkvcdukyuq` LIKE `tb_quilrfojmp`;
CREATE TABLE `tb_erkppdannn` (
`col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3),
`col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 NULL DEFAULT 'enum_or_set_0',
`col_hwnlilelpf` smallint unsigned DEFAULT '1',
`col_oyeoemafea` date NULL DEFAULT '2019-07-04',
CONSTRAINT `symb_biynehpjlu` UNIQUE (`col_hwnlilelpf`,`col_oyeoemafea`),
CONSTRAINT `symb_yrommseaif` UNIQUE `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `tb_knsgjmsufx` LIKE `tb_odnffrvnvl`;
CREATE TABLE `tb_ljqeyzesru` LIKE `tb_rpuyybsdob`;
CREATE TABLE `tb_szlgabmztl` (
`col_hfydymybbg` tinytext CHARACTER SET latin1,
CONSTRAINT `symb_gpchhhvhwm` UNIQUE KEY (`col_hfydymybbg`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
RENAME TABLE `tb_qfmtewribz` TO `tb_qeokuaneue`;
RENAME TABLE `tb_lttgkqunzl` TO `tb_uhjgsigdfr`, `tb_erkppdannn` TO `tb_xeoclzosgr`;
RENAME TABLE `tb_quilrfojmp` TO `tb_hycsuwyoxr`, `tb_knsgjmsufx` TO `tb_bbvvzzczcw`;
RENAME TABLE `tb_xeoclzosgr` TO `tb_fxxptceefr`;
RENAME TABLE `tb_odnffrvnvl` TO `tb_rtnozmledi`;
RENAME TABLE `tb_fxxptceefr` TO `tb_tekgceqrmv`;
RENAME TABLE `tb_hycsuwyoxr` TO `tb_hcvvpyqbtd`, `tb_szlgabmztl` TO `tb_yfjonexaag`;
RENAME TABLE `tb_tekgceqrmv` TO `tb_wewsxxqmxd`, `tb_uhjgsigdfr` TO `tb_mbvuditpbx`;
DROP TABLE tb_mbvuditpbx, tb_rkvcdukyuq;
DROP TABLE tb_rtnozmledi, tb_qeokuaneue;
| SQL | 2 | yuanweikang2020/canal | parse/src/test/resources/ddl/table/test_1.sql | [
"Apache-2.0"
] |
{:duct.server.http/jetty {:ssl? false}} | edn | 2 | xsoheilalizadeh/FrameworkBenchmarks | frameworks/Clojure/duct/resources/hello/server-jetty.edn | [
"BSD-3-Clause"
] |
module Data.Rel.Complement
import Data.Rel
import Data.Fun
import Data.Fun.Extra
import Data.HVect
%default total
||| The logical complement of a relation.
public export
complement : {ts : Vect n Type} -> (p : Rel ts) -> Rel ts
complement = chain Not
||| The negation of a relation for some elements
||| is equal to the complement of the relation.
public export
notToComplement :
{0 ts : Vect n Type}
-> (p : Rel ts)
-> (elems : HVect ts)
-> Not (uncurry p elems) = uncurry (complement {ts = ts} p) elems
notToComplement p = chainUncurry p Not
| Idris | 4 | ska80/idris-jvm | libs/contrib/Data/Rel/Complement.idr | [
"BSD-3-Clause"
] |
server {
#listen 80;
server_name iot.zserg.net;
access_log /var/log/nginx/example.log;
listen 443; # <-
ssl on; # <-
ssl_certificate /etc/ssl/iot_server.crt; # <-
ssl_certificate_key /etc/ssl/iot_server.key; # <-
location /static/ {
alias /var/projects/iot_server/static/;
}
location / {
proxy_pass http://unix:/var/projects/iot_server/gunicorn.sock;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https; # <-
proxy_redirect off;
}
}
| Nginx | 4 | zserg/iot_server | deployment/iot_server.nginxconf | [
"MIT"
] |
package com.baeldung.mediator;
public class Mediator {
private Button button;
private Fan fan;
private PowerSupplier powerSupplier;
public void setButton(Button button) {
this.button = button;
this.button.setMediator(this);
}
public void setFan(Fan fan) {
this.fan = fan;
this.fan.setMediator(this);
}
public void setPowerSupplier(PowerSupplier powerSupplier) {
this.powerSupplier = powerSupplier;
}
public void press() {
if (fan.isOn()) {
fan.turnOff();
} else {
fan.turnOn();
}
}
public void start() {
powerSupplier.turnOn();
}
public void stop() {
powerSupplier.turnOff();
}
}
| Java | 4 | DBatOWL/tutorials | patterns/design-patterns-behavioral/src/main/java/com/baeldung/mediator/Mediator.java | [
"MIT"
] |
def matches:
type == "string"
and test("(?x:
^
(?: \\d{4}-\\d{2}-\\d{2}T
| \\w{3},[ ][\\d ]\\d[ ]\\w{3}[ ]\\d{4}
)
)");
del(.Id, .Properties.provisioningState, .Properties.state, .Properties.resourceGuid) |
walk(if type=="object"
then with_entries(if .value|matches then empty else . end)
else . end) | JSONiq | 1 | StefanIvemo/AzOps | src/data/template/generic.jq | [
"MIT"
] |
cmake_minimum_required(VERSION 3.5)
if(COMMAND toolchain_save_config)
return() # prevent recursive call
endif()
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
include("${CMAKE_CURRENT_LIST_DIR}/gnu.toolchain.cmake")
MESSAGE(STATUS "Debug: CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}")
if(NOT "x${GCC_COMPILER_VERSION}" STREQUAL "x")
set(__GCC_VER_SUFFIX "-${GCC_COMPILER_VERSION}")
endif()
if(NOT DEFINED CMAKE_C_COMPILER)
MESSAGE("Looking for compler.. ${GNU_MACHINE}-gcc${__GCC_VER_SUFFIX}")
find_program(CMAKE_C_COMPILER NAMES ${GNU_MACHINE}-gcc${__GCC_VER_SUFFIX})
else()
#message(WARNING "CMAKE_C_COMPILER=${CMAKE_C_COMPILER} is defined")
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
find_program(CMAKE_CXX_COMPILER NAMES ${GNU_MACHINE}-g++${__GCC_VER_SUFFIX})
else()
#message(WARNING "CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} is defined")
endif()
if(NOT DEFINED CMAKE_LINKER)
find_program(CMAKE_LINKER NAMES ${GNU_MACHINE}-ld${__GCC_VER_SUFFIX} ${GNU_MACHINE}-ld)
else()
#message(WARNING "CMAKE_LINKER=${CMAKE_LINKER} is defined")
endif()
if(NOT DEFINED CMAKE_AR)
find_program(CMAKE_AR NAMES ${GNU_MACHINE}-ar${__GCC_VER_SUFFIX} ${GNU_MACHINE}-ar)
else()
#message(WARNING "CMAKE_AR=${CMAKE_AR} is defined")
endif()
if(NOT DEFINED RISCV_LINUX_SYSROOT AND DEFINED GNU_MACHINE)
set(RISCV_LINUX_SYSROOT /usr/${GNU_MACHINE})
endif()
if(NOT DEFINED CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,nocopyreloc")
set(RISCV_LINKER_FLAGS "-Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now")
set(CMAKE_SHARED_LINKER_FLAGS "${RISCV_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${RISCV_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${RISCV_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
else()
message(STATUS "User provided flags are used instead of defaults")
endif()
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${RISCV_LINUX_SYSROOT})
set(TOOLCHAIN_CONFIG_VARS ${TOOLCHAIN_CONFIG_VARS}
RISCV_LINUX_SYSROOT
)
toolchain_save_config()
| CMake | 4 | xipingyan/opencv | platforms/linux/riscv.toolchain.cmake | [
"Apache-2.0"
] |
import .example;
int main()
{
// ----- Object creation -----
write("Creating some objects:\n");
Circle c = Circle(10.0);
write(" Created circle.\n");
Square s = Square(10.0);
write(" Created square.\n");
// ----- Access a static member -----
write("\nA total of " + Shape_nshapes_get() + " shapes were created\n");
// ----- Member data access -----
// Set the location of the object
c->x_set(20.0);
c->y_set(30.0);
s->x_set(-10.0);
s->y_set(5.0);
write("\nHere is their current position:\n");
write(" Circle = (%f, %f)\n", c->x_get(), c->y_get());
write(" Square = (%f, %f)\n", s->x_get(), s->y_get());
// ----- Call some methods -----
write("\nHere are some properties of the shapes:\n");
write(" The circle:\n");
write(" area = %f.\n", c->area());
write(" perimeter = %f.\n", c->perimeter());
write(" The square:\n");
write(" area = %f.\n", s->area());
write(" perimeter = %f.\n", s->perimeter());
write("\nGuess I'll clean up now\n");
/* See if we can force 's' to be garbage-collected */
s = 0;
/* Now we should be down to only 1 shape */
write("%d shapes remain\n", Shape_nshapes_get());
/* Done */
write("Goodbye\n");
return 0;
}
| Pike | 4 | duonglvtnaist/Multi-ROMix-Scrypt-Accelerator | Software/CPU/myscrypt/build/cmake-3.12.3/Tests/UseSWIG/runme.pike | [
"MIT"
] |
(defprolog enjoys
mark chocolate <--;
mark tea <--;)
(defprolog fads
X <-- (findall Y (enjoys X Y) Likes) (return Likes);) | Shen | 3 | tizoc/chibi-shen | shen-test-programs/findall.shen | [
"BSD-3-Clause"
] |
/******************************************************************************
* Copyright 2020 The Apollo 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.
*****************************************************************************/
#pragma once
#include <vector>
namespace apollo {
namespace perception {
namespace lidar {
class Params {
public:
static constexpr float kPillarXSize = 0.32f;
static constexpr float kPillarYSize = 0.32f;
static constexpr float kPillarZSize = 6.0f;
static constexpr float kMinXRange = -74.88f;
static constexpr float kMinYRange = -74.88f;
static constexpr float kMinZRange = -2.0f;
static constexpr float kMaxXRange = 74.88f;
static constexpr float kMaxYRange = 74.88f;
static constexpr float kMaxZRange = 4.0f;
static constexpr int kNumClass = 3;
static constexpr int kMaxNumPillars = 32000;
static constexpr int kMaxNumPointsPerPillar = 20;
static constexpr int kNumPointFeature = 5; // x, y, z, i, delta of time
static constexpr int kNumAnchor = 468 * 468 * 6;
static constexpr int kNumOutputBoxFeature = 7;
static constexpr int kBatchSize = 1;
static constexpr int kNumIndsForScan = 1024;
static constexpr int kNumThreads = 64;
static constexpr int kNumBoxCorners = 4;
static std::vector<int> AnchorStrides() { return std::vector<int>{1}; }
static std::vector<int> NumAnchorSets() { return std::vector<int>{6}; }
static std::vector<std::vector<float>> AnchorDxSizes() {
return std::vector<std::vector<float>>{
std::vector<float>{2.08, 0.84, 0.84}};
}
static std::vector<std::vector<float>> AnchorDySizes() {
return std::vector<std::vector<float>>{
std::vector<float>{4.73, 1.81, 0.91}};
}
static std::vector<std::vector<float>> AnchorDzSizes() {
return std::vector<std::vector<float>>{
std::vector<float>{1.77, 1.77, 1.74}};
}
static std::vector<std::vector<float>> AnchorZCoors() {
return std::vector<std::vector<float>>{
std::vector<float>{-0.0345, -0.1188, 0}};
}
static std::vector<std::vector<int>> NumAnchorRo() {
return std::vector<std::vector<int>>{std::vector<int>{2, 2, 2}};
}
static std::vector<std::vector<float>> AnchorRo() {
return std::vector<std::vector<float>>{
std::vector<float>{0, M_PI / 2, 0, M_PI / 2, 0, M_PI / 2}};
}
private:
Params() = default;
~Params() = default;
}; // class Params
} // namespace lidar
} // namespace perception
} // namespace apollo
| C | 4 | jzjonah/apollo | modules/perception/lidar/lib/detector/point_pillars_detection/params.h | [
"Apache-2.0"
] |
; Test that GCOV instrumentation numbers functions correctly when some
; functions aren't emitted.
; Inject metadata to set the .gcno file location
; RUN: rm -rf %t && mkdir -p %t
; RUN: echo '!14 = !{!"%/t/function-numbering.ll", !0}' > %t/1
; RUN: cat %s %t/1 > %t/2
; RUN: opt -insert-gcov-profiling -S < %t/2 | FileCheck --check-prefix GCDA %s
; RUN: llvm-cov gcov -n -dump %t/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s
; RUNN: rm %t/function-numbering.gcno
; RUN: opt -passes=insert-gcov-profiling -S < %t/2 | FileCheck --check-prefix GCDA %s
; RUN: llvm-cov gcov -n -dump %t/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"
; GCDA: @[[FOO:[0-9]+]] = private unnamed_addr constant [4 x i8] c"foo\00"
; GCDA-NOT: @{{[0-9]+}} = private unnamed_addr constant .* c"bar\00"
; GCDA: @[[BAZ:[0-9]+]] = private unnamed_addr constant [4 x i8] c"baz\00"
; GCDA: @__llvm_internal_gcov_emit_function_args.0 = internal unnamed_addr constant
; GCDA-SAME: { i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[FOO]]
; GCDA-SAME: { i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[BAZ]]
;
; GCDA-LABEL: define internal void @__llvm_gcov_writeout() {{.*}} {
; GCDA-NEXT: entry:
; GCDA-NEXT: br label %[[FILE_LOOP_HEADER:.*]]
;
; GCDA: [[FILE_LOOP_HEADER]]:
; GCDA-NEXT: %[[IV:.*]] = phi i32 [ 0, %entry ], [ %[[NEXT_IV:.*]], %[[FILE_LOOP_LATCH:.*]] ]
; GCDA-NEXT: %[[FILE_INFO:.*]] = getelementptr inbounds {{.*}}, {{.*}}* @__llvm_internal_gcov_emit_file_info, i32 0, i32 %[[IV]]
; GCDA-NEXT: %[[START_FILE_ARGS:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[FILE_INFO]], i32 0, i32 0
; GCDA-NEXT: %[[START_FILE_ARG_0_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[START_FILE_ARGS]], i32 0, i32 0
; GCDA-NEXT: %[[START_FILE_ARG_0:.*]] = load i8*, i8** %[[START_FILE_ARG_0_PTR]]
; GCDA-NEXT: %[[START_FILE_ARG_1_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[START_FILE_ARGS]], i32 0, i32 1
; GCDA-NEXT: %[[START_FILE_ARG_1:.*]] = load i8*, i8** %[[START_FILE_ARG_1_PTR]]
; GCDA-NEXT: %[[START_FILE_ARG_2_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[START_FILE_ARGS]], i32 0, i32 2
; GCDA-NEXT: %[[START_FILE_ARG_2:.*]] = load i32, i32* %[[START_FILE_ARG_2_PTR]]
; GCDA-NEXT: call void @llvm_gcda_start_file(i8* %[[START_FILE_ARG_0]], i8* %[[START_FILE_ARG_1]], i32 %[[START_FILE_ARG_2]])
; GCDA-NEXT: %[[NUM_COUNTERS_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[FILE_INFO]], i32 0, i32 1
; GCDA-NEXT: %[[NUM_COUNTERS:.*]] = load i32, i32* %[[NUM_COUNTERS_PTR]]
; GCDA-NEXT: %[[EMIT_FUN_ARGS_ARRAY_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[FILE_INFO]], i32 0, i32 2
; GCDA-NEXT: %[[EMIT_FUN_ARGS_ARRAY:.*]] = load {{.*}}*, {{.*}}** %[[EMIT_FUN_ARGS_ARRAY_PTR]]
; GCDA-NEXT: %[[EMIT_ARCS_ARGS_ARRAY_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[FILE_INFO]], i32 0, i32 3
; GCDA-NEXT: %[[EMIT_ARCS_ARGS_ARRAY:.*]] = load {{.*}}*, {{.*}}** %[[EMIT_ARCS_ARGS_ARRAY_PTR]]
; GCDA-NEXT: %[[ENTER_COUNTER_LOOP_COND:.*]] = icmp slt i32 0, %[[NUM_COUNTERS]]
; GCDA-NEXT: br i1 %[[ENTER_COUNTER_LOOP_COND]], label %[[COUNTER_LOOP:.*]], label %[[FILE_LOOP_LATCH]]
;
; GCDA: [[COUNTER_LOOP]]:
; GCDA-NEXT: %[[JV:.*]] = phi i32 [ 0, %[[FILE_LOOP_HEADER]] ], [ %[[NEXT_JV:.*]], %[[COUNTER_LOOP]] ]
; GCDA-NEXT: %[[EMIT_FUN_ARGS:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_FUN_ARGS_ARRAY]], i32 %[[JV]]
; GCDA-NEXT: %[[EMIT_FUN_ARG_0_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_FUN_ARGS]], i32 0, i32 0
; GCDA-NEXT: %[[EMIT_FUN_ARG_0:.*]] = load i32, i32* %[[EMIT_FUN_ARG_0_PTR]]
; GCDA-NEXT: %[[EMIT_FUN_ARG_1_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_FUN_ARGS]], i32 0, i32 1
; GCDA-NEXT: %[[EMIT_FUN_ARG_1:.*]] = load i8*, i8** %[[EMIT_FUN_ARG_1_PTR]]
; GCDA-NEXT: %[[EMIT_FUN_ARG_2_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_FUN_ARGS]], i32 0, i32 2
; GCDA-NEXT: %[[EMIT_FUN_ARG_2:.*]] = load i32, i32* %[[EMIT_FUN_ARG_2_PTR]]
; GCDA-NEXT: %[[EMIT_FUN_ARG_3_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_FUN_ARGS]], i32 0, i32 3
; GCDA-NEXT: %[[EMIT_FUN_ARG_3:.*]] = load i8, i8* %[[EMIT_FUN_ARG_3_PTR]]
; GCDA-NEXT: %[[EMIT_FUN_ARG_4_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_FUN_ARGS]], i32 0, i32 4
; GCDA-NEXT: %[[EMIT_FUN_ARG_4:.*]] = load i32, i32* %[[EMIT_FUN_ARG_4_PTR]]
; GCDA-NEXT: call void @llvm_gcda_emit_function(i32 %[[EMIT_FUN_ARG_0]],
; GCDA-SAME: i8* %[[EMIT_FUN_ARG_1]],
; GCDA-SAME: i32 %[[EMIT_FUN_ARG_2]],
; GCDA-SAME: i8 %[[EMIT_FUN_ARG_3]],
; GCDA-SAME: i32 %[[EMIT_FUN_ARG_4]])
; GCDA-NEXT: %[[EMIT_ARCS_ARGS:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_ARCS_ARGS_ARRAY]], i32 %[[JV]]
; GCDA-NEXT: %[[EMIT_ARCS_ARG_0_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_ARCS_ARGS]], i32 0, i32 0
; GCDA-NEXT: %[[EMIT_ARCS_ARG_0:.*]] = load i32, i32* %[[EMIT_ARCS_ARG_0_PTR]]
; GCDA-NEXT: %[[EMIT_ARCS_ARG_1_PTR:.*]] = getelementptr inbounds {{.*}}, {{.*}}* %[[EMIT_ARCS_ARGS]], i32 0, i32 1
; GCDA-NEXT: %[[EMIT_ARCS_ARG_1:.*]] = load i64*, i64** %[[EMIT_ARCS_ARG_1_PTR]]
; GCDA-NEXT: call void @llvm_gcda_emit_arcs(i32 %[[EMIT_ARCS_ARG_0]],
; GCDA-SAME: i64* %[[EMIT_ARCS_ARG_1]])
; GCDA-NEXT: %[[NEXT_JV]] = add i32 %[[JV]], 1
; GCDA-NEXT: %[[COUNTER_LOOP_COND:.*]] = icmp slt i32 %[[NEXT_JV]], %[[NUM_COUNTERS]]
; GCDA-NEXT: br i1 %[[COUNTER_LOOP_COND]], label %[[COUNTER_LOOP]], label %[[FILE_LOOP_LATCH]]
;
; GCDA: [[FILE_LOOP_LATCH]]:
; GCDA-NEXT: call void @llvm_gcda_summary_info()
; GCDA-NEXT: call void @llvm_gcda_end_file()
; GCDA-NEXT: %[[NEXT_IV]] = add i32 %[[IV]], 1
; GCDA-NEXT: %[[FILE_LOOP_COND:.*]] = icmp slt i32 %[[NEXT_IV]], 1
; GCDA-NEXT: br i1 %[[FILE_LOOP_COND]], label %[[FILE_LOOP_HEADER]], label %[[EXIT:.*]]
;
; GCDA: [[EXIT]]:
; GCDA-NEXT: ret void
; GCNO: == foo (0) @
; GCNO-NOT: == bar ({{[0-9]+}}) @
; GCNO: == baz (1) @
define void @foo() !dbg !4 {
ret void, !dbg !12
}
define void @bar() !dbg !7 {
; This function is referenced by the debug info, but no lines have locations.
ret void
}
define void @baz() !dbg !8 {
ret void, !dbg !13
}
!llvm.gcov = !{!14}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!9, !10}
!llvm.ident = !{!11}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: ".../llvm/test/Transforms/GCOVProfiling/function-numbering.ll", directory: "")
!2 = !{}
!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2)
!5 = !DIFile(filename: ".../llvm/test/Transforms/GCOVProfiling/function-numbering.ll", directory: "")
!6 = !DISubroutineType(types: !2)
!7 = distinct !DISubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, retainedNodes: !2)
!8 = distinct !DISubprogram(name: "baz", line: 3, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, retainedNodes: !2)
!9 = !{i32 2, !"Dwarf Version", i32 2}
!10 = !{i32 2, !"Debug Info Version", i32 3}
!11 = !{!"clang version 3.6.0 "}
!12 = !DILocation(line: 1, column: 13, scope: !4)
!13 = !DILocation(line: 3, column: 13, scope: !8)
| LLVM | 5 | medismailben/llvm-project | llvm/test/Transforms/GCOVProfiling/function-numbering.ll | [
"Apache-2.0"
] |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64--linux"
@main.uint8SliceSrc.buf = internal global [2 x i8] c"\03d"
@main.uint8SliceSrc = internal unnamed_addr global { i8*, i64, i64 } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @main.uint8SliceSrc.buf, i32 0, i32 0), i64 2, i64 2 }
@main.uint8SliceDst = internal unnamed_addr global { i8*, i64, i64 } zeroinitializer
@main.int16SliceSrc.buf = internal global [3 x i16] [i16 5, i16 123, i16 1024]
@main.int16SliceSrc = internal unnamed_addr global { i16*, i64, i64 } { i16* getelementptr inbounds ([3 x i16], [3 x i16]* @main.int16SliceSrc.buf, i32 0, i32 0), i64 3, i64 3 }
@main.int16SliceDst = internal unnamed_addr global { i16*, i64, i64 } zeroinitializer
declare i64 @runtime.sliceCopy(i8* %dst, i8* %src, i64 %dstLen, i64 %srcLen, i64 %elemSize) unnamed_addr
declare i8* @runtime.alloc(i64) unnamed_addr
declare void @runtime.printuint8(i8)
declare void @runtime.printint16(i16)
define void @runtime.initAll() unnamed_addr {
entry:
call void @main.init()
ret void
}
define void @main() unnamed_addr {
entry:
; print(uintSliceSrc[0])
%uint8SliceSrc.buf = load i8*, i8** getelementptr inbounds ({ i8*, i64, i64 }, { i8*, i64, i64 }* @main.uint8SliceSrc, i64 0, i32 0)
%uint8SliceSrc.val = load i8, i8* %uint8SliceSrc.buf
call void @runtime.printuint8(i8 %uint8SliceSrc.val)
; print(uintSliceDst[0])
%uint8SliceDst.buf = load i8*, i8** getelementptr inbounds ({ i8*, i64, i64 }, { i8*, i64, i64 }* @main.uint8SliceDst, i64 0, i32 0)
%uint8SliceDst.val = load i8, i8* %uint8SliceDst.buf
call void @runtime.printuint8(i8 %uint8SliceDst.val)
; print(int16SliceSrc[0])
%int16SliceSrc.buf = load i16*, i16** getelementptr inbounds ({ i16*, i64, i64 }, { i16*, i64, i64 }* @main.int16SliceSrc, i64 0, i32 0)
%int16SliceSrc.val = load i16, i16* %int16SliceSrc.buf
call void @runtime.printint16(i16 %int16SliceSrc.val)
; print(int16SliceDst[0])
%int16SliceDst.buf = load i16*, i16** getelementptr inbounds ({ i16*, i64, i64 }, { i16*, i64, i64 }* @main.int16SliceDst, i64 0, i32 0)
%int16SliceDst.val = load i16, i16* %int16SliceDst.buf
call void @runtime.printint16(i16 %int16SliceDst.val)
ret void
}
define internal void @main.init() unnamed_addr {
entry:
; equivalent of:
; uint8SliceDst = make([]uint8, len(uint8SliceSrc))
%uint8SliceSrc = load { i8*, i64, i64 }, { i8*, i64, i64 }* @main.uint8SliceSrc
%uint8SliceSrc.len = extractvalue { i8*, i64, i64 } %uint8SliceSrc, 1
%uint8SliceDst.buf = call i8* @runtime.alloc(i64 %uint8SliceSrc.len)
%0 = insertvalue { i8*, i64, i64 } undef, i8* %uint8SliceDst.buf, 0
%1 = insertvalue { i8*, i64, i64 } %0, i64 %uint8SliceSrc.len, 1
%2 = insertvalue { i8*, i64, i64 } %1, i64 %uint8SliceSrc.len, 2
store { i8*, i64, i64 } %2, { i8*, i64, i64 }* @main.uint8SliceDst
; equivalent of:
; copy(uint8SliceDst, uint8SliceSrc)
%uint8SliceSrc.buf = extractvalue { i8*, i64, i64 } %uint8SliceSrc, 0
%copy.n = call i64 @runtime.sliceCopy(i8* %uint8SliceDst.buf, i8* %uint8SliceSrc.buf, i64 %uint8SliceSrc.len, i64 %uint8SliceSrc.len, i64 1)
; equivalent of:
; int16SliceDst = make([]int16, len(int16SliceSrc))
%int16SliceSrc = load { i16*, i64, i64 }, { i16*, i64, i64 }* @main.int16SliceSrc
%int16SliceSrc.len = extractvalue { i16*, i64, i64 } %int16SliceSrc, 1
%int16SliceSrc.len.bytes = mul i64 %int16SliceSrc.len, 2
%int16SliceDst.buf.raw = call i8* @runtime.alloc(i64 %int16SliceSrc.len.bytes)
%int16SliceDst.buf = bitcast i8* %int16SliceDst.buf.raw to i16*
%3 = insertvalue { i16*, i64, i64 } undef, i16* %int16SliceDst.buf, 0
%4 = insertvalue { i16*, i64, i64 } %3, i64 %int16SliceSrc.len, 1
%5 = insertvalue { i16*, i64, i64 } %4, i64 %int16SliceSrc.len, 2
store { i16*, i64, i64 } %5, { i16*, i64, i64 }* @main.int16SliceDst
; equivalent of:
; copy(int16SliceDst, int16SliceSrc)
%int16SliceSrc.buf = extractvalue { i16*, i64, i64 } %int16SliceSrc, 0
%int16SliceSrc.buf.i8ptr = bitcast i16* %int16SliceSrc.buf to i8*
%int16SliceDst.buf.i8ptr = bitcast i16* %int16SliceDst.buf to i8*
%copy.n2 = call i64 @runtime.sliceCopy(i8* %int16SliceDst.buf.i8ptr, i8* %int16SliceSrc.buf.i8ptr, i64 %int16SliceSrc.len, i64 %int16SliceSrc.len, i64 2)
ret void
}
| LLVM | 4 | ybkimm/tinygo | interp/testdata/slice-copy.ll | [
"Apache-2.0"
] |
<img src="image.jpg?as=webp" alt="test image" />
| HTML | 2 | acidburn0zzz/parcel | packages/core/integration-tests/test/integration/image/reformat.html | [
"MIT"
] |
class Foo {
Void foo(Int x) { }
Int test1(Int x)
{
foo(x)
++x
return x
}
} | Fantom | 0 | fanx-dev/fanx | compiler/testCompilerx/res/regression/test1150.fan | [
"AFL-3.0"
] |
Province/State,Country/Region,Last Update,Confirmed,Deaths,Recovered
Hubei,Mainland China,2/6/20 12:33,19665,549,712
Guangdong,Mainland China,2/6/20 12:43,970,0,69
Zhejiang,Mainland China,2/6/20 10:53,954,0,94
Henan,Mainland China,2/6/20 11:23,851,2,56
Hunan,Mainland China,2/6/20 13:13,711,0,81
Jiangxi,Mainland China,2/6/20 2:33,600,0,37
Anhui,Mainland China,2/6/20 13:33,591,0,34
Chongqing,Mainland China,2/6/20 13:43,400,2,24
Jiangsu,Mainland China,2/6/20 8:03,373,0,34
Shandong,Mainland China,2/6/20 7:53,347,0,27
Sichuan,Mainland China,2/6/20 8:03,321,1,31
Beijing,Mainland China,2/6/20 3:23,274,1,31
Shanghai,Mainland China,2/6/20 6:53,257,1,25
Heilongjiang,Mainland China,2/6/20 8:13,227,3,8
Fujian,Mainland China,2/6/20 11:03,215,0,14
Shaanxi,Mainland China,2/6/20 13:53,173,0,9
Guangxi,Mainland China,2/6/20 4:13,168,0,14
Hebei,Mainland China,2/6/20 13:53,157,1,13
Yunnan,Mainland China,2/6/20 9:43,133,0,7
Hainan,Mainland China,2/6/20 11:13,106,1,8
Liaoning,Mainland China,2/6/20 11:13,91,0,5
Shanxi,Mainland China,2/6/20 14:13,90,0,12
Tianjin,Mainland China,2/6/20 6:23,78,1,2
Guizhou,Mainland China,2/6/20 9:53,71,1,6
Gansu,Mainland China,2/5/20 16:23,62,0,6
Jilin,Mainland China,2/6/20 14:23,59,0,4
Inner Mongolia,Mainland China,2/6/20 2:23,46,0,4
,Japan,2/6/20 2:53,45,0,1
Ningxia,Mainland China,2/6/20 2:13,40,0,1
Xinjiang,Mainland China,2/6/20 1:13,36,0,0
,Singapore,2/5/20 16:33,28,0,0
,Thailand,2/4/20 15:33,25,0,5
,South Korea,2/6/20 2:53,23,0,0
Hong Kong,Hong Kong,2/5/20 13:13,21,1,0
Qinghai,Mainland China,2/6/20 2:13,18,0,3
Taiwan,Taiwan,2/6/20 9:03,13,0,1
,Germany,2/3/20 20:53,12,0,0
,Malaysia,2/5/20 15:43,12,0,0
Macau,Macau,2/6/20 14:23,10,0,1
,Vietnam,2/6/20 1:13,10,0,1
,France,2/1/20 1:52,6,0,0
,United Arab Emirates,2/2/20 5:43,5,0,0
New South Wales,Australia,2/6/20 3:13,4,0,2
Queensland,Australia,2/6/20 2:53,4,0,0
Victoria,Australia,2/1/20 18:12,4,0,0
,India,2/3/20 21:43,3,0,0
South Australia,Australia,2/2/20 22:33,2,0,0
British Columbia,Canada,2/5/20 17:33,2,0,0
"Toronto, ON",Canada,2/4/20 0:13,2,0,0
,Italy,1/31/20 8:15,2,0,0
,Philippines,2/2/20 3:33,2,1,0
,Russia,1/31/20 16:13,2,0,0
,UK,2/1/20 1:52,2,0,0
"Chicago, IL",US,2/1/20 19:43,2,0,0
"San Benito, CA",US,2/3/20 3:53,2,0,0
"Santa Clara, CA",US,2/3/20 0:43,2,0,0
,Belgium,2/4/20 15:43,1,0,0
,Cambodia,1/31/20 8:15,1,0,0
"London, ON",Canada,2/4/20 0:03,1,0,0
,Finland,1/31/20 8:15,1,0,0
Tibet,Mainland China,2/1/20 1:52,1,0,0
,Nepal,1/31/20 8:15,1,0,0
,Spain,2/1/20 23:43,1,0,0
,Sri Lanka,1/31/20 8:15,1,0,0
,Sweden,2/1/20 2:13,1,0,0
"Boston, MA",US,2/1/20 19:43,1,0,0
"Los Angeles, CA",US,2/1/20 19:53,1,0,0
"Madison, WI",US,2/5/20 21:53,1,0,0
"Orange, CA",US,2/1/20 19:53,1,0,0
"Seattle, WA",US,2/1/20 19:43,1,0,0
"Tempe, AZ",US,2/1/20 19:43,1,0,0 | CSV | 3 | elammertsma/COVID-19 | archived_data/archived_daily_case_updates/02-06-2020_1318.csv | [
"CC-BY-4.0"
] |
#: * `formulae`
#:
#: List all locally installable formulae including short names.
#:
# HOMEBREW_LIBRARY is set by bin/brew
# shellcheck disable=SC2154
source "${HOMEBREW_LIBRARY}/Homebrew/items.sh"
homebrew-formulae() {
homebrew-items 'Casks' 's|/Formula/|/|' '^homebrew/core'
}
| Shell | 4 | ylht/brew | Library/Homebrew/cmd/formulae.sh | [
"BSD-2-Clause"
] |
;-----------------------------------------------------------------------------;
; Author: Unknown
; Compatible: Windows Server 2003, IE Versions 4 to 6
; Build: >build.py stager_reverse_http_proxy_pstore
;-----------------------------------------------------------------------------;
[BITS 32]
[ORG 0]
cld ; Clear the direction flag.
call start ; Call start, this pushes the address of 'api_call' onto the stack.
%include "./src/block/block_api.asm"
start: ;
pop ebp ; pop off the address of 'api_call' for calling later.
%include "./src/block/block_get_pstore_creds.asm"
%include "./src/block/block_reverse_http_use_proxy_creds.asm"
; By here we will have performed the reverse_tcp connection and EDI will be our socket.
| Assembly | 2 | OsmanDere/metasploit-framework | external/source/shellcode/windows/x86/src/stager/stager_reverse_http_proxy_pstore.asm | [
"BSD-2-Clause",
"BSD-3-Clause"
] |
// ISSUE: KT-20423
// !LANGUAGE: -SealedInterfaces
// !DIAGNOSTICS: -UNUSED_VARIABLE
sealed interface Base
| Kotlin | 4 | Mu-L/kotlin | compiler/testData/diagnostics/tests/sealed/interfaces/sealedInterfacesDisabled.fir.kt | [
"ECL-2.0",
"Apache-2.0"
] |
// Pixi texture info
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
// Tint
uniform vec4 uColor;
// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange
uniform float uFWidth;
void main(void) {
// To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.
vec4 texColor = texture2D(uSampler, vTextureCoord);
// MSDF
float median = texColor.r + texColor.g + texColor.b -
min(texColor.r, min(texColor.g, texColor.b)) -
max(texColor.r, max(texColor.g, texColor.b));
// SDF
median = min(median, texColor.a);
float screenPxDistance = uFWidth * (median - 0.5);
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
// NPM Textures, NPM outputs
gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);
}
| GLSL | 4 | fanlistener/pixijs | packages/text-bitmap/src/shader/msdf.frag | [
"MIT"
] |
/// docs for foo
#[deprecated(since = "1.2.3", note = "text")]
#[macro_export]
macro_rules! foo {
($($tt:tt)*) => {}
}
// @has macro_by_example/macros/index.html
pub mod macros {
// @!has - 'pub use foo as bar;'
// @has macro_by_example/macros/macro.bar.html
// @has - '//*[@class="docblock"]' 'docs for foo'
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.2.3: text'
// @has - '//a/@href' 'macro_by_example.rs.html#4-6'
#[doc(inline)]
pub use foo as bar;
}
| Rust | 4 | Eric-Arellano/rust | src/test/rustdoc/inline_local/macro_by_example.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.invocation.Gradle
import java.text.SimpleDateFormat
/**
* <pre>
* author: blankj
* blog : http://blankj.com
* time : 2019/08/16
* desc :
* </pre>
*/
class GitUtils {
private static Project rootProject;
static void init(Gradle gradle) {
rootProject = gradle.rootProject
addGitHelpTask()
}
static def addGitHelpTask() {
rootProject.task("gitHelp").doLast {
def commands = [
" ############## input command code #################",
" # [1] Git Push #",
" # [2] Git Push And Merge to Master #",
" # [3] Git New Branch #",
" # [0] exit #",
" ###################################################",
]
String commandTips = String.join(System.getProperty("line.separator"), commands)
while (true) {
GLog.l(commandTips)
Scanner scanner = new Scanner(System.in)
def input = scanner.next()
GLog.l(input)
switch (input) {
case "1":
gitPush()
break
case "2":
gitPushAndMerge2Master()
break
case "3":
gitNewBranch()
break
case "0":
return
}
}
}
}
static void gitPush() {
String branchName = getGitBranch()
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd")
String date = simpleDateFormat.format(new Date())
exeCmd(
"git add -A",
"git commit -m \"see $date log\"",
"git push origin $branchName"
)
}
static void gitPushAndMerge2Master() {
String branchName = getGitBranch()
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd")
String date = simpleDateFormat.format(new Date())
exeCmd(
"git add -A",
"git commit -m \"see $date log\"",
"git push origin $branchName",
"git checkout master",
"git merge $branchName",
"git push origin master",
"git checkout $branchName"
)
}
static void gitNewBranch() {
exeCmd(
"git checkout master",
"git checkout -b ${Config.versionName}",
"git push origin ${Config.versionName}:${Config.versionName}",
)
}
private static def getGitBranch() {
return exeCmd("git symbolic-ref --short -q HEAD")
}
private static def exeCmd(String... cmds) {
String output = ""
for (def cmd in cmds) {
output = _exeCmd(cmd)
}
return output
}
private static def _exeCmd(String cmd) {
def output = new StringBuilder()
GLog.l("Execute command: ${cmd}")
def cmdResult = ShellUtils.execCmd(cmd)
GLog.l("$cmdResult")
return cmdResult.successMsg
}
}
// ./gradlew gitHelp
| Groovy | 5 | YashBangera7/AndroidUtilCode | buildSrc/src/main/groovy/GitUtils.groovy | [
"Apache-2.0"
] |
disabled_for_roles:
- child | YAML | 0 | gh-oss-contributor/graphql-engine-1 | cli/internal/metadataobject/graphql_schema_introspection/testdata/metadata/graphql_schema_introspection.yaml | [
"Apache-2.0",
"MIT"
] |
<?php
$this->layout('main', ['title' => $title, 'manual' => true]);
?>
<?php foreach ($log_records as $id => $row): ?>
<div class="card mb-3" id="log-view">
<div class="card-header" id="log-row-<?=$id?>">
<h4 class="mb-0">
<?php if ($row['level'] === \Monolog\Logger::DEBUG): ?>
<span class="badge badge-info">Debug</span>
<?php elseif ($row['level'] === \Monolog\Logger::INFO): ?>
<span class="badge badge-info">Info</span>
<?php elseif ($row['level'] === \Monolog\Logger::NOTICE): ?>
<span class="badge badge-info">Notice</span>
<?php elseif ($row['level'] === \Monolog\Logger::WARNING): ?>
<span class="badge badge-warning">Warning</span>
<?php elseif ($row['level'] === \Monolog\Logger::ERROR): ?>
<span class="badge badge-danger">Error</span>
<?php elseif ($row['level'] === \Monolog\Logger::CRITICAL): ?>
<span class="badge badge-danger">Critical</span>
<?php elseif ($row['level'] === \Monolog\Logger::ALERT): ?>
<span class="badge badge-danger">Alert</span>
<?php elseif ($row['level'] === \Monolog\Logger::EMERGENCY): ?>
<span class="badge badge-danger">Emergency</span>
<?php endif; ?>
<?=$this->e($row['message'])?>
</h4>
<?php if (!empty($row['context']) || !empty($row['extra'])): ?>
<div class="buttons mt-3">
<button class="btn btn-sm btn-bg" type="button" data-toggle="collapse" data-target="#detail-row-<?=$id?>" aria-controls="detail-row-<?=$id?>">
<?=__('Details')?>
</button>
</div>
<?php endif; ?>
</div>
<?php if (!empty($row['context']) || !empty($row['extra'])): ?>
<div id="detail-row-<?=$id?>" class="collapse" aria-labelledby="log-row-<?=$id?>" data-parent="#log-view">
<div class="card-body pb-0">
<dl>
<?php foreach ($row['context'] as $context_header => $context_value): ?>
<dt><?=$context_header?></dt>
<dd><?=$this->dump($context_value)?></dd>
<?php endforeach; ?>
<?php foreach ($row['extra'] as $context_header => $context_value): ?>
<dt><?=$context_header?></dt>
<dd><?=$this->dump($context_value)?></dd>
<?php endforeach; ?>
</dl>
</div>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
| HTML+PHP | 4 | ikafridi/PlayCast | templates/system/log_view.phtml | [
"Apache-2.0"
] |
{
// json5 parser should ignore this comment
"data": "lorem ispum"
}
| JSON5 | 1 | ahippler/node-convict | packages/convict/test/cases/formats/data.json5 | [
"Apache-2.0"
] |
<html>
<body>
<main style="background: linear-gradient(yellow, blue); height: 250vh; transition: 10s;"></main>
<script>
window.addEventListener('scroll', () => {
const main = document.getElementsByTagName('main')[0]
main.style.height = "50vh";
})
</script>
</body>
</html>
| HTML | 3 | bkucera2/cypress | packages/driver/cypress/fixtures/issue-6099.html | [
"MIT"
] |
register '$EB_HOME/*/target/*.jar';
raw_data = load '/path/to/input_files' using ProtobufPigLoader('com.twitter.elephantbird.examples.proto.AddressBookProtos.Person');
person_phone_numbers = foreach raw_data generate name, FLATTEN(phone.phone_tuple.number) as phone_number;
phones_by_person = group person_phone_numbers by name;
person_phone_count = foreach phones_by_person generate group as name, COUNT(person_phone_numbers) as phone_count;
dump person_phone_count;
| PigLatin | 3 | bcoverston/elephant-bird | examples/src/main/pig/people_phone_number_count.pig | [
"Apache-2.0"
] |
\documentclass[fleqn, draft]{article}
\usepackage{proof, amsmath, amssymb, ifthen}
\input{macros.tex}
% types
\newcommand{\Arrow}[3][-]{#2 \overset{#1}{\rightarrow} #3}
\newcommand{\Bool}{\mathbf{bool}}
\newcommand{\Bottom}{\mathbf{bottom}}
\newcommand{\Dynamic}{\mathbf{dynamic}}
\newcommand{\Null}{\mathbf{Null}}
\newcommand{\Num}{\mathbf{num}}
\newcommand{\Object}{\mathbf{Object}}
\newcommand{\TApp}[2]{#1\mathrm{<}#2\mathrm{>}}
\newcommand{\Type}{\mathbf{Type}}
\newcommand{\Weak}[1]{\mathbf{\{#1\}}}
\newcommand{\Sig}{\mathit{Sig}}
\newcommand{\Boxed}[1]{\langle #1 \rangle}
% expressions
\newcommand{\eassign}[2]{#1 = #2}
\newcommand{\eas}[2]{#1\ \mathbf{as}\ #2}
\newcommand{\ebox}[2]{\langle#1\rangle_{#2}}
\newcommand{\ecall}[2]{#1(#2)}
\newcommand{\echeck}[2]{\kwop{check}(#1, #2)}
\newcommand{\edcall}[2]{\kwop{dcall}(#1, #2)}
\newcommand{\edload}[2]{\kwop{dload}(#1, #2)}
\newcommand{\edo}[1]{\kwdo\{\,#1\,\}}
\newcommand{\eff}{\mathrm{ff}}
\newcommand{\eis}[2]{#1\ \mathbf{is}\ #2}
\newcommand{\elabel}[1][l]{\mathit{l}}
\newcommand{\elambda}[3]{(#1):#2 \Rightarrow #3}
\newcommand{\eload}[2]{#1.#2}
\newcommand{\enew}[3]{\mathbf{new}\,\TApp{#1}{#2}(#3)}
\newcommand{\enull}{\mathbf{null}}
\newcommand{\eobject}[2]{\kwobject_{#1} \{#2\}}
\newcommand{\eprimapp}[2]{\ecall{#1}{#2}}
\newcommand{\eprim}{\kwop{op}}
\newcommand{\esend}[3]{\ecall{\eload{#1}{#2}}{#3}}
\newcommand{\eset}[3]{\eassign{#1.#2}{#3}}
\newcommand{\esuper}{\mathbf{super}}
\newcommand{\ethis}{\mathbf{this}}
\newcommand{\ethrow}{\mathbf{throw}}
\newcommand{\ett}{\mathrm{tt}}
\newcommand{\eunbox}[1]{{*#1}}
% keywords
\newcommand{\kwclass}{\kw{class}}
\newcommand{\kwdo}{\kw{do}}
\newcommand{\kwelse}{\kw{else}}
\newcommand{\kwextends}{\kw{extends}}
\newcommand{\kwfun}{\kw{fun}}
\newcommand{\kwif}{\kw{if}}
\newcommand{\kwin}{\kw{in}}
\newcommand{\kwlet}{\kw{let}}
\newcommand{\kwobject}{\kw{object}}
\newcommand{\kwreturn}{\kw{return}}
\newcommand{\kwthen}{\kw{then}}
\newcommand{\kwvar}{\kw{var}}
% declarations
\newcommand{\dclass}[3]{\kwclass\ #1\ \kwextends\ #2\ \{#3\}}
\newcommand{\dfun}[4]{#2(#3):#1 = #4}
\newcommand{\dvar}[2]{\kwvar\ #1\ =\ #2}
\newcommand{\fieldDecl}[2]{\kwvar\ #1 : #2}
\newcommand{\methodDecl}[3]{\kwfun\ #1 : \iftrans{#2 \triangleleft} #3}
% statements
\newcommand{\sifthenelse}[3]{\kwif\ (#1)\ \kwthen\ #2\ \kwelse\ #3}
\newcommand{\sreturn}[1]{\kwreturn\ #1}
% programs
\newcommand{\program}[2]{\kwlet\ #1\ \kwin\ #2}
% relational operators
\newcommand{\sub}{\mathbin{<:}}
% utilities
\newcommand{\many}[1]{\overrightarrow{#1}}
\newcommand{\alt}{\ \mathop{|}\ }
\newcommand{\opt}[1]{[#1]}
\newcommand{\bind}[3]{#1 \Leftarrow\, #2\ \kw{in}\ #3}
\newcommand{\note}[1]{\textbf{NOTE:} \textit{#1}}
%dynamic semantics
\newcommand{\TypeError}{\mathbf{Error}}
% inference rules
\newcommand{\infrulem}[3][]{
\begin{array}{c@{\ }c}
\begin{array}{cccc}
#2 \vspace{-2mm}
\end{array} \\
\hrulefill & #1 \\
\begin{array}{l}
#3
\end{array}
\end{array}
}
\newcommand{\axiomm}[2][]{
\begin{array}{cc}
\hrulefill & #1 \\
\begin{array}{c}
#2
\end{array}
\end{array}
}
\newcommand{\infrule}[3][]{
\[
\infrulem[#1]{#2}{#3}
\]
}
\newcommand{\axiom}[2][]{
\[
\axiomm[#1]{#2}
\]
}
% judgements and relations
\newboolean{show_translation}
\setboolean{show_translation}{false}
\newcommand{\iftrans}[1]{\ifthenelse{\boolean{show_translation}}{#1}{}}
\newcommand{\ifnottrans}[1]{\ifthenelse{\boolean{show_translation}}{#1}}
\newcommand{\blockOk}[4]{#1 \vdash #2 \col #3\iftrans{\, \Uparrow\, #4}}
\newcommand{\declOk}[5][]{#2 \vdash_{#1} #3 \, \Uparrow\, \iftrans{#4\, :\,} #5}
\newcommand{\extends}[4][:]{#2[#3\ #1\ #4]}
\newcommand{\fieldLookup}[4]{#1 \vdash #2.#3\, \leadsto_f\, #4}
\newcommand{\methodLookup}[5]{#1 \vdash #2.#3\, \leadsto_m\, \iftrans{#4 \triangleleft} #5}
\newcommand{\fieldAbsent}[3]{#1 \vdash #3 \notin #2}
\newcommand{\methodAbsent}[3]{#1 \vdash #3 \notin #2}
\newcommand{\hastype}[3]{#1 \vdash #2 \, : \, #3}
\newcommand{\stmtOk}[5]{#1 \vdash #2 \, : \, #3\, \Uparrow \iftrans{#4\, :\,} #5}
\newcommand{\subst}[2]{[#1/#2]}
\newcommand{\subtypeOfOpt}[5][?]{#2 \vdash\ #3 \sub^{#1} #4\, \Uparrow\, #5}
\newcommand{\subtypeOf}[4][]{#2 \vdash\ #3 \sub^{#1} #4}
\newcommand{\yieldsOk}[5]{#1 \vdash #2 \, : \, #3\, \Uparrow\, \iftrans{#4\, :\,} #5}
\newcommand{\programOk}[3]{#1 \vdash #2\iftrans{\, \Uparrow\, #3}}
\newcommand{\ok}[2]{#1 \vdash #2\, \mbox{\textbf{ok}}}
\newcommand{\overrideOk}[4]{#1 \vdash #2\,\kwextends\, #3 \Leftarrow\, #4}
\newcommand{\down}[1]{\ensuremath{\downharpoonleft\!\!#1\!\!\downharpoonright}}
\newcommand{\up}[1]{\ensuremath{\upharpoonleft\!\!#1\!\!\upharpoonright}}
\newcommand{\sigof}[1]{\mathit{sigof}(#1)}
\newcommand{\typeof}[1]{\mathit{typeof}(#1)}
\newcommand{\sstext}[2]{\ifthenelse{\boolean{show_translation}}{#2}{#1}}
\newcommand{\evaluatesTo}[5][]{\{#2\alt #3\} \stepsto_{#1} \{#4 \alt #5\}}
\title{Dart strong mode definition}
\begin{document}
\textbf{\large PRELIMINARY DRAFT}
\section*{Syntax}
Terms and types. Note that we allow types to be optional in certain positions
(currently function arguments and return types, and on variable declarations).
Implicitly these are either inferred or filled in with dynamic.
There are explicit terms for dynamic calls and loads, and for dynamic type
checks.
Fields can only be read or set within a method via a reference to this, so no
dynamic set operation is required (essentially dynamic set becomes a dynamic
call to a setter). This just simplifies the presentation a bit. Methods may be
externally loaded from the object (either to call them, or to pass them as
closurized functions).
\[
\begin{array}{lcl}
\text{Type identifiers} & ::= & C, G, T, S, \ldots \\
%
\text{Arrow kind ($k$)} & ::= & +, -\\
%
\text{Types $\tau, \sigma$} & ::= &
T \alt \Dynamic \alt \Object \alt \Null \alt \Type \alt \Num \\ &&
\alt \Bool
\alt \Arrow[k]{\many{\tau}}{\sigma} \alt \TApp{C}{\many{\tau}} \\
%
\text{Ground types $\tau, \sigma$} & ::= &
\Dynamic \alt \Object \alt \Null \alt \Type \alt \Num \\ &&
\alt \Bool
\alt \Arrow[+]{\many{\Dynamic}}{\Dynamic} \alt \TApp{C}{\many{\Dynamic}} \\
%
\text{Optional type ($[\tau]$)} & ::= & \_ \alt \tau \\
%
\text{Term identifiers} & ::= & a, b, x, y, m, n, \ldots \\
%
\text{Primops ($\phi$)} & ::= & \mathrm{+}, \mathrm{-} \ldots \mathrm{||} \ldots \\
%
\text{Expressions $e$} & ::= &
x \alt i \alt \ett \alt \eff \alt \enull \alt \ethis \\&&
\alt \elambda{\many{x:\opt{\tau}}}{\opt{\sigma}}{s}
\alt \enew{C}{\many{\tau}}{} \\&&
\alt \eprimapp{\eprim}{\many{e}} \alt \ecall{e}{\many{e}} \\&&
\alt \eload{e}{m} \alt \eload{\ethis}{x} \\&&
\alt \eassign{x}{e} \alt \eset{\ethis}{x}{e} \\&&
\alt \ethrow \alt \eas{e}{\tau} \alt \eis{e}{\tau} \\
%
\text{Declaration ($\mathit{vd}$)} & ::= &
\dvar{x:\opt{\tau}}{e} \alt \dfun{\tau}{f}{\many{x:\tau}}{s} \\
%
\text{Statements ($s$)} & ::= & \mathit{vd} \alt e \alt \sifthenelse{e}{s_1}{s_2}
\alt \sreturn{e} \alt s;s \\
%
\text{Class decl ($\mathit{cd}$)} & ::= & \dclass{\TApp{C}{\many{T}}}{\TApp{G}{\many{\tau}}}{\many{\mathit{vd}}} \\
%
\text{Toplevel decl ($\mathit{td}$)} & ::= & \mathit{vd} \alt \mathit{cd}\\
%
\text{Program ($P$)} & ::= & \program{\many{\mathit{td}}}{s}
\end{array}
\]
Type contexts map type variables to their bounds.
Class signatures describe the methods and fields in an object, along with the
super class of the class. There are no static methods or fields.
The class hierararchy records the classes with their signatures.
The term context maps term variables to their types. I also abuse notation and
allow for the attachment of an optional type to term contexts as follows:
$\Gamma_\sigma$ refers to a term context within the body of a method whose class
type is $\sigma$.
\[
\begin{array}{lcl}
\text{Type context ($\Delta$)} & ::= & \epsilon \alt \Delta, T \sub \tau \\
\text{Class element ($\mathit{ce}$)} & ::= &
\fieldDecl{x}{\tau} \alt \methodDecl{f}{\tau}{\sigma} \\
\text{Class signature ($\Sig$)} & ::= &
\dclass{\TApp{C}{\many{T}}}{\TApp{G}{\many{\tau}}}{\many{\mathit{ce}}} \\
\text{Class hierarchy ($\Phi$)} & ::= & \epsilon \alt \Phi, C\ :\ \Sig \\
\text{Term context ($\Gamma$)} & ::= & \epsilon \alt \Gamma, x\ :\ \tau
\end{array}
\]
\section*{Subtyping}
\subsection*{Variant Subtyping}
We include a special kind of covariant function space to model certain dart
idioms. An arrow type decorated with a positive variance annotation ($+$)
treats $\Dynamic$ in its argument list covariantly: or equivalently, it treats
$\Dynamic$ as bottom. This variant subtyping relation captures this special
treatment of dynamic.
\axiom{\subtypeOf[+]{\Phi, \Delta}{\Dynamic}{\tau}}
\infrule{\subtypeOf{\Phi, \Delta}{\sigma}{\tau} \quad \sigma \neq \Dynamic}
{\subtypeOf[+]{\Phi, \Delta}{\sigma}{\tau}}
\infrule{\subtypeOf{\Phi, \Delta}{\sigma}{\tau}}
{\subtypeOf[-]{\Phi, \Delta}{\sigma}{\tau}}
\subsection*{Invariant Subtyping}
Regular subtyping is defined in a fairly standard way, except that generics are
uniformly covariant, and that function argument types fall into the variant
subtyping relation defined above.
\axiom{\subtypeOf{\Phi, \Delta}{\tau}{\Dynamic}}
\axiom{\subtypeOf{\Phi, \Delta}{\tau}{\Object}}
\axiom{\subtypeOf{\Phi, \Delta}{\Bottom}{\tau}}
\axiom{\subtypeOf{\Phi, \Delta}{\tau}{\tau}}
\infrule{(S\, :\, \sigma) \in \Delta \quad
\subtypeOf{\Phi, \Delta}{\sigma}{\tau}}
{\subtypeOf{\Phi, \Delta}{S}{\tau}}
\infrule{\subtypeOf[k_1]{\Phi, \Delta}{\sigma_i}{\tau_i} \quad i \in 0, \ldots, n \quad\quad
\subtypeOf{\Phi, \Delta}{\tau_r}{\sigma_r} \\
\quad (k_0 = \mbox{-}) \lor (k_1 = \mbox{+})
}
{\subtypeOf{\Phi, \Delta}
{\Arrow[k_0]{\tau_0, \ldots, \tau_n}{\tau_r}}
{\Arrow[k_1]{\sigma_0, \ldots, \sigma_n}{\sigma_r}}}
\infrule{\subtypeOf{\Phi, \Delta}{\tau_i}{\sigma_i} & i \in 0, \ldots, n}
{\subtypeOf{\Phi, \Delta}
{\TApp{C}{\tau_0, \ldots, \tau_n}}
{\TApp{C}{\sigma_0, \ldots, \sigma_n}}}
\infrule{(C : \dclass{\TApp{C}{T_0,\ldots,T_n}}{\TApp{C'}{\upsilon_0, \ldots, \upsilon_k}}{\ldots}) \in \Phi \\
\subtypeOf{\Phi, \Delta}{\subst{\tau_0, \ldots, \tau_n}{T_0, \ldots, T_n}{\TApp{C'}{\upsilon_0, \ldots, \upsilon_k}}}{\TApp{G}{\sigma_0, \ldots, \sigma_m}}}
{\subtypeOf{\Phi, \Delta}
{\TApp{C}{\tau_0, \ldots, \tau_n}}
{\TApp{G}{\sigma_0, \ldots, \sigma_m}}}
\section*{Typing}
\input{static-semantics}
\pagebreak
\section*{Elaboration}
\setboolean{show_translation}{true}
Elaboration is a type driven translation which maps a source Dart term to a
translated term which corresponds to the original term with additional dynamic
type checks inserted to reify the static unsoundness as runtime type errors.
For the translation, we extend the source language slightly as follows.
\[
\begin{array}{lcl}
\text{Expressions $e$} & ::= & \ldots
\alt \edcall{e}{\many{e}} \alt \edload{e}{m} \alt \echeck{e}{\tau}\\
\end{array}
\]
The expression language is extended with an explicitly checked dynamic call
operation, and explicitly checked dynamic method load operation, and a runtime
type test. Note that while a user level cast throws an exception on failure,
the runtime type test term introduced here produces a hard type error which
cannot be caught programmatically.
We also extend typing contexts slightly by adding an internal type to method signatures.
\[
\begin{array}{lcl}
\text{Class element ($\mathit{ce}$)} & ::= &
\fieldDecl{x}{\tau} \alt \methodDecl{f}{\tau}{\sigma} \\
\end{array}
\]
A method signature of the form $\methodDecl{f}{\tau}{\sigma}$ describes a method
whose public interface is described by $\sigma$, but which has an internal type
$\tau$ which is a subtype of $\sigma$, but which is properly covariant in any
type parameters. The elaboration introduces runtime type checks to mediate
between the two types. This is discussed further in the translation of classes
below.
\input{static-semantics}
\end{document}
| TeX | 4 | omerlevran46/sdk | pkg/dev_compiler/doc/definition/strong-dart.tex | [
"BSD-3-Clause"
] |
$accentColor = #1f6286
$contentWidth = 882px | Stylus | 0 | TheEssenceSentry/AI-Expert-Roadmap | .vuepress/styles/palette.styl | [
"MIT"
] |
@file:JvmName("Utils")
@file:JvmMultifileClass
fun f(x: Int) {}
fun g(x: Int?) {}
| Groff | 2 | qussarah/declare | jps-plugin/testData/incremental/classHierarchyAffected/multifilePackagePartMethodAdded/partB.kt.new.1 | [
"Apache-2.0"
] |
Filters:Play HTTP filters
GzipEncoding:Configuring gzip encoding
SecurityHeaders:Configuring security headers
CorsFilter:Configuring CORS
CspFilter:Configuring CSP
AllowedHostsFilter:Configuring allowed hosts
RedirectHttpsFilter:Configuring HTTPS redirect
| TeX | 3 | eed3si9n/playframework | documentation/manual/working/commonGuide/filters/index.toc | [
"Apache-2.0"
] |
v
2
>:~:0`#v_$86*1+2186*31ppv
^+1p0\ <
v <
v <
>21g86*-2+0g 31g86*-2+0g - v
v _ 21g86*-2+0g ,@
>31g 1- 31p ^
>31g86*-|
>21g1+: 21p 1- 31p ^
# 27/11/2017
| Befunge | 0 | tlgs/dailyprogrammer | Befunge/easy/e340.befunge | [
"Unlicense"
] |
module org-openroadm-routing-constraints {
namespace "http://org/openroadm/routing/constrains";
prefix org-openroadm-routing-constraints;
organization
"Open ROADM MSA";
contact
"OpenROADM.org";
description
"YANG definitions of routing constraints.
Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
AT&T Intellectual Property. All other 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.
* Neither the Members of the Open ROADM MSA Agreement 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 MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''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 THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT 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";
revision 2016-10-14 {
description
"Version 1.2";
}
grouping routing-constraints {
container hard-constraints {
uses constraints;
}
container soft-constraints {
uses constraints;
}
}
grouping constraints {
leaf-list customer-code {
type string;
}
choice co-routing-or-general {
case general {
container diversity {
uses diversity-existing-service-contraints;
}
container exclude {
uses common-constraints;
leaf-list supporting-service-name {
description
"Supporting service(s) to exclude from this route.";
type string;
}
}
container include {
uses common-constraints;
leaf-list supporting-service-name {
description
"Supporting service(s) to include in this route.";
type string;
}
}
container latency {
description
"Maximum latency allowed";
leaf max-latency {
type uint32;
units "ms";
}
}
}
case co-routing {
container co-routing {
leaf-list existing-service {
type string;
description
"Diverse from existing services identified by facility CLFI";
}
}
}
}
}
grouping common-constraints {
leaf-list fiber-bundle {
type string;
}
leaf-list site {
type string;
}
leaf-list node-id {
type string;
}
}
grouping diversity-existing-service-contraints {
leaf-list existing-service {
type string;
description
"Diverse from existing services identified by facility CLFI";
}
container existing-service-applicability {
leaf site {
type boolean;
}
leaf node {
type boolean;
}
leaf srlg {
type boolean;
}
}
}
}
| YANG | 4 | meodaiduoi/onos | models/openroadm/src/main/yang/org-openroadm-routing-constraints@2016-10-14.yang | [
"Apache-2.0"
] |
[CustomMessages]
de.dotnetfx35lp_title=.NET Framework 3.5 Sprachpaket: Deutsch
es.dotnetfx35lp_title=.NET Framework 3.5 paquete de idioma: Español
es.dotnetfx35lp_size=32,1 MB
de.dotnetfx35lp_size=32,5 MB
es.dotnetfx35lp_size_x64=43,3 MB
de.dotnetfx35lp_size_x64=44 MB
;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
en.dotnetfx35lp_lcid=1033
pl.dotnetfx35lp_lcid=1045
fr.dotnetfx35lp_lcid=1036
de.dotnetfx35lp_lcid=1031
es.dotnetfx35lp_lcid=3082
de.dotnetfx35lp_url=http://download.microsoft.com/download/d/7/2/d728b7b9-454b-4b57-8270-45dac441b0ec/dotnetfx35langpack_x86de.exe
de.dotnetfx35lp_url_x64=http://download.microsoft.com/download/d/7/2/d728b7b9-454b-4b57-8270-45dac441b0ec/dotnetfx35langpack_x64de.exe
de.dotnetfx35lp_url_ia64=http://download.microsoft.com/download/d/7/2/d728b7b9-454b-4b57-8270-45dac441b0ec/dotnetfx35langpack_ia64de.exe
es.dotnetfx35lp_url=http://download.microsoft.com/download/4/a/2/4a2b42fc-f271-4cc8-9c15-bc10cdde1eb9/dotnetfx35langpack_x86es.exe
es.dotnetfx35lp_url_x64=http://download.microsoft.com/download/4/a/2/4a2b42fc-f271-4cc8-9c15-bc10cdde1eb9/dotnetfx35langpack_x64es.exe
[Code]
procedure dotnetfx35lp();
begin
if (ActiveLanguage() <> 'en') then begin
if (not netfxinstalled(NetFx35, CustomMessage('dotnetfx35lp_lcid'))) then
AddProduct('dotnetfx35_' + ActiveLanguage() + '.exe',
'/lang:enu /passive /norestart',
CustomMessage('dotnetfx35lp_title'),
CustomMessage('dotnetfx35lp_size' + GetArchitectureString()),
CustomMessage('dotnetfx35lp_url' + GetArchitectureString()),
false, false);
end;
end;
| Inno Setup | 3 | internetsimple/Bulk-Crap-Uninstaller | installer/scripts/products/dotnetfx35lp.iss | [
"Apache-2.0"
] |
/*
* @LANG: c++
*
* Test works with split code gen.
*/
#include "cppscan1.h"
#ifdef PERF_TEST
/* Calibrated to 1s on yoho. */
#define perf_iters ( 158428ll * S )
int _perf_dummy = 0;
#define perf_printf(...) ( _perf_dummy += 1 )
#define perf_loop long _pi; for ( _pi = 0; _pi < perf_iters; _pi++ )
#else
#define perf_printf(...) printf( __VA_ARGS__ )
#define perf_loop
#endif
%%{
machine Scanner;
access fsm->;
action pass { fsm->pass(fc); }
action buf { fsm->buf(fc); }
action emit_slit { fsm->token( TK_Slit ); }
action emit_dlit { fsm->token( TK_Dlit ); }
action emit_id { fsm->token( TK_Id ); }
action emit_integer_decimal { fsm->token( TK_IntegerDecimal ); }
action emit_integer_octal { fsm->token( TK_IntegerOctal ); }
action emit_integer_hex { fsm->token( TK_IntegerHex ); }
action emit_float { fsm->token( TK_Float ); }
action emit_symbol { fsm->token( fsm->tokBuf.data[0] ); }
action tokst { fsm->tokStart = fsm->col; }
# Single and double literals.
slit = ( 'L'? ( "'" ( [^'\\\n] | /\\./ )* "'" ) $buf ) >tokst %emit_slit;
dlit = ( 'L'? ( '"' ( [^"\\\n] | /\\./ )* '"' ) $buf ) >tokst %emit_dlit;
# Identifiers
id = ( [a-zA-Z_] [a-zA-Z0-9_]* ) >tokst $buf %emit_id;
# Floating literals.
fract_const = digit* '.' digit+ | digit+ '.';
exponent = [eE] [+\-]? digit+;
float_suffix = [flFL];
float =
( fract_const exponent? float_suffix? |
digit+ exponent float_suffix? ) >tokst $buf %emit_float;
# Integer decimal. Leading part buffered by float.
integer_decimal = ( ( '0' | [1-9] [0-9]* ) [ulUL]{0,3} $buf ) %emit_integer_decimal;
# Integer octal. Leading part buffered by float.
integer_octal = ( '0' [0-9]+ [ulUL]{0,2} $buf ) %emit_integer_octal;
# Integer hex. Leading 0 buffered by float.
integer_hex = ( '0' ( 'x' [0-9a-fA-F]+ [ulUL]{0,2} ) $buf ) %emit_integer_hex;
# Only buffer the second item, first buffered by symbol. */
namesep = '::' @buf %{fsm->token( TK_NameSep );};
deqs = '==' @buf %{fsm->token( TK_EqualsEquals );};
neqs = '!=' @buf %{fsm->token( TK_NotEquals );};
and_and = '&&' @buf %{fsm->token( TK_AndAnd );};
or_or = '||' @buf %{fsm->token( TK_OrOr );};
mult_assign = '*=' @buf %{fsm->token( TK_MultAssign );};
percent_assign = '%=' @buf %{fsm->token( TK_PercentAssign );};
plus_assign = '+=' @buf %{fsm->token( TK_PlusAssign );};
minus_assign = '-=' @buf %{fsm->token( TK_MinusAssign );};
amp_assign = '&=' @buf %{fsm->token( TK_AmpAssign );};
caret_assign = '^=' @buf %{fsm->token( TK_CaretAssign );};
bar_assign = '|=' @buf %{fsm->token( TK_BarAssign );};
plus_plus = '++' @buf %{fsm->token( TK_PlusPlus );};
minus_minus = '--' @buf %{fsm->token( TK_MinusMinus );};
arrow = '->' @buf %{fsm->token( TK_Arrow );};
arrow_star = '->*' @buf %{fsm->token( TK_ArrowStar );};
dot_star = '.*' @buf %{fsm->token( TK_DotStar );};
# Buffer both items. *
div_assign = '/=' @{fsm->buf('/');fsm->buf(fc);} %{fsm->token( TK_DivAssign );};
# Double dot is sent as two dots.
dot_dot = '..' %{fsm->token('.'); fsm->buf('.'); fsm->token('.');};
# Three char compounds, first item already buffered. */
dot_dot_dot = '...' %{fsm->buf('.'); fsm->buf('.'); fsm->token( TK_DotDotDot );};
# All compunds
compound = namesep | deqs | neqs | and_and | or_or | mult_assign |
div_assign | percent_assign | plus_assign | minus_assign |
amp_assign | caret_assign | bar_assign | plus_plus | minus_minus |
arrow | arrow_star | dot_star | dot_dot | dot_dot_dot;
# Single char symbols.
symbol =
( punct - [./_"'] ) >tokst $buf %emit_symbol |
# Do not immediately buffer slash, may be start of comment.
'/' >tokst %{ fsm->buf('/'); fsm->token( '/' ); } |
# Dot covered by float.
'.' %emit_symbol;
# Comments and whitespace.
commc = '/*' @{fsm->pass('/'); fsm->pass('*');} ( any* $0 '*/' @1 ) $pass;
commcc = '//' @{fsm->pass('/'); fsm->pass('/');} ( any* $0 '\n' @1 ) $pass;
whitespace = ( any - ( 0 | 33..126 ) )+ $pass;
action onEOFChar {
/* On EOF char, write out the non token buffer. */
fsm->nonTokBuf.append(0);
#ifndef PERF_TEST
cout << fsm->nonTokBuf.data;
#endif
fsm->nonTokBuf.clear();
}
# Using 0 as eof. If seeingAs a result all null characters get ignored.
EOF = 0 @onEOFChar;
# All outside code tokens.
tokens = (
id | slit | dlit | float | integer_decimal |
integer_octal | integer_hex | compound | symbol );
nontok = ( commc | commcc | whitespace | EOF );
position = (
'\n' @{ fsm->line += 1; fsm->col = 1; } |
[^\n] @{ fsm->col += 1; } )*;
main := ( ( tokens | nontok )** ) & position;
}%%
%% write data;
void Scanner::init( )
{
}
int Scanner::execute( const char *data, int len )
{
perf_loop
{
Scanner *fsm = this;
/* A count of the number of characters in
* a token. Used for % sequences. */
count = 0;
line = 1;
col = 1;
%% write init;
const char *p = data;
const char *pe = data + len;
const char *eof = pe;
%% write exec;
}
if ( cs == Scanner_error )
return -1;
if ( cs >= Scanner_first_final )
return 1;
return 0;
}
int Scanner::finish( )
{
if ( cs == Scanner_error )
return -1;
if ( cs >= Scanner_first_final )
return 1;
return 0;
}
void Scanner::token( int id )
{
/* Leader. */
if ( nonTokBuf.length > 0 ) {
nonTokBuf.append(0);
#ifndef PERF_TEST
cout << nonTokBuf.data;
#endif
nonTokBuf.clear();
}
/* Token data. */
tokBuf.append(0);
#ifndef PERF_TEST
cout << '<' << id << '>' << tokBuf.data;
#endif
tokBuf.clear();
}
void Buffer::empty()
{
if ( data != 0 ) {
free( data );
data = 0;
length = 0;
allocated = 0;
}
}
void Buffer::upAllocate( int len )
{
if ( data == 0 )
data = (char*) malloc( len );
else
data = (char*) realloc( data, len );
allocated = len;
}
void test( const char *buf )
{
Scanner scanner(cout);
scanner.execute( buf, strlen(buf) );
/* The last token is ignored (because there is no next token). Send
* trailing null to force the last token into whitespace. */
char eof = 0;
if ( scanner.execute( &eof, 1 ) <= 0 ) {
#ifndef PERF_TEST
cerr << "cppscan: scan failed" << endl;
#endif
return;
}
#ifndef PERF_TEST
cout.flush();
#endif
}
int main()
{
test(
"/*\n"
" * Copyright \n"
" */\n"
"\n"
"/* Construct an fsmmachine from a graph. */\n"
"RedFsmAp::RedFsmAp( FsmAp *graph, bool complete )\n"
":\n"
" graph(graph),\n"
"{\n"
" assert( sizeof(RedTransAp) <= sizeof(TransAp) );\n"
"\n"
" reduceMachine();\n"
"}\n"
"\n"
"{\n"
" /* Get the transition that we want to extend. */\n"
" RedTransAp *extendTrans = list[pos].value;\n"
"\n"
" /* Look ahead in the transition list. */\n"
" for ( int next = pos + 1; next < list.length(); pos++, next++ ) {\n"
" if ( ! keyOps->eq( list[pos].highKey, nextKey ) )\n"
" break;\n"
" }\n"
" return false;\n"
"}\n"
"\n" );
test(
"->*\n"
".*\n"
"/*\"*/\n"
"\"/*\"\n"
"L'\"'\n"
"L\"'\"\n" );
return 0;
}
##### OUTPUT #####
/*
* Copyright
*/
/* Construct an fsmmachine from a graph. */
<195>RedFsmAp<197>::<195>RedFsmAp<40>( <195>FsmAp <42>*<195>graph<44>, <195>bool <195>complete <41>)
<58>:
<195>graph<40>(<195>graph<41>)<44>,
<123>{
<195>assert<40>( <195>sizeof<40>(<195>RedTransAp<41>) <60><<61>= <195>sizeof<40>(<195>TransAp<41>) <41>)<59>;
<195>reduceMachine<40>(<41>)<59>;
<125>}
<123>{
/* Get the transition that we want to extend. */
<195>RedTransAp <42>*<195>extendTrans <61>= <195>list<91>[<195>pos<93>]<46>.<195>value<59>;
/* Look ahead in the transition list. */
<195>for <40>( <195>int <195>next <61>= <195>pos <43>+ <218>1<59>; <195>next <60>< <195>list<46>.<195>length<40>(<41>)<59>; <195>pos<212>++<44>, <195>next<212>++ <41>) <123>{
<195>if <40>( <33>! <195>keyOps<211>-><195>eq<40>( <195>list<91>[<195>pos<93>]<46>.<195>highKey<44>, <195>nextKey <41>) <41>)
<195>break<59>;
<125>}
<195>return <195>false<59>;
<125>}
<214>->*
<215>.*
/*"*/
<192>"/*"
<193>L'"'
<192>L"'"
| Ragel in Ruby Host | 5 | podsvirov/colm-suite | test/ragel.d/cppscan1.rl | [
"MIT"
] |
"""Test cases for the API stream sensor."""
from homeassistant.bootstrap import async_setup_component
from homeassistant.components.websocket_api.auth import TYPE_AUTH_REQUIRED
from homeassistant.components.websocket_api.http import URL
from .test_auth import test_auth_active_with_token
async def test_websocket_api(hass, hass_client_no_auth, hass_access_token, legacy_auth):
"""Test API streams."""
await async_setup_component(
hass, "sensor", {"sensor": {"platform": "websocket_api"}}
)
await hass.async_block_till_done()
client = await hass_client_no_auth()
ws = await client.ws_connect(URL)
auth_ok = await ws.receive_json()
assert auth_ok["type"] == TYPE_AUTH_REQUIRED
ws.client = client
state = hass.states.get("sensor.connected_clients")
assert state.state == "0"
await test_auth_active_with_token(hass, ws, hass_access_token)
state = hass.states.get("sensor.connected_clients")
assert state.state == "1"
await ws.close()
await hass.async_block_till_done()
state = hass.states.get("sensor.connected_clients")
assert state.state == "0"
| Python | 4 | MrDelik/core | tests/components/websocket_api/test_sensor.py | [
"Apache-2.0"
] |
#world {
polygon-pattern-file: url('http://a.tile.openstreetmap.org/0/0/0.png');
}
| CartoCSS | 2 | nimix/carto | test/rendering/external_image.mss | [
"Apache-2.0"
] |
*** Settings ***
Suite Setup Check That Default Orders Are Correct
Resource cli_resource.robot
*** Variables ***
@{DEFAULT SUITE ORDER} Suite First Sub.Suite.1 Suite3 Suite4 Suite5
... Suite10 Suite 6 SUite7 suiTe 8 Suite 9 Name
@{DEFAULT TEST ORDER} test1 test2 test3 test4 test5
... test6 test7 test8 test9 test10
... test11 test12
*** Test Cases ***
Randomizing tests
[Setup] Run Tests --randomize test misc/multiple_suites/01__suite_first.robot
Should Not Be Equal As Strings ${SUITE.tests} ${DEFAULT TEST ORDER}
Randomized metadata is added Tests
Randomizing suites
[Setup] Run Tests --randomize Suites misc/multiple_suites
Suites should be randomized
Tests should be in default order
Randomized metadata is added Suites
Randomizing suites and tests
[Setup] Run Tests --randomize all misc/multiple_suites
Suites should be randomized
Tests should be randomized
Randomized metadata is added Suites and tests
Randomizing tests with seed
Run Tests --randomize test:1234 misc/multiple_suites
${suites1} = Suites should be in default order
${tests1} = Tests should be randomized
Randomized metadata is added Tests 1234
Run Tests --randomize TESTS:1234 misc/multiple_suites
${suites2} = Suites should be in default order
${tests2} = Tests should be randomized
Randomized metadata is added Tests 1234
Order should be same ${suites1} ${suites2}
Order should be same ${tests1} ${tests2}
Randomizing suites with seed
Run Tests --randomize Suite:42 misc/multiple_suites
${suites1} = Suites should be randomized
${tests1} = Tests should be in default order
Randomized metadata is added Suites 42
Run Tests --randomize SuiteS:42 misc/multiple_suites
${suites2} = Suites should be randomized
${tests2} = Tests should be in default order
Randomized metadata is added Suites 42
Order should be same ${suites1} ${suites2}
Order should be same ${tests1} ${tests2}
Randomizing suites and tests with seed
Run Tests --randomize all:123456 misc/multiple_suites
${suites1} = Suites should be randomized
${tests1} = Tests should be randomized
Randomized metadata is added Suites and tests 123456
Run Tests --randomize ALL:123456 misc/multiple_suites
${suites2} = Suites should be randomized
${tests2} = Tests should be randomized
Randomized metadata is added Suites and tests 123456
Order should be same ${suites1} ${suites2}
Order should be same ${tests1} ${tests2}
Last option overrides all previous
[Setup] Run Tests --randomize suites --randomize tests --randomize none misc/multiple_suites
Suites should be in default order
Tests should be in default order
Invalid option value
Run Should Fail --randomize INVALID ${TESTFILE} Option '--randomize' does not support value 'INVALID'.
Invalid seed value
Run Should Fail --randomize all:test ${TESTFILE} Option '--randomize' does not support value 'all:test'.
*** Keywords ***
Check That Default Orders Are Correct
Run Tests ${EMPTY} misc/multiple_suites
Suites should be in default order
Tests should be in default order
Suites Should Be Randomized
Should Not Be Equal ${{[suite.name for suite in $SUITE.suites]}} ${DEFAULT SUITE ORDER}
[Return] ${SUITE.suites}
Suites should be in default order
Should Be Equal ${{[suite.name for suite in $SUITE.suites]}} ${DEFAULT SUITE ORDER}
[Return] ${SUITE.suites}
Tests Should Be Randomized
${tests} = Get Tests
Should Not Be Equal ${{[test.name for test in $tests]}} ${DEFAULT TEST ORDER}
[Return] ${tests}
Tests should be in default order
${tests} = Get Tests
Should Be Equal ${{[test.name for test in $tests]}} ${DEFAULT TEST ORDER}
[Return] ${tests}
Order should be same
[Arguments] ${first} ${second}
Should Be Equal As Strings ${first} ${second}
Get Tests
# This keyword is needed because 'Sub.Suite.1' is directory and thus doesn't itself have tests
${tests} = Set Variable If '${SUITE.suites[0].name}' == 'Sub.Suite.1' ${SUITE.suites[0].suites[0].tests} ${SUITE.suites[0].tests}
[Return] ${tests}
Randomized metadata is added
[Arguments] ${what} ${seed}=*
Should Match ${SUITE.metadata['Randomized']} ${what} (seed ${seed})
Run Keyword If ${SUITE.suites}
... Should Be Equal ${SUITE.suites[0].metadata.get('Randomized')} ${NONE}
| RobotFramework | 4 | rdagum/robotframework | atest/robot/cli/runner/randomize.robot | [
"ECL-2.0",
"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.
// Testcase for THRIFT-5382 Netstd default list/set enums values are generated incorrectly
namespace * Thrift5382
include "Thrift5382.objs.thrift"
struct RequestModel {
// Breaks
1: optional set<Thrift5382.objs.FoobarEnum> data_1 = [ FoobarEnum.Val_1, FoobarEnum.Val_2 ],
// Breaks
2: optional list<Thrift5382.objs.FoobarEnum> data_2 = [ FoobarEnum.Val_1, FoobarEnum.Val_2 ],
// Works
3: optional Thrift5382.objs.FoobarEnum data_3 = FoobarEnum.Val_1
}
service Test {
void CallMe(
1 : RequestModel foo,
)
}
| Thrift | 4 | Jimexist/thrift | lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift5382.thrift | [
"Apache-2.0"
] |
class _TestRecord
"""
Store and report the result and log from a single test.
"""
let _env: Env
let name: String
var _pass: Bool = false
var _log: (Array[String] val | None) = None
new create(env: Env, name': String) =>
_env = env
name = name'
fun ref _result(pass: Bool, log: Array[String] val) =>
"""
Our test has completed, store the result.
"""
_pass = pass
_log = log
fun _report(log_all: Bool): Bool =>
"""
Print our test summary, including the log if appropriate.
The log_all parameter indicates whether we've been told to print logs for
all tests. The default is to only print logs for tests that fail.
Returns our pass / fail status.
"""
var show_log = log_all
if _pass then
_env.out.print(_Color.green() + "---- Passed: " + name + _Color.reset())
else
_env.out.print(_Color.red() + "**** FAILED: " + name + _Color.reset())
show_log = true
end
if show_log then
match _log
| let log: Array[String] val =>
// Print the log. Simply print each string in the array.
for msg in log.values() do
_env.out.print(msg)
end
end
end
_pass
fun _list_failed() =>
"""
Print our test name out in the list of failed test, if we failed.
"""
if not _pass then
_env.out.print(_Color.red() + "**** FAILED: " + name + _Color.reset())
end
| Pony | 4 | presidentbeef/ponyc | packages/ponytest/_test_record.pony | [
"BSD-2-Clause"
] |
// run-pass
fn main() {
static NONE: Option<((), &'static u8)> = None;
let ptr = unsafe {
*(&NONE as *const _ as *const *const u8)
};
assert!(ptr.is_null());
}
| Rust | 3 | Eric-Arellano/rust | src/test/ui/issues/issue-21721.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
<% @page_title = 'Setup' -%>
<% if defined?(@session_wiped) or @cleared_tables.any? or @loaded_fixtures.any? -%>
<div id="notice">
<% if defined?(@session_wiped) -%>
<p>The session is wiped clean.</p>
<% end-%>
<% if @cleared_tables.any? -%>
<p>The following database tables are cleared:</p>
<ul>
<% for table in @cleared_tables -%>
<li><%= table %></li>
<% end-%>
</ul>
<% end -%>
<% if @loaded_fixtures.any? -%>
<p>The following fixtures are loaded:</p>
<ul>
<% for fixture in @loaded_fixtures -%>
<li><%= fixture %></li>
<% end-%>
</ul>
<% end -%>
</div>
<% end -%>
<div id="usagedescription">
<p>This page can be used to setup your Selenium tests. The following options can be used:</p>
<dl>
<dt><tt>keep_session</tt></dt>
<dd>
Per default the session is reset, so add <tt>keep_session</tt> in order to keep the current session.
<table>
<tr><td>open</td><td><%= url_for %>?keep_session</td><td> </td></tr>
</table>
</dd>
<dt><tt>fixtures</tt></dt>
<dd>
Loads one or many fixtures into the database. <strong>This will destroy the current data you have in your database!</strong> Use <tt>all</tt> as name in order to load all fixtures, or specify which fixtures that should be loaded (delimited by commas).<br />
If a test needs different data than you have in your fixtures, you can add another <em>fixture set</em>. A fixture set is just a sub directory in <tt>/test/fixtures/</tt> where you can add alternate fixtures (e.g. <tt>/test/fixtures/blank/users.yml</tt>).
<table>
<tr><td>open</td><td><%= url_for :fixtures => 'all' %></td><td> </td></tr>
<tr><td>open</td><td><%= url_for :fixtures => 'fixture' %></td><td> </td></tr>
<tr><td>open</td><td><%= url_for :fixtures => 'fixture_one' %>,fixture_two</td><td> </td></tr>
</table>
<b>Available fixtures</b><br />
<% fixtures = available_fixtures -%>
<% for fixture_set in fixtures.keys.sort -%>
In the <%= fixture_set.blank? ? 'default' : "<tt>#{fixture_set}</tt>" %> fixture set:
<ul>
<% fixtures[fixture_set].unshift fixture_set.blank? ? 'all' : "#{fixture_set}/all" -%>
<% for fixture in fixtures[fixture_set] -%>
<li><tt><%= fixture %></tt></li>
<% end -%>
</ul>
<% end -%>
</dd>
<dt><tt>clear_tables</tt></dt>
<dd>
Clears one or many database tables. Another way to do the same thing is to create an empty fixture in a new fixture set (see <tt>fixtures</tt> above).
<table>
<tr><td>open</td><td><%= url_for :clear_tables => 'sessions' %></td><td> </td></tr>
<tr><td>open</td><td><%= url_for :clear_tables => 'sessions' %>,outgoing_messages</td><td> </td></tr>
</table>
</dd>
</dl>
</div>
| RHTML | 4 | RockHong/railscasts-episodes | episode-116/store/vendor/plugins/selenium-on-rails/lib/views/setup.rhtml | [
"MIT"
] |
-- check that a package version has been installed
set packageIdentifier to ""
set installedPath to ""
set installedVersion to ""
repeat with candidateIdentifier in {"rethinkdb", "com.rethinkdb", "com.rethinkdb.server"}
set installedPath to do shell script "/usr/sbin/pkgutil --pkg-info " & candidateIdentifier & " | awk '/^location: / {sub(/^location: \\/?/, \"/\"); print $0}'"
set installedVersion to do shell script "/usr/sbin/pkgutil --pkg-info " & candidateIdentifier & " | awk '/^version: / {sub(/^version: /, \"\"); print $0}'"
if installedPath is not "" then
set packageIdentifier to candidateIdentifier
exit repeat
end if
end repeat
if installedPath does not end with "/" then
set installedPath to installedPath & "/"
end if
on escapePath(target)
set AppleScript's text item delimiters to "/"
set the pathList to every text item of target
set AppleScript's text item delimiters to "\\/"
set target to the pathList as string
set AppleScript's text item delimiters to ""
return target
end escapePath
if packageIdentifier is "" then
-- the package is not installed, check if the server is there
try
do shell script "PATH=:\"$PATH:/usr/local/bin\"; /usr/bin/which rethinkdb"
display alert "Unable to uninstall" message "Your copy of RethinkDB was not installed using a Mac OS package: you may have installed RethinkDB using Homebrew or manually." & return & return & "This uninstaller will not be able to remove your installation."
on error
display alert "Unable to uninstall" message "The RethinkDB package is not installed on this system."
end try
else
-- verify with the user
set displayPath to installedPath
if installedPath is "/" then
set displayPath to "/usr/local"
end if
set result to display alert "Uninstall RethinkDB?" message "This will uninstall the RethinkDB " & installedVersion & " binaries and support files from:" & return & displayPath & return & return & "Your data files will not be affected. You will be asked for your Administrator password." as warning buttons {"Uninstall", "Cancel"} default button "Cancel"
-- run the uninstall
if the button returned of result is "Uninstall" then
do shell script "set -e; /usr/sbin/pkgutil --files '" & packageIdentifier & "' | sort -r | sed 's/^/" & escapePath(installedPath) & "/' | egrep -vx '/usr|/usr/local|/usr/local/[^/]*' | while read FILE; do rm -fd \"$FILE\"; done && pkgutil --forget '" & packageIdentifier & "'" with administrator privileges
display alert "RethinkDB " & installedVersion & " sucessfully removed from:" & return & displayPath giving up after 10
end if
end if | AppleScript | 5 | zadcha/rethinkdb | packaging/osx/uninstall.scpt | [
"Apache-2.0"
] |
// fake-iprouter.click
// This file is a network-independent version of the IP router
// configuration used in our SOSP paper.
// The network sources (FromDevice or PollDevice elements) have been
// replaced with an InfiniteSource, which sends exactly the packets we sent
// in our tests. The ARPQueriers have been replaced with EtherEncaps, and
// the network sinks (ToDevice elements) have been replaced with Discards.
// Thus, you can play around with IP routing -- benchmark our code, for
// example -- even if you don't have the Linux module or the pcap library.
// Kernel configuration for cone as a router between
// 18.26.4 (eth0) and 18.26.7 (eth1).
// Proxy ARPs for 18.26.7 on eth0.
// eth0, 00:00:C0:AE:67:EF, 18.26.4.24
// eth1, 00:00:C0:4F:71:EF, 18.26.7.1
// 0. ARP queries
// 1. ARP replies
// 2. IP
// 3. Other
// We need separate classifiers for each interface because
// we only want proxy ARP on eth0.
c0 :: Classifier(12/0806 20/0001,
12/0806 20/0002,
12/0800,
-);
c1 :: Classifier(12/0806 20/0001,
12/0806 20/0002,
12/0800,
-);
Idle -> [0]c0;
InfiniteSource(DATA \<
// Ethernet header
00 00 c0 ae 67 ef 00 00 00 00 00 00 08 00
// IP header
45 00 00 28 00 00 00 00 40 11 77 c3 01 00 00 01 02 00 00 02
// UDP header
13 69 13 69 00 14 d6 41
// UDP payload
55 44 50 20 70 61 63 6b 65 74 21 0a 04 00 00 00 01 00 00 00
01 00 00 00 00 00 00 00 00 80 04 08 00 80 04 08 53 53 00 00
53 53 00 00 05 00 00 00 00 10 00 00 01 00 00 00 54 53 00 00
54 e3 04 08 54 e3 04 08 d8 01 00 00
>, LIMIT 600000, STOP true) -> [0]c1;
out0 :: Queue(200) -> Discard;
out1 :: Queue(200) -> Discard;
tol :: Discard;
// An "ARP querier" for each interface.
fake_arpq0 :: EtherEncap(0x0800, 00:00:c0:ae:67:ef, 00:00:c0:4f:71:ef); //ARPQuerier(18.26.4.24, 00:00:C0:AE:67:EF);
fake_arpq1 :: EtherEncap(0x0800, 00:00:c0:4f:71:ef, 00:00:c0:4f:71:ef); //ARPQuerier(18.26.7.1, 00:00:C0:4F:71:EF);
// Deliver ARP responses to ARP queriers as well as Linux.
t :: Tee(3);
c0[1] -> t;
c1[1] -> t;
t[0] -> tol;
t[1] -> fake_arpq0; // was -> [1]arpq0
t[2] -> fake_arpq1; // was -> [1]arpq1
// Connect ARP outputs to the interface queues.
fake_arpq0 -> out0;
fake_arpq1 -> out1;
// Proxy ARP on eth0 for 18.26.7, as well as cone's IP address.
ar0 :: ARPResponder(18.26.4.24 00:00:C0:AE:67:EF,
18.26.7.0/24 00:00:C0:AE:67:EF);
c0[0] -> ar0 -> out0;
// Ordinary ARP on eth1.
ar1 :: ARPResponder(18.26.7.1 00:00:C0:4F:71:EF);
c1[0] -> ar1 -> out1;
// IP routing table. Outputs:
// 0: packets for this machine.
// 1: packets for 18.26.4.
// 2: packets for 18.26.7.
// All other packets are sent to output 1, with 18.26.4.1 as the gateway.
rt :: StaticIPLookup(18.26.4.24/32 0,
18.26.4.255/32 0,
18.26.4.0/32 0,
18.26.7.1/32 0,
18.26.7.255/32 0,
18.26.7.0/32 0,
18.26.4.0/24 1,
18.26.7.0/24 2,
0.0.0.0/0 18.26.4.1 1);
// Hand incoming IP packets to the routing table.
// CheckIPHeader checks all the lengths and length fields
// for sanity.
ip :: Strip(14)
-> CheckIPHeader(INTERFACES 18.26.4.1/24 18.26.7.1/24)
-> [0]rt;
c0[2] -> Paint(1) -> ip;
c1[2] -> Paint(2) -> ip;
// IP packets for this machine.
// ToHost expects ethernet packets, so cook up a fake header.
rt[0] -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> tol;
// These are the main output paths; we've committed to a
// particular output device.
// Check paint to see if a redirect is required.
// Process record route and timestamp IP options.
// Fill in missing ip_src fields.
// Discard packets that arrived over link-level broadcast or multicast.
// Decrement and check the TTL after deciding to forward.
// Fragment.
// Send outgoing packets through ARP to the interfaces.
rt[1] -> DropBroadcasts
-> cp1 :: PaintTee(1)
-> gio1 :: IPGWOptions(18.26.4.24)
-> FixIPSrc(18.26.4.24)
-> dt1 :: DecIPTTL
-> fr1 :: IPFragmenter(300)
-> [0]fake_arpq0;
rt[2] -> DropBroadcasts
-> cp2 :: PaintTee(2)
-> gio2 :: IPGWOptions(18.26.7.1)
-> FixIPSrc(18.26.7.1)
-> dt2 :: DecIPTTL
-> fr2 :: IPFragmenter(300)
-> [0]fake_arpq1;
// DecIPTTL[1] emits packets with expired TTLs.
// Reply with ICMPs. Rate-limit them?
dt1[1] -> ICMPError(18.26.4.24, timeexceeded) -> [0]rt;
dt2[1] -> ICMPError(18.26.4.24, timeexceeded) -> [0]rt;
// Send back ICMP UNREACH/NEEDFRAG messages on big packets with DF set.
// This makes path mtu discovery work.
fr1[1] -> ICMPError(18.26.7.1, unreachable, needfrag) -> [0]rt;
fr2[1] -> ICMPError(18.26.7.1, unreachable, needfrag) -> [0]rt;
// Send back ICMP Parameter Problem messages for badly formed
// IP options. Should set the code to point to the
// bad byte, but that's too hard.
gio1[1] -> ICMPError(18.26.4.24, parameterproblem) -> [0]rt;
gio2[1] -> ICMPError(18.26.4.24, parameterproblem) -> [0]rt;
// Send back an ICMP redirect if required.
cp1[1] -> ICMPError(18.26.4.24, redirect, host) -> [0]rt;
cp2[1] -> ICMPError(18.26.7.1, redirect, host) -> [0]rt;
// Unknown ethernet type numbers.
c0[3] -> Print(c3) -> Discard;
c1[3] -> Print(c3) -> Discard;
| Click | 5 | MacWR/Click-changed-for-ParaGraph | conf/fake-iprouter.click | [
"Apache-2.0"
] |
/*
* Copyright (c) 2021, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibPDF/Object.h>
#include <LibPDF/Value.h>
namespace PDF {
String Value::to_string(int indent) const
{
return visit(
[&](Empty const&) -> String {
// Return type deduction means that we can't use implicit conversions.
return "<empty>";
},
[&](std::nullptr_t const&) -> String {
return "null";
},
[&](bool const& b) -> String {
return b ? "true" : "false";
},
[&](int const& i) {
return String::number(i);
},
[&](float const& f) {
return String::number(f);
},
[&](Reference const& ref) {
return String::formatted("{} {} R", ref.as_ref_index(), ref.as_ref_generation_index());
},
[&](NonnullRefPtr<Object> const& object) {
return object->to_string(indent);
});
}
}
| C++ | 4 | r00ster91/serenity | Userland/Libraries/LibPDF/Value.cpp | [
"BSD-2-Clause"
] |
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2012, Institute Of Software Chinese Academy Of Science, all rights reserved.
// Copyright (C) 2010-2012, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's 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 name of the copyright holders may not 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 Intel Corporation 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.
#if cn != 3
#define loadpix(addr) *(__global const T *)(addr)
#define storepix(val, addr) *(__global T *)(addr) = val
#define TSIZE (int)sizeof(T)
#else
#define loadpix(addr) vload3(0, (__global const T1 *)(addr))
#define storepix(val, addr) vstore3(val, 0, (__global T1 *)(addr))
#define TSIZE (int)sizeof(T1) * cn
#endif
#define OP(a,b) { mid=a; a=min(a,b); b=max(mid,b);}
#ifdef USE_4OPT
//Utility macros for for 1,2,4 channel images:
// - LOAD4/STORE4 - load/store 4-pixel groups from/to global memory
// - SHUFFLE4_3/SHUFFLE4_5 - rearrange scattered border/central pixels into regular 4-pixel variables
// that can be used in following min/max operations
#if cn == 1
#define LOAD4(val, offs) (val) = vload4(0, (__global T1 *)(srcptr + src_index + (offs)))
#define STORE4(val, offs) vstore4((val), 0, (__global T1 *)(dstptr + (offs)))
#define SHUFFLE4_3(src0, src1, src2, dst0, dst1, dst2) { dst1 = src1; \
dst0 = (T4)(src0, dst1.xyz); \
dst2 = (T4)(dst1.yzw, src2); }
#define SHUFFLE4_5(src0, src1, src2, src3, src4, dst0, dst1, dst2, dst3, dst4) { dst2 = src2; \
dst0 = (T4)(src0, src1, dst2.xy); \
dst1 = (T4)(src1, dst2.xyz); \
dst3 = (T4)(dst2.yzw, src3); \
dst4 = (T4)(dst2.zw, src3, src4); }
#elif cn == 2
#define LOAD4(val, offs) (val) = vload8(0, (__global T1 *)(srcptr + src_index + (offs)))
#define STORE4(val, offs) vstore8((val), 0, (__global T1 *)(dstptr + (offs)))
#define SHUFFLE4_3(src0, src1, src2, dst0, dst1, dst2) { dst1 = src1; \
dst0 = (T4)(src0, dst1.s012345); \
dst2 = (T4)(dst1.s234567, src2); }
#define SHUFFLE4_5(src0, src1, src2, src3, src4, dst0, dst1, dst2, dst3, dst4) { dst2 = src2; \
dst0 = (T4)(src0, src1, dst2.s0123); \
dst1 = (T4)(src1, dst2.s012345); \
dst3 = (T4)(dst2.s234567, src3); \
dst4 = (T4)(dst2.s4567, src3, src4); }
#elif cn == 4
#define LOAD4(val, offs) (val) = vload16(0, (__global T1 *)(srcptr + src_index + (offs)))
#define STORE4(val, offs) vstore16((val), 0, (__global T1 *)(dstptr + (offs)))
#define SHUFFLE4_3(src0, src1, src2, dst0, dst1, dst2) { dst1 = src1; \
dst0 = (T4)(src0, dst1.s0123456789ab ); \
dst2 = (T4)(dst1.s456789abcdef, src2); }
#define SHUFFLE4_5(src0, src1, src2, src3, src4, dst0, dst1, dst2, dst3, dst4) { dst2 = src2; \
dst0 = (T4)(src0, src1, dst2.s01234567); \
dst1 = (T4)(src1, dst2.s0123456789ab); \
dst3 = (T4)(dst2.s456789abcdef, src3); \
dst4 = (T4)(dst2.s89abcdef, src3, src4); }
#endif
__kernel void medianFilter3_u(__global const uchar* srcptr, int srcStep, int srcOffset,
__global uchar* dstptr, int dstStep, int dstOffset,
int rows, int cols)
{
int gx= get_global_id(0) << 2;
int gy= get_global_id(1) << 2;
if( gy >= rows || gx >= cols)
return;
T c0; T4 c1; T c2;
T c3; T4 c4; T c5;
T c6; T4 c7; T c8;
int x_left = mad24(max(gx-1, 0), TSIZE, srcOffset);
int x_central = mad24(gx, TSIZE, srcOffset);
int x_right = mad24(min(gx+4, cols-1), TSIZE, srcOffset);
int xdst = mad24(gx, TSIZE, dstOffset);
//0 line
int src_index = max(gy-1, 0)*srcStep;
c0 = *(__global T *)(srcptr + src_index + x_left);
LOAD4(c1, x_central);
c2 = *(__global T *)(srcptr + src_index + x_right);
//1 line
src_index = gy*srcStep;
c3 = *(__global T *)(srcptr + src_index + x_left);
LOAD4(c4, x_central);
c5 = *(__global T *)(srcptr + src_index + x_right);
//iteration for one row from 4 row block
#define ITER3(k) { \
src_index = min(gy+k+1, rows-1)*srcStep; \
c6 = *(__global T *)(srcptr + src_index + x_left); \
LOAD4(c7, x_central); \
c8 = *(__global T *)(srcptr + src_index + x_right); \
T4 p0, p1, p2, p3, p4, p5, p6, p7, p8; \
SHUFFLE4_3(c0, c1, c2, p0, p1, p2); \
SHUFFLE4_3(c3, c4, c5, p3, p4, p5); \
SHUFFLE4_3(c6, c7, c8, p6, p7, p8); \
T4 mid; \
OP(p1, p2); OP(p4, p5); OP(p7, p8); OP(p0, p1); \
OP(p3, p4); OP(p6, p7); OP(p1, p2); OP(p4, p5); \
OP(p7, p8); OP(p0, p3); OP(p5, p8); OP(p4, p7); \
OP(p3, p6); OP(p1, p4); OP(p2, p5); OP(p4, p7); \
OP(p4, p2); OP(p6, p4); OP(p4, p2); \
int dst_index = mad24( gy+k, dstStep, xdst); \
STORE4(p4, dst_index); \
c0 = c3; c1 = c4; c2 = c5; \
c3 = c6; c4 = c7; c5 = c8; \
}
//loop manually unrolled
ITER3(0);
ITER3(1);
ITER3(2);
ITER3(3);
}
__kernel void medianFilter5_u(__global const uchar* srcptr, int srcStep, int srcOffset,
__global uchar* dstptr, int dstStep, int dstOffset,
int rows, int cols)
{
int gx= get_global_id(0) << 2;
int gy= get_global_id(1) << 2;
if( gy >= rows || gx >= cols)
return;
T c0; T c1; T4 c2; T c3; T c4;
T c5; T c6; T4 c7; T c8; T c9;
T c10; T c11; T4 c12; T c13; T c14;
T c15; T c16; T4 c17; T c18; T c19;
T c20; T c21; T4 c22; T c23; T c24;
int x_leftmost = mad24(max(gx-2, 0), TSIZE, srcOffset);
int x_left = mad24(max(gx-1, 0), TSIZE, srcOffset);
int x_central = mad24(gx, TSIZE, srcOffset);
int x_right = mad24(min(gx+4, cols-1), TSIZE, srcOffset);
int x_rightmost= mad24(min(gx+5, cols-1), TSIZE, srcOffset);
int xdst = mad24(gx, TSIZE, dstOffset);
//0 line
int src_index = max(gy-2, 0)*srcStep;
c0 = *(__global T *)(srcptr + src_index + x_leftmost);
c1 = *(__global T *)(srcptr + src_index + x_left);
LOAD4(c2, x_central);
c3 = *(__global T *)(srcptr + src_index + x_right);
c4 = *(__global T *)(srcptr + src_index + x_rightmost);
//1 line
src_index = max(gy-1, 0)*srcStep;
c5 = *(__global T *)(srcptr + src_index + x_leftmost);
c6 = *(__global T *)(srcptr + src_index + x_left);
LOAD4(c7, x_central);
c8 = *(__global T *)(srcptr + src_index + x_right);
c9 = *(__global T *)(srcptr + src_index + x_rightmost);
//2 line
src_index = gy*srcStep;
c10 = *(__global T *)(srcptr + src_index + x_leftmost);
c11 = *(__global T *)(srcptr + src_index + x_left);
LOAD4(c12, x_central);
c13 = *(__global T *)(srcptr + src_index + x_right);
c14 = *(__global T *)(srcptr + src_index + x_rightmost);
//3 line
src_index = (gy+1)*srcStep;
c15 = *(__global T *)(srcptr + src_index + x_leftmost);
c16 = *(__global T *)(srcptr + src_index + x_left);
LOAD4(c17, x_central);
c18 = *(__global T *)(srcptr + src_index + x_right);
c19 = *(__global T *)(srcptr + src_index + x_rightmost);
for(int k = 0; k < 4; k++)
{
//4 line
src_index = min(gy+k+2, rows-1) * srcStep;
c20 = *(__global T *)(srcptr + src_index + x_leftmost);
c21 = *(__global T *)(srcptr + src_index + x_left);
LOAD4(c22, x_central);
c23 = *(__global T *)(srcptr + src_index + x_right);
c24 = *(__global T *)(srcptr + src_index + x_rightmost);
T4 p0, p1, p2, p3, p4,
p5, p6, p7, p8, p9,
p10, p11, p12, p13, p14,
p15, p16, p17, p18, p19,
p20, p21, p22, p23, p24;
SHUFFLE4_5(c0, c1, c2, c3, c4, p0, p1, p2, p3, p4);
SHUFFLE4_5(c5, c6, c7, c8, c9, p5, p6, p7, p8, p9);
SHUFFLE4_5(c10, c11, c12, c13, c14, p10, p11, p12, p13, p14);
SHUFFLE4_5(c15, c16, c17, c18, c19, p15, p16, p17, p18, p19);
SHUFFLE4_5(c20, c21, c22, c23, c24, p20, p21, p22, p23, p24);
T4 mid;
OP(p1, p2); OP(p0, p1); OP(p1, p2); OP(p4, p5); OP(p3, p4);
OP(p4, p5); OP(p0, p3); OP(p2, p5); OP(p2, p3); OP(p1, p4);
OP(p1, p2); OP(p3, p4); OP(p7, p8); OP(p6, p7); OP(p7, p8);
OP(p10, p11); OP(p9, p10); OP(p10, p11); OP(p6, p9); OP(p8, p11);
OP(p8, p9); OP(p7, p10); OP(p7, p8); OP(p9, p10); OP(p0, p6);
OP(p4, p10); OP(p4, p6); OP(p2, p8); OP(p2, p4); OP(p6, p8);
OP(p1, p7); OP(p5, p11); OP(p5, p7); OP(p3, p9); OP(p3, p5);
OP(p7, p9); OP(p1, p2); OP(p3, p4); OP(p5, p6); OP(p7, p8);
OP(p9, p10); OP(p13, p14); OP(p12, p13); OP(p13, p14); OP(p16, p17);
OP(p15, p16); OP(p16, p17); OP(p12, p15); OP(p14, p17); OP(p14, p15);
OP(p13, p16); OP(p13, p14); OP(p15, p16); OP(p19, p20); OP(p18, p19);
OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p21, p23); OP(p22, p24);
OP(p22, p23); OP(p18, p21); OP(p20, p23); OP(p20, p21); OP(p19, p22);
OP(p22, p24); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p12, p18);
OP(p16, p22); OP(p16, p18); OP(p14, p20); OP(p20, p24); OP(p14, p16);
OP(p18, p20); OP(p22, p24); OP(p13, p19); OP(p17, p23); OP(p17, p19);
OP(p15, p21); OP(p15, p17); OP(p19, p21); OP(p13, p14); OP(p15, p16);
OP(p17, p18); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p0, p12);
OP(p8, p20); OP(p8, p12); OP(p4, p16); OP(p16, p24); OP(p12, p16);
OP(p2, p14); OP(p10, p22); OP(p10, p14); OP(p6, p18); OP(p6, p10);
OP(p10, p12); OP(p1, p13); OP(p9, p21); OP(p9, p13); OP(p5, p17);
OP(p13, p17); OP(p3, p15); OP(p11, p23); OP(p11, p15); OP(p7, p19);
OP(p7, p11); OP(p11, p13); OP(p11, p12);
int dst_index = mad24( gy+k, dstStep, xdst);
STORE4(p12, dst_index);
c0=c5; c1=c6; c2=c7; c3=c8; c4=c9;
c5=c10; c6=c11; c7=c12; c8=c13; c9=c14;
c10=c15; c11=c16; c12=c17; c13=c18; c14=c19;
c15=c20; c16=c21; c17=c22; c18=c23; c19=c24;
}
}
#endif
__kernel void medianFilter3(__global const uchar * srcptr, int src_step, int src_offset,
__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols)
{
__local T data[18][18];
int x = get_local_id(0);
int y = get_local_id(1);
int gx = get_global_id(0);
int gy = get_global_id(1);
int dx = gx - x - 1;
int dy = gy - y - 1;
int id = min(mad24(x, 16, y), 9*18-1);
int dr = id / 18;
int dc = id % 18;
int c = clamp(dx + dc, 0, dst_cols - 1);
int r = clamp(dy + dr, 0, dst_rows - 1);
int index1 = mad24(r, src_step, mad24(c, TSIZE, src_offset));
r = clamp(dy + dr + 9, 0, dst_rows - 1);
int index9 = mad24(r, src_step, mad24(c, TSIZE, src_offset));
data[dr][dc] = loadpix(srcptr + index1);
data[dr+9][dc] = loadpix(srcptr + index9);
barrier(CLK_LOCAL_MEM_FENCE);
T p0 = data[y][x], p1 = data[y][(x+1)], p2 = data[y][(x+2)];
T p3 = data[y+1][x], p4 = data[y+1][(x+1)], p5 = data[y+1][(x+2)];
T p6 = data[y+2][x], p7 = data[y+2][(x+1)], p8 = data[y+2][(x+2)];
T mid;
OP(p1, p2); OP(p4, p5); OP(p7, p8); OP(p0, p1);
OP(p3, p4); OP(p6, p7); OP(p1, p2); OP(p4, p5);
OP(p7, p8); OP(p0, p3); OP(p5, p8); OP(p4, p7);
OP(p3, p6); OP(p1, p4); OP(p2, p5); OP(p4, p7);
OP(p4, p2); OP(p6, p4); OP(p4, p2);
int dst_index = mad24( gy, dst_step, mad24(gx, TSIZE, dst_offset));
if (gy < dst_rows && gx < dst_cols)
storepix(p4, dstptr + dst_index);
}
__kernel void medianFilter5(__global const uchar * srcptr, int src_step, int src_offset,
__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols)
{
__local T data[20][20];
int x = get_local_id(0);
int y = get_local_id(1);
int gx = get_global_id(0);
int gy = get_global_id(1);
int dx = gx - x - 2;
int dy = gy - y - 2;
int id = min(mad24(x, 16, y), 10*20-1);
int dr = id / 20;
int dc = id % 20;
int c = clamp(dx + dc, 0, dst_cols - 1);
int r = clamp(dy + dr, 0, dst_rows - 1);
int index1 = mad24(r, src_step, mad24(c, TSIZE, src_offset));
r = clamp(dy + dr + 10, 0, dst_rows - 1);
int index10 = mad24(r, src_step, mad24(c, TSIZE, src_offset));
data[dr][dc] = loadpix(srcptr + index1);
data[dr+10][dc] = loadpix(srcptr + index10);
barrier(CLK_LOCAL_MEM_FENCE);
T p0 = data[y][x], p1 = data[y][x+1], p2 = data[y][x+2], p3 = data[y][x+3], p4 = data[y][x+4];
T p5 = data[y+1][x], p6 = data[y+1][x+1], p7 = data[y+1][x+2], p8 = data[y+1][x+3], p9 = data[y+1][x+4];
T p10 = data[y+2][x], p11 = data[y+2][x+1], p12 = data[y+2][x+2], p13 = data[y+2][x+3], p14 = data[y+2][x+4];
T p15 = data[y+3][x], p16 = data[y+3][x+1], p17 = data[y+3][x+2], p18 = data[y+3][x+3], p19 = data[y+3][x+4];
T p20 = data[y+4][x], p21 = data[y+4][x+1], p22 = data[y+4][x+2], p23 = data[y+4][x+3], p24 = data[y+4][x+4];
T mid;
OP(p1, p2); OP(p0, p1); OP(p1, p2); OP(p4, p5); OP(p3, p4);
OP(p4, p5); OP(p0, p3); OP(p2, p5); OP(p2, p3); OP(p1, p4);
OP(p1, p2); OP(p3, p4); OP(p7, p8); OP(p6, p7); OP(p7, p8);
OP(p10, p11); OP(p9, p10); OP(p10, p11); OP(p6, p9); OP(p8, p11);
OP(p8, p9); OP(p7, p10); OP(p7, p8); OP(p9, p10); OP(p0, p6);
OP(p4, p10); OP(p4, p6); OP(p2, p8); OP(p2, p4); OP(p6, p8);
OP(p1, p7); OP(p5, p11); OP(p5, p7); OP(p3, p9); OP(p3, p5);
OP(p7, p9); OP(p1, p2); OP(p3, p4); OP(p5, p6); OP(p7, p8);
OP(p9, p10); OP(p13, p14); OP(p12, p13); OP(p13, p14); OP(p16, p17);
OP(p15, p16); OP(p16, p17); OP(p12, p15); OP(p14, p17); OP(p14, p15);
OP(p13, p16); OP(p13, p14); OP(p15, p16); OP(p19, p20); OP(p18, p19);
OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p21, p23); OP(p22, p24);
OP(p22, p23); OP(p18, p21); OP(p20, p23); OP(p20, p21); OP(p19, p22);
OP(p22, p24); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p12, p18);
OP(p16, p22); OP(p16, p18); OP(p14, p20); OP(p20, p24); OP(p14, p16);
OP(p18, p20); OP(p22, p24); OP(p13, p19); OP(p17, p23); OP(p17, p19);
OP(p15, p21); OP(p15, p17); OP(p19, p21); OP(p13, p14); OP(p15, p16);
OP(p17, p18); OP(p19, p20); OP(p21, p22); OP(p23, p24); OP(p0, p12);
OP(p8, p20); OP(p8, p12); OP(p4, p16); OP(p16, p24); OP(p12, p16);
OP(p2, p14); OP(p10, p22); OP(p10, p14); OP(p6, p18); OP(p6, p10);
OP(p10, p12); OP(p1, p13); OP(p9, p21); OP(p9, p13); OP(p5, p17);
OP(p13, p17); OP(p3, p15); OP(p11, p23); OP(p11, p15); OP(p7, p19);
OP(p7, p11); OP(p11, p13); OP(p11, p12);
int dst_index = mad24(gy, dst_step, mad24(gx, TSIZE, dst_offset));
if (gy < dst_rows && gx < dst_cols)
storepix(p12, dstptr + dst_index);
} | OpenCL | 5 | thisisgopalmandal/opencv | modules/imgproc/src/opencl/medianFilter.cl | [
"BSD-3-Clause"
] |
Note 0
Copyright (C) 2017 Jonathan Hough. All rights reserved.
)
NB. Implementation of unconstrained BFGS and Limited Memory BFGS function
NB. minimization algorithms.
NB. This implementation is not particularly optimized, other possible implementation
NB. is at: https://gist.github.com/jxy/9db97e44708d0946c3da2d7e82fefcd0
Note 'References'
[1] Numerical optimization, Nocedal & Wright
)
require jpath '~Projects/jlearn/optimize/linesearch.ijs'
cocurrent 'jLearnOpt'
minBFGSX=: 3 : 0
'funcWrapper x0 maxIter tol beta'=: y
func=. 3 : 'func__funcWrapper y'
fprime=. 3 : 'fprime__funcWrapper y'
minBFGS ((func f.)`'');((fprime f.) `'');x0;maxIter;tol;beta
)
minLBFGSX=: 3 : 0
'funcWrapper x0 maxIter tol beta'=: y
func=. 3 : 'func__funcWrapper y'
fprime=. 3 : 'fprime__funcWrapper y'
minLBFGS ((func f.)`'');((fprime f.) `'');x0;maxIter;tol
)
NB. Runs the BFGS algorithm to minimize a givent function, f,
NB. given it's gradient fprime. This is not the limited memory
NB. version of BFGS algorithm. Given an n-dimensional real function f,
NB.and it's gradient gf, and an initial n-dimensional point x0, this
NB. verb will find f's minimum using BFGS.
NB. Arguments:
NB. 0: gerund of the function to optimize
NB. 1: gerund of the gradient of argument 0
NB. 2: Initial point
NB. 3: maximum number of iterations
NB. 4: tolerance for the accuracy of the solution.
NB. 5: Scale factor for initial Hessian.
NB.
NB. Example:
NB. > NB. function and gradient
NB. > g=:+/@:(^&3) - +/@:(*: + 20&*)
NB. > gprime=:3&*@:*: - 20&+@:+:
NB. > minBFGS_BFGS_ (g f.`'');(gprime f.`'');(6.937 22.937 8.937);1000;0.00001;0.01
NB.
minBFGS=: 3 : 0"1
'fg fpg x0 maxIter tol beta'=: y
dot=: +/ .*
make2d=: (1&,@:$ $ ])
assert. maxIter > 0
func=. fg `:6
fprime=. fpg `:6
k=. 0
I=. (=@i.) # x0
xk=. ,x0
pk=. ''
gfk=. fprime xk
Hk=. I *beta
while. (k < maxIter) *. tol < +/&.:*:gfk do.
pk=. ,-Hk dot |: make2d fprime xk
try.
ak=. lineSearch_jLearnOpt_ fg;fpg;xk;pk;0;0.1e_4;0.9;5;300
catch.
smoutput 'Error attempting line search. The input values to the function may be too extreme.'
smoutput 'Function input value (xk): ',":xk
smoutput 'Search direction value (pk): ',":pk
smoutput 'A possible solution is to reduce the size of the initial inverse hessian scale, beta.'
smoutput 'Beta is currently set to ',(":beta), ', which may be too large/small.'
throw.
end.
xkp1=. xk+ak*pk
sk=. make2d xkp1 -xk
gfk=. fprime xkp1
yk=. make2d gfk - fprime xk
rhok=. ''$,% yk dot |: sk
Hk=. (rhok* (|:sk) dot sk)+ ( I - rhok*(|:sk) dot yk) dot Hk dot (I - rhok*(|:yk) dot sk)
xk=. xkp1
k=. k+1
end.
xk
)
NB. Runs the BFGS algorithm to minimize a givent function, f,
NB. given it's gradient fprime. This is not the limited memory
NB. version of BFGS algorithm. Given an n-dimensional real function f,
NB.and it's gradient gf, and an initial n-dimensional point x0, this
NB. verb will find f's minimum using BFGS.
NB. Arguments:
NB. 0: gerund of the function to optimize
NB. 1: gerund of the gradient of argument 0
NB. 2: Initial point
NB. 3: maximum number of iterations
NB. 4: tolerance for the accuracy of the solution.
NB.
NB. Example:
NB. > NB. function and gradient
NB. > g=:+/@:(^&3) - +/@:(*: + 20&*)
NB. > gprime=:3&*@:*: - 20&+@:+:
NB. > minLBFGS_BFGS_ (g f.`'');(gprime f.`'');(6.937 22.937 8.937);1000;0.00001
NB.
minLBFGS=: 3 : 0"1
'fg fpg x0 maxIter tol'=: y
dot=: +/ .*
make2d=: (1&,@:$ $ ])
assert. maxIter > 0
func=. fg `:6
fprime=. fpg `:6
k=. 0
xk=. x0
gfk=. fprime xk
I=. (=@i.) # x0
NB. initialize Hk(k=0).
Hk0=. 0.001 $~ #x0
m=. 20
ctr=. 0
aks=. rhoks=. m$0 NB. array of a_k's and rho_k's
yks=. sks=. 0$~ m,#xk NB. array of y_k's, s_k's
while. (ctr < maxIter) *. (tol < +/&.:*: gfk) do.
NB.===================== 2-loop step ========================
g=. gfk
bnd=. k<.m
for_j.|. k|.i.bnd do.
aks=. (+/ (j{rhoks) * (j{sks) * g) j}aks
g=. g - (j{aks) * (j{yks)
end.
r=. Hk0 * g
for_j. k|.i.bnd do.
b=. +/ (j{rhoks) * (j{yks) * r
r=. r + (,j{sks)*((j{aks) - b)
end.
NB.==========================================================
pk=. -r
try.
ak=. lineSearch_jLearnOpt_ fg;fpg;(xk);(pk);0;0.00001;0.9;100;10
catch.
smoutput 'Error attempting line search. The input values to the function may be too extreme.'
smoutput 'Function input value (xk): ',":xk
smoutput 'Search direction value (pk): ',":pk
smoutput 'A possible solution is to reduce the size of the initial inverse hessian scale, beta.'
smoutput 'Beta is currently set to ',(":beta), ', which may be too large/small.'
throw.
end.
aks=. ak k}aks
xkp1=. xk+ak*pk
gfk=. fprime xkp1
yk=. gfk - fprime xk
if. k > m do. sks=. (0 $~ #xk) (k-m)} sks end.
sks=. (xkp1 -xk) k}sks
rhoks=. (''$,% yk dot |: (k{sks)) k}rhoks
yks=. yk k}yks
xk=. xkp1
k=. (m) | k+1
ctr=. ctr+1
end.
xk
)
| J | 4 | jonghough/jlearn | optimize/lbfgs.ijs | [
"MIT"
] |
ruleset G2S.agency {
meta {
shares __testing
use module G2S.indy_sdk.pool alias pool_module
}
global {
__testing = { "queries":
[ { "name": "__testing" }
//, { "name": "entry", "args": [ "key" ] }
] , "events":
[ //{ "domain": "d1", "type": "t1" }
//, { "domain": "d2", "type": "t2", "attrs": [ "a1", "a2" ] }
]
}
config={"rids": ["G2S.indy_sdk.ledger"
,"G2S.indy_sdk.pool"
,"G2S.indy_sdk.wallet"
,"G2S.agent"]};
}
rule constructor {
select when wrangler ruleset_added where event:attr("rids") >< meta:rid
}
rule systemOnLine { // connect to pool when the engine starts
select when system online
pool_module:open("rLJJ41TslS")
}
rule handleMsg {
select when agency msg_handler
}
rule CONNECT {
select when agency CONNECT
}
rule SIGNUP {
select when agency SIGNUP
}
rule CREATE_AGENT {
select when agency CREATE
always {
raise wrangler event "child_creation"
attributes { "name": event:attr("name"), "color": "#7FFFD4", "rids": config{"rids"},"event_type": "agent_create" }
}
}
rule delete_agent {
select when agency DELETE
always {
raise wrangler event "child_deletion"
attributes { "name": event:attr("name"), "rids": config{"rids"},"event_type": "agent_delete" }
}
}
rule generateQRcode {
select when agency generate_qr_code_offer
}
}
| KRL | 4 | Picolab/G2S | krl/g2s.agency.krl | [
"MIT"
] |
*Test Cases*
Non-ASCII Directory (€ÅÄÖ§)
Log Hello from non-ASCII dir path
| RobotFramework | 3 | phil-davis/robotframework | atest/testdata/parsing/non_ascii_paths/Ty-ouml/sect-test-sect.robot | [
"ECL-2.0",
"Apache-2.0"
] |
{
'body': {
'0': {
'declarations': {
'0': {
'init': {
'body': {
'body': {
'0': {
'range': { '1': 35 },
'loc': { 'end': { 'column': 35 }}
}
}
}
}
}
}
}
}
}
| Diff | 1 | Hans-Halverson/flow | src/parser/test/esprima/declaration/function/migrated_0011.diff | [
"MIT"
] |
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown-wasm"
declare i64 @externalCall(i8*, i32, i64)
define internal i64 @testCall(i8* %ptr, i32 %len, i64 %foo) {
%val = call i64 @externalCall(i8* %ptr, i32 %len, i64 %foo)
ret i64 %val
}
define internal i64 @testCallNonEntry(i8* %ptr, i32 %len) {
entry:
br label %bb1
bb1:
%val = call i64 @externalCall(i8* %ptr, i32 %len, i64 3)
ret i64 %val
}
define void @exportedFunction(i64 %foo) {
%unused = shl i64 %foo, 1
ret void
}
define internal void @callExportedFunction(i64 %foo) {
call void @exportedFunction(i64 %foo)
ret void
}
| LLVM | 3 | ybkimm/tinygo | transform/testdata/wasm-abi.ll | [
"Apache-2.0"
] |
PREFIX : <http://example.org/x/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?x ?y
WHERE {
?x :p ?y .
?y rdf:type :c .
}
| SPARQL | 3 | yanaspaula/rdf4j | testsuites/sparql/src/main/resources/testcases-sparql-1.1-w3c/entailment/owlds02.rq | [
"BSD-3-Clause"
] |
> {
> module Parser (parse) where
> import Type
> import Lexer
> }
> %token
> backslash { Builtin "\\" }
> var { Ident $$ }
> rightarrow { Builtin "->" }
> caseT { Builtin "case" }
> letT { Builtin "let" }
> ofT { Builtin "of" }
> inT { Builtin "in" }
> letnT { Builtin "letn" }
> leftcurly { LeftCurly }
> rightcurly { RightCurly }
> equals { Builtin "=" }
> colon { Builtin ":" }
> cons { Constructor $$ }
> leftbracket { LeftBracket }
> rightbracket { RightBracket }
> semicolon { SemiColon }
> percent { Percent }
> %name parse
> %tokentype { Token }
> %%
> expr
> : backslash var binders rightarrow expr
> { foldr Lambda $5 ($2: reverse $3) }
> | caseT var ofT leftcurly patterns rightcurly
> { Case $2 (reverse $5) }
> | letT var equals var expr inT expr
> { LetApp ($2,$4,$5) $7 }
> | letT var equals expr inT expr
> { Let ($2,$4) $6 }
> | letnT var equals expr inT expr
> { LetN ($2,$4) $6 }
>
> | labelref colon expr { Label $1 $3 }
> | simpleexpr { $1 }
> simpleexpr
> : cons simpleexprs { Cons $1 (reverse $2) }
> | simpleexpr0 { $1 }
>
> simpleexprs
> : simpleexprs simpleexpr0 { $2 : $1 }
> | { [] }
>
> simpleexpr0
> : var { Var $1 }
> | labelref { LabelRef $1 }
> | leftbracket expr rightbracket { $2 }
>
> patterns
> : patterns pattern { $2 : $1 }
> | pattern { [ $1 ] }
>
> pattern : cons binders rightarrow expr semicolon
> { ($1, reverse $2, $4) }
>
> binders : binders var { $2 : $1 }
> | { [ ] }
>
> labelref
> : percent var { $2 }
> {
> happyError :: Int -> a
> happyError x = error ("Error at LINE " ++ show x)
> }
| LilyPond | 5 | sheaf/happy | examples/SimonsExample.ly | [
"BSD-2-Clause"
] |
/// <reference path='fourslash.ts'/>
// @noImplicitReferences: true
// @Filename: /node_modules/a/index.d.ts
////import X from "x";
////export function a(x: X): void;
// @Filename: /node_modules/a/node_modules/x/index.d.ts
////export default class /*defAX*/X {
//// private x: number;
////}
// @Filename: /node_modules/a/node_modules/x/package.json
////{ "name": "x", "version": "1.2./*aVersionPatch*/3" }
// @Filename: /node_modules/b/index.d.ts
////import X from "x";
////export const b: X;
// @Filename: /node_modules/b/node_modules/x/index.d.ts
////export default class /*defBX*/X {
//// private x: number;
////}
// @Filename: /node_modules/b/node_modules/x/package.json
////{ "name": "x", "version": "1.2./*bVersionPatch*/3" }
// @Filename: /src/a.ts
////import { a } from "a";
////import { b } from "b";
////a(/*error*/b);
goTo.file("/src/a.ts");
verify.numberOfErrorsInCurrentFile(0);
testChangeAndChangeBack("aVersionPatch", "defAX");
testChangeAndChangeBack("bVersionPatch", "defBX");
function testChangeAndChangeBack(versionPatch: string, def: string) {
goTo.marker(versionPatch);
edit.insert("4");
goTo.marker(def);
edit.insert(" ");
// No longer have identical packageId, so we get errors.
verify.errorExistsAfterMarker("error");
// Undo the change.
goTo.marker(versionPatch);
edit.deleteAtCaret();
goTo.marker(def);
edit.deleteAtCaret();
// Back to being identical.
goTo.file("/src/a.ts");
verify.numberOfErrorsInCurrentFile(0);
}
| TypeScript | 5 | nilamjadhav/TypeScript | tests/cases/fourslash/duplicatePackageServices_fileChanges.ts | [
"Apache-2.0"
] |
--TEST--
using invalid combinations of cmdline options
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die ("skip Windows only");
}
include "skipif.inc";
?>
--FILE--
<?php
include "include.inc";
$php = get_cgi_path();
reset_env_vars();
var_dump(`$php -n -a -f "wrong"`);
var_dump(`$php -n -f "wrong" -a`);
echo "Done\n";
?>
--EXPECT--
string(51) "Interactive mode enabled
No input file specified.
"
string(51) "Interactive mode enabled
No input file specified.
"
Done
| PHP | 3 | NathanFreeman/php-src | sapi/cgi/tests/005-win32.phpt | [
"PHP-3.01"
] |
import io.vertx.ceylon.platform {
Verticle,
Container
}
import io.vertx.ceylon.core {
Vertx
}
import io.vertx.ceylon.core.eventbus {
Message
}
shared class Receiver() extends Verticle() {
shared actual void start(Vertx vertx, Container container) {
vertx.eventBus.registerHandler {
address = "ping-address";
void onMessage(Message<String> msg) {
print("Received message: ``msg.body``");
msg.reply("pong!");
}
};
}
}
| Ceylon | 4 | vietj/vertx-examples | src/raw/ceylon/eventbus_pointtopoint/Receiver.ceylon | [
"Apache-2.0"
] |
t ia2 -3a 0 1 0 0
t ia2 -ca enable
t ia2 -adj ae
t ia2 -ae on
t app protune on
t app white_balance auto
| AGS Script | 0 | waltersgrey/autoexechack | CA/autoexec.ash | [
"MIT"
] |
unit
class StandardEnemyUnit
export setMaxEnemies, maxEnemies, initializeEnemy, sameAngleEnemy, drawEnemies, enemyErase, stopAllEnemies, setWalls,
getArrayPosition, getClosestEnemy, setAngleX, setAngleY, getAngleX, getAngleY, angleNormalize, setCharX, setCharY, setCharacterParam,
setIsCharDead, getIsCharDead, charCenterX, charCenterY, getEnemyHP, setEnemyHP, enemyCounter, getNumAttacks, getAttackingEnemies,
getAttackPattern, getEnemyX, getEnemyY, getEnemiesAlive, getEnemiesAlivePosition, EnemyTypeKillRadius, getEnemies, setAttackPattern,
setFPSMultiplier, getAttackPattern2, setAttackPattern2, setAttackDelay, setVelocity, initializeBoss, setEnemyPosX, setEnemyPosY
%%%%%%%%% EnemyType Variables %%%%%%%%%
% 3 different types of enemies %
% 1 Boss %
% 1st variable is the picture %
% 2nd variable used store its enemy number %
% Use Syntax(1,Enemy(i)) for making your life easier %
var EnemyTypes : array 1 .. 4 of int
var EnemyTypeKillRadius : array 1 .. 4 of real
var EnemyTypeCenter : array 1 .. 2, 1 .. 4 of real
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% VARIABLES %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% Enemies %%%%% %%%%
% Blue Enemy %
EnemyTypes (1) := Pic.FileNew ("Images/e sprites/BlueEnemy.bmp")
EnemyTypeKillRadius (1) := 11
EnemyTypeCenter (1, 1) := 12
EnemyTypeCenter (2, 1) := 10
Pic.SetTransparentColour (EnemyTypes (1), brightgreen)
% Red Enemy %
EnemyTypes (2) := Pic.FileNew ("Images/e sprites/PurpleEnemy.bmp")
EnemyTypeKillRadius (2) := 11
EnemyTypeCenter (1, 2) := 12
EnemyTypeCenter (2, 2) := 10
Pic.SetTransparentColour (EnemyTypes (2), brightgreen)
% Red Enemy %
EnemyTypes (3) := Pic.FileNew ("Images/e sprites/RedEnemy.bmp")
EnemyTypeKillRadius (3) := 11
EnemyTypeCenter (1, 3) := 12
EnemyTypeCenter (2, 3) := 10
Pic.SetTransparentColour (EnemyTypes (3), brightgreen)
% Yuka %
EnemyTypes (4) := Pic.FileNew ("Images/e sprites/Yuka.bmp")
EnemyTypeKillRadius (4) := 28
EnemyTypeCenter (1, 4) := 19
EnemyTypeCenter (2, 4) := 28
Pic.SetTransparentColour (EnemyTypes (4), brightgreen)
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% WALLS!!! %
% 70 is the largest enemy size so far %
var leftWall : int := 0 - 70
var rightWall : int := 800 + 70
var topWall : int := 600 + 70
var bottomWall : int := 0 - 70
%%%%%% Parameters used when a enemy is fired %%%%%%
% Have a maximum of 1000 Enemies...not that I will use it all up %
% Max Enemies %
var maxEnemies : int := 1000
% Enemy information %
var Enemies : array 1 .. maxEnemies of int
% Speed of the enemy and a counter to make it happen %
% Was velocity a scalar or magnitude? I forget %
% *Looks up 2 lines* Oh yeah, it was a scalar, it's speed with a DIRECTION %
% Increases the x and y of a enemy in such a way it creates a direction/angle %
var velocity : array 1 .. 2, 1 .. maxEnemies of real
var vCounter : array 1 .. 2, 1 .. maxEnemies of real
% Where the enemy is %
var enemyPositions : array 1 .. 2, 1 .. maxEnemies of real
% Which enemies are drawn %
var enemyBoolean : array 1 .. maxEnemies of boolean
for i : 1 .. maxEnemies
enemyBoolean (i) := false
end for
% How many enemies there are %
var enemyCounter : int := 0
% Enemy HP %
var enemyHP : array 1 .. maxEnemies of int
% Enemy attack pattern code %
var attackPattern : array 1 .. maxEnemies of int
var attackPattern2 : array 1 .. maxEnemies of int
% Interval in which enemy must wait until it may initiate attack, expressed in frames %
var attackDelay : array 1 .. maxEnemies of int
% To allow manager to see how many attacks there are %
var numAttacks : int := 0
% To allow manager to see which enemies are attacking %
var attackingEnemies : array 1 .. maxEnemies of int
% To make a timer to control when the enemy fires bullet(s), expressed in frames %
var enemyTimer : array 1 .. maxEnemies of int
for i : 1 .. maxEnemies
enemyTimer (i) := 0
end for
% To figure out how many enemies are alive %
var enemiesAlive : int
% To figure out which enemies are alive %
var enemiesAlivePosition : array 1 .. maxEnemies of int
var FPSMultiplier : real := 1
proc setFPSMultiplier (value : real)
FPSMultiplier := value
end setFPSMultiplier
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
% Character Funtions %
%%%%%%%%%%%%%%%%%%%%%%
% You only need to know where the character is, and if the enemy killed it %
% Must be updated every frame %
var charPosX, charPosY : real
var charCenterX, charCenterY, charRad : real
var isCharDead : boolean
proc setCharX (posX : real)
charPosX := posX
end setCharX
proc setCharY (posY : real)
charPosY := posY
end setCharY
proc setCharacterParam (chCenterX, chCenterY, chRad : real)
charCenterX := chCenterX
charCenterY := chCenterY
charRad := chRad
end setCharacterParam
proc setIsCharDead (isDead : boolean)
isCharDead := isDead
end setIsCharDead
fcn getIsCharDead : boolean
result isCharDead
end getIsCharDead
%%%%%%%%%%%%%%%%%%%%%%%
% Get angle functions %
%%%%%%%%%%%%%%%%%%%%%%%
% Use pythagorean relationship to determine the angle from one co-ordinate to another %
var angleX, angleY, angleMag : real := 0
proc setAngleX (X : real)
angleX := X
end setAngleX
fcn getAngleX : real
result angleX
end getAngleX
proc setAngleY (Y : real)
angleY := Y
end setAngleY
fcn getAngleY : real
result angleY
end getAngleY
fcn angleMagnitude () : real
result sqrt (angleX ** 2 + angleY ** 2)
end angleMagnitude
proc angleNormalize ()
angleMag := angleMagnitude ()
if getAngleX () not= angleMag and getAngleY () not= angleMag then
angleX := angleX / angleMag
angleY := angleY / angleMag
end if
end angleNormalize
%%%%%%%%%%%%%%%%%%%%
% Enemy functions %
%%%%%%%%%%%%%%%%%%%%
proc setMaxEnemies (number : int)
maxEnemies := number
end setMaxEnemies
proc setWalls (left, right, up, down : int)
leftWall := left - 30
rightWall := right + 30
topWall := up + 30
bottomWall := down - 30
end setWalls
fcn getEnemies (arrayPos : int) : int
result Enemies (arrayPos)
end getEnemies
fcn getNumAttacks : int
result numAttacks
end getNumAttacks
fcn getAttackingEnemies (arrayPos : int) : int
result attackingEnemies (arrayPos)
end getAttackingEnemies
fcn getAttackPattern (arrayPos : int) : int
result attackPattern (arrayPos)
end getAttackPattern
proc setAttackPattern (arrayPos, attackPatternValue : int)
attackPattern (arrayPos) := attackPatternValue
end setAttackPattern
fcn getAttackPattern2 (arrayPos : int) : int
result attackPattern2 (arrayPos)
end getAttackPattern2
proc setAttackPattern2 (arrayPos, attackPatternValue : int)
attackPattern2 (arrayPos) := attackPatternValue
end setAttackPattern2
proc setAttackDelay (arrayPos, value : int)
attackDelay (arrayPos) := value div FPSMultiplier
end setAttackDelay
% Gets nearest false enemyBoolean location %
fcn getArrayPosition : int
for i : 1 .. maxEnemies
if enemyBoolean (i) = false then
result i
end if
end for
end getArrayPosition
% Gets the nearest true enemyBoolean location %
fcn getClosestEnemy : int
for i : 1 .. maxEnemies
if enemyBoolean (i) = true then
result i
end if
% If none are present, result a number not within the max number of enemies %
result 100001
end for
end getClosestEnemy
fcn getEnemiesAlive : int
result enemiesAlive
end getEnemiesAlive
fcn getEnemiesAlivePosition (arrayPos : int) : int
result enemiesAlivePosition (arrayPos)
end getEnemiesAlivePosition
fcn getEnemyX (arrayPos : int) : int
result round (enemyPositions (1, arrayPos) + EnemyTypeCenter (1, Enemies (arrayPos)) + vCounter (1, arrayPos))
end getEnemyX
fcn getEnemyY (arrayPos : int) : int
result round (enemyPositions (2, arrayPos) + EnemyTypeCenter (2, Enemies (arrayPos)) + vCounter (2, arrayPos))
end getEnemyY
proc setEnemyPosX (arrayPos : int)
enemyPositions (1, arrayPos) := getEnemyX (arrayPos)
end setEnemyPosX
proc setEnemyPosY (arrayPos : int)
enemyPositions (2, arrayPos) := getEnemyY (arrayPos)
end setEnemyPosY
% Deletes all enemies %
proc stopAllEnemies
for i : 1 .. maxEnemies
if enemyBoolean (i) = true then
enemyBoolean (i) := false
end if
end for
end stopAllEnemies
% To set the velocity, the vCounter will be reset for the velocity to work %
proc setVelocity (speedX, speedY : real, arrayPos : int)
velocity (1, arrayPos) := speedX * FPSMultiplier
velocity (2, arrayPos) := speedY * FPSMultiplier
vCounter (1, arrayPos) := 0
vCounter (2, arrayPos) := 0
end setVelocity
% Stop the enemy from drawing %
proc enemyErase (arrayPos : int)
enemyBoolean (arrayPos) := false
enemyCounter -= 1
% This was not used with stop all enemies because we don't know whether the enemy killed the player yet %
% You can leave the work to the procedure below %
end enemyErase
% Did the enemy hit the character %
proc didEnemyHitChar (centerEnemyPositionX, centerEnemyPositionY : real, arrayPos : int)
% If the enemy hits the character, kill it and delete the enemies %
if sqrt (((charPosX + charCenterX - centerEnemyPositionX) ** 2) + ((charPosY + charCenterY - centerEnemyPositionY) ** 2)) <= EnemyTypeKillRadius (Enemies (arrayPos)) + charRad then
setIsCharDead (true)
end if
end didEnemyHitChar
% To initialize a enemy to be ready for drawing %
proc initializeEnemy (speedX, speedY : real, setPositionX, setPositionY, enemyType, HpValue, attack, delayTime : int)
if enemyCounter < maxEnemies then
var arrayPos : int := getArrayPosition
setVelocity (speedX, speedY, arrayPos)
enemyPositions (1, arrayPos) := setPositionX - EnemyTypeCenter (1, enemyType)
enemyPositions (2, arrayPos) := setPositionY - EnemyTypeCenter (2, enemyType)
Enemies (arrayPos) := enemyType
enemyCounter += 1
enemyHP (arrayPos) := HpValue
attackPattern (arrayPos) := attack
attackPattern2 (arrayPos) := 0
attackDelay (arrayPos) := delayTime div FPSMultiplier
enemyBoolean (arrayPos) := true
end if
end initializeEnemy
% To initialize a boss to be ready for drawing %
proc initializeBoss (speedX, speedY : real, setPositionX, setPositionY, enemyType, HpValue, attack, delayTime, arrayPos : int)
if enemyCounter < maxEnemies then
setVelocity (speedX, speedY, arrayPos)
enemyPositions (1, arrayPos) := setPositionX - EnemyTypeCenter (1, enemyType)
enemyPositions (2, arrayPos) := setPositionY - EnemyTypeCenter (2, enemyType)
Enemies (arrayPos) := enemyType
enemyCounter += 1
enemyHP (arrayPos) := HpValue
attackPattern (arrayPos) := attack
attackPattern2 (arrayPos) := 0
attackDelay (arrayPos) := delayTime div FPSMultiplier
enemyBoolean (arrayPos) := true
end if
end initializeBoss
% To initialize an enemy coming at you %
proc sameAngleEnemy (endX, endY, speed : real, startX, startY, enemyType, HpValue, attack, delayTime : int)
setAngleX ((endX + EnemyTypeCenter (1, enemyType) - startX))
setAngleY ((endY + EnemyTypeCenter (2, enemyType) - startY))
angleNormalize
initializeEnemy (getAngleX * speed, getAngleY * speed, startX, startY, enemyType, HpValue, attack, delayTime)
end sameAngleEnemy
fcn getEnemyHP (arrayPos : int) : int
result enemyHP (arrayPos)
end getEnemyHP
proc setEnemyHP (arrayPos, HPvalue : int)
enemyHP (arrayPos) := HPvalue
end setEnemyHP
% Draws enemies, updates them, and analyzes them %
proc drawEnemies
% Variable used for an attempt to speed up processing %
var netPosition : array 1 .. 2 of int
% Precalculations to make the enemy kill %
var charPositionX : real := charPosX + charCenterX
var charPositionY : real := charPosY + charCenterY
var centerEnemyPositionX : real
var centerEnemyPositionY : real
% To reset counters %
numAttacks := 0
enemiesAlive := 0
% Check if the enemy is dead %
for i : 1 .. maxEnemies
if enemyBoolean (i) = true then
if enemyHP (i) <= 0 then
enemyErase (i)
end if
end if
end for
for i : 1 .. maxEnemies
if enemyBoolean (i) = true then
% To stop when you get to the end of the enemy boolean %
netPosition (1) := round (enemyPositions (1, i) + vCounter (1, i))
netPosition (2) := round (enemyPositions (2, i) + vCounter (2, i))
% To calculate the center of enemies and the character %
centerEnemyPositionX := netPosition (1) + EnemyTypeCenter (1, Enemies (i))
centerEnemyPositionY := netPosition (2) + EnemyTypeCenter (2, Enemies (i))
% EnemyTypes(Enemies(i)) contain which enemy type it is, Enemies(i) show the type of enemy in the array %
Pic.Draw (EnemyTypes (Enemies (i)), netPosition (1), netPosition (2), picMerge)
vCounter (1, i) += velocity (1, i)
vCounter (2, i) += velocity (2, i)
% If the enemy goes off screen %
if netPosition (1) < leftWall or netPosition (1) > rightWall then
enemyErase (i)
elsif netPosition (2) < bottomWall or netPosition (2) > topWall then
enemyErase (i)
end if
% So that the enemy won't kill the character if the character is already dead but it will continue moving %
if getIsCharDead = false then
didEnemyHitChar (centerEnemyPositionX, centerEnemyPositionY, i)
end if
% This creates a delay so the enemies will attack only after a set time %
enemyTimer (i) += 1
enemyTimer (i) := enemyTimer (i) mod attackDelay (i)
if enemyTimer (i) = 0 then
numAttacks += 1
attackingEnemies (numAttacks) := i
end if
enemiesAlive += 1
enemiesAlivePosition (enemiesAlive) := i
end if
end for
end drawEnemies
end StandardEnemyUnit
| Turing | 5 | ajnavarro/language-dataset | data/github.com/KoishiKomeiji/TouhouGame/251a6a8a96cfccd1a9a9d751c4c1e120fc1a87b2/Classes/Enemies/StandardEnemies.tu | [
"MIT"
] |
" Vim syntax file
" Language: SGML-linuxdoc (supported by old sgmltools-1.x)
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2013 May 13
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
syn case ignore
" tags
syn region sgmllnxEndTag start=+</+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError
syn region sgmllnxTag start=+<[^/]+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError
syn match sgmllnxTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=sgmllnxTagName
syn match sgmllnxTagN contained +</\s*[-a-zA-Z0-9]\++ms=s+2 contains=sgmllnxTagName
syn region sgmllnxTag2 start=+<\s*[a-zA-Z]\+/+ keepend end=+/+ contains=sgmllnxTagN2
syn match sgmllnxTagN2 contained +/.*/+ms=s+1,me=e-1
syn region sgmllnxSpecial oneline start="&" end=";"
" tag names
syn keyword sgmllnxTagName contained article author date toc title sect verb
syn keyword sgmllnxTagName contained abstract tscreen p itemize item enum
syn keyword sgmllnxTagName contained descrip quote htmlurl code ref
syn keyword sgmllnxTagName contained tt tag bf it url
syn match sgmllnxTagName contained "sect\d\+"
" Comments
syn region sgmllnxComment start=+<!--+ end=+-->+
syn region sgmllnxDocType start=+<!doctype+ end=+>+
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link sgmllnxTag2 Function
hi def link sgmllnxTagN2 Function
hi def link sgmllnxTag Special
hi def link sgmllnxEndTag Special
hi def link sgmllnxParen Special
hi def link sgmllnxEntity Type
hi def link sgmllnxDocEnt Type
hi def link sgmllnxTagName Statement
hi def link sgmllnxComment Comment
hi def link sgmllnxSpecial Special
hi def link sgmllnxDocType PreProc
hi def link sgmllnxTagError Error
let b:current_syntax = "sgmllnx"
" vim:set tw=78 ts=8 sts=2 sw=2 noet:
| VimL | 4 | uga-rosa/neovim | runtime/syntax/sgmllnx.vim | [
"Vim"
] |
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 20 20" height="20" viewBox="0 0 20 20" width="20"><g><rect fill="none" height="20" width="20"/><path d="M10,14H6l-3,3V4c0-0.55,0.45-1,1-1h12c0.55,0,1,0.45,1,1v4l-1-0.02V4H4v9l6,0V14z M18,10.76l-0.71-0.71l-3.54,3.54 l-1.41-1.41l-0.71,0.71L13.76,15L18,10.76z"/></g></svg> | SVG | 1 | mobiledesres/material-icons | svg/communication/mark_chat_read/materialiconsoutlined/20px.svg | [
"Apache-2.0"
] |
h2. Link Browser Plugin
The Link Browser Plugin provides an easy to use user interface to select resources provided by the Aloha Editor Repository API.
endprologue.
h3. Overview
The Link Browser is an extension of the "Browser Plugin":plugin_browser.html and can be accessed via the Link plugin.
h3. Usage
Select the text you want to add a link to or insert a new link.
Click the Browser icon and select the desired link.
<img src="images/plugins/linkbrowser-01.png" style="width:620px">
h3. Components
* Button at the Link plugin tab.
* Browser UI
h3. Configuration
<javascript>
Aloha.settings.plugins: {
linkbrowser: {
repositoryManager : Aloha.RepositoryManager,
repositoryFilter : [],
objectTypeFilter : [ 'website', 'file', 'image', 'language' ],
renditionFilter : [ '*' ],
filter : [ 'language' ],
columns : {
icon : { title: '', width: 30, sortable: false, resizable: false },
name : { title: 'Name', width: 320, sorttype: 'text' },
language : { title: '', width: 30, sorttype: 'text' },
translations : { title: '', width: 350, sorttype: 'text' }
},
rootPath : Aloha.getPluginUrl( 'browser' ) + '/'
}
}
</javascript> | Textile | 3 | luciany/Aloha-Editor | doc/guides/source/plugin_linkbrowser.textile | [
"CC-BY-3.0"
] |
/*
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package functionalTypes
import kotlin.test.*
typealias AN = Any?
typealias F2 = (AN, AN) -> AN
typealias F5 = (AN, AN, AN, AN, AN) -> AN
typealias F6 = (AN, AN, AN, AN, AN, AN,) -> AN
typealias F32 = (AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
AN, AN, AN, AN, AN, AN, AN, AN) -> AN
typealias F33 = (AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
AN, AN, AN, AN, AN, AN, AN, AN, AN) -> AN
fun callDynType2(list: List<F2>, param: AN) {
val fct = list.first()
val ret = fct(param, null)
assertEquals(param, ret)
}
fun callStaticType2(fct: F2, param: AN) {
val ret = fct(param, null)
assertEquals(param, ret)
}
fun callDynType32(list: List<F32>, param: AN) {
val fct = list.first()
val ret = fct(param
, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
)
assertEquals(param, ret)
}
fun callStaticType32(fct: F32, param: AN) {
val ret = fct(param
, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
)
assertEquals(param, ret)
}
fun callDynType33(list: List<F33>, param: AN) {
val fct = list.first()
val ret = fct(param
, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null, null
)
assertEquals(param, ret)
}
fun callStaticType33(fct: F33, param: AN) {
val ret = fct(param
, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null
, null, null, null, null, null, null, null, null, null
)
assertEquals(param, ret)
}
abstract class FHolder {
abstract val value: Any?
}
// Note: can't provoke dynamic function type conversion using list (as above) or generics
// due to Swift <-> Obj-C interop bugs/limitations.
// Use covariant return type instead:
class F2Holder(override val value: F2) : FHolder()
fun getDynTypeLambda2(): F2Holder = F2Holder({ p1, _ -> p1 })
fun getStaticLambda2(): F2 = { p1, _ -> p1 }
private fun f2(p1: AN, p2: AN): AN = p1
fun getDynTypeRef2(): F2Holder = F2Holder(::f2)
fun getStaticRef2(): F2 = ::f2
private fun f32(
p1: AN, p2: AN, p3: AN, p4: AN, p5: AN, p6: AN, p7: AN, p8: AN,
p9: AN, p10: AN, p11: AN, p12: AN, p13: AN, p14: AN, p15: AN, p16: AN,
p17: AN, p18: AN, p19: AN, p20: AN, p21: AN, p22: AN, p23: AN, p24: AN,
p25: AN, p26: AN, p27: AN, p28: AN, p29: AN, p30: AN, p31: AN, p32: AN
): AN = p1
private fun f33(
p1: AN, p2: AN, p3: AN, p4: AN, p5: AN, p6: AN, p7: AN, p8: AN,
p9: AN, p10: AN, p11: AN, p12: AN, p13: AN, p14: AN, p15: AN, p16: AN,
p17: AN, p18: AN, p19: AN, p20: AN, p21: AN, p22: AN, p23: AN, p24: AN,
p25: AN, p26: AN, p27: AN, p28: AN, p29: AN, p30: AN, p31: AN, p32: AN,
p33: AN
): AN = p1
class F32Holder(override val value: F32) : FHolder()
fun getDynType32(): F32Holder = F32Holder(::f32)
fun getStaticType32(): F32 = ::f32
class F33Holder(override val value: F33) : FHolder()
fun getDynTypeRef33(): F33Holder = F33Holder(::f33)
fun getStaticTypeRef33(): F33 = ::f33
fun getDynTypeLambda33(): F33Holder = F33Holder(getStaticTypeLambda33())
fun getStaticTypeLambda33(): F33 = {
p,
_, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _
->
p
}
| Kotlin | 4 | Mu-L/kotlin | kotlin-native/backend.native/tests/objcexport/functionalTypes.kt | [
"ECL-2.0",
"Apache-2.0"
] |
import curry from 'next/dist/compiled/lodash.curry'
import { webpack } from 'next/dist/compiled/webpack/webpack'
export const loader = curry(function loader(
rule: webpack.RuleSetRule,
config: webpack.Configuration
) {
if (!config.module) {
config.module = { rules: [] }
}
if (rule.oneOf) {
const existing = config.module.rules.find((arrayRule) => arrayRule.oneOf)
if (existing) {
existing.oneOf!.push(...rule.oneOf)
return config
}
}
config.module.rules.push(rule)
return config
})
export const unshiftLoader = curry(function unshiftLoader(
rule: webpack.RuleSetRule,
config: webpack.Configuration
) {
if (!config.module) {
config.module = { rules: [] }
}
if (rule.oneOf) {
const existing = config.module.rules.find((arrayRule) => arrayRule.oneOf)
if (existing) {
existing.oneOf!.unshift(...rule.oneOf)
return config
}
}
config.module.rules.unshift(rule)
return config
})
export const plugin = curry(function plugin(
p: webpack.Plugin,
config: webpack.Configuration
) {
if (!config.plugins) {
config.plugins = []
}
config.plugins.push(p)
return config
})
| TypeScript | 4 | blomqma/next.js | packages/next/build/webpack/config/helpers.ts | [
"MIT"
] |
Red/System [
Title: "Red/System testdynamic link library"
Author: "Nenad Rakocevic & Peter W A Wood"
File: %test-dll2.reds
Rights: "Copyright (C) 2012-2015 Nenad Rakoceivc & Peter W A Wood. All rights reserved."
License: "BSD-3 - https://github.com/red/red/blob/origin/BSD-3-License.txt"
]
neg: func [
i [integer!]
return: [integer!]
][
i: i * -1
i
]
negf: func [
f [float!]
return: [float!]
][
f: f * -1.0
f
]
negf32: func [
f32 [float32!]
return: [float32!]
][
f32: f32 * (as float32! -1.0)
f32
]
true-false: func [
l [logic!]
return: [logic!]
][
either l [l: false] [l: true]
l
]
odd-or-even: func [
s [c-string!]
return: [c-string!]
/local
len [integer!]
answer [c-string!]
][
len: length? s
either 0 = (len % 2) [answer: "even"][answer: "odd"]
answer
]
;callbacki: func [
; i [integer!]
; f [function! [i [integer!]]]
;][
; f i
;]
#export [neg negf negf32 true-false odd-or-even]
| Red | 4 | 0xflotus/red | system/tests/source/units/libtest-dll2.reds | [
"BSL-1.0",
"BSD-3-Clause"
] |
2016-02-18 11:39:04 purple_request_3 Enter password for two factor authentication
2016-02-18 11:39:04 [11:39]
2016-02-18 11:39:13 fsociety dot.dot.dot
2016-02-18 11:39:13 - [purple_request_3] is away: Offline
2016-02-25 11:04:35 purple_request_3 Enter password for two factor authentication
2016-04-06 15:06:02 purple_request_3 Password needed
2016-04-06 15:06:02 [15:06]
2016-04-06 15:06:02 purple_request_3 Password needed
2016-04-06 15:06:02 purple_request_3 Enter password for two factor authentication
2016-04-06 15:06:08 fsociety dot.dot.dot
2016-04-06 15:06:08 [purple_request_3] is away: Offline
| IRC log | 0 | 0x4b1dN/2016-dots | misc/weechat/logs/irc.bitlbee.purple_request_3.weechatlog | [
"MIT"
] |
C Copyright(c) 1998, Space Science and Engineering Center, UW-Madison
C Refer to "McIDAS Software Acquisition and Distribution Policies"
C in the file mcidas/data/license.txt
C *** $Id: nvxgoes.dlm,v 1.10 1998/10/13 20:25:51 dglo Exp $ ***
C ? NVXGOE (DAS)
C
C THIS ROUTINE SETS UP COMMON BLOCKS NAVCOM AND NAVINI FOR USE BY THE
C NAVIGATION TRANSFORMATION ROUTINES NVXSAE AND NVXEAS.
C NVXINI SHOULD BE RECALLED EVERY TIME A TRANSFORMATION IS DESIRED
C FOR A PICTURE WITH A DIFFERENT TIME THAN THE PREVIOUS CALL.
C IFUNC IS 1 (INITIALIZE; SET UP COMMON BLOCKS)
C 2 (ACCEPT/PRODUCE ALL EARTH COORDINATES IN LAT/LON
C FORM IF IARR IS 'LL ' OR IN THE X,Y,Z COORDINATE FRAME
C IF IARR IS 'XYZ '.
C THIS AFFECTS ALL SUBSEQUENT NVXEAS OR NVXSAE CALLS.)
C IARR IS AN INTEGER ARRAY (DIM 128) IF IFUNC=1, CONTAINING NAV
C PARAMETERS
C
FUNCTION NVXINI(IFUNC,IARR)
INTEGER IARR(*)
CHARACTER*2 CLLSW
COMMON/NAVCOM/NAVDAY,LINTOT,DEGLIN,IELTOT,DEGELE,SPINRA,IETIMY,IET
&IMH,SEMIMA,OECCEN,ORBINC,PERHEL,ASNODE,NOPCLN,DECLIN,RASCEN,PICLIN
&,PRERAT,PREDIR,PITCH,YAW,ROLL,SKEW
COMMON /BETCOM/IAJUST,IBTCON,NEGBET,ISEANG
COMMON /VASCOM/SCAN1,TIME1,SCAN2,TIME2
COMMON /NAVINI/
& EMEGA,AB,ASQ,BSQ,R,RSQ,
& RDPDG,
& NUMSEN,TOTLIN,RADLIN,
& TOTELE,RADELE,PICELE,
& CPITCH,CYAW,CROLL,
& PSKEW,
& RFACT,ROASIN,TMPSCL,
& B11,B12,B13,B21,B22,B23,B31,B32,B33,
& GAMMA,GAMDOT,
& ROTM11,ROTM13,ROTM21,ROTM23,ROTM31,ROTM33,
& PICTIM,XREF
COMMON /NVUNIT/ LLSW,IOLD
INCLUDE 'hex80.inc'
DATA MISVAL/ HEX80 /
DATA JINIT/0/
C
C
IF (JINIT.EQ.0) THEN
JINIT=1
LLSW=0
JDAYSV=-1
JTIMSV=-1
IOLD=0
ENDIF
IF (IFUNC.EQ.2) THEN
CALL MOVWC(IARR,CLLSW)
IF (CLLSW.EQ.'LL') LLSW=0
IF (CLLSW.EQ.'XY') LLSW=1
NVXINI=0
RETURN
ENDIF
JTYPE=IARR(1)
IF (JTYPE.NE.LIT('GOES')) GOTO 90
JDAY=IARR(2)
JTIME=IARR(3)
IF(JDAY.EQ.JDAYSV.AND.JTIME.EQ.JTIMSV) GO TO 10
C
C-----INITIALIZE NAVCOM
C
NAVDAY=MOD(JDAY,100000)
DO 20 N=7,12
IF(IARR(N).GT.0) GO TO 25
20 CONTINUE
GO TO 90
25 IETIMY=ICON1(IARR(5))
IETIMH=100*(IARR(6)/100)+IROUND(.6*MOD(IARR(6),100))
SEMIMA=FLOAT(IARR(7))/100.0
OECCEN=FLOAT(IARR(8))/1000000.0
ORBINC=FLOAT(IARR(9))/1000.0
XMEANA=FLOAT(IARR(10))/1000.0
PERHEL=FLOAT(IARR(11))/1000.0
ASNODE=FLOAT(IARR(12))/1000.0
CALL EPOCH(IETIMY,IETIMH,SEMIMA,OECCEN,XMEANA)
IF (IARR(5).EQ.0) GOTO 90
CCC IF(IARR(5).NE.0.AND.IARR(9).NE.0) IEXIST=IEXIST-10
DECLIN=FLALO(IARR(13))
RASCEN=FLALO(IARR(14))
PICLIN=IARR(15)
IF (IARR(15).GE.1000000) PICLIN=PICLIN/10000.
IF (IARR(13).EQ.0.AND.IARR(14).EQ.0.AND.IARR(15).EQ.0)
& GOTO 90
C-----ADDED 9/83 TO SUPPORT FRACTIONAL VALUES FOR PICLIN
SPINRA=IARR(16)/1000.0
IF(IARR(16).NE.0.AND.SPINRA.LT.300.0) SPINRA=60000.0/SPINRA
IF (IARR(16).EQ.0) GOTO 90
DEGLIN=FLALO(IARR(17))
LINTOT=IARR(18)
DEGELE=FLALO(IARR(19))
IELTOT=IARR(20)
PITCH=FLALO(IARR(21))
YAW=FLALO(IARR(22))
ROLL=FLALO(IARR(23))
SKEW=IARR(29)/100000.0
IF (IARR(29).EQ.MISVAL) SKEW=0.
C
C-----INITIALIZE BETCOM
C
IAJUST=IARR(25)
ISEANG=IARR(28)
IBTCON=6289920
NEGBET=3144960
C
C
C-----INITIALIZE NAVINI COMMON BLOCK
C
C
EMEGA=.26251617
AB=40546851.22
ASQ=40683833.48
BSQ=40410330.18
R=6371.221
RSQ=R*R
RDPDG=1.745329252E-02
NUMSEN=MOD(LINTOT/100000,100)
IF(NUMSEN.LT.1)NUMSEN=1
TOTLIN=NUMSEN*MOD(LINTOT,100000)
RADLIN=RDPDG*DEGLIN/(TOTLIN-1.0)
TOTELE=IELTOT
RADELE=RDPDG*DEGELE/(TOTELE-1.0)
PICELE=(1.0+TOTELE)/2.0
CPITCH=RDPDG*PITCH
CYAW=RDPDG*YAW
CROLL=RDPDG*ROLL
PSKEW=ATAN2(SKEW,RADLIN/RADELE)
STP=SIN(CPITCH)
CTP=COS(CPITCH)
STY=SIN(CYAW-PSKEW)
CTY =COS(CYAW-PSKEW)
STR=SIN(CROLL)
CTR=COS(CROLL)
ROTM11=CTR*CTP
ROTM13=STY*STR*CTP+CTY*STP
ROTM21=-STR
ROTM23=STY*CTR
ROTM31=-CTR*STP
ROTM33=CTY*CTP-STY*STR*STP
RFACT=ROTM31**2+ROTM33**2
ROASIN=ATAN2(ROTM31,ROTM33)
TMPSCL=SPINRA/3600000.0
DEC=DECLIN*RDPDG
SINDEC=SIN(DEC)
COSDEC=COS(DEC)
RAS=RASCEN*RDPDG
SINRAS=SIN(RAS)
COSRAS=COS(RAS)
B11=-SINRAS
B12=COSRAS
B13=0.0
B21=-SINDEC*COSRAS
B22=-SINDEC*SINRAS
B23=COSDEC
B31=COSDEC*COSRAS
B32=COSDEC*SINRAS
B33=SINDEC
XREF=RAERAC(NAVDAY,0,0.0)*RDPDG
C
C-----TIME-SPECIFIC PARAMETERS (INCL GAMMA)
C
PICTIM=FLALO(JTIME)
GAMMA=FLOAT(IARR(39))/100.
GAMDOT=FLOAT(IARR(40))/100.
C
C-----INITIALIZE VASCOM
C
ISS=JDAY/100000
IF ((ISS.GT.25.OR.ISS.EQ.12).AND.IARR(31).GT.0) THEN
C THIS SECTION DOES VAS BIRDS AND GMS
C IT USES TIMES AND SCAN LINE FROM BETA RECORDS
SCAN1=FLOAT(IARR(31))
TIME1=FLALO(IARR(32))
SCAN2=FLOAT(IARR(35))
TIME2=FLALO(IARR(36))
ELSE
C THIS SECTION DOES THE OLD GOES BIRDS
SCAN1=1.
TIME1=FLALO(JTIME)
SCAN2=FLOAT(MOD(LINTOT,100000))
TIME2=TIME1+SCAN2*TMPSCL
ENDIF
IOLD=0
C
C-----ALL DONE. EVERYTHING OK
C
10 CONTINUE
JDAYSV=JDAY
JTIMSV=JTIME
NVXINI=0
RETURN
90 NVXINI=-1
RETURN
END
C
C
C
C
C
C
FUNCTION NVXSAE(XLIN,XELE,XDUM,XPAR,YPAR,ZPAR)
C TRANSFORMS SAT COOR TO EARTH COOR.
C ALL PARAMETERS REAL
C INPUTS:
C XLIN,XELE ARE SATELLITE LINE AND ELEMENT (IMAGE COORDS.)
C XDUM IS DUMMY (IGNORE)
C OUTPUTS:
C XPAR,YPAR,ZPAR REPRESENT EITHER LAT,LON,(DUMMY) OR X,Y,Z DEPENDING
C ON THE OPTION SET IN PRIOR NVXINI CALL WITH IFUNC=2.
C
C FUNC VAL IS 0 (OK) OR -1 (CAN'T; E.G. OFF OF EARTH)
C
C
COMMON/NAVCOM/NAVDAY,LINTOT,DEGLIN,IELTOT,DEGELE,SPINRA,IETIMY,IET
&IMH,SEMIMA,OECCEN,ORBINC,PERHEL,ASNODE,NOPCLN,DECLIN,RASCEN,PICLIN
&,PRERAT,PREDIR,PITCH,YAW,ROLL,SKEW
COMMON/NAVINI/
& EMEGA,AB,ASQ,BSQ,R,RSQ,
& RDPDG,
& NUMSEN,TOTLIN,RADLIN,
& TOTELE,RADELE,PICELE,
& CPITCH,CYAW,CROLL,
& PSKEW,
& RFACT,ROASIN,TMPSCL,
& B11,B12,B13,B21,B22,B23,B31,B32,B33,
& GAMMA,GAMDOT,
& ROTM11,ROTM13,ROTM21,ROTM23,ROTM31,ROTM33,
& PICTIM,XREF
COMMON /NVUNIT/ LLSW,IOLD
DATA PI/3.14159265/
C
C
ILIN=IROUND(XLIN)
PARLIN=(ILIN-1)/NUMSEN+1
FRAMET=TMPSCL*PARLIN
SAMTIM=FRAMET+PICTIM
CALL SATVEC(SAMTIM,XSAT,YSAT,ZSAT)
YLIN=(XLIN-PICLIN)*RADLIN
YELE=(XELE-PICELE+GAMMA+GAMDOT*SAMTIM)*RADELE
XCOR=B11*XSAT+B12*YSAT+B13*ZSAT
YCOR=B21*XSAT+B22*YSAT+B23*ZSAT
ROT=ATAN2(YCOR,XCOR)+PI
YELE=YELE-ROT
COSLIN=COS(YLIN )
SINLIN=SIN(YLIN)
SINELE=SIN(YELE)
COSELE=COS(YELE)
ELI=ROTM11*COSLIN-ROTM13*SINLIN
EMI=ROTM21*COSLIN-ROTM23*SINLIN
ENI=ROTM31*COSLIN-ROTM33*SINLIN
TEMP=ELI
ELI=COSELE*ELI+SINELE*EMI
EMI=-SINELE*TEMP+COSELE*EMI
ELO=B11*ELI+B21*EMI+B31*ENI
EMO=B12*ELI+B22*EMI+B32*ENI
ENO=B13*ELI+B23*EMI+B33*ENI
BASQ=BSQ/ASQ
ONEMSQ=1.0-BASQ
AQ=BASQ+ONEMSQ*ENO**2
BQ=2.0*((ELO*XSAT+EMO*YSAT)*BASQ+ENO*ZSAT)
CQ=(XSAT**2+YSAT**2)*BASQ+ZSAT**2-BSQ
RAD=BQ**2-4.0*AQ*CQ
IF(RAD.LT.1.0)GO TO 2
S=-(BQ+SQRT(RAD))/(2.0*AQ)
X=XSAT+ELO*S
Y=YSAT+EMO*S
Z=ZSAT+ENO*S
CT=COS(EMEGA*SAMTIM+XREF)
ST=SIN(EMEGA*SAMTIM+XREF)
X1=CT*X+ST*Y
Y1=-ST*X+CT*Y
IF (LLSW.EQ.0) THEN
CALL NXYZLL(X1,Y1,Z,XPAR,YPAR)
ZPAR=0.
ELSE
XPAR=X1
YPAR=Y1
ZPAR=Z
ENDIF
NVXSAE=0
RETURN
2 NVXSAE=-1
RETURN
END
C
C
C
FUNCTION NVXEAS(XPAR,YPAR,ZPAR,XLIN,XELE,XDUM)
C FIXED 0Z PROBLEM (INIT. OF ORBTIM TO 0.0)
C 5/26/82; TRANSFORM EARTH TO SATELLITE COORDS
C ALL PARAMETERS REAL
C INPUTS:
C XPAR,YPAR,ZPAR REPRESENT EITHER LAT,LON,(DUMMY) OR X,Y,Z DEPENDING
C ON THE OPTION SET IN PRIOR NVXINI CALL WITH IFUNC=2.
C OUTPUTS:
C XLIN,XELE ARE SATELLITE LINE AND ELEMENT (IMAGE COORDS.)
C XDUM IS DUMMY (IGNORE)
C
C FUNC VAL IS 0 (OK) OR -1 (CAN'T; E.G. BAD LAT/LON)
C
C
COMMON/NAVINI/
& EMEGA,AB,ASQ,BSQ,R,RSQ,
& RDPDG,
& NUMSEN,TOTLIN,RADLIN,
& TOTELE,RADELE,PICELE,
& CPITCH,CYAW,CROLL,
& PSKEW,
& RFACT,ROASIN,TMPSCL,
& B11,B12,B13,B21,B22,B23,B31,B32,B33,
& GAMMA,GAMDOT,
& ROTM11,ROTM13,ROTM21,ROTM23,ROTM31,ROTM33,
& PICTIM,XREF
COMMON/NAVCOM/NAVDAY,LINTOT,DEGLIN,IELTOT,DEGELE,SPINRA,IETIMY,IET
&IMH,SEMIMA,OECCEN,ORBINC,PERHEL,ASNODE,NOPCLN,DECLIN,RASCEN,PICLIN
&,PRERAT,PREDIR,PITCH,YAW,ROLL,SKEW
COMMON/VASCOM/SCAN1,TIME1,SCAN2,TIME2
COMMON /NVUNIT/ LLSW,IOLD
DATA OLDLIN/910./,ORBTIM/-99999./
C
C
NVXEAS=0
IF (LLSW.EQ.0) THEN
IF (ABS(XPAR).GT.90.) THEN
NVXEAS=-1
RETURN
ENDIF
CALL NLLXYZ(XPAR,YPAR,X1,Y1,Z)
ELSE
X1=XPAR
Y1=YPAR
Z=ZPAR
ENDIF
XDUM=0.0
SAMTIM=TIME1
DO 50 I=1,2
IF(ABS(SAMTIM-ORBTIM).LT.0.0005) GO TO 10
CALL SATVEC(SAMTIM,XSAT,YSAT,ZSAT)
ORBTIM=SAMTIM
XHT=SQRT(XSAT**2+YSAT**2+ZSAT**2)
10 CT=COS(EMEGA*SAMTIM+XREF)
ST=SIN(EMEGA*SAMTIM+XREF)
X=CT*X1-ST*Y1
Y= ST*X1+CT*Y1
VCSTE1=X-XSAT
VCSTE2=Y-YSAT
VCSTE3=Z-ZSAT
VCSES3=B31*VCSTE1+B32*VCSTE2+B33*VCSTE3
ZNORM=SQRT(VCSTE1**2+VCSTE2**2+VCSTE3**2)
X3=VCSES3/ZNORM
UMV=ATAN2(X3,SQRT(RFACT-X3**2))-ROASIN
XLIN=PICLIN-UMV/RADLIN
PARLIN=IFIX(XLIN-1.0)/NUMSEN
IF(I.EQ.2) GO TO 50
SAMTIM=TIME2
OLDLIN=XLIN
50 CONTINUE
SCNNUM=(IFIX(OLDLIN+XLIN)/2.0-1.0)/NUMSEN
SCNFRC=(SCNNUM-SCAN1)/(SCAN2-SCAN1)
XLIN=OLDLIN+SCNFRC*(XLIN-OLDLIN)
SAMTIM=TIME1+TMPSCL*(SCNNUM-SCAN1)
CALL SATVEC(SAMTIM,XSAT,YSAT,ZSAT)
COSA=X*XSAT+Y*YSAT+Z*ZSAT
CTST=0.0001*R*XHT+RSQ
IF(COSA.LT.CTST) NVXEAS=-1
XSATS1=B11*XSAT+B12*YSAT+B13*ZSAT
YSATS2=B21*XSAT+B22*YSAT+B23*ZSAT
CT=COS(EMEGA*SAMTIM+XREF)
ST=SIN(EMEGA*SAMTIM+XREF)
X=CT*X1-ST*Y1
Y= ST*X1+CT*Y1
VCSTE1=X-XSAT
VCSTE2=Y-YSAT
VCSTE3=Z-ZSAT
VCSES1=B11*VCSTE1+B12*VCSTE2+B13*VCSTE3
VCSES2=B21*VCSTE1+B22*VCSTE2+B23*VCSTE3
VCSES3=B31*VCSTE1+B32*VCSTE2+B33*VCSTE3
XNORM=SQRT(ZNORM**2-VCSES3**2)
YNORM=SQRT(XSATS1**2+YSATS2**2)
ZNORM=SQRT(VCSTE1**2+VCSTE2**2+VCSTE3**2)
X3=VCSES3/ZNORM
UMV=ATAN2(X3,SQRT(RFACT-X3**2))-ROASIN
SLIN=SIN(UMV)
CLIN=COS(UMV)
U=ROTM11*CLIN+ROTM13*SLIN
V=ROTM21*CLIN+ROTM23*SLIN
XELE=PICELE+ASIN((XSATS1*VCSES2-YSATS2*VCSES1)/(XNORM*YNORM))/RADE
&LE
XELE=XELE+ATAN2(V,U)/RADELE
XELE=XELE-GAMMA-GAMDOT*SAMTIM
RETURN
END
C
C
C
FUNCTION NVXOPT(IFUNC,XIN,XOUT)
C
C IFUNC= 'SPOS' SUBSATELLITE LAT/LON
C
C XIN - NOT USED
C XOUT - 1. SUB-SATELLITE LATITUDE
C - 2. SUB-SATELLITE LONGITUDE
C
C
C IFUNC= 'ANG ' ANGLES
C
C XIN - 1. SSYYDDD
C 2. TIME (HOURS)
C 3. LATITUDE
C 4. LONGITUDE (***** WEST NEGATIVE *****)
C XOUT- 1. SATELLITE ANGLE
C 2. SUN ANGLE
C 3. RELATIVE ANGLE
C
C
C
C IFUNC= 'HGT ' INPUT HEIGHT FOR PARALLAX
C
C XIN - 1. HEIGHT (KM)
C
REAL XIN(*),XOUT(*)
CHARACTER*4 CLIT,CFUNC
COMMON /NAVINI/
& EMEGA,AB,ASQ,BSQ,R,RSQ,
& RDPDG,
& NUMSEN,TOTLIN,RADLIN,
& TOTELE,RADELE,PICELE,
& CPITCH,CYAW,CROLL,
& PSKEW,
& RFACT,ROASIN,TMPSCL,
& B11,B12,B13,B21,B22,B23,B31,B32,B33,
& GAMMA,GAMDOT,
& ROTM11,ROTM13,ROTM21,ROTM23,ROTM31,ROTM33,
& PICTIM,XREF
DATA LASDAY/-1/,LASTIM/-1/
DATA A/6378.388/,B/6356.912/,RR/6371.221/
CFUNC=CLIT(IFUNC)
CCC CALL DDEST('IN NVXOPT '//CFUNC,0)
NVXOPT=0
IF(CFUNC.EQ.'SPOS') THEN
INORB=0
NTIME=M0ITIME(PICTIM)
CALL SATPOS(INORB,NTIME,X,Y,Z)
CALL NXYZLL(X,Y,Z,XOUT(1),XOUT(2))
ELSE IF(CFUNC.EQ.'ANG ') THEN
JDAY=IROUND(XIN(1))
JTIME=M0ITIME(XIN(2))
FLAT=XIN(3)
FLON=XIN(4)
IF(JDAY.NE.LASDAY.OR.JTIME.NE.LASTIM) THEN
CALL SOLARP(JDAY,JTIME,GHA,DEC,XLAT,XLON)
LASDAY=JDAY
LASTIM=JTIME
ENDIF
CALL ANGLES(JDAY,JTIME,FLAT,FLON,GHA,DEC,ZENLOC,SZEN,RELANG)
XOUT(1)=ZENLOC
XOUT(2)=SZEN
XOUT(3)=RELANG
ELSE IF(CFUNC.EQ.'HGT ') THEN
HGT=XIN(1)
ASQ=(A+HGT)*(A+HGT)
BSQ=(B+HGT)*(B+HGT)
AB=(A+HGT)*(B+HGT)
R=RR+HGT
RSQ=R*R
ELSE
NVXOPT=1
ENDIF
RETURN
END
C
C
C
C
C-----SUBSIDIARY SUBPROGRAMS
C
C
C
FUNCTION ICON1(YYMMDD)
C
C CONVERTS YYMMDD TO YYDDD
C
IMPLICIT INTEGER(A-Z)
DIMENSION NUM(12)
DATA NUM/0,31,59,90,120,151,181,212,243,273,304,334/
C
YEAR=MOD(YYMMDD/10000,100)
MONTH=MOD(YYMMDD/100,100)
DAY=MOD(YYMMDD,100)
IF(MONTH.LT.0.OR.MONTH.GT.12)MONTH=1
JULDAY=DAY+NUM(MONTH)
IF(MOD(YEAR,4).EQ.0.AND.MONTH.GT.2) JULDAY=JULDAY+1
ICON1=1000*YEAR+JULDAY
RETURN
END
C
C
SUBROUTINE EPOCH(IETIMY,IETIMH,SEMIMA,OECCEN,XMEANA)
C EPOCH PHILLI 0173 NAV: FINDS TIME OF PERIGEE FROM KEPLERIAN EPOCH
C
C
PARAMETER (PI=3.14159265)
PARAMETER (RDPDG=PI/180.0)
PARAMETER (RE=6378.388)
PARAMETER (GRACON=0.07436574)
LEAPYR(IY)=366-(MOD(IY,4)+3)/4
C
C
XMMC=GRACON*SQRT(RE/SEMIMA)**3
XMANOM=RDPDG*XMEANA
TIME=(XMANOM-OECCEN*SIN(XMANOM))/(60.0*XMMC)
TIME1=FLALO(IETIMH)
TIME=TIME1-TIME
IDAY=0
IF(TIME.GT.48.0)GO TO 8
IF(TIME.GT.24.0)GO TO 1
IF(TIME.LT.-24.0)GO TO 2
IF(TIME.LT.0.0)GO TO 3
GO TO 4
8 TIME=TIME-48.0
IDAY=2
GO TO 4
1 TIME=TIME-24.0
IDAY=1
GO TO 4
2 TIME=TIME+48.0
IDAY=-2
GO TO 4
3 TIME=TIME+24.0
IDAY=-1
4 IETIMH=M0ITIME(TIME)
IF(IDAY.EQ.0)RETURN
JYEAR=MOD(IETIMY/1000,100)
c add 1000 so year will not go under zero
jyear=jyear+1000
JDAY=MOD(IETIMY,1000)
JDAY=JDAY+IDAY
IF(JDAY.LT.1)GO TO 5
JTOT=LEAPYR(JYEAR)
IF(JDAY.GT.JTOT)GO TO 6
GO TO 7
5 JYEAR=JYEAR-1
JDAY=LEAPYR(JYEAR)+JDAY
GO TO 7
6 JYEAR=JYEAR+1
JDAY=JDAY-JTOT
7 continue
jyear=mod(jyear,100)
IETIMY=1000*JYEAR+JDAY
RETURN
END
C
C
C SATVEC PHILLI 0880 NAVLIB COMPUTES EARTH SATELLITE AS FUNCTION OF TIM
C VECTOR EARTH-CENTER-TO-SAT (FUNC OF TIME)
SUBROUTINE SATVEC(SAMTIM,X,Y,Z)
DOUBLE PRECISION TWOPI,PI720,DE,TE,DRA,TRA,DNAV,TDIFRA,TDIFE
DOUBLE PRECISION PI,RDPDG,RE,GRACON,SOLSID,SHA
DOUBLE PRECISION DIFTIM,ECANM1,ECANOM,XMANOM
DOUBLE PRECISION DABS,DSQRT,DSIN,DCOS
COMMON/NAVCOM/NAVDAY,LINTOT,DEGLIN,IELTOT,DEGELE,SPINRA,IETIMY,IET
&IMH,SEMIMA,OECCEN,ORBINC,PERHEL,ASNODE,NOPCLN,DECLIN,RASCEN,PICLIN
&,PRERAT,PREDIR,PITCH,YAW,ROLL,SKEW
COMMON /NVUNIT/ LLSW,IOLD
DATA NAVSAV/0/
IF(IOLD.EQ.1) GO TO 10
IOLD=1
NAVSAV=NAVDAY
PI=3.14159265D0
TWOPI=2.0*PI
PI720=PI/720.
RDPDG=PI/180.0
RE=6378.388
GRACON=.07436574D0
SOLSID=1.00273791D0
SHA=100.26467D0
SHA=RDPDG*SHA
IRAYD=74001
IRAHMS=0
O=RDPDG*ORBINC
P=RDPDG*PERHEL
A=RDPDG*ASNODE
SO=SIN(O)
CO=COS(O)
SP=SIN(P)*SEMIMA
CP=COS(P)*SEMIMA
SA=SIN(A)
CA=COS(A)
PX=CP*CA-SP*SA*CO
PY=CP*SA+SP*CA*CO
PZ=SP*SO
QX=-SP*CA-CP*SA*CO
QY=-SP*SA+CP*CA*CO
QZ=CP*SO
SROME2=SQRT(1.0-OECCEN)*SQRT(1.0+OECCEN)
XMMC=GRACON*RE*DSQRT(RE/SEMIMA)/SEMIMA
IEY=MOD(IETIMY/1000,100)
IED=MOD(IETIMY,1000)
IEFAC=(IEY-1)/4+1
DE=365*(IEY-1)+IEFAC+IED-1
TE=1440.0*DE+60.0*FLALO(IETIMH)
IRAY=IRAYD/1000
IRAD=MOD(IRAYD,1000)
IRAFAC=(IRAY-1)/4+1
DRA=365*(IRAY-1)+IRAFAC+IRAD-1
TRA=1440.0*DRA+60.0*FLALO(IRAHMS)
INAVY=MOD(NAVDAY/1000,100)
INAVD=MOD(NAVDAY,1000)
INFAC=(INAVY-1)/4+1
DNAV=365*(INAVY-1)+INFAC+INAVD-1
TDIFE=DNAV*1440.-TE
TDIFRA=DNAV*1440.-TRA
EPSILN=1.0E-8
10 TIMSAM=SAMTIM*60.0
DIFTIM=TDIFE+TIMSAM
XMANOM=XMMC*DIFTIM
ECANM1=XMANOM
DO 2 I=1,20
ECANOM=XMANOM+OECCEN*DSIN(ECANM1)
IF(DABS(ECANOM-ECANM1).LT.EPSILN)GO TO 3
2 ECANM1=ECANOM
3 XOMEGA=DCOS(ECANOM)-OECCEN
YOMEGA=SROME2*DSIN(ECANOM)
Z =XOMEGA*PZ+YOMEGA*QZ
Y =XOMEGA*PY+YOMEGA*QY
X =XOMEGA*PX+YOMEGA*QX
RETURN
END
C
C
C
C MRNLLXYZ MB 09/15/83; BYPASS GEOLAT & MAKE WEST = +
C MRLLXYZ MB 7/09/82; CNVERT LAT/LON TO/FROM EARTH-CENTERED X,Y,Z
SUBROUTINE NLLXYZ(XLAT,XLON,X,Y,Z)
C-----CONVERT LAT,LON TO EARTH CENTERED X,Y,Z
C (DALY, 1978)
C-----XLAT,XLON ARE IN DEGREES, WITH NORTH AND WEST POSITIVE
C-----X,Y,Z ARE GIVEN IN KM. THEY ARE THE COORDINATES IN A RECTANGULAR
C FRAME WITH ORIGIN AT THE EARTH CENTER, WHOSE POSITIVE
C X-AXIS PIERCES THE EQUATOR AT LON 0 DEG, WHOSE POSITIVE Y-AXIS
C PIERCES THE EQUATOR AT LON 90 DEG, AND WHOSE POSITIVE Z-AXIS
C INTERSECTS THE NORTH POLE.
COMMON /NAVINI/
& EMEGA,AB,ASQ,BSQ,RR,RSQ,
& RDPDG,
& NUMSEN,TOTLIN,RADLIN,
& TOTELE,RADELE,PICELE,
& CPITCH,CYAW,CROLL,
& PSKEW,
& RFACT,ROASIN,TMPSCL,
& B11,B12,B13,B21,B22,B23,B31,B32,B33,
& GAMMA,GAMDOT,
& ROTM11,ROTM13,ROTM21,ROTM23,ROTM31,ROTM33,
& PICTIM,XREF
YLAT=RDPDG*XLAT
C-----CONVERT TO GEOCENTRIC (SPHERICAL) LATITUDE
CCC YLAT=GEOLAT(YLAT,1)
YLAT=ATAN2(BSQ*SIN(YLAT),ASQ*COS(YLAT))
YLON=-RDPDG*XLON
SNLT=SIN(YLAT)
CSLT=COS(YLAT)
CSLN=COS(YLON)
SNLN=SIN(YLON)
TNLT=(SNLT/CSLT)**2
R=AB*SQRT((1.0+TNLT)/(BSQ+ASQ*TNLT))
X=R*CSLT*CSLN
Y=R*CSLT*SNLN
Z=R*SNLT
RETURN
END
SUBROUTINE NXYZLL(X,Y,Z,XLAT,XLON)
C-----CONVERT EARTH-CENTERED X,Y,Z TO LAT & LON
C-----X,Y,Z ARE GIVEN IN KM. THEY ARE THE COORDINATES IN A RECTANGULAR
C COORDINATE SYSTEM WITH ORIGIN AT THE EARTH CENTER, WHOSE POS.
C X-AXIS PIERCES THE EQUATOR AT LON 0 DEG, WHOSE POSITIVE Y-AXIS
C PIERCES THE EQUATOR AT LON 90 DEG, AND WHOSE POSITIVE Z-AXIS
C INTERSECTS THE NORTH POLE.
C-----XLAT,XLON ARE IN DEGREES, WITH NORTH AND WEST POSITIVE
C
COMMON /NAVINI/
& EMEGA,AB,ASQ,BSQ,R,RSQ,
& RDPDG,
& NUMSEN,TOTLIN,RADLIN,
& TOTELE,RADELE,PICELE,
& CPITCH,CYAW,CROLL,
& PSKEW,
& RFACT,ROASIN,TMPSCL,
& B11,B12,B13,B21,B22,B23,B31,B32,B33,
& GAMMA,GAMDOT,
& ROTM11,ROTM13,ROTM21,ROTM23,ROTM31,ROTM33,
& PICTIM,XREF
C
XLAT=100.0
XLON=200.0
IF(X.EQ.0..AND.Y.EQ.0..AND.Z.EQ.0.) GO TO 90
A=ATAN(Z/SQRT(X*X+Y*Y))
C-----CONVERT TO GEODETIC LATITUDE
CCC XLAT=GEOLAT(ATAN(Z/SQRT(X*X+Y*Y)),2)/RDPDG
XLAT=ATAN2(ASQ*SIN(A),BSQ*COS(A))/RDPDG
XLON=-ATAN2(Y,X)/RDPDG
90 RETURN
END
SUBROUTINE ANGLES(JDAY,JTIME,XLAT,XLON,GHA,DEC,SATANG,SUNANG,
& RELANG)
C $ SUBROUTINE ANGLES(JDAY,JTIME,XLAT,XLON,GHA,DEC,SATANG,SUNANG,RELANG)
C $ ANGLES - computes zenith angles of sun and satellite and relative
C $ azimuth angle (DAS)
C $ INPUT:
C $ JDAY = (I) picture day (YYDDD)
C $ JTIME = (I) picture start time
C $ XLAT = (R) latitude of point
C $ XLON = (R) longitude of point
C $ GHA = (R) Greenwich hour angle of sun
C $ DEC = (R) declination of sun
C $ OUTPUT:
C $ SATANG = (R) zenith angle of satellite
C $ SUNANG = (R) zenith angle of sun
C $ RELANG = (R) relative angle
C $$ ANGLES = COMPUTATION, NAVIGATION
C ANGLES MOSHER 1074 WINLIB ZENITH ANGLES TO SAT,SUN,AND REL AZIMUTH AN
C
DATA IDAY/0/
DATA PI/3.14159265/
DATA R/6371.221/
RDPDG=PI/180.0
IF(IDAY.EQ.JDAY)GO TO 1
IDAY=JDAY
INORB=0
1 PICTIM=FTIME(JTIME)
C
C DETERMINE SATELLITE POSITION
C
CALL SATPOS(INORB,JTIME,XSAT,YSAT,ZSAT)
HEIGHT=SQRT(XSAT**2+YSAT**2+ZSAT**2)
YLAT=RDPDG*XLAT
YLAT=GEOLAT(YLAT,1)
YLON=RDPDG*XLON
SLAT=SIN(YLAT)
CLAT=COS(YLAT)
SLON=SIN(YLON)
CLON=COS(YLON)
XSAM=R*CLAT*CLON
YSAM=R*CLAT*SLON
ZSAM=R*SLAT
C
C DETERMINE ZENITH ANGLE OF SUN
C
SNLG=-PICTIM*PI/12.0-RDPDG*GHA
SNDC=RDPDG*DEC
COSDEC=COS(SNDC)
US=COS(SNLG)*COSDEC
VS=SIN(SNLG)*COSDEC
WS=SIN(SNDC)
SUNANG=ACOS((US*XSAM+VS*YSAM+WS*ZSAM)/R)/RDPDG
C
C DETERMINE ZENITH ANGLE OF SATELLITE
C
XVEC=XSAT-XSAM
YVEC=YSAT-YSAM
ZVEC=ZSAT-ZSAM
XFACT=SQRT(XVEC**2+YVEC**2+ZVEC**2)
SATANG=ACOS((XVEC*XSAM+YVEC*YSAM+ZVEC*ZSAM)/(R*XFACT))/RDPDG
C
C DETERMINE RELATIVE ANGLE
C
X1=CLAT*CLON
Y1=CLAT*SLON
Z1=SLAT
X2=SLON
Y2=-CLON
X3=-SLAT*CLON
Y3=-SLAT*SLON
Z3=CLAT
XC1=US-X1
YC1=VS-Y1
ZC1=WS-Z1
XC2=XSAT/HEIGHT-X1
YC2=YSAT/HEIGHT-Y1
ZC2=ZSAT/HEIGHT-Z1
XAN1=XC1*X3+YC1*Y3+ZC1*Z3
XAN2=XC2*X3+YC2*Y3+ZC2*Z3
YAN1=XC1*X2+YC1*Y2
YAN2=XC2*X2+YC2*Y2
XAN3=XAN1*XAN2+YAN1*YAN2
YAN3=-YAN1*XAN2+XAN1*YAN2
RELANG=ATAN2(YAN3,XAN3)/RDPDG
RELANG=ABS(RELANG)
RETURN
END
SUBROUTINE SATPOS(INORB,NTIME,X,Y,Z)
C SATPOS PHILLI 0174 NAVLIB SAT POSITION VECTOR FROM EARTH CENTER
C $ SUBROUTINE SATPOS(INORB, NTIME, X, Y, Z) (DAS)
C $ CALCULATE SATELLITE POSITION VECTOR FROM THE EARTH'S CENTER.
C $ INORB = (I) INPUT INITIALIZATION FLAG - SHOULD = 0 ON FIRST CALL TO
C $ SATPOS, 1 ON ALL SUBSEQUENT CALLS.
C $ NTIME = (I) INPUT TIME (HOURS, MINUTES, SECONDS) IN HHMMSS FORMAT
C $ X, Y, Z = (R) OUTPUT COORDINATES OF POSITION VECTOR
C $$ SATPOS = NAVIGATION, COMPUTATION
C
C
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
REAL DEGLIN,DEGELE,SPINRA,SEMIMA,OECCEN,ORBINC,PERHEL
REAL ASNODE,DECLIN,RASCEN,PICLIN,PRERAT,PREDIR,PITCH,YAW
REAL ROLL,SKEW
REAL X,Y,Z
COMMON/NAVCOM/NAVDAY,LINTOT,DEGLIN,IELTOT,DEGELE,SPINRA,IETIMY,IET
&IMH,SEMIMA,OECCEN,ORBINC,PERHEL,ASNODE,NOPCLN,DECLIN,RASCEN,PICLIN
&,PRERAT,PREDIR,PITCH,YAW,ROLL,SKEW
C
C
IF(INORB.NE.0)GO TO 1
INORB=1
PI=3.14159265D0
RDPDG=PI/180.0
RE=6378.388
GRACON=.07436574D0
SOLSID=1.00273791D0
SHA=100.26467D0
SHA=RDPDG*SHA
IRAYD=74001
IRAHMS=0
O=RDPDG*ORBINC
P=RDPDG*PERHEL
A=RDPDG*ASNODE
SO=SIN(O)
CO=COS(O)
SP=SIN(P)*SEMIMA
CP=COS(P)*SEMIMA
SA=SIN(A)
CA=COS(A)
PX=CP*CA-SP*SA*CO
PY=CP*SA+SP*CA*CO
PZ=SP*SO
QX=-SP*CA-CP*SA*CO
QY=-SP*SA+CP*CA*CO
QZ=CP*SO
SROME2=SQRT(1.0-OECCEN)*SQRT(1.0+OECCEN)
XMMC=GRACON*RE*DSQRT(RE/SEMIMA)/SEMIMA
1 DIFTIM=TIMDIF(IETIMY,IETIMH,NAVDAY,NTIME)
XMANOM=XMMC*DIFTIM
ECANM1=XMANOM
EPSILN=1.0E-8
DO 2 I=1,20
ECANOM=XMANOM+OECCEN*DSIN(ECANM1)
IF(DABS(ECANOM-ECANM1).LT.EPSILN)GO TO 3
2 ECANM1=ECANOM
3 XOMEGA=DCOS(ECANOM)-OECCEN
YOMEGA=SROME2*DSIN(ECANOM)
XS=XOMEGA*PX+YOMEGA*QX
YS=XOMEGA*PY+YOMEGA*QY
ZS=XOMEGA*PZ+YOMEGA*QZ
DIFTIM=TIMDIF(IRAYD,IRAHMS,NAVDAY,NTIME)
RA=DIFTIM*SOLSID*PI/720.0D0+SHA
RAS=DMOD(RA,2.0*PI)
CRA=COS(RAS)
SRA=SIN(RAS)
X=CRA*XS+SRA*YS
Y=-SRA*XS+CRA*YS
Z=ZS
RETURN
END
| IDL | 5 | oxelson/gempak | extlibs/AODT/v72/odtmcidas/navcal/navcal/nvxgoes.dlm | [
"BSD-3-Clause"
] |
// (c) Copyright 1995-2019 Xilinx, Inc. All rights reserved.
//
// This file contains confidential and proprietary information
// of Xilinx, Inc. and is protected under U.S. and
// international copyright and other intellectual property
// laws.
//
// DISCLAIMER
// This disclaimer is not a license and does not grant any
// rights to the materials distributed herewith. Except as
// otherwise provided in a valid license issued to you by
// Xilinx, and to the maximum extent permitted by applicable
// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
// (2) Xilinx shall not be liable (whether in contract or tort,
// including negligence, or under any other theory of
// liability) for any loss or damage of any kind or nature
// related to, arising under or in connection with these
// materials, including for any direct, or any indirect,
// special, incidental, or consequential loss or damage
// (including loss of data, profits, goodwill, or any type of
// loss or damage suffered as a result of any action brought
// by a third party) even if such damage or loss was
// reasonably foreseeable or Xilinx had been advised of the
// possibility of the same.
//
// CRITICAL APPLICATIONS
// Xilinx products are not designed or intended to be fail-
// safe, or for use in any application requiring fail-safe
// performance, such as life-support or safety devices or
// systems, Class III medical devices, nuclear facilities,
// applications related to the deployment of airbags, or any
// other applications that could lead to death, personal
// injury, or severe property or environmental damage
// (individually and collectively, "Critical
// Applications"). Customer assumes the sole risk and
// liability of any use of Xilinx products in Critical
// Applications, subject only to applicable laws and
// regulations governing limitations on product liability.
//
// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
// PART OF THIS FILE AT ALL TIMES.
//
// DO NOT MODIFY THIS FILE.
// IP VLNV: xilinx.labs:hls:udp:1.41
// IP Revision: 1804061221
// The following must be inserted into your Verilog file for this
// core to be instantiated. Change the instance name and port connections
// (in parentheses) to your own signal names.
//----------- Begin Cut here for INSTANTIATION Template ---// INST_TAG
udp_0 your_instance_name (
.confirmPortStatus_TVALID(confirmPortStatus_TVALID), // output wire confirmPortStatus_TVALID
.confirmPortStatus_TREADY(confirmPortStatus_TREADY), // input wire confirmPortStatus_TREADY
.confirmPortStatus_TDATA(confirmPortStatus_TDATA), // output wire [7 : 0] confirmPortStatus_TDATA
.inputPathInData_TVALID(inputPathInData_TVALID), // input wire inputPathInData_TVALID
.inputPathInData_TREADY(inputPathInData_TREADY), // output wire inputPathInData_TREADY
.inputPathInData_TDATA(inputPathInData_TDATA), // input wire [63 : 0] inputPathInData_TDATA
.inputPathInData_TKEEP(inputPathInData_TKEEP), // input wire [7 : 0] inputPathInData_TKEEP
.inputPathInData_TLAST(inputPathInData_TLAST), // input wire [0 : 0] inputPathInData_TLAST
.inputPathOutputMetadata_TVALID(inputPathOutputMetadata_TVALID), // output wire inputPathOutputMetadata_TVALID
.inputPathOutputMetadata_TREADY(inputPathOutputMetadata_TREADY), // input wire inputPathOutputMetadata_TREADY
.inputPathOutputMetadata_TDATA(inputPathOutputMetadata_TDATA), // output wire [95 : 0] inputPathOutputMetadata_TDATA
.inputPathPortUnreachable_TVALID(inputPathPortUnreachable_TVALID), // output wire inputPathPortUnreachable_TVALID
.inputPathPortUnreachable_TREADY(inputPathPortUnreachable_TREADY), // input wire inputPathPortUnreachable_TREADY
.inputPathPortUnreachable_TDATA(inputPathPortUnreachable_TDATA), // output wire [63 : 0] inputPathPortUnreachable_TDATA
.inputPathPortUnreachable_TKEEP(inputPathPortUnreachable_TKEEP), // output wire [7 : 0] inputPathPortUnreachable_TKEEP
.inputPathPortUnreachable_TLAST(inputPathPortUnreachable_TLAST), // output wire [0 : 0] inputPathPortUnreachable_TLAST
.inputpathOutData_TVALID(inputpathOutData_TVALID), // output wire inputpathOutData_TVALID
.inputpathOutData_TREADY(inputpathOutData_TREADY), // input wire inputpathOutData_TREADY
.inputpathOutData_TDATA(inputpathOutData_TDATA), // output wire [63 : 0] inputpathOutData_TDATA
.inputpathOutData_TKEEP(inputpathOutData_TKEEP), // output wire [7 : 0] inputpathOutData_TKEEP
.inputpathOutData_TLAST(inputpathOutData_TLAST), // output wire [0 : 0] inputpathOutData_TLAST
.openPort_TVALID(openPort_TVALID), // input wire openPort_TVALID
.openPort_TREADY(openPort_TREADY), // output wire openPort_TREADY
.openPort_TDATA(openPort_TDATA), // input wire [15 : 0] openPort_TDATA
.outputPathInData_TVALID(outputPathInData_TVALID), // input wire outputPathInData_TVALID
.outputPathInData_TREADY(outputPathInData_TREADY), // output wire outputPathInData_TREADY
.outputPathInData_TDATA(outputPathInData_TDATA), // input wire [63 : 0] outputPathInData_TDATA
.outputPathInData_TKEEP(outputPathInData_TKEEP), // input wire [7 : 0] outputPathInData_TKEEP
.outputPathInData_TLAST(outputPathInData_TLAST), // input wire [0 : 0] outputPathInData_TLAST
.outputPathInMetadata_TVALID(outputPathInMetadata_TVALID), // input wire outputPathInMetadata_TVALID
.outputPathInMetadata_TREADY(outputPathInMetadata_TREADY), // output wire outputPathInMetadata_TREADY
.outputPathInMetadata_TDATA(outputPathInMetadata_TDATA), // input wire [95 : 0] outputPathInMetadata_TDATA
.outputPathOutData_TVALID(outputPathOutData_TVALID), // output wire outputPathOutData_TVALID
.outputPathOutData_TREADY(outputPathOutData_TREADY), // input wire outputPathOutData_TREADY
.outputPathOutData_TDATA(outputPathOutData_TDATA), // output wire [63 : 0] outputPathOutData_TDATA
.outputPathOutData_TKEEP(outputPathOutData_TKEEP), // output wire [7 : 0] outputPathOutData_TKEEP
.outputPathOutData_TLAST(outputPathOutData_TLAST), // output wire [0 : 0] outputPathOutData_TLAST
.outputpathInLength_TVALID(outputpathInLength_TVALID), // input wire outputpathInLength_TVALID
.outputpathInLength_TREADY(outputpathInLength_TREADY), // output wire outputpathInLength_TREADY
.outputpathInLength_TDATA(outputpathInLength_TDATA), // input wire [15 : 0] outputpathInLength_TDATA
.portRelease_TVALID(portRelease_TVALID), // input wire portRelease_TVALID
.portRelease_TREADY(portRelease_TREADY), // output wire portRelease_TREADY
.portRelease_TDATA(portRelease_TDATA), // input wire [15 : 0] portRelease_TDATA
.aclk(aclk), // input wire aclk
.aresetn(aresetn) // input wire aresetn
);
// INST_TAG_END ------ End INSTANTIATION Template ---------
| Verilog | 3 | JKHHai/galapagos | shells/shell_ips/tcp/repo/tcp_ip_0/tcp_ip.srcs/sources_1/ip/udp_0/udp_0.veo | [
"MIT"
] |
-- Copyright 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 json = require("json")
name = "IntelX"
type = "api"
useragent = "OWASP Amass"
host = "https://2.intelx.io/"
max = 1000
function start()
set_rate_limit(2)
end
function check()
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c ~= nil and c.key ~= nil and c.key ~= "") then
return true
end
return false
end
function vertical(ctx, domain)
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c == nil or c.key == nil or c.key == "") then
return
end
phonebook(ctx, domain, c.key)
end
function phonebook(ctx, domain, key)
local id = search(ctx, "", domain, key)
if id == "" then
return
end
local status = 3
local limit = 1000
while status == 0 or status == 3 do
local resp = results(ctx, id, limit, key)
if resp == nil then
break
end
status = resp.status
if ((status == 0 or status == 1) and resp.selectors ~= nil and #(resp.selectors) > 0) then
if #(resp.selectors) < limit then
limit = limit - #(resp.selectors)
end
for _, s in pairs(resp.selectors) do
local t = s.selectortype
if (t == 2 or t == 3 or t == 23) then
print(s.selectorvalue)
send_names(ctx, s.selectorvalue)
end
end
end
if limit <= 0 then
break
end
end
end
function search(ctx, domain, key)
local err, body, resp
body, err = json.encode({
term=domain,
lookuplevel=0,
timeout=0,
maxresults=max,
datefrom="",
dateto="",
sort=0,
media=0,
})
if (err ~= nil and err ~= "") then
return ""
end
resp, err = request(ctx, {
method="POST",
data=body,
['url']=host .. "phonebook/search",
headers={
['x-key']=key,
['Content-Type']="application/json",
['User-Agent']=useragent,
Connection="keep-alive",
},
})
if (err ~= nil and err ~= "") then
log(ctx, "vertical search request to service failed: " .. err)
return ""
end
local j = json.decode(resp)
if (j == nil or j.status == nil or j.id == nil or j.status ~= 0) then
return ""
end
return j.id
end
function results(ctx, id, limit, key)
local resp, err = request(ctx, {
['url']=host .. "phonebook/search/result?id=" .. id .. "&limit=" .. limit,
headers={
['x-key']=key,
['User-Agent']=useragent,
Connection="keep-alive",
},
})
if (err ~= nil and err ~= "") then
log(ctx, "vertical results request to service failed: " .. err)
return nil
end
local j = json.decode(resp)
if (j == nil or j.status == nil) then
return nil
end
return j
end
| Ada | 4 | Elon143/Amass | resources/scripts/api/intelx.ads | [
"Apache-2.0"
] |
DAFETF NAIF DAF ENCODED TRANSFER FILE
'DAF/CK '
'2'
'6'
'MRO TLM-Based SC Bus CK File by NAIF/JPL '
BEGIN_ARRAY 1 443
'MRO SC BUS TLM-BASED QUATS/AVS '
'37547D0468^A'
'37547D0F28^A'
'-12110'
'-12494'
'3'
'1'
443
'39AED9021B1A92^-1'
'14623AC3B0A4BB^0'
'612BC8514C08C4^-1'
'FF16E5AB0B483^0'
'-3CC6D99F279E1C^-3'
'3D41A4458F4BA6^-2'
'-79379FEA952ED^-3'
'39A702E3B51BAC^-1'
'1467354358C53E^0'
'612E5B5D1DE848^-1'
'FF16809FF8836^0'
'-38B306FDA173AE^-3'
'3DA9A4A69ADAA^-2'
'-72DA295EAE2AD^-3'
'399D82DD3F8BB2^-1'
'146D64B25C3332^0'
'612F7A96F4F99^-1'
'FF1603A276E2E^0'
'-33D0CB00420E14^-3'
'3D32559C19FC94^-2'
'-81BAB5252420B^-3'
'39943DE512E9BC^-1'
'1473919D20E2A4^0'
'613219ADA616^-1'
'FF1585F928CB5^0'
'-2EA350F629E872^-3'
'3CC50B0628C8BE^-2'
'-7925F49AB0FA^-3'
'398BDA69428EC6^-1'
'1479C18CFDA9E4^0'
'6133AF040F0354^-1'
'FF150824E795F8^0'
'-3771657647DA6E^-3'
'3D9089F12BF27E^-2'
'-77923B7B382AF^-3'
'3981C160B2F332^-1'
'147FE5687A11EA^0'
'61369BF36613B^-1'
'FF148B2765F58^0'
'-2F3988CA3581DC^-3'
'3D0AE855708128^-2'
'-6E1349FA6412C^-3'
'3977D8A9A4D48C^-1'
'1485F6CF7FAF8E^0'
'613986338B47C8^-1'
'FF140F568A256^0'
'-334A30E9BA5688^-3'
'3D2C5B2D8A0C62^-2'
'-74BC44183341F^-3'
'3970493E377334^-1'
'148C12F34CBE4A^0'
'613C27F96E407C^-1'
'FF13922E156718^0'
'-3D5B0962A864EC^-3'
'3E47A3409EA2C2^-2'
'-71262E43C16BF8^-3'
'396709A46E89CC^-1'
'14924465B59172^0'
'613DC80C9E9EE8^-1'
'FF1313D8FAD878^0'
'-392FAD6B22F8F8^-3'
'3CD443E533C354^-2'
'-7D366EC3E99F1^-3'
'395D76D39BF3E6^-1'
'14986B713D2F0B^0'
'61414B4EDDDE98^-1'
'FF129583E049D8^0'
'-3092FC29310A5C^-3'
'3D83C44FD9FBE8^-2'
'-6919ECCBA105A^-3'
'39550DF967E064^-1'
'149E818ADA0E29^0'
'6144ABAB94EEBC^-1'
'FF121830786DD^0'
'-35E4E05A26CE6C^-3'
'3D38506DB8C87E^-2'
'-69526DF16E0AE8^-3'
'394CCAB3EDD8B6^-1'
'14A4A86B6E8DFD^0'
'6147557F0D7C4^-1'
'FF1199B06AC168^0'
'-3B51A2F5C65D4^-3'
'3D36437BE09B4E^-2'
'-7A429A4DC486A^-3'
'39430233360D58^-1'
'14AABEAFFE8AE^0'
'614B975820D36^-1'
'FF111C071CA9D8^0'
'-3739DBBB9FC16^-3'
'3C69626CD361CC^-2'
'-72BDCC5D38891C^-3'
'393BB892D90B1E^-1'
'14B0D097DD81D1^0'
'614E99C106C5EC^-1'
'FF109E88C1B01^0'
'-3240DF36F102AE^-3'
'3CAB48AB740772^-2'
'-73DD2CA1D00388^-3'
'3934D244B0DF06^-1'
'14B6D18DD1BA47^0'
'6152352C06C414^-1'
'FF10220C1968E^0'
'-2DA2AFA25B13F4^-3'
'3DCC2132D49B14^-2'
'-6A121703161B7^-3'
'392B4223102568^-1'
'14BCF6EBDA2E34^0'
'615501E5078128^-1'
'FF0FA3362580F^0'
'-44EB42AF5FA5B8^-3'
'3CF3FD6CF2EAD6^-2'
'-79E3FB02A3EBF4^-3'
'392443AC273AD8^-1'
'14C3252E37CBC9^0'
'6159E21E989C7^-1'
'FF0F2231D91608^0'
'-3E275B8D390296^-3'
'3DFBF23C830F84^-2'
'-6AA852238DFD48^-3'
'391B0970C209FC^-1'
'14C939446F45B3^0'
'615CB186CB35C8^-1'
'FF0EA4888AFE78^0'
'-3B182AC401019C^-3'
'3C93AA06313088^-2'
'-766215189612D8^-3'
'391115FCEC7A3C^-1'
'14CF6FBF5595DF^0'
'6160E8A3171BD^-1'
'FF0E23594B75C8^0'
'-363BDFE9DD1762^-3'
'3D149BCEE271EE^-2'
'-70DCB303425B88^-3'
'390740103B618^-1'
'14D59116933F62^0'
'6162F166E008E8^-1'
'FF0DA4AE4AABA^0'
'-3A958E5799DEE4^-3'
'3D8B9E2D4F33A8^-2'
'-7CDCD69095D0B4^-3'
'38FE7134A09B96^-1'
'14DBA2A88BFACB^0'
'6166E8167F486^-1'
'FF0D262E3CFF38^0'
'-3AE50C22516984^-3'
'3C89F35FCF2E68^-2'
'-6BC9B144ACC8B8^-3'
'38F42A89C15F5C^-1'
'14E1DE00FCAA35^0'
'616BAD781DC8E8^-1'
'FF0CA4283DE1B8^0'
'-3DB523CD3A438C^-3'
'3CA6662414D2E8^-2'
'-76C23F5EC4200C^-3'
'38EA06C46A52B^-1'
'14E812A370B2F1^0'
'616F8BFEFC49E8^-1'
'FF0C22CE0B3B48^0'
'-4663CD026FEDF8^-3'
'3D048AD9E272BA^-2'
'-66DC0CEEAA7138^-3'
'38E03B9480AB0C^-1'
'14EE1E004620F7^0'
'61734CFEB653E4^-1'
'FF0BA4A3E3CA68^0'
'-354C90FC83861E^-3'
'3CC8AD24EEFA^-2'
'-7BB57D7F3A72C4^-3'
'38D685DE25E598^-1'
'14F43093F18EF9^0'
'6175BBC3E5F364^-1'
'FF0B2623D61E08^0'
'-329A932B32430A^-3'
'3D112DD8FECE46^-2'
'-64DADB5CCE50F8^-3'
'38CD71377AC09^-1'
'14FA6388E66E09^0'
'617984D1359234^-1'
'FF0AA448CA1E48^0'
'-3BA2628D74FB6C^-3'
'3D2BE19D01F41A^-2'
'-7AE70BCD28DB54^-3'
'38C1EDCB9FFC0A^-1'
'15007E800DAC66^0'
'617D182E9FFB88^-1'
'FF0A24C709BF48^0'
'-429433C6E4721^-3'
'3D64A097F75112^-2'
'-6DC2B15F20F88^-3'
'38B8E9402000A6^-1'
'1506AE6FEA73A7^0'
'61814F4AEBE19^-1'
'FF09A2C10AA1C8^0'
'-3C6CADCBA80A5^-3'
'3CC76EFFF6C9A4^-2'
'-70C8875E470988^-3'
'38AD8B68FF47F4^-1'
'150CBC50FEA02F^0'
'6184ED651DBBFC^-1'
'FF09241609D798^0'
'-421DC78FAE793C^-3'
'3D59152BD5B5D4^-2'
'-7057919264D3^-3'
'38A38D3862471C^-1'
'1512C859A08546^0'
'61897FC608E354^-1'
'FF08A494497898^0'
'-34C3DD4F10597C^-3'
'3DADE420A507D^-2'
'-6F7E1B445D9FC^-3'
'3899616575A59E^-1'
'1518DC9ACB1CF4^0'
'618D3E16911108^-1'
'FF0824BCA2DE1^0'
'-3A193BF40FC788^-3'
'3CAF7BECD4DB44^-2'
'-6C0765B440E6F8^-3'
'388F0291D5AAEC^-1'
'151EFD463C4F67^0'
'6190F45983A9F^-1'
'FF07A3E34990F^0'
'-2E1183B554A2D6^-3'
'3D0001B474739C^-2'
'-627AB3FFD4B4E8^-3'
'3884A66D678C82^-1'
'1525186856AB88^0'
'6195B9BB222A78^-1'
'FF0722DEFD2608^0'
'-405E18AC950D68^-3'
'3CE4BDE72F2F3C^-2'
'-6DB5DBA6D40888^-3'
'387AEB58A90E82^-1'
'152B4324C2D801^0'
'619A440E77BCFC^-1'
'FF06A02D31917^0'
'-4110ADE512DA7C^-3'
'3D4F172C4BD194^-2'
'-7EDFEDC0DDD97^-3'
'386E912D397414^-1'
'1531540AEF1C58^0'
'619DB1D7281A7C^-1'
'FF0620AB71327^0'
'-3F5C7F5CCBAFDC^-3'
'3CE0E7125D8B5C^-2'
'-6DAF0C6BA98874^-3'
'38631070908BD4^-1'
'15375907AE1F38^0'
'61A0D47664605^-1'
'FF05A1D57D4A8^0'
'-37202B462E6B54^-3'
'3D05047A0727C8^-2'
'-7B8A008838ACF8^-3'
'38592D17E625BA^-1'
'153D795D391621^0'
'61A2E7F6F4BE84^-1'
'FF0520D130DF98^0'
'-31782E2F9850C4^-3'
'3D5F2F1650C81^-2'
'-7C134C2CDD5418^-3'
'384E85CA03EFA4^-1'
'1543A647FDC593^0'
'61A579A1AC8D94^-1'
'FF049E4A5868D^0'
'-348908147AA82C^-3'
'3DB340C249791E^-2'
'-7C6C8A011293BC^-3'
'3843EE974CE332^-1'
'1549B82FDCBC84^0'
'61A72471A45D18^-1'
'FF041E72B1CE4^0'
'-390751DF807322^-3'
'3D8879035E254A^-2'
'-76E73DAA2378F^-3'
'383A91765F82C8^-1'
'154FDFBC3DB36A^0'
'61AC04AB35785C^-1'
'FF039B1519C2A^0'
'-373363EAFE75C^-3'
'3CC50AD00E2D6E^-2'
'-777D59153B6FCC^-3'
'382F43BA69F3BA^-1'
'155608CB2AB637^0'
'61AE80DC5E653C^-1'
'FF0318B9346998^0'
'-396DD4F04BD59E^-3'
'3E18F28FE0CB78^-2'
'-78849C7ADB8794^-3'
'38257DE8E404A2^-1'
'155C27F40FDCC2^0'
'61B142D897B138^-1'
'FF029688422E5^0'
'-2D1A666D15FEEA^-3'
'3D839AE2A5316^-2'
'-7743911725864^-3'
'381CE4BD2E7432^-1'
'15624A77F356A4^0'
'61B34B9C609E5^-1'
'FF02142C5CD54^0'
'-383CC61BD90978^-3'
'3D73D302A625EE^-2'
'-7469F523D9F658^-3'
'3814209E5B1F6^-1'
'15685DB76B3BB8^0'
'61B526BDD9EAC4^-1'
'FF0192D22A2ED^0'
'-32A3BE11FF3C6^-3'
'3D56C8B3A0BF4^-2'
'-7EBD0811420A48^-3'
'380B61DDEB831C^-1'
'156E69EB003E94^0'
'61B821192A487C^-1'
'FF0111A2EAA628^0'
'-409A5C3A8285FC^-3'
'3CBEE18B3402E6^-2'
'-6AE679F97892B^-3'
'3802CE1099AB38^-1'
'15748309B53581^0'
'61BC2D42586A24^-1'
'FF008E9B38D608^0'
'-32A0F6B99321EC^-3'
'3E477B5C267E3C^-2'
'-7B9BC4E16D35^-3'
'37F7FBCF99B0C^-1'
'157A9AA5DE2087^0'
'61BE38B5533384^-1'
'FF000CEB1FF41^0'
'-3F08E560B76762^-3'
'3C503F0C81310C^-2'
'-6E68E7C25AE864^-3'
'37ED5481B77AAC^-1'
'1580B94DE9EDC5^0'
'61C0F55328C6F4^-1'
'FEFF8A39545F8^0'
'-2E2D34446D2C78^-3'
'3DE6B066047272^-2'
'-808C6656E5D93^-3'
'37E452A5695B8E^-1'
'1586D16AEC3218^0'
'61C39C776F7834^-1'
'FEFF078788CAE8^0'
'-3CB86A584FD746^-3'
'3CF973EA96088^-2'
'-7469467E9FFDC8^-3'
'37DB3DFEBE3686^-1'
'158CE556308E3D^0'
'61C76833F0F348^-1'
'FEFE84AACA189^0'
'-36C73E240AA7F8^-3'
'3D8427421DBA18^-2'
'-6E33AFEAE39998^-3'
'37CF11759E3CC2^-1'
'15930EBB03CC93^0'
'61CA9AEE5862C4^-1'
'FEFE00A16595D8^0'
'-40EE2A3943689C^-3'
'3D2FBF0EC2F1DA^-2'
'-71F32FA267E4C8^-3'
'37C523602C658E^-1'
'159929065E93DF^0'
'61CDF89BDD96A^-1'
'FEFD7D43CD8A38^0'
'-2E70D86D6D19EC^-3'
'3D6DD8BDE57F7^-2'
'-7330DB684B7798^-3'
'37BAFF9AD558E2^-1'
'159F4C8BF4C05C^0'
'61CF604FF6E34C^-1'
'FEFCF9BB4260D^0'
'-2FDDF04F4FD29A^-3'
'3C9E9C9002F842^-2'
'-86E889254752E^-3'
'37B33271ED2D4^-1'
'15A57F2B0363E3^0'
'61D24D3F4DF3A8^-1'
'FEFC73AE7878E^0'
'-32C6481C56E864^-3'
'3DACE93DAED4C2^-2'
'-66DF550B7B2848^-3'
'37AAC1424490FC^-1'
'15AB18316E98A3^0'
'61D521C21EC698^-1'
'FEFBFAC6FECF08^0'
'-3014268F3C1202^-3'
'3DA8F8BAD7A81^-2'
'-792BE599CB3984^-3'
'37547D0468^A'
'37547D04929E5E^A'
'37547D04C665AE^A'
'37547D04F9097C^A'
'37547D052C374^A'
'37547D055F6F08^A'
'37547D05929F6A^A'
'37547D05C66A56^A'
'37547D05F906DE^A'
'37547D062C3F2E^A'
'37547D065F6F4C^A'
'37547D0692A476^A'
'37547D06C66E54^A'
'37547D06F90D38^A'
'37547D072C3EDA^A'
'37547D075F7282^A'
'37547D0792A812^A'
'37547D07C6762^A'
'37547D07F916A8^A'
'37547D082C418A^A'
'37547D085F7A1C^A'
'37547D0892AED2^A'
'37547D08C67514^A'
'37547D08F91A54^A'
'37547D092C47F6^A'
'37547D095F7BD^A'
'37547D0992AEE2^A'
'37547D09C6772E^A'
'37547D09F91E54^A'
'37547D0A2C4B9^A'
'37547D0A5F7C88^A'
'37547D0A92B0FA^A'
'37547D0AC67A2^A'
'37547D0AF91D58^A'
'37547D0B2C4E5^A'
'37547D0B5F8034^A'
'37547D0B92B5F6^A'
'37547D0BC681EC^A'
'37547D0BF91E^A'
'37547D0C2C4FD2^A'
'37547D0C5F85E8^A'
'37547D0C92BC3^A'
'37547D0CC683D4^A'
'37547D0CF92684^A'
'37547D0D2C5416^A'
'37547D0D5F8C12^A'
'37547D0D92BF76^A'
'37547D0DC685EC^A'
'37547D0DF929CC^A'
'37547D0E2C59A8^A'
'37547D0E5F8B16^A'
'37547D0E92BE6A^A'
'37547D0EC689FC^A'
'37547D0EF931FC^A'
'37547D0F28^A'
'37547D0468^A'
'1^1'
'37^2'
END_ARRAY 1 443
TOTAL_ARRAYS 1
~NAIF/SPC BEGIN COMMENTS~
This CK is for testing with the image: /home/acpaquette/B10_013341_1010_XN_79S172W.cub
This CK was generated using the following command: {}
~NAIF/SPC END COMMENTS~
| XC | 3 | ladoramkershner/ale | tests/pytests/data/B10_013341_1010_XN_79S172W/mro_sc_psp_090526_090601_1_sliced_-74000.xc | [
"Unlicense"
] |
package com.baeldung.requestresponsebody;
public class ResponseTransfer {
private String text;
public ResponseTransfer(String text) {
this.setText(text);
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
} | Java | 4 | DBatOWL/tutorials | spring-boot-rest/src/main/java/com/baeldung/requestresponsebody/ResponseTransfer.java | [
"MIT"
] |
// This file contains various functions for printing generated output
staload "SATS/filetype.sats"
staload "libats/ML/SATS/string.sats"
fun print_file(pt : !pl_type, string) : string
// function to print tabular output at the end
fn make_table(source_contents, bool) : string
// Function to print output sorted by type of language.
fn make_output(source_contents, bool) : string
| ATS | 3 | lambdaxymox/polyglot | SATS/print.sats | [
"BSD-3-Clause"
] |
TOKENIZERS_PARALLELISM=true python run_mlm_performer.py --output_dir experiments --dataset_name wikipedia --dataset_config_name 20200501.simple --model_name_or_path bert-base-cased --tokenizer_name bert-base-cased --do_train --overwrite_output_dir --per_device_train_batch_size 4 --learning_rate 5e-4 --warmup_steps 100 --num_train_epochs 3 --performer | Shell | 2 | liminghao1630/transformers | examples/research_projects/performer/sanity_script.sh | [
"Apache-2.0"
] |
// @filename: gridview.ts
export type Sizing = any;
export const Sizing = null;
// @filename: index.ts
// https://github.com/microsoft/TypeScript/issues/39195
export { Sizing as GridViewSizing } from './gridview';
export namespace Sizing {
export const Distribute = { type: 'distribute' };
} | TypeScript | 3 | monciego/TypeScript | tests/cases/compiler/reexportNameAliasedAndHoisted.ts | [
"Apache-2.0"
] |
INSERT INTO Foo(id, title, body) VALUES (1, 'Foo 1', 'Foo body 1');
INSERT INTO Foo(id, title, body) VALUES (2, 'Foo 2', 'Foo body 2');
INSERT INTO Foo(id, title, body) VALUES (3, 'Foo 3', 'Foo body 3');
| SQL | 1 | DBatOWL/tutorials | spring-boot-modules/spring-boot-springdoc/src/main/resources/data.sql | [
"MIT"
] |
FORMAT: 1A
# Beehive API
## Honey [/honey]
### Remove [DELETE]
+ Parameters
+ beekeeper: Honza (string)
+ Response 203
| API Blueprint | 3 | tomoyamachi/dredd | packages/dredd-transactions/test/fixtures/apib/not-specified-in-uri-template-annotation.apib | [
"MIT"
] |
scriptname TentSystem hidden
{Interface between _Camp_TentSystem and mods that implement Campfire tents.}
import _CampInternal
_Camp_TentSystem function GetAPI() global
return (Game.GetFormFromFile(0x00025BC2, "Campfire.esm") as Quest) as _Camp_TentSystem
endFunction
function UpdateTentUseState(ObjectReference akTent) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.UpdateTentUseState(akTent)
endFunction
function ActivateTent(ObjectReference akActionRef, ObjectReference akTent) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.ActivateTent(akActionRef, akTent)
endFunction
function SelectExterior(ObjectReference akTent, bool abInTent) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SelectExterior(akTent, abInTent)
endFunction
Weapon function GetFollowerMainWeapon(CampTent akTentObject, int aiFollowerBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
Weapon wpn = TentAPI.GetFollowerMainWeapon(akTentObject, aiFollowerBedrollIndex)
return wpn
endFunction
Weapon function GetFollowerOffHandWeapon(CampTent akTentObject, int aiFollowerBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
Weapon wpn = TentAPI.GetFollowerOffHandWeapon(akTentObject, aiFollowerBedrollIndex)
return wpn
endFunction
Weapon function GetFollowerBigWeapon(CampTent akTentObject, int aiFollowerBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
Weapon wpn = TentAPI.GetFollowerBigWeapon(akTentObject, aiFollowerBedrollIndex)
return wpn
endFunction
Weapon function GetFollowerBowWeapon(CampTent akTentObject, int aiFollowerBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
Weapon wpn = TentAPI.GetFollowerBowWeapon(akTentObject, aiFollowerBedrollIndex)
return wpn
endFunction
Armor function GetFollowerShield(CampTent akTentObject, int aiFollowerBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
Armor shld = TentAPI.GetFollowerShield(akTentObject, aiFollowerBedrollIndex)
return shld
endFunction
function SetFollowerMainWeapon(CampTent akTentObject, int aiFollowerBedrollIndex, Weapon akWeapon) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerMainWeapon(akTentObject, aiFollowerBedrollIndex, akWeapon)
endFunction
function SetFollowerOffHandWeapon(CampTent akTentObject, int aiFollowerBedrollIndex, Weapon akWeapon) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerOffHandWeapon(akTentObject, aiFollowerBedrollIndex, akWeapon)
endFunction
function SetFollowerBigWeapon(CampTent akTentObject, int aiFollowerBedrollIndex, Weapon akWeapon) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerBigWeapon(akTentObject, aiFollowerBedrollIndex, akWeapon)
endFunction
function SetFollowerBowWeapon(CampTent akTentObject, int aiFollowerBedrollIndex, Weapon akWeapon) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerBowWeapon(akTentObject, aiFollowerBedrollIndex, akWeapon)
endFunction
function SetFollowerShield(CampTent akTentObject, int aiFollowerBedrollIndex, Armor akShield) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerShield(akTentObject, aiFollowerBedrollIndex, akShield)
endFunction
function SetFollowerDisplayMainWeapon(CampTent akTentObject, int aiBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerDisplayMainWeapon(akTentObject, aiBedrollIndex)
endFunction
function SetFollowerDisplayOffHandWeapon(CampTent akTentObject, int aiBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerDisplayOffHandWeapon(akTentObject, aiBedrollIndex)
endFunction
function SetFollowerDisplayBigWeapon(CampTent akTentObject, int aiBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerDisplayBigWeapon(akTentObject, aiBedrollIndex)
endFunction
function SetFollowerDisplayBowWeapon(CampTent akTentObject, int aiBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerDisplayBowWeapon(akTentObject, aiBedrollIndex)
endFunction
function SetFollowerDisplayShield(CampTent akTentObject, int aiBedrollIndex) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
TentAPI.SetFollowerDisplayShield(akTentObject, aiBedrollIndex)
endFunction
function UnDisplayFollowerMainWeapon(CampTent akTentObject, int aiBedrollIndex, Actor akActor) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
return None
endif
TentAPI.UnDisplayFollowerMainWeapon(akTentObject, aiBedrollIndex, akActor)
endFunction
function UnDisplayFollowerOffHandWeapon(CampTent akTentObject, int aiBedrollIndex, Actor akActor) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
return None
endif
TentAPI.UnDisplayFollowerOffHandWeapon(akTentObject, aiBedrollIndex, akActor)
endFunction
function UnDisplayFollowerBigWeapon(CampTent akTentObject, int aiBedrollIndex, Actor akActor) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
return None
endif
TentAPI.UnDisplayFollowerBigWeapon(akTentObject, aiBedrollIndex, akActor)
endFunction
function UnDisplayFollowerBowWeapon(CampTent akTentObject, int aiBedrollIndex, Actor akActor) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
return None
endif
TentAPI.UnDisplayFollowerBowWeapon(akTentObject, aiBedrollIndex, akActor)
endFunction
function UnDisplayFollowerShield(CampTent akTentObject, int aiBedrollIndex, Actor akActor) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
return None
endif
TentAPI.UnDisplayFollowerShield(akTentObject, aiBedrollIndex, akActor)
endFunction
Static function GetLantern(bool bOn = false, bool bHanging = false, bool bSilverCandlestick = false) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
if bOn
if bHanging
return TentAPI._Camp_Tent_LanternOnHang
else
if bSilverCandlestick
return TentAPI.SilverCandleStick02
else
return TentAPI._Camp_Tent_LanternOnGround
endif
endif
else
if bHanging
return TentAPI._Camp_Tent_LanternOffHang
else
if bSilverCandlestick
return TentAPI._Camp_SilverCandleStick02Off
else
return TentAPI._Camp_Tent_LanternOffGround
endif
endif
endif
endFunction
Light function GetLanternLight() global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
return TentAPI._Camp_LanternLight
endFunction
Form function GetFireVolume() global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
return TentAPI.BFXFireVol01
endFunction
function DestroyTent(ObjectReference akTent) global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return
endif
TentAPI.DestroyTent(akTent)
endFunction
Message function GetCampingIllegalMessage() global
_Camp_TentSystem TentAPI = GetAPI()
if TentAPI == none
RaiseTentAPIError()
return None
endif
return TentAPI._Camp_PlacementIllegal
endFunction
function RaiseTentAPIError() global
CampDebug(3, "Fatal Tent API error occurred.")
endFunction | Papyrus | 4 | chesko256/Campfire | Scripts/Source/TentSystem.psc | [
"MIT"
] |
.rule-import2 {
background: lightgreen;
} | CSS | 1 | 1shenxi/webpack | test/cases/loaders/less-loader/node_modules/resources-module/stylesheet-import2.css | [
"MIT"
] |
[ 99 Bottles of Beer in Brainf*** by Eric Bock - ebock@uswest.net ]
+++++++++>+++++++++>>>++++++[<+++>-]+++++++++>+++++++++>>>>>>+++++++++++++[<+++
+++>-]>+++++++++++[<++++++++++>-]<+>>++++++++[<++++>-]>+++++++++++[<++++++++++>
-]<->>+++++++++++[<++++++++++>-]<+>>>+++++[<++++>-]<-[<++++++>-]>++++++++++[<++
++++++++>-]<+>>>+++++++[<+++++++>-]>>>++++++++[<++++>-]>++++++++[<++++>-]>+++++
++++++[<+++++++++>-]<->>++++++++[<++++>-]>+++++++++++[<++++++++++>-]<+>>+++++++
+[<++++>-]>>+++++++[<++++>-]<+[<++++>-]>++++++++[<++++>-]>>+++++++[<++++>-]<+[<
++++>-]>>++++++++++++[<+++++++++>-]++++++++++>>++++++++++[<++++++++++>-]<+>>+++
+++++++++[<+++++++++>-]>>++++++++++++[<+++++++++>-]>>++++++[<++++>-]<-[<+++++>-
]>++++++++++++[<++++++++>-]<+>>>>++++[<++++>-]<+[<+++++++>-]>++++++++[<++++>-]>
++++++++[<++++>-]>+++++++++++[<++++++++++>-]<+>>++++++++++[<++++++++++>-]<+>>>+
+++[<++++>-]<+[<++++++>-]>+++++++++++++[<++++++++>-]>++++++++[<++++>-]>>+++++++
[<++++>-]<+[<++++>-]>+++++++++++[<+++++++++>-]<->>++++++++[<++++>-]>++++++++++[
<++++++++++>-]<+>>+++++++++++[<++++++++++>-]>++++++++++[<++++++++++>-]<+>>+++++
++++++[<++++++++++>-]<+>>>+++++[<++++>-]<-[<++++++>-]>++++++++[<++++>-]>+++++++
+++>>>>++++++++++++[<+++++++>-]++++++++++>>++++++++++++[<++++++++>-]<+>>+++++++
+++[<++++++++++>-]>++++++++++++[<+++++++++>-]<->>+++++++++++[<++++++++++>-]>+++
+++++++[<++++++++++>-]<+>>+++++++++++++[<+++++++++>-]>++++++++[<++++>-]>+++++++
++++[<++++++++++>-]<+>>>>+++++[<++++>-]<-[<++++++>-]>+++++++++++[<++++++++++>-]
<+>>++++++++++++[<++++++++>-]<+>>+++++++++++[<++++++++++>-]>++++++++[<++++>-]>+
+++++++++[<++++++++++>-]<+>>>+++++++[<++++>-]<+[<++++>-]>>>+++++[<+++>-]<[<++++
+++>-]>>+++++[<+++>-]<[<+++++++>-]>++++++++[<++++>-]>>+++++++[<++++>-]<+[<++++>
-]>>++++++[<++++>-]<-[<+++++>-]>>>++++++[<++++>-]<-[<+++++>-]>++++++++[<++++>-]
>++++++++++++[<++++++++>-]<+>>++++++++++[<++++++++++>-]>>++++[<++++>-]<[<++++++
+>-]>+++++++++++[<++++++++++>-]<+>>++++++++[<++++>-]>>++++[<++++>-]<+[<+++++++>
-]>++++++++++[<++++++++++>-]>+++++++++++[<++++++++++>-]>+++++++++++[<++++++++++
>-]>++++++++[<++++>-]>++++++++++++[<++++++++>-]<+[<]<[<]<[<]<[<]<<<<[<]<[<]<[<]
<[<]<<<<[<]<<<<<<[>>[<<[>>>+>+<<<<-]>>>[<<<+>>>-]<[>+<-]>>-[>-<[-]]>+[<+>-]<<<]
>>[<<<<[-]>>>>>>>[>]>.>>>[.>>]>[>]>>[.>>]<[.<<]<[<]<<.>>>[.>>]>[>]>>[.>>]>.>>>[
.>>]>[>]>>[.>>]>>[.>>]<[.<<]<<<<[<]<[<]<[<]<[<]<<<<[<]>[.>]>>>>[.>>]>>[.>>]>>[.
>>]<[.<<]<[<]<<<<[<]<<-]<<<<[[-]>>>[<+>-]<<[>>+>+<<<-]>>>[<<<+>>>-]<[<<<+++++++
+[>++++++<-]>>>[-]]++++++++[<++++++>-]<<[.>.>]>[.>>]>>>[>]>>>>[.>>]>>[.>>]>>[.>
>]<[.<<]<[<]<<<<[<]<<<<<[.>.>]>[.>>]<<<[-]>[-]>>>>>[>]>>>>[.>>]>>[.>>]>>[.>>]>.
>>>[.>>]>>[.>>]>[>]>>[.>>]<[.<<]<<<<[<]<[<]<[<]<[<]<<<<[<]<<<<<<]<<[>+>+<<-]>>[
<<+>>-]<[>-<[-]]>+[<+>-]<[<++++++++++<->>-]<<[>>+>+>+<<<<-]>>[<<+>>-]<-[>+>+>>+
<<<<-]>[<+>-]>>>[<<[>>>+>+<<<<-]>>>[<<<+>>>-]<[>+<-]>>-[>-<[-]]>+[<+>-]<<<]>>[<
<<<[-]>>>>>>>[>]>.>>>[.>>]>[>]>>[.>>]<[.<<]<[<]<<<<[<]<<-]<<<<[[-]>>>[<+>-]<<[>
>+>+<<<-]>>>[<<<+>>>-]<[<<<++++++++[>++++++<-]>>>[-]]++++++++[<++++++>-]<<[.>.>
]>[.>>]<<<[-]>[-]>>>>>[>]>>>>[.>>]>>[.>>]>>[.>>]<[.<<]<[<]<<<<[<]<<<<<<]+++++++
+++.[-]<<<[>>+>+>+<<<<-]>>[<<+>>-]<[>+>+>>+<<<<-]>[<+>-]>]
| Brainfuck | 2 | RubenNL/brainheck | examples/bottles-3.bf | [
"Apache-2.0"
] |
import net/[berkeley, Socket, Address, DNS, Exceptions, utilities]
import io/[Reader, Writer]
/**
A DATAGRAM based socket interface.
*/
UDPSocket: class extends Socket {
remote: SocketAddress
/**
Initialize the socket. Binds to all available IPs.
:param port: The port, for example 8080, or 80.
*/
init: func ~port(port: Int) {
init("0.0.0.0", port)
}
/**
Initialize the socket
:param ip: The IP, for now it can NOT be a hostname (TODO: This is a bug! Fix it!)
:param port: The port, for example 8080, or 80.
*/
init: func ~ipPort(host: String, port: Int) {
// Ohai, IP4-specificness. TODO: Fix this
ip := DNS resolveOne(host, SocketType DATAGRAM, AddressFamily IP4)
remote = SocketAddress new(ip, port)
super(remote family(), SocketType DATAGRAM, 0)
type = AddressFamily IP4
}
/**
Bind the socket
*/
bind: func {
if(bind(descriptor, remote addr(), remote length()) == -1) {
SocketError new("Could not bind UDP socket") throw()
}
}
/**
Send data through this socket
:param data: The data to be sent
:param length: The length of the data to be sent
:param flags: Send flags
:param resend: Attempt to resend any data left unsent
:return: The number of bytes sent
*/
send: func ~withLength(data: Char*, length: SizeT, flags: Int, resend: Bool) -> Int {
bytesSent := sendTo(descriptor, data, length, flags, remote addr(), remote length())
if (resend)
while(bytesSent < length && bytesSent != -1) {
dataSubstring := data as Char* + bytesSent
bytesSent += sendTo(descriptor, dataSubstring, length - bytesSent, flags, remote addr(), remote length())
}
if(bytesSent == -1) {
SocketError new("Couldn't send an UDP datagram") throw()
}
return bytesSent
}
/**
Send a string through this socket
:param data: The string to be sent
:param flags: Send flags
:param resend: Attempt to resend any data left unsent
:return: The number of bytes sent
*/
send: func ~withFlags(data: String, flags: Int, resend: Bool) -> Int {
send(data toCString(), data size, flags, resend)
}
/**
Send a string through this socket
:param data: The string to be sent
:param resend: Attempt to resend any data left unsent
:return: The number of bytes sent
*/
send: func ~withResend(data: String, resend: Bool) -> Int { send(data, 0, resend) }
/**
Send a string through this socket with resend attempted for unsent data
:param data: The string to be sent
:return: The number of bytes sent
*/
send: func(data: String) -> Int { send(data, true) }
/**
Send a byte through this socket
:param byte: The byte to send
:param flags: Send flags
*/
sendByte: func ~withFlags(byte: Char, flags: Int) {
send(byte&, Char size, flags, true)
}
/**
Send a byte through this socket
:param byte: The byte to send
*/
sendByte: func(byte: Char) { sendByte(byte, 0) }
/**
Receive bytes from this socket
:param buffer: Where to store the received bytes
:param length: Size of the given buffer
:param flags: Receive flags
:return: Number of received bytes
*/
receive: func ~withFlags(chars: Char*, length: SizeT, flags: Int) -> Int {
socketLength := remote length()
bytesRecv := recvFrom(descriptor, chars, length, flags, remote addr(), socketLength&)
if(bytesRecv == -1) {
SocketError new("Error receiveing from UDP socket") throw()
}
if(bytesRecv == 0) {
connected? = false // disconnected!
}
return bytesRecv
}
/**
Receive bytes from this socket
:param buffer: Where to store the received bytes
:param length: Size of the given buffer
:return: Number of received bytes
*/
receive: func ~withBuffer(buffer: Buffer, length: SizeT) -> Int {
assert (length <= buffer capacity)
ret := receive(buffer data, length, 0)
buffer setLength(ret)
ret
}
receive: func(length: SizeT) -> Buffer {
buffer := Buffer new(length)
receive(buffer, length)
buffer
}
/**
Receive a byte from this socket
:param flags: Receive flags
:return: The byte read
*/
receiveByte: func ~withFlags(flags: Int) -> Char {
c: Char
receive(c&, 1, 0)
return c
}
/**
Receive a byte from this socket
:return: The byte read
*/
receiveByte: func -> Char { receiveByte(0) }
// receiveFrom:
}
| ooc | 5 | fredrikbryntesson/launchtest | sdk/net/UDPSocket.ooc | [
"MIT"
] |
/// <reference path='fourslash.ts' />
/////** @return {number} */
////function f() {
//// return 12;
////}
verify.codeFix({
description: "Annotate with type from JSDoc",
newFileContent:
`/** @return {number} */
function f(): number {
return 12;
}`,
});
| TypeScript | 4 | nilamjadhav/TypeScript | tests/cases/fourslash/annotateWithTypeFromJSDoc14.ts | [
"Apache-2.0"
] |
unit CompInputQueryCombo;
{
Inno Setup
Copyright (C) 1997-2020 Jordan Russell
Portions by Martijn Laan
For conditions of distribution and use, see LICENSE.TXT.
InputQuery with a TComboBox instead of a TEdit
}
interface
uses
Classes, Controls, StdCtrls, UIStateForm;
type
TInputQueryCombo = class(TUIStateForm)
OKButton: TButton;
CancelButton: TButton;
PromptLabel: TLabel;
ValueComboBox: TComboBox;
procedure FormCreate(Sender: TObject);
private
function GetValue: String;
procedure SetPrompt(const APrompt: String);
procedure SetValue(const AValue: String);
procedure SetValues(const AValues: TStringList);
public
property Prompt: String write SetPrompt;
property Value: String read GetValue write SetValue;
property Values: TStringList write SetValues;
end;
function InputQueryCombo(const ACaption, APrompt: String; var AValue: String; const AValues: TStringList): Boolean;
implementation
uses
Windows, Messages, CompFunc, Forms;
{$R *.DFM}
function InputQueryCombo(const ACaption, APrompt: String; var AValue: String; const AValues: TStringList): Boolean;
begin
with TInputQueryCombo.Create(Application) do try
Caption := ACaption;
Prompt := APrompt;
Value := AValue;
Values := AValues;
if ShowModal = mrOk then begin
AValue := Value;
Result := True;
end else
Result := False;
finally
Free;
end;
end;
procedure TInputQueryCombo.FormCreate(Sender: TObject);
begin
InitFormFont(Self);
end;
function TInputQueryCombo.GetValue: String;
begin
Result := ValueComboBox.Text;
end;
procedure TInputQueryCombo.SetPrompt(const APrompt: String);
begin
PromptLabel.Caption := APrompt;
end;
procedure TInputQueryCombo.SetValue(const AValue: String);
begin
ValueComboBox.Text := AValue;
end;
procedure TInputQueryCombo.SetValues(const AValues: TStringList);
begin
ValueComboBox.Items := AValues;
end;
end.
| Pascal | 4 | Patriccollu/issrc | Projects/CompInputQueryCombo.pas | [
"FSFAP"
] |
import * as React from 'react';
import { deepmerge } from '@mui/utils';
import { ThemeProvider as SystemThemeProvider, useTheme as useSystemTheme } from '@mui/system';
import defaultTheme, { JoyTheme } from './defaultTheme';
import { Components } from './components';
import { ExtendedColorScheme } from './types/colorScheme';
type PartialDeep<T> = {
[K in keyof T]?: PartialDeep<T[K]>;
};
export const useTheme = () => {
return useSystemTheme(defaultTheme);
};
export default function ThemeProvider({
children,
theme,
}: React.PropsWithChildren<{
theme?: PartialDeep<Omit<JoyTheme<ExtendedColorScheme>, 'vars'>> & {
components?: Components;
};
}>) {
const { components, ...filteredTheme } = theme || {};
let mergedTheme = deepmerge(defaultTheme, filteredTheme);
mergedTheme = {
...mergedTheme,
vars: mergedTheme,
components,
} as JoyTheme<ExtendedColorScheme> & { components: Components };
return <SystemThemeProvider theme={mergedTheme}>{children}</SystemThemeProvider>;
}
| TypeScript | 4 | qwaszx7003/material-ui | packages/mui-joy/src/styles/ThemeProvider.tsx | [
"MIT"
] |
diagram "invalid" {
aws.route53 "dns";
aws.cloudfront "cf";
aws.alb "lb";
dns -> cf
cf -> lb;
}
| Redcode | 3 | ralphtq/cloudgram | tests/fixtures/invalid.cw | [
"Apache-2.0"
] |
{#abstractrefinements}
========================
<div class="hidden">
\begin{code}
module AbstractRefinements where
import Prelude
import Language.Haskell.Liquid.Prelude
{-@ LIQUID "--no-termination" @-}
o, no :: Int
maxInt :: Int -> Int -> Int
\end{code}
</div>
Abstract Refinements
--------------------
Abstract Refinements
====================
Two Problems
------------
<br>
<br>
<div class="fragment">
**Problem 1:**
How to specify increasing *and* decreasing lists?
</div>
<br>
<div class="fragment">
**Problem 2:**
How to specify *iteration-dependence* in higher-order functions?
</div>
Problem Is Pervasive
--------------------
Lets distill it to a simple example...
<div class="fragment">
<br>
(First, a few aliases)
<br>
\begin{code}
{-@ type Odd = {v:Int | (v mod 2) = 1} @-}
{-@ type Even = {v:Int | (v mod 2) = 0} @-}
\end{code}
</div>
Example: `maxInt`
-----------------
Compute the larger of two `Int`s:
\begin{code} <br>
maxInt :: Int -> Int -> Int
maxInt x y = if y <= x then x else y
\end{code}
Example: `maxInt`
-----------------
Has **many incomparable** refinement types
\begin{code}<br>
maxInt :: Nat -> Nat -> Nat
maxInt :: Even -> Even -> Even
maxInt :: Odd -> Odd -> Odd
\end{code}
<br>
<div class="fragment">Oh no! **Which** one should we use?</div>
Refinement Polymorphism
-----------------------
`maxInt` returns *one of* its two inputs `x` and `y`
<div class="fragment">
<div align="center">
<br>
--------- --- -------------------------------------------
**If** : the *inputs* satisfy a property
**Then** : the *output* satisfies that property
--------- --- -------------------------------------------
<br>
</div>
</div>
<div class="fragment">Above holds *for all properties*!</div>
<br>
<div class="fragment">
**Need to abstract properties over types**
</div>
<!--
By Type Polymorphism?
---------------------
\begin{code} <br>
max :: α -> α -> α
max x y = if y <= x then x else y
\end{code}
<div class="fragment">
Instantiate `α` at callsites
\begin{code}
{-@ o :: Odd @-}
o = maxInt 3 7 -- α := Odd
{-@ e :: Even @-}
e = maxInt 2 8 -- α := Even
\end{code}
</div>
By Type Polymorphism?
---------------------
\begin{code} <br>
max :: α -> α -> α
max x y = if y <= x then x else y
\end{code}
<br>
But there is a fly in the ointment ...
Polymorphic `max` in Haskell
----------------------------
\begin{code} In Haskell the type of max is
max :: (Ord α) => α -> α -> α
\end{code}
<br>
\begin{code} Could *ignore* the class constraints, instantiate as before...
{-@ o :: Odd @-}
o = max 3 7 -- α := Odd
\end{code}
Polymorphic `(+)` in Haskell
----------------------------
\begin{code} ... but this is *unsound*!
max :: (Ord α) => α -> α -> α
(+) :: (Num α) => α -> α -> α
\end{code}
<br>
<div class="fragment">
*Ignoring* class constraints would let us "prove":
\begin{code}
{-@ no :: Odd @-}
no = 3 + 7 -- α := Odd !
\end{code}
</div>
Type Polymorphism? No.
----------------------
<div class="fragment">Need to try a bit harder...</div>
-->
Parametric Refinements
----------------------
Enable *quantification over refinements* ...
<br>
<div class="fragment">
\begin{code}
{-@ maxInt :: forall <p :: Int -> Prop>.
Int<p> -> Int<p> -> Int<p> @-}
maxInt x y = if x <= y then y else x
\end{code}
</div>
<br>
<div class="fragment">Type says: **for any** `p` that is a property of `Int`, </div>
- <div class="fragment">`max` **takes** two `Int`s that satisfy `p`,</div>
- <div class="fragment">`max` **returns** an `Int` that satisfies `p`.</div>
Parametric Refinements
----------------------
Enable *quantification over refinements* ...
<br>
\begin{code}<div/>
{-@ maxInt :: forall <p :: Int -> Prop>.
Int<p> -> Int<p> -> Int<p> @-}
maxInt x y = if x <= y then y else x
\end{code}
<br>
[Key idea: ](http://goto.ucsd.edu/~rjhala/papers/abstract_refinement_types.html)
`Int<p>` is just $\reft{v}{\Int}{p(v)}$
<br>
Abstract Refinement is **uninterpreted function** in SMT logic
Parametric Refinements
----------------------
\begin{code}<br>
{-@ maxInt :: forall <p :: Int -> Prop>.
Int<p> -> Int<p> -> Int<p> @-}
maxInt x y = if x <= y then y else x
\end{code}
<br>
**Check Implementation via SMT**
Parametric Refinements
----------------------
\begin{code}<br>
{-@ maxInt :: forall <p :: Int -> Prop>.
Int<p> -> Int<p> -> Int<p> @-}
maxInt x y = if x <= y then y else x
\end{code}
<br>
**Check Implementation via SMT**
<br>
$$\begin{array}{rll}
\ereft{x}{\Int}{p(x)},\ereft{y}{\Int}{p(y)} & \vdash \reftx{v}{v = y} & \subty \reftx{v}{p(v)} \\
\ereft{x}{\Int}{p(x)},\ereft{y}{\Int}{p(y)} & \vdash \reftx{v}{v = x} & \subty \reftx{v}{p(v)} \\
\end{array}$$
Parametric Refinements
----------------------
\begin{code}<br>
{-@ maxInt :: forall <p :: Int -> Prop>.
Int<p> -> Int<p> -> Int<p> @-}
maxInt x y = if x <= y then y else x
\end{code}
<br>
**Check Implementation via SMT**
<br>
$$\begin{array}{rll}
{p(x)} \wedge {p(y)} & \Rightarrow {v = y} & \Rightarrow {p(v)} \\
{p(x)} \wedge {p(y)} & \Rightarrow {v = x} & \Rightarrow {p(v)} \\
\end{array}$$
Using Abstract Refinements
--------------------------
- <div class="fragment">**When** we call `maxInt` with args with some refinement,</div>
- <div class="fragment">**Then** `p` instantiated with *same* refinement,</div>
- <div class="fragment">**Result** of call will also have *same* concrete refinement.</div>
<br>
<div class="fragment">
\begin{code}
{-@ o' :: Odd @-}
o' = maxInt 3 7 -- p := \v -> Odd v
{-@ e' :: Even @-}
e' = maxInt 2 8 -- p := \v -> Even v
\end{code}
</div>
<br>
<div class="fragment">
Infer **Instantiation** by Liquid Typing
At call-site, instantiate `p` with unknown $\kvar{p}$ and solve!
</div>
<!--
Using Abstract Refinements
--------------------------
Or any other property ...
<br>
<div class="fragment">
\begin{code}
{-@ type RGB = {v:_ | (0 <= v && v < 256)} @-}
{-@ rgb :: RGB @-}
rgb = maxInt 56 8 -- p := \v -> 0 <= v < 256
\end{code}
</div>
-->
Recap
-----
1. Refinements: Types + Predicates
2. Subtyping: SMT Implication
3. Measures: Strengthened Constructors
4. **Abstract Refinements** over Types
<br>
<br>
<div class="fragment">
Abstract Refinements are *very* expressive ... <a href="06_Inductive.lhs.slides.html" target="_blank">[continue]</a>
</div>
| Literate Haskell | 5 | curiousleo/liquidhaskell | docs/slides/IHP14/lhs/04_AbstractRefinements.lhs | [
"MIT",
"BSD-3-Clause"
] |
-- ==============================================================
-- RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and OpenCL
-- Version: 2020.2
-- Copyright (C) 1986-2020 Xilinx, Inc. All Rights Reserved.
--
-- ===========================================================
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity AXIVideo2BayerMat is
port (
ap_clk : IN STD_LOGIC;
ap_rst : IN STD_LOGIC;
ap_start : IN STD_LOGIC;
start_full_n : IN STD_LOGIC;
ap_done : OUT STD_LOGIC;
ap_continue : IN STD_LOGIC;
ap_idle : OUT STD_LOGIC;
ap_ready : OUT STD_LOGIC;
start_out : OUT STD_LOGIC;
start_write : OUT STD_LOGIC;
s_axis_video_TDATA : IN STD_LOGIC_VECTOR (39 downto 0);
s_axis_video_TVALID : IN STD_LOGIC;
s_axis_video_TREADY : OUT STD_LOGIC;
s_axis_video_TKEEP : IN STD_LOGIC_VECTOR (4 downto 0);
s_axis_video_TSTRB : IN STD_LOGIC_VECTOR (4 downto 0);
s_axis_video_TUSER : IN STD_LOGIC_VECTOR (0 downto 0);
s_axis_video_TLAST : IN STD_LOGIC_VECTOR (0 downto 0);
s_axis_video_TID : IN STD_LOGIC_VECTOR (0 downto 0);
s_axis_video_TDEST : IN STD_LOGIC_VECTOR (0 downto 0);
bayer_mat_rows_dout : IN STD_LOGIC_VECTOR (15 downto 0);
bayer_mat_rows_empty_n : IN STD_LOGIC;
bayer_mat_rows_read : OUT STD_LOGIC;
bayer_mat_cols_dout : IN STD_LOGIC_VECTOR (15 downto 0);
bayer_mat_cols_empty_n : IN STD_LOGIC;
bayer_mat_cols_read : OUT STD_LOGIC;
bayer_mat_data_V_V_din : OUT STD_LOGIC_VECTOR (39 downto 0);
bayer_mat_data_V_V_full_n : IN STD_LOGIC;
bayer_mat_data_V_V_write : OUT STD_LOGIC;
bayer_mat_rows_out_din : OUT STD_LOGIC_VECTOR (15 downto 0);
bayer_mat_rows_out_full_n : IN STD_LOGIC;
bayer_mat_rows_out_write : OUT STD_LOGIC;
bayer_mat_cols_out_din : OUT STD_LOGIC_VECTOR (15 downto 0);
bayer_mat_cols_out_full_n : IN STD_LOGIC;
bayer_mat_cols_out_write : OUT STD_LOGIC );
end;
architecture behav of AXIVideo2BayerMat is
constant ap_const_logic_1 : STD_LOGIC := '1';
constant ap_const_logic_0 : STD_LOGIC := '0';
constant ap_ST_fsm_state1 : STD_LOGIC_VECTOR (7 downto 0) := "00000001";
constant ap_ST_fsm_state2 : STD_LOGIC_VECTOR (7 downto 0) := "00000010";
constant ap_ST_fsm_state3 : STD_LOGIC_VECTOR (7 downto 0) := "00000100";
constant ap_ST_fsm_state4 : STD_LOGIC_VECTOR (7 downto 0) := "00001000";
constant ap_ST_fsm_pp1_stage0 : STD_LOGIC_VECTOR (7 downto 0) := "00010000";
constant ap_ST_fsm_state7 : STD_LOGIC_VECTOR (7 downto 0) := "00100000";
constant ap_ST_fsm_state8 : STD_LOGIC_VECTOR (7 downto 0) := "01000000";
constant ap_ST_fsm_state9 : STD_LOGIC_VECTOR (7 downto 0) := "10000000";
constant ap_const_boolean_1 : BOOLEAN := true;
constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000";
constant ap_const_lv32_1 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000001";
constant ap_const_lv32_4 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000100";
constant ap_const_boolean_0 : BOOLEAN := false;
constant ap_const_lv1_0 : STD_LOGIC_VECTOR (0 downto 0) := "0";
constant ap_const_lv32_6 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000110";
constant ap_const_lv32_2 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000010";
constant ap_const_lv32_3 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000011";
constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
constant ap_const_lv32_7 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000111";
constant ap_const_lv16_0 : STD_LOGIC_VECTOR (15 downto 0) := "0000000000000000";
constant ap_const_lv14_0 : STD_LOGIC_VECTOR (13 downto 0) := "00000000000000";
constant ap_const_lv32_5 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000101";
constant ap_const_lv32_F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000001111";
constant ap_const_lv16_1 : STD_LOGIC_VECTOR (15 downto 0) := "0000000000000001";
constant ap_const_lv14_1 : STD_LOGIC_VECTOR (13 downto 0) := "00000000000001";
signal real_start : STD_LOGIC;
signal start_once_reg : STD_LOGIC := '0';
signal ap_done_reg : STD_LOGIC := '0';
signal ap_CS_fsm : STD_LOGIC_VECTOR (7 downto 0) := "00000001";
attribute fsm_encoding : string;
attribute fsm_encoding of ap_CS_fsm : signal is "none";
signal ap_CS_fsm_state1 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_state1 : signal is "none";
signal internal_ap_ready : STD_LOGIC;
signal s_axis_video_TDATA_blk_n : STD_LOGIC;
signal ap_CS_fsm_state2 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_state2 : signal is "none";
signal ap_CS_fsm_pp1_stage0 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_pp1_stage0 : signal is "none";
signal ap_enable_reg_pp1_iter0 : STD_LOGIC := '0';
signal ap_block_pp1_stage0 : BOOLEAN;
signal icmp_ln83_fu_322_p2 : STD_LOGIC_VECTOR (0 downto 0);
signal or_ln90_fu_336_p2 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_CS_fsm_state8 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_state8 : signal is "none";
signal ap_phi_mux_last_1_i_phi_fu_276_p4 : STD_LOGIC_VECTOR (0 downto 0);
signal bayer_mat_rows_blk_n : STD_LOGIC;
signal bayer_mat_cols_blk_n : STD_LOGIC;
signal bayer_mat_data_V_V_blk_n : STD_LOGIC;
signal ap_enable_reg_pp1_iter1 : STD_LOGIC := '0';
signal icmp_ln83_reg_391 : STD_LOGIC_VECTOR (0 downto 0);
signal bayer_mat_rows_out_blk_n : STD_LOGIC;
signal bayer_mat_cols_out_blk_n : STD_LOGIC;
signal axi_last_V_1_i_reg_178 : STD_LOGIC_VECTOR (0 downto 0);
signal axi_data_V_1_i_reg_189 : STD_LOGIC_VECTOR (39 downto 0);
signal last_0_i_reg_200 : STD_LOGIC_VECTOR (0 downto 0);
signal j_0_i_reg_212 : STD_LOGIC_VECTOR (13 downto 0);
signal last_reg_223 : STD_LOGIC_VECTOR (0 downto 0);
signal p_Val2_s_reg_236 : STD_LOGIC_VECTOR (39 downto 0);
signal bayer_mat_rows_read_reg_347 : STD_LOGIC_VECTOR (15 downto 0);
signal ap_block_state1 : BOOLEAN;
signal bayer_mat_cols_read_reg_352 : STD_LOGIC_VECTOR (15 downto 0);
signal tmp_data_V_reg_357 : STD_LOGIC_VECTOR (39 downto 0);
signal tmp_last_V_reg_365 : STD_LOGIC_VECTOR (0 downto 0);
signal tmp_reg_377 : STD_LOGIC_VECTOR (13 downto 0);
signal ap_CS_fsm_state3 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_state3 : signal is "none";
signal icmp_ln77_fu_311_p2 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_CS_fsm_state4 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_state4 : signal is "none";
signal i_fu_316_p2 : STD_LOGIC_VECTOR (15 downto 0);
signal i_reg_386 : STD_LOGIC_VECTOR (15 downto 0);
signal ap_predicate_op63_read_state5 : BOOLEAN;
signal ap_block_state5_pp1_stage0_iter0 : BOOLEAN;
signal ap_block_state6_pp1_stage0_iter1 : BOOLEAN;
signal ap_block_pp1_stage0_11001 : BOOLEAN;
signal j_fu_327_p2 : STD_LOGIC_VECTOR (13 downto 0);
signal ap_block_state8 : BOOLEAN;
signal ap_block_pp1_stage0_subdone : BOOLEAN;
signal ap_condition_pp1_exit_iter0_state5 : STD_LOGIC;
signal axi_last_V_3_i_reg_249 : STD_LOGIC_VECTOR (0 downto 0);
signal axi_last_V_0_i_reg_147 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_CS_fsm_state9 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_state9 : signal is "none";
signal axi_data_V_3_i_reg_261 : STD_LOGIC_VECTOR (39 downto 0);
signal axi_data_V_0_i_reg_157 : STD_LOGIC_VECTOR (39 downto 0);
signal i_0_i_reg_167 : STD_LOGIC_VECTOR (15 downto 0);
signal ap_phi_mux_axi_last_V_1_i_phi_fu_181_p4 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_phi_mux_axi_data_V_1_i_phi_fu_192_p4 : STD_LOGIC_VECTOR (39 downto 0);
signal ap_phi_mux_last_0_i_phi_fu_204_p4 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_phi_reg_pp1_iter0_last_reg_223 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_phi_reg_pp1_iter0_p_Val2_s_reg_236 : STD_LOGIC_VECTOR (39 downto 0);
signal ap_CS_fsm_state7 : STD_LOGIC;
attribute fsm_encoding of ap_CS_fsm_state7 : signal is "none";
signal last_1_i_reg_273 : STD_LOGIC_VECTOR (0 downto 0);
signal start_1_i_fu_90 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_block_pp1_stage0_01001 : BOOLEAN;
signal tmp_user_V_fu_293_p1 : STD_LOGIC_VECTOR (0 downto 0);
signal ap_NS_fsm : STD_LOGIC_VECTOR (7 downto 0);
signal ap_idle_pp1 : STD_LOGIC;
signal ap_enable_pp1 : STD_LOGIC;
signal ap_condition_191 : BOOLEAN;
begin
ap_CS_fsm_assign_proc : process(ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (ap_rst = '1') then
ap_CS_fsm <= ap_ST_fsm_state1;
else
ap_CS_fsm <= ap_NS_fsm;
end if;
end if;
end process;
ap_done_reg_assign_proc : process(ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (ap_rst = '1') then
ap_done_reg <= ap_const_logic_0;
else
if ((ap_continue = ap_const_logic_1)) then
ap_done_reg <= ap_const_logic_0;
elsif (((ap_const_logic_1 = ap_CS_fsm_state4) and (icmp_ln77_fu_311_p2 = ap_const_lv1_1))) then
ap_done_reg <= ap_const_logic_1;
end if;
end if;
end if;
end process;
ap_enable_reg_pp1_iter0_assign_proc : process(ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (ap_rst = '1') then
ap_enable_reg_pp1_iter0 <= ap_const_logic_0;
else
if (((ap_const_boolean_0 = ap_block_pp1_stage0_subdone) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_const_logic_1 = ap_condition_pp1_exit_iter0_state5))) then
ap_enable_reg_pp1_iter0 <= ap_const_logic_0;
elsif (((icmp_ln77_fu_311_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state4))) then
ap_enable_reg_pp1_iter0 <= ap_const_logic_1;
end if;
end if;
end if;
end process;
ap_enable_reg_pp1_iter1_assign_proc : process(ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (ap_rst = '1') then
ap_enable_reg_pp1_iter1 <= ap_const_logic_0;
else
if (((ap_const_boolean_0 = ap_block_pp1_stage0_subdone) and (ap_const_logic_1 = ap_condition_pp1_exit_iter0_state5))) then
ap_enable_reg_pp1_iter1 <= (ap_const_logic_1 xor ap_condition_pp1_exit_iter0_state5);
elsif ((ap_const_boolean_0 = ap_block_pp1_stage0_subdone)) then
ap_enable_reg_pp1_iter1 <= ap_enable_reg_pp1_iter0;
elsif (((icmp_ln77_fu_311_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state4))) then
ap_enable_reg_pp1_iter1 <= ap_const_logic_0;
end if;
end if;
end if;
end process;
start_once_reg_assign_proc : process(ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (ap_rst = '1') then
start_once_reg <= ap_const_logic_0;
else
if (((internal_ap_ready = ap_const_logic_0) and (real_start = ap_const_logic_1))) then
start_once_reg <= ap_const_logic_1;
elsif ((internal_ap_ready = ap_const_logic_1)) then
start_once_reg <= ap_const_logic_0;
end if;
end if;
end if;
end process;
axi_data_V_0_i_reg_157_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state3)) then
axi_data_V_0_i_reg_157 <= tmp_data_V_reg_357;
elsif ((ap_const_logic_1 = ap_CS_fsm_state9)) then
axi_data_V_0_i_reg_157 <= axi_data_V_3_i_reg_261;
end if;
end if;
end process;
axi_data_V_1_i_reg_189_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001))) then
axi_data_V_1_i_reg_189 <= p_Val2_s_reg_236;
elsif (((icmp_ln77_fu_311_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state4))) then
axi_data_V_1_i_reg_189 <= axi_data_V_0_i_reg_157;
end if;
end if;
end process;
axi_data_V_3_i_reg_261_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state7)) then
axi_data_V_3_i_reg_261 <= axi_data_V_1_i_reg_189;
elsif ((not(((last_1_i_reg_273 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_0))) and (last_1_i_reg_273 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state8))) then
axi_data_V_3_i_reg_261 <= s_axis_video_TDATA;
end if;
end if;
end process;
axi_last_V_0_i_reg_147_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state3)) then
axi_last_V_0_i_reg_147 <= tmp_last_V_reg_365;
elsif ((ap_const_logic_1 = ap_CS_fsm_state9)) then
axi_last_V_0_i_reg_147 <= axi_last_V_3_i_reg_249;
end if;
end if;
end process;
axi_last_V_1_i_reg_178_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001))) then
axi_last_V_1_i_reg_178 <= last_reg_223;
elsif (((icmp_ln77_fu_311_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state4))) then
axi_last_V_1_i_reg_178 <= axi_last_V_0_i_reg_147;
end if;
end if;
end process;
axi_last_V_3_i_reg_249_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state7)) then
axi_last_V_3_i_reg_249 <= axi_last_V_1_i_reg_178;
elsif ((not(((last_1_i_reg_273 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_0))) and (last_1_i_reg_273 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state8))) then
axi_last_V_3_i_reg_249 <= s_axis_video_TLAST;
end if;
end if;
end process;
i_0_i_reg_167_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state3)) then
i_0_i_reg_167 <= ap_const_lv16_0;
elsif ((ap_const_logic_1 = ap_CS_fsm_state9)) then
i_0_i_reg_167 <= i_reg_386;
end if;
end if;
end process;
j_0_i_reg_212_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (((icmp_ln83_fu_322_p2 = ap_const_lv1_0) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001))) then
j_0_i_reg_212 <= j_fu_327_p2;
elsif (((icmp_ln77_fu_311_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state4))) then
j_0_i_reg_212 <= ap_const_lv14_0;
end if;
end if;
end process;
last_0_i_reg_200_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001))) then
last_0_i_reg_200 <= last_reg_223;
elsif (((icmp_ln77_fu_311_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state4))) then
last_0_i_reg_200 <= ap_const_lv1_0;
end if;
end if;
end process;
last_1_i_reg_273_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state7)) then
last_1_i_reg_273 <= last_0_i_reg_200;
elsif ((not(((last_1_i_reg_273 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_0))) and (last_1_i_reg_273 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state8))) then
last_1_i_reg_273 <= s_axis_video_TLAST;
end if;
end if;
end process;
last_reg_223_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_boolean_1 = ap_condition_191)) then
if (((or_ln90_fu_336_p2 = ap_const_lv1_0) and (icmp_ln83_fu_322_p2 = ap_const_lv1_0))) then
last_reg_223 <= s_axis_video_TLAST;
elsif (((or_ln90_fu_336_p2 = ap_const_lv1_1) and (icmp_ln83_fu_322_p2 = ap_const_lv1_0))) then
last_reg_223 <= ap_phi_mux_axi_last_V_1_i_phi_fu_181_p4;
elsif ((ap_const_boolean_1 = ap_const_boolean_1)) then
last_reg_223 <= ap_phi_reg_pp1_iter0_last_reg_223;
end if;
end if;
end if;
end process;
p_Val2_s_reg_236_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_boolean_1 = ap_condition_191)) then
if (((or_ln90_fu_336_p2 = ap_const_lv1_0) and (icmp_ln83_fu_322_p2 = ap_const_lv1_0))) then
p_Val2_s_reg_236 <= s_axis_video_TDATA;
elsif (((or_ln90_fu_336_p2 = ap_const_lv1_1) and (icmp_ln83_fu_322_p2 = ap_const_lv1_0))) then
p_Val2_s_reg_236 <= ap_phi_mux_axi_data_V_1_i_phi_fu_192_p4;
elsif ((ap_const_boolean_1 = ap_const_boolean_1)) then
p_Val2_s_reg_236 <= ap_phi_reg_pp1_iter0_p_Val2_s_reg_236;
end if;
end if;
end if;
end process;
start_1_i_fu_90_assign_proc : process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (((icmp_ln83_fu_322_p2 = ap_const_lv1_0) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001))) then
start_1_i_fu_90 <= ap_const_lv1_0;
elsif ((ap_const_logic_1 = ap_CS_fsm_state3)) then
start_1_i_fu_90 <= ap_const_lv1_1;
end if;
end if;
end process;
process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((not(((bayer_mat_cols_out_full_n = ap_const_logic_0) or (bayer_mat_rows_out_full_n = ap_const_logic_0) or (bayer_mat_cols_empty_n = ap_const_logic_0) or (bayer_mat_rows_empty_n = ap_const_logic_0) or (real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_cols_read_reg_352 <= bayer_mat_cols_dout;
bayer_mat_rows_read_reg_347 <= bayer_mat_rows_dout;
end if;
end if;
end process;
process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state4)) then
i_reg_386 <= i_fu_316_p2;
end if;
end if;
end process;
process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (((ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001))) then
icmp_ln83_reg_391 <= icmp_ln83_fu_322_p2;
end if;
end if;
end process;
process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if (((s_axis_video_TVALID = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
tmp_data_V_reg_357 <= s_axis_video_TDATA;
tmp_last_V_reg_365 <= s_axis_video_TLAST;
end if;
end if;
end process;
process (ap_clk)
begin
if (ap_clk'event and ap_clk = '1') then
if ((ap_const_logic_1 = ap_CS_fsm_state3)) then
tmp_reg_377 <= bayer_mat_cols_read_reg_352(15 downto 2);
end if;
end if;
end process;
ap_NS_fsm_assign_proc : process (real_start, ap_done_reg, ap_CS_fsm, ap_CS_fsm_state1, s_axis_video_TVALID, bayer_mat_rows_empty_n, bayer_mat_cols_empty_n, bayer_mat_rows_out_full_n, bayer_mat_cols_out_full_n, ap_CS_fsm_state2, ap_enable_reg_pp1_iter0, icmp_ln83_fu_322_p2, ap_CS_fsm_state8, ap_phi_mux_last_1_i_phi_fu_276_p4, icmp_ln77_fu_311_p2, ap_CS_fsm_state4, ap_block_pp1_stage0_subdone, last_1_i_reg_273, tmp_user_V_fu_293_p1)
begin
case ap_CS_fsm is
when ap_ST_fsm_state1 =>
if ((not(((bayer_mat_cols_out_full_n = ap_const_logic_0) or (bayer_mat_rows_out_full_n = ap_const_logic_0) or (bayer_mat_cols_empty_n = ap_const_logic_0) or (bayer_mat_rows_empty_n = ap_const_logic_0) or (real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
ap_NS_fsm <= ap_ST_fsm_state2;
else
ap_NS_fsm <= ap_ST_fsm_state1;
end if;
when ap_ST_fsm_state2 =>
if (((tmp_user_V_fu_293_p1 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
ap_NS_fsm <= ap_ST_fsm_state2;
elsif (((s_axis_video_TVALID = ap_const_logic_1) and (tmp_user_V_fu_293_p1 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
ap_NS_fsm <= ap_ST_fsm_state3;
else
ap_NS_fsm <= ap_ST_fsm_state2;
end if;
when ap_ST_fsm_state3 =>
ap_NS_fsm <= ap_ST_fsm_state4;
when ap_ST_fsm_state4 =>
if (((ap_const_logic_1 = ap_CS_fsm_state4) and (icmp_ln77_fu_311_p2 = ap_const_lv1_1))) then
ap_NS_fsm <= ap_ST_fsm_state1;
else
ap_NS_fsm <= ap_ST_fsm_pp1_stage0;
end if;
when ap_ST_fsm_pp1_stage0 =>
if (not(((icmp_ln83_fu_322_p2 = ap_const_lv1_1) and (ap_const_boolean_0 = ap_block_pp1_stage0_subdone) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1)))) then
ap_NS_fsm <= ap_ST_fsm_pp1_stage0;
elsif (((icmp_ln83_fu_322_p2 = ap_const_lv1_1) and (ap_const_boolean_0 = ap_block_pp1_stage0_subdone) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1))) then
ap_NS_fsm <= ap_ST_fsm_state7;
else
ap_NS_fsm <= ap_ST_fsm_pp1_stage0;
end if;
when ap_ST_fsm_state7 =>
ap_NS_fsm <= ap_ST_fsm_state8;
when ap_ST_fsm_state8 =>
if ((not(((last_1_i_reg_273 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_0))) and (last_1_i_reg_273 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state8))) then
ap_NS_fsm <= ap_ST_fsm_state8;
elsif ((not(((last_1_i_reg_273 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state8) and (ap_phi_mux_last_1_i_phi_fu_276_p4 = ap_const_lv1_1))) then
ap_NS_fsm <= ap_ST_fsm_state9;
else
ap_NS_fsm <= ap_ST_fsm_state8;
end if;
when ap_ST_fsm_state9 =>
ap_NS_fsm <= ap_ST_fsm_state4;
when others =>
ap_NS_fsm <= "XXXXXXXX";
end case;
end process;
ap_CS_fsm_pp1_stage0 <= ap_CS_fsm(4);
ap_CS_fsm_state1 <= ap_CS_fsm(0);
ap_CS_fsm_state2 <= ap_CS_fsm(1);
ap_CS_fsm_state3 <= ap_CS_fsm(2);
ap_CS_fsm_state4 <= ap_CS_fsm(3);
ap_CS_fsm_state7 <= ap_CS_fsm(5);
ap_CS_fsm_state8 <= ap_CS_fsm(6);
ap_CS_fsm_state9 <= ap_CS_fsm(7);
ap_block_pp1_stage0 <= not((ap_const_boolean_1 = ap_const_boolean_1));
ap_block_pp1_stage0_01001_assign_proc : process(s_axis_video_TVALID, bayer_mat_data_V_V_full_n, ap_enable_reg_pp1_iter0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391, ap_predicate_op63_read_state5)
begin
ap_block_pp1_stage0_01001 <= (((s_axis_video_TVALID = ap_const_logic_0) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_predicate_op63_read_state5 = ap_const_boolean_1)) or ((icmp_ln83_reg_391 = ap_const_lv1_0) and (bayer_mat_data_V_V_full_n = ap_const_logic_0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1)));
end process;
ap_block_pp1_stage0_11001_assign_proc : process(s_axis_video_TVALID, bayer_mat_data_V_V_full_n, ap_enable_reg_pp1_iter0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391, ap_predicate_op63_read_state5)
begin
ap_block_pp1_stage0_11001 <= (((s_axis_video_TVALID = ap_const_logic_0) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_predicate_op63_read_state5 = ap_const_boolean_1)) or ((icmp_ln83_reg_391 = ap_const_lv1_0) and (bayer_mat_data_V_V_full_n = ap_const_logic_0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1)));
end process;
ap_block_pp1_stage0_subdone_assign_proc : process(s_axis_video_TVALID, bayer_mat_data_V_V_full_n, ap_enable_reg_pp1_iter0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391, ap_predicate_op63_read_state5)
begin
ap_block_pp1_stage0_subdone <= (((s_axis_video_TVALID = ap_const_logic_0) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_predicate_op63_read_state5 = ap_const_boolean_1)) or ((icmp_ln83_reg_391 = ap_const_lv1_0) and (bayer_mat_data_V_V_full_n = ap_const_logic_0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1)));
end process;
ap_block_state1_assign_proc : process(real_start, ap_done_reg, bayer_mat_rows_empty_n, bayer_mat_cols_empty_n, bayer_mat_rows_out_full_n, bayer_mat_cols_out_full_n)
begin
ap_block_state1 <= ((bayer_mat_cols_out_full_n = ap_const_logic_0) or (bayer_mat_rows_out_full_n = ap_const_logic_0) or (bayer_mat_cols_empty_n = ap_const_logic_0) or (bayer_mat_rows_empty_n = ap_const_logic_0) or (real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1));
end process;
ap_block_state5_pp1_stage0_iter0_assign_proc : process(s_axis_video_TVALID, ap_predicate_op63_read_state5)
begin
ap_block_state5_pp1_stage0_iter0 <= ((s_axis_video_TVALID = ap_const_logic_0) and (ap_predicate_op63_read_state5 = ap_const_boolean_1));
end process;
ap_block_state6_pp1_stage0_iter1_assign_proc : process(bayer_mat_data_V_V_full_n, icmp_ln83_reg_391)
begin
ap_block_state6_pp1_stage0_iter1 <= ((icmp_ln83_reg_391 = ap_const_lv1_0) and (bayer_mat_data_V_V_full_n = ap_const_logic_0));
end process;
ap_block_state8_assign_proc : process(s_axis_video_TVALID, last_1_i_reg_273)
begin
ap_block_state8 <= ((last_1_i_reg_273 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_0));
end process;
ap_condition_191_assign_proc : process(ap_CS_fsm_pp1_stage0, ap_enable_reg_pp1_iter0, ap_block_pp1_stage0_11001)
begin
ap_condition_191 <= ((ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001));
end process;
ap_condition_pp1_exit_iter0_state5_assign_proc : process(icmp_ln83_fu_322_p2)
begin
if ((icmp_ln83_fu_322_p2 = ap_const_lv1_1)) then
ap_condition_pp1_exit_iter0_state5 <= ap_const_logic_1;
else
ap_condition_pp1_exit_iter0_state5 <= ap_const_logic_0;
end if;
end process;
ap_done_assign_proc : process(ap_done_reg, icmp_ln77_fu_311_p2, ap_CS_fsm_state4)
begin
if (((ap_const_logic_1 = ap_CS_fsm_state4) and (icmp_ln77_fu_311_p2 = ap_const_lv1_1))) then
ap_done <= ap_const_logic_1;
else
ap_done <= ap_done_reg;
end if;
end process;
ap_enable_pp1 <= (ap_idle_pp1 xor ap_const_logic_1);
ap_idle_assign_proc : process(real_start, ap_CS_fsm_state1)
begin
if (((real_start = ap_const_logic_0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
ap_idle <= ap_const_logic_1;
else
ap_idle <= ap_const_logic_0;
end if;
end process;
ap_idle_pp1_assign_proc : process(ap_enable_reg_pp1_iter0, ap_enable_reg_pp1_iter1)
begin
if (((ap_enable_reg_pp1_iter0 = ap_const_logic_0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_0))) then
ap_idle_pp1 <= ap_const_logic_1;
else
ap_idle_pp1 <= ap_const_logic_0;
end if;
end process;
ap_phi_mux_axi_data_V_1_i_phi_fu_192_p4_assign_proc : process(ap_CS_fsm_pp1_stage0, ap_block_pp1_stage0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391, axi_data_V_1_i_reg_189, p_Val2_s_reg_236)
begin
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_boolean_0 = ap_block_pp1_stage0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1))) then
ap_phi_mux_axi_data_V_1_i_phi_fu_192_p4 <= p_Val2_s_reg_236;
else
ap_phi_mux_axi_data_V_1_i_phi_fu_192_p4 <= axi_data_V_1_i_reg_189;
end if;
end process;
ap_phi_mux_axi_last_V_1_i_phi_fu_181_p4_assign_proc : process(ap_CS_fsm_pp1_stage0, ap_block_pp1_stage0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391, axi_last_V_1_i_reg_178, last_reg_223)
begin
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_boolean_0 = ap_block_pp1_stage0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1))) then
ap_phi_mux_axi_last_V_1_i_phi_fu_181_p4 <= last_reg_223;
else
ap_phi_mux_axi_last_V_1_i_phi_fu_181_p4 <= axi_last_V_1_i_reg_178;
end if;
end process;
ap_phi_mux_last_0_i_phi_fu_204_p4_assign_proc : process(ap_CS_fsm_pp1_stage0, ap_block_pp1_stage0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391, last_0_i_reg_200, last_reg_223)
begin
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_boolean_0 = ap_block_pp1_stage0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1))) then
ap_phi_mux_last_0_i_phi_fu_204_p4 <= last_reg_223;
else
ap_phi_mux_last_0_i_phi_fu_204_p4 <= last_0_i_reg_200;
end if;
end process;
ap_phi_mux_last_1_i_phi_fu_276_p4 <= last_1_i_reg_273;
ap_phi_reg_pp1_iter0_last_reg_223 <= "X";
ap_phi_reg_pp1_iter0_p_Val2_s_reg_236 <= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
ap_predicate_op63_read_state5_assign_proc : process(icmp_ln83_fu_322_p2, or_ln90_fu_336_p2)
begin
ap_predicate_op63_read_state5 <= ((or_ln90_fu_336_p2 = ap_const_lv1_0) and (icmp_ln83_fu_322_p2 = ap_const_lv1_0));
end process;
ap_ready <= internal_ap_ready;
bayer_mat_cols_blk_n_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_cols_empty_n)
begin
if ((not(((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_cols_blk_n <= bayer_mat_cols_empty_n;
else
bayer_mat_cols_blk_n <= ap_const_logic_1;
end if;
end process;
bayer_mat_cols_out_blk_n_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_cols_out_full_n)
begin
if ((not(((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_cols_out_blk_n <= bayer_mat_cols_out_full_n;
else
bayer_mat_cols_out_blk_n <= ap_const_logic_1;
end if;
end process;
bayer_mat_cols_out_din <= bayer_mat_cols_dout;
bayer_mat_cols_out_write_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_rows_empty_n, bayer_mat_cols_empty_n, bayer_mat_rows_out_full_n, bayer_mat_cols_out_full_n)
begin
if ((not(((bayer_mat_cols_out_full_n = ap_const_logic_0) or (bayer_mat_rows_out_full_n = ap_const_logic_0) or (bayer_mat_cols_empty_n = ap_const_logic_0) or (bayer_mat_rows_empty_n = ap_const_logic_0) or (real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_cols_out_write <= ap_const_logic_1;
else
bayer_mat_cols_out_write <= ap_const_logic_0;
end if;
end process;
bayer_mat_cols_read_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_rows_empty_n, bayer_mat_cols_empty_n, bayer_mat_rows_out_full_n, bayer_mat_cols_out_full_n)
begin
if ((not(((bayer_mat_cols_out_full_n = ap_const_logic_0) or (bayer_mat_rows_out_full_n = ap_const_logic_0) or (bayer_mat_cols_empty_n = ap_const_logic_0) or (bayer_mat_rows_empty_n = ap_const_logic_0) or (real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_cols_read <= ap_const_logic_1;
else
bayer_mat_cols_read <= ap_const_logic_0;
end if;
end process;
bayer_mat_data_V_V_blk_n_assign_proc : process(bayer_mat_data_V_V_full_n, ap_CS_fsm_pp1_stage0, ap_block_pp1_stage0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391)
begin
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_boolean_0 = ap_block_pp1_stage0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1))) then
bayer_mat_data_V_V_blk_n <= bayer_mat_data_V_V_full_n;
else
bayer_mat_data_V_V_blk_n <= ap_const_logic_1;
end if;
end process;
bayer_mat_data_V_V_din <= p_Val2_s_reg_236;
bayer_mat_data_V_V_write_assign_proc : process(ap_CS_fsm_pp1_stage0, ap_enable_reg_pp1_iter1, icmp_ln83_reg_391, ap_block_pp1_stage0_11001)
begin
if (((icmp_ln83_reg_391 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_enable_reg_pp1_iter1 = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001))) then
bayer_mat_data_V_V_write <= ap_const_logic_1;
else
bayer_mat_data_V_V_write <= ap_const_logic_0;
end if;
end process;
bayer_mat_rows_blk_n_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_rows_empty_n)
begin
if ((not(((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_rows_blk_n <= bayer_mat_rows_empty_n;
else
bayer_mat_rows_blk_n <= ap_const_logic_1;
end if;
end process;
bayer_mat_rows_out_blk_n_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_rows_out_full_n)
begin
if ((not(((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_rows_out_blk_n <= bayer_mat_rows_out_full_n;
else
bayer_mat_rows_out_blk_n <= ap_const_logic_1;
end if;
end process;
bayer_mat_rows_out_din <= bayer_mat_rows_dout;
bayer_mat_rows_out_write_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_rows_empty_n, bayer_mat_cols_empty_n, bayer_mat_rows_out_full_n, bayer_mat_cols_out_full_n)
begin
if ((not(((bayer_mat_cols_out_full_n = ap_const_logic_0) or (bayer_mat_rows_out_full_n = ap_const_logic_0) or (bayer_mat_cols_empty_n = ap_const_logic_0) or (bayer_mat_rows_empty_n = ap_const_logic_0) or (real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_rows_out_write <= ap_const_logic_1;
else
bayer_mat_rows_out_write <= ap_const_logic_0;
end if;
end process;
bayer_mat_rows_read_assign_proc : process(real_start, ap_done_reg, ap_CS_fsm_state1, bayer_mat_rows_empty_n, bayer_mat_cols_empty_n, bayer_mat_rows_out_full_n, bayer_mat_cols_out_full_n)
begin
if ((not(((bayer_mat_cols_out_full_n = ap_const_logic_0) or (bayer_mat_rows_out_full_n = ap_const_logic_0) or (bayer_mat_cols_empty_n = ap_const_logic_0) or (bayer_mat_rows_empty_n = ap_const_logic_0) or (real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
bayer_mat_rows_read <= ap_const_logic_1;
else
bayer_mat_rows_read <= ap_const_logic_0;
end if;
end process;
i_fu_316_p2 <= std_logic_vector(unsigned(i_0_i_reg_167) + unsigned(ap_const_lv16_1));
icmp_ln77_fu_311_p2 <= "1" when (i_0_i_reg_167 = bayer_mat_rows_read_reg_347) else "0";
icmp_ln83_fu_322_p2 <= "1" when (j_0_i_reg_212 = tmp_reg_377) else "0";
internal_ap_ready_assign_proc : process(icmp_ln77_fu_311_p2, ap_CS_fsm_state4)
begin
if (((ap_const_logic_1 = ap_CS_fsm_state4) and (icmp_ln77_fu_311_p2 = ap_const_lv1_1))) then
internal_ap_ready <= ap_const_logic_1;
else
internal_ap_ready <= ap_const_logic_0;
end if;
end process;
j_fu_327_p2 <= std_logic_vector(unsigned(j_0_i_reg_212) + unsigned(ap_const_lv14_1));
or_ln90_fu_336_p2 <= (start_1_i_fu_90 or ap_phi_mux_last_0_i_phi_fu_204_p4);
real_start_assign_proc : process(ap_start, start_full_n, start_once_reg)
begin
if (((start_once_reg = ap_const_logic_0) and (start_full_n = ap_const_logic_0))) then
real_start <= ap_const_logic_0;
else
real_start <= ap_start;
end if;
end process;
s_axis_video_TDATA_blk_n_assign_proc : process(s_axis_video_TVALID, ap_CS_fsm_state2, ap_CS_fsm_pp1_stage0, ap_enable_reg_pp1_iter0, ap_block_pp1_stage0, icmp_ln83_fu_322_p2, or_ln90_fu_336_p2, ap_CS_fsm_state8, last_1_i_reg_273)
begin
if (((ap_const_logic_1 = ap_CS_fsm_state2) or ((or_ln90_fu_336_p2 = ap_const_lv1_0) and (icmp_ln83_fu_322_p2 = ap_const_lv1_0) and (ap_const_boolean_0 = ap_block_pp1_stage0) and (ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0)) or ((last_1_i_reg_273 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state8)))) then
s_axis_video_TDATA_blk_n <= s_axis_video_TVALID;
else
s_axis_video_TDATA_blk_n <= ap_const_logic_1;
end if;
end process;
s_axis_video_TREADY_assign_proc : process(s_axis_video_TVALID, ap_CS_fsm_state2, ap_CS_fsm_pp1_stage0, ap_enable_reg_pp1_iter0, ap_CS_fsm_state8, ap_predicate_op63_read_state5, ap_block_pp1_stage0_11001, last_1_i_reg_273)
begin
if ((((ap_enable_reg_pp1_iter0 = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_pp1_stage0) and (ap_predicate_op63_read_state5 = ap_const_boolean_1) and (ap_const_boolean_0 = ap_block_pp1_stage0_11001)) or ((s_axis_video_TVALID = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state2)) or (not(((last_1_i_reg_273 = ap_const_lv1_0) and (s_axis_video_TVALID = ap_const_logic_0))) and (last_1_i_reg_273 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state8)))) then
s_axis_video_TREADY <= ap_const_logic_1;
else
s_axis_video_TREADY <= ap_const_logic_0;
end if;
end process;
start_out <= real_start;
start_write_assign_proc : process(real_start, start_once_reg)
begin
if (((start_once_reg = ap_const_logic_0) and (real_start = ap_const_logic_1))) then
start_write <= ap_const_logic_1;
else
start_write <= ap_const_logic_0;
end if;
end process;
tmp_user_V_fu_293_p1 <= s_axis_video_TUSER;
end behav;
| VHDL | 3 | hito0512/Vitis-AI | Whole-App-Acceleration/apps/resnet50/build_flow/DPUCVDX8G_vck190/vck190_platform/hw/source/ip/isppipeline_accel/hdl/vhdl/AXIVideo2BayerMat.vhd | [
"Apache-2.0"
] |
--TEST--
SPL: Bug#45614 (ArrayIterator can show 1st private prop of wrapped object)
--FILE--
<?php
class C {
private $priv1 = 'secret1';
private $priv2 = 'secret2';
public $pub1 = 'public1';
public $pub2 = 'public2';
public $pub3 = 'public3';
public $pub4 = 'public4';
}
function showFirstTwoItems($it) {
echo str_replace("\0", '\0', $it->key()) . " => " . $it->current() .
"\n";
$it->next();
echo str_replace("\0", '\0', $it->key()) . " => " . $it->current() .
"\n";
}
$ao = new ArrayObject(new C);
$ai = $ao->getIterator();
echo "--> Show the first two items:\n";
showFirstTwoItems($ai);
echo "\n--> Rewind and show the first two items:\n";
$ai->rewind();
showFirstTwoItems($ai);
echo "\n--> Invalidate current position and show the first two items:\n";
unset($ai[$ai->key()]);
$ai->current();
showFirstTwoItems($ai);
echo "\n--> Rewind, seek and show the first two items:\n";
$ai->rewind();
$ai->seek(0);
showFirstTwoItems($ai);
?>
--EXPECT--
--> Show the first two items:
pub1 => public1
pub2 => public2
--> Rewind and show the first two items:
pub1 => public1
pub2 => public2
--> Invalidate current position and show the first two items:
pub3 => public3
pub4 => public4
--> Rewind, seek and show the first two items:
pub1 => public1
pub3 => public3
| PHP | 4 | thiagooak/php-src | ext/spl/tests/bug45614.phpt | [
"PHP-3.01"
] |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available 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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package org.deeplearning4j.scalnet.layers.convolutional
import org.deeplearning4j.nn.conf.layers.{ Upsampling3D => JUpsampling3D }
import org.deeplearning4j.scalnet.layers.core.Layer
/**
* 3D upsampling layer
*
* @author Max Pumperla
*/
class Upsampling3D(size: List[Int], nChannels: Int = 0, nIn: Option[List[Int]] = None, override val name: String = "")
extends Upsampling(dimension = 3, size, nChannels, nIn, name)
with Layer {
if (size.length != 3) {
throw new IllegalArgumentException("Size must be length 3.")
}
override def reshapeInput(nIn: List[Int]): Upsampling3D =
new Upsampling3D(size, nChannels, Some(nIn), name)
override def compile: org.deeplearning4j.nn.conf.layers.Layer =
new JUpsampling3D.Builder()
.size(size.toArray)
.name(name)
.build()
}
object Upsampling3D {
def apply(size: List[Int], nChannels: Int = 0, nIn: Option[List[Int]] = None): Upsampling3D =
new Upsampling3D(size, nChannels, nIn)
}
| Scala | 5 | rghwer/testdocs | scalnet/src/main/scala/org/deeplearning4j/scalnet/layers/convolutional/Upsampling3D.scala | [
"Apache-2.0"
] |
Feature: Explain and Profile
Background:
Given a graph with space named "nba"
Scenario Outline: Different format
When executing query:
"""
<explain> FORMAT="<format>" YIELD 1
"""
Then the execution should be successful
When executing query:
"""
<explain> FORMAT="<format>" {
$var=YIELD 1 AS a;
YIELD $var.*;
}
"""
Then the execution should be successful
When executing query:
"""
<explain> FORMAT="<format>" {
YIELD 1 AS a;
}
"""
Then the execution should be successful
Examples:
| explain | format |
| EXPLAIN | row |
| EXPLAIN | dot |
| EXPLAIN | dot:struct |
| PROFILE | row |
| PROFILE | dot |
| PROFILE | dot:struct |
Scenario Outline: Error format
When executing query:
"""
<explain> FORMAT="unknown" YIELD 1
"""
Then a SyntaxError should be raised at runtime.
When executing query:
"""
<explain> FORMAT="unknown" {
$var=YIELD 1 AS a;
YIELD $var.*;
}
"""
Then a SyntaxError should be raised at runtime.
When executing query:
"""
<explain> FORMAT="unknown" {
YIELD 1 AS a;
}
"""
Then a SyntaxError should be raised at runtime.
When executing query:
"""
<explain> EXPLAIN YIELD 1
"""
Then a SyntaxError should be raised at runtime.
When executing query:
"""
<explain> PROFILE YIELD 1
"""
Then a SyntaxError should be raised at runtime.
Examples:
| explain |
| EXPLAIN |
| PROFILE |
| Cucumber | 3 | liuqian1990/nebula | tests/tck/features/explain/ExplainAndProfile.feature | [
"Apache-2.0"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.