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
sequencelengths
1
8
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M512 199.652c0 23.625-20.65 43.826-44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z"/></svg>
SVG
2
ThiagoMendes92/ImersaoReact-Alura
aluracord/node_modules/@fortawesome/fontawesome-free/svgs/solid/hand-point-right.svg
[ "MIT" ]
PREFIX : <http://people.example/> SELECT ?y (MIN(?name) as ?minName) WHERE { :alice :knows ?y . ?y :name ?name . } GROUP BY ?y
SPARQL
4
gromgull/rdflib
test/DAWG/rdflib/subqueryagg1.rq
[ "BSD-3-Clause" ]
REBOL [ title: "REBOL 3 codec for ICO files" name: 'codec-ico author: rights: "Oldes" version: 0.0.1 history: [6-Mar-2021 "Oldes" {Initial version}] ] system/options/log/ico: 2 register-codec [ name: 'ico type: 'image title: "Windows icon or cursor file" suffixes: [%.ico %.cur] decode: function [ {Extract content of the ICO file} data [binary! file! url!] ][ unless binary? data [ data: read data ] sys/log/info 'ICO ["^[[1;32mDecode ICO data^[[m (^[[1m" length? data "^[[mbytes )"] bin: binary data ;- ICONDIR: binary/read bin [ tmp: UI16LE type: UI16LE num: UI16LE ] unless all [tmp = 0 any [type = 1 type = 2] ] [return none] icons: copy [] repeat n num [ binary/read bin [ width: UI8 height: UI8 colors: UI8 UI8 planes: UI16LE bpp: UI16LE size: UI32LE ofs: UI32LE ] binary/read bin [ pos: INDEX ATz :ofs data: BYTES :size AT :pos ] if width = 0 [width: 256] if height = 0 [height: 256] sys/log/more 'ICO ["Image^[[1;33m" n "^[[0;36mbpp:^[[33m" bpp "^[[36mcolors:^[[33m" colors "^[[36msize:^[[33m" as-pair width height] append/only icons reduce [width bpp data] ] icons ] encode: function [ data [block!] ][ out: binary 30000 images: copy [] parse data [ some [ set file: file! ( bin: read/binary file if size: codecs/png/size? bin [ append/only images reduce ['png to integer! size/1 32 bin] ] ) ] ] imgs: length? images offset: 6 + (imgs * 16) img-data: clear #{} binary/write out [UI16LE 0 UI16LE 1 UI16LE :imgs] forall images [ set [type: size: bpp: bin:] images/1 bytes: length? bin if size = 256 [size: 0] binary/write out [ UI8 :size UI8 :size UI16LE 0 ;colors UI16LE 0 ;planes UI16LE :bpp UI32LE :bytes UI32LE :offset ] append img-data bin offset: offset + length? bin ] binary/write out img-data copy out/buffer ] identify: function [data [binary!]][ parse data [#{0000} [#{0100} | #{0200}] to end] ;.ico or .cur ] ]
Rebol
5
semarie/rebol3-oldes
src/mezz/codec-ico.reb
[ "Apache-2.0" ]
<ng-form class="form-horizontal environment-variables-panel" name="$ctrl.envVarsForm"> <div class="form-group"> <div class="col-sm-12 form-section-title" style="margin-top: 10px; margin-left: 15px; width: 98%;"> Environment variables </div> <div class="col-sm-12 environment-variables-panel--explanation"> {{::$ctrl.explanation}} </div> <environment-variables-simple-mode ng-if="$ctrl.mode == 'simple'" ng-model="$ctrl.ngModel" on-change="($ctrl.handleSimpleChange)" on-switch-mode-click="($ctrl.switchEnvMode)" ></environment-variables-simple-mode> <div ng-if="$ctrl.mode == 'advanced'" class="environment-variables-panel--advanced"> <div class="col-sm-12"> <a class="small interactive" ng-click="$ctrl.switchEnvMode()"> <i class="fa fa-list-ol space-right" aria-hidden="true"></i> Simple mode </a> </div> <div class="col-sm-12 small text-muted"> <i class="fa fa-info-circle blue-icon space-right" aria-hidden="true"></i> Switch to simple mode to define variables line by line, or load from .env file </div> <div class="form-group" style="margin-left: 1px;"> <code-editor identifier="environment-variables-editor" placeholder="e.g. key=value" value="$ctrl.editorText" yml="false" on-change="($ctrl.editorUpdate)"></code-editor> </div> </div> </div> </ng-form>
HTML
3
GizMan/portainer
app/portainer/components/environment-variables-panel/environment-variables-panel.html
[ "Zlib" ]
option parser = require '../../lib/optionParser' should = require 'chai'.should() describe 'option parser' describe 'long options' it 'parses a boolean option written fully, like --option' args = ['--option'] cli = option parser.create parser () cli.option '--option this is an option' options = cli.parse (args) (options).option.should.equal (true) it 'long options with hyphens are accessed with camel-case' args = ['--big-name'] cli = option parser.create parser () cli.option '--big-name this is an option' options = cli.parse (args) (options).big name.should.equal (true) it 'parses a boolean option written fully, like --option, even when short is defined' args = ['--option', 'filename'] cli = option parser.create parser () cli.option '-o, --option this is an option' options = cli.parse (args) (options).option.should.equal (true) describe 'short options' it 'parses a boolean option written short, like -o' args = ['-o', 'filename'] cli = option parser.create parser () cli.option '-o, --option this is an option' options = cli.parse (args) (options).option.should.equal (true) it 'parses several boolean options written short, like -of' args = ['-of', 'filename'] cli = option parser.create parser () cli.option '-o, --option this is an option' cli.option '-f, --filename this is the filename' options = cli.parse (args) (options).option.should.equal (true) (options).filename.should.equal (true) it 'throws error if option given that was not defined' args = ['-f', 'filename'] cli = option parser.create parser () cli.option '-o, --option this is an option' @{ cli.parse (args) }.should.throw 'no such option -f' describe 'remaining, non-option arguments' it "only parses options up to the first non option, no further. this is so we can pass the remaining options to the script which is the first non-option argument" args = ['-f', 'filename', '--option'] cli = option parser.create parser () cli.option '-o, --option this is an option' cli.option '-f, --filename this is the filename' options = cli.parse (args) (options).filename.should.equal (true) (options).option.should.equal (false) it 'lists the remaining arguments in _' args = ['-f', 'filename', '--option'] cli = option parser.create parser () cli.option '-o, --option this is an option' cli.option '-f, --filename this is the filename' options = cli.parse (args) options._.should.eql ['filename', '--option'] it '_ is empty if there are no further arguments' args = ['-f'] cli = option parser.create parser () cli.option '-f, --filename this is the filename' options = cli.parse (args) options._.should.eql [] describe 'string arguments' it 'parses the argument following the short option' args = ['-v', 'thing'] cli = option parser.create parser () cli.option '-v, --value=<something> this is a value' options = cli.parse (args) options.value.should.eql 'thing' options._.should.eql [] it 'parses the argument following the long option' args = ['--value', 'thing'] cli = option parser.create parser () cli.option '-v, --value=<something> this is a value' options = cli.parse (args) options.value.should.eql 'thing' options._.should.eql [] it 'parses the argument following the long option and leaves the remaining arguments to _' args = ['--value', 'thing', 'filename'] cli = option parser.create parser () cli.option '-v, --value=<something> this is a value' options = cli.parse (args) options.value.should.eql 'thing' options._.should.eql ['filename'] it 'returns nil if not specified' args = ['filename'] cli = option parser.create parser () cli.option '-v, --value=<something> this is a value' options = cli.parse (args) should.not.exist (options.value) options._.should.eql ['filename']
PogoScript
4
featurist/pogoscript
test/shell/optionParserSpec.pogo
[ "BSD-2-Clause" ]
# @base without URI. @base .
Turtle
0
joshrose/audacity
lib-src/lv2/serd/tests/TurtleTests/turtle-syntax-bad-base-01.ttl
[ "CC-BY-3.0" ]
#error This is used exclusively for generating the documentation (not a real header) //! \namespace torch::jit::fuser //! \brief Main PyTorch JIT Fuser namespace //! \namespace torch::jit::fuser::cuda //! \brief CUDA specific components //! \namespace torch::jit::fuser::cuda::executor_utils //! \brief Fuser executor related utilities //! \namespace torch::jit::fuser::kir //! \brief Kernel IR //! \namespace torch::jit::fuser::ir_utils //! \brief IR manipulation utilities //! \namespace torch::jit::fuser::loop_utils //! \brief Loop utilities //! \namespace torch::jit::fuser::scope_utils //! \brief Scope utilities
C
4
Hacky-DH/pytorch
torch/csrc/jit/codegen/cuda/docs/documentation.h
[ "Intel" ]
#!/usr/bin/env bats SCRIPT_NAME="build-lib.sh" SCRIPT="$BATS_TEST_DIRNAME/../../ci/build/$SCRIPT_NAME" source "$SCRIPT" @test "get_nfpm_arch should return armhfp for rpm on armv7l" { run get_nfpm_arch rpm armv7l [ "$output" = "armhfp" ] } @test "get_nfpm_arch should return armhf for deb on armv7l" { run get_nfpm_arch deb armv7l [ "$output" = "armhf" ] } @test "get_nfpm_arch should return arch if no arch override exists " { run get_nfpm_arch deb i386 [ "$output" = "i386" ] }
Shell
4
mia-cx/code-server-npm
test/scripts/build-lib.bats
[ "MIT" ]
[Exposed=Window, HTMLConstructor] interface HTMLBaseElement : HTMLElement { [CEReactions] attribute USVString href; [CEReactions, Reflect] attribute DOMString target; };
WebIDL
3
corsarstl/Learn-Vue-2
vue-testing/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement.webidl
[ "MIT" ]
// GENERATED CODE - DO NOT MODIFY BY HAND part of 'enum_converters.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** _SerializedEnums _$SerializedEnumsFromJson(Map json) => _SerializedEnums() ..response = $enumDecode(_$SKPaymentTransactionStateWrapperEnumMap, json['response']) ..unit = $enumDecode(_$SKSubscriptionPeriodUnitEnumMap, json['unit']) ..discountPaymentMode = $enumDecode( _$SKProductDiscountPaymentModeEnumMap, json['discountPaymentMode']); const _$SKPaymentTransactionStateWrapperEnumMap = { SKPaymentTransactionStateWrapper.purchasing: 0, SKPaymentTransactionStateWrapper.purchased: 1, SKPaymentTransactionStateWrapper.failed: 2, SKPaymentTransactionStateWrapper.restored: 3, SKPaymentTransactionStateWrapper.deferred: 4, SKPaymentTransactionStateWrapper.unspecified: -1, }; const _$SKSubscriptionPeriodUnitEnumMap = { SKSubscriptionPeriodUnit.day: 0, SKSubscriptionPeriodUnit.week: 1, SKSubscriptionPeriodUnit.month: 2, SKSubscriptionPeriodUnit.year: 3, }; const _$SKProductDiscountPaymentModeEnumMap = { SKProductDiscountPaymentMode.payAsYouGo: 0, SKProductDiscountPaymentMode.payUpFront: 1, SKProductDiscountPaymentMode.freeTrail: 2, SKProductDiscountPaymentMode.unspecified: -1, };
Dart
2
coral-labs/plugins
packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_wrappers/enum_converters.g.dart
[ "BSD-3-Clause" ]
#!/bin/bash set -e yarn run build && NODE_PATH="build/" node build/cli-integration-tests.js
Shell
2
asahiocean/joplin
packages/app-cli/cli-integration.sh
[ "MIT" ]
<?xml version="1.0" encoding="utf-8"?> <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <Platform Condition="'$(Platform)' == ''">x64</Platform> <PlatformTarget>x64</PlatformTarget> <Platforms>x64</Platforms> <OutputType>Exe</OutputType> <StartupObject>Microsoft.CodeAnalysis.VisualBasic.Internal.VBSyntaxGenerator.Program</StartupObject> <RootNamespace>Microsoft.CodeAnalysis.VisualBasic.Internal.VBSyntaxGenerator</RootNamespace> <AssemblyName>VBSyntaxGenerator</AssemblyName> <OptionStrict>Off</OptionStrict> <AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects> <TargetFramework>net6.0</TargetFramework> <IsShipping>false</IsShipping> </PropertyGroup> <ItemGroup> <Compile Include="..\..\..\..\..\Compilers\VisualBasic\Portable\Declarations\DeclarationModifiers.vb" Link="Grammar\DeclarationModifiers.vb" /> <Compile Include="..\..\..\..\..\Compilers\VisualBasic\Portable\Syntax\SyntaxKind.vb" Link="Grammar\SyntaxKind.vb" /> </ItemGroup> <ItemGroup> <Import Include="System.Collections.ObjectModel" /> <Import Include="System.Xml.Linq" /> </ItemGroup> <ItemGroup> <Content Include="..\..\..\..\..\Compilers\VisualBasic\Portable\Syntax\Syntax.xml"> <Link>XML\Syntax.xml</Link> </Content> </ItemGroup> <ItemGroup> <EmbeddedResource Include="VBSyntaxModelSchema.xsd"> <LogicalName>VBSyntaxModelSchema.xsd</LogicalName> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\Compilers\VisualBasic\Portable\Generated\VisualBasic.Grammar.g4" Link="Grammar\VisualBasic.Grammar.g4" /> </ItemGroup> </Project>
XML
3
frandesc/roslyn
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj
[ "MIT" ]
CREATE TABLE `Cart` ( `cart_id` int(11) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`cart_id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; CREATE TABLE `Items` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `cart_id` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `cart_id` (`cart_id`), CONSTRAINT `items_ibfk_1` FOREIGN KEY (`cart_id`) REFERENCES `Cart` (`cart_id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
SQL
4
zeesh49/tutorials
spring-hibernate4/src/main/resources/one_to_many.sql
[ "MIT" ]
<%= "☒" -%>
HTML+ERB
0
mdesantis/rails
actiontext/app/views/action_text/attachables/_missing_attachable.html.erb
[ "MIT" ]
/* * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * https://www.openssl.org/source/license.html * or in the file LICENSE in the source distribution. */ #include <openssl/core_names.h> #include <openssl/rand.h> #include <openssl/provider.h> #include "fuzzer.h" static OSSL_FUNC_rand_newctx_fn fuzz_rand_newctx; static OSSL_FUNC_rand_freectx_fn fuzz_rand_freectx; static OSSL_FUNC_rand_instantiate_fn fuzz_rand_instantiate; static OSSL_FUNC_rand_uninstantiate_fn fuzz_rand_uninstantiate; static OSSL_FUNC_rand_generate_fn fuzz_rand_generate; static OSSL_FUNC_rand_gettable_ctx_params_fn fuzz_rand_gettable_ctx_params; static OSSL_FUNC_rand_get_ctx_params_fn fuzz_rand_get_ctx_params; static OSSL_FUNC_rand_enable_locking_fn fuzz_rand_enable_locking; static void *fuzz_rand_newctx( void *provctx, void *parent, const OSSL_DISPATCH *parent_dispatch) { int *st = OPENSSL_malloc(sizeof(*st)); if (st != NULL) *st = EVP_RAND_STATE_UNINITIALISED; return st; } static void fuzz_rand_freectx(ossl_unused void *vrng) { OPENSSL_free(vrng); } static int fuzz_rand_instantiate(ossl_unused void *vrng, ossl_unused unsigned int strength, ossl_unused int prediction_resistance, ossl_unused const unsigned char *pstr, ossl_unused size_t pstr_len, ossl_unused const OSSL_PARAM params[]) { *(int *)vrng = EVP_RAND_STATE_READY; return 1; } static int fuzz_rand_uninstantiate(ossl_unused void *vrng) { *(int *)vrng = EVP_RAND_STATE_UNINITIALISED; return 1; } static int fuzz_rand_generate(ossl_unused void *vdrbg, unsigned char *out, size_t outlen, ossl_unused unsigned int strength, ossl_unused int prediction_resistance, ossl_unused const unsigned char *adin, ossl_unused size_t adinlen) { unsigned char val = 1; size_t i; for (i = 0; i < outlen; i++) out[i] = val++; return 1; } static int fuzz_rand_enable_locking(ossl_unused void *vrng) { return 1; } static int fuzz_rand_get_ctx_params(void *vrng, OSSL_PARAM params[]) { OSSL_PARAM *p; p = OSSL_PARAM_locate(params, OSSL_RAND_PARAM_STATE); if (p != NULL && !OSSL_PARAM_set_int(p, *(int *)vrng)) return 0; p = OSSL_PARAM_locate(params, OSSL_RAND_PARAM_STRENGTH); if (p != NULL && !OSSL_PARAM_set_int(p, 500)) return 0; p = OSSL_PARAM_locate(params, OSSL_RAND_PARAM_MAX_REQUEST); if (p != NULL && !OSSL_PARAM_set_size_t(p, INT_MAX)) return 0; return 1; } static const OSSL_PARAM *fuzz_rand_gettable_ctx_params(ossl_unused void *vrng, ossl_unused void *provctx) { static const OSSL_PARAM known_gettable_ctx_params[] = { OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL), OSSL_PARAM_uint(OSSL_RAND_PARAM_STRENGTH, NULL), OSSL_PARAM_size_t(OSSL_RAND_PARAM_MAX_REQUEST, NULL), OSSL_PARAM_END }; return known_gettable_ctx_params; } static const OSSL_DISPATCH fuzz_rand_functions[] = { { OSSL_FUNC_RAND_NEWCTX, (void (*)(void))fuzz_rand_newctx }, { OSSL_FUNC_RAND_FREECTX, (void (*)(void))fuzz_rand_freectx }, { OSSL_FUNC_RAND_INSTANTIATE, (void (*)(void))fuzz_rand_instantiate }, { OSSL_FUNC_RAND_UNINSTANTIATE, (void (*)(void))fuzz_rand_uninstantiate }, { OSSL_FUNC_RAND_GENERATE, (void (*)(void))fuzz_rand_generate }, { OSSL_FUNC_RAND_ENABLE_LOCKING, (void (*)(void))fuzz_rand_enable_locking }, { OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS, (void(*)(void))fuzz_rand_gettable_ctx_params }, { OSSL_FUNC_RAND_GET_CTX_PARAMS, (void(*)(void))fuzz_rand_get_ctx_params }, { 0, NULL } }; static const OSSL_ALGORITHM fuzz_rand_rand[] = { { "fuzz", "provider=fuzz-rand", fuzz_rand_functions }, { NULL, NULL, NULL } }; static const OSSL_ALGORITHM *fuzz_rand_query(void *provctx, int operation_id, int *no_cache) { *no_cache = 0; switch (operation_id) { case OSSL_OP_RAND: return fuzz_rand_rand; } return NULL; } /* Functions we provide to the core */ static const OSSL_DISPATCH fuzz_rand_method[] = { { OSSL_FUNC_PROVIDER_TEARDOWN, (void (*)(void))OSSL_LIB_CTX_free }, { OSSL_FUNC_PROVIDER_QUERY_OPERATION, (void (*)(void))fuzz_rand_query }, { 0, NULL } }; static int fuzz_rand_provider_init(const OSSL_CORE_HANDLE *handle, const OSSL_DISPATCH *in, const OSSL_DISPATCH **out, void **provctx) { *provctx = OSSL_LIB_CTX_new(); *out = fuzz_rand_method; return 1; } static OSSL_PROVIDER *r_prov; void FuzzerSetRand(void) { if (!OSSL_PROVIDER_add_builtin(NULL, "fuzz-rand", fuzz_rand_provider_init) || !RAND_set_DRBG_type(NULL, "fuzz", NULL, NULL, NULL) || (r_prov = OSSL_PROVIDER_try_load(NULL, "fuzz-rand", 1)) == NULL) exit(1); } void FuzzerClearRand(void) { OSSL_PROVIDER_unload(r_prov); }
C
3
pmesnier/openssl
fuzz/fuzz_rand.c
[ "Apache-2.0" ]
(* ****** ****** *) #include "share/atspre_staload.hats" #include "share/atspre_staload_libats_ML.hats" (* ****** ****** *) #include "$PATSHOMELOCS\ /atscntrb-hx-libjson-c/mylibies.hats" #include "$PATSHOMELOCS\ /atscntrb-hx-libjson-c/mylibies_link.hats" #staload $JSON_ML (* ****** ****** *) #staload UN = "prelude/SATS/unsafe.sats" #staload STDLIB = "libats/libc/SATS/stdlib.sats" #staload UNISTD = "libats/libc/SATS/unistd.sats" (* ****** ****** *) abstype channel_type = ptr typedef channel = channel_type (* ****** ****** *) // extern fun{} linenum_get(string): int // implement {}(*tmp*) linenum_get (line) = $STDLIB.atoi(line) // (* ****** ****** *) // // HX-2018-01-16: // [channel_readall] // returns a representation of // a JSON-array of JSON-strings // extern fun{} channel_readall (ch: channel): Option_vt(string) // (* ****** ****** *) // extern fun{} channel_readall_pause(channel): void // implement {}(*tmp*) channel_readall_pause (ch) = ignoret($UNISTD.usleep(1000000)) // (* ****** ****** *) // extern fun{} streamize_channel (ch: channel): stream_vt(string) extern fun{} streamize_channel_gte (ch: channel, n0: int): stream_vt(string) // (* ****** ****** *) // implement {}(*tmp*) streamize_channel (ch) = ( streamize_channel_gte<>(ch, 0(*n0*)) ) // (* ****** ****** *) implement {}(*tmp*) streamize_channel_gte (ch, n0) = auxjoin(0) where { // fun auxone (n0: int): List0_vt(string) = let // val opt = channel_readall<>(ch) // in // case+ opt of | ~None_vt() => list_vt_nil() | ~Some_vt(jsn) => let val jsv = jsonval_ofstring(jsn) in case+ jsv of | JSONarray(jsvs) => auxone_arr(n0, jsvs, list_vt_nil) | _ (*non-JSONarray*) => list_vt_nil() end // end of [Some_vt] // end // end of [auxone] // and auxone_arr ( n0: int , xs: jsonvalist , cs: List0_vt(string) ) : List0_vt(string) = ( case+ xs of | list_nil() => cs | list_cons(x0, xs) => let val-JSONstring(x0) = x0 val i0 = linenum_get<>(x0) in if i0 <= n0 then (cs) else auxone_arr(n0, xs, list_vt_cons(x0, cs)) end // end of [list_cons] ) (* end of [auxone_arr] *) // fun auxjoin ( n0: int ) : stream_vt(string) = $ldelay(auxjoin_con(n0)) // and auxjoin_con ( n0: int ) : stream_vt_con(string) = let val xs = auxone(n0) in // case+ xs of | ~list_vt_nil () => auxjoin_con(n0) where { val () = channel_readall_pause<>(ch) } | ~list_vt_cons (x0, xs) => stream_vt_cons(x0, auxjoin_lst(x0, xs)) // end // end of [auxjoin_con] // and auxjoin_lst ( x0: string , xs: List0_vt(string) ) : stream_vt(string) = $ldelay ( ( case+ xs of | ~list_vt_nil () => ! (auxjoin($STDLIB.atoi(x0))) | ~list_vt_cons (x1, xs) => stream_vt_cons(x1, auxjoin_lst(x1, xs)) ), (list_vt_free(xs)) ) // } (* end of [streamize_channel_gte] *) (* ****** ****** *) (* end of [Hangman3_channel.dats] *)
ATS
4
ats-lang/ATS-CodeBook
RECIPE/Hangman3/Hangman3_channel.dats
[ "MIT" ]
exports.wrapRootElement = require(`./inject-provider`)
JavaScript
1
cwlsn/gatsby
examples/using-multiple-providers/plugins/gatsby-plugin-redux/gatsby-ssr.js
[ "MIT" ]
// Copyright 2020, the Flutter project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. import 'package:cloud_firestore/cloud_firestore.dart'; import 'api.dart'; class FirebaseDashboardApi implements DashboardApi { @override final EntryApi entries; @override final CategoryApi categories; FirebaseDashboardApi(FirebaseFirestore firestore, String userId) : entries = FirebaseEntryApi(firestore, userId), categories = FirebaseCategoryApi(firestore, userId); } class FirebaseEntryApi implements EntryApi { final FirebaseFirestore firestore; final String userId; final CollectionReference<Map<String, dynamic>> _categoriesRef; FirebaseEntryApi(this.firestore, this.userId) : _categoriesRef = firestore.collection('users/$userId/categories'); @override Stream<List<Entry>> subscribe(String categoryId) { var snapshots = _categoriesRef.doc(categoryId).collection('entries').snapshots(); var result = snapshots.map<List<Entry>>((querySnapshot) { return querySnapshot.docs.map<Entry>((snapshot) { return Entry.fromJson(snapshot.data())..id = snapshot.id; }).toList(); }); return result; } @override Future<Entry> delete(String categoryId, String id) async { var document = _categoriesRef.doc('$categoryId/entries/$id'); var entry = await get(categoryId, document.id); await document.delete(); return entry; } @override Future<Entry> insert(String categoryId, Entry entry) async { var document = await _categoriesRef .doc(categoryId) .collection('entries') .add(entry.toJson()); return await get(categoryId, document.id); } @override Future<List<Entry>> list(String categoryId) async { var entriesRef = _categoriesRef.doc(categoryId).collection('entries'); var querySnapshot = await entriesRef.get(); var entries = querySnapshot.docs .map((doc) => Entry.fromJson(doc.data())..id = doc.id) .toList(); return entries; } @override Future<Entry> update(String categoryId, String id, Entry entry) async { var document = _categoriesRef.doc('$categoryId/entries/$id'); await document.update(entry.toJson()); var snapshot = await document.get(); return Entry.fromJson(snapshot.data()!)..id = snapshot.id; } @override Future<Entry> get(String categoryId, String id) async { var document = _categoriesRef.doc('$categoryId/entries/$id'); var snapshot = await document.get(); return Entry.fromJson(snapshot.data()!)..id = snapshot.id; } } class FirebaseCategoryApi implements CategoryApi { final FirebaseFirestore firestore; final String userId; final CollectionReference<Map<String, dynamic>> _categoriesRef; FirebaseCategoryApi(this.firestore, this.userId) : _categoriesRef = firestore.collection('users/$userId/categories'); @override Stream<List<Category>> subscribe() { var snapshots = _categoriesRef.snapshots(); var result = snapshots.map<List<Category>>((querySnapshot) { return querySnapshot.docs.map<Category>((snapshot) { return Category.fromJson(snapshot.data())..id = snapshot.id; }).toList(); }); return result; } @override Future<Category> delete(String id) async { var document = _categoriesRef.doc(id); var categories = await get(document.id); await document.delete(); return categories; } @override Future<Category> get(String id) async { var document = _categoriesRef.doc(id); var snapshot = await document.get(); return Category.fromJson(snapshot.data()!)..id = snapshot.id; } @override Future<Category> insert(Category category) async { var document = await _categoriesRef.add(category.toJson()); return await get(document.id); } @override Future<List<Category>> list() async { var querySnapshot = await _categoriesRef.get(); var categories = querySnapshot.docs .map((doc) => Category.fromJson(doc.data())..id = doc.id) .toList(); return categories; } @override Future<Category> update(Category category, String id) async { var document = _categoriesRef.doc(id); await document.update(category.toJson()); var snapshot = await document.get(); return Category.fromJson(snapshot.data()!)..id = snapshot.id; } }
Dart
5
10088/samples
experimental/web_dashboard/lib/src/api/firebase.dart
[ "Apache-2.0" ]
@retrofit2.internal.EverythingIsNonNull package retrofit2.converter.protobuf;
Java
0
ergent/retrofit-master
retrofit-converters/protobuf/src/main/java/retrofit2/converter/protobuf/package-info.java
[ "Apache-2.0" ]
(ns fw.test.series (:require [chai :refer [expect]] [fw.lib.series :refer [series each-series]])) (defn ^:private delay [lambda] (set-timeout lambda (* (.random Math) 100))) (suite :series (fn [] (test :basic (fn [done] (series [ (fn [next] (delay (fn [] (next)))) (fn [next] (delay (fn [] (next nil 1)))) (fn [next result] (delay (fn [] (next nil (+ result 1))))) (fn [next result] (delay (fn [] (next nil (* result 2))))) ] (fn [err result] (.to.be.equal (expect err) nil) (.to.be.deep.equal (expect result) [1 2 4]) (done))))) (test :multicall (fn [done] (series [ (fn [next] (delay (fn [] (next)))) (fn [next] (delay (fn [] (next nil 1) (next :error)))) (fn [next result] (delay (fn [] (next nil (* result 2))))) ] (fn [err result] (.to.be.equal (expect err) nil) (.to.be.deep.equal (expect result) [1 2]) (done))))) (test :error (fn [done] (series [ (fn [next] (delay (fn [] (next nil 1)))) (fn [next result] (delay (fn [] (next :error result)))) (fn [next] (delay (fn [] (next 2)))) ] (fn [err result] (.to.be.equal (expect err) :error) (.to.be.deep.equal (expect result) [1 1]) (done))))) (test :empty (fn [done] (series [] (fn [err result] (.to.be.equal (expect err) nil) (.to.be.an (expect result) :array) (.to.have.length (expect result) 0) (done))))))) (suite :eachSeries (fn [] (test :basic (fn [done] (each-series [1 2 3] (fn [item next] (delay (fn [] (next nil (* item 2))))) (fn [err result] (.to.be.equal (expect err) nil) (.to.be.an (expect result) :array) (.to.have.length (expect result) 3) (.to.include (expect result) 4) (.to.include (expect result) 6) (done))))) (test :error (fn [done] (each-series [1 2 3] (fn [item next] (delay (fn [] (next :error (* item 2))))) (fn [err result] (.to.be.equal (expect err) :error) (.to.be.an (expect result) :array) (.to.have.length (expect result) 1) (.to.include (expect result) 2) (done))))) (test :empty (fn [done] (each-series [] (fn []) (fn [err result] (.to.be.equal (expect err) nil) (.to.be.an (expect result) :array) (.to.have.length (expect result) 0) (done)))))))
wisp
5
h2non/fw
test/series.wisp
[ "MIT" ]
// run-pass // pretty-expanded FIXME #23616 trait MyTrait { fn foo(&self); } impl<A, B, C> MyTrait for fn(A, B) -> C { fn foo(&self) {} } fn bar<T: MyTrait>(t: &T) { t.foo() } fn thing(a: isize, b: isize) -> isize { a + b } fn main() { let thing: fn(isize, isize) -> isize = thing; // coerce to fn type bar(&thing); }
Rust
4
Eric-Arellano/rust
src/test/ui/issues/issue-15444.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
import { e, f, fNamed, fStar, fStarPartial, fStarPartial2 } from "./reexport"; it("should be possible to reexport json data", function() { expect(e.aa).toBe(1); expect(e.bb).toBe(2); expect(f).toEqual({ named: "named", default: "default", __esModule: true }); expect(fNamed).toBe("named"); const _fStar = fStar; expect(_fStar).toEqual( nsObj({ named: "named", default: { named: "named", default: "default", __esModule: true } }) ); expect(_fStar.__esModule).toBe(true); expect(fStarPartial.default.named).toBe("named"); expect(fStarPartial2.named).toBe("named"); });
JavaScript
3
1shenxi/webpack
test/cases/json/reexport/index.js
[ "MIT" ]
/* These are the locale-related newlib functions present in ESP32 ROM. ESP32 ROM contains newlib version 2.2.0, and these functions should not be used when compiling with newlib version 3, since locale implementation is different there. Unlike other ROM functions which are exported using PROVIDE, which declares weak symbols, newlib related functions are exported using assignment, which declares strong symbols. This is done so that ROM functions are always used instead of the ones provided by libc.a. */ __locale_charset = 0x40059540; __locale_cjk_lang = 0x40059558; localeconv = 0x4005957c; _localeconv_r = 0x40059560; __locale_mb_cur_max = 0x40059548; __locale_msgcharset = 0x40059550; setlocale = 0x40059568; _setlocale_r = 0x4005950c;
Linker Script
3
DCNick3/esp-idf
components/esp_rom/esp32/ld/esp32.rom.newlib-locale.ld
[ "Apache-2.0" ]
(define test-equal [X | Xs] [Y | Ys] -> (test-equal Xs Ys) where (or (test-equal X Y) (mk-= X Y)) [] [] -> true X Y -> (mk-= X Y) _ _ -> false) (test-check "1.10" (run* Q mk-fail) []) (test-check "1.11" (run* Q (=== true Q)) [true]) (test-check "1.12" (run* Q mk-fail (=== true Q)) []) (test-check "1.13" (run* Q mk-succeed (=== true Q)) [true]) (test-check "1.14" (run* Q mk-succeed (=== true Q)) [true]) (test-check "1.15" (run* R mk-succeed (=== corn R)) [corn]) (test-check "1.16" (run* R mk-succeed (=== corn R)) [corn]) (test-check "1.17" (run* R mk-fail (=== corn R)) []) (test-check "1.18" (run* Q mk-succeed (=== false Q)) [false]) (test-check "1.22" (run* X (let X false (=== true X))) []) (test-check "1.23" (run* Q (fresh (X) (=== true X) (=== true Q))) [true]) (test-check "1.26" (run* Q (fresh (X) (=== X true) (=== true Q))) [true]) (test-check "1.27" (run* Q (fresh (X) (=== X true) (=== Q true))) [true]) (test-check "1.28" (run* X mk-succeed) [(create-var _.0)]) (test-check "1.29" (run* X (let X false (fresh (X) (=== true X)))) [(create-var _.0)]) (test-check "1.30" (run* R (fresh (X Y) (=== [X Y] R))) [[(create-var _.0) (create-var _.1)]]) (test-check "1.31" (run* S (fresh (T U) (=== [T U] S))) [[(create-var _.0) (create-var _.1)]]) (test-check "1.32" (run* R (fresh (X) (let Y X (fresh (X) (=== [Y X Y] R))))) [[(create-var _.2) (create-var _.1) (create-var _.2)]]) (test-check "1.33" (run* R (fresh (X) (let Y X (fresh (X) (=== [X Y X] R))))) [[(create-var _.2) (create-var _.1) (create-var _.2)]]) (test-check "1.34" (run* Q (=== false Q) (=== true Q)) []) (test-check "1.35" (run* Q (=== false Q) (=== false Q)) [false]) (test-check "1.36" (run* Q (let X Q (=== true X))) [true]) (test-check "1.37" (run* R (fresh (X) (=== X R))) [(create-var _.0)]) (test-check "1.38" (run* Q (fresh (X) (=== true X) (=== X Q))) [true]) (test-check "1.39" (run* Q (fresh (X) (=== X Q) (=== true X))) [true]) (test-check "1.40.1" (run* Q (fresh (X) (=== (= X Q) Q))) [false]) (test-check "1.40.2" (run* Q (let X Q (fresh (Q) (=== (= X Q) X)))) [false]) (test-check "1.44" (run* Q (conde (mk-fail mk-succeed) (else mk-fail))) []) (define null? { (list A) --> boolean } [] -> true _ -> false) (test-check "1.45" (not (null? (run* Q (conde (mk-fail mk-fail) (else mk-succeed))))) true) (test-check "1.46" (not (null? (run* Q (conde (mk-succeed mk-succeed) (else mk-fail))))) true) (test-check "1.47" (run* X (conde ((=== olive X) mk-succeed) ((=== oil X) mk-succeed) (else mk-fail))) [olive oil]) (test-check "1.49" (run 1 X (conde ((=== olive X) mk-succeed) ((=== oil X) mk-succeed) (else mk-fail))) [olive]) (test-check "1.50.1" (run* X (conde ((=== virgin X) mk-fail) ((=== olive X) mk-succeed) (mk-succeed mk-succeed) ((=== oil X) mk-succeed) (else mk-fail))) [olive (create-var _.0) oil]) (test-check "1.50.2" (run* X (conde ((=== olive X) mk-succeed) (mk-succeed mk-succeed) ((=== oil X) mk-succeed) (else mk-fail))) [olive (create-var _.0) oil]) (test-check "1.52" (run 2 X (conde ((=== extra X) mk-succeed) ((=== virgin X) mk-fail) ((=== olive X) mk-succeed) ((=== oil X) mk-succeed) (else mk-fail))) [extra olive]) (test-check "1.53" (run* R (fresh (X Y) (=== split X) (=== pea Y) (=== [X Y] R))) [[split pea]]) (test-check "1.54" (run* R (fresh (X Y) (conde ((=== split X) (=== pea Y)) ((=== navy X) (=== bean Y)) (else mk-fail)) (=== [X Y] R))) [[split pea] [navy bean]]) (test-check "1.55" (run* R (fresh (X Y) (conde ((=== split X) (=== pea Y)) ((=== navy X) (=== bean Y)) (else mk-fail)) (=== [X Y soup] R))) [[split pea soup] [navy bean soup]]) (define teacupo { (walkable symbol) --> (query symbol) } X -> (conde ((=== tea X) mk-succeed) ((=== cup X) mk-succeed) (else mk-fail))) (test-check "1.56" (run* X (teacupo X)) [tea cup]) (test-check "1.57" (run* R (fresh (X Y) (conde ((teacupo X) (=== true Y) mk-succeed) ((=== false X) (=== true Y)) (else mk-fail)) (=== [X Y] R))) [[tea true] [cup true] [false true]]) (test-check "1.58" (run* R (fresh (X Y Z) (conde ((=== Y X) (fresh (X) (=== Z X))) ((fresh (X) (=== Y X)) (=== Z X)) (else mk-fail)) (=== [Y Z] R))) [[(create-var _.0) (create-var _.1)] [(create-var _.0) (create-var _.1)]]) (test-check "1.59" (run* R (fresh (X Y Z) (conde ((=== Y X) (fresh (X) (=== Z X))) ((fresh (X) (=== Y X)) (=== Z X)) (else mk-fail)) (=== false X) (=== [Y Z] R))) [[false (create-var _.0)] [(create-var _.0) false]]) (test-check "1.60" (run* Q (let A (=== true Q) B (=== false Q) B)) [false]) (test-check "1.61" (run* Q (let A (=== true Q) B (fresh (X) (=== X Q) (=== false X)) C (conde ((=== true Q) mk-succeed) (else (=== false Q))) B)) [false]) (test-check "2.2" (run* R (fresh (X Y) (=== [X Y] R))) [[(create-var _.0) (create-var _.1)]]) (test-check "2.3" (run* R (fresh (V W) (=== (let X V Y W [X Y]) R))) [[(create-var _.0) (create-var _.1)]]) \* 2.9 *\ (define caro { (walkable A) --> (walkable A) --> (query A) } P H -> (fresh (T) (=== [H | T] P))) (test-check "2.6" (run* R (caro [a c o r n] R)) [a]) (test-check "2.7" (run* Q (caro [a c o r n] a) (=== true Q)) [true]) (test-check "2.8" (run* R (fresh (X Y) (caro [R Y] X) (=== [pear] X))) [[pear]]) (test-check "2.11" (run* R (fresh (X Y) (caro [grape raisin pair] X) (caro [[a] [b] [c]] Y) (=== [X | Y] R))) [[grape a]]) \* 2.16 *\ (define cdro { (walkable A) --> (walkable A) --> (query A) } P T -> (fresh (H) (=== [H | T] P))) (test-check "2.15" (run* R (fresh (V) (cdro [a c o r n] V) (caro V R))) [c]) (test-check "2.18" (run* R (fresh (X Y) (cdro [grape raisin pear] X) (caro [[a] [b] [c]] Y) (=== [X | Y] R))) [[[raisin pear] a]]) (test-check "2.19.1" (run* Q (cdro [a c o r n] [c o r n]) (=== true Q)) [true]) (test-check "2.20.1" (run* X (cdro [c o r n] [X r n])) [o]) (test-check "2.21" (run* L (fresh (X) (cdro L [c o r n]) (caro L X) (=== a X))) [[a c o r n]]) (define conso { (walkable A) --> (walkable A) --> (walkable A) --> (query A) } H T P -> (=== [H | T] P)) (test-check "2.22" (run* L (conso [a b c] [d e] L)) [[[a b c] d e]]) (test-check "2.23.1" (run* X (conso X [a b c] [d a b c])) [d]) (test-check "2.24" (run* R (fresh (X Y Z) (=== [e a d X] R) (conso Y [a Z c] R))) [[e a d c]]) (test-check "2.25.1" (run* X (conso X [a X c] [d a X c])) [d]) (test-check "2.26" (run* L (fresh (X) (=== [d a X c] L) (conso X [a X c] L))) [[d a d c]]) (test-check "2.27" (run* L (fresh (X) (conso X [a X c] L) (=== [d a X c] L))) [[d a d c]]) (test-check "2.29" (run* L (fresh (D X Y W S) (conso W [a n s] S) (cdro L S) (caro L X) (=== b X) (cdro L D) (caro D Y) (=== e Y))) [[b e a n s]]) (define nullo { (walkable A) --> (query A) } X -> (=== [] X)) (test-check "2.32" (run* Q (nullo [grape raisin pear]) (=== true Q)) []) (test-check "2.33" (run* Q (nullo []) (=== true Q)) [true]) (test-check "2.34" (run* X (nullo X)) [[]]) (define eqo { (walkable A) --> (walkable A) --> (query A) } X Y -> (=== X Y)) (test-check "2.38" (run* Q (eqo pear plum) (=== true Q)) []) (test-check "2.39" (run* Q (eqo plum plum) (=== true Q)) [true]) (test-check "2.52" (run* R (fresh (X Y) (=== [X Y salad] R))) [[(create-var _.0) (create-var _.1) salad]]) (define pairo { (walkable A) --> (query A) } P -> (fresh (A D) (conso A D P))) (test-check "2.54" (run* Q (pairo [Q | Q]) (=== true Q)) [true]) (test-check "2.55" (run* Q (pairo []) (=== true Q)) []) (test-check "2.56" (run* Q (pairo pair) (=== true Q)) []) (test-check "2.57" (run* X (pairo X)) [[(create-var _.0) | (create-var _.1)]]) (test-check "2.58" (run* R (pairo [R | pear])) [(create-var _.0)]) (define listo { (walkable A) --> (query A) } L -> (conde ((nullo L) mk-succeed) ((pairo L) (fresh (D) (cdro L D) (listo D))) (else mk-fail))) (test-check "3.7" (run* X (listo [a b X d])) [(create-var _.0)]) (test-check "3.10" (run 1 X (listo [a b c | X])) [[]]) (test-check "3.14" (run 5 X (listo [a b c | X])) [[] [(create-var _.0)] [(create-var _.0) (create-var _.1)] [(create-var _.0) (create-var _.1) (create-var _.2)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3)]]) (define list? [] -> true [_ | _] -> true _ -> false) \* 3.16 *\ (define lol? [] -> true [H | T] -> (lol? T) where (list? H) _ -> true) \* 3.17 *\ (define lolo { (walkable A) --> (query A) } L -> (conde ((nullo L) mk-succeed) ((fresh (A) (caro L A) (listo A)) (fresh (D) (cdro L D) (lolo D))) (else mk-fail))) (test-check "3.20" (run 1 L (lolo L)) [[]]) (test-check "3.21" (run* Q (fresh (X Y) (lolo [[a b] [X c] [d Y]]) (=== true Q))) [true]) (test-check "3.22" (run 1 Q (fresh (X) (lolo [[a b] | X]) (=== true Q))) [true]) (test-check "3.23" (run 1 X (lolo [[a b] [c d] | X])) [[]]) (test-check "3.24" (run 5 X (lolo [[a b] [c d] | X])) [[] [[]] [[] []] [[] [] []] [[] [] [] []]]) \* 3.31 *\ (define twinso { (walkable A) --> (query A) } S -> (fresh (X Y) (conso X Y S) (conso X [] Y))) (test-check "3.32" (run* Q (twinso [tofu tofu]) (=== true Q)) [true]) (test-check "3.33" (run* Z (twinso [Z tofu])) [tofu]) \* 3.36 *\ (define twinso { (walkable A) --> (query A) } S -> (fresh (X) (=== [X X] S))) \* 3.37 *\ (define loto { (walkable A) --> (query A) } L -> (conde ((nullo L) mk-succeed) ((fresh (A) (caro L A) (twinso A)) (fresh (D) (cdro L D) (loto D))) (else mk-fail))) (test-check "3.38" (run 1 Z (loto [[g g] | Z])) [[]]) (test-check "3.42" (run 5 Z (loto [[g g] | Z])) [[] [[(create-var _.1) (create-var _.1)]] [[(create-var _.1) (create-var _.1)] [(create-var _.3) (create-var _.3)]] [[(create-var _.1) (create-var _.1)] [(create-var _.3) (create-var _.3)] [(create-var _.5) (create-var _.5)]] [[(create-var _.1) (create-var _.1)] [(create-var _.3) (create-var _.3)] [(create-var _.5) (create-var _.5)] [(create-var _.7) (create-var _.7)]]]) (test-check "3.45" (run 5 R (fresh (W X Y Z) (loto [[g g] [e W] [X Y] | Z]) (=== [W [X Y] Z] R))) [[e [(create-var _.1) (create-var _.1)] []] [e [(create-var _.1) (create-var _.1)] [[(create-var _.3) (create-var _.3)]]] [e [(create-var _.1) (create-var _.1)] [[(create-var _.3) (create-var _.3)] [(create-var _.5) (create-var _.5)]]] [e [(create-var _.1) (create-var _.1)] [[(create-var _.3) (create-var _.3)] [(create-var _.5) (create-var _.5)] [(create-var _.7) (create-var _.7)]]] [e [(create-var _.1) (create-var _.1)] [[(create-var _.3) (create-var _.3)] [(create-var _.5) (create-var _.5)] [(create-var _.7) (create-var _.7)] [(create-var _.9) (create-var _.9)]]]]) (test-check "3.47" (run 3 Out (fresh (W X Y Z) (=== [[g g] [e W] [X Y] | Z] Out) (loto Out))) [[[g g] [e e] [(create-var _.1) (create-var _.1)]] [[g g] [e e] [(create-var _.1) (create-var _.1)] [(create-var _.3) (create-var _.3)]] [[g g] [e e] [(create-var _.1) (create-var _.1)] [(create-var _.3) (create-var _.3)] [(create-var _.5) (create-var _.5)]]]) \* 3.48 *\ (define listofo { ((walkable A) --> (query A)) --> (walkable A) --> (query A) } Predo L -> (conde ((nullo L) mk-succeed) ((fresh (A) (caro L A) (Predo A)) (fresh (D) (cdro L D) (listofo Predo D))) (else mk-fail))) (test-check "3.49" (run 3 Out (fresh (W X Y Z) (=== [[g g] [e W] [X Y] | Z] Out) (listofo twinso Out))) [[[g g] [e e] [(create-var _.1) (create-var _.1)]] [[g g] [e e] [(create-var _.1) (create-var _.1)] [(create-var _.3) (create-var _.3)]] [[g g] [e e] [(create-var _.1) (create-var _.1)] [(create-var _.3) (create-var _.3)] [(create-var _.5) (create-var _.5)]]]) \* 3.50 *\ (define loto { (walkable A) --> (query A) } L -> (listofo twinso L)) \* 3.51.2 *\ (define eq-car? { (list (walkable A)) --> (walkable A) --> boolean } [X | _] X -> true _ _ -> false) \* 3.54.1 *\ (define eq-caro { (walkable A) --> (walkable A) --> (query A) } L X -> (caro L X)) \* 3.54.2 *\ (define membero { (walkable A) --> (walkable A) --> (query A) } X L -> (conde ((nullo L) mk-fail) ((eq-caro L X) mk-succeed) (else (fresh (D) (cdro L D) (membero X D))))) (test-check "3.57" (run* Q (membero olive [virgin olive oil]) (=== true Q)) [true]) (test-check "3.58" (run 1 Y (membero Y [hummus with pita])) [hummus]) (test-check "3.59" (run 1 Y (membero Y [with pita])) [with]) (test-check "3.60" (run 1 Y (membero Y [pita])) [pita]) (test-check "3.61" (run* Y (membero Y [])) []) (test-check "3.62" (run* Y (membero Y [hummus with pita])) [hummus with pita]) \* 3.65 *\ (define identity { (walkable A) --> (list (walkable A)) } L -> (run* Y (membero Y L))) (test-check "3.66" (run* X (membero e [pasta X fagioli])) [e]) (test-check "3.69" (run 1 X (membero e [pasta e X fagioli])) [(create-var _.0)]) (test-check "3.70" (run 1 X (membero e [pasta X e fagioli])) [e]) (test-check "3.71" (run* R (fresh (X Y) (membero e [pasta X fagioli Y]) (=== [X Y] R))) [[e (create-var _.0)] [(create-var _.0) e]]) (test-check "3.73" (run 1 L (membero tofu L)) [[tofu | (create-var _.0)]]) (test-check "3.76" (run 5 L (membero tofu L)) [[tofu | (create-var _.0)] [(create-var _.0) tofu | (create-var _.1)] [(create-var _.0) (create-var _.1) tofu | (create-var _.2)] [(create-var _.0) (create-var _.1) (create-var _.2) tofu | (create-var _.3)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) tofu | (create-var _.4)]]) \* 3.80.1 *\ (define pmembero { (walkable A) --> (walkable A) --> (query A) } X L -> (conde ((nullo L) mk-fail) ((eq-caro L X) (cdro L [])) (else (fresh (D) (cdro L D) (pmembero X D))))) (test-check "3.80.2" (run 5 L (pmembero tofu L)) [[tofu] [(create-var _.0) tofu] [(create-var _.0) (create-var _.1) tofu] [(create-var _.0) (create-var _.1) (create-var _.2) tofu] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) tofu]]) (test-check "3.81" (run* Q (pmembero tofu [a b tofu d tofu]) (=== true Q)) [true]) \* 3.83 *\ (define pmembero { (walkable A) --> (walkable A) --> (query A) } X L -> (conde ((nullo L) mk-fail) ((eq-caro L X) (cdro L [])) ((eq-caro L X) mk-succeed) (else (fresh (D) (cdro L D) (pmembero X D))))) (test-check "3.84" (run* Q (pmembero tofu [a b tofu d tofu]) (=== true Q)) [true true true]) \* 3.86 *\ (define pmembero { (walkable A) --> (walkable A) --> (query A) } X L -> (conde ((nullo L) mk-fail) ((eq-caro L X) (cdro L [])) ((eq-caro L X) (fresh (A D) (cdro L [A | D]))) (else (fresh (D) (cdro L D) (pmembero X D))))) (test-check "3.88" (run* Q (pmembero tofu [a b tofu d tofu]) (=== true Q)) [true true]) \* 3.93 *\ (define pmembero { (walkable A) --> (walkable A) --> (query A) } X L -> (conde ((eq-caro L X) (fresh (A D) (cdro L [A | D]))) ((eq-caro L X) (cdro L [])) (else (fresh (D) (cdro L D) (pmembero X D))))) \* 3.95 *\ (define first-value { (walkable A) --> (list (walkable A)) } L -> (run 1 Y (membero Y L))) (test-check "3.96" (first-value [pasta e fagioli]) [pasta]) \* 3.98 *\ (define memberrevo { (walkable A) --> (walkable A) --> (query A) } X L -> (conde ((nullo L) mk-fail) (mk-succeed (fresh (D) (cdro L D) (memberrevo X D))) (else (eq-caro L X)))) (test-check "3.100" (run* X (memberrevo X [pasta e fagioli])) [fagioli e pasta]) \* 3.101 *\ (define reverse-list { (walkable A) --> (list (walkable A)) } L -> (run* Y (memberrevo Y L))) \* 4.1.1 *\ (define mem X [] -> false X [X | L] -> [X | L] X [_ | L] -> (mem X L)) (test-check "4.1.2" (mem tofu [a b tofu d peas e]) [tofu d peas e]) (test-check "4.3" (run* Out (=== (mem tofu [a b tofu d peas e]) Out)) [[tofu d peas e]]) \* 4.7 *\ (define memo { (walkable A) --> (walkable A) --> (walkable A) --> (query A) } X L Out -> (conde ((nullo L) mk-fail) ((eq-caro L X) (=== L Out)) (else (fresh (D) (cdro L D) (memo X D Out))))) (test-check "4.10" (run 1 Out (memo tofu [a b tofu d tofu e] Out)) [[tofu d tofu e]]) (test-check "4.11" (run 1 Out (fresh (X) (memo tofu [a b X d tofu e] Out))) [[tofu d tofu e]]) (test-check "4.12" (run* R (memo R [a b tofu d tofu e] [tofu d tofu e])) [tofu]) (test-check "4.13" (run* Q (memo tofu [tofu e] [tofu e]) (=== true Q)) [true]) (test-check "4.14" (run* Q (memo tofu [tofu e] [tofu]) (=== true Q)) []) (test-check "4.15" (run* X (memo tofu [tofu e] [X e])) [tofu]) (test-check "4.16" (run* X (memo tofu [tofu e] [peas X])) []) (test-check "4.17" (run* Out (fresh (X) (memo tofu [a b X d tofu e] Out))) [[tofu d tofu e] [tofu e]]) (test-check "4.18" (run 12 Z (fresh (U) (memo tofu [a b tofu d tofu e | Z] U))) [(create-var _.0) (create-var _.0) [tofu | (create-var _.0)] [(create-var _.0) tofu | (create-var _.1)] [(create-var _.0) (create-var _.1) tofu | (create-var _.2)] [(create-var _.0) (create-var _.1) (create-var _.2) tofu | (create-var _.3)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) tofu | (create-var _.4)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) (create-var _.4) tofu | (create-var _.5)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) (create-var _.4) (create-var _.5) tofu | (create-var _.6)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) (create-var _.4) (create-var _.5) (create-var _.6) tofu | (create-var _.7)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) (create-var _.4) (create-var _.5) (create-var _.6) (create-var _.7) tofu | (create-var _.8)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) (create-var _.4) (create-var _.5) (create-var _.6) (create-var _.7) (create-var _.8) tofu | (create-var _.9)]]) \* 4.21 *\ (define memo { (walkable A) --> (walkable A) --> (walkable A) --> (query A) } X L Out -> (conde ((eq-caro L X) (=== L Out)) (else (fresh (D) (cdro L D) (memo X D Out))))) \* 4.22 *\ (define rember { (walkable A) --> (list (walkable A)) --> (list (walkable A)) } X L -> (cases (null? L) [] (eq-car? L X) (tail L) true [(head L) | (rember X (tail L))])) (test-check "4.23" (rember peas [a b peas d peas e]) [a b d peas e]) \* 4.27 *\ (define rembero { (walkable A) --> (walkable A) --> (walkable A) --> (query A) } X L Out -> (conde ((nullo L) (=== [] Out)) ((eq-caro L X) (cdro L Out)) (else (fresh (A D Res) (conso A D L) (rembero X D Res) (conso A Res Out))))) (test-check "4.30" (run 1 Out (fresh (Y) (rembero peas [a b Y d peas e] Out))) [[a b d peas e]]) (test-check "4.31" (run* Out (fresh (Y Z) (rembero Y [a b Y d Z e] Out))) [[b a d (create-var _.0) e] [a b d (create-var _.0) e] [a b d (create-var _.0) e] [a b d (create-var _.0) e] [a b (create-var _.0) d e] [a b e d (create-var _.0)] [a b (create-var _.0) d (create-var _.1) e]]) (test-check "4.49" (run* R (fresh (Y Z) (rembero Y [Y d Z e] [Y d e]) (=== [Y Z] R))) [[d d] [d d] [(create-var _.1) (create-var _.1)] [e e]]) (test-check "4.57" (run 13 W (fresh (Y Z Out) (rembero Y [a b Y d Z | W] Out))) [(create-var _.0) (create-var _.0) (create-var _.0) (create-var _.0) (create-var _.0) [] [(create-var _.0) | (create-var _.1)] [(create-var _.0)] [(create-var _.0) (create-var _.1) | (create-var _.2)] [(create-var _.0) (create-var _.1)] [(create-var _.0) (create-var _.1) (create-var _.2) | (create-var _.3)] [(create-var _.0) (create-var _.1) (create-var _.2)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) | (create-var _.4)]]) \* 4.68 *\ (define surpriseo { (walkable symbol) --> (query symbol) } S -> (rembero S [a b c] [a b c])) (test-check "4.69" (run* R (=== d R) (surpriseo R)) [d]) (test-check "4.70" (run* R (surpriseo R)) [(create-var _.0)]) (test-check "4.72" (run* R (=== b R) (surpriseo R)) [b]) \* 5.9 *\ (define appendo { (walkable A) --> (walkable A) --> (walkable A) --> (query A) } L S Out -> (conde ((nullo L) (=== S Out)) (else (fresh (A D Res) (caro L A) (cdro L D) (appendo D S Res) (conso A Res Out))))) (test-check "5.10" (run* X (appendo [cake] [tastes yummy] X)) [[cake tastes yummy]]) (test-check "5.11" (run* X (fresh (Y) (appendo [cake with ice Y] [tastes yummy] X))) [[cake with ice (create-var _.0) tastes yummy]]) (test-check "5.12" (run* X (fresh (Y) (appendo [cake with ice cream] Y X))) [[cake with ice cream | (create-var _.0)]]) (test-check "5.13" (run 1 X (fresh (Y) (appendo [cake with ice | Y] [d t] X))) [[cake with ice d t]]) (test-check "5.14" (run 1 Y (fresh (X) (appendo [cake with ice | Y] [d t] X))) [[]]) \* 5.15 *\ (define appendo { (walkable A) --> (walkable A) --> (walkable A) --> (query A) } L S Out -> (conde ((nullo L) (=== S Out)) (else (fresh (A D Res) (conso A D L) (appendo D S Res) (conso A Res Out))))) (test-check "5.16" (run 5 X (fresh (Y) (appendo [cake with ice | Y] [d t] X))) [[cake with ice d t] [cake with ice (create-var _.0) d t] [cake with ice (create-var _.0) (create-var _.1) d t] [cake with ice (create-var _.0) (create-var _.1) (create-var _.2) d t] [cake with ice (create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3) d t]]) (test-check "5.17" (run 5 Y (fresh (X) (appendo [cake with ice | Y] [d t] X))) [[] [(create-var _.0)] [(create-var _.0) (create-var _.1)] [(create-var _.0) (create-var _.1) (create-var _.2)] [(create-var _.0) (create-var _.1) (create-var _.2) (create-var _.3)]]) (test-check "5.20" (run 5 X (fresh (Y) (appendo [cake with ice | Y] [d t | Y] X))) [[cake with ice d t] [cake with ice (create-var _.1) d t (create-var _.1)] [cake with ice (create-var _.2) (create-var _.3) d t (create-var _.2) (create-var _.3)] [cake with ice (create-var _.3) (create-var _.4) (create-var _.5) d t (create-var _.3) (create-var _.4) (create-var _.5)] [cake with ice (create-var _.4) (create-var _.5) (create-var _.6) (create-var _.7) d t (create-var _.4) (create-var _.5) (create-var _.6) (create-var _.7)]]) \* 5.59 *\ (define flatteno { (walkable A) --> (walkable A) --> (query A) } S Out -> (conde ((nullo S) (=== [] Out)) ((pairo S) (fresh (A D Res-a Res-d) (conso A D S) (flatteno A Res-a) (flatteno D Res-d) (appendo Res-a Res-d Out))) (else (conso S [] Out)))) (test-check "5.60" (run 1 X (flatteno [[a b] c] X)) [[a b c]]) (test-check "6.7" (run 1 Q (alwayso) (=== true Q)) [true]) (test-check "6.10" (run 5 Q (alwayso) (=== true Q)) [true true true true true]) (test-check "6.11" (run 5 Q (=== true Q) (alwayso)) [true true true true true]) (define salo { (query A) --> (query A) } G -> (conde (mk-succeed mk-succeed) (else G))) (test-check "6.13" (run 1 Q (salo (alwayso)) (=== true Q)) [true]) (test-check "6.14" (run 1 Q (salo (nevero)) (=== true Q)) [true]) (test-check "6.21" (run 5 Q (condi ((=== false Q) (alwayso)) (else (anyo (=== true Q)))) (=== true Q)) [true true true true true]) (test-check "6.24" (run 5 R (condi ((teacupo R) mk-succeed) ((=== false R) mk-succeed) (else mk-fail))) [tea false cup]) (test-check "6.25" (run 5 Q (condi ((=== false Q) (alwayso)) ((=== true Q) (alwayso)) (else mk-fail)) (=== true Q)) [true true true true true]) \* 7.5 *\ (define bit-xoro { (walkable number) --> (walkable number) --> (walkable number) --> (query number) } X Y R -> (conde ((=== 0 X) (=== 0 Y) (=== 0 R)) ((=== 1 X) (=== 0 Y) (=== 1 R)) ((=== 0 X) (=== 1 Y) (=== 1 R)) ((=== 1 X) (=== 1 Y) (=== 0 R)) (else mk-fail))) (test-check "7.6" (run* S (fresh (X Y) (bit-xoro X Y 0) (=== [X Y] S))) [[0 0] [1 1]]) (test-check "7.97" (run 3 S (fresh (X Y R) (addero 0 X Y R) (=== [X Y R] S))) [[(create-var _.1) [] (create-var _.1)] [[] [(create-var _.2) | (create-var _.3)] [(create-var _.2) | (create-var _.3)]] [[1] [1] [0 1]]]) (test-check "7.126" (run* S (fresh (X Y) (addero 0 X Y [1 0 1]) (=== [X Y] S))) [[[1 0 1] []] [[] [1 0 1]] [[1] [0 0 1]] [[0 0 1] [1]] [[1 1] [0 1]] [[0 1] [1 1]]]) (test-check "7.129" (run* S (fresh (X Y) (+o X Y [1 0 1]) (=== [X Y] S))) [[[1 0 1] []] [[] [1 0 1]] [[1] [0 0 1]] [[0 0 1] [1]] [[1 1] [0 1]] [[0 1] [1 1]]]) (test-check "7.131" (run* Q (-o [0 0 0 1] [1 0 1] Q)) [[1 1]]) (test-check "7.132" (run* Q (-o [0 1 1] [0 1 1] Q)) [[]]) (test-check "8.4" (run* P (*o [0 1] [0 0 1] P)) [[0 0 0 1]]) \* 8.10 *\ (define *o { (walkable number) --> (walkable number) --> (walkable number) --> (query number) } N M P -> (condi ((=== [] N) (=== [] P)) ((poso N) (=== [] M) (=== [] P)) ((=== [1] N) (poso M) (=== M P)) ((>lo N) (=== [1] M) (=== N P)) ((fresh (X Z) (=== [0 | X] N) (poso X) (=== [0 | Z] P) (poso Z) (>lo M) (*o X M Z))) ((fresh (X Y) (=== [1 | X] N) (poso X) (=== [0 | Y] M) (poso Y) (*o M N P))) ((fresh (X Y) (=== [1 | X] N) (poso X) (=== [1 | Y] M) (poso Y) (odd-*o X N M P))) (else mk-fail))) (test-check "8.20" (run 1 T (fresh (N M) (*o N M [1]) (=== [N M] T))) [[[1] [1]]]) (test-check "8.23" (run 2 T (fresh (N M) (*o N M [1]) (=== [N M] T))) [[[1] [1]]]) (test-check "8.23" (run 2 T (fresh (N M) (*o N M [1]) (=== [N M] T))) [[[1] [1]]]) (test-check "8.24" (run* P (*o [1 1 1] [1 1 1 1 1 1] P)) [[1 0 0 1 1 1 0 1 1]]) (test-check "10.14" (run* Q (condu ((alwayso) mk-succeed) (else mk-fail)) (=== true Q)) [true]) (test-check "10.18" (run 1 Q (condu ((alwayso) mk-succeed) (else mk-fail)) mk-fail (=== true Q)) []) (define onceo G -> (condu (G mk-succeed) (else mk-fail))) (test-check "10.19.2" (run* X (onceo (teacupo X))) [tea]) (test-check "10.22" (run* R (conda ((teacupo R) mk-succeed) ((=== false R) mk-succeed) (else mk-fail))) [tea cup]) (test-check "10.23" (run* R (=== false R) (conda ((teacupo R) mk-succeed) ((=== false R) mk-succeed) (else mk-fail))) [false]) (test-check "10.24" (run* R (=== false R) (condu ((teacupo R) mk-succeed) ((=== false R) mk-succeed) (else mk-fail))) [false])
Shen
5
mthom/shen-minikanren
tests.shen
[ "BSD-3-Clause" ]
import * as Header from 'foo-module' is mask; define Foo { Header; }
Mask
0
atmajs/MaskJS
test/tmpl/npm/foo.mask
[ "MIT" ]
#! /bin/sh -e # DP: - Set the libjava sublibdir to /usr/lib/gcj-4.3 # DP: - Set the default libgcj database dir to /var/lib/gcj-4.3 dir= if [ $# -eq 3 -a "$2" = '-d' ]; then pdir="-d $3" dir="$3/" elif [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0 cd ${dir}libjava && aclocal -I . -I .. -I ../config -I libltdl && autoconf ;; -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 rm -f ${dir}libjava/configure ;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 --- gcc/java/Make-lang.in.orig 2007-09-06 21:19:09.582719152 +0200 +++ gcc/java/Make-lang.in 2007-09-06 21:20:32.543970604 +0200 @@ -313,12 +313,13 @@ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ZLIBINC) \ $(srcdir)/java/jcf-io.c $(OUTPUT_OPTION) +short_version := $(shell echo $(version) | sed -r 's/([0-9]+\.[0-9]+).*/\1/') # jcf-path.o needs a -D. java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ java/jcf.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ - -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \ - -DDEFAULT_TARGET_VERSION=\"$(version)\" \ + -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(short_version).jar"' \ + -DDEFAULT_TARGET_VERSION=\"$(short_version)\" \ $(srcdir)/java/jcf-path.c $(OUTPUT_OPTION) TEXI_JAVA_FILES = java/gcj.texi $(gcc_docdir)/include/fdl.texi \ --- libjava/classpath/configure.ac.orig 2008-01-13 17:18:19.000000000 +0100 +++ libjava/classpath/configure.ac 2008-01-13 17:18:45.000000000 +0100 @@ -301,7 +301,7 @@ nativeexeclibdir=${withval} ], [ - nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version` + nativeexeclibdir='${toolexeclibdir}/gcj-'`sed -r 's/([[0-9]]+\.[[0-9]]+).*/\1/' ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version` ]) AC_SUBST(nativeexeclibdir) --- libjava/classpath/configure.orig 2008-01-13 17:18:20.000000000 +0100 +++ libjava/classpath/configure 2008-01-13 17:18:45.000000000 +0100 @@ -4771,7 +4771,7 @@ else - nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[^#].*:/ { print $1 }' ${srcdir}/../libtool-version` + nativeexeclibdir='${toolexeclibdir}/gcj-'`sed -r 's/([0-9]+\.[0-9]+).*/\1/' ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[^#].*:/ { print $1 }' ${srcdir}/../libtool-version` fi; --- libjava/testsuite/lib/libjava.exp.orig 2008-01-13 17:18:20.000000000 +0100 +++ libjava/testsuite/lib/libjava.exp 2008-01-13 17:18:45.000000000 +0100 @@ -169,6 +169,7 @@ set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"] regexp " version \[^\n\r\]*" $text version set libjava_version [lindex $version 1] + set libjava_version "4.3" verbose "version: $libjava_version" --- libjava/testsuite/Makefile.am.orig 2008-01-13 17:18:20.000000000 +0100 +++ libjava/testsuite/Makefile.am 2008-01-13 17:18:45.000000000 +0100 @@ -4,6 +4,7 @@ # May be used by various substitution variables. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +gcc_short_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER) # autoconf2.13's target_alias target_noncanonical = @target_noncanonical@ @@ -59,11 +60,11 @@ rm -rf $$testtmpdir; $(mkdir_p) $$testtmpdir; \ if test -n "$$testdep"; then \ $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \ - $(top_builddir)/libgcj-$(gcc_version).jar::$$testtmpdir \ + $(top_builddir)/libgcj-$(gcc_short_version).jar::$$testtmpdir \ -d $$testtmpdir $(srcdir)/$$testdep || exit; \ fi; \ $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \ - $(top_builddir)/libgcj-$(gcc_version).jar:$$testtmpdir \ + $(top_builddir)/libgcj-$(gcc_short_version).jar:$$testtmpdir \ -d $$testtmpdir $(srcdir)/$$test || exit; \ case "$$test" in \ libjava.loader/dummy.java) \ @@ -75,7 +76,7 @@ esac; \ if test -n "$$genheader"; then \ $(MYGCJH) $$genheader $$testtmpdir/*.class \ - -bootclasspath $(top_builddir)/libgcj-$(gcc_version).jar \ + -bootclasspath $(top_builddir)/libgcj-$(gcc_short_version).jar \ -d $$testtmpdir/ || exit; \ mv $$testtmpdir/*.h $(srcdir)/`dirname $$test`/ 2>/dev/null; \ fi; \ --- libjava/testsuite/Makefile.in.orig 2008-01-13 17:18:20.000000000 +0100 +++ libjava/testsuite/Makefile.in 2008-01-13 17:18:45.000000000 +0100 @@ -327,6 +327,7 @@ # May be used by various substitution variables. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +gcc_short_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER) # Setup the testing framework, if you have one EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \ @@ -576,11 +577,11 @@ @JAVA_MAINTAINER_MODE_TRUE@ rm -rf $$testtmpdir; $(mkdir_p) $$testtmpdir; \ @JAVA_MAINTAINER_MODE_TRUE@ if test -n "$$testdep"; then \ @JAVA_MAINTAINER_MODE_TRUE@ $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \ -@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_version).jar::$$testtmpdir \ +@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_short_version).jar::$$testtmpdir \ @JAVA_MAINTAINER_MODE_TRUE@ -d $$testtmpdir $(srcdir)/$$testdep || exit; \ @JAVA_MAINTAINER_MODE_TRUE@ fi; \ @JAVA_MAINTAINER_MODE_TRUE@ $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \ -@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_version).jar:$$testtmpdir \ +@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_short_version).jar:$$testtmpdir \ @JAVA_MAINTAINER_MODE_TRUE@ -d $$testtmpdir $(srcdir)/$$test || exit; \ @JAVA_MAINTAINER_MODE_TRUE@ case "$$test" in \ @JAVA_MAINTAINER_MODE_TRUE@ libjava.loader/dummy.java) \ @@ -592,7 +593,7 @@ @JAVA_MAINTAINER_MODE_TRUE@ esac; \ @JAVA_MAINTAINER_MODE_TRUE@ if test -n "$$genheader"; then \ @JAVA_MAINTAINER_MODE_TRUE@ $(MYGCJH) $$genheader $$testtmpdir/*.class \ -@JAVA_MAINTAINER_MODE_TRUE@ -bootclasspath $(top_builddir)/libgcj-$(gcc_version).jar \ +@JAVA_MAINTAINER_MODE_TRUE@ -bootclasspath $(top_builddir)/libgcj-$(gcc_short_version).jar \ @JAVA_MAINTAINER_MODE_TRUE@ -d $$testtmpdir/ || exit; \ @JAVA_MAINTAINER_MODE_TRUE@ mv $$testtmpdir/*.h $(srcdir)/`dirname $$test`/ 2>/dev/null; \ @JAVA_MAINTAINER_MODE_TRUE@ fi; \ --- libjava/Makefile.am.orig 2008-01-13 17:18:20.000000000 +0100 +++ libjava/Makefile.am 2008-01-13 17:18:45.000000000 +0100 @@ -5,7 +5,8 @@ ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl # May be used by various substitution variables. -gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +gcc_full_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +gcc_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER) SUBDIRS = $(DIRLTDL) gcj include classpath if TESTSUBDIR @@ -27,9 +28,9 @@ target_noncanonical = @target_noncanonical@ # This is required by TL_AC_GXX_INCLUDE_DIR. -libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) +libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_full_version) -libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) +libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_full_version) ## ## What gets installed, and where. @@ -141,7 +142,7 @@ -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \ -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \ -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \ - -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \ + -DLIBGCJ_DEFAULT_DATABASE="\"/var/lib/gcj-4.3/$(db_name)\"" \ -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" AM_GCJFLAGS = \ --- libjava/Makefile.in.orig 2008-01-13 17:18:20.000000000 +0100 +++ libjava/Makefile.in 2008-01-13 17:18:45.000000000 +0100 @@ -816,7 +816,8 @@ ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl # May be used by various substitution variables. -gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +gcc_full_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +gcc_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER) SUBDIRS = $(DIRLTDL) gcj include classpath $(am__append_1) # write_entries_to_file - writes each entry in a list @@ -829,8 +830,8 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2))) # This is required by TL_AC_GXX_INCLUDE_DIR. -libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) -libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) +libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_full_version) +libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_full_version) toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la \ $(am__append_2) $(am__append_3) toolexecmainlib_DATA = libgcj.spec @@ -875,7 +876,7 @@ -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \ -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \ -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \ - -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \ + -DLIBGCJ_DEFAULT_DATABASE="\"/var/lib/gcj-4.3/$(db_name)\"" \ -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" AM_GCJFLAGS = \ --- libjava/configure.ac.orig 2008-01-13 17:18:20.000000000 +0100 +++ libjava/configure.ac 2008-01-13 17:18:45.000000000 +0100 @@ -511,6 +511,9 @@ AS_HELP_STRING([--with-java-home=DIRECTORY], [value of java.home system property]), [JAVA_HOME="${withval}"], [JAVA_HOME=""]) +if test -n "$with_multisubdir"; then + JAVA_HOME=`echo $JAVA_HOME | sed "s,/usr/lib/,/usr/lib$with_multisubdir/,"` +fi AM_CONDITIONAL(JAVA_HOME_SET, test ! -z "$JAVA_HOME") AC_SUBST(JAVA_HOME) @@ -1385,6 +1388,7 @@ multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /. + ../lib*) toolexeclibdir='$(subst /lib/../lib,/lib,'$toolexecmainlibdir/$multi_os_directory')' ;; *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;; esac ;; @@ -1395,6 +1399,7 @@ # Determine gcj and libgcj version number. gcjversion=`cat "$srcdir/../gcc/BASE-VER"` +short_version=`sed -r 's/([[0-9]]+\.[[0-9]]+).*/\1/' $srcdir/../gcc/BASE-VER` libgcj_soversion=`awk -F: '/^[[^#]].*:/ { print $1 }' $srcdir/libtool-version` GCJVERSION=$gcjversion AC_SUBST(GCJVERSION) @@ -1402,7 +1407,7 @@ # Determine where the standard .db file and GNU Classpath JNI # libraries are found. -gcjsubdir=gcj-$gcjversion-$libgcj_soversion +gcjsubdir=gcj-$short_version-$libgcj_soversion multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .)
Darcs Patch
4
JrCs/opendreambox
recipes/gcc/gcc-4.3.4/debian/libjava-subdir.dpatch
[ "MIT" ]
import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon( /*#__PURE__*/_jsx("path", { d: "M17 20H4V7c0-.55-.45-1-1-1s-1 .45-1 1v13c0 1.1.9 2 2 2h13c.55 0 1-.45 1-1s-.45-1-1-1zm3-18H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zM7.76 16c1.47-1.83 3.71-3 6.24-3s4.77 1.17 6.24 3H7.76z" }), 'SwitchAccountRounded');
JavaScript
4
good-gym/material-ui
packages/material-ui-icons/lib/esm/SwitchAccountRounded.js
[ "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 url = require("url") local json = require("json") name = "Arquivo" type = "archive" function start() set_rate_limit(5) end function vertical(ctx, domain) local resp, err = request(ctx, {['url']=build_url(domain)}) if (err ~= nil and err ~= "") then log(ctx, "vertical request to service failed: " .. err) return end local d = json.decode(resp) if (d == nil or #(d.response_items) == 0) then return end for _, r in pairs(d.response_items) do send_names(ctx, r.originalURL) end end function build_url(domain) local params = { ['q']=domain, ['offset']="0", ['maxItems']="500", ['siteSearch']="", ['type']="", ['collection']="", } return "https://arquivo.pt/textsearch?" .. url.build_query_string(params) end
Ada
4
Elon143/Amass
resources/scripts/archive/arquivo.ads
[ "Apache-2.0" ]
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="para"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="emph"> <i><xsl:apply-templates/></i> </xsl:template> </xsl:stylesheet>
XSLT
4
zealoussnow/chromium
third_party/blink/web_tests/fast/xsl/resources/xslt-import-depth-format.xsl
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Building intelligent machines to transform data into knowledge The three different types of machine learning Making predictions about the future with supervised learning Classification for predicting class labels Regression for predicting continuous outcomes Solving interactive problems with reinforcement learning Discovering hidden structures with unsupervised learning Finding subgroups with clustering Dimensionality reduction for data compression An introduction to the basic terminology and notations A roadmap for building machine learning systems Preprocessing – getting data into shape Training and selecting a predictive model Evaluating models and predicting unseen data instances Using Python for machine learning Installing Python packages Summary
TeX
2
FuckingName/python-machine-learning-book
code/_convenience_scripts/blank_tocs/ch01.toc
[ "MIT" ]
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2007-2019. 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. %% %% %CopyrightEnd% %% %%---------------------------------------------------------------------- %% Purpose: Bloom Filter implementation for anti-replay protection %% in TLS 1.3 (stateless tickets) %%---------------------------------------------------------------------- -module(tls_bloom_filter). -export([add_elem/2, contains/2, new/2, rotate/1]). %%-------------------------------------------------------------------- %% API --------------------------------------------------------------- %%-------------------------------------------------------------------- %% Create new Bloom Filter with k hashes, m bits in the filter new(K, M) -> Size = round(math:ceil(M / 8)), BitField = binary:copy(<<0>>, Size), #{k => K, m => M, current => BitField, old => BitField }. %% Add new element to Bloom Filter add_elem(#{k := K, m := M, current := BitField0} = BloomFilter, Elem) -> Hash = hash(Elem, K, M), BitField = set_bits(BitField0, Hash), BloomFilter#{current => BitField}. %% Check if Bloom Filter contains element. contains(#{k := K, m := M, current := BFCurrent, old := BFOld}, Elem) -> Hash = hash(Elem, K, M), lists:all(fun (Pos) -> bit_is_set(BFCurrent, Pos) end, Hash) orelse lists:all(fun (Pos) -> bit_is_set(BFOld, Pos) end, Hash). rotate(#{m := M, current := BFCurrent} = BloomFilter) -> Size = round(math:ceil(M / 8)), BFNew = binary:copy(<<0>>, Size), BloomFilter#{current := BFNew, old := BFCurrent}. %%-------------------------------------------------------------------- %% Internal functions ------------------------------------------------ %%-------------------------------------------------------------------- bit_is_set(<<1:1,_/bitstring>>, 0) -> true; bit_is_set(BitField, N) -> case BitField of <<_:N,1:1,_/bitstring>> -> true; _ -> false end. set_bits(BitField, []) -> BitField; set_bits(BitField, [H|T]) -> set_bits(set_bit(BitField, H), T). set_bit(BitField, 0) -> <<_:1,Rest/bitstring>> = BitField, <<1:1,Rest/bitstring>>; set_bit(BitField, B) -> <<Front:B,_:1,Rest/bitstring>> = BitField, <<Front:B,1:1,Rest/bitstring>>. %% Kirsch-Mitzenmacher-Optimization hash(Elem, K, M) -> hash(Elem, K, M, []). %% hash(_, 0, _, Acc) -> Acc; hash(Elem, K, M, Acc) -> H = (erlang:phash2({Elem, 0}, M) + (K - 1) * erlang:phash2({Elem, 1}, M)) rem M, hash(Elem, K - 1, M, [H|Acc]).
Erlang
5
jjhoo/otp
lib/ssl/src/tls_bloom_filter.erl
[ "Apache-2.0" ]
<?php $events = array_keys($this->getParam('events', [])); ?> <div class="cover margin-bottom-large"> <h1 class="zone xl margin-bottom-large"> <a data-ls-attrs="href=/console/home?project={{router.params.project}}" class="back text-size-small link-return-animation--start"><i class="icon-left-open"></i> Home</a> <br /> <span>Webhooks</span> </h1> </div> <div class="zone xl" data-service="projects.listWebhooks" data-scope="console" data-event="load,projects.createWebhook,projects.updateWebhook,projects.deleteWebhook" data-name="console-webhooks" data-param-project-id="{{router.params.project}}" data-success="trigger" data-success-param-trigger-events="projects.listWebhooks"> <div data-ls-if="0 == {{console-webhooks.sum}} || undefined == {{console-webhooks.sum}}" class="box margin-top margin-bottom"> <h3 class="margin-bottom-small text-bold">No Webhooks Found</h3> <p class="margin-bottom-no">You haven't created any webhooks for your project yet.</p> </div> <div class="box margin-bottom" data-ls-if="0 != {{console-webhooks.sum}}"> <ul data-ls-loop="console-webhooks.webhooks" data-ls-as="webhook" class="list"> <li class="clear"> <div data-ui-modal class="modal close sticky-footer" data-button-text="Update" data-button-class="pull-end"> <button type="button" class="close pull-end" data-ui-modal-close=""><i class="icon-cancel"></i></button> <h1>Update Webhook</h1> <form data-analytics data-analytics-activity data-analytics-event="submit" data-analytics-category="console" data-analytics-label="Update Project Webhook" data-service="projects.updateWebhook" data-scope="console" data-event="submit" data-success="alert,trigger,reset" data-success-param-alert-text="Updated webhook successfully" data-success-param-trigger-events="projects.updateWebhook" data-failure="alert" data-failure-param-alert-text="Failed to update webhook" data-failure-param-alert-classname="error"> <input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" /> <input type="hidden" name="webhookId" data-ls-bind="{{webhook.$id}}" /> <label data-ls-attrs="for=name-{{webhook.$id}}">Name</label> <input type="text" class="full-width" data-ls-attrs="id=name-{{webhook.$id}}" name="name" required autocomplete="off" data-ls-bind="{{webhook.name}}" maxlength="128" /> <section data-forms-select-all> <label data-ls-attrs="for=events-{{webhook.$id}}">Events</label> <div class="row responsive thin"> <?php foreach ($events as $i => $event) : ?> <div class="col span-6 text-one-liner margin-bottom text-height-large text-size-small" title="<?php echo $event; ?>"> <input type="checkbox" name="events" data-ls-bind="{{webhook.events}}" id="update-<?php echo $event; ?>" value="<?php echo $event; ?>" /> &nbsp; <label class="inline" for="update-<?php echo $event; ?>"><?php echo $event; ?></label> </div> <?php if (($i + 1) % 2 === 0) : ?> </div> <div class="row responsive thin"> <?php endif; ?> <?php endforeach; ?> </div> </section> <label data-ls-attrs="for=url-{{webhook.$id}}">POST URL</label> <input type="url" class="full-width" data-ls-attrs="id=url-{{webhook.$id}}" name="url" required autocomplete="off" placeholder="https://example.com/callback" data-ls-bind="{{webhook.url}}" /> <div class="margin-bottom toggle" data-ls-ui-open data-button-aria="Advanced Options"> <i class="icon-plus pull-end margin-top-tiny"></i> <i class="icon-minus pull-end margin-top-tiny"></i> <h2 class="margin-bottom"> Advanced Options <small class="text-size-small">(optional)</small> </h2> <label data-ls-attrs="for=security-{{task.$id}}" class="margin-bottom-small"> <div class="margin-bottom-small text-bold">SSL / TLS (Certificate verification)</div> <input name="security" type="radio" required data-ls-attrs="id=secure-yes-{{webhook.$id}}" data-ls-bind="{{webhook.security}}" value="true" data-cast-to="boolean" /> &nbsp; <span>Enabled</span> &nbsp; <input name="security" type="radio" required data-ls-attrs="id=secure-no-{{webhook.$id}}" data-ls-bind="{{webhook.security}}" value="false" data-cast-to="boolean" /> &nbsp; <span>Disabled</span> &nbsp; </label> <p class="margin-bottom text-size-small text-fade"><span class="text-red">Warning</span>: Untrusted or self-signed certificates may not be secure. <a href="https://en.wikipedia.org/wiki/Self-signed_certificate" target="_blank" rel="noopener">Learn more<i class="icon-link-ext"></i></a> </p> <label class="text-bold">HTTP Authentication <span class="tooltip" data-tooltip="Use to secure your endpoint from untrusted sources"><i class="icon-question"></i></span> &nbsp;<small>(optional)</small></label> <div class="row responsive thin"> <div class="col span-6 margin-bottom"> <label data-ls-attrs="for=httpUser-{{webhook.$id}}">User</label> <input type="text" class="full-width margin-bottom-no" data-ls-attrs="id=httpUser-{{webhook.$id}}" name="httpUser" autocomplete="off" data-ls-bind="{{webhook.httpUser}}" /> </div> <div class="col span-6 margin-bottom"> <label data-ls-attrs="for=httpPass-{{webhook.$id}}">Password</label> <input type="password" data-forms-show-secret class="full-width margin-bottom-no" data-ls-attrs="id=httpPass-{{webhook.$id}}" name="httpPass" autocomplete="off" data-ls-bind="{{webhook.httpPass}}" /> </div> </div> </div> <footer> <button type="submit">Save</button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button> </footer> </form> </div> <form class="pull-end margin-end" data-analytics data-analytics-activity data-analytics-event="submit" data-analytics-category="console" data-analytics-label="Delete Project Webhook" data-service="projects.deleteWebhook" data-scope="console" data-event="submit" data-confirm="Are you sure you want to delete this webhook?" data-success="alert,trigger" data-success-param-alert-text="Deleted webhook successfully" data-success-param-trigger-events="projects.deleteWebhook" data-failure="alert" data-failure-param-alert-text="Failed to delete webhook" data-failure-param-alert-classname="error"> <input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" /> <input type="hidden" name="webhookId" data-ls-bind="{{webhook.$id}}" /> <button class="danger reverse">Delete</button> </form> <span data-ls-bind="{{webhook.name}}"></span> &nbsp; (<span data-ls-bind="{{webhook.events.length}}"></span> events) <span data-ls-if="false === {{webhook.security}}"> &nbsp; <small class="text-danger">(SSL/TLS Disabled)</small> </span> <div class="margin-top-tiny"> <a data-ls-attrs="href={{webhook.url}}" data-ls-bind="{{webhook.url}}" target="_blank" class="text-one-liner"></a> </div> </li> </ul> </div> <div class="clear"> <div data-ui-modal class="modal close box sticky-footer" data-button-text="Add Webhook"> <button type="button" class="close pull-end" data-ui-modal-close=""><i class="icon-cancel"></i></button> <h1>Add Webhook</h1> <form data-analytics data-analytics-activity data-analytics-event="submit" data-analytics-category="console" data-analytics-label="Create Project Webhook" data-service="projects.createWebhook" data-scope="console" data-event="submit" data-success="alert,trigger,reset" data-success-param-alert-text="Created webhook successfully" data-success-param-trigger-events="projects.createWebhook" data-failure="alert" data-failure-param-alert-text="Failed to create webhook" data-failure-param-alert-classname="error"> <input type="hidden" name="projectId" data-ls-bind="{{router.params.project}}" /> <label for="name">Name</label> <input type="text" class="full-width" id="name" name="name" required autocomplete="off" maxlength="128" /> <section data-forms-select-all> <label for="events">Events</label> <div class="row responsive thin"> <?php foreach ($events as $i => $event) : ?> <div class="col span-6 text-one-liner margin-bottom text-height-large text-size-small" title="<?php echo $event; ?>"> <input type="checkbox" name="events" id="add-<?php echo $event; ?>" value="<?php echo $event; ?>" /> &nbsp; <label class="inline" for="add-<?php echo $event; ?>"><?php echo $event; ?></label> </div> <?php if (($i + 1) % 2 === 0) : ?> </div> <div class="row responsive thin"> <?php endif; ?> <?php endforeach; ?> </div> </section> <label for="url">POST URL</label> <input type="url" class="full-width" id="url" name="url" required autocomplete="off" placeholder="https://example.com/callback" /> <div class="margin-bottom toggle" data-ls-ui-open data-button-aria="Advanced Options"> <i class="icon-plus pull-end margin-top-tiny"></i> <i class="icon-minus pull-end margin-top-tiny"></i> <h2 class="margin-bottom"> Advanced Options <small class="text-size-small">(optional)</small> </h2> <label data-ls-attrs="for=security-{{task.$id}}" class="margin-bottom-small"> <div class="margin-bottom-small text-bold">SSL / TLS (Certificate verification)</div> <input name="security" type="radio" required data-ls-attrs="id=secure-yes" checked="checked" value="1" /> &nbsp; <span>Enabled</span> &nbsp; <input name="security" type="radio" required data-ls-attrs="id=secure-no" value="0" /> &nbsp; <span>Disabled</span> &nbsp; </label> <p class="margin-bottom text-size-small text-fade"><span class="text-red">Warning</span>: Untrusted or self-signed certificates may not be secure. <a href="https://en.wikipedia.org/wiki/Self-signed_certificate" target="_blank" rel="noopener">Learn more<i class="icon-link-ext"></i></a> </p> <label class="text-bold">HTTP Authentication <span class="tooltip" data-tooltip="Use to secure your endpoint from untrusted sources"><i class="icon-question"></i></span> &nbsp;<small>(optional)</small></label> <div class="row responsive thin"> <div class="col span-6 margin-bottom"> <label for="httpUser">User</label> <input type="text" class="full-width margin-bottom-no" id="httpUser" name="httpUser" autocomplete="off" /> </div> <div class="col span-6 margin-bottom"> <label for="httpPass">Password</label> <input type="password" data-forms-show-secret class="full-width margin-bottom-no" id="httpPass" name="httpPass" autocomplete="off" /> </div> </div> </div> <footer> <button type="submit">Create</button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button> </footer> </form> </div> </div> </div>
HTML+PHP
4
nakshatrasinghh/appwrite
app/views/console/webhooks/index.phtml
[ "BSD-3-Clause" ]
xquery version "1.0-ml"; module namespace sm-es = "http://marklogic.com/smart-mastering/entity-services"; import module namespace es-impl = "http://marklogic.com/smart-mastering/entity-services-impl" at "impl/sm-es-impl.xqy"; declare function sm-es:get-entity-descriptors() as array-node() { es-impl:get-entity-descriptors() }; declare function sm-es:get-entity-def($target-entity as item()?) as object-node()? { es-impl:get-entity-def($target-entity) }; declare function sm-es:get-entity-def-property( $entity-def as object-node()?, $property-title as xs:string? ) as object-node()? { es-impl:get-entity-def-property($entity-def, $property-title) }; declare function sm-es:get-entity-property-info($entity-type-iri as xs:string, $property-path as xs:string) as map:map? { es-impl:get-entity-property-info($entity-type-iri, $property-path) }; declare function sm-es:get-entity-property-info($entity-type-iri as xs:string) as map:map? { es-impl:get-entity-property-info($entity-type-iri) }; declare function sm-es:get-entity-type-namespaces($entity-type-iri as xs:string) as map:map { es-impl:get-entity-type-namespaces($entity-type-iri) };
XQuery
4
Elgaeb/marklogic-data-hub
marklogic-data-hub/src/main/resources/ml-modules/root/com.marklogic.smart-mastering/sm-entity-services.xqy
[ "Apache-2.0" ]
#!/usr/bin/env parrot .sub 'main' :main say "Hello!" .end
Parrot Internal Representation
2
JavascriptID/sourcerer-app
src/test/resources/samples/langs/Parrot Internal Representation/hello.pir
[ "MIT" ]
<script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.3.4/vconsole.min.js"></script> <script type="text/javascript"> var vConsole = new VConsole(); </script>
HTML
2
didichuxing/DoraemonKit
Android/dokit/src/main/assets/h5help/dokit_js_vconsole_hook.html
[ "Apache-2.0" ]
<?xml version="1.0" encoding="UTF-8"?> <LERModel ObjectType="4003" CSAOName="LERModel" CSAOCaption="Model" InternalVersion="23" ProductVersion="7.1.0.216" Version="1.30"><Id>{093A5983-A500-4087-9EC0-F31A0AA307EF}</Id><Name>Tickets</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><ModelDefID>{CA753C22-0089-4892-8EEE-8B3A09EA8AD3}</ModelDefID><NamingConvFile></NamingConvFile><NameMode>0</NameMode><WorkSpaces><LERWorkSpace ObjectType="4501" CSAOName="LERWorkSpace" CSAOCaption="Workspace"><Id>{8105344C-5CD5-4BD2-8CE0-6986CA7AA376}</Id><Name>All Items</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><BackgroundColor>16777215</BackgroundColor><RecalculateSize>1</RecalculateSize><FullBackground>0</FullBackground><Shadow>1</Shadow><DisplayLineNames>1</DisplayLineNames><FontHeight>-28</FontHeight><Grid>0</Grid><GridVisible>0</GridVisible><GridSize>30</GridSize><Description></Description><EndType1>0</EndType1><EndType2>0</EndType2><ShapeList><LERWorkSpaceShapeEntity ObjectType="4502" CSAOName="LERWorkSpaceShapeEntity" CSAOCaption="Entity Shortcut"><Id>{9FCBEFB7-44EA-422E-ABDC-7DDDFFF99005}</Id><Name>Systemy_sprzedazy</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{E57A003D-5E5D-47BF-87EC-F68C6575A1DA}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>175</Top><Left>397</Left><z>0</z><Width>335</Width><Height>226</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{2650D336-61E0-4B8A-A262-F5BC9BC822CC}</Id><Id>{1F54FB33-24B5-4D5D-B069-363AFA34066C}</Id><Id>{A7F46D92-F592-45B6-AFB6-7C67499E72D6}</Id></LineList><Group/><DisplayDataType>0</DisplayDataType><DisplayMode>4</DisplayMode><GraphicalKey>1</GraphicalKey><Align>1</Align><DisplayDomainName>0</DisplayDomainName><Gradient>1</Gradient><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><DisplayMandatoryMark>1</DisplayMandatoryMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpaceShapeEntity><LERWorkSpaceShapeEntity ObjectType="4502" CSAOName="LERWorkSpaceShapeEntity" CSAOCaption="Entity Shortcut"><Id>{DB182549-6CBA-46EE-B84A-2F0E06D8D48B}</Id><Name>Typ_biletow</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{DE553AF0-A7FF-4FA0-87A3-F66F8CA9805D}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>644</Top><Left>155</Left><z>0</z><Width>335</Width><Height>202</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{C465957F-466A-4ED5-B853-D9C73F6255EB}</Id><Id>{2650D336-61E0-4B8A-A262-F5BC9BC822CC}</Id><Id>{DD26EE6A-2AA4-45C4-9274-3D93B107B44F}</Id></LineList><Group/><DisplayDataType>0</DisplayDataType><DisplayMode>4</DisplayMode><GraphicalKey>1</GraphicalKey><Align>1</Align><DisplayDomainName>0</DisplayDomainName><Gradient>1</Gradient><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><DisplayMandatoryMark>1</DisplayMandatoryMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpaceShapeEntity><LERWorkSpaceShapeEntity ObjectType="4502" CSAOName="LERWorkSpaceShapeEntity" CSAOCaption="Entity Shortcut"><Id>{4EC4F59A-4C4E-4A1E-B4FA-51469CA1B247}</Id><Name>Długoterminowe</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{25E788EA-AD4E-4441-9BB4-97E34767C395}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>1183</Top><Left>505</Left><z>0</z><Width>252</Width><Height>198</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{9C50ED85-D489-4EA4-B766-8C0D49891897}</Id></LineList><Group/><DisplayDataType>0</DisplayDataType><DisplayMode>4</DisplayMode><GraphicalKey>1</GraphicalKey><Align>1</Align><DisplayDomainName>0</DisplayDomainName><Gradient>1</Gradient><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><DisplayMandatoryMark>1</DisplayMandatoryMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpaceShapeEntity><LERWorkSpaceShapeEntity ObjectType="4502" CSAOName="LERWorkSpaceShapeEntity" CSAOCaption="Entity Shortcut"><Id>{59C64F66-1B7A-41E7-AEF2-C4295A451309}</Id><Name>Krótkoterminowe</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{E02432AC-8D00-4459-95A9-84C31050AB53}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>1170</Top><Left>32</Left><z>0</z><Width>256</Width><Height>198</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{FAF7635A-61F0-41E4-A60C-313AD50F9267}</Id></LineList><Group/><DisplayDataType>0</DisplayDataType><DisplayMode>4</DisplayMode><GraphicalKey>1</GraphicalKey><Align>1</Align><DisplayDomainName>0</DisplayDomainName><Gradient>1</Gradient><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><DisplayMandatoryMark>1</DisplayMandatoryMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpaceShapeEntity><LERWorkSpaceShapeEntity ObjectType="4502" CSAOName="LERWorkSpaceShapeEntity" CSAOCaption="Entity Shortcut"><Id>{B9BF80A2-128E-4FD6-AAD9-BE1D051CCEA9}</Id><Name>Nosniki</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{1FD13989-AAE7-411E-B127-161FC46A8F55}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>570</Top><Left>1267</Left><z>0</z><Width>373</Width><Height>181</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{A7F46D92-F592-45B6-AFB6-7C67499E72D6}</Id><Id>{F979E9A8-D716-482E-BE3E-7976C37157A7}</Id><Id>{DD26EE6A-2AA4-45C4-9274-3D93B107B44F}</Id><Id>{6EE708BD-A1CE-4144-A329-858875724EB2}</Id></LineList><Group/><DisplayDataType>0</DisplayDataType><DisplayMode>4</DisplayMode><GraphicalKey>1</GraphicalKey><Align>1</Align><DisplayDomainName>0</DisplayDomainName><Gradient>1</Gradient><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><DisplayMandatoryMark>1</DisplayMandatoryMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpaceShapeEntity><ILERWorkSpaceShapeInheritance ObjectType="4504" CSAOName="ILERWorkSpaceShapeInheritance" CSAOCaption="Inheritance Shortcut"><Id>{4620E796-052C-43F2-83A9-E14B1278E918}</Id><Name>okresla_podtyp</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{F21630BF-3500-4DED-8442-D6DE4B9AB54C}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>960</Top><Left>271</Left><z>0</z><Width>113</Width><Height>80</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{C465957F-466A-4ED5-B853-D9C73F6255EB}</Id><Id>{FAF7635A-61F0-41E4-A60C-313AD50F9267}</Id><Id>{9C50ED85-D489-4EA4-B766-8C0D49891897}</Id></LineList><Group/></ILERWorkSpaceShapeInheritance><LERWorkSpaceShapeEntity ObjectType="4502" CSAOName="LERWorkSpaceShapeEntity" CSAOCaption="Entity Shortcut"><Id>{8DCFC465-05CD-4C9D-B131-F2AFFDD9F24B}</Id><Name>Punkty_sprzedazy</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{63BB00EC-BC1A-424A-AB99-2395CBBCA1FC}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>191</Top><Left>1267</Left><z>0</z><Width>362</Width><Height>210</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{1F54FB33-24B5-4D5D-B069-363AFA34066C}</Id><Id>{6EE708BD-A1CE-4144-A329-858875724EB2}</Id></LineList><Group/><DisplayDataType>0</DisplayDataType><DisplayMode>4</DisplayMode><GraphicalKey>1</GraphicalKey><Align>1</Align><DisplayDomainName>0</DisplayDomainName><Gradient>1</Gradient><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><DisplayMandatoryMark>1</DisplayMandatoryMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpaceShapeEntity><LERWorkSpaceShapeEntity ObjectType="4502" CSAOName="LERWorkSpaceShapeEntity" CSAOCaption="Entity Shortcut"><Id>{915723C5-04E7-4290-8C74-7FD45FC035CA}</Id><Name>Pasazerowie</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{3671F7C7-0DE3-4FB1-821F-F33C458AD4B4}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>0</ZOrder><Top>1225</Top><Left>1487</Left><z>0</z><Width>510</Width><Height>80</Height><dz>0</dz><RecalculateSizes>0</RecalculateSizes><UseWorkSpaceRecalculateSizes>0</UseWorkSpaceRecalculateSizes><Shadow>1</Shadow><FullBackground>0</FullBackground><LineList><Id>{F979E9A8-D716-482E-BE3E-7976C37157A7}</Id></LineList><Group/><DisplayDataType>0</DisplayDataType><DisplayMode>4</DisplayMode><GraphicalKey>1</GraphicalKey><Align>1</Align><DisplayDomainName>0</DisplayDomainName><Gradient>1</Gradient><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><DisplayMandatoryMark>1</DisplayMandatoryMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpaceShapeEntity></ShapeList><LineList><LERWorkSpaceLineInheritanceParent ObjectType="4505" CSAOName="LERWorkSpaceLineInheritanceParent" CSAOCaption="Inheritance Parent Link Shortcut"><Id>{C465957F-466A-4ED5-B853-D9C73F6255EB}</Id><Name>Link to Typ_biletow</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{8904E467-5AF4-499D-8D6A-882D31163EB5}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{DB182549-6CBA-46EE-B84A-2F0E06D8D48B}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{4620E796-052C-43F2-83A9-E14B1278E918}</Id></WorkSpaceShape2><NamePositionY>0</NamePositionY><NamePositionX>0</NamePositionX><Points><Point><x>322</x><y>846</y></Point><Point><x>322</x><y>960</y></Point></Points></LERWorkSpaceLineInheritanceParent><ILERWorkSpaceLineInheritanceChild ObjectType="4506" CSAOName="ILERWorkSpaceLineInheritanceChild" CSAOCaption="Inheritance Child Link Shortcut"><Id>{FAF7635A-61F0-41E4-A60C-313AD50F9267}</Id><Name>Link to Krótkoterminowe</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{63709A4E-BB85-4B07-958C-4FE0EA4A1CA5}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{59C64F66-1B7A-41E7-AEF2-C4295A451309}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{4620E796-052C-43F2-83A9-E14B1278E918}</Id></WorkSpaceShape2><Points><Point><x>160</x><y>1170</y></Point><Point><x>160</x><y>1105</y></Point><Point><x>329</x><y>1105</y></Point><Point><x>329</x><y>1040</y></Point></Points></ILERWorkSpaceLineInheritanceChild><ILERWorkSpaceLineInheritanceChild ObjectType="4506" CSAOName="ILERWorkSpaceLineInheritanceChild" CSAOCaption="Inheritance Child Link Shortcut"><Id>{9C50ED85-D489-4EA4-B766-8C0D49891897}</Id><Name>Link to Długoterminowe</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{D1C8A93A-753D-4EBC-9C10-CFECBB295824}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{4EC4F59A-4C4E-4A1E-B4FA-51469CA1B247}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{4620E796-052C-43F2-83A9-E14B1278E918}</Id></WorkSpaceShape2><Points><Point><x>612</x><y>1183</y></Point><Point><x>612</x><y>1105</y></Point><Point><x>341</x><y>1105</y></Point><Point><x>341</x><y>1040</y></Point></Points></ILERWorkSpaceLineInheritanceChild><LERWorkSpaceLineRelation ObjectType="4503" CSAOName="LERWorkSpaceLineRelation" CSAOCaption="Relation Shortcut"><Id>{2650D336-61E0-4B8A-A262-F5BC9BC822CC}</Id><Name>sprzedaje</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{6CBAD64A-DFDF-4E90-BAC4-592E10992932}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{9FCBEFB7-44EA-422E-ABDC-7DDDFFF99005}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{DB182549-6CBA-46EE-B84A-2F0E06D8D48B}</Id></WorkSpaceShape2><NamePositionY>0</NamePositionY><NamePositionX>0</NamePositionX><Points><Point><x>587</x><y>401</y></Point><Point><x>587</x><y>523</y></Point><Point><x>326</x><y>523</y></Point><Point><x>326</x><y>644</y></Point></Points></LERWorkSpaceLineRelation><LERWorkSpaceLineRelation ObjectType="4503" CSAOName="LERWorkSpaceLineRelation" CSAOCaption="Relation Shortcut"><Id>{1F54FB33-24B5-4D5D-B069-363AFA34066C}</Id><Name>posiada</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{676D5371-72D8-4CD7-BFBE-B9538B3D0517}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{9FCBEFB7-44EA-422E-ABDC-7DDDFFF99005}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{8DCFC465-05CD-4C9D-B131-F2AFFDD9F24B}</Id></WorkSpaceShape2><NamePositionY>177</NamePositionY><NamePositionX>888</NamePositionX><Points><Point><x>732</x><y>290</y></Point><Point><x>976</x><y>290</y></Point><Point><x>976</x><y>267</y></Point><Point><x>1267</x><y>267</y></Point></Points></LERWorkSpaceLineRelation><LERWorkSpaceLineRelation ObjectType="4503" CSAOName="LERWorkSpaceLineRelation" CSAOCaption="Relation Shortcut"><Id>{A7F46D92-F592-45B6-AFB6-7C67499E72D6}</Id><Name>oferuje</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{9733BBAB-5C59-422E-9C64-C5D7F3C3B66B}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{9FCBEFB7-44EA-422E-ABDC-7DDDFFF99005}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{B9BF80A2-128E-4FD6-AAD9-BE1D051CCEA9}</Id></WorkSpaceShape2><NamePositionY>450</NamePositionY><NamePositionX>838</NamePositionX><Points><Point><x>732</x><y>352</y></Point><Point><x>938</x><y>352</y></Point><Point><x>938</x><y>606</y></Point><Point><x>1267</x><y>606</y></Point></Points></LERWorkSpaceLineRelation><LERWorkSpaceLineRelation ObjectType="4503" CSAOName="LERWorkSpaceLineRelation" CSAOCaption="Relation Shortcut"><Id>{F979E9A8-D716-482E-BE3E-7976C37157A7}</Id><Name>kupuje</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{2E53E149-C771-48BA-B70B-A8D02F9E9384}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{B9BF80A2-128E-4FD6-AAD9-BE1D051CCEA9}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{915723C5-04E7-4290-8C74-7FD45FC035CA}</Id></WorkSpaceShape2><NamePositionY>913</NamePositionY><NamePositionX>1359</NamePositionX><Points><Point><x>1391</x><y>751</y></Point><Point><x>1391</x><y>1003</y></Point><Point><x>1558</x><y>1003</y></Point><Point><x>1558</x><y>1225</y></Point></Points></LERWorkSpaceLineRelation><LERWorkSpaceLineRelation ObjectType="4503" CSAOName="LERWorkSpaceLineRelation" CSAOCaption="Relation Shortcut"><Id>{DD26EE6A-2AA4-45C4-9274-3D93B107B44F}</Id><Name>znajduje_sie_na</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{CB4FE326-57A6-40AB-BB08-21512C9A558A}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{DB182549-6CBA-46EE-B84A-2F0E06D8D48B}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{B9BF80A2-128E-4FD6-AAD9-BE1D051CCEA9}</Id></WorkSpaceShape2><NamePositionY>692</NamePositionY><NamePositionX>822</NamePositionX><Points><Point><x>490</x><y>782</y></Point><Point><x>1021</x><y>782</y></Point><Point><x>1021</x><y>695</y></Point><Point><x>1267</x><y>695</y></Point></Points></LERWorkSpaceLineRelation><LERWorkSpaceLineRelation ObjectType="4503" CSAOName="LERWorkSpaceLineRelation" CSAOCaption="Relation Shortcut"><Id>{6EE708BD-A1CE-4144-A329-858875724EB2}</Id><Name>posiada_w_sprzedazy</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ParentBaseID>{D46DB8D0-8070-4E4A-B0BB-FBCE6B05CDEE}</ParentBaseID><PenWidth>1</PenWidth><PenColor>0</PenColor><BrushColor>15780518</BrushColor><FontCharset>238</FontCharset><FontColor>-16777208</FontColor><FontName>Arial</FontName><FontStyle>0</FontStyle><FormatLocked>0</FormatLocked><FontHeight>-28</FontHeight><ZOrder>-10</ZOrder><LockPointsInRightAngledMode>0</LockPointsInRightAngledMode><RightAngledLine>0</RightAngledLine><WorkSpaceShape1><Id>{8DCFC465-05CD-4C9D-B131-F2AFFDD9F24B}</Id></WorkSpaceShape1><WorkSpaceShape2><Id>{B9BF80A2-128E-4FD6-AAD9-BE1D051CCEA9}</Id></WorkSpaceShape2><NamePositionY>437</NamePositionY><NamePositionX>1508</NamePositionX><Points><Point><x>1461</x><y>401</y></Point><Point><x>1461</x><y>570</y></Point></Points></LERWorkSpaceLineRelation></LineList><Page><WorkSpacePage ObjectType="1511" CSAOName="WorkSpacePage" CSAOCaption="Workspace Page"><Id>{83B43AE8-5CAA-4618-9F82-A74FDACACB35}</Id><Name>Page Format</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><Zoom>100</Zoom><FitToPage>0</FitToPage><Orientation>0</Orientation><HeightDec>2970</HeightDec><WidthDec>2100</WidthDec><MarginBottomDec>150</MarginBottomDec><MarginLeftDec>150</MarginLeftDec><MarginRightDec>150</MarginRightDec><MarginTopDec>150</MarginTopDec></WorkSpacePage></Page><Align>1</Align><DisplayDataType>0</DisplayDataType><GraphicalKey>1</GraphicalKey><DisplayMode>4</DisplayMode><DisplayDomainName>0</DisplayDomainName><AutoFill>1</AutoFill><Notation>0</Notation><Gradient>1</Gradient><DisplayMandatoryMark>1</DisplayMandatoryMark><DisplayUniqueIdentifierMark>1</DisplayUniqueIdentifierMark><EntityMinWidth>186</EntityMinWidth></LERWorkSpace></WorkSpaces><ModelTitle><ModelTitle ObjectType="1011" CSAOName="ModelTitle" CSAOCaption="Model Title"><Id>{F13E0CF6-1EDC-429A-8CB5-0FACBA540A74}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><ModelName>Tickets</ModelName><Author></Author><Company></Company><Version></Version><CreatedDate>2020-03-21T14:33:27.028+01:00</CreatedDate><ModifiedDate>2020-03-25T16:18:29.598+01:00</ModifiedDate><Project></Project><Description></Description></ModelTitle></ModelTitle><DefaultCodeGenerator><Id>{F7C3DF90-C361-4BB1-83D6-F679FB249020}</Id></DefaultCodeGenerator><CodeGenerators><CodeGenerator ObjectType="1044" CSAOName="CodeGenerator" CSAOCaption="TCodeGeneratorFactory"><Id>{F7C3DF90-C361-4BB1-83D6-F679FB249020}</Id><GlobalOrder>0</GlobalOrder><FileName></FileName><GenerateFromModel>0</GenerateFromModel><GenerateWorkspaceID>{00000000-0000-0000-0000-000000000000}</GenerateWorkspaceID><PreviewBeforeSave>0</PreviewBeforeSave><TextCaseIndex>0</TextCaseIndex><AppendToFile>0</AppendToFile><OrderSettings/></CodeGenerator></CodeGenerators><Verificators2><LERVerificator2 ObjectType="1245" CSAOName="LERVerificator2" CSAOCaption="LER Verificator"><Id>{209B026B-3FCD-4E79-9E0D-5D6465D38435}</Id><Name></Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><DisabledTestTypes></DisabledTestTypes><WorkingSet><Id>{200A20C5-92DF-4B7A-88AA-D19BB1B778E1}</Id></WorkingSet><IgnoredList><IIgnoredList ObjectType="1085" CSAOName="IIgnoredList" CSAOCaption="IIgnoredList"><Id>{53604A12-5417-4B37-8559-37161EB497B9}</Id><Name></Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder></IIgnoredList></IgnoredList></LERVerificator2></Verificators2><WorkingSets><WorkingSet ObjectType="1080" CSAOName="WorkingSet" CSAOCaption="Working Set"><Id>{200A20C5-92DF-4B7A-88AA-D19BB1B778E1}</Id><Name>All Objects</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><IgnoreClasses/></WorkingSet><WorkingSet ObjectType="1080" CSAOName="WorkingSet" CSAOCaption="Working Set"><Id>{0FCA9A5E-E8BC-4051-8780-A92E719B32A7}</Id><Name>Excel Import - Export</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><IgnoreClasses/></WorkingSet><WorkingSet ObjectType="1080" CSAOName="WorkingSet" CSAOCaption="Working Set"><Id>{21222748-E374-48B3-8BA9-EE834247AAE8}</Id><Name>CSV Import - Export</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><IgnoreClasses/></WorkingSet><WorkingSet ObjectType="1080" CSAOName="WorkingSet" CSAOCaption="Working Set"><Id>{840D4553-A866-430C-BB22-401B38DE0EA7}</Id><Name>All Objects</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><IgnoreClasses/></WorkingSet></WorkingSets><ModelManager><ModelManagerStorage ObjectType="1180" CSAOName="ModelManagerStorage" CSAOCaption="Model Manager Storage"><Id>{CF68B39D-0122-41DC-BD5D-CC934C4CF6E3}</Id><Name></Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GeneratorAliases><IGeneratorAlias ObjectType="1183" CSAOName="IGeneratorAlias" CSAOCaption="IGeneratorAlias"><Id>{71518A4C-DDF4-4F9F-B6A0-A7A7DCD31822}</Id><Name>Last (Default)</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><Description></Description><IsLast>1</IsLast><SerializedGenerator>&lt;?xml version="1.0"?&gt; &lt;CodeGenerator ObjectType="1044" CSAOName="CodeGenerator" CSAOCaption="TCodeGeneratorFactory" InternalVersion="23" ProductVersion="7.1.0.216"&gt;&lt;Id&gt;{F7C3DF90-C361-4BB1-83D6-F679FB249020}&lt;/Id&gt;&lt;GlobalOrder&gt;0&lt;/GlobalOrder&gt;&lt;FileName&gt;&lt;/FileName&gt;&lt;GenerateFromModel&gt;0&lt;/GenerateFromModel&gt;&lt;GenerateWorkspaceID&gt;{00000000-0000-0000-0000-000000000000}&lt;/GenerateWorkspaceID&gt;&lt;PreviewBeforeSave&gt;0&lt;/PreviewBeforeSave&gt;&lt;TextCaseIndex&gt;0&lt;/TextCaseIndex&gt;&lt;AppendToFile&gt;0&lt;/AppendToFile&gt;&lt;OrderSettings/&gt;&lt;/CodeGenerator&gt; </SerializedGenerator></IGeneratorAlias></GeneratorAliases></ModelManagerStorage></ModelManager><Entities><LEREntity ObjectType="4004" CSAOName="LEREntity" CSAOCaption="Entity"><Id>{E57A003D-5E5D-47BF-87EC-F68C6575A1DA}</Id><Name>Systemy_sprzedazy</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Systemy_sprzedazy</Caption><Size>0</Size><Description></Description><Nature></Nature><DevDescription></DevDescription><Relations><Id>{6CBAD64A-DFDF-4E90-BAC4-592E10992932}</Id><Id>{676D5371-72D8-4CD7-BFBE-B9538B3D0517}</Id><Id>{9733BBAB-5C59-422E-9C64-C5D7F3C3B66B}</Id></Relations><Attributes><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{AA10BDC2-411F-41D6-83DE-B6B0B8199B60}</Id><Name>Id_systemu</Name><Ordinal>1</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Id_systemu</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{759BE5D0-5D47-4C1C-BA90-88888F50E72A}</Id></DataType><Default/><Domain/><UniqueIdentifierItems><Id>{A29C7219-8BE2-4916-B6FE-AA07C4C64B83}</Id></UniqueIdentifierItems><ValidValues><ValidValuesInt ObjectType="1058" CSAOName="ValidValuesInt" CSAOCaption="Valid Values Integer"><Id>{60303EC7-0324-48D1-A92C-7B01A9427F3A}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesInt></ValidValues></LERAttribute><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{5D296B14-D72D-4669-8001-FB4A62773EFB}</Id><Name>Miasto</Name><Ordinal>2</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Miasto</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1>30</DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{AF7D097C-946B-40C6-A22B-DD21E7E92066}</Id></DataType><Default/><Domain/><ValidValues><ValidValuesWStr ObjectType="1060" CSAOName="ValidValuesWStr" CSAOCaption="Valid Values String"><Id>{EB7BBDAF-73E4-45F4-9670-5ABBEBD7D426}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesWStr></ValidValues></LERAttribute></Attributes><UniqueIdentifiers><LERUniqueIdentifier ObjectType="4011" CSAOName="LERUniqueIdentifier" CSAOCaption="Unique Identifier"><Id>{7311581A-4582-49A4-A8CE-261A4BEF5086}</Id><Name>Unique_Identifier1</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Caption>Unique_Identifier1</Caption><UniqueIdentifierItems><LERUniqueIdentifierItem ObjectType="4012" CSAOName="LERUniqueIdentifierItem" CSAOCaption="Unique Identifier Item"><Id>{A29C7219-8BE2-4916-B6FE-AA07C4C64B83}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Attribute><Id>{AA10BDC2-411F-41D6-83DE-B6B0B8199B60}</Id></Attribute></LERUniqueIdentifierItem></UniqueIdentifierItems><Relations><Id>{6CBAD64A-DFDF-4E90-BAC4-592E10992932}</Id><Id>{676D5371-72D8-4CD7-BFBE-B9538B3D0517}</Id><Id>{9733BBAB-5C59-422E-9C64-C5D7F3C3B66B}</Id></Relations></LERUniqueIdentifier></UniqueIdentifiers><PrimaryIdentifier><Id>{7311581A-4582-49A4-A8CE-261A4BEF5086}</Id></PrimaryIdentifier><Category/></LEREntity><LEREntity ObjectType="4004" CSAOName="LEREntity" CSAOCaption="Entity"><Id>{DE553AF0-A7FF-4FA0-87A3-F66F8CA9805D}</Id><Name>Typ_biletow</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Typ_biletow</Caption><Size>0</Size><Description></Description><Nature></Nature><DevDescription></DevDescription><Relations><Id>{6CBAD64A-DFDF-4E90-BAC4-592E10992932}</Id><Id>{CB4FE326-57A6-40AB-BB08-21512C9A558A}</Id></Relations><Attributes><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{3CCD9A86-1BA5-4DD3-9F19-9F9824020497}</Id><Name>Id_typu_biletu</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Id_typu_biletu</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{759BE5D0-5D47-4C1C-BA90-88888F50E72A}</Id></DataType><Default/><Domain/><UniqueIdentifierItems><Id>{8839B6BF-B655-4D3D-8A5A-0B885E0D9A78}</Id></UniqueIdentifierItems><ValidValues><ValidValuesInt ObjectType="1058" CSAOName="ValidValuesInt" CSAOCaption="Valid Values Integer"><Id>{3554C0D1-E471-4F05-9E58-6DF353A83D67}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesInt></ValidValues></LERAttribute><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{14BF1CD8-498B-4145-A227-B0D98A0CC26A}</Id><Name>Ulga</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Ulga</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{ADB5B344-F597-44D7-B4A0-135107B9043A}</Id></DataType><Default/><Domain/><ValidValues><ValidValues ObjectType="1061" CSAOName="ValidValues" CSAOCaption="Valid Values"><Id>{5738DB9B-F82F-4FC7-AE64-BED66C934271}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValues></ValidValues></LERAttribute><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{AD4A93D0-ECCF-4EEC-90EA-350249321FBA}</Id><Name>Strefa</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Strefa</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1>3</DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{AF7D097C-946B-40C6-A22B-DD21E7E92066}</Id></DataType><Default/><Domain/><ValidValues><ValidValuesWStr ObjectType="1060" CSAOName="ValidValuesWStr" CSAOCaption="Valid Values String"><Id>{8DFD457E-1833-401B-A149-95C49B34AA03}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesWStr></ValidValues></LERAttribute></Attributes><UniqueIdentifiers><LERUniqueIdentifier ObjectType="4011" CSAOName="LERUniqueIdentifier" CSAOCaption="Unique Identifier"><Id>{82BF5154-B847-4D3B-BFEA-87C4CC8F8DBA}</Id><Name>Unique_Identifier2</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Caption>Unique_Identifier2</Caption><UniqueIdentifierItems><LERUniqueIdentifierItem ObjectType="4012" CSAOName="LERUniqueIdentifierItem" CSAOCaption="Unique Identifier Item"><Id>{8839B6BF-B655-4D3D-8A5A-0B885E0D9A78}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Attribute><Id>{3CCD9A86-1BA5-4DD3-9F19-9F9824020497}</Id></Attribute></LERUniqueIdentifierItem></UniqueIdentifierItems><Relations><Id>{CB4FE326-57A6-40AB-BB08-21512C9A558A}</Id></Relations></LERUniqueIdentifier></UniqueIdentifiers><PrimaryIdentifier><Id>{82BF5154-B847-4D3B-BFEA-87C4CC8F8DBA}</Id></PrimaryIdentifier><Category/></LEREntity><LEREntity ObjectType="4004" CSAOName="LEREntity" CSAOCaption="Entity"><Id>{25E788EA-AD4E-4441-9BB4-97E34767C395}</Id><Name>Długoterminowe</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>3</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Długoterminowe</Caption><Size>0</Size><Description></Description><Nature></Nature><DevDescription></DevDescription><Attributes><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{C78ABE21-AAA8-4652-BF47-AAEE6F614461}</Id><Name>Waznosc</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>3</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Waznosc</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{7C3916E1-570F-45B1-B400-9019A966226B}</Id></DataType><Default/><Domain/><ValidValues><ValidValues ObjectType="1061" CSAOName="ValidValues" CSAOCaption="Valid Values"><Id>{1F45511A-768D-4AE7-BD86-784B3DA3484B}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValues></ValidValues></LERAttribute></Attributes><UniqueIdentifiers><LERUniqueIdentifier ObjectType="4011" CSAOName="LERUniqueIdentifier" CSAOCaption="Unique Identifier"><Id>{33921F37-0EF1-48F7-B788-29E287A8606B}</Id><Name>Unique_Identifier3</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Caption>Unique_Identifier3</Caption></LERUniqueIdentifier></UniqueIdentifiers><PrimaryIdentifier><Id>{33921F37-0EF1-48F7-B788-29E287A8606B}</Id></PrimaryIdentifier><Category/></LEREntity><LEREntity ObjectType="4004" CSAOName="LEREntity" CSAOCaption="Entity"><Id>{E02432AC-8D00-4459-95A9-84C31050AB53}</Id><Name>Krótkoterminowe</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>3</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Krótkoterminowe</Caption><Size>0</Size><Description></Description><Nature></Nature><DevDescription></DevDescription><Attributes><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{ED8085A8-256B-45DF-A2CC-52ED975161B7}</Id><Name>Waznosc</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>3</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Waznosc</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{7C3916E1-570F-45B1-B400-9019A966226B}</Id></DataType><Default/><Domain/><ValidValues><ValidValues ObjectType="1061" CSAOName="ValidValues" CSAOCaption="Valid Values"><Id>{8FF139B9-DE5F-4859-B49D-45074B64E76E}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValues></ValidValues></LERAttribute><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{9E1D21C2-29E5-4CA4-B69F-C38CD01E7529}</Id><Name>Ilosc_osob</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Ilosc_osob</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{09ADD3B8-7F89-49F6-873B-324E839F984B}</Id></DataType><Default/><Domain/><ValidValues><ValidValues ObjectType="1061" CSAOName="ValidValues" CSAOCaption="Valid Values"><Id>{A2AF9D4F-EC17-4A06-8C39-9C616DA8B6F7}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValues></ValidValues></LERAttribute></Attributes><UniqueIdentifiers><LERUniqueIdentifier ObjectType="4011" CSAOName="LERUniqueIdentifier" CSAOCaption="Unique Identifier"><Id>{C37946B5-8048-4B1C-9EA7-EFFE2FC1736C}</Id><Name>Unique_Identifier4</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Caption>Unique_Identifier4</Caption></LERUniqueIdentifier></UniqueIdentifiers><PrimaryIdentifier><Id>{C37946B5-8048-4B1C-9EA7-EFFE2FC1736C}</Id></PrimaryIdentifier><Category/></LEREntity><LEREntity ObjectType="4004" CSAOName="LEREntity" CSAOCaption="Entity"><Id>{1FD13989-AAE7-411E-B127-161FC46A8F55}</Id><Name>Nosniki</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>3</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Nosniki</Caption><Size>0</Size><Description></Description><Nature></Nature><DevDescription></DevDescription><Relations><Id>{9733BBAB-5C59-422E-9C64-C5D7F3C3B66B}</Id><Id>{2E53E149-C771-48BA-B70B-A8D02F9E9384}</Id><Id>{CB4FE326-57A6-40AB-BB08-21512C9A558A}</Id><Id>{D46DB8D0-8070-4E4A-B0BB-FBCE6B05CDEE}</Id></Relations><Attributes><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{69D9F016-070A-4EAC-8AF1-AA2EA9F8E300}</Id><Name>Id_nosnika</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Id_nosnika</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{759BE5D0-5D47-4C1C-BA90-88888F50E72A}</Id></DataType><Default/><Domain/><UniqueIdentifierItems><Id>{0ADFE8EC-B999-4707-8595-51800FC9AD53}</Id></UniqueIdentifierItems><ValidValues><ValidValuesInt ObjectType="1058" CSAOName="ValidValuesInt" CSAOCaption="Valid Values Integer"><Id>{4D224E0F-5060-4525-A1EF-38C0E16876D7}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesInt></ValidValues></LERAttribute></Attributes><UniqueIdentifiers><LERUniqueIdentifier ObjectType="4011" CSAOName="LERUniqueIdentifier" CSAOCaption="Unique Identifier"><Id>{0E6EF5B9-BC18-47C7-B63A-6AD80D022228}</Id><Name>Unique_Identifier5</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Caption>Unique_Identifier5</Caption><UniqueIdentifierItems><LERUniqueIdentifierItem ObjectType="4012" CSAOName="LERUniqueIdentifierItem" CSAOCaption="Unique Identifier Item"><Id>{0ADFE8EC-B999-4707-8595-51800FC9AD53}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Attribute><Id>{69D9F016-070A-4EAC-8AF1-AA2EA9F8E300}</Id></Attribute></LERUniqueIdentifierItem></UniqueIdentifierItems><Relations><Id>{2E53E149-C771-48BA-B70B-A8D02F9E9384}</Id><Id>{CB4FE326-57A6-40AB-BB08-21512C9A558A}</Id><Id>{D46DB8D0-8070-4E4A-B0BB-FBCE6B05CDEE}</Id></Relations></LERUniqueIdentifier></UniqueIdentifiers><PrimaryIdentifier><Id>{0E6EF5B9-BC18-47C7-B63A-6AD80D022228}</Id></PrimaryIdentifier><Category/></LEREntity><LEREntity ObjectType="4004" CSAOName="LEREntity" CSAOCaption="Entity"><Id>{63BB00EC-BC1A-424A-AB99-2395CBBCA1FC}</Id><Name>Punkty_sprzedazy</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>3</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Punkty_sprzedazy</Caption><Size>0</Size><Description></Description><Nature></Nature><DevDescription></DevDescription><Relations><Id>{676D5371-72D8-4CD7-BFBE-B9538B3D0517}</Id><Id>{D46DB8D0-8070-4E4A-B0BB-FBCE6B05CDEE}</Id></Relations><Attributes><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{00B580C4-281C-4D46-BC2F-BAA7D0358368}</Id><Name>Id_punktu_sprzedazy</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Id_punktu_sprzedazy</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{759BE5D0-5D47-4C1C-BA90-88888F50E72A}</Id></DataType><Default/><Domain/><UniqueIdentifierItems><Id>{7C7DD159-8AA4-4A59-9DDC-05CFE2F9EF3F}</Id></UniqueIdentifierItems><ValidValues><ValidValuesInt ObjectType="1058" CSAOName="ValidValuesInt" CSAOCaption="Valid Values Integer"><Id>{3D7B7916-13F1-4625-8AB2-72305569268F}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesInt></ValidValues></LERAttribute></Attributes><UniqueIdentifiers><LERUniqueIdentifier ObjectType="4011" CSAOName="LERUniqueIdentifier" CSAOCaption="Unique Identifier"><Id>{FF133D1D-EE87-4DDA-9606-6E624A40BE45}</Id><Name>Unique_Identifier6</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Caption>Unique_Identifier6</Caption><UniqueIdentifierItems><LERUniqueIdentifierItem ObjectType="4012" CSAOName="LERUniqueIdentifierItem" CSAOCaption="Unique Identifier Item"><Id>{7C7DD159-8AA4-4A59-9DDC-05CFE2F9EF3F}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Attribute><Id>{00B580C4-281C-4D46-BC2F-BAA7D0358368}</Id></Attribute></LERUniqueIdentifierItem></UniqueIdentifierItems><Relations><Id>{D46DB8D0-8070-4E4A-B0BB-FBCE6B05CDEE}</Id></Relations></LERUniqueIdentifier></UniqueIdentifiers><PrimaryIdentifier><Id>{FF133D1D-EE87-4DDA-9606-6E624A40BE45}</Id></PrimaryIdentifier><Category/></LEREntity><LEREntity ObjectType="4004" CSAOName="LEREntity" CSAOCaption="Entity"><Id>{3671F7C7-0DE3-4FB1-821F-F33C458AD4B4}</Id><Name>Pasazerowie</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Pasazerowie</Caption><Size>0</Size><Description></Description><Nature></Nature><DevDescription></DevDescription><Relations><Id>{2E53E149-C771-48BA-B70B-A8D02F9E9384}</Id></Relations><Attributes><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{E9275E27-7701-4B67-AF14-1CAF2E2C9EED}</Id><Name>Id_pasazera</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Id_pasazera</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1></DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{A3E474F4-D1A7-4885-A1FF-936A0A80D9EE}</Id></DataType><Default/><Domain/><UniqueIdentifierItems><Id>{426B09F4-E64D-4C06-90C6-F7B116891208}</Id></UniqueIdentifierItems><ValidValues><ValidValuesInt ObjectType="1058" CSAOName="ValidValuesInt" CSAOCaption="Valid Values Integer"><Id>{BFBE1A01-98E5-4A60-9EB1-A8035E7CEF39}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesInt></ValidValues></LERAttribute><LERAttribute ObjectType="4007" CSAOName="LERAttribute" CSAOCaption="Attribute"><Id>{5B24A012-1475-4A5D-9681-2D6D0C4BD9B6}</Id><Name>Imie</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>Imie</Caption><Mandatory>1</Mandatory><Description></Description><DataTypeParam1>30</DataTypeParam1><DataTypeParam2></DataTypeParam2><PropagateName></PropagateName><DevDescription></DevDescription><DataType><Id>{AF7D097C-946B-40C6-A22B-DD21E7E92066}</Id></DataType><Default/><Domain/><ValidValues><ValidValuesWStr ObjectType="1060" CSAOName="ValidValuesWStr" CSAOCaption="Valid Values String"><Id>{9AF85B41-2B58-49A1-9EF8-FF14B7736DDA}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesWStr></ValidValues></LERAttribute></Attributes><UniqueIdentifiers><LERUniqueIdentifier ObjectType="4011" CSAOName="LERUniqueIdentifier" CSAOCaption="Unique Identifier"><Id>{25CE2FCE-9234-471E-AA09-AEF2F0116F18}</Id><Name>Unique_Identifier7</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Caption>Unique_Identifier7</Caption><UniqueIdentifierItems><LERUniqueIdentifierItem ObjectType="4012" CSAOName="LERUniqueIdentifierItem" CSAOCaption="Unique Identifier Item"><Id>{426B09F4-E64D-4C06-90C6-F7B116891208}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>1</VerifyState><Attribute><Id>{E9275E27-7701-4B67-AF14-1CAF2E2C9EED}</Id></Attribute></LERUniqueIdentifierItem></UniqueIdentifierItems><Relations><Id>{2E53E149-C771-48BA-B70B-A8D02F9E9384}</Id></Relations></LERUniqueIdentifier></UniqueIdentifiers><PrimaryIdentifier><Id>{25CE2FCE-9234-471E-AA09-AEF2F0116F18}</Id></PrimaryIdentifier><Category/></LEREntity></Entities><Relations><LERRelation ObjectType="4005" CSAOName="LERRelation" CSAOCaption="Relation"><Id>{6CBAD64A-DFDF-4E90-BAC4-592E10992932}</Id><Name>sprzedaje</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{E57A003D-5E5D-47BF-87EC-F68C6575A1DA}</Id></O1><O2><Id>{DE553AF0-A7FF-4FA0-87A3-F66F8CA9805D}</Id></O2><Card1Low>1</Card1Low><Card1High>1</Card1High><Card2Low>0</Card2Low><Card2High>-1</Card2High><Caption>sprzedaje</Caption><OnlyLogical>0</OnlyLogical><Dependency1>0</Dependency1><Dependency2>0</Dependency2><Description></Description><DominantRole1>0</DominantRole1><DominantRole2>0</DominantRole2><DevDescription></DevDescription><ForeignUniqueIdentifier><Id>{7311581A-4582-49A4-A8CE-261A4BEF5086}</Id></ForeignUniqueIdentifier><ForeignUniqueIdentifierOpposite/><Category/></LERRelation><LERRelation ObjectType="4005" CSAOName="LERRelation" CSAOCaption="Relation"><Id>{676D5371-72D8-4CD7-BFBE-B9538B3D0517}</Id><Name>posiada</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{E57A003D-5E5D-47BF-87EC-F68C6575A1DA}</Id></O1><O2><Id>{63BB00EC-BC1A-424A-AB99-2395CBBCA1FC}</Id></O2><Card1Low>1</Card1Low><Card1High>1</Card1High><Card2Low>0</Card2Low><Card2High>-1</Card2High><Caption>posiada</Caption><OnlyLogical>0</OnlyLogical><Dependency1>0</Dependency1><Dependency2>0</Dependency2><Description></Description><DominantRole1>0</DominantRole1><DominantRole2>0</DominantRole2><DevDescription></DevDescription><ForeignUniqueIdentifier><Id>{7311581A-4582-49A4-A8CE-261A4BEF5086}</Id></ForeignUniqueIdentifier><ForeignUniqueIdentifierOpposite/><Category/></LERRelation><LERRelation ObjectType="4005" CSAOName="LERRelation" CSAOCaption="Relation"><Id>{9733BBAB-5C59-422E-9C64-C5D7F3C3B66B}</Id><Name>oferuje</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{E57A003D-5E5D-47BF-87EC-F68C6575A1DA}</Id></O1><O2><Id>{1FD13989-AAE7-411E-B127-161FC46A8F55}</Id></O2><Card1Low>1</Card1Low><Card1High>1</Card1High><Card2Low>0</Card2Low><Card2High>-1</Card2High><Caption>oferuje</Caption><OnlyLogical>0</OnlyLogical><Dependency1>0</Dependency1><Dependency2>0</Dependency2><Description></Description><DominantRole1>0</DominantRole1><DominantRole2>0</DominantRole2><DevDescription></DevDescription><ForeignUniqueIdentifier><Id>{7311581A-4582-49A4-A8CE-261A4BEF5086}</Id></ForeignUniqueIdentifier><ForeignUniqueIdentifierOpposite/><Category/></LERRelation><LERRelation ObjectType="4005" CSAOName="LERRelation" CSAOCaption="Relation"><Id>{2E53E149-C771-48BA-B70B-A8D02F9E9384}</Id><Name>kupuje</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{1FD13989-AAE7-411E-B127-161FC46A8F55}</Id></O1><O2><Id>{3671F7C7-0DE3-4FB1-821F-F33C458AD4B4}</Id></O2><Card1Low>1</Card1Low><Card1High>-1</Card1High><Card2Low>0</Card2Low><Card2High>1</Card2High><Caption>kupuje</Caption><OnlyLogical>0</OnlyLogical><Dependency1>0</Dependency1><Dependency2>0</Dependency2><Description></Description><DominantRole1>1</DominantRole1><DominantRole2>0</DominantRole2><DevDescription></DevDescription><ForeignUniqueIdentifier><Id>{0E6EF5B9-BC18-47C7-B63A-6AD80D022228}</Id></ForeignUniqueIdentifier><ForeignUniqueIdentifierOpposite><Id>{25CE2FCE-9234-471E-AA09-AEF2F0116F18}</Id></ForeignUniqueIdentifierOpposite><Category/></LERRelation><LERRelation ObjectType="4005" CSAOName="LERRelation" CSAOCaption="Relation"><Id>{CB4FE326-57A6-40AB-BB08-21512C9A558A}</Id><Name>znajduje_sie_na</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{DE553AF0-A7FF-4FA0-87A3-F66F8CA9805D}</Id></O1><O2><Id>{1FD13989-AAE7-411E-B127-161FC46A8F55}</Id></O2><Card1Low>1</Card1Low><Card1High>-1</Card1High><Card2Low>1</Card2Low><Card2High>-1</Card2High><Caption>znajduje_sie_na</Caption><OnlyLogical>0</OnlyLogical><Dependency1>0</Dependency1><Dependency2>0</Dependency2><Description></Description><DominantRole1>0</DominantRole1><DominantRole2>0</DominantRole2><DevDescription></DevDescription><ForeignUniqueIdentifier><Id>{82BF5154-B847-4D3B-BFEA-87C4CC8F8DBA}</Id></ForeignUniqueIdentifier><ForeignUniqueIdentifierOpposite><Id>{0E6EF5B9-BC18-47C7-B63A-6AD80D022228}</Id></ForeignUniqueIdentifierOpposite><Category/></LERRelation><LERRelation ObjectType="4005" CSAOName="LERRelation" CSAOCaption="Relation"><Id>{D46DB8D0-8070-4E4A-B0BB-FBCE6B05CDEE}</Id><Name>posiada_w_sprzedazy</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{63BB00EC-BC1A-424A-AB99-2395CBBCA1FC}</Id></O1><O2><Id>{1FD13989-AAE7-411E-B127-161FC46A8F55}</Id></O2><Card1Low>1</Card1Low><Card1High>-1</Card1High><Card2Low>0</Card2Low><Card2High>-1</Card2High><Caption>posiada_w_sprzedazy</Caption><OnlyLogical>0</OnlyLogical><Dependency1>0</Dependency1><Dependency2>1</Dependency2><Description></Description><DominantRole1>0</DominantRole1><DominantRole2>0</DominantRole2><DevDescription></DevDescription><ForeignUniqueIdentifier><Id>{FF133D1D-EE87-4DDA-9606-6E624A40BE45}</Id></ForeignUniqueIdentifier><ForeignUniqueIdentifierOpposite><Id>{0E6EF5B9-BC18-47C7-B63A-6AD80D022228}</Id></ForeignUniqueIdentifierOpposite><Category/></LERRelation></Relations><Inheritances><LERInheritance ObjectType="4006" CSAOName="LERInheritance" CSAOCaption="Inheritance"><Id>{F21630BF-3500-4DED-8442-D6DE4B9AB54C}</Id><Name>okresla_podtyp</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID><VerifyState>4</VerifyState><OnlyLogical>0</OnlyLogical><Caption>okresla_podtyp</Caption><Exclusive>0</Exclusive><Description></Description><PhysicalImplementation>0</PhysicalImplementation><Complete>0</Complete><DevDescription></DevDescription><ChildLinks><Id>{63709A4E-BB85-4B07-958C-4FE0EA4A1CA5}</Id><Id>{D1C8A93A-753D-4EBC-9C10-CFECBB295824}</Id></ChildLinks><ParentLink><Id>{8904E467-5AF4-499D-8D6A-882D31163EB5}</Id></ParentLink><Discriminator><Id>{3CCD9A86-1BA5-4DD3-9F19-9F9824020497}</Id></Discriminator><Category/></LERInheritance></Inheritances><InheritancesChild><LERInheritanceChildLink ObjectType="4014" CSAOName="LERInheritanceChildLink" CSAOCaption="Inheritance Child Link"><Id>{63709A4E-BB85-4B07-958C-4FE0EA4A1CA5}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{E02432AC-8D00-4459-95A9-84C31050AB53}</Id></O1><O2><Id>{F21630BF-3500-4DED-8442-D6DE4B9AB54C}</Id></O2><Discriminator><ValidValuesInt ObjectType="1058" CSAOName="ValidValuesInt" CSAOCaption="Valid Values Integer"><Id>{547611F8-76D6-4039-9B18-586BBB72B1A2}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesInt></Discriminator></LERInheritanceChildLink><LERInheritanceChildLink ObjectType="4014" CSAOName="LERInheritanceChildLink" CSAOCaption="Inheritance Child Link"><Id>{D1C8A93A-753D-4EBC-9C10-CFECBB295824}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{25E788EA-AD4E-4441-9BB4-97E34767C395}</Id></O1><O2><Id>{F21630BF-3500-4DED-8442-D6DE4B9AB54C}</Id></O2><Discriminator><ValidValuesInt ObjectType="1058" CSAOName="ValidValuesInt" CSAOCaption="Valid Values Integer"><Id>{0AFC53AB-453A-4A28-BABF-17E2172783C9}</Id><Name>ValidValue</Name><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><GalleryItemID>{00000000-0000-0000-0000-000000000000}</GalleryItemID><GalleryID>{00000000-0000-0000-0000-000000000000}</GalleryID><GalleryObjectID>{00000000-0000-0000-0000-000000000000}</GalleryObjectID></ValidValuesInt></Discriminator></LERInheritanceChildLink></InheritancesChild><InheritancesParent><LERInheritanceParentLink ObjectType="4013" CSAOName="LERInheritanceParentLink" CSAOCaption="Inheritance Parent Link"><Id>{8904E467-5AF4-499D-8D6A-882D31163EB5}</Id><Ordinal>0</Ordinal><GlobalOrder>0</GlobalOrder><O1><Id>{DE553AF0-A7FF-4FA0-87A3-F66F8CA9805D}</Id></O1><O2><Id>{F21630BF-3500-4DED-8442-D6DE4B9AB54C}</Id></O2></LERInheritanceParentLink></InheritancesParent></LERModel>
TXL
2
julklos/BD2-Tickets
Tickets.txl
[ "MIT" ]
/************************************************************* Download latest Blynk library here: https://github.com/blynkkk/blynk-library/releases/latest Blynk is a platform with iOS and Android apps to control Arduino, Raspberry Pi and the likes over the Internet. You can easily build graphic interfaces for all your projects by simply dragging and dropping widgets. Downloads, docs, tutorials: http://www.blynk.cc Sketch generator: http://examples.blynk.cc Blynk community: http://community.blynk.cc Follow us: http://www.fb.com/blynkapp http://twitter.com/blynk_app Blynk library is licensed under MIT license This example code is in public domain. ************************************************************* Blynk using a LED widget on your phone! App project setup: LED widget on V3 *************************************************************/ /* Comment this out to disable prints and save space */ #define BLYNK_PRINT Serial /* Fill-in your Template ID (only if using Blynk.Cloud) */ //#define BLYNK_TEMPLATE_ID "YourTemplateID" #include <SPI.h> #include <Ethernet.h> #include <BlynkSimpleEthernet.h> // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "YourAuthToken"; // Select your pin with physical button const int btnPin = 1; WidgetLED led3(V3); BlynkTimer timer; // V3 LED Widget represents the physical button state boolean btnState = false; void buttonLedWidget() { // Read button boolean isPressed = (digitalRead(btnPin) == LOW); // If state has changed... if (isPressed != btnState) { if (isPressed) { led3.on(); } else { led3.off(); } btnState = isPressed; } } void setup() { // Debug console Serial.begin(9600); Blynk.begin(auth); // Setup physical button pin (active low) pinMode(btnPin, INPUT_PULLUP); timer.setInterval(500L, buttonLedWidget); } void loop() { Blynk.run(); timer.run(); }
Arduino
5
kayatmin/blynk-library
examples/Widgets/LED/LED_StatusOfButton/LED_StatusOfButton.ino
[ "MIT" ]
/* ** Case Study Financial Econometrics 4.3 ** ** Purpose: ** Estimate all log linear Gaussian Realized GAS model parameters ** ** Date: ** 10/01/2015 ** ** Author: ** Tamer Dilaver, Koen de Man & Sina Zolnoor ** ** Supervisor: ** L.F. Hoogerheide & S.J. Koopman ** */ #include <oxstd.h> #include <oxdraw.h> #include <oxprob.h> #include <maximize.h> #import <modelbase> #import <simula> #include <oxfloat.h> static decl iB; //Repeats static decl iSIZE; //Size of time series static decl iSTEPS; //#Steps to divide the size static decl iSIMS; //# of Zt ~ N(0,1) static decl dALPHA_START; //actually gamma in notes static decl dBETA_START; static decl dOMEGA_START; static decl dGAMMA_START; //:=h_1 static decl dXI_START; static decl dSIGMA2_U_START; static decl dPHI_START; //denoted as \varphi in notes static decl s_vY; //Simulated returns static decl s_vX; //Simulated realized measure static decl s_vDate; static decl dRATIO; /* ** Function: Transform (start)parameters ** ** Input: vTheta [parametervalues] ** ** Output: vThetaStar */ fTransform(const avThetaStar, const vTheta){ avThetaStar[0]= vTheta; avThetaStar[0][0] = log(vTheta[0]); avThetaStar[0][1] = log(vTheta[1]); avThetaStar[0][2] = log(vTheta[2]); avThetaStar[0][3] = (vTheta[3]); avThetaStar[0][4] = (vTheta[4]); avThetaStar[0][5] = log(vTheta[5]); return 1; } /* ** Function: Extract the parameters from vTheta ** ** Input: adOmega, adBeta, adGamma, adXi, adPhi, adTau_1, adTau_2, adSigma2_u, vTheta ** 0 1 2 3 4 5 6 7 ** Output: 1 */ fGetPars(const adOmega, const adBeta, const adGamma, const adXi, const adPhi, const adSigma2_u, const vTheta){ adOmega[0] = exp(vTheta[0]); adBeta[0] = exp(vTheta[1]); adGamma[0] = exp(vTheta[2]); adXi[0] = (vTheta[3]); adPhi[0] = (vTheta[4]); adSigma2_u[0] = exp(vTheta[5]); return 1; } /* ** Function: Calculates average value loglikelihood for realized Gaussian GAS given parameter values ** ** Input: vTheta [parameter values], adFunc [adress function value], avScore [the score], amHessian [hessian matrix] ** ** Output: 1 ** */ fLogLike_RealGAS(const vTheta, const adFunc, const avScore, const amHessian){ decl dOmega, dBeta, dGamma, dXi, dPhi, dSigma2_u; fGetPars(&dOmega, &dBeta, &dGamma, &dXi, &dPhi, &dSigma2_u, vTheta); decl dH = dOmega/(1-dBeta); decl vlogEta = zeros(sizerc(s_vY), 1); for(decl i = 0; i < sizerc(s_vY); ++i){ //likelihood contribution vlogEta[i] = 2*log(M_2PI) +log(dH) + s_vY[i]^2 / dH + log(dSigma2_u) + (s_vX[i] - dXi - dPhi*dH)^2/dSigma2_u; //Gaussian //GAS recursion dH = dOmega + dBeta * dH + dGamma * (s_vY[i]^2*dSigma2_u+2*dPhi*dH^2*(s_vX[i]-dXi-dPhi*dH)-dH*dSigma2_u)/(dSigma2_u+2*dPhi^2*dH^2); } adFunc[0] = sumc(vlogEta)/(-2*sizerc(s_vY)); //Average return 1; } /* ** Function: Transform parameters back ** ** Input: vThetaStar ** ** Output: vTheta [parametervalues] */ fTransformBack(const avTheta, const vThetaStar){ avTheta[0]= vThetaStar; avTheta[0][0] = exp(vThetaStar[0]); avTheta[0][1] = exp(vThetaStar[1]); avTheta[0][2] = exp(vThetaStar[2]); avTheta[0][3] = (vThetaStar[3]); avTheta[0][4] = (vThetaStar[4]); avTheta[0][5] = exp(vThetaStar[5]); return 1; } /* ** Function: calculate standard errors ** ** Input: vThetaStar ** ** Output: vStdErrors */ fSigmaStdError(const vThetaStar){ decl iN, mHessian, mHess, mJacobian, vStdErrors, vP; iN = sizerc(s_vY); Num2Derivative(fLogLike_RealGAS, vThetaStar, &mHessian); NumJacobian(fTransformBack, vThetaStar, &mJacobian); //numerical Jacobian mHessian = mJacobian*invert(-iN*mHessian)*mJacobian'; vStdErrors = sqrt(diagonal(mHessian)'); return vStdErrors; } /* ** Function: calculate variance of model ** ** Input: vTheta ** ** Output: vH [vector with variances] */ fVariance(const vTheta){ decl dOmega, dBeta, dGamma, dXi, dPhi, dSigma2_u; fGetPars(&dOmega, &dBeta, &dGamma, &dXi, &dPhi, &dSigma2_u, vTheta); decl vH = zeros(sizerc(s_vY),1); vH[0] = dOmega/(1-dBeta); for(decl i = 1; i < sizerc(s_vY); i++){ vH[i] = dOmega + dBeta*vH[i-1]+ dGamma*(s_vY[i-1]^2*dSigma2_u+2*dPhi*vH[i-1]^2*(s_vX[i-1]-dXi-dPhi*vH[i-1])-vH[i-1]*dSigma2_u)/(dSigma2_u+2*dPhi^2*vH[i-1]^2); } return vH; } /* ** Function: Estimate log realized GAS parameters ** ** Input: vReturns, adAlpha_hat, adBeta_hat, adOmega_hat, adGamma_hat ** ** Output: vTheta [estimated parametervalues] */ fEstimateLogRealGAS(const vReturns, const vRealMeasure, const adOmega_hat, const adBeta_hat, const adGamma_hat, const adXi_hat, const adPhi_hat, const adSigma2_u_hat, const avVariance){ //initialise parameter values decl vTheta = zeros(6,1); vTheta[0] = dOMEGA_START; vTheta[1] = dBETA_START; vTheta[2] = dGAMMA_START; vTheta[3] = dXI_START; vTheta[4] = dPHI_START; vTheta[5] = dSIGMA2_U_START; decl vThetaStart = vTheta; //globalize returns and vectorize true pars s_vY = vReturns; s_vX = vRealMeasure; //transform parameters decl vThetaStar; fTransform(&vThetaStar, vTheta); //Maximize the LL decl dFunc; decl iA; iA=MaxBFGS(fLogLike_RealGAS, &vThetaStar, &dFunc, 0, TRUE); //Transform thetasStar back fTransformBack(&vTheta, vThetaStar); //return pars adOmega_hat[0] = vTheta[0]; adBeta_hat[0] = vTheta[1]; adGamma_hat[0] = vTheta[2]; adXi_hat[0] = vTheta[3]; adPhi_hat[0] = vTheta[4]; adSigma2_u_hat[0] = vTheta[5]; decl vSigmaStdError = fSigmaStdError(vThetaStar); decl vVariance = fVariance(vThetaStar); avVariance[0] = vVariance; print("\n",MaxConvergenceMsg(iA)); println("\nFunctiewaarde likelihood eindwaardes:", dFunc); print("\nOptimale parameters met standaarderrors \n", "%r", { "omega", "beta", "gamma", "xi", "phi","sigma2_u"}, "%c", {"thetaStart","theta","std.error"}, vThetaStart~vTheta~vSigmaStdError); return 1; } /* ** Function: Determine Forecast ** ** Input: vTheta ** ** Output: vH [vector of forecasts] */ fForecast(const vTheta){ decl dOmega, dBeta, dGamma, dXi, dPhi, dSigma2_u; fGetPars(&dOmega, &dBeta, &dGamma, &dXi, &dPhi, &dSigma2_u, vTheta); decl vH = zeros((sizerc(s_vY)+1),1); vH[0] = dOmega/(1-dBeta); for(decl i = 1; i < sizerc(s_vY)+1; i++){ vH[i] = dOmega + dBeta*vH[i-1]+ dGamma*(s_vY[i-1]^2*dSigma2_u+2*dPhi*vH[i-1]^2*(s_vX[i-1]-dXi-dPhi*vH[i-1])-vH[i-1]*dSigma2_u)/(dSigma2_u+2*dPhi^2*vH[i-1]^2); } return vH[sizerc(s_vY)]; } /* ** Function: Compute MAE ** ** Input: adMAE_OC [adress of MAE], vReturns_1 [return series], vBenchmark [Benchmark], dC [ratio] ** ** Output: 1 */ fMAE(const adMAE, const vReturns, const vRV, const vBenchmark, const dC){ decl iWindow = 250; decl iT = sizerc(vReturns); decl vH_forecast = zeros(iWindow, 1); decl vSqrd_error = zeros(iWindow, 1); dOMEGA_START = 0.01; dBETA_START = 0.99; dGAMMA_START = 0.1; dXI_START = 0.0; dPHI_START = 0.9; dSIGMA2_U_START = 0.2; for(decl j = 0; j<iWindow; j++){ s_vY = vReturns[j:(iT - iWindow +j)]; s_vX = vRV[j:(iT - iWindow +j)]; //initialise parameter values decl vTheta = zeros(6,1); vTheta[0] = dOMEGA_START; vTheta[1] = dBETA_START; vTheta[2] = dGAMMA_START; vTheta[3] = dXI_START; vTheta[4] = dPHI_START; vTheta[5] = dSIGMA2_U_START; //transform parameters decl vThetaStar; fTransform(&vThetaStar, vTheta); //Maximize the LL decl dFunc; decl iA; iA=MaxBFGS(fLogLike_RealGAS, &vThetaStar, &dFunc, 0, TRUE); //Transform thetasStar back fTransformBack(&vTheta, vThetaStar); dOMEGA_START = vTheta[0]; dBETA_START = vTheta[1]; dGAMMA_START = vTheta[2]; dXI_START = vTheta[3]; dPHI_START = vTheta[4]; dSIGMA2_U_START = vTheta[5]; vH_forecast[j] = fForecast(vThetaStar); vSqrd_error[j] = fabs(dC*vH_forecast[j] - dRATIO*vBenchmark[(iT - iWindow +j)]); } savemat("vAE_CC_RK_LIN_RV_REALGAS.xls", vSqrd_error); adMAE[0] = meanc(vSqrd_error); return 1; } /* ** Function: Compute MSE ** ** Input: adMSE_OC [adress of MAE], vReturns_1 [return series], vBenchmark [Benchmark], dC [ratio] ** ** Output: 1 */ fMSE(const adMSE, const vReturns, const vRV, const vBenchmark, const dC){ decl iWindow = 250; decl iT = sizerc(vReturns); // decl vTemp_returns = vReturns_1; decl vH_forecast = zeros(iWindow, 1); decl vSqrd_error = zeros(iWindow, 1); dOMEGA_START = 0.01; dBETA_START = 0.99; dGAMMA_START = 0.1; dXI_START = 0.0; dPHI_START = 0.9; dSIGMA2_U_START = 0.2; for(decl j = 0; j<iWindow; j++){ s_vY = vReturns[j:(iT - iWindow +j)]; s_vX = vRV[j:(iT - iWindow +j)]; //initialise parametervalues decl vTheta = zeros(6,1); vTheta[0] = dOMEGA_START; vTheta[1] = dBETA_START; vTheta[2] = dGAMMA_START; vTheta[3] = dXI_START; vTheta[4] = dPHI_START; vTheta[5] = dSIGMA2_U_START; //transform parameters decl vThetaStar; fTransform(&vThetaStar, vTheta); //Maximize the LL decl dFunc; decl iA; iA=MaxBFGS(fLogLike_RealGAS, &vThetaStar, &dFunc, 0, TRUE); //Transform thetasStar back fTransformBack(&vTheta, vThetaStar); dOMEGA_START = vTheta[0]; dBETA_START = vTheta[1]; dGAMMA_START = vTheta[2]; dXI_START = vTheta[3]; dPHI_START = vTheta[4]; dSIGMA2_U_START = vTheta[5]; vH_forecast[j] = fForecast(vThetaStar); vSqrd_error[j] = (dC*vH_forecast[j] - dRATIO*vBenchmark[(iT - iWindow +j)])^2; //print((dC*vH_forecast[j]) ~ (dRATIO*vBenchmark[(iT - iWindow +j)]),"\n"); } adMSE[0] = meanc(vSqrd_error); return 1; } /* ** MAIN PROGRAM ** ** Purpose: Estimate linear Gaussian Realized GAS parameters ** ** Output: Figures */ main(){ //laad SBUX returns decl mData_1 = loadmat("ReturnsOpenToClose.csv"); decl mData_2 = loadmat("ReturnsCloseToClose.csv"); decl vReturns_1 = 100*mData_1[:][1]; decl vReturns_2 = 100*mData_2[:][1]; decl vRV = loadmat("RV.csv"); decl vBV = loadmat("BV.csv"); decl vRK = loadmat("RK.csv"); dRATIO = (varc(vReturns_1) +varc(vReturns_2))/varc(vReturns_1); s_vX = vRK; //pick vRV, vBV or vKV //laad Dates SBUX returns decl vTemp_Date = mData_2[][0]; decl vYear = floor(vTemp_Date/10000); decl vMonth = floor((vTemp_Date-floor(vTemp_Date/10000)*10000)/100); decl vDay = vTemp_Date-floor(vTemp_Date/100)*100; s_vDate = dayofcalendar(vYear, vMonth, vDay); dOMEGA_START = 0.01; dBETA_START = 0.99; dGAMMA_START = 0.1; dXI_START = 0.0; dPHI_START = 0.8; dSIGMA2_U_START = 0.02; decl dOmega_hat, dBeta_hat, dGamma_hat, dXi_hat, dPhi_hat, dSigma2_u_hat; decl vVariance_1, vVariance_2; print("\nO-C"); fEstimateLogRealGAS(vReturns_1, s_vX, &dOmega_hat, &dBeta_hat, &dGamma_hat, &dXi_hat, &dPhi_hat, &dSigma2_u_hat, &vVariance_1); print("\nC-C"); fEstimateLogRealGAS(vReturns_2, s_vX, &dOmega_hat, &dBeta_hat, &dGamma_hat, &dXi_hat, &dPhi_hat, &dSigma2_u_hat, &vVariance_2); //graphs SetDrawWindow("CS_EMP_5_linear_RealGAS(1,1)"); DrawTMatrix(0, (vReturns_1~sqrt(vVariance_1))', {"Open-to-close"}, s_vDate'); DrawTMatrix(1, (vReturns_2~sqrt(vVariance_2))', {"Close-to-close"}, s_vDate'); ShowDrawWindow(); //forecasts MAE and MSE decl vBenchmark = vRK; decl dMAE_OC; fMAE(&dMAE_OC, vReturns_1, vRV, vBenchmark, dRATIO); print("\n dMAE_OC = ",dMAE_OC); decl dMAE_CC; fMAE(&dMAE_CC, vReturns_2, vRV, vBenchmark, 1); print("\n dMAE_CC = ",dMAE_CC); decl dMSE_OC; fMSE(&dMSE_OC, vReturns_1, vRK, vBenchmark, dRATIO); print("\n dMSE_OC = ",dMSE_OC); decl dMSE_CC; fMSE(&dMSE_CC, vReturns_2, vRK, vBenchmark, 1); print("\n dMSE_CC = ",dMSE_CC); }
Ox
5
tamerdilaver/Group4_Code_Data
CS_EMP_5_linear_Gaussian_RealGAS.ox
[ "MIT" ]
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.spark.sql.execution.datasources import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean import scala.collection.JavaConverters._ import com.google.common.cache._ import org.apache.hadoop.fs.{FileStatus, Path} import org.apache.spark.internal.Logging import org.apache.spark.sql.SparkSession import org.apache.spark.util.SizeEstimator /** * Use [[FileStatusCache.getOrCreate()]] to construct a globally shared file status cache. */ object FileStatusCache { private var sharedCache: SharedInMemoryCache = _ /** * @return a new FileStatusCache based on session configuration. Cache memory quota is * shared across all clients. */ def getOrCreate(session: SparkSession): FileStatusCache = synchronized { if (session.sqlContext.conf.manageFilesourcePartitions && session.sqlContext.conf.filesourcePartitionFileCacheSize > 0) { if (sharedCache == null) { sharedCache = new SharedInMemoryCache( session.sqlContext.conf.filesourcePartitionFileCacheSize, session.sqlContext.conf.metadataCacheTTL ) } sharedCache.createForNewClient() } else { NoopCache } } def resetForTesting(): Unit = synchronized { sharedCache = null } } /** * A cache of the leaf files of partition directories. We cache these files in order to speed * up iterated queries over the same set of partitions. Otherwise, each query would have to * hit remote storage in order to gather file statistics for physical planning. * * Each resolved catalog table has its own FileStatusCache. When the backing relation for the * table is refreshed via refreshTable() or refreshByPath(), this cache will be invalidated. */ abstract class FileStatusCache { /** * @return the leaf files for the specified path from this cache, or None if not cached. */ def getLeafFiles(path: Path): Option[Array[FileStatus]] = None /** * Saves the given set of leaf files for a path in this cache. */ def putLeafFiles(path: Path, leafFiles: Array[FileStatus]): Unit /** * Invalidates all data held by this cache. */ def invalidateAll(): Unit } /** * An implementation that caches partition file statuses in memory. * * @param maxSizeInBytes max allowable cache size before entries start getting evicted */ private class SharedInMemoryCache(maxSizeInBytes: Long, cacheTTL: Long) extends Logging { // Opaque object that uniquely identifies a shared cache user private type ClientId = Object private val warnedAboutEviction = new AtomicBoolean(false) // we use a composite cache key in order to distinguish entries inserted by different clients private val cache: Cache[(ClientId, Path), Array[FileStatus]] = { // [[Weigher]].weigh returns Int so we could only cache objects < 2GB // instead, the weight is divided by this factor (which is smaller // than the size of one [[FileStatus]]). // so it will support objects up to 64GB in size. val weightScale = 32 val weigher = new Weigher[(ClientId, Path), Array[FileStatus]] { override def weigh(key: (ClientId, Path), value: Array[FileStatus]): Int = { val estimate = (SizeEstimator.estimate(key) + SizeEstimator.estimate(value)) / weightScale if (estimate > Int.MaxValue) { logWarning(s"Cached table partition metadata size is too big. Approximating to " + s"${Int.MaxValue.toLong * weightScale}.") Int.MaxValue } else { estimate.toInt } } } val removalListener = new RemovalListener[(ClientId, Path), Array[FileStatus]]() { override def onRemoval( removed: RemovalNotification[(ClientId, Path), Array[FileStatus]]): Unit = { if (removed.getCause == RemovalCause.SIZE && warnedAboutEviction.compareAndSet(false, true)) { logWarning( "Evicting cached table partition metadata from memory due to size constraints " + "(spark.sql.hive.filesourcePartitionFileCacheSize = " + maxSizeInBytes + " bytes). This may impact query planning performance.") } } } var builder = CacheBuilder.newBuilder() .weigher(weigher) .removalListener(removalListener) .maximumWeight(maxSizeInBytes / weightScale) if (cacheTTL > 0) { builder = builder.expireAfterWrite(cacheTTL, TimeUnit.SECONDS) } builder.build[(ClientId, Path), Array[FileStatus]]() } /** * @return a FileStatusCache that does not share any entries with any other client, but does * share memory resources for the purpose of cache eviction. */ def createForNewClient(): FileStatusCache = new FileStatusCache { val clientId = new Object() override def getLeafFiles(path: Path): Option[Array[FileStatus]] = { Option(cache.getIfPresent((clientId, path))) } override def putLeafFiles(path: Path, leafFiles: Array[FileStatus]): Unit = { cache.put((clientId, path), leafFiles) } override def invalidateAll(): Unit = { cache.asMap.asScala.foreach { case (key, value) => if (key._1 == clientId) { cache.invalidate(key) } } } } } /** * A non-caching implementation used when partition file status caching is disabled. */ object NoopCache extends FileStatusCache { override def getLeafFiles(path: Path): Option[Array[FileStatus]] = None override def putLeafFiles(path: Path, leafFiles: Array[FileStatus]): Unit = {} override def invalidateAll(): Unit = {} }
Scala
4
OlegPt/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileStatusCache.scala
[ "Apache-2.0" ]
# encoding: utf-8 # frozen_string_literal: true require 'rubocop' module RuboCop module Cop module Sorbet # This cop ensures one ancestor per requires_ancestor line # rather than chaining them as a comma-separated list. # # @example # # # bad # module SomeModule # requires_ancestor Kernel, Minitest::Assertions # end # # # good # module SomeModule # requires_ancestor Kernel # requires_ancestor Minitest::Assertions # end class OneAncestorPerLine < RuboCop::Cop::Cop MSG = 'Cannot require more than one ancestor per line' def_node_search :requires_ancestors, <<~PATTERN (send nil? :requires_ancestor ...) PATTERN def_node_matcher :more_than_one_ancestor, <<~PATTERN (send nil? :requires_ancestor const const+) PATTERN def_node_search :abstract?, <<~PATTERN (send nil? :abstract!) PATTERN def on_module(node) return unless node.body return unless requires_ancestors(node) process_node(node) end def on_class(node) return unless abstract?(node) return unless requires_ancestors(node) process_node(node) end def autocorrect(node) -> (corrector) do ra_call = node.parent split_ra_calls = ra_call.source.gsub(/,\s+/, new_ra_line(ra_call.loc.column)) corrector.replace(ra_call, split_ra_calls) end end private def process_node(node) requires_ancestors(node).each do |ra| add_offense(ra.child_nodes[1]) if more_than_one_ancestor(ra) end end def new_ra_line(indent_count) indents = " " * indent_count indented_ra_call = "#{indents}requires_ancestor " "\n#{indented_ra_call}" end end end end end
Ruby
5
ylht/brew
Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb
[ "BSD-2-Clause" ]
( Generated from test_dict_subscript_assign_in.muv by the MUV compiler. ) ( https://github.com/revarbat/muv ) : _main[ _arg -- ret ] var _a { }list _a ! "FOO" dup _a @ "foo" ->[] _a ! pop _a @ "foo" [] ; : __start "me" match me ! me @ location loc ! trig trigger ! _main ;
MUF
2
revarbat/muv
tests/test_dict_subscript_assign_cmp.muf
[ "BSD-2-Clause" ]
img { width: 32px; height: 32px; } .icon { display: inline-block; width: 32px; height: 32px; } .icon-clock { background: url(../nested/fragment-bg.svg#icon-clock-view) no-repeat; } .icon-heart { background: url(../nested/fragment-bg.svg#icon-heart-view) no-repeat; } .icon-arrow-right { background: url(../nested/fragment-bg.svg#icon-arrow-right-view) no-repeat; }
CSS
2
laineus/vite
packages/playground/assets/css/icons.css
[ "MIT" ]
size: 1024px 80px; dpi: 96; margin: 2em; axis { label-format: fixed 1; limit: 1 16; }
CLIPS
2
asmuth-archive/travistest
test/examples/charts_reference_format_fixed.clp
[ "Apache-2.0" ]
(eval-when-compile (import bin.printenv) (import sys) (print sys.path))
Hy
2
lafrenierejm/hy
tests/resources/relative_import_compile_time.hy
[ "MIT" ]
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target triple = "i686--linux" %runtime.typecodeID = type { %runtime.typecodeID*, i32, %runtime.interfaceMethodInfo* } %runtime.interfaceMethodInfo = type { i8*, i32 } @"reflect/types.type:named:error" = linkonce_odr constant %runtime.typecodeID { %runtime.typecodeID* @"reflect/types.type:interface:{Error:func:{}{basic:string}}", i32 0, %runtime.interfaceMethodInfo* null } @"reflect/types.type:interface:{Error:func:{}{basic:string}}" = linkonce_odr constant %runtime.typecodeID { %runtime.typecodeID* bitcast ([1 x i8*]* @"reflect/types.interface:interface{Error() string}$interface" to %runtime.typecodeID*), i32 0, %runtime.interfaceMethodInfo* null } @"reflect/methods.Error() string" = linkonce_odr constant i8 0 @"reflect/types.interface:interface{Error() string}$interface" = linkonce_odr constant [1 x i8*] [i8* @"reflect/methods.Error() string"] @"reflect/methods.Align() int" = linkonce_odr constant i8 0 @"reflect/methods.Implements(reflect.Type) bool" = linkonce_odr constant i8 0 @"reflect.Type$interface" = linkonce_odr constant [2 x i8*] [i8* @"reflect/methods.Align() int", i8* @"reflect/methods.Implements(reflect.Type) bool"] @"reflect/types.type:named:reflect.rawType" = linkonce_odr constant %runtime.typecodeID { %runtime.typecodeID* @"reflect/types.type:basic:uintptr", i32 0, %runtime.interfaceMethodInfo* getelementptr inbounds ([20 x %runtime.interfaceMethodInfo], [20 x %runtime.interfaceMethodInfo]* @"reflect.rawType$methodset", i32 0, i32 0) } @"reflect.rawType$methodset" = linkonce_odr constant [20 x %runtime.interfaceMethodInfo] zeroinitializer @"reflect/types.type:basic:uintptr" = linkonce_odr constant %runtime.typecodeID zeroinitializer declare i1 @runtime.interfaceImplements(i32, i8**, i8*, i8*) declare i32 @runtime.interfaceMethod(i32, i8**, i8*, i8*, i8*) ; var errorType = reflect.TypeOf((*error)(nil)).Elem() ; func isError(typ reflect.Type) bool { ; return typ.Implements(errorType) ; } ; The type itself is stored in %typ.value, %typ.typecode just refers to the ; type of reflect.Type. This function can be optimized because errorType is ; known at compile time (after the interp pass has run). define i1 @main.isError(i32 %typ.typecode, i8* %typ.value, i8* %context, i8* %parentHandle) { entry: %invoke.func = call i32 @runtime.interfaceMethod(i32 %typ.typecode, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @"reflect.Type$interface", i32 0, i32 0), i8* nonnull @"reflect/methods.Implements(reflect.Type) bool", i8* undef, i8* null) %invoke.func.cast = inttoptr i32 %invoke.func to i1 (i8*, i32, i8*, i8*, i8*)* %result = call i1 %invoke.func.cast(i8* %typ.value, i32 ptrtoint (%runtime.typecodeID* @"reflect/types.type:named:reflect.rawType" to i32), i8* bitcast (%runtime.typecodeID* @"reflect/types.type:named:error" to i8*), i8* undef, i8* undef) ret i1 %result } ; This Implements method call can not be optimized because itf is not known at ; compile time. ; func isUnknown(typ, itf reflect.Type) bool { ; return typ.Implements(itf) ; } define i1 @main.isUnknown(i32 %typ.typecode, i8* %typ.value, i32 %itf.typecode, i8* %itf.value, i8* %context, i8* %parentHandle) { entry: %invoke.func = call i32 @runtime.interfaceMethod(i32 %typ.typecode, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @"reflect.Type$interface", i32 0, i32 0), i8* nonnull @"reflect/methods.Implements(reflect.Type) bool", i8* undef, i8* null) %invoke.func.cast = inttoptr i32 %invoke.func to i1 (i8*, i32, i8*, i8*, i8*)* %result = call i1 %invoke.func.cast(i8* %typ.value, i32 %itf.typecode, i8* %itf.value, i8* undef, i8* undef) ret i1 %result }
LLVM
4
ofauchon/tinygo
transform/testdata/reflect-implements.ll
[ "Apache-2.0" ]
(ns fw.lib.parallel (:require [fw.lib.util :refer [fn? once filter-empty]])) (defn ^:private iterator [lambda len] (let [results [] error nil] (fn [err result] (.push results result) (cond err (set! error err)) (cond (? (l? results) len) (cond (fn? lambda) (lambda error (filter-empty results))))))) (defn ^void parallel "Run the tasks array of functions in parallel" [arr lambda] (a? arr (let [arr (c-> arr) len (l? arr) next (iterator lambda len)] (if (? (l? arr) 0) (cond (fn? lambda) (lambda nil [])) (each arr (fn [cur] (cond (fn? cur) (cur (once next))))))))) (defn ^void each "Applies the function iterator to each item in array in parallel" [arr lambda cb] (a? arr (do (let [stack (.map arr (fn [item] (fn [done] (lambda item done))))] (parallel stack cb))))) (def ^void map each) (def ^void each-parallel each) (def ^void map-parallel each)
wisp
4
h2non/fw
src/parallel.wisp
[ "MIT" ]
#!./perl # $Header: op.oct,v 1.0 87/12/18 13:13:57 root Exp $ print "1..3\n"; if (oct('01234') == 01234) {print "ok 1\n";} else {print "not ok 1\n";} if (oct('0x1234') == 0x1234) {print "ok 2\n";} else {print "not ok 2\n";} if (hex('01234') == 0x1234) {print "ok 3\n";} else {print "not ok 3\n";}
Octave
3
allisonrandal/gunie
t/op.oct
[ "Artistic-2.0" ]
# Configure paths for libopus # Gregory Maxwell <[email protected]> 08-30-2012 # Shamelessly stolen from Jack Moffitt (libogg) who # Shamelessly stole from Owen Taylor and Manish Singh dnl XIPH_PATH_OPUS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl Test for libopus, and define OPUS_CFLAGS and OPUS_LIBS dnl AC_DEFUN([XIPH_PATH_OPUS], [dnl dnl Get the cflags and libraries dnl AC_ARG_WITH(opus,AC_HELP_STRING([--with-opus=PFX],[Prefix where opus is installed (optional)]), opus_prefix="$withval", opus_prefix="") AC_ARG_WITH(opus-libraries,AC_HELP_STRING([--with-opus-libraries=DIR],[Directory where the opus library is installed (optional)]), opus_libraries="$withval", opus_libraries="") AC_ARG_WITH(opus-includes,AC_HELP_STRING([--with-opus-includes=DIR],[Directory where the opus header files are installed (optional)]), opus_includes="$withval", opus_includes="") AC_ARG_ENABLE(opustest,AC_HELP_STRING([--disable-opustest],[Do not try to compile and run a test opus program]),, enable_opustest=yes) if test "x$opus_libraries" != "x" ; then OPUS_LIBS="-L$opus_libraries" elif test "x$opus_prefix" = "xno" || test "x$opus_prefix" = "xyes" ; then OPUS_LIBS="" elif test "x$opus_prefix" != "x" ; then OPUS_LIBS="-L$opus_prefix/lib" elif test "x$prefix" != "xNONE" ; then OPUS_LIBS="-L$prefix/lib" fi if test "x$opus_prefix" != "xno" ; then OPUS_LIBS="$OPUS_LIBS -lopus" fi if test "x$opus_includes" != "x" ; then OPUS_CFLAGS="-I$opus_includes" elif test "x$opus_prefix" = "xno" || test "x$opus_prefix" = "xyes" ; then OPUS_CFLAGS="" elif test "x$opus_prefix" != "x" ; then OPUS_CFLAGS="-I$opus_prefix/include" elif test "x$prefix" != "xNONE"; then OPUS_CFLAGS="-I$prefix/include" fi AC_MSG_CHECKING(for Opus) if test "x$opus_prefix" = "xno" ; then no_opus="disabled" enable_opustest="no" else no_opus="" fi if test "x$enable_opustest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $OPUS_CFLAGS" LIBS="$LIBS $OPUS_LIBS" dnl dnl Now check if the installed Opus is sufficiently new. dnl rm -f conf.opustest AC_TRY_RUN([ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <opus.h> int main () { system("touch conf.opustest"); return 0; } ],, no_opus=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi if test "x$no_opus" = "xdisabled" ; then AC_MSG_RESULT(no) ifelse([$2], , :, [$2]) elif test "x$no_opus" = "x" ; then AC_MSG_RESULT(yes) ifelse([$1], , :, [$1]) else AC_MSG_RESULT(no) if test -f conf.opustest ; then : else echo "*** Could not run Opus test program, checking why..." CFLAGS="$CFLAGS $OPUS_CFLAGS" LIBS="$LIBS $OPUS_LIBS" AC_TRY_LINK([ #include <stdio.h> #include <opus.h> ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding Opus or finding the wrong" echo "*** version of Opus. If it is not finding Opus, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occurred. This usually means Opus was incorrectly installed" echo "*** or that you have moved Opus since it was installed." ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi OPUS_CFLAGS="" OPUS_LIBS="" ifelse([$2], , :, [$2]) fi AC_SUBST(OPUS_CFLAGS) AC_SUBST(OPUS_LIBS) rm -f conf.opustest ])
M4
4
SenthilKumarGS/TizenRT
external/libopus/opus.m4
[ "Apache-2.0" ]
package com.alibaba.fastjson.util; import java.security.PrivilegedAction; import java.util.HashMap; import java.util.Map; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONAware; import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONPath; import com.alibaba.fastjson.JSONPathException; import com.alibaba.fastjson.JSONReader; import com.alibaba.fastjson.JSONStreamAware; import com.alibaba.fastjson.JSONWriter; import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.parser.DefaultJSONParser; import com.alibaba.fastjson.parser.Feature; import com.alibaba.fastjson.parser.JSONLexer; import com.alibaba.fastjson.parser.JSONLexerBase; import com.alibaba.fastjson.parser.JSONReaderScanner; import com.alibaba.fastjson.parser.JSONScanner; import com.alibaba.fastjson.parser.JSONToken; import com.alibaba.fastjson.parser.ParseContext; import com.alibaba.fastjson.parser.ParserConfig; import com.alibaba.fastjson.parser.SymbolTable; import com.alibaba.fastjson.parser.deserializer.AutowiredObjectDeserializer; import com.alibaba.fastjson.parser.deserializer.DefaultFieldDeserializer; import com.alibaba.fastjson.parser.deserializer.ExtraProcessable; import com.alibaba.fastjson.parser.deserializer.ExtraProcessor; import com.alibaba.fastjson.parser.deserializer.ExtraTypeProvider; import com.alibaba.fastjson.parser.deserializer.FieldDeserializer; import com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer; import com.alibaba.fastjson.parser.deserializer.ObjectDeserializer; import com.alibaba.fastjson.serializer.AfterFilter; import com.alibaba.fastjson.serializer.BeanContext; import com.alibaba.fastjson.serializer.BeforeFilter; import com.alibaba.fastjson.serializer.ContextObjectSerializer; import com.alibaba.fastjson.serializer.ContextValueFilter; import com.alibaba.fastjson.serializer.JSONSerializer; import com.alibaba.fastjson.serializer.JavaBeanSerializer; import com.alibaba.fastjson.serializer.LabelFilter; import com.alibaba.fastjson.serializer.Labels; import com.alibaba.fastjson.serializer.NameFilter; import com.alibaba.fastjson.serializer.ObjectSerializer; import com.alibaba.fastjson.serializer.PropertyFilter; import com.alibaba.fastjson.serializer.PropertyPreFilter; import com.alibaba.fastjson.serializer.SerialContext; import com.alibaba.fastjson.serializer.SerializeBeanInfo; import com.alibaba.fastjson.serializer.SerializeConfig; import com.alibaba.fastjson.serializer.SerializeFilter; import com.alibaba.fastjson.serializer.SerializeFilterable; import com.alibaba.fastjson.serializer.SerializeWriter; import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.ValueFilter; public class ASMClassLoader extends ClassLoader { private static java.security.ProtectionDomain DOMAIN; private static Map<String, Class<?>> classMapping = new HashMap<String, Class<?>>(); static { DOMAIN = (java.security.ProtectionDomain) java.security.AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { return ASMClassLoader.class.getProtectionDomain(); } }); Class<?>[] jsonClasses = new Class<?>[] {JSON.class, JSONObject.class, JSONArray.class, JSONPath.class, JSONAware.class, JSONException.class, JSONPathException.class, JSONReader.class, JSONStreamAware.class, JSONWriter.class, TypeReference.class, FieldInfo.class, TypeUtils.class, IOUtils.class, IdentityHashMap.class, ParameterizedTypeImpl.class, JavaBeanInfo.class, ObjectSerializer.class, JavaBeanSerializer.class, SerializeFilterable.class, SerializeBeanInfo.class, JSONSerializer.class, SerializeWriter.class, SerializeFilter.class, Labels.class, LabelFilter.class, ContextValueFilter.class, AfterFilter.class, BeforeFilter.class, NameFilter.class, PropertyFilter.class, PropertyPreFilter.class, ValueFilter.class, SerializerFeature.class, ContextObjectSerializer.class, SerialContext.class, SerializeConfig.class, JavaBeanDeserializer.class, ParserConfig.class, DefaultJSONParser.class, JSONLexer.class, JSONLexerBase.class, ParseContext.class, JSONToken.class, SymbolTable.class, Feature.class, JSONScanner.class, JSONReaderScanner.class, AutowiredObjectDeserializer.class, ObjectDeserializer.class, ExtraProcessor.class, ExtraProcessable.class, ExtraTypeProvider.class, BeanContext.class, FieldDeserializer.class, DefaultFieldDeserializer.class, }; for (Class<?> clazz : jsonClasses) { classMapping.put(clazz.getName(), clazz); } } public ASMClassLoader(){ super(getParentClassLoader()); } public ASMClassLoader(ClassLoader parent){ super (parent); } static ClassLoader getParentClassLoader() { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if (contextClassLoader != null) { try { contextClassLoader.loadClass(JSON.class.getName()); return contextClassLoader; } catch (ClassNotFoundException e) { // skip } } return JSON.class.getClassLoader(); } protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { Class<?> mappingClass = classMapping.get(name); if (mappingClass != null) { return mappingClass; } try { return super.loadClass(name, resolve); } catch (ClassNotFoundException e) { throw e; } } public Class<?> defineClassPublic(String name, byte[] b, int off, int len) throws ClassFormatError { Class<?> clazz = defineClass(name, b, off, len, DOMAIN); return clazz; } public boolean isExternalClass(Class<?> clazz) { ClassLoader classLoader = clazz.getClassLoader(); if (classLoader == null) { return false; } ClassLoader current = this; while (current != null) { if (current == classLoader) { return false; } current = current.getParent(); } return true; } }
Java
3
Czarek93/fastjson
src/main/java/com/alibaba/fastjson/util/ASMClassLoader.java
[ "Apache-2.0" ]
FORMAT: 1A # Greeting API ## GET /greeting + Response 200 (text/plain; charset=utf-8) Howdy!
API Blueprint
3
tomoyamachi/dredd
packages/dredd/test/fixtures/multifile/greeting.apib
[ "MIT" ]
"""Test the Integration - Riemann sum integral integration.""" import pytest from homeassistant.components.integration.const import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er from tests.common import MockConfigEntry @pytest.mark.parametrize("platform", ("sensor",)) async def test_setup_and_remove_config_entry( hass: HomeAssistant, platform: str, ) -> None: """Test setting up and removing a config entry.""" input_sensor_entity_id = "sensor.input" registry = er.async_get(hass) integration_entity_id = f"{platform}.my_integration" # Setup the config entry config_entry = MockConfigEntry( data={}, domain=DOMAIN, options={ "method": "trapezoidal", "name": "My integration", "round": 1.0, "source": "sensor.input", "unit_prefix": "k", "unit_time": "min", }, title="My integration", ) config_entry.add_to_hass(hass) assert await hass.config_entries.async_setup(config_entry.entry_id) await hass.async_block_till_done() # Check the entity is registered in the entity registry assert registry.async_get(integration_entity_id) is not None # Check the platform is setup correctly state = hass.states.get(integration_entity_id) assert state.state == "unknown" assert "unit_of_measurement" not in state.attributes assert state.attributes["source"] == "sensor.input" hass.states.async_set(input_sensor_entity_id, 10, {"unit_of_measurement": "cat"}) hass.states.async_set(input_sensor_entity_id, 11, {"unit_of_measurement": "cat"}) await hass.async_block_till_done() state = hass.states.get(integration_entity_id) assert state.state != "unknown" assert state.attributes["unit_of_measurement"] == "kcatmin" # Remove the config entry assert await hass.config_entries.async_remove(config_entry.entry_id) await hass.async_block_till_done() # Check the state and entity registry entry are removed assert hass.states.get(integration_entity_id) is None assert registry.async_get(integration_entity_id) is None
Python
5
MrDelik/core
tests/components/integration/test_init.py
[ "Apache-2.0" ]
50 5 0 1 13 9 17 4 3 5 8 6 2 34 7 29 15 1 [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] 1 1 2 43 36 [0] [0] 2 1 1 9 [-2] 3 1 2 38 31 [1] [13] 4 1 3 19 33 10 [1] [0] [7] 5 1 1 42 [16] 6 1 4 28 12 37 11 [15] [10] [4] [12] 7 1 2 27 17 [10] [-1] 8 1 1 13 [11] 9 1 2 25 15 [10] [-4] 10 1 3 21 49 24 [-103] [17] [-145] 11 1 1 28 [6] 12 1 2 37 33 [13] [-155] 13 1 1 48 [3] 14 1 2 17 40 [-116] [0] 15 1 1 29 [3] 16 1 2 42 26 [0] [5] 17 1 1 34 [-5] 18 1 2 41 34 [10] [-163] 19 1 1 44 [3] 20 1 2 45 51 [1] [8] 21 1 3 24 49 10 [2] [3] [2] 22 1 1 27 [1] 23 1 3 35 49 40 [6] [0] [5] 24 1 2 10 49 [7] [11] 25 1 3 50 29 9 [10] [-14] [-18] 26 1 1 47 [1] 27 1 3 45 51 32 [-2] [7] [-4] 28 1 2 32 22 [9] [2] 29 1 3 25 50 15 [1] [0] [-20] 30 1 2 14 33 [-91] [6] 31 1 2 44 38 [3] [3] 32 1 1 20 [1] 33 1 4 34 39 10 30 [-154] [12] [-7] [-66] 34 1 2 10 23 [-2] [7] 35 1 2 18 50 [11] [-8] 36 1 2 43 46 [0] [2] 37 1 2 44 10 [-121] [3] 38 1 5 16 26 39 30 42 [0] [1] [4] [1] [6] 39 1 1 12 [7] 40 1 3 42 20 33 [3] [6] [0] 41 1 4 12 14 45 39 [10] [-7] [24] [-3] 42 1 3 44 30 10 [-116] [5] [0] 43 1 1 46 [9] 44 1 3 21 40 45 [12] [-4] [13] 45 1 4 28 51 32 20 [-26] [6] [-28] [-19] 46 1 1 51 [1] 47 1 2 51 16 [3] [-7] 48 1 1 51 [4] 49 1 5 7 40 21 51 33 [-120] [-150] [-104] [9] [-173] 50 1 1 51 [5] 51 1 0 0 1 0 0 0 0 0 1 1 -1 -1 -1 0 0 2 1 -1 0 1 0 0 3 1 2 0 1 2 0 4 1 0 2 -1 -1 -1 5 1 0 0 0 0 -2 6 1 -2 0 2 -1 -1 7 1 -1 1 -2 -2 1 8 1 1 2 -1 2 0 9 1 -2 0 0 0 1 10 1 0 2 -2 1 0 11 1 -2 -2 0 1 -2 12 1 0 2 0 -1 0 13 1 0 -1 0 0 0 14 1 1 0 -2 0 -1 15 1 0 0 -1 0 0 16 1 1 2 -1 -1 -1 17 1 2 2 -1 0 0 18 1 -2 1 2 1 0 19 1 0 0 0 1 0 20 1 -2 0 1 -2 0 21 1 0 0 -1 2 2 22 1 0 2 1 2 -1 23 1 -1 1 -1 1 -1 24 1 0 2 0 0 1 25 1 1 -2 0 -2 1 26 1 2 0 0 1 2 27 1 0 1 1 -2 1 28 1 0 -1 2 -1 0 29 1 0 2 -2 0 0 30 1 -2 0 1 -2 -2 31 1 0 1 0 -1 -2 32 1 0 0 0 -2 0 33 1 -2 0 0 0 1 34 1 0 0 -1 2 0 35 1 0 0 -2 0 0 36 1 0 0 2 0 0 37 1 0 1 -2 0 2 38 1 2 0 1 0 0 39 1 0 -1 0 0 0 40 1 -2 0 -1 -1 -1 41 1 0 0 1 0 1 42 1 0 0 0 -2 0 43 1 -2 2 2 -2 1 44 1 2 0 1 0 0 45 1 0 -1 -2 -1 -2 46 1 2 2 0 1 -1 47 1 -1 1 -2 2 2 48 1 0 -1 0 -2 2 49 1 -2 -2 2 0 0 50 1 2 1 -1 -1 1 51 1 0 0 0 0 0 -7 9 -9 -9 -5 4 20 -1 2 1
Eagle
0
klorel/or-tools
examples/data/rcpsp/single_mode_consumer_producer/ubo50_cum_2/psp50_8.sch
[ "Apache-2.0" ]
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports Microsoft.CodeAnalysis.Classification Imports Microsoft.CodeAnalysis.Test.Utilities.QuickInfo Imports Microsoft.VisualStudio.Core.Imaging Imports Microsoft.VisualStudio.Imaging Imports Microsoft.VisualStudio.Text.Adornments Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense Public Class IntellisenseQuickInfoBuilderTests_Code Inherits AbstractIntellisenseQuickInfoBuilderTests <WpfFact, Trait(Traits.Feature, Traits.Features.QuickInfo)> Public Async Function QuickInfoForXmlCodeElementWithCDATA() As Task Dim workspace = <Workspace> <Project Language="C#" CommonReferences="true"> <Document> class MyClass { /// &lt;summary&gt; /// summary for MyClass /// &lt;code&gt;&lt;![CDATA[ /// List&lt;string&gt; y = null; /// ]]&gt;&lt;/code&gt; /// &lt;/summary&gt; void MyMethod() { MyM$$ethod(); } } </Document> </Project> </Workspace> Dim intellisenseQuickInfo = Await GetQuickInfoItemAsync(workspace, LanguageNames.CSharp) Dim expected = New ContainerElement( ContainerElementStyle.Stacked Or ContainerElementStyle.VerticalPadding, New ContainerElement( ContainerElementStyle.Stacked, New ContainerElement( ContainerElementStyle.Wrapped, New ImageElement(New ImageId(KnownImageIds.ImageCatalogGuid, KnownImageIds.MethodPrivate)), New ClassifiedTextElement( New ClassifiedTextRun(ClassificationTypeNames.Keyword, "void"), New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "), New ClassifiedTextRun(ClassificationTypeNames.ClassName, "MyClass", navigationAction:=Sub() Return, "MyClass"), New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "."), New ClassifiedTextRun(ClassificationTypeNames.MethodName, "MyMethod", navigationAction:=Sub() Return, "void MyClass.MyMethod()"), New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "("), New ClassifiedTextRun(ClassificationTypeNames.Punctuation, ")"))), New ClassifiedTextElement( New ClassifiedTextRun(ClassificationTypeNames.Text, "summary for MyClass"))), New ClassifiedTextElement( New ClassifiedTextRun(ClassificationTypeNames.Text, "List<string> y = null;", ClassifiedTextRunStyle.UseClassificationFont))) ToolTipAssert.EqualContent(expected, intellisenseQuickInfo.Item) End Function <WpfFact, Trait(Traits.Feature, Traits.Features.QuickInfo)> Public Async Function QuickInfoForXmlCodeElement() As Task Dim workspace = <Workspace> <Project Language="C#" CommonReferences="true"> <Document> class MyClass { /// &lt;summary&gt; /// Normalize this, &lt;c&gt;and also /// this&lt;/c&gt; /// &lt;code&gt; /// line 1 /// line 2 /// &lt;/code&gt; /// Extra text after code. /// &lt;/summary&gt; void MyMethod() { MyM$$ethod(); } } </Document> </Project> </Workspace> Dim intellisenseQuickInfo = Await GetQuickInfoItemAsync(workspace, LanguageNames.CSharp) Dim expected = New ContainerElement( ContainerElementStyle.Stacked Or ContainerElementStyle.VerticalPadding, New ContainerElement( ContainerElementStyle.Stacked, New ContainerElement( ContainerElementStyle.Wrapped, New ImageElement(New ImageId(KnownImageIds.ImageCatalogGuid, KnownImageIds.MethodPrivate)), New ClassifiedTextElement( New ClassifiedTextRun(ClassificationTypeNames.Keyword, "void"), New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "), New ClassifiedTextRun(ClassificationTypeNames.ClassName, "MyClass", navigationAction:=Sub() Return, "MyClass"), New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "."), New ClassifiedTextRun(ClassificationTypeNames.MethodName, "MyMethod", navigationAction:=Sub() Return, "void MyClass.MyMethod()"), New ClassifiedTextRun(ClassificationTypeNames.Punctuation, "("), New ClassifiedTextRun(ClassificationTypeNames.Punctuation, ")"))), New ClassifiedTextElement( New ClassifiedTextRun(ClassificationTypeNames.Text, "Normalize this,"), New ClassifiedTextRun(ClassificationTypeNames.WhiteSpace, " "), New ClassifiedTextRun(ClassificationTypeNames.Text, "and also this", ClassifiedTextRunStyle.UseClassificationFont))), New ClassifiedTextElement( New ClassifiedTextRun(ClassificationTypeNames.Text, $"line 1{vbCrLf}line 2", ClassifiedTextRunStyle.UseClassificationFont)), New ClassifiedTextElement( New ClassifiedTextRun(ClassificationTypeNames.Text, "Extra text after code."))) ToolTipAssert.EqualContent(expected, intellisenseQuickInfo.Item) End Function End Class End Namespace
Visual Basic
4
frandesc/roslyn
src/EditorFeatures/Test2/IntelliSense/IntellisenseQuickInfoBuilderTests_Code.vb
[ "MIT" ]
# # number of conflicts must be ZERO. # class A rule targ: operation voidhead | variable voidhead : void B void: operation: A variable : A end
Yacc
1
puzzle/nochmal
spec/dummy/vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/assets/nullbug2.y
[ "MIT" ]
# Currently broken unless Godot makes this kind of thing possible: # https://github.com/godotengine/godot/issues/21461 # https://github.com/godotengine/godot-proposals/issues/279 # Basis25D structure for performing 2.5D transform math. # Note: All code assumes that Y is UP in 3D, and DOWN in 2D. # Meaning, a top-down view has a Y axis component of (0, 0), with a Z axis component of (0, 1). # For a front side view, Y is (0, -1) and Z is (0, 0). # Remember that Godot's 2D mode has the Y axis pointing DOWN on the screen. class_name Basis25D var x: Vector2 = Vector2() var y: Vector2 = Vector2() var z: Vector2 = Vector2() static func top_down(): return init(1, 0, 0, 0, 0, 1) static func front_side(): return init(1, 0, 0, -1, 0, 0) static func forty_five(): return init(1, 0, 0, -0.70710678118, 0, 0.70710678118) static func isometric(): return init(0.86602540378, 0.5, 0, -1, -0.86602540378, 0.5) static func oblique_y(): return init(1, 0, -1, -1, 0, 1) static func oblique_z(): return init(1, 0, 0, -1, -1, 1) # Creates a Dimetric Basis25D from the angle between the Y axis and the others. # Dimetric(2.09439510239) is the same as Isometric. # Try to keep this number away from a multiple of Tau/4 (or Pi/2) radians. static func dimetric(angle): var sine = sin(angle) var cosine = cos(angle) return init(sine, -cosine, 0, -1, -sine, -cosine) static func init(xx, xy, yx, yy, zx, zy): var xv = Vector2(xx, xy) var yv = Vector2(yx, yy) var zv = Vector2(zx, zy) return Basis25D.new(xv, yv, zv) func _init(xAxis: Vector2, yAxis: Vector2, zAxis: Vector2): x = xAxis y = yAxis z = zAxis
GDScript
5
jonbonazza/godot-demo-projects
misc/2.5d/addons/node25d/.broken-gdscripts/Basis25D.gd
[ "MIT" ]
/* * Copyright (c) 2009-2011, Salvatore Sanfilippo <antirez at gmail dot com> * Copyright (c) 2010-2011, Pieter Noordhuis <pcnoordhuis at gmail dot com> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Redis nor the names of its contributors may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __HIREDIS_ASYNC_PRIVATE_H #define __HIREDIS_ASYNC_PRIVATE_H #define _EL_ADD_READ(ctx) \ do { \ refreshTimeout(ctx); \ if ((ctx)->ev.addRead) (ctx)->ev.addRead((ctx)->ev.data); \ } while (0) #define _EL_DEL_READ(ctx) do { \ if ((ctx)->ev.delRead) (ctx)->ev.delRead((ctx)->ev.data); \ } while(0) #define _EL_ADD_WRITE(ctx) \ do { \ refreshTimeout(ctx); \ if ((ctx)->ev.addWrite) (ctx)->ev.addWrite((ctx)->ev.data); \ } while (0) #define _EL_DEL_WRITE(ctx) do { \ if ((ctx)->ev.delWrite) (ctx)->ev.delWrite((ctx)->ev.data); \ } while(0) #define _EL_CLEANUP(ctx) do { \ if ((ctx)->ev.cleanup) (ctx)->ev.cleanup((ctx)->ev.data); \ ctx->ev.cleanup = NULL; \ } while(0) static inline void refreshTimeout(redisAsyncContext *ctx) { #define REDIS_TIMER_ISSET(tvp) \ (tvp && ((tvp)->tv_sec || (tvp)->tv_usec)) #define REDIS_EL_TIMER(ac, tvp) \ if ((ac)->ev.scheduleTimer && REDIS_TIMER_ISSET(tvp)) { \ (ac)->ev.scheduleTimer((ac)->ev.data, *(tvp)); \ } if (ctx->c.flags & REDIS_CONNECTED) { REDIS_EL_TIMER(ctx, ctx->c.command_timeout); } else { REDIS_EL_TIMER(ctx, ctx->c.connect_timeout); } } void __redisAsyncDisconnect(redisAsyncContext *ac); void redisProcessCallbacks(redisAsyncContext *ac); #endif /* __HIREDIS_ASYNC_PRIVATE_H */
C
4
zh1029/redis
deps/hiredis/async_private.h
[ "BSD-3-Clause" ]
package com.baeldung.ignore; public abstract class BaseUnitTest { public void helperMethod() { } }
Java
2
DBatOWL/tutorials
testing-modules/junit-4/src/test/java/com/baeldung/ignore/BaseUnitTest.java
[ "MIT" ]
C FILE: ARRAY.F SUBROUTINE FOO(A,N,M) C C INCREMENT THE FIRST ROW AND DECREMENT THE FIRST COLUMN OF A C INTEGER N,M,I,J REAL*8 A(N,M) Cf2py intent(in,out,copy) a Cf2py integer intent(hide),depend(a) :: n=shape(a,0), m=shape(a,1) DO J=1,M A(1,J) = A(1,J) + 1D0 ENDDO DO I=1,N A(I,1) = A(I,1) - 1D0 ENDDO END C END OF FILE ARRAY.F
FORTRAN
4
iam-abbas/numpy
doc/source/f2py/code/array.f
[ "BSD-3-Clause" ]
sleep 1 t app appmode photo sleep X t app button shutter PR d:\autoexec.ash REBOOT yes
AGS Script
1
waltersgrey/autoexechack
MegaLapse/CustomInterval/Hero3PlusSilver/autoexec.ash
[ "MIT" ]
(* This simple example of a list class is adapted from an example in the Cool distribution. *) class List { isNil() : Bool { true }; head() : Int { { abort(); 0; } }; tail() : List { { abort(); self; } }; cons(i : Int) : List { (new Cons).init(i, self) }; }; class Cons inherits List { car : Int; -- The element in this list cell cdr : List; -- The rest of the list isNil() : Bool { false }; head() : Int { car }; tail() : List { cdr }; init(i : Int, rest : List) : List { { car <- i; cdr <- rest; self; } }; };
OpenCL
4
JavascriptID/sourcerer-app
src/test/resources/samples/langs/Cool/list.cl
[ "MIT" ]
<GameProjectFile> <PropertyGroup Type="Node" Name="DifficultySelection" ID="3e99ab2e-8f1d-48b0-a27a-9ec4bc4529c7" Version="2.0.0.0" /> <Content ctype="GameProjectContent"> <Content> <Animation Duration="0" Speed="1" /> <ObjectData Name="Node_0" CanEdit="False" FrameEvent="" ctype="SingleNodeObjectData"> <Position X="0" Y="0" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint /> <CColor A="255" R="255" G="255" B="255" /> <Size X="480" Y="320" /> <PrePosition X="0" Y="0" /> <PreSize X="0" Y="0" /> <Children> <NodeObjectData Name="Sprite_wood" ActionTag="900001496" FrameEvent="" Tag="25" ObjectIndex="23" ctype="SpriteObjectData"> <Position X="320.4432" Y="719.0815" /> <Scale ScaleX="2.963732" ScaleY="0.9188254" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="190" Y="86" /> <PrePosition X="0.66759" Y="2.24713" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn04.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_wood" ActionTag="143601795" FrameEvent="" Tag="4" ObjectIndex="2" ctype="SpriteObjectData"> <Position X="319.9985" Y="640.0754" /> <Scale ScaleX="2.963732" ScaleY="0.9188254" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="190" Y="86" /> <PrePosition X="0.6666636" Y="2.000236" /> <PreSize X="0.09583333" Y="0.14375" /> <FileData Type="Normal" Path="Common/Cn04.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_wood" ActionTag="162517942" FrameEvent="" Tag="5" ObjectIndex="3" ctype="SpriteObjectData"> <Position X="319.9999" Y="561.9768" /> <Scale ScaleX="2.963732" ScaleY="0.9188254" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="190" Y="86" /> <PrePosition X="0.6666666" Y="1.756178" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn04.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_wood" ActionTag="355644284" FrameEvent="" Tag="6" ObjectIndex="4" ctype="SpriteObjectData"> <Position X="319.9985" Y="482.9587" /> <Scale ScaleX="2.963732" ScaleY="0.9188254" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="190" Y="86" /> <PrePosition X="0.6666635" Y="1.509246" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn04.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_wood" ActionTag="707150579" FrameEvent="" Tag="7" ObjectIndex="5" ctype="SpriteObjectData"> <Position X="319.9999" Y="406.6945" /> <Scale ScaleX="2.963732" ScaleY="0.9188254" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="190" Y="86" /> <PrePosition X="0.6666666" Y="1.27092" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn04.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Paper" ActionTag="383760477" FrameEvent="" Tag="76" ObjectIndex="80" ctype="SpriteObjectData"> <Position X="189.0712" Y="522.628" /> <Scale ScaleX="0.9742648" ScaleY="1.361583" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="273" Y="100" /> <PrePosition X="0.3938983" Y="1.633212" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn01.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_wood" ActionTag="1007625043" FrameEvent="" Tag="28" ObjectIndex="26" ctype="SpriteObjectData"> <Position X="326.0255" Y="327.9763" /> <Scale ScaleX="2.963732" ScaleY="0.9188254" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="190" Y="86" /> <PrePosition X="0.6792197" Y="1.024926" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn04.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Frame" ActionTag="141812274" FrameEvent="" Tag="23" ObjectIndex="21" ctype="SpriteObjectData"> <Position X="48.0246" Y="525.7791" /> <Scale ScaleX="0.9999985" ScaleY="23.59164" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="35" Y="20" /> <PrePosition X="0.1000512" Y="1.64306" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn06.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Frame" ActionTag="685188145" FrameEvent="" Tag="24" ObjectIndex="22" FlipX="True" ctype="SpriteObjectData"> <Position X="595.7907" Y="528.0676" /> <Scale ScaleX="0.9999986" ScaleY="23.53806" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="35" Y="20" /> <PrePosition X="1.241231" Y="1.650211" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn06.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Frame_w" ActionTag="894571902" FrameEvent="" Tag="26" ObjectIndex="24" ctype="SpriteObjectData"> <Position X="312.4662" Y="748.7275" /> <Scale ScaleX="27.3684" ScaleY="0.9999993" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="20" Y="35" /> <PrePosition X="0.6509714" Y="2.339773" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn07.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Frame_Red" ActionTag="615400144" FrameEvent="" Tag="29" ObjectIndex="27" ctype="SpriteObjectData"> <Position X="315.001" Y="305.5422" /> <Scale ScaleX="27.32138" ScaleY="0.9999967" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="20" Y="35" /> <PrePosition X="0.6562521" Y="0.9548193" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn05.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Metal_Red" ActionTag="611476395" FrameEvent="" Tag="30" ObjectIndex="28" ctype="SpriteObjectData"> <Position X="68.01453" Y="327.844" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="94" Y="100" /> <PrePosition X="0.1416969" Y="1.024512" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn02.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Metal_Red" ActionTag="124133139" FrameEvent="" Tag="31" ObjectIndex="29" FlipX="True" ctype="SpriteObjectData"> <Position X="574.9857" Y="327.8444" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="94" Y="100" /> <PrePosition X="1.197887" Y="1.024514" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn02.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Metal" ActionTag="1010318394" FrameEvent="" Tag="32" ObjectIndex="30" ctype="SpriteObjectData"> <Position X="69.12866" Y="722.2931" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="94" Y="100" /> <PrePosition X="0.144018" Y="2.257166" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn03.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Metal" ActionTag="563959279" FrameEvent="" Tag="33" ObjectIndex="31" FlipX="True" ctype="SpriteObjectData"> <Position X="576.0825" Y="723.2952" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="94" Y="100" /> <PrePosition X="1.200172" Y="2.260298" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn03.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch_Red" ActionTag="917786191" FrameEvent="" Tag="34" ObjectIndex="32" ctype="SpriteObjectData"> <Position X="167.4901" Y="295.7055" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="20" Y="15" /> <PrePosition X="0.3489378" Y="0.9240797" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn09.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch_Red" ActionTag="790179372" FrameEvent="" Tag="35" ObjectIndex="33" ctype="SpriteObjectData"> <Position X="518.6015" Y="295.2061" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="20" Y="15" /> <PrePosition X="1.08042" Y="0.9225191" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn09.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch" ActionTag="10258634" FrameEvent="" Tag="37" ObjectIndex="35" ctype="SpriteObjectData"> <Position X="37.59985" Y="622.3788" /> <Scale ScaleX="0.9444448" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="0.07833303" Y="1.944934" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn11.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch" ActionTag="900380844" FrameEvent="" Tag="38" ObjectIndex="36" ctype="SpriteObjectData"> <Position X="38.08826" Y="481.2679" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="0.07935054" Y="1.503962" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn11.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch_Double" ActionTag="25922285" FrameEvent="" Tag="39" ObjectIndex="37" ctype="SpriteObjectData"> <Position X="38.10211" Y="523.4922" /> <Scale ScaleX="0.9444448" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="0.0793794" Y="1.635913" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn12.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch_B" ActionTag="464915514" FrameEvent="" Tag="40" ObjectIndex="38" ctype="SpriteObjectData"> <Position X="38.01752" Y="587.492" /> <Scale ScaleX="0.9444438" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="0.07920316" Y="1.835912" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn10.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch" ActionTag="621314646" FrameEvent="" Tag="46" ObjectIndex="44" ctype="SpriteObjectData"> <Position X="168.6008" Y="758.8837" /> <Scale ScaleX="1" ScaleY="0.8632463" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="20" Y="15" /> <PrePosition X="0.3512516" Y="2.371511" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn08.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Paper" ActionTag="970452609" FrameEvent="" Tag="80" ObjectIndex="90" FlipX="True" ctype="SpriteObjectData"> <Position X="452.4734" Y="522.3035" /> <Scale ScaleX="0.9742648" ScaleY="1.361583" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="273" Y="100" /> <PrePosition X="0.9426529" Y="1.632198" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn01.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch" ActionTag="100051320" FrameEvent="" Tag="47" ObjectIndex="45" ctype="SpriteObjectData"> <Position X="515.7452" Y="758.88" /> <Scale ScaleX="1" ScaleY="0.8632463" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="20" Y="15" /> <PrePosition X="1.074469" Y="2.3715" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn08.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Paper" ActionTag="851387679" FrameEvent="" Tag="83" ObjectIndex="93" ctype="SpriteObjectData"> <Position X="192.4048" Y="654.8519" /> <Scale ScaleX="0.9742648" ScaleY="1.361583" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="273" Y="100" /> <PrePosition X="0.4008433" Y="2.046412" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn01.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Paper" ActionTag="1169301" FrameEvent="" Tag="84" ObjectIndex="94" FlipX="True" ctype="SpriteObjectData"> <Position X="455.807" Y="654.5272" /> <Scale ScaleX="0.9742648" ScaleY="1.361583" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="273" Y="100" /> <PrePosition X="0.949598" Y="2.045398" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn01.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Paper" ActionTag="770506298" FrameEvent="" Tag="81" ObjectIndex="91" ctype="SpriteObjectData"> <Position X="191.2938" Y="387.0745" /> <Scale ScaleX="0.9742648" ScaleY="1.361583" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="273" Y="100" /> <PrePosition X="0.3985288" Y="1.209608" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn01.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Paper" ActionTag="424670381" FrameEvent="" Tag="82" ObjectIndex="92" FlipX="True" ctype="SpriteObjectData"> <Position X="454.6962" Y="386.7498" /> <Scale ScaleX="0.9742648" ScaleY="1.361583" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="273" Y="100" /> <PrePosition X="0.9472837" Y="1.208593" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn01.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Tittle" ActionTag="710883006" FrameEvent="" Tag="57" ObjectIndex="55" ctype="SpriteObjectData"> <Position X="324.0669" Y="762.3644" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="270" Y="94" /> <PrePosition X="0.6751394" Y="2.382389" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS16.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Words" ActionTag="870795194" FrameEvent="" Tag="58" ObjectIndex="56" ctype="SpriteObjectData"> <Position X="320.7326" Y="768.0771" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="181" Y="59" /> <PrePosition X="0.6681929" Y="2.400241" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS01.png" /> </NodeObjectData> <NodeObjectData Name="Button_A" ActionTag="202532377" FrameEvent="" Tag="78" ObjectIndex="1" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="154" Scale9Height="59" ctype="ButtonObjectData"> <Position X="486.21" Y="686.601" /> <Scale ScaleX="0.8963094" ScaleY="0.8963094" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="154" Y="59" /> <PrePosition X="1.012937" Y="2.145628" /> <PreSize X="0" Y="0" /> <TextColor A="255" R="65" G="65" B="70" /> <DisabledFileData Type="Normal" Path="DifficultySelection/DS09.png" /> <PressedFileData Type="Normal" Path="DifficultySelection/DS08.png" /> <NormalFileData Type="Normal" Path="DifficultySelection/DS07.png" /> </NodeObjectData> <NodeObjectData Name="Button_B" ActionTag="135950574" FrameEvent="" Tag="47" ObjectIndex="2" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="154" Scale9Height="60" ctype="ButtonObjectData"> <Position X="486.4839" Y="629.7617" /> <Scale ScaleX="0.8963094" ScaleY="0.8963094" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="154" Y="60" /> <PrePosition X="1.013508" Y="1.968005" /> <PreSize X="0" Y="0" /> <TextColor A="255" R="65" G="65" B="70" /> <DisabledFileData Type="Normal" Path="DifficultySelection/DS12.png" /> <PressedFileData Type="Normal" Path="DifficultySelection/DS11.png" /> <NormalFileData Type="Normal" Path="DifficultySelection/DS10.png" /> </NodeObjectData> <NodeObjectData Name="Button_C" ActionTag="467184988" FrameEvent="" Tag="48" ObjectIndex="3" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="154" Scale9Height="59" ctype="ButtonObjectData"> <Position X="486.21" Y="552.601" /> <Scale ScaleX="0.8963094" ScaleY="0.8963094" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="154" Y="59" /> <PrePosition X="1.012937" Y="1.726878" /> <PreSize X="0" Y="0" /> <TextColor A="255" R="65" G="65" B="70" /> <DisabledFileData Type="Normal" Path="DifficultySelection/DS09.png" /> <PressedFileData Type="Normal" Path="DifficultySelection/DS08.png" /> <NormalFileData Type="Normal" Path="DifficultySelection/DS07.png" /> </NodeObjectData> <NodeObjectData Name="Button_D" ActionTag="1042039909" FrameEvent="" Tag="49" ObjectIndex="4" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="154" Scale9Height="60" ctype="ButtonObjectData"> <Position X="486.4839" Y="495.7617" /> <Scale ScaleX="0.8963094" ScaleY="0.8963094" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="154" Y="60" /> <PrePosition X="1.013508" Y="1.549255" /> <PreSize X="0" Y="0" /> <TextColor A="255" R="65" G="65" B="70" /> <DisabledFileData Type="Normal" Path="DifficultySelection/DS12.png" /> <PressedFileData Type="Normal" Path="DifficultySelection/DS11.png" /> <NormalFileData Type="Normal" Path="DifficultySelection/DS10.png" /> </NodeObjectData> <NodeObjectData Name="Button_E" ActionTag="512416150" FrameEvent="" Tag="50" ObjectIndex="5" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="154" Scale9Height="59" ctype="ButtonObjectData"> <Position X="486.21" Y="418.601" /> <Scale ScaleX="0.8963094" ScaleY="0.8963094" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="154" Y="59" /> <PrePosition X="1.012937" Y="1.308128" /> <PreSize X="0" Y="0" /> <TextColor A="255" R="65" G="65" B="70" /> <DisabledFileData Type="Normal" Path="DifficultySelection/DS09.png" /> <PressedFileData Type="Normal" Path="DifficultySelection/DS08.png" /> <NormalFileData Type="Normal" Path="DifficultySelection/DS07.png" /> </NodeObjectData> <NodeObjectData Name="Button_F" ActionTag="830754479" FrameEvent="" Tag="51" ObjectIndex="6" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="154" Scale9Height="60" ctype="ButtonObjectData"> <Position X="486.4839" Y="361.7617" /> <Scale ScaleX="0.8963094" ScaleY="0.8963094" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="154" Y="60" /> <PrePosition X="1.013508" Y="1.130505" /> <PreSize X="0" Y="0" /> <TextColor A="255" R="65" G="65" B="70" /> <DisabledFileData Type="Normal" Path="DifficultySelection/DS12.png" /> <PressedFileData Type="Normal" Path="DifficultySelection/DS11.png" /> <NormalFileData Type="Normal" Path="DifficultySelection/DS10.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Easy" ActionTag="1045407950" FrameEvent="" Tag="82" ObjectIndex="103" ctype="SpriteObjectData"> <Position X="132.5" Y="658" /> <Scale ScaleX="0.9384622" ScaleY="0.9384622" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="130" Y="130" /> <PrePosition X="0.2760417" Y="2.05625" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS02.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Normal" ActionTag="1045407948" FrameEvent="" Tag="80" ObjectIndex="101" ctype="SpriteObjectData"> <Position X="131.5" Y="524" /> <Scale ScaleX="0.9692308" ScaleY="0.9692308" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="130" Y="130" /> <PrePosition X="0.2739583" Y="1.6375" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS03.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Hard" ActionTag="1045407949" FrameEvent="" Tag="81" ObjectIndex="102" ctype="SpriteObjectData"> <Position X="130.5" Y="388" /> <Scale ScaleX="0.9538462" ScaleY="0.9538462" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="130" Y="130" /> <PrePosition X="0.271875" Y="1.2125" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS05.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Star" ActionTag="446777861" FrameEvent="" Tag="60" ObjectIndex="83" ctype="SpriteObjectData"> <Position X="132.6288" Y="646.1476" /> <Scale ScaleX="0.6020764" ScaleY="0.6020764" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="68" Y="57" /> <PrePosition X="0.27631" Y="2.019211" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn20.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Star" ActionTag="85167778" FrameEvent="" Tag="61" ObjectIndex="84" ctype="SpriteObjectData"> <Position X="132.0403" Y="510.6181" /> <Scale ScaleX="0.6020764" ScaleY="0.6020764" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="68" Y="57" /> <PrePosition X="0.2750839" Y="1.595682" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn20.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Star" ActionTag="606652112" FrameEvent="" Tag="62" ObjectIndex="85" ctype="SpriteObjectData"> <Position X="131.0402" Y="376.2651" /> <Scale ScaleX="0.6020764" ScaleY="0.6020764" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="68" Y="57" /> <PrePosition X="0.2730003" Y="1.175828" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn20.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="93369893" FrameEvent="" Tag="65" ObjectIndex="2" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="238.874" Y="678.394" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.4976541" Y="2.119981" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="386221163" FrameEvent="" Tag="67" ObjectIndex="3" FlipX="True" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="308.8741" Y="678.394" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.6434878" Y="2.119981" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="15942218" FrameEvent="" Tag="69" ObjectIndex="5" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="238.4395" Y="637.8263" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.4967489" Y="1.993207" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="49047516" FrameEvent="" Tag="70" ObjectIndex="6" FlipX="True" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="308.4396" Y="637.8263" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.6425826" Y="1.993207" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="991529264" FrameEvent="" Tag="71" ObjectIndex="7" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="238.8743" Y="544.5487" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.4976549" Y="1.701715" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="336597846" FrameEvent="" Tag="72" ObjectIndex="8" FlipX="True" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="308.8751" Y="544.5487" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.6434897" Y="1.701715" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="892140792" FrameEvent="" Tag="73" ObjectIndex="9" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="238.4398" Y="503.9808" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.4967495" Y="1.57494" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="505917794" FrameEvent="" Tag="74" ObjectIndex="10" FlipX="True" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="308.4405" Y="503.9808" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.6425844" Y="1.57494" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="242155719" FrameEvent="" Tag="75" ObjectIndex="11" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="238.1051" Y="410.7023" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.4960523" Y="1.283445" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="278404635" FrameEvent="" Tag="76" ObjectIndex="12" FlipX="True" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="308.106" Y="410.7023" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.6418875" Y="1.283445" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="624078916" FrameEvent="" Tag="77" ObjectIndex="13" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="237.6706" Y="370.1346" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.4951471" Y="1.156671" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="ImageView_Input" ActionTag="888566705" FrameEvent="" Tag="78" ObjectIndex="14" FlipX="True" Scale9Enable="True" LeftEage="10" Scale9OriginX="10" Scale9Width="6" Scale9Height="32" ctype="ImageViewObjectData"> <Position X="307.6714" Y="370.1346" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="70" Y="32" /> <PrePosition X="0.6409822" Y="1.156671" /> <PreSize X="0.1458333" Y="0.1" /> <FileData Type="Normal" Path="DifficultySelection/DS15.png" /> </NodeObjectData> <NodeObjectData Name="Button_Close" ActionTag="1010864333" FrameEvent="" Tag="86" ObjectIndex="18" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="82" Scale9Height="82" ctype="ButtonObjectData"> <Position X="597.0811" Y="738.2234" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="82" Y="82" /> <PrePosition X="1.243919" Y="2.306948" /> <PreSize X="0" Y="0" /> <TextColor A="255" R="65" G="65" B="70" /> <DisabledFileData Type="Default" Path="Default/Button_Disable.png" /> <PressedFileData Type="Normal" Path="Common/Cn15.png" /> <NormalFileData Type="Normal" Path="Common/Cn14.png" /> </NodeObjectData> <NodeObjectData Name="Text" ActionTag="277433182" FrameEvent="" Tag="88" ObjectIndex="1" FontSize="16" LabelText="3 times" ctype="TextObjectData"> <Position X="267.7234" Y="682.0704" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="55" Y="21" /> <PrePosition X="0.5577571" Y="2.13147" /> <PreSize X="0.04583333" Y="0.15" /> </NodeObjectData> <NodeObjectData Name="Text" ActionTag="52059184" FrameEvent="" Tag="89" ObjectIndex="2" FontSize="16" LabelText="4 point" ctype="TextObjectData"> <Position X="266.9542" Y="642.0696" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="54" Y="21" /> <PrePosition X="0.5561546" Y="2.006467" /> <PreSize X="0" Y="0" /> </NodeObjectData> <NodeObjectData Name="Text" ActionTag="444313769" FrameEvent="" Tag="90" ObjectIndex="3" FontSize="16" LabelText="3 times" ctype="TextObjectData"> <Position X="263.1108" Y="547.4573" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="55" Y="21" /> <PrePosition X="0.5481476" Y="1.710804" /> <PreSize X="0" Y="0" /> </NodeObjectData> <NodeObjectData Name="Text" ActionTag="82939537" FrameEvent="" Tag="91" ObjectIndex="4" FontSize="16" LabelText="5 point" ctype="TextObjectData"> <Position X="262.3412" Y="507.4561" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="54" Y="21" /> <PrePosition X="0.5465441" Y="1.5858" /> <PreSize X="0" Y="0" /> </NodeObjectData> <NodeObjectData Name="Text" ActionTag="174266095" FrameEvent="" Tag="92" ObjectIndex="5" FontSize="16" LabelText="3 times" ctype="TextObjectData"> <Position X="262.3427" Y="413.6123" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="55" Y="21" /> <PrePosition X="0.5465473" Y="1.292538" /> <PreSize X="0" Y="0" /> </NodeObjectData> <NodeObjectData Name="Text" ActionTag="607072693" FrameEvent="" Tag="93" ObjectIndex="6" FontSize="16" LabelText="4 point" ctype="TextObjectData"> <Position X="261.5731" Y="373.6108" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="54" Y="21" /> <PrePosition X="0.5449439" Y="1.167534" /> <PreSize X="0" Y="0" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch" ActionTag="218895352" FrameEvent="" Tag="72" ObjectIndex="86" FlipX="True" ctype="SpriteObjectData"> <Position X="605.6014" Y="611.6518" /> <Scale ScaleX="0.9444448" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="1.26167" Y="1.911412" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn11.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch" ActionTag="323508890" FrameEvent="" Tag="73" ObjectIndex="87" FlipX="True" ctype="SpriteObjectData"> <Position X="605.8379" Y="469.5398" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="1.262162" Y="1.467312" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn11.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch_Double" ActionTag="22599002" FrameEvent="" Tag="74" ObjectIndex="88" FlipX="True" ctype="SpriteObjectData"> <Position X="605.6031" Y="511.7638" /> <Scale ScaleX="0.9444448" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="1.261673" Y="1.599262" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn12.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Scratch_B" ActionTag="110155196" FrameEvent="" Tag="75" ObjectIndex="89" FlipX="True" ctype="SpriteObjectData"> <Position X="605.829" Y="571.7642" /> <Scale ScaleX="0.9444438" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="15" Y="20" /> <PrePosition X="1.262144" Y="1.786763" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn10.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Lightng" ActionTag="1045407942" FrameEvent="" Tag="74" ObjectIndex="95" ctype="SpriteObjectData"> <Position X="208.5002" Y="364.9999" /> <Scale ScaleX="0.7818199" ScaleY="0.7818199" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="55" Y="63" /> <PrePosition X="0.4343754" Y="1.140625" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn17.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Lightng" ActionTag="1045407943" FrameEvent="" Tag="75" ObjectIndex="96" ctype="SpriteObjectData"> <Position X="210.5005" Y="501.0002" /> <Scale ScaleX="0.7818199" ScaleY="0.7818199" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="55" Y="63" /> <PrePosition X="0.4385428" Y="1.565626" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn17.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Lightng" ActionTag="1045407944" FrameEvent="" Tag="76" ObjectIndex="97" ctype="SpriteObjectData"> <Position X="212.5005" Y="635.0003" /> <Scale ScaleX="0.7818199" ScaleY="0.7818199" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="55" Y="63" /> <PrePosition X="0.4427095" Y="1.984376" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="Common/Cn17.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Gold" ActionTag="1045407945" FrameEvent="" Tag="77" ObjectIndex="98" ctype="SpriteObjectData"> <Position X="209.5" Y="546" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="45" Y="41" /> <PrePosition X="0.4364583" Y="1.70625" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS13.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Gold" ActionTag="1045407946" FrameEvent="" Tag="78" ObjectIndex="99" ctype="SpriteObjectData"> <Position X="211.5" Y="681" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="45" Y="41" /> <PrePosition X="0.440625" Y="2.128125" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS13.png" /> </NodeObjectData> <NodeObjectData Name="Sprite_Gold_Copy" ActionTag="1045407947" FrameEvent="" Tag="79" ObjectIndex="100" ctype="SpriteObjectData"> <Position X="207.5" Y="412" /> <Scale ScaleX="1" ScaleY="1" /> <AnchorPoint ScaleX="0.5" ScaleY="0.5" /> <CColor A="255" R="255" G="255" B="255" /> <Size X="45" Y="41" /> <PrePosition X="0.4322917" Y="1.2875" /> <PreSize X="0" Y="0" /> <FileData Type="Normal" Path="DifficultySelection/DS13.png" /> </NodeObjectData> </Children> </ObjectData> </Content> </Content> </GameProjectFile>
Csound
3
chukong/CocosStudioSamples
DemoMicroCardGame/CocosStudioResources/cocosstudio/DifficultySelection.csd
[ "MIT" ]
%{-- - Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --}% <%@ page import="com.dtolabs.rundeck.core.plugins.configuration.StringRenderingConstants" %> <g:set var="scopeinfo" value="${g.rkey()}"/> <g:if test="${prop.renderingOptions?.(StringRenderingConstants.DISPLAY_TYPE_KEY) in [StringRenderingConstants.DisplayType.PASSWORD, 'PASSWORD']}"> <g:set var="propValue" value="••••••••"/> </g:if> <g:else> <g:set var="propValue" value="${prop.defaultValue ?: 'value'}"/> </g:else> <g:unless test="${outofscopeHidden}"> <g:unless test="${outofscopeShown}"> <g:expander key="${scopeinfo}">Admin configuration info</g:expander> </g:unless> <div class="" id="${enc(attr:scopeinfo)}" style="${wdgt.styleVisible(if: outofscopeShown)}"> <g:if test="${!specialConfiguration?.prefix}"> <g:if test="${propScope?.isProjectLevel()}"> <div>configure project: <code> <g:if test="${mapping && mapping[prop.name]}"> <g:enc>${mapping[prop.name]}=${prop.defaultValue?:'value'}</g:enc> </g:if> <g:else> <g:pluginPropertyProjectScopeKey provider="${pluginName}" service="${serviceName}" property="${prop.name}"/>=<g:enc>${propValue}</g:enc> </g:else> </code></div> </g:if> <g:if test="${propScope?.isFrameworkLevel() && (frameworkMapping&& frameworkMapping[prop.name] || !hideMissingFrameworkMapping )}"> <div>configure framework: <code> <g:if test="${frameworkMapping && frameworkMapping[prop.name]}"> <g:enc>${frameworkMapping[prop.name]}=${prop.defaultValue ?: 'value'}</g:enc> </g:if> <g:else> <g:pluginPropertyFrameworkScopeKey provider="${pluginName}" service="${serviceName}" property="${prop.name}"/>=<g:enc>${propValue}</g:enc> </g:else> </code> </div> </g:if> </g:if><g:else> <div>configuration: <code> <g:enc>${prefix+prop.name}=${prop.defaultValue ?: 'value'}</g:enc> </code> </div> </g:else> <div class="text-info"> <g:if test="${prop.defaultValue}"> Default value: <code><g:enc>${propValue}</g:enc></code> </g:if> <g:if test="${prop.selectValues}"> Allowed values: <g:each in="${prop.selectValues}"> <code><g:enc>${it}</g:enc></code>, </g:each> </g:if> </div> </div> </g:unless>
Groovy Server Pages
3
kbens/rundeck
rundeckapp/grails-app/views/framework/_pluginConfigPropertyScopeInfo.gsp
[ "Apache-2.0" ]
offered_load.description="offered load; Net.subnet[0]; testfiles/vectors.vec; " offered_load.X=[ 0.1; 0.2; 0.3; 0.4; 0.5; 0.6; 0.7; 0.8; 0.9; 1; 1.1; 1.2; 1.3; 1.4; 1.5; 1.6; 1.7; 1.8; 1.9; 2; ] offered_load.Y=[ 30; 40; 10; 20; 50; 60; 70; 80; 90; 100; 110; 120; 130; 140; 150; 160; 170; 180; 190; 200; ] throughput____.description="throughput (%); Net.subnet[0]; testfiles/vectors.vec; " throughput____.X=[ 0.1; 0.2; 0.3; 0.41; 0.51; 0.6; 0.7; 0.8; 0.9; 1; 1.1; 1.2; 1.3; 1.4; 1.5; 1.6; 1.7; 1.8; 1.9; 2; ] throughput____.Y=[ 35.11; 45.06; 8.12; 22.96; 53.21; 59.88; 65.34; 69.81; 73.47; 76.46; 78.91; 80.92; 82.57; 83.91; 84.5; 83.92; 80.86; 74.87; 68.77; 57.16; ] frames_dropped____.description="frames dropped (%); Net.subnet[0]; testfiles/vectors.vec; " frames_dropped____.X=[ 0.1; 0.21; 0.31; 0.41; 0.51; 0.6; 0.7; 0.8; 0.9; 1; 1.1; 1.2; 1.3; 1.4; 1.5; 1.6; 1.7; 1.8; 1.9; 2; ] frames_dropped____.Y=[ 0; 0; 0; 0; 0; 0.2; 0; 0; 1.2; 0; 0.9; 1.4; 2.1; 2.2; 2.6; 5.1; 9.2; 14.4; 25.4; 43.4; ]
Matlab
3
eniac/parallel-inet-omnet
test/scave/expected/vectors.matlab
[ "Xnet", "X11" ]
#![feature(generic_associated_types)] #![feature(min_type_alias_impl_trait)] impl SomeTrait for SomeType { type SomeGAT<'a> where Self: 'a, = impl SomeOtherTrait; }
Rust
2
ohno418/rust
src/tools/rustfmt/tests/target/issue_4911.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
{-| Module : Monomer.Graphics.FFI Copyright : (c) 2018 Francisco Vallarino, (c) 2016 Moritz Kiefer License : BSD-3-Clause (see the LICENSE file) Maintainer : [email protected] Stability : experimental Portability : non-portable Provides functions for getting text dimensions and metrics. Based on code from cocreature's https://github.com/cocreature/nanovg-hs -} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} module Monomer.Graphics.FFI where import Control.Monad (forM) import Data.ByteString (useAsCString) import Data.Text (Text) import Data.Text.Foreign (withCStringLen) import Data.Sequence (Seq) import Foreign import Foreign.C (CString) import Foreign.C.Types import Foreign.Marshal.Alloc import Foreign.Ptr import Foreign.Storable import qualified Data.Sequence as Seq import qualified Data.Text as T import qualified Data.Text.Encoding as T import Monomer.Graphics.Types (GlyphPos(..)) #include "fontmanager.h" -- | Vector of 4 strict elements data V4 a = V4 !a !a !a !a deriving (Show, Read, Eq, Ord) newtype Bounds = Bounds (V4 CFloat) deriving (Show, Read, Eq, Ord) instance Storable Bounds where sizeOf _ = sizeOf (0 :: CFloat) * 4 alignment _ = alignment (0 :: CFloat) peek p = do let p' = castPtr p :: Ptr CFloat a <- peekElemOff p' 0 b <- peekElemOff p' 1 c <- peekElemOff p' 2 d <- peekElemOff p' 3 pure (Bounds (V4 a b c d)) poke p (Bounds (V4 a b c d)) = do let p' = castPtr p :: Ptr CFloat pokeElemOff p' 0 a pokeElemOff p' 1 b pokeElemOff p' 2 c pokeElemOff p' 3 d data GlyphPosition = GlyphPosition { -- | Pointer of the glyph in the input string. str :: !(Ptr CChar), -- | The x-coordinate of the logical glyph position. glyphX :: !CFloat, -- | The left bound of the glyph shape. glyphPosMinX :: !CFloat, -- | The right bound of the glyph shape. glyphPosMaxX :: !CFloat, -- | The lower bound of the glyph shape. glyphPosMinY :: !CFloat, -- | The upper bound of the glyph shape. glyphPosMaxY :: !CFloat } deriving (Show, Eq, Ord) instance Storable GlyphPosition where sizeOf _ = {# sizeof FMGglyphPosition #} alignment _ = {#alignof FMGglyphPosition#} peek p = do str <- {#get FMGglyphPosition->str#} p x <- {#get FMGglyphPosition->x#} p minx <- {#get FMGglyphPosition->minx#} p maxx <- {#get FMGglyphPosition->maxx#} p miny <- {#get FMGglyphPosition->miny#} p maxy <- {#get FMGglyphPosition->maxy#} p pure (GlyphPosition str x minx maxx miny maxy) poke p (GlyphPosition str x minx maxx miny maxy) = do {#set FMGglyphPosition->str#} p str {#set FMGglyphPosition->x#} p x {#set FMGglyphPosition->minx#} p minx {#set FMGglyphPosition->maxx#} p maxx {#set FMGglyphPosition->miny#} p miny {#set FMGglyphPosition->maxy#} p maxy {#pointer *FMGglyphPosition as GlyphPositionPtr -> GlyphPosition#} peekBounds :: Ptr CFloat -> IO Bounds peekBounds = peek . castPtr allocaBounds :: (Ptr CFloat -> IO b) -> IO b allocaBounds f = alloca (\(p :: Ptr Bounds) -> f (castPtr p)) withCString :: Text -> (CString -> IO b) -> IO b withCString t = useAsCString (T.encodeUtf8 t) withText :: Text -> (CString -> IO b) -> IO b withText t = useAsCString (T.encodeUtf8 t) -- | Marshalling helper for a constant 'nullPtr' withNull :: (Ptr a -> b) -> b withNull f = f nullPtr -- Common {# pointer *FMcontext as FMContext newtype #} deriving instance Storable FMContext {# fun unsafe fmInit {`Double'} -> `FMContext' #} {# fun unsafe fmCreateFont {`FMContext', withCString*`Text', withCString*`Text'} -> `Int' #} {# fun unsafe fmFontFace {`FMContext', withCString*`Text'} -> `()' #} {# fun unsafe fmFontSize {`FMContext', `Double'} -> `()' #} {# fun unsafe fmFontBlur {`FMContext', `Double'} -> `()' #} {# fun unsafe fmTextLetterSpacing {`FMContext', `Double'} -> `()' #} {# fun unsafe fmTextLineHeight {`FMContext', `Double'} -> `()' #} {# fun unsafe fmTextMetrics as fmTextMetrics_ {`FMContext', alloca- `CFloat' peek*, alloca- `CFloat' peek*, alloca- `CFloat' peek*} -> `()' #} fmTextMetrics :: FMContext -> IO (Double, Double, Double) fmTextMetrics fm = do (asc, desc, lineh) <- fmTextMetrics_ fm return (realToFrac asc, realToFrac desc, realToFrac lineh) {# fun unsafe fmTextBounds as fmTextBounds_ {`FMContext', `Double', `Double', withText*`Text', withNull-`Ptr CUChar', allocaBounds-`Bounds'peekBounds*} -> `Double' #} fmTextBounds :: FMContext -> Double -> Double -> Text -> IO (Double, Double, Double, Double) fmTextBounds fm x y text = do (_, Bounds (V4 x1 y1 x2 y2)) <- fmTextBounds_ fm x y text return (realToFrac x1, realToFrac y1, realToFrac x2, realToFrac y2) {# fun unsafe fmTextGlyphPositions as fmTextGlyphPositions_ {`FMContext', `Double', `Double', id`Ptr CChar', id`Ptr CChar', `GlyphPositionPtr', `CInt'} -> `CInt' #} fmTextGlyphPositions :: FMContext -> Double -> Double -> Text -> IO (Seq GlyphPosition) fmTextGlyphPositions c x y text = withCStringLen text $ \(ptr, len) -> do let startPtr = ptr let endPtr = ptr `plusPtr` len allocaBytesAligned bufferSize align $ \arrayPtr -> do count <- fmTextGlyphPositions_ c x y startPtr endPtr arrayPtr maxGlyphs Seq.fromList <$> readChunk arrayPtr count where maxGlyphs = fromIntegral (T.length text) bufferSize = sizeOf (undefined :: GlyphPosition) * fromIntegral maxGlyphs align = alignment (undefined :: GlyphPosition) readChunk :: GlyphPositionPtr -> CInt -> IO [GlyphPosition] readChunk arrayPtr count = forM [0..count-1] $ \i -> peekElemOff arrayPtr (fromIntegral i)
C2hs Haskell
5
hasufell/monomer
src/Monomer/Graphics/FFI.chs
[ "BSD-3-Clause" ]
#![feature(ptr_internals)] use std::ptr::Unique; fn main() { let mut i: u32 = 10; let unique = Unique::new(&mut i).unwrap(); let x: &'static *mut u32 = &(unique.as_ptr()); //~^ ERROR temporary value dropped while borrowed }
Rust
3
Eric-Arellano/rust
src/test/ui/consts/const-ptr-unique.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
MTREE(5) manual page == NAME == '''mtree''' - format of mtree dir hierarchy files == DESCRIPTION == The '''mtree''' format is a textual format that describes a collection of filesystem objects. Such files are typically used to create or verify directory hierarchies. === General Format=== An '''mtree''' file consists of a series of lines, each providing information about a single filesystem object. Leading whitespace is always ignored. When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be encoded as a backslash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be converted into the corresponding character. Each line is interpreted independently as one of the following types: <dl> <dt>Blank</dt><dd> Blank lines are ignored. </dd><dt>Comment</dt><dd> Lines beginning with '''#''' are ignored. </dd><dt>Special</dt><dd> Lines beginning with '''/''' are special commands that influence the interpretation of later lines. </dd><dt>Relative</dt><dd> If the first whitespace-delimited word has no '''/''' characters, it is the name of a file in the current directory. Any relative entry that describes a directory changes the current directory. </dd><dt>dot-dot</dt><dd> As a special case, a relative entry with the filename ''..'' changes the current directory to the parent directory. Options on dot-dot entries are always ignored. </dd><dt>Full</dt><dd> If the first whitespace-delimited word has a '''/''' character after the first character, it is the pathname of a file relative to the starting directory. There can be multiple full entries describing the same file. </dd></dl> Some tools that process '''mtree''' files may require that multiple lines describing the same file occur consecutively. It is not permitted for the same file to be mentioned using both a relative and a full file specification. === Special commands=== Two special commands are currently defined: <dl> <dt>'''/set'''</dt><dd> This command defines default values for one or more keywords. It is followed on the same line by one or more whitespace-separated keyword definitions. These definitions apply to all following files that do not specify a value for that keyword. </dd><dt>'''/unset'''</dt><dd> This command removes any default value set by a previous '''/set''' command. It is followed on the same line by one or more keywords separated by whitespace. </dd></dl> === Keywords=== After the filename, a full or relative entry consists of zero or more whitespace-separated keyword definitions. Each such definition consists of a key from the following list immediately followed by an '=' sign and a value. Software programs reading mtree files should warn about unrecognized keywords. Currently supported keywords are as follows: <dl> <dt>'''cksum'''</dt><dd> The checksum of the file using the default algorithm specified by the [[cksum(1)|http://www.freebsd.org/cgi/man.cgi?query=cksum&sektion=1]] utility. </dd><dt>'''device'''</dt><dd> The device number for .B block or .B char file types. The value must be one of the following forms: <dl> <dt>''format'',''major'',''minor''Bo,''subunit'' Bc</dt><dd> A device with ''major'', minor and optional ''subunit'' fields. Their meaning is specified by the operating's system ''format''. See below for valid formats. </dd><dt>''number''</dt><dd> Opaque number (as stored on the file system). </dd></dl> The following values for ''format'' are recognized: .B native , .B 386bsd , .B 4bsd , .B bsdos , .B freebsd , .B hpux , .B isc , .B linux , .B netbsd , .B osf1 , .B sco , .B solaris , .B sunos , .B svr3 , .B svr4 , and .B ultrix . See [[mknod(8)|http://www.freebsd.org/cgi/man.cgi?query=mknod&sektion=8]] for more details. </dd><dt>'''contents'''</dt><dd> The full pathname of a file that holds the contents of this file. </dd><dt>'''flags'''</dt><dd> The file flags as a symbolic name. See [[chflags(1)|http://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=1]] for information on these names. If no flags are to be set the string "none" may be used to override the current default. </dd><dt>'''gid'''</dt><dd> The file group as a numeric value. </dd><dt>'''gname'''</dt><dd> The file group as a symbolic name. </dd><dt>'''ignore'''</dt><dd> Ignore any file hierarchy below this file. </dd><dt>'''inode'''</dt><dd> The inode number. </dd><dt>'''link'''</dt><dd> The target of the symbolic link when type=link. </dd><dt>'''md5'''</dt><dd> The MD5 message digest of the file. </dd><dt>'''md5digest'''</dt><dd> A synonym for '''md5'''. </dd><dt>'''mode'''</dt><dd> The current file's permissions as a numeric (octal) or symbolic value. </dd><dt>'''nlink'''</dt><dd> The number of hard links the file is expected to have. </dd><dt>'''nochange'''</dt><dd> Make sure this file or directory exists but otherwise ignore all attributes. </dd><dt>'''optional'''</dt><dd> The file is optional; do not complain about the file if it is not in the file hierarchy. </dd><dt>'''resdevice'''</dt><dd> The "resident" device number of the file, e.g. the ID of the device that contains the file. Its format is the same as the one for '''device'''. </dd><dt>'''ripemd160digest'''</dt><dd> The '''RIPEMD160''' message digest of the file. </dd><dt>'''rmd160'''</dt><dd> A synonym for '''ripemd160digest'''. </dd><dt>'''rmd160digest'''</dt><dd> A synonym for '''ripemd160digest'''. </dd><dt>'''sha1'''</dt><dd> The '''FIPS''' 160-1 ("Tn SHA-1") message digest of the file. </dd><dt>'''sha1digest'''</dt><dd> A synonym for '''sha1'''. </dd><dt>'''sha256'''</dt><dd> The '''FIPS''' 180-2 ("Tn SHA-256") message digest of the file. </dd><dt>'''sha256digest'''</dt><dd> A synonym for '''sha256'''. </dd><dt>'''sha384'''</dt><dd> The '''FIPS''' 180-2 ("Tn SHA-384") message digest of the file. </dd><dt>'''sha384digest'''</dt><dd> A synonym for '''sha384'''. </dd><dt>'''sha512'''</dt><dd> The '''FIPS''' 180-2 ("Tn SHA-512") message digest of the file. </dd><dt>'''sha512digest'''</dt><dd> A synonym for '''sha512'''. </dd><dt>'''size'''</dt><dd> The size, in bytes, of the file. </dd><dt>'''time'''</dt><dd> The last modification time of the file. </dd><dt>'''type'''</dt><dd> The type of the file; may be set to any one of the following: <dl> <dt>'''block'''</dt><dd> block special device </dd><dt>'''char'''</dt><dd> character special device </dd><dt>'''dir'''</dt><dd> directory </dd><dt>'''fifo'''</dt><dd> fifo </dd><dt>'''file'''</dt><dd> regular file </dd><dt>'''link'''</dt><dd> symbolic link </dd><dt>'''socket'''</dt><dd> socket </dd></dl> </dd><dt>'''uid'''</dt><dd> The file owner as a numeric value. </dd><dt>'''uname'''</dt><dd> The file owner as a symbolic name. </dd></dl> == SEE ALSO == [[cksum(1)|http://www.freebsd.org/cgi/man.cgi?query=cksum&sektion=1]], [[find(1)|http://www.freebsd.org/cgi/man.cgi?query=find&sektion=1]], [[mtree(8)|http://www.freebsd.org/cgi/man.cgi?query=mtree&sektion=8]] == HISTORY == The '''mtree''' utility appeared in BSD 4.3 Reno. The '''MD5''' digest capability was added in FreeBSD 2.1, in response to the widespread use of programs which can spoof [[cksum(1)|http://www.freebsd.org/cgi/man.cgi?query=cksum&sektion=1]]. The '''SHA-1''' and '''RIPEMD160''' digests were added in FreeBSD 4.0, as new attacks have demonstrated weaknesses in '''MD5 .''' The '''SHA-256''' digest was added in FreeBSD 6.0. Support for file flags was added in FreeBSD 4.0, and mostly comes from NetBSD. The "full" entry format was added by NetBSD.
MediaWiki
4
probonopd/imagewriter
dependencies/libarchive-3.4.2/doc/wiki/ManPageMtree5.wiki
[ "Apache-2.0" ]
/* * Copyright (c) 2020-2021, Itamar S. <[email protected]> * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "AttributeValue.h" #include "CompilationUnit.h" #include "DwarfTypes.h" #include <AK/ByteBuffer.h> #include <AK/NonnullOwnPtrVector.h> #include <AK/NonnullRefPtr.h> #include <AK/RedBlackTree.h> #include <AK/RefCounted.h> #include <AK/String.h> #include <LibELF/Image.h> namespace Debug::Dwarf { class DwarfInfo { AK_MAKE_NONCOPYABLE(DwarfInfo); AK_MAKE_NONMOVABLE(DwarfInfo); public: explicit DwarfInfo(ELF::Image const&); ReadonlyBytes debug_info_data() const { return m_debug_info_data; } ReadonlyBytes abbreviation_data() const { return m_abbreviation_data; } ReadonlyBytes debug_strings_data() const { return m_debug_strings_data; } ReadonlyBytes debug_line_strings_data() const { return m_debug_line_strings_data; } ReadonlyBytes debug_range_lists_data() const { return m_debug_range_lists_data; } ReadonlyBytes debug_str_offsets_data() const { return m_debug_str_offsets_data; } ReadonlyBytes debug_addr_data() const { return m_debug_addr_data; } ReadonlyBytes debug_ranges_data() const { return m_debug_ranges_data; } template<typename Callback> void for_each_compilation_unit(Callback) const; AttributeValue get_attribute_value(AttributeDataForm form, ssize_t implicit_const_value, InputMemoryStream& debug_info_stream, const CompilationUnit* unit = nullptr) const; Optional<DIE> get_die_at_address(FlatPtr) const; // Note that even if there is a DIE at the given offset, // but it does not exist in the DIE cache (because for example // it does not contain an address range), then this function will not return it. // To get any DIE object at a given offset in a compilation unit, // use CompilationUnit::get_die_at_offset. Optional<DIE> get_cached_die_at_offset(FlatPtr) const; private: void populate_compilation_units(); void build_cached_dies() const; ReadonlyBytes section_data(StringView section_name) const; ELF::Image const& m_elf; ReadonlyBytes m_debug_info_data; ReadonlyBytes m_abbreviation_data; ReadonlyBytes m_debug_strings_data; ReadonlyBytes m_debug_line_data; ReadonlyBytes m_debug_line_strings_data; ReadonlyBytes m_debug_range_lists_data; ReadonlyBytes m_debug_str_offsets_data; ReadonlyBytes m_debug_addr_data; ReadonlyBytes m_debug_ranges_data; NonnullOwnPtrVector<Dwarf::CompilationUnit> m_compilation_units; struct DIERange { FlatPtr start_address { 0 }; FlatPtr end_address { 0 }; }; struct DIEAndRange { DIE die; DIERange range; }; using DIEStartAddress = FlatPtr; mutable RedBlackTree<DIEStartAddress, DIEAndRange> m_cached_dies_by_range; mutable RedBlackTree<FlatPtr, DIE> m_cached_dies_by_offset; mutable bool m_built_cached_dies { false }; }; template<typename Callback> void DwarfInfo::for_each_compilation_unit(Callback callback) const { for (const auto& unit : m_compilation_units) { callback(unit); } } }
C
4
xspager/serenity
Userland/Libraries/LibDebug/Dwarf/DwarfInfo.h
[ "BSD-2-Clause" ]
--- title: "Chapter 8" output: html_document: css: style.css highlight: tango --- ```{r, include=FALSE} knitr::opts_chunk$set(cache = FALSE, echo = TRUE, fig.align = "center", comment = "#>", message = FALSE) ``` ```{r} require(data.table) require(ggplot2) theme_set( theme_bw(base_size = 14, base_family = "Lato") + theme(panel.grid = element_blank(), panel.border = element_blank()) ) ``` # 8.1 Parsing Unix timestamps It's not obvious how to deal with Unix timestamps in `data.table` -- it took me quite a while to figure this out. The file we're using here is a popularity-contest file I found on my system at `/var/log/popularity-contest`. Here's an explanation of [how this file works](https://popcon.ubuntu.com/README). I'm going to hope that nothing in it is sensitive :) ```{r} popcon <- fread("../data/popularity-contest.txt", skip = 1, sep = " ", header = FALSE, fill = TRUE) popcon <- popcon[!NROW(popcon)] # remove last row colnames(popcon) <- c("atime", "ctime", "package_name", "mu_program", "tag") ``` The colums are the access time, created time, package name, recently used program, and a tag. ```{r} print(popcon[1:5]) ``` ```{r} popcon[, atime := as.POSIXct(as.integer(atime), origin = "1970-01-01")] popcon[, ctime := as.POSIXct(as.integer(ctime), origin = "1970-01-01")] ``` So now we can look at our `atime` and `ctime` as dates! ```{r} print(popcon[1:5]) ``` Now suppose we want to look at all packages that aren't libraries. First, I want to get rid of everything with timestamp 0. Notice how we can just use a string in this comparison, even though it's actually a timestamp on the inside? ```{r} popcon <- popcon[atime > as.POSIXct("1970-01-01 00:00:00")] ``` Now we can use base R string abilities to just look at rows where the package name doesn't contain 'lib'. ```{r} nonlibraries <- popcon[!grepl("lib", package_name)] nonlibraries[order(ctime, decreasing = TRUE)][1:10] ``` Okay, cool, it says that I I installed ddd recently. And postgresql! I remember installing those things. Neat.
RMarkdown
5
chuvanan/rdatatable-cookbook
cookbook/chapter8-parsing-unix-timestamps.rmd
[ "CC-BY-4.0" ]
#!/bin/sh set -e autoreconf -if --warnings=all
Shell
2
xuyangcn/opalcoin
src/secp256k1/autogen.sh
[ "MIT" ]
//Attempt to find the text emotes on Twitch //These are similar to brollI "I AM" and its friends. //curl -H 'Accept: application/vnd.twitchtv.v5+json' -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' -X GET 'https://api.twitch.tv/kraken/chat/emoticons' >emote_list.json //If a human-readable version is desired: //python3 -m json.tool <emote_list.json >emote_human.json //Pretty-prints it at roughly double the file size. Either version is acceptable to this script. //Focal points taken from kittenzSew; impgrrlMuch is nearly the same; //brollI is a bit different but close. array kittenz = ({ ({80, 106, 239}), ({192, 80, 239}), ({236, 0, 140}), }); //Fourth (optional) focal point from impgrrlMuch. Improves some results; worsens others. array impgrrl = kittenz + ({({153, 50, 172})}); //TockCustom has a darker set of colours. array tockBulge = ({ ({102, 45, 145}), ({127, 63, 152}), ({146, 39, 143}), ({236, 0, 140}), ({239, 89, 161}), }); array tockMoist = tockBulge + ({({169, 23, 143})}); //Select which set of focal points to use. array focal_points = kittenz; array color_weight = ({87, 127, 41}); //Color weighting as per grey() //array color_weight = ({1,1,1}); //Flat color weighting constant SCORE = "- Score -"; //Is a string for the sake of the %O display mapping(string|int:int) find_colors(string fn) { Image.Image img, alpha; if (catch { mapping m = Image.PNG._decode(Stdio.read_file(fn)); img = m->image; alpha = m->alpha; }) return 0; //Decoding errors happen sometimes. Some images are actually JPGs. mapping(string|int:int) ret = ([]); int pixels = 0; array(int) aimed_at = allocate(sizeof(focal_points)); for (int y = 0; y < img->ysize(); ++y) for (int x = 0; x < img->xsize(); ++x) { int a = alpha ? `+(@alpha->getpixel(x, y)) : 768; if (a < 128) continue; //Ignore what's transparent (or mostly so) array pixel = img->getpixel(x, y); //Calculate the distance-squared to each focal point. //Whichever one is closest, that's this pixel's distance. int best = 256*256 * `+(@color_weight); int focalpoint; foreach (focal_points; int which; array focus) { int dist = 0; for (int i=0; i<3; ++i) dist += (pixel[i] - focus[i]) ** 2 * color_weight[i]; if (dist < best) {focalpoint = which; best = dist;} } aimed_at[focalpoint]++; ret["F" + focalpoint]++; ret[sprintf("%02x%02x%02x = "+best, @img->getpixel(x, y))]++; ret[best]++; ret[SCORE] += best; ++pixels; } if (pixels) //because brollC :D { //Take the average distance of non-transparent pixels, to avoid skewing towards //mostly-transparent images. ret[SCORE] /= pixels; //Multiply by the highest proportion to land on a single focal point. This //means that images using exactly one colour (which thus attach every pixel //to the same focal point) will score higher (worse) than those which use //all three colours fairly evenly. //NOTE: The fourth focal point is optional; three-letter emotes (SEW, IAM) //don't use it. So don't penalize an emote for using only three colours. ret[SCORE] = ret[SCORE] * max(@aimed_at) / max(min(@aimed_at[..2]), 1); } /* Actually there are a bunch of transparent emotes. So suppress them. bboyHair (bald/shaved streamer), brollC, ferretNULL, fireBreak, kgothTENBUCKS/kgothTWENTYFIVEBUCKS (streamer doesn't like tier emotes), m4xEmpty, micNone, pvp0, ruyuB, smithNothing, teeveeBlank, tgm300, twingeBlank. There are also near-transparent ones - ignore them too. */ else ret[SCORE] = 1<<256; //Eliminate unusual colours from the dump display. //TODO: Fold them into nearby colours. //(They still affect the final score.) foreach (ret; string col; int count) if (count < 10) m_delete(ret, col); return ret; } array parse_images(array(string) files, int start, int step) { write("Starting thread %d/%d\n", start, step); array results = ({ }); for (int i = start; i < sizeof(files); i += step) { mapping info = find_colors(files[i]); if (!info) continue; if (sizeof(files) < 20) write("%s: %O\n", files[i]-".png", info); results += ({ ({info[SCORE], files[i]-".png"}) }); } return results; } int main(int argc, array(string) argv) { array all_emotes = Standards.JSON.decode_utf8(Stdio.read_file("emote_list.json"))->emoticons; //NOTE: The emote info contains an *array* of images, but every single //one seems to have one element in that array. if (argc > 2 && argv[1] == "--results") { //Reparse the result file(s) into a combined file mapping(string:string) emote_url = ([]); foreach (all_emotes, mapping emote) emote_url[emote->regex] = emote->images[0]->url; array columns = ({ }); foreach (argv[2..], string resultfile) { sscanf(Stdio.read_file(resultfile), "Colors:%{ %[a-z0-9]%}<br>\n%{<li><img src=\"%s.png\"> %*s\n%}", array cols, array emotes); array col = ({sprintf("<td>Color matches: %{<div style=\"background-color: #%s\"></div>%}</td>", cols)}); foreach (emotes, [string emote]) col += ({sprintf("<td><img src=\"%s\" alt=\"%s\"> %<s</td>", emote_url[emote] || "(none)", emote)}); columns += ({col}); } Stdio.write_file(argv[0] - ".pike" + ".html", sprintf(#"<!doctype html> <head> <meta charset=\"utf-8\"> <title>Text emotes</title> <style> div { display: inline-block; width: 28px; height: 28px; } </style> </head> <body> <p> The following is the result of a great emote search, looking for the text emotes like 'I AM', 'SEW', 'MUCH', etc. Similarity is determined by their use of colours; but the emotes are not all perfectly consistent - TockCustom's 'MOIST' and 'BULGE' emotes use darker shades, for instance. Nonetheless, the search has proved somewhat fruitful; below you will see the algorithm's top 100 results. </p> <p>Source code is all on <a href=\"https://github.com/Rosuav/shed/blob/master/textemotes.pike\">GitHub</a>.</p> <table border=1> %{<tr>%s</tr> %}</table></body>", Array.transpose(columns)[*]*"")); return 0; } Array.shuffle(all_emotes); //Pick up some emotes we don't have and download them. int dl = 15000; //Once the limit gets exhausted, stop downloading and just analyze what we have. //dl = sizeof(all_emotes) - sizeof(glob("*.png", get_dir())); //Get the lot! int checked = 0; int downloaded = 0; if (dl) foreach (all_emotes, mapping emote) { if (!emote->images[0]->url) continue; //A handful of emotes have no URL. Why? ++checked; string fn = replace(emote->regex, "/", "\xEF\xBC\x8F") + ".png"; //A slash in a file name becomes "/", UTF-8 encoded. if (file_stat(fn)) continue; //Assume that any file is the right file. ++downloaded; if (has_value(argv, "--count")) continue; write("[%d] Downloading %s...\e[K\r", dl, emote->regex); string data = Protocols.HTTP.get_url_data(emote->images[0]->url); if (!data) {write("ERROR LOADING %s\e[K\n", emote->regex); continue;} Stdio.write_file(fn, data); if (!--dl) break; } write("Checked %d, downloaded %d.\e[K\n", checked, downloaded); if (has_value(argv, "--count")) return 0; array(string) files = sort(glob("*.png", get_dir())); if (argc > 1) files = argv[1..]; //Process a specific set of files for debug purposes #if 0 array THREADS = enumerate(4); //For some reason, this doesn't work with the array directly in the parameters. (???) array emotes = `+(@Thread.Thread(parse_images, files, THREADS[*], sizeof(THREADS))->wait()); #else //Hmm. With one thread, we're pegging one CPU core. But with multiple, we just divide the job //across multiple cores, with no two cores being busy at the same time. So there's some sort //of locking going on, and the overall task is slower with threads than without. //Let's just do it without threads, then. :( array emotes = parse_images(files, 0, 1); #endif emotes -= ({0}); write("Parsed %d/%d.\n", sizeof(emotes), sizeof(files)); sort(emotes); write("%{[%d] %s\n%}", emotes[..9]); Stdio.write_file("most_similar.html", sprintf("Colors:%{ %02x%02x%02x%}<br>\n%{<li><img src=\"%s.png\"> %<s\n%}", focal_points, emotes[..99][*][1])); }
Pike
5
stephenangelico/shed
textemotes.pike
[ "MIT" ]
Import mojo Import tween Class myApp Extends App Field tween:Tween Field equations:String[] = ["Linear","Back","Bounce","Circ","Cubic","Elastic","Expo","Quad","Quart","Quint","Sine"] Field easeTypes:String[] = ["EaseIn","EaseOut","EaseInOut"] Field currentEquation:Int Field currentEaseType:Int Method OnCreate() SetUpdateRate(60) tween = New Tween(Tween.Linear,100,540,2000) tween.Start() End Method OnUpdate() If KeyHit(KEY_1) NextEquation() If KeyHit(KEY_2) NextEase() If KeyHit(KEY_SPACE) tween.Rewind() tween.Start() Endif tween.Update() End Method OnRender() SetColor(0,0,0) DrawRect(0,0,640,480) SetColor(100,100,100) DrawRect(88,198,464,24) SetColor(0,0,0) DrawRect(89,199,462,22) SetColor(255,255,255) DrawOval(tween.Value()-10,200,20,20) DrawText(EquationString(),5,5) DrawText("Press 1 to change tween equation",5,30) DrawText("Press 2 to change ease mode",5,45) DrawText("Press space to replay current selection",5,60) End Method EquationString:String() If equations[currentEquation] = "Linear" Return "Tween.Linear" Else Return "Tween."+equations[currentEquation]+"."+easeTypes[currentEaseType] Endif End Method NextEquation() currentEquation += 1 If currentEquation >= equations.Length() currentEquation = 0 SetEquation1() End Method NextEase() currentEaseType += 1 If currentEaseType >= easeTypes.Length() currentEaseType = 0 SetEquation1() End Method SetEquation1() Select equations[currentEquation] Case "Linear" tween.SetEquation(Tween.Linear) tween.Rewind() tween.Start() Case "Back" SetEquation2(Tween.Back) Case "Bounce" SetEquation2(Tween.Bounce) Case "Circ" SetEquation2(Tween.Circ) Case "Cubic" SetEquation2(Tween.Cubic) Case "Elastic" SetEquation2(Tween.Elastic) Case "Expo" SetEquation2(Tween.Expo) Case "Quad" SetEquation2(Tween.Quad) Case "Quart" SetEquation2(Tween.Quart) Case "Quint" SetEquation2(Tween.Quint) Case "Sine" SetEquation2(Tween.Sine) End End Method SetEquation2(equation:TweenEquation) Select easeTypes[currentEaseType] Case "EaseIn" tween.SetEquation(equation.EaseIn) tween.Rewind() tween.Start() Case "EaseOut" tween.SetEquation(equation.EaseOut) tween.Rewind() tween.Start() Case "EaseInOut" tween.SetEquation(equation.EaseInOut) tween.Rewind() tween.Start() End End End Function Main() New myApp End
Monkey
4
blitz-research/monkey
bananas/skn3/tweening/tweendemo.monkey
[ "Zlib" ]
#include <array> #include <QLabel> #include <QPixmap> #include <QProgressBar> #include <QSocketNotifier> #include <QVariantAnimation> #include <QWidget> constexpr int spinner_fps = 30; constexpr QSize spinner_size = QSize(360, 360); class TrackWidget : public QWidget { Q_OBJECT public: TrackWidget(QWidget *parent = nullptr); private: void paintEvent(QPaintEvent *event) override; std::array<QPixmap, spinner_fps> track_imgs; QVariantAnimation m_anim; }; class Spinner : public QWidget { Q_OBJECT public: explicit Spinner(QWidget *parent = 0); private: QLabel *text; QProgressBar *progress_bar; QSocketNotifier *notifier; public slots: void update(int n); };
C
4
shoes22/openpilot
selfdrive/ui/qt/spinner.h
[ "MIT" ]
module.exports = "wrong2-yes";
JavaScript
0
1shenxi/webpack
test/configCases/rule-set/resolve-options/wrong2.yes.js
[ "MIT" ]
module chapter5/sets1 ----- page 156 sig Set { elements: set Element } sig Element {} assert Closed { all s0, s1: Set | some s2: Set | s2.elements = s0.elements + s1.elements } // This check should produce a counterexample check Closed
Alloy
4
Kaixi26/org.alloytools.alloy
org.alloytools.alloy.extra/extra/models/book/chapter5/sets1.als
[ "Apache-2.0" ]
"""Constants for the Yamaha component.""" DOMAIN = "yamaha" CURSOR_TYPE_DOWN = "down" CURSOR_TYPE_LEFT = "left" CURSOR_TYPE_RETURN = "return" CURSOR_TYPE_RIGHT = "right" CURSOR_TYPE_SELECT = "select" CURSOR_TYPE_UP = "up" SERVICE_ENABLE_OUTPUT = "enable_output" SERVICE_MENU_CURSOR = "menu_cursor" SERVICE_SELECT_SCENE = "select_scene"
Python
3
MrDelik/core
homeassistant/components/yamaha/const.py
[ "Apache-2.0" ]
/* * Copyright (c) 2021, Jelle Raaijmakers <[email protected]> * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include <LibGL/GL/glplatform.h> #define GL_GLEXT_VERSION 20211115 typedef void(APIENTRYP PFNGLLOCKARRAYSEXTPROC)(GLint first, GLsizei count); typedef void(APIENTRYP PFNGLUNLOCKARRAYSEXTPROC)(void);
C
3
densogiaichned/serenity
Userland/Libraries/LibGL/GL/glext.h
[ "BSD-2-Clause" ]
# gnuplot script to visualize GCMETER results. # usage: "gnuplot gcTimer.gnu >outputfile.png" set terminal png # set Title set title "Title goes here!" set datafile missing "-" set noxtics #set ytics nomirror set ylabel "msec" set key below set style data linespoints #set data file plot 'gcTimer.dat' using 2 title columnheader(2), \ '' u 3 title columnheader(3) with points, \ '' u 4 title columnheader(4), \ '' u 5 title columnheader(5), \ '' u 6 title columnheader(6) with points, \ '' u 7 title columnheader(7) with points, \ '' u 8 title columnheader(8) with points, \ '' u 9 title columnheader(9) with points, \ '' u 10 title columnheader(10) with points, \ '' u 11 title columnheader(11) with points
Gnuplot
3
EdwardPrentice/wrongo
src/third_party/mozjs-45/extract/js/src/devtools/gnuplot/gcTimer.gnu
[ "Apache-2.0" ]
module top ( input clk, rst, output reg [3:0] cnt ); initial cnt = 0; always @(posedge clk) begin if (rst) cnt <= 0; else cnt <= cnt + 4'd 1; end always @(posedge clk) begin assume (cnt != 10); assert (cnt != 15); end endmodule
SystemVerilog
3
kallisti5/yosys
frontends/verific/example.sv
[ "ISC" ]
/* Copyright © 2011, 2012 MLstate This file is part of Opa. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * Bootstrapped widgets library. * * @author Frederic Ye 2011 * @category WIDGET * @destination PUBLIC * @stability EXPERIMENTAL * @version 0.9 */ /** * {1 TODO} * * - Forms * - JS */ package stdlib.widgets.deprecated.bootstrap /** * {1 Types definition} */ // Grid type WBootstrap.Grid.column = { span: int // 1-16 offset: option(int) // 1-16 content: xhtml } / { third: int // 1-2 offset: option(int) // 1-2 content: xhtml } // List type WBootstrap.List.description = {title: xhtml} / {description: xhtml} // Media type WBootstrap.Media.media = { href: option(string) onclick: Dom.event -> void content: xhtml } // Navigation type WBootstrap.Navigation.elt = {active: xhtml onclick: (Dom.event -> void) href: option(string)} / {inactive: xhtml onclick: (Dom.event -> void) href: option(string)} / {disabled: xhtml onclick: (Dom.event -> void) href: option(string)} / {custom_li: xhtml} / {divider} type WBootstrap.Navigation.page_nav_elt = WBootstrap.Media.media // Table type WBootstrap.Table.elt = xhtml // Button type WBootstrap.Button.type = {button:xhtml callback:(Dom.event -> void)} / {link:xhtml href:option(string) callback:(Dom.event -> void)} / {input:string callback:(Dom.event -> void)} type WBootstrap.Button.size = {normal} / {small} / {large} type WBootstrap.Button.importance = {default} / {primary} / {info} / {success} / {danger} type WBootstrap.Button.status = {enabled} / {disabled} type WBootstrap.Button.option = WBootstrap.Button.size / WBootstrap.Button.importance / WBootstrap.Button.status // Message type WBootstrap.Message.type = {alert:WBootstrap.Message.content closable:bool} / {block:WBootstrap.Message.content actions:option(xhtml) closable:bool} type WBootstrap.Message.importance = {default} / {warning} / {error} / {success} / {info} type WBootstrap.Message.content = { title: string description: xhtml } /** * {1 About this module} * * This module is for generating Bootstrapped HTML chunks. * * {1 Where should I start?} * * You can find documentation and examples at http://bootstrap.opalang.org. * * {1 Compatibility?} * * It should be compatible with Bootstrap <= 1.4.0 */ WBootstrap = {{ /** * Add a pull-right class to an xhtml chunk */ pull_right(x:xhtml) = Xhtml.update_class("pull-right", x) /** * Add an optional href attribute to an xhtml */ @private add_href_opt(href:option(string), x:xhtml) = match href {some=h} -> Xhtml.add_attribute_unsafe("href", h, x) {none} -> x Grid = {{ /** * Create a row * * @param columns a list of WBootstrap.Grid.column * @see {!WBootstrap.Grid.column} for column restrictions */ row(columns:list(WBootstrap.Grid.column)) = <div>{ @toplevel.List.map(column -> match column ~{span offset content} -> offset = match offset {some=ofs} -> " offset{ofs}" {none} -> "" <div class="span{span}{offset}">{content}</div> ~{third offset content} -> offset = match offset {some=1} -> " offset-one-third" {some=2} -> " offset-two-thirds" _ -> "" match third with 1 -> <div class="span-one-third{offset}">{content}</div> 2 -> <div class="span-two-thirds{offset}">{content}</div> _ -> <></> , columns) }</div> |> Xhtml.update_class("row", _) }} Layout = {{ /** * Create a fixed Layout */ fixed(content:xhtml) = Div.container(content) /** * Create a fluid Layout */ fluid(sidebar:xhtml, content:xhtml) = Div.container_fluid( <div class="sidebar">{sidebar}</div> <div class="content">{content}</div> ) }} Typography = {{ /** * Create a header, with an optional sub-header * @param level 1 <= level <= 6 */ header(level:int, sub_content:option(xhtml), content:xhtml) = sub = match sub_content {some=s} -> <>{" "}</><small>{s}</small> {none} -> <></> end match level 1 -> <h1>{content}{sub}</h1> 2 -> <h2>{content}{sub}</h2> 3 -> <h3>{content}{sub}</h3> 4 -> <h4>{content}{sub}</h4> 5 -> <h5>{content}{sub}</h5> 6 -> <h6>{content}{sub}</h6> _ -> <></> /** * Create an HTML5 address */ address(name:xhtml, address:xhtml) = <address> <strong>{name}</strong> <br/> {address} </address> /** * Create a blockquote */ blockquote(content:xhtml, author:xhtml) = <blockquote> <p>{content}</p> <small>{author}</small> </blockquote> /** * Create a preformatted text, compatible with google-code-prettify */ prettyprint(s:string, linenums:bool, lang:option(string)) = lang = match lang {some=l} -> " lang-{l}" {none} -> "" <pre>{Xhtml.of_string(s)}</pre> |> Xhtml.update_class("prettyprint{lang}", _) |> (match linenums {false} -> identity {true} -> Xhtml.update_class("linenums", _)) }} List = {{ /** * Create an unordered list */ unordered(list:list(xhtml)) = <ul>{ @toplevel.List.map(e -> <li>{e}</li>, list) }</ul> /** * Create an unordered and unstyled list */ unstyled(list:list(xhtml)) = unordered(list) |> Xhtml.update_class("unstyled", _) /** * Create an ordered list */ ordered(list:list(xhtml)) = <ol>{ @toplevel.List.map(e -> <li>{e}</li>, list) }</ol> /** * Create an description list */ description(list:list(WBootstrap.List.description)) = <dl>{ @toplevel.List.map(e -> match e {title=t} -> <dt>{t}</dt> {description=d} -> <dd>{d}</dd> , list) }</dl> }} Label = {{ make_label(content:string) = <span>{content}</span> |> Xhtml.update_class("label", _) success = Xhtml.update_class("success", _) warning = Xhtml.update_class("warning", _) important = Xhtml.update_class("important", _) notice = Xhtml.update_class("notice",_) /** * Create a label */ make(lb_text, lb_class) = lb = make_label(lb_text) lb = match lb_class {default} -> lb {success} -> lb |> success(_) {warning} -> lb |> warning(_) {important} -> lb |> important(_) {notice} -> lb |> notice(_) lb }} Media = {{ /** * Create a media grid */ grid(imgs:list(WBootstrap.Media.media)) = list = @toplevel.List.map( media -> content = media.content <a onclick={media.onclick}> {content} </a> |> add_href_opt(media.href, _) , imgs) List.unordered(list) |> Xhtml.update_class("media-grid", _) }} Table = {{ @private gen_head(elts:list(WBootstrap.Table.elt)) = <thead><tr>{ @toplevel.List.map(e -> <th>{e}</th>, elts) }</tr></thead> @private gen_body(lines:list(list(WBootstrap.Table.elt))) = <tbody>{ @toplevel.List.map( line -> <tr>{ @toplevel.List.map( e -> <td>{e}</td> , line) }</tr> , lines) }</tbody> /** * Create a table */ table(head:list(WBootstrap.Table.elt), body:list(list(WBootstrap.Table.elt))) = <table> {gen_head(head)} {gen_body(body)} </table> /** * Create a zebra stripped table */ zebra_stripped(h, b) = table(h, b) |> Xhtml.update_class("zebra-striped", _) }} Form = {{ // TODO classic(content:xhtml) = <form action="javascript:void(0);">{content}</form> stacked(content:xhtml) = <form action="javascript:void(0);" class="form-stacked">{content}</form> Fieldset = {{ make(legend:option(xhtml), elements:list(xhtml)) = <> {match legend {some=l} -> <legend>{l}</legend> {none} -> <></>} {@toplevel.List.map( e -> <div class="clearfix">{e}</div> , elements)} </> }} }} Button = {{ make_button(content:xhtml, callback:(Dom.event -> void)) = <button onclick={callback}>{content}</button> |> Xhtml.update_class("btn", _) // CAUTION: cannot use class="btn" (see on top) make_no_propagation_button(content:xhtml, callback:(Dom.event -> void)) = <button onclick={callback} options:onclick={[{stop_propagation}]}>{content}</button> |> Xhtml.update_class("btn", _) // CAUTION: cannot use class="btn" (see on top) make_link(content:xhtml, href:option(string), callback:(Dom.event -> void)) = <a onclick={callback}>{content}</a> |> Xhtml.update_class("btn", _) |> add_href_opt(href, _) make_input(text:string, callback:(Dom.event -> void)) = <input type="button" value="{text}" onclick={callback}/> |> Xhtml.update_class("btn", _) primary = Xhtml.update_class("primary", _) info = Xhtml.update_class("info", _) success = Xhtml.update_class("success", _) danger = Xhtml.update_class("danger",_) large = Xhtml.update_class("large", _) small = Xhtml.update_class("small", _) disabled = Xhtml.update_class("disabled", _) // FIXME: incomplete on buttons and inputs (see below) /** * Create a button */ make(bt_type:WBootstrap.Button.type, bt_options_list:list(WBootstrap.Button.option)) = bt = match bt_type ~{button callback} -> make_button(button, callback) ~{link href callback} -> make_link(link, href, callback) ~{input callback} -> make_input(input, callback) bt_options = @toplevel.List.fold_right( opts, opt -> match opt {primary} -> { opts with class={primary} } {info} -> { opts with class={info} } {success} -> { opts with class={success} } {danger} -> { opts with class={danger} } {small} -> { opts with size={small} } {large} -> { opts with size={large} } {disabled} -> { opts with disabled=true } _ -> opts , bt_options_list, {class={default} size={normal} disabled=false}) bt = match bt_options.class {default} -> bt {primary} -> bt |> primary(_) {info} -> bt |> info(_) {success} -> bt |> success(_) {danger} -> bt |> danger(_) bt = match bt_options.size {normal} -> bt {small} -> bt |> small(_) {large} -> bt |> large(_) bt = match bt_options.disabled {false} -> bt {true} -> match bt_type {link=_ ...} -> bt |> disabled(_) _ -> bt |> disabled(_) |> Xhtml.update_attribute_unsafe("disabled", "disabled", _) end bt }} Navigation = {{ @private nav_elt_to_xhtml = | {active=e ~onclick ~href} -> <li class="active"> {<a onclick={onclick}>{e}</a> |> add_href_opt(href, _)} </li> | {inactive=e ~onclick ~href} -> <li> {<a onclick={onclick}>{e}</a> |> add_href_opt(href, _)} </li> | {disabled=e ~onclick ~href} -> <li class="disabled"> {<a onclick={onclick}>{e}</a> |> add_href_opt(href, _)} </li> | {divider} -> <li class="divider"></li> | {~custom_li} -> custom_li /** * Create a topbar */ topbar(content:xhtml) = <div data-scrollspy="scrollspy"> <div class="topbar-inner">{content}</div> </div> |> Xhtml.update_class("topbar", _) /** * Create a brand link */ brand(brand:xhtml, href:option(string), callback:(Dom.event -> void)) = <a class="brand" onclick={callback}>{brand}</a> |> add_href_opt(href, _) /** * Create a dropdown li (for use with WBootstrap.List) */ dropdown_li(toggle:xhtml, href:option(string), list:list(WBootstrap.Navigation.elt)) = a = <a class="dropdown-toggle">{toggle}</a> |> add_href_opt(href, _) <li class="dropdown" data-dropdown="dropdown"> {a} <ul class="dropdown-menu">{ @toplevel.List.map(nav_elt_to_xhtml, list) }</ul> </li> @private make_tabs(cl:string, tabs:list(WBootstrap.Navigation.elt)) = <ul>{ @toplevel.List.map(nav_elt_to_xhtml, tabs) }</ul> |> Xhtml.update_class(cl, _) nav(l) = make_tabs("nav", l) tabs(l) = make_tabs("tabs", l) |> Xhtml.add_attribute_unsafe("data-tabs", "tabs", _) pills(l) = make_tabs("pills", l) |> Xhtml.add_attribute_unsafe("data-pills", "pills", _) /** * Create a breadcrumb */ breadcrumb(path:list(WBootstrap.Navigation.elt), sep:xhtml) = <ul class="breadcrumb">{ list = @toplevel.List.map(nav_elt_to_xhtml, path) XmlConvert.of_list_using(<></>, <></>, Span.divider(sep), list) }</ul> /** * Create a pagination */ pagination(pages:list(WBootstrap.Navigation.elt), prev:WBootstrap.Navigation.page_nav_elt, next:WBootstrap.Navigation.page_nav_elt) = list = @toplevel.List.map(nav_elt_to_xhtml, pages) is_disabled(l) = if @toplevel.List.is_empty(l) || (match @toplevel.List.head(l) {active=_ href=_ onclick=_} -> true _ -> false) then "disabled" else "" prev_disabled = is_disabled(pages) next_disabled = is_disabled(@toplevel.List.rev(pages)) <div class="pagination"> <ul> <li class="prev {prev_disabled}"> {<a onclick={prev.onclick}>{prev.content}</a> |> add_href_opt(prev.href, _)} </li> {list} <li class="next {next_disabled}"> {<a onclick={next.onclick}>{next.content}</a> |> add_href_opt(next.href, _)} </li> </ul> </div> }} Message = {{ @private gen_make_alert(closable:bool, content:WBootstrap.Message.content, more:xhtml) = id = Dom.fresh_id() <div id=#{id} class="alert-message"> {if not(closable) then <></> else <a class="close" onclick={_->Dom.remove(#{id})}>&times;</a>} <p> {if content.title == "" then <></> else <strong>{content.title}</strong>} {content.description} </p> {more} </div> make_alert(closable:bool, content:WBootstrap.Message.content) = gen_make_alert(closable, content, <></>) make_block(closable:bool, actions:option(xhtml), content:WBootstrap.Message.content) = more = match actions {some=a} -> <div class="alert-actions">{a}</div> {none} -> <></> gen_make_alert(closable, content, more) |> Xhtml.update_class("block-message", _) warning = Xhtml.update_class("warning", _) error = Xhtml.update_class("error", _) success = Xhtml.update_class("success", _) info = Xhtml.update_class("info", _) /** * Create a message (alert or block) */ make(msg_type:WBootstrap.Message.type, msg_class:WBootstrap.Message.importance) = msg = match msg_type ~{alert closable} -> make_alert(closable, alert) ~{block actions closable} -> make_block(closable, actions, block) msg = match msg_class {default} -> msg {warning} -> msg |> warning(_) {error} -> msg |> error(_) {success} -> msg |> success(_) {info} -> msg |> info(_) msg }} Div = {{ container(content:xhtml) = <div class="container">{content}</div> container_fluid(content:xhtml) = <div class="container-fluid">{content}</div> content(content:xhtml) = <div class="content">{content}</div> page_header(level:int, title:string, subtitle:option(string)) = sub = match subtitle {some=s} -> some(<>{s}</>) {none} -> none <div class="page-header">{Typography.header(level, sub, <>{title}</>)}</div> inner(content:xhtml) = <div class="inner">{content}</div> well(content:xhtml) = <div class="well">{content}</div> }} Span = {{ divider(content:xhtml) = <span class="divider">{content}</span> }} }}
Opa
5
Machiaweliczny/oppailang
lib/stdlib/widgets/deprecated/bootstrap/bootstrap.opa
[ "MIT" ]
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.Threading Imports Microsoft.CodeAnalysis.CodeActions Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.CorrectNextControlVariable Partial Friend Class CorrectNextControlVariableCodeFixProvider Private Class CorrectNextControlVariableCodeAction Inherits CodeAction Private ReadOnly _document As Document Private ReadOnly _newNode As SyntaxNode Private ReadOnly _node As SyntaxNode Public Sub New(document As Document, node As SyntaxNode, newNode As SyntaxNode) Me._document = document Me._newNode = newNode Me._node = node End Sub Public Overrides ReadOnly Property Title As String Get Return VBFeaturesResources.Use_the_correct_control_variable End Get End Property Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document) Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) Dim updatedRoot = root.ReplaceNode(_node, _newNode) Return _document.WithSyntaxRoot(updatedRoot) End Function End Class End Class End Namespace
Visual Basic
4
ffMathy/roslyn
src/Features/VisualBasic/Portable/CodeFixes/CorrectNextControlVariable/CorrectNextControlVariableCodeFixProvider.CodeAction.vb
[ "MIT" ]
\data\ ngram 1= 13 ngram 2= 33 ngram 3= 44 \1-grams: -1.716003 <s> -0.576253 -1.062791 Ahmet -0.316824 -1.062791 elma -0.617854 -0.975641 yedi -1.191886 -0.738280 </s> 0.000000 -1.318063 armut -0.492916 -1.539912 kırmızı -0.191886 -1.414973 sarı -0.191886 -1.238882 yemedi -0.890856 -1.238882 Hamza -0.288796 -1.414973 yemez -0.669007 -1.238882 dondurma -0.589826 -1.238882 kedi -0.288796 \2-grams: -0.455510 <s> Ahmet -0.226396 -1.769377 <s> sarı -0.683017 <s> Hamza -0.204120 -0.796249 <s> kedi -0.226396 -0.770464 Ahmet elma -0.124939 -1.350248 Ahmet armut -0.124939 -1.350248 Ahmet kırmızı -0.124939 -0.770464 Ahmet sarı -0.124939 -1.350248 Ahmet dondurma -0.124939 -1.350248 Ahmet kedi -0.124939 -0.530704 elma yedi -0.176091 -0.530704 elma yemedi -0.176091 -0.770464 elma yemez -0.359022 -0.028857 yedi </s> 0.000000 -0.229674 armut yedi -0.176091 -1.049218 armut yemez -0.124939 -0.748188 kırmızı elma -0.124939 -0.748188 kırmızı dondurma -0.124939 -0.924279 sarı elma -0.124939 -0.924279 sarı armut -0.124939 -0.924279 sarı dondurma -0.124939 -0.059768 yemedi </s> 0.000000 -0.566344 Hamza elma -0.124939 -1.146128 Hamza armut -0.124939 -1.146128 Hamza kırmızı -0.124939 -1.146128 Hamza dondurma -0.124939 -0.104735 yemez </s> 0.000000 -0.173000 dondurma yedi -0.301030 -1.146128 dondurma yemedi -0.124939 -0.566344 kedi elma -0.124939 -1.146128 kedi armut -0.124939 -1.146128 kedi yemedi -0.124939 -1.146128 kedi dondurma -0.124939 \3-grams: -0.851937 <s> Ahmet elma -1.505150 <s> Ahmet armut -1.505150 <s> Ahmet kırmızı -0.851937 <s> Ahmet sarı -1.505150 <s> Ahmet dondurma -1.505150 <s> Ahmet kedi -0.602060 <s> sarı dondurma -0.647817 <s> Hamza elma -1.301030 <s> Hamza armut -1.301030 <s> Hamza kırmızı -1.301030 <s> Hamza dondurma -0.550907 <s> kedi elma -1.204120 <s> kedi armut -1.204120 <s> kedi dondurma -0.903090 Ahmet elma yedi -0.903090 Ahmet elma yemedi -0.602060 Ahmet armut yedi -0.602060 Ahmet kırmızı elma -0.903090 Ahmet sarı elma -0.903090 Ahmet sarı armut -0.602060 Ahmet dondurma yedi -0.602060 Ahmet kedi yemedi -0.477121 elma yedi </s> -0.477121 elma yemedi </s> -0.249877 elma yemez </s> -0.477121 armut yedi </s> -0.602060 armut yemez </s> -0.602060 kırmızı elma yedi -0.602060 kırmızı dondurma yedi -0.602060 sarı elma yedi -0.602060 sarı armut yedi -0.602060 sarı dondurma yemedi -0.903090 Hamza elma yemedi -0.903090 Hamza elma yemez -0.602060 Hamza armut yedi -0.602060 Hamza kırmızı dondurma -0.602060 Hamza dondurma yedi -0.301030 dondurma yedi </s> -0.602060 dondurma yemedi </s> -0.903090 kedi elma yemedi -0.903090 kedi elma yemez -0.602060 kedi armut yemez -0.602060 kedi yemedi </s> -0.602060 kedi dondurma yedi \end\
DNS Zone
2
flower-gardener/zemberek-nlp
lm/src/test/resources/tiny-no-unk.arpa
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
# frozen_string_literal: true class MigrationVersionCheck < ActiveRecord::Migration::Current def self.up raise "incorrect migration version" unless version == 20131219224947 end def self.down end end
Ruby
3
mdesantis/rails
activerecord/test/migrations/version_check/20131219224947_migration_version_check.rb
[ "MIT" ]
ruleset io.picolabs.aca.connections { meta { name "Aries Cloud Agent connections protocol" description << Aries RFC 0160: Connection Protocol did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/ https://didcomm.org/connections/1.0/ >> use module io.picolabs.aca alias aca use module io.picolabs.wrangler alias wrangler use module io.picolabs.did alias did use module io.picolabs.aca.connections.ui alias invite shares invitation, html } global { connInviteMap = function(id,label,key,endpoint,routingKeys){ minimal = { "@type": aca:prefix() + "connections/1.0/invitation", "@id": id || random:uuid(), "label": label, "recipientKeys": [key], "serviceEndpoint": endpoint } routingKeys.isnull() => minimal | minimal.put({"routingKeys": routingKeys}) } connMap = function(my_did, my_vk, endpoint,routingKeys){ { "DID": my_did, "DIDDoc": { "@context": "https://w3id.org/did/v1", "id": my_did, "publicKey": [{ "id": my_did + "#keys-1", "type": "Ed25519VerificationKey2018", "controller": my_did, "publicKeyBase58": my_vk }], "service": [{ "id": my_did + ";indy", "type": "IndyAgent", "recipientKeys": [my_vk], "routingKeys": routingKeys.defaultsTo([]), "serviceEndpoint": endpoint }] } } } connResMap = function(req_id, my_did, my_vk, endpoint, routingKeys){ connection = connMap(my_did, my_vk, endpoint, routingKeys) return { "@type": aca:prefix() + "connections/1.0/response", "@id": random:uuid(), "~thread": {"thid": req_id}, "connection~sig": aca:signField(my_did,my_vk,connection) } } connReqMap = function(label, my_did, my_vk, endpoint, routingKeys, inviteId){ isEdge = wrangler:installedRIDs() >< "io.picolabs.aca.edge" effectiveEP = isEdge => "" | endpoint res = { "@type": aca:prefix() + "connections/1.0/request", "@id": random:uuid(), "label": label, "connection": connMap(my_did, my_vk, effectiveEP, routingKeys) } res2 = inviteId.isnull() => res | res.put("~thread",{"pthid":inviteId,"thid":res{"@id"}}) isEdge => res2.put("~transport",{"return_route":"all"}) | res2 } tags = ["Aries","agent","connections"] the_tags = tags.map(lc).sort().join(",") connectionsChannel = function(c){ c["tags"].sort().join(",") == the_tags } invitation = function(label){ host = "http://localhost:3000" uKR = wrangler:channels().filter(connectionsChannel).head().klog("uKR") eci = uKR{"id"} im = connInviteMap( null, label || aca:label(), did:dids(eci).get("ariesPublicKey"), aca:localServiceEndpoint(eci) ).klog("im") <<#{host}/sky/cloud/#{eci}/#{meta:rid}/html.html>> + "?c_i=" + math:base64encode(im.encode()) } html = function(c_i){ invite:html(c_i) } createChannel = defaction(label){ add_did = function(v,k){ k == "allow" => v.append({"domain":"aca_connections","name":"did"}) | v } add_rid = function(v,k){ k == "allow" => v.append({"rid":meta:rid,"name":"*"}) | v } mainAgentTags = ["Aries","agent"].map(lc).sort().join(",") mainAgentChannel = wrangler:channels().filter(function(c){ c["tags"].sort().join(",") == mainAgentTags }).head() the_tags = label => tags.append(label) | tags eventPolicy = mainAgentChannel.get("eventPolicy").map(add_did) queryPolicy = mainAgentChannel.get("queryPolicy").map(add_rid) wrangler:createChannel(the_tags,eventPolicy,queryPolicy) setting(channel) return channel } } // // bookkeeping // rule create_channel_for_invitation { select when wrangler ruleset_installed where event:attr("rids") >< meta:rid if ent:channelCreated.isnull() then createChannel() setting(channel) fired { raise aca_connections event "did" attributes { "eci":channel.get("id")} ent:channelCreated := true } } rule create_a_new_did_for_invitations { select when aca_connections did fired { raise did event "requested" attributes event:attrs } } // // connections/1.0/request // rule handle_connections_request { select when didcomm_connections:request pre { msg = event:attr("message") their_label = msg{"label"} } if their_label then createChannel(their_label) setting(channel) fired { raise did event "requested" attributes {"eci":channel{"id"}} raise aca_connections event "request_accepted" attributes { "message": msg, "channel": channel, } } } rule initiate_connections_response { select when aca_connections request_accepted pre { msg = event:attr("message") req_id = msg{"@id"} connection = msg{"connection"} their_did = connection{"DID"} publicKeys = connection{["DIDDoc","publicKey"]} .map(function(x){x{"publicKeyBase58"}}) their_vk = publicKeys.head() service = connection{["DIDDoc","service"]} .filter(function(x){ x{"type"}=="IndyAgent" && x{"id"}.match(their_did+";indy") }).head() se = service{"serviceEndpoint"} their_rks = service{"routingKeys"}.defaultsTo([]) chann = event:attr("channel") new_did = did:dids(chann{"id"}) .klog("new_did") my_vk = new_did{"ariesPublicKey"} my_did = new_did{"did"} ri = event:attr("routing").klog("routing information") rks = ri => ri{"their_routing"} | null endpoint = ri => ri{"endpoint"} | aca:localServiceEndpoint(chann{"id"}) rm = connResMap(req_id, my_did, my_vk, endpoint,rks) .klog("rm") c = { "created": time:now(), "label": msg{"label"}, "my_did": my_did, "their_did": their_did, "their_vk": their_vk, "their_endpoint": se, "their_routing": their_rks, } .klog("c") pm = aca:packMsg(their_vk,rm,event:eci) } fired { raise aca event "new_connection" attributes c raise didcomm event "new_ssi_agent_wire_message" attributes { "serviceEndpoint": se, "packedMessage": pm } } } // // connections/1.0/invitation // rule receive_invitation { select when didcomm_connections:invitation pre { msg = event:attr("message") their_label = msg{"label"} } if msg && their_label then createChannel(their_label) setting(channel) fired { raise did event "requested" attributes {"eci":channel{"id"}} raise aca_connections event "invitation_accepted" attributes { "invitation": msg, "channel": channel } } } rule initiate_connection_request { select when aca_connections invitation_accepted pre { im = event:attr("invitation") chann = event:attr("channel") new_did = did:dids(chann{"id"}) .klog("new_did") my_vk = new_did{"ariesPublicKey"} my_did = new_did{"did"} ri = event:attr("routing").klog("routing information") rks = ri => ri{"their_routing"} | null endpoint = ri => ri{"endpoint"} | aca:localServiceEndpoint(chann{"id"}) rm = connReqMap(aca:label(),my_did,my_vk,endpoint,rks,im{"@id"}) .klog("connections request") reqURL = im{"serviceEndpoint"} pc = { "label": im{"label"}, "my_did": my_did, "@id": rm{"@id"}, "their_vk": im{"recipientKeys"}.head(), "their_routing": im{"routingKeys"}.defaultsTo([]), } packedBody = aca:packMsg(pc{"their_vk"},rm,chann{"id"}) } fired { ent:pending_conn := ent:pending_conn.defaultsTo([]).append(pc) raise didcomm event "new_ssi_agent_wire_message" attributes { "serviceEndpoint": reqURL, "packedMessage": packedBody } } } // // connections/response // rule handle_connections_response { select when didcomm_connections:response pre { msg = event:attr("message") verified = aca:verifySignatures(msg) connection = verified{"connection"} service = connection && connection{["DIDDoc","service"]} .filter(function(x){x{"type"}=="IndyAgent"}) .head() their_vk = service{"recipientKeys"}.head() their_rks = service{"routingKeys"}.defaultsTo([]) cid = msg{["~thread","thid"]} index = ent:pending_conn.defaultsTo([]) .reduce(function(a,p,i){ a<0 && p{"@id"}==cid => i | a },-1) c = index < 0 => null | ent:pending_conn[index] .delete("@id") .put({ "created": time:now(), "their_did": connection{"DID"}, "their_vk": their_vk, "their_endpoint": service{"serviceEndpoint"}, "their_routing": their_rks, }) } if typeof(index) == "Number" && index >= 0 then noop() fired { raise aca event "new_connection" attributes c ent:pending_conn := ent:pending_conn.splice(index,1) } } }
KRL
5
Picolab/aries-cloudagent-pico
NEXT/io.picolabs.aca.connections.krl
[ "MIT" ]
codegen utils = require './codegenUtils' module.exports (terms) = terms.term { constructor (value) = self.is string = true self.string = value generate (scope) = self.code (codegen utils.format java script string (self.string)) }
PogoScript
3
Sotrek/Alexa
Alexa_Cookbook/Workshop/StatePop/4_IOT/tests/node_modules/aws-sdk/node_modules/cucumber/node_modules/pogo/lib/terms/string.pogo
[ "MIT" ]
.. meta:: :description: Hasura Postgres database support :keywords: hasura, docs, databases, postgres .. _database_postgres: Postgres ======== .. contents:: Table of contents :backlinks: none :depth: 1 :local: Introduction ------------ Hasura allows connecting to a Postgres database and build an GraphQL API based on the database schema. .. admonition:: Supported Postgres versions Hasura GraphQL engine supports **Postgres 9.5 and above** Postgres flavours ----------------- Hasura also supports databases with full Postgres compatibility like Yugabyte, Timescale, Citus, Aurora, RDS. We have more distributed flavours like CockroachDB coming soon. See `GitHub issue <https://github.com/hasura/graphql-engine/issues/678>`__. Curious about any other Postgres flavours? Any other questions? Ask us on `GitHub discussions <https://github.com/hasura/graphql-engine/discussions>`__ Know more --------- .. toctree:: :maxdepth: 1 :titlesonly: Schema <schema/index> Queries <queries/index> Mutations <mutations/index> Subscriptions <subscriptions/index> Supported Postgres types <postgresql-types>
reStructuredText
3
gh-oss-contributor/graphql-engine-1
docs/graphql/core/databases/postgres/index.rst
[ "Apache-2.0", "MIT" ]
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Baeldung: Static Content in Spring WebFlux</title> </head> <body> Example Spring Web Flux and web resources configuration </body> </html>
HTML
3
DBatOWL/tutorials
spring-5-reactive/src/main/assets/index.html
[ "MIT" ]
// Regression test for #86600, where an instance of the // `illegal_floating_point_literal_pattern` lint was issued twice. // check-pass fn main() { let x = 42.0; match x { 5.0 => {} //~^ WARNING: floating-point types cannot be used in patterns //~| WARNING: this was previously accepted by the compiler _ => {} } }
Rust
4
mbc-git/rust
src/test/ui/lint/issue-86600-lint-twice.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
/**************************************************************************** * * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ import QtQuick 2.12 import QtQuick.Layouts 1.2 import QtQuick.Controls 2.5 import QGroundControl 1.0 import QGroundControl.Controls 1.0 import QGroundControl.Templates 1.0 import QGroundControl.ScreenTools 1.0 import QGroundControl.Palette 1.0 ColumnLayout { property var instrumentValueData: null property bool _verticalOrientation: instrumentValueData.factValueGrid.orientation === FactValueGrid.VerticalOrientation property var _rgFontSizes: [ ScreenTools.defaultFontPointSize, ScreenTools.smallFontPointSize, ScreenTools.mediumFontPointSize, ScreenTools.largeFontPointSize ] property var _rgFontSizeRatios: [ 1, ScreenTools.smallFontPointRatio, ScreenTools.mediumFontPointRatio, ScreenTools.largeFontPointRatio ] property real _doubleDescent: ScreenTools.defaultFontDescent * 2 property real _tightDefaultFontHeight: ScreenTools.defaultFontPixelHeight - _doubleDescent property var _rgFontSizeTightHeights: [ _tightDefaultFontHeight * _rgFontSizeRatios[0] + 2, _tightDefaultFontHeight * _rgFontSizeRatios[1] + 2, _tightDefaultFontHeight * _rgFontSizeRatios[2] + 2, _tightDefaultFontHeight * _rgFontSizeRatios[3] + 2 ] property real _tightHeight: _rgFontSizeTightHeights[instrumentValueData.factValueGrid.fontSize] property bool _iconVisible: instrumentValueData.rangeType === InstrumentValueData.IconSelectRange || instrumentValueData.icon QGCPalette { id: qgcPal; colorGroupEnabled: enabled } QGCColoredImage { id: valueIcon Layout.alignment: _verticalOrientation ? Qt.AlignHCenter : Qt.AlignVCenter height: _tightHeight * 0.75 width: height sourceSize.height: height fillMode: Image.PreserveAspectFit mipmap: true smooth: true color: instrumentValueData.isValidColor(instrumentValueData.currentColor) ? instrumentValueData.currentColor : qgcPal.text opacity: instrumentValueData.currentOpacity visible: _iconVisible readonly property string iconPrefix: "/InstrumentValueIcons/" function updateIcon() { if (instrumentValueData.rangeType === InstrumentValueData.IconSelectRange) { valueIcon.source = iconPrefix + instrumentValueData.currentIcon } else if (instrumentValueData.icon) { valueIcon.source = iconPrefix + instrumentValueData.icon } else { valueIcon.source = "" } } Connections { target: instrumentValueData function onRangeTypeChanged() { valueIcon.updateIcon() } function onCurrentIconChanged() { valueIcon.updateIcon() } function onIconChanged() { valueIcon.updateIcon() } } Component.onCompleted: updateIcon(); Rectangle { anchors.fill: valueIcon color: qgcPal.text visible: valueIcon.status === Image.Error } } QGCLabel { Layout.alignment: _verticalOrientation ? Qt.AlignHCenter : Qt.AlignVCenter height: _tightHeight font.pointSize: ScreenTools.smallFontPointSize text: instrumentValueData.text visible: !_iconVisible } }
QML
4
dlech/qgroundcontrol
src/QmlControls/InstrumentValueLabel.qml
[ "Apache-2.0" ]
/* * Copyright (c) 2020, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include <AK/Types.h> #include <LibGUI/Dialog.h> class GameSizeDialog : public GUI::Dialog { C_OBJECT(GameSizeDialog) public: size_t board_size() const { return m_board_size; } u32 target_tile() const { return 1u << m_target_tile_power; } bool evil_ai() const { return m_evil_ai; } bool temporary() const { return m_temporary; } private: GameSizeDialog(GUI::Window* parent, size_t board_size, size_t target_tile, bool evil_ai); size_t m_board_size; size_t m_target_tile_power; bool m_evil_ai; bool m_temporary { false }; };
C
4
r00ster91/serenity
Userland/Games/2048/GameSizeDialog.h
[ "BSD-2-Clause" ]
/** * This package defines Spring's core TaskExecutor abstraction, * and provides SyncTaskExecutor and SimpleAsyncTaskExecutor implementations. */ @NonNullApi @NonNullFields package org.springframework.core.task; import org.springframework.lang.NonNullApi; import org.springframework.lang.NonNullFields;
Java
3
nicchagil/spring-framework
spring-core/src/main/java/org/springframework/core/task/package-info.java
[ "Apache-2.0" ]
package universe_test import "testing" import "math" option now = () => 2030-01-01T00:00:00Z inData = " #datatype,string,long,dateTime:RFC3339,double,string,string #group,false,false,false,false,true,true #default,_result,,,,, ,result,table,_time,_value,_field,_measurement ,,0,2018-05-22T19:53:30Z,1.2,active,mem ,,0,2018-05-23T19:53:40Z,5.7,active,mem ,,0,2018-05-24T19:53:50Z,56.4,active,mem ,,0,2018-05-25T19:54:00Z,93.2,active,mem ,,0,2018-05-26T19:54:10Z,34.9,active,mem ,,0,2018-05-27T19:54:20Z,11.1,active,mem ,,1,2018-05-22T19:53:30Z,12.3,f,m2 ,,1,2018-05-23T19:53:40Z,15.2,f,m2 ,,1,2018-05-24T19:53:50Z,43.1,f,m2 ,,1,2018-05-25T19:54:00Z,21.9,f,m2 ,,1,2018-05-26T19:54:10Z,32.5,f,m2 ,,1,2018-05-27T19:54:20Z,75.2,f,m2 " outData = " #datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,dateTime:RFC3339,double #group,false,false,true,true,true,true,false,false #default,_result,,,,,,, ,result,table,_start,_stop,_field,_measurement,_time,_value ,,0,2018-05-22T19:53:26.000000000Z,2030-01-01T00:00:00.000000000Z,active,mem,2018-05-24T00:00:00Z,4.5 ,,0,2018-05-22T19:53:26.000000000Z,2030-01-01T00:00:00.000000000Z,active,mem,2018-05-25T00:00:00Z,50.699999999999996 ,,0,2018-05-22T19:53:26.000000000Z,2030-01-01T00:00:00.000000000Z,active,mem,2018-05-26T00:00:00Z,36.800000000000004 ,,0,2018-05-22T19:53:26.000000000Z,2030-01-01T00:00:00.000000000Z,active,mem,2018-05-27T00:00:00Z,0 ,,0,2018-05-22T19:53:26.000000000Z,2030-01-01T00:00:00.000000000Z,active,mem,2018-05-28T00:00:00Z,0 " t_mmax = (table=<-) => table |> range(start: 2018-05-22T19:53:26Z) |> filter(fn: (r) => r._measurement == "mem" and r._field == "active") |> aggregateWindow(every: 1d, fn: mean, createEmpty: false) |> difference(nonNegative: false, columns: ["_value"]) |> map(fn: (r) => ({r with _value: math.mMax(x: r._value, y: 0.0)})) test _mmax = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: t_mmax})
FLUX
4
metrico/flux
stdlib/universe/math_m_max_test.flux
[ "MIT" ]
#pragma once #include "foxi/onnxifi_loader.h" namespace caffe2 { namespace onnx { onnxifi_library* initOnnxifiLibrary(); } // namespace onnx } // namespace caffe2
C
1
Hacky-DH/pytorch
caffe2/onnx/onnxifi_init.h
[ "Intel" ]
package com.baeldung; import com.mongodb.BasicDBObject; import com.mongodb.DB; import com.mongodb.DBCollection; import com.mongodb.DBCursor; import com.mongodb.MongoClient; public class MongoExample { public static void main(String[] args) { MongoClient mongoClient = new MongoClient("localhost", 27017); DB database = mongoClient.getDB("myMongoDb"); // print existing databases mongoClient.getDatabaseNames().forEach(System.out::println); database.createCollection("customers", null); // print all collections in customers database database.getCollectionNames().forEach(System.out::println); // create data DBCollection collection = database.getCollection("customers"); BasicDBObject document = new BasicDBObject(); document.put("name", "Shubham"); document.put("company", "Baeldung"); collection.insert(document); // update data BasicDBObject query = new BasicDBObject(); query.put("name", "Shubham"); BasicDBObject newDocument = new BasicDBObject(); newDocument.put("name", "John"); BasicDBObject updateObject = new BasicDBObject(); updateObject.put("$set", newDocument); collection.update(query, updateObject); // read data BasicDBObject searchQuery = new BasicDBObject(); searchQuery.put("name", "John"); DBCursor cursor = collection.find(searchQuery); while (cursor.hasNext()) { System.out.println(cursor.next()); } // delete data BasicDBObject deleteQuery = new BasicDBObject(); deleteQuery.put("name", "John"); collection.remove(deleteQuery); } }
Java
4
zeesh49/tutorials
persistence-modules/java-mongodb/src/main/java/com/baeldung/MongoExample.java
[ "MIT" ]
! Copyright (C) 2012 John Benediktsson ! See http://factorcode.org/license.txt for BSD license USING: help.markup help.syntax layouts math sequences ; IN: math.cardinality HELP: trailing-zeros { $values { "m" number } { "n" number } } { $description "Counts the number of trailing 0 bits in " { $snippet "m" } ", returning " { $link fixnum-bits } " if the number is zero." } ; HELP: estimate-cardinality { $values { "seq" sequence } { "k" number } { "n" number } } { $description "Estimates the number of unique elements in " { $snippet "seq" } "." $nl "The number " { $snippet "k" } " controls how many bits of hash to use, creating " { $snippet "2^k" } " buckets." } ;
Factor
4
alex-ilin/factor
extra/math/cardinality/cardinality-docs.factor
[ "BSD-2-Clause" ]
.class public Lcom/lenovo/safecenter/MainTab/SplashActivity; .super Landroid/app/Activity; .source "SplashActivity.java" # interfaces .implements Ljava/util/Observer; # instance fields .field private a:Landroid/content/SharedPreferences; .field private b:Lcom/lenovo/safecenter/utils/LeSafeObservable; .field private c:Landroid/widget/TextView; .field private d:Landroid/graphics/Bitmap; .field private e:Landroid/graphics/Bitmap; .field private f:Landroid/graphics/Bitmap; .field private g:Landroid/graphics/Bitmap; .field private h:Landroid/graphics/Bitmap; .field private i:Landroid/graphics/Bitmap; .field private j:Z .field private k:Landroid/os/Handler; # direct methods .method public constructor <init>()V .locals 1 .prologue .line 45 invoke-direct {p0}, Landroid/app/Activity;-><init>()V .line 59 const/4 v0, 0x0 iput-boolean v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->j:Z .line 120 new-instance v0, Lcom/lenovo/safecenter/MainTab/SplashActivity$1; invoke-direct {v0, p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity$1;-><init>(Lcom/lenovo/safecenter/MainTab/SplashActivity;)V iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->k:Landroid/os/Handler; return-void .end method .method static synthetic a(Lcom/lenovo/safecenter/MainTab/SplashActivity;)V .locals 1 .param p0, "x0" # Lcom/lenovo/safecenter/MainTab/SplashActivity; .prologue .line 45 new-instance v0, Lcom/lenovo/safecenter/MainTab/SplashActivity$2; invoke-direct {v0, p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity$2;-><init>(Lcom/lenovo/safecenter/MainTab/SplashActivity;)V invoke-virtual {v0}, Lcom/lenovo/safecenter/MainTab/SplashActivity$2;->start()V return-void .end method .method private a()Z .locals 13 .prologue const/4 v9, 0x0 .line 157 invoke-static {}, Lcom/lenovo/safecenter/utils/Const;->getHolidayImgId()Ljava/lang/String; move-result-object v1 .line 158 .local v1, "id":Ljava/lang/String; const-wide/16 v7, 0x0 .line 159 .local v7, "lStartTime":J :try_start_0 iget-object v10, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->a:Landroid/content/SharedPreferences; const-string v11, "holiday_img_starttime" const/4 v12, 0x0 invoke-interface {v10, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v10 invoke-static {v10}, Ljava/lang/Long;->valueOf(Ljava/lang/String;)Ljava/lang/Long; move-result-object v10 invoke-virtual {v10}, Ljava/lang/Long;->longValue()J move-result-wide v7 .line 163 iget-object v10, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->a:Landroid/content/SharedPreferences; const-string v11, "holiday_img_endtime" const/4 v12, 0x0 invoke-interface {v10, v11, v12}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v10 invoke-static {v10}, Ljava/lang/Long;->valueOf(Ljava/lang/String;)Ljava/lang/Long; move-result-object v10 invoke-virtual {v10}, Ljava/lang/Long;->longValue()J :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 move-result-wide v5 .line 168 .local v5, "lEndTime":J new-instance v0, Ljava/io/File; invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getFilesDir()Ljava/io/File; move-result-object v10 const-string v11, "holiday_img.jpg" invoke-direct {v0, v10, v11}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V .line 169 .local v0, "file":Ljava/io/File; invoke-virtual {v0}, Ljava/io/File;->exists()Z move-result v2 .line 171 .local v2, "isFileExists":Z invoke-static {}, Ljava/lang/System;->currentTimeMillis()J move-result-wide v3 .line 172 .local v3, "lCurrTime":J invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z move-result v10 if-nez v10, :cond_0 cmp-long v10, v3, v5 if-gez v10, :cond_0 cmp-long v10, v3, v7 if-lez v10, :cond_0 if-eqz v2, :cond_0 .line 174 const/4 v9, 0x1 .line 176 .end local v0 # "file":Ljava/io/File; .end local v2 # "isFileExists":Z .end local v3 # "lCurrTime":J .end local v5 # "lEndTime":J :cond_0 :goto_0 return v9 .line 166 :catch_0 move-exception v10 goto :goto_0 .end method .method static synthetic b(Lcom/lenovo/safecenter/MainTab/SplashActivity;)Landroid/widget/TextView; .locals 1 .param p0, "x0" # Lcom/lenovo/safecenter/MainTab/SplashActivity; .prologue .line 45 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->c:Landroid/widget/TextView; return-object v0 .end method .method private b()V .locals 7 .prologue .line 235 invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->isFinishing()Z move-result v2 if-eqz v2, :cond_0 .line 259 :goto_0 return-void .line 240 :cond_0 :try_start_0 const-string v2, "antitheft" const/4 v3, 0x0 invoke-virtual {p0, v2, v3}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences; move-result-object v2 new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V const-string v4, "help" invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getPackageManager()Landroid/content/pm/PackageManager; move-result-object v4 invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getPackageName()Ljava/lang/String; move-result-object v5 const/4 v6, 0x0 invoke-virtual {v4, v5, v6}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo; move-result-object v4 iget v4, v4, Landroid/content/pm/PackageInfo;->versionCode:I invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 const/4 v4, 0x1 invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z move-result v2 if-eqz v2, :cond_1 .line 244 invoke-static {p0}, Lcom/lenovo/safecenter/utils/NewFunctionNoticeManager;->init(Landroid/content/Context;)V .line 245 new-instance v1, Landroid/content/Intent; invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getApplicationContext()Landroid/content/Context; move-result-object v2 const-class v3, Lcom/lenovo/safecenter/MainTab/HelpActivity; invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V .line 247 .local v1, "intent":Landroid/content/Intent; invoke-virtual {p0, v1}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->startActivity(Landroid/content/Intent;)V .line 248 invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->finish()V :try_end_0 .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 .line 255 .end local v1 # "intent":Landroid/content/Intent; :catch_0 move-exception v0 .line 256 .local v0, "e":Landroid/content/pm/PackageManager$NameNotFoundException; invoke-virtual {v0}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V goto :goto_0 .line 250 .end local v0 # "e":Landroid/content/pm/PackageManager$NameNotFoundException; :cond_1 :try_start_1 new-instance v1, Landroid/content/Intent; invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getApplicationContext()Landroid/content/Context; move-result-object v2 const-class v3, Lcom/lenovo/safecenter/MainTab/LeSafeMainActivity; invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V .line 252 .restart local v1 # "intent":Landroid/content/Intent; invoke-virtual {p0, v1}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->startActivity(Landroid/content/Intent;)V .line 253 invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->finish()V :try_end_1 .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_0 goto :goto_0 .end method .method static synthetic c(Lcom/lenovo/safecenter/MainTab/SplashActivity;)Landroid/os/Handler; .locals 1 .param p0, "x0" # Lcom/lenovo/safecenter/MainTab/SplashActivity; .prologue .line 45 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->k:Landroid/os/Handler; return-object v0 .end method .method static synthetic d(Lcom/lenovo/safecenter/MainTab/SplashActivity;)V .locals 0 .param p0, "x0" # Lcom/lenovo/safecenter/MainTab/SplashActivity; .prologue .line 45 invoke-direct {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->b()V return-void .end method .method public static zoomImg(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap; .locals 10 .param p0, "bm" # Landroid/graphics/Bitmap; .param p1, "newWidth" # I .param p2, "newHeight" # I .prologue const/4 v1, 0x0 .line 182 invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I move-result v3 .line 183 .local v3, "width":I invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I move-result v4 .line 185 .local v4, "height":I int-to-float v0, p1 int-to-float v2, v3 div-float v9, v0, v2 .line 186 .local v9, "scaleWidth":F int-to-float v0, p2 int-to-float v2, v4 div-float v8, v0, v2 .line 188 .local v8, "scaleHeight":F new-instance v5, Landroid/graphics/Matrix; invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V .line 189 .local v5, "matrix":Landroid/graphics/Matrix; invoke-virtual {v5, v9, v8}, Landroid/graphics/Matrix;->postScale(FF)Z .line 191 const/4 v6, 0x1 move-object v0, p0 move v2, v1 invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap; move-result-object v7 .line 193 .local v7, "newbm":Landroid/graphics/Bitmap; return-object v7 .end method # virtual methods .method public onCreate(Landroid/os/Bundle;)V .locals 5 .param p1, "savedInstanceState" # Landroid/os/Bundle; .prologue const/16 v4, 0x8 .line 63 invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V .line 64 const v0, 0x7f030009 invoke-virtual {p0, v0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->setContentView(I)V .line 65 invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getApplicationContext()Landroid/content/Context; move-result-object v0 invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; move-result-object v0 iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->a:Landroid/content/SharedPreferences; invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getApplicationContext()Landroid/content/Context; move-result-object v0 invoke-static {v0}, Lcom/lenovo/safecenter/utils/LeSafeObservable;->get(Landroid/content/Context;)Lcom/lenovo/safecenter/utils/LeSafeObservable; move-result-object v0 iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->b:Lcom/lenovo/safecenter/utils/LeSafeObservable; iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->b:Lcom/lenovo/safecenter/utils/LeSafeObservable; invoke-virtual {v0, p0}, Lcom/lenovo/safecenter/utils/LeSafeObservable;->addObserver(Ljava/util/Observer;)V .line 66 const v0, 0x7f09005d invoke-virtual {p0, v0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->findViewById(I)Landroid/view/View; move-result-object v0 check-cast v0, Landroid/widget/TextView; iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->c:Landroid/widget/TextView; invoke-direct {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->a()Z move-result v0 iput-boolean v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->j:Z iget-boolean v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->j:Z if-eqz v0, :cond_0 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getFilesDir()Ljava/io/File; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, "/" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, "holiday_img.jpg" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-static {v0}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap; move-result-object v0 iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->d:Landroid/graphics/Bitmap; iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->d:Landroid/graphics/Bitmap; if-nez v0, :cond_0 const/4 v0, 0x0 iput-boolean v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->j:Z :cond_0 iget-boolean v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->j:Z if-eqz v0, :cond_1 new-instance v0, Landroid/util/DisplayMetrics; invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V invoke-virtual {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->getWindowManager()Landroid/view/WindowManager; move-result-object v1 invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display; move-result-object v1 invoke-virtual {v1, v0}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V iget v1, v0, Landroid/util/DisplayMetrics;->widthPixels:I iget v0, v0, Landroid/util/DisplayMetrics;->heightPixels:I iget-object v2, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->d:Landroid/graphics/Bitmap; invoke-static {v2, v1, v0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->zoomImg(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap; move-result-object v0 iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->d:Landroid/graphics/Bitmap; const v0, 0x7f09005a invoke-virtual {p0, v0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->findViewById(I)Landroid/view/View; move-result-object v0 check-cast v0, Landroid/widget/ImageView; const v1, 0x7f09005b invoke-virtual {p0, v1}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->findViewById(I)Landroid/view/View; move-result-object v1 check-cast v1, Landroid/widget/TextView; const v2, 0x7f09005c invoke-virtual {p0, v2}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->findViewById(I)Landroid/view/View; move-result-object v2 check-cast v2, Landroid/widget/ImageView; const v3, 0x7f09005f invoke-virtual {p0, v3}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->findViewById(I)Landroid/view/View; move-result-object v3 check-cast v3, Landroid/widget/TextView; invoke-virtual {v0, v4}, Landroid/widget/ImageView;->setVisibility(I)V invoke-virtual {v1, v4}, Landroid/widget/TextView;->setVisibility(I)V invoke-virtual {v2, v4}, Landroid/widget/ImageView;->setVisibility(I)V invoke-virtual {v3, v4}, Landroid/widget/TextView;->setVisibility(I)V const v0, 0x7f090059 invoke-virtual {p0, v0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->findViewById(I)Landroid/view/View; move-result-object v0 check-cast v0, Landroid/widget/RelativeLayout; new-instance v1, Landroid/graphics/drawable/BitmapDrawable; iget-object v2, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->d:Landroid/graphics/Bitmap; invoke-direct {v1, v2}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V .line 67 :goto_0 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->k:Landroid/os/Handler; const/4 v1, 0x2 invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z .line 68 return-void .line 66 :cond_1 const v0, 0x7f020181 invoke-static {p0, v0}, Lcom/lenovo/safecenter/utils/WflUtils;->readBitmap(Landroid/content/Context;I)Landroid/graphics/Bitmap; move-result-object v0 iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->h:Landroid/graphics/Bitmap; goto :goto_0 .end method .method protected onDestroy()V .locals 1 .prologue .line 284 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->d:Landroid/graphics/Bitmap; if-eqz v0, :cond_0 .line 285 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->d:Landroid/graphics/Bitmap; invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V .line 287 :cond_0 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->e:Landroid/graphics/Bitmap; if-eqz v0, :cond_1 .line 288 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->e:Landroid/graphics/Bitmap; invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V .line 290 :cond_1 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->f:Landroid/graphics/Bitmap; if-eqz v0, :cond_2 .line 291 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->f:Landroid/graphics/Bitmap; invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V .line 293 :cond_2 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->g:Landroid/graphics/Bitmap; if-eqz v0, :cond_3 .line 294 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->g:Landroid/graphics/Bitmap; invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V .line 296 :cond_3 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->h:Landroid/graphics/Bitmap; if-eqz v0, :cond_4 .line 297 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->h:Landroid/graphics/Bitmap; invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V .line 299 :cond_4 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->i:Landroid/graphics/Bitmap; if-eqz v0, :cond_5 .line 300 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->i:Landroid/graphics/Bitmap; invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V .line 303 :cond_5 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->b:Lcom/lenovo/safecenter/utils/LeSafeObservable; invoke-virtual {v0, p0}, Lcom/lenovo/safecenter/utils/LeSafeObservable;->deleteObserver(Ljava/util/Observer;)V .line 304 const/4 v0, 0x0 iput-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->b:Lcom/lenovo/safecenter/utils/LeSafeObservable; .line 307 invoke-super {p0}, Landroid/app/Activity;->onDestroy()V .line 308 return-void .end method .method protected onPause()V .locals 0 .prologue .line 230 invoke-static {p0}, Lcom/lenovo/safecenter/utils/TrackEvent;->trackPause(Landroid/content/Context;)V .line 231 invoke-super {p0}, Landroid/app/Activity;->onPause()V .line 232 return-void .end method .method protected onResume()V .locals 0 .prologue .line 224 invoke-super {p0}, Landroid/app/Activity;->onResume()V .line 225 invoke-static {p0}, Lcom/lenovo/safecenter/utils/TrackEvent;->trackResume(Landroid/content/Context;)V .line 226 return-void .end method .method public update(Ljava/util/Observable;Ljava/lang/Object;)V .locals 2 .param p1, "observable" # Ljava/util/Observable; .param p2, "data" # Ljava/lang/Object; .prologue .line 262 instance-of v0, p2, Ljava/lang/Integer; if-eqz v0, :cond_0 .line 263 check-cast p2, Ljava/lang/Integer; .end local p2 # "data":Ljava/lang/Object; invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I move-result v0 packed-switch v0, :pswitch_data_0 .line 274 :cond_0 :goto_0 return-void .line 265 :pswitch_0 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->c:Landroid/widget/TextView; const v1, 0x7f0d05da invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V goto :goto_0 .line 269 :pswitch_1 iget-object v0, p0, Lcom/lenovo/safecenter/MainTab/SplashActivity;->c:Landroid/widget/TextView; const v1, 0x7f0d05db invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V goto :goto_0 .line 273 :pswitch_2 invoke-direct {p0}, Lcom/lenovo/safecenter/MainTab/SplashActivity;->b()V goto :goto_0 .line 263 :pswitch_data_0 .packed-switch 0x14 :pswitch_0 :pswitch_1 :pswitch_2 .end packed-switch .end method
Smali
2
jarekankowski/pegasus_spyware
sample4/decompiled_raw/smali/com/lenovo/safecenter/MainTab/SplashActivity.smali
[ "MIT" ]
##! This module provides a mapping between VLAN IDs and the physical location where available # Reservoir Labs Inc. 2017 All Rights Reserved. # Periodically verifies if all configured taps are generating data @load ./vlan-location @load ./tap-verify
Bro
3
reservoirlabs/bro-scripts
vlan-info/__load__.bro
[ "Apache-2.0" ]
/** Copyright 2015 Acacia Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.acacia.partitioner.local; import x10.io.File; import x10.util.HashMap; import x10.util.HashSet; import x10.util.ArrayList; import x10.compiler.Native; import org.acacia.util.Utils; //import java.util.LinkedList; import java.io.BufferedReader; import java.io.IOException; import java.io.FileReader; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.util.FileManager; import com.hp.hpl.jena.rdf.model.StmtIterator; import com.hp.hpl.jena.rdf.model.Statement; import com.hp.hpl.jena.rdf.model.Resource; import com.hp.hpl.jena.rdf.model.Property; import com.hp.hpl.jena.rdf.model.RDFNode; import x10.util.ListIterator; import org.apache.commons.io.FileDeleteStrategy; import org.apache.commons.io.FileUtils; import org.acacia.server.AcaciaManager; import org.acacia.partitioner.local.MetisPartitioner; import org.acacia.partitioner.local.PartitionWriter; import org.acacia.util.PlaceToNodeMapper; import org.acacia.centralstore.AcaciaHashMapCentralStore; import org.acacia.localstore.AcaciaHashMapNativeStore; import org.acacia.metadata.db.java.MetaDataDBInterface; import org.acacia.util.java.Utils_Java; import org.acacia.resilience.FaultToleranceScheduler; import x10.core.Thread; import x10.io.Printer; /** * Class AcaciaRDFPartitioner */ public class AcaciaRDFPartitioner { /** * Default constructor */ private var nodes:HashMap[String,Long] = new HashMap[String,Long](); private var nodesTemp:HashMap[Long,String] = new HashMap[Long,String](); private var predicates:HashMap[String,Long] = new HashMap[String,Long](); private var predicatesTemp:HashMap[Long,String] = new HashMap[Long,String](); private var relationsMap:HashMap[Long,HashMap[Long,ArrayList[String]]] = new HashMap[Long,HashMap[Long,ArrayList[String]]](); private var attributeMap:HashMap[Long,HashMap[Long,ArrayList[String]]] = new HashMap[Long,HashMap[Long,ArrayList[String]]](); private val ATTRIBUTE_GENRE = "Attribute"; private val RELATIONSHIP_GENRE = "Relationship"; private val location = Utils.call_getAcaciaProperty("org.acacia.server.runtime.location")+"/rdfFiles/"; private val edgeListPath = location+"edgeList.dl"; private var converter:MetisPartitioner = null; private var vertexCount:Long; private var edgeCount:Long; private var outputFilePath:String; private var partitionIndex:Rail[Short]; private var initPartFlag:Boolean; private var initlaPartitionID:Int; private var nParts:Int; private var nThreads:Int; private var graphID:String; //private var partitionIDsList:ArrayList[String]; private var partitionIDsMap:HashMap[Int, String]; //private var graphStorage:Rail[HashMap[Int, x10.util.HashSet[Int]]]; private var graphStorage:HashMap[Int, x10.util.HashSet[Int]]; var edgeList:File;// = new File(edgeListPath); var printer:x10.io.Printer;// = edgeList.printer(); private var ontologyFileFullPath:String = null; private var ontologyFileName:String = null; var ppp:Printer = null; public def this() { val f = new File(location); if(!f.exists()){ f.mkdir(); }else{ //Delete the existing files val dir:java.io.File = new java.io.File(location); val files:x10.interop.Java.array[java.io.File] = dir.listFiles(); for(var i:Int = 0n; i < files.length; i++ ){ var delStatus:Boolean = false; try{ if(files(i).isDirectory()){ FileUtils.deleteDirectory(files(i)); }else{ delStatus = files(i).delete(); } }catch(var ex:java.io.IOException){ ex.printStackTrace(); } } } converter = new MetisPartitioner(); } public def convert(val graphName:String, val graphID:String, val inputFilePath:String, val outputFilePath:String, val nParts:Int, val isDistributedCentralPartitions:Boolean, val nThreads:Int, val nPlaces:Int){ this.nParts = nParts; this.nThreads = nThreads; this.graphID = graphID; this.outputFilePath = outputFilePath; //graphStorage = new Rail[HashMap[Int, x10.util.HashSet[Int]]](nThreads); // for(var i:Int=0n; i < nThreads; i++){ // graphStorage(i) = new HashMap[Int, x10.util.HashSet[Int]](); // } if(graphStorage == null){ graphStorage = new HashMap[Int, x10.util.HashSet[Int]](); } converter.convertWithoutDistribution(graphName, graphID, edgeListPath, Utils.call_getAcaciaProperty("org.acacia.server.runtime.location"), nParts, isDistributedCentralPartitions, nThreads, nParts); vertexCount = converter.getVertexCount(); } public def getPartitionFileList():Rail[String]{ return converter.getPartitionFileList(); } public def getPartitionIDList():Rail[String]{ return null; } public def readDirectory(val inputDirectory:String):void{ try{ val dir = new File(inputDirectory); val files = dir.list(); edgeList = new File(edgeListPath); printer = edgeList.printer(); Console.OUT.println("creating model inside testing"); for(var i:Int=0n;i<files.size;i++){ if(files(i).equals("ontology")){ ontologyFileFullPath = inputDirectory + java.io.File.separator + files(i); val dir2 = new File(ontologyFileFullPath); ontologyFileFullPath = ontologyFileFullPath + java.io.File.separator + dir2.list()(0); ontologyFileName = dir2.list()(0); continue; } readFile(inputDirectory + java.io.File.separator + files(i)); } //flush the printer //printer.flush(); writeNodeCSVs(); writeRelationsCSVs(); } catch(e:Exception){ e.printStackTrace(); } } public def readFile(val inputFile:String):void{ //val edgeList = new File(edgeListPath); //val printer = edgeList.printer(); if(graphStorage == null){ graphStorage = new HashMap[Int, x10.util.HashSet[Int]](); } // create an empty model //Console.OUT.println("creating model"); var model:Model = ModelFactory.createDefaultModel(); //Console.OUT.println("model created"); var fis:java.io.FileInputStream = null; try{ fis = new java.io.FileInputStream(new java.io.File(inputFile)); }catch(val e:java.io.FileNotFoundException){ e.printStackTrace(); } // read the RDF/XML file model.read(fis, null, "RDF/XML"); //Console.OUT.println("model created2"); iter:StmtIterator = model.listStatements(); //Console.OUT.println("model created3"); while (iter.hasNext()) { stmt:Statement = iter.nextStatement(); // get next statement //Operate on this statement subject:Resource = stmt.getSubject(); // get the subject predicate:Property = stmt.getPredicate(); // get the predicate object:RDFNode = stmt.getObject(); // get the object //Console.OUT.println("Subject : "+subject.toString()); //Here we are creating the first vertex. var firstVertex:Int = addToStore(nodes, subject.toString()) as Int; //Console.OUT.println("Predicate : "+ predicate.toString() + " "); var relation:Long = addToStore(predicates, predicate.toString()); //Console.OUT.println("Object : "+object.toString()); var secondVertex:Int; if (object instanceof Resource) { //Here we are creating the second vertex. secondVertex = addToStore(nodes, object.toString()) as Int; addToMap(relationsMap,firstVertex,relation,""+secondVertex); printer.println(firstVertex+" "+secondVertex); printer.flush(); //We also need to add this to tree //Treat the first vertex //var firstVertexIdx:Int = firstVertex%nThreads; //Console.OUT.println("firstVertexIdx:" + firstVertexIdx); //var vertexSet:x10.util.HashSet[Int] = graphStorage(firstVertexIdx).get(firstVertex); var vertexSet:x10.util.HashSet[Int] = graphStorage.get(firstVertex) as x10.util.HashSet[Int] ; if(vertexSet == null){ vertexSet = new HashSet[Int](); vertexSet.add(secondVertex); edgeCount++; //graphStorage(firstVertexIdx).put(firstVertex, vertexSet); graphStorage.put(firstVertex, vertexSet); }else{ if(vertexSet.add(secondVertex)){ edgeCount++; } //Note: we are getting a reference, so no need to put it back. //graphStorage.put(firstVertex, vertexSet); } //Next, treat the second vertex //var secondVertexIdx:Int = secondVertex%nThreads; //vertexSet = graphStorage(secondVertexIdx).get(secondVertex); //Jan23 2016: We comment this line because we treat RDF data as directed graphs. In this method we basically create an edge list and store //the edge list in a file. Then that file is read by Metis Partitioner into a Rail of TreeMaps. Metis needs undirected graphs //for partitioning. Hence when we load the directed edge list from the disk, we need to add it to the Rail of TreeMaps as undirected. /* vertexSet = graphStorage.get(secondVertex) as x10.util.HashSet[Int]; if(vertexSet == null){ vertexSet = new x10.util.HashSet[Int](); vertexSet.add(firstVertex); edgeCount++; //graphStorage(secondVertexIdx).put(secondVertex, vertexSet); graphStorage.put(secondVertex, vertexSet); }else{ if(vertexSet.add(firstVertex)){ edgeCount++; } //Note: we are getting a reference, so no need to put it back. //graphStorage.put(secondVertex, vertexSet); } */ // if(firstVertex > largestVertex){ // largestVertex = firstVertex; // } // // if(secondVertex > largestVertex){ // largestVertex = secondVertex; // } } else { // object is a literal addToMap(attributeMap,firstVertex,relation,object.toString()); } } } public def writeNodeCSVs():void{ try{ val fileLocation = location+"csv/"; val f = new File(fileLocation); if(!f.exists()){ f.mkdir(); } val query = new File(location+"query.txt"); ppp = query.printer(); ppp.print("bin/neo4j-import --into acacia.db --id-type string "); //val fileMap:HashMap[String,File] = new HashMap[String,File](); val printerMap:HashMap[String,Printer] = new HashMap[String,Printer](); val typePred = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; val ntype = predicates.get(typePred); var file:File = null; var p:Printer = null; val itr:Iterator[x10.util.Map.Entry[Long,HashMap[Long,ArrayList[String]]]] = attributeMap.entries().iterator(); while(itr.hasNext()){ val mapItem:x10.util.Map.Entry[Long,HashMap[Long,ArrayList[String]]] = itr.next(); val attrMap:HashMap[String,String] = new HashMap[String,String](); val itr2:Iterator[x10.util.Map.Entry[Long,ArrayList[String]]] = mapItem.getValue().entries().iterator(); while(itr2.hasNext()){ val miniMapItem:x10.util.Map.Entry[Long,ArrayList[String]] = itr2.next(); val itr3:x10.util.ListIterator[String] = miniMapItem.getValue().iterator(); while(itr3.hasNext()){ val value = itr3.next(); attrMap.put(predicatesTemp.get(miniMapItem.getKey()),value); } } val itr4:x10.util.ListIterator[String] = relationsMap.get(mapItem.getKey()).get(ntype).iterator(); while(itr4.hasNext()){ val nodetype = nodesTemp.get(Long.parse(itr4.next())).split("#")(1n); if(!printerMap.containsKey(nodetype)){ file = new File(fileLocation+nodetype+".csv"); //fileMap.put(nodetype,file); p = file.printer(true); printerMap.put(nodetype,p); val attrItr:Iterator[x10.util.Map.Entry[String,String]] = attrMap.entries().iterator(); p.print("nodeId:ID("+nodetype+")"); ppp.print("--nodes:"+nodetype+" "+nodetype+".csv "); while(attrItr.hasNext()){ p.print(","+attrItr.next().getKey().split("#")(1n)); } } else{ p = printerMap.get(nodetype);//.printer(true); } p.println(); val attrItr:Iterator[x10.util.Map.Entry[String,String]] = attrMap.entries().iterator(); p.print(mapItem.getKey()); if(mapItem.getKey()==5313){ Console.OUT.println(mapItem.getKey()+":"+nodetype); } while(attrItr.hasNext()){ p.print(","+attrItr.next().getValue()); } ppp.flush(); p.flush(); break; } //val nodetype = nodesTemp.get(Long.parse(relationsMap.get(mapItem.getKey()).get(ntype).getFirst())).split("#")(1n); //p.close(); //file = null;//.close(); } //p.flush(); }catch(e:Exception){ e.printStackTrace(); } } public def writeRelationsCSVs():void{ try{ val fileLocation = location+"csv/"; val typePred = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; val ntype = predicates.get(typePred); val printerMap:HashMap[String,Printer] = new HashMap[String,Printer](); var file:File = null; var p:Printer = null; val itr:Iterator[x10.util.Map.Entry[Long,HashMap[Long,ArrayList[String]]]] = relationsMap.entries().iterator(); while(itr.hasNext()){ val mapItem:x10.util.Map.Entry[Long,HashMap[Long,ArrayList[String]]] = itr.next(); //val attrMap:HashMap[String,String] = new HashMap[String,String](); val itr2:Iterator[x10.util.Map.Entry[Long,ArrayList[String]]] = mapItem.getValue().entries().iterator(); while(itr2.hasNext()){ val miniMapItem:x10.util.Map.Entry[Long,ArrayList[String]] = itr2.next(); if(miniMapItem.getKey() != ntype){ val itr3:x10.util.ListIterator[String] = miniMapItem.getValue().iterator(); while(itr3.hasNext()){ val value = itr3.next(); if(attributeMap.containsKey(Long.parse(value)) && attributeMap.containsKey(mapItem.getKey())){ //attrMap.put(predicatesTemp.get(miniMapItem.getKey()),value); val startType = nodesTemp.get(Long.parse(relationsMap.get(mapItem.getKey()).get(ntype).getFirst())).split("#")(1n); val endType = nodesTemp.get(Long.parse(relationsMap.get(Long.parse(value)).get(ntype).getFirst())).split("#")(1n); val pType = ""; //var file:File = new File(fileLocation+startType+"_"+endType+".csv"); //val p = file.printer(true); if(!printerMap.containsKey(startType+"_"+endType)){ file = new File(fileLocation+startType+"_"+endType+".csv"); p = file.printer(); printerMap.put(startType+"_"+endType,p); p.println(":START_ID("+startType+"),:TYPE,:END_ID("+endType+")"); ppp.print("--relationships:CONTAINS "+startType+"_"+endType+".csv "); ppp.flush(); //p.flush(); } else{ p = printerMap.get(startType+"_"+endType); } p.println(mapItem.getKey()+","+predicatesTemp.get(miniMapItem.getKey()).split("#")(1n)+","+Long.parse(value)); //p.println(mapItem.getKey()+","+predicatesTemp.get(miniMapItem.getKey()).split("#")(1n)+","+Long.parse(value)); p.flush(); } } } } } }catch(e:Exception){ e.printStackTrace(); } } private def addToStore(val map:HashMap[String,Long],val URI:String):Long{ if(map.containsKey(URI)){ return map.get(URI); } val id = map.size(); map.put(URI,id); if(map == nodes){ nodesTemp.put(id,URI); } else if(map == predicates){ predicatesTemp.put(id,URI); } return id; } private def addToMap(val map:HashMap[Long,HashMap[Long,ArrayList[String]]],val vertex:Long,val relation:Long,val value:String):void{ var miniMap:HashMap[Long,ArrayList[String]] = map.get(vertex); //Console.OUT.println(value); if(miniMap != null){ var list:ArrayList[String] = miniMap.get(relation); if(list != null){ list.add(value); } else{ list = new ArrayList[String](); list.add(""+value); miniMap.put(relation,list); } } else{ var list:ArrayList[String] = new ArrayList[String](); list.add(""+value); miniMap = new HashMap[Long,ArrayList[String]](); miniMap.put(relation,list); map.put(vertex,miniMap); } } public def writeStore(val map:HashMap[String,Long],val fileName:String):void{ Console.OUT.println("*****"+fileName+"*****"); val O = new File(location+fileName); val P = O.printer(); var itr:Iterator[x10.util.Map.Entry[String,Long]] = map.entries().iterator(); while(itr.hasNext()){ val attributeItem:x10.util.Map.Entry[String,Long] = itr.next(); //Console.OUT.println(attributeItem.getKey()+" "+attributeItem.getValue()); P.println(attributeItem.getValue()+" "+attributeItem.getKey()); } P.flush(); } public def writeMap(val map:HashMap[Long,HashMap[Long,ArrayList[String]]],val fileName:String):void{ Console.OUT.println("*****"+fileName+"*****"); val O = new File(location+fileName); val P = O.printer(); val itr:Iterator[x10.util.Map.Entry[Long,HashMap[Long,ArrayList[String]]]] = map.entries().iterator(); while(itr.hasNext()){ val mapItem:x10.util.Map.Entry[Long,HashMap[Long,ArrayList[String]]] = itr.next(); val itr2:Iterator[x10.util.Map.Entry[Long,ArrayList[String]]] = mapItem.getValue().entries().iterator(); while(itr2.hasNext()){ val miniMapItem:x10.util.Map.Entry[Long,ArrayList[String]] = itr2.next(); val itr3:x10.util.ListIterator[String] = miniMapItem.getValue().iterator(); //Console.OUT.print(mapItem.getKey()+" "+miniMapItem.getKey()); P.print(mapItem.getKey()+" "+miniMapItem.getKey()); while(itr3.hasNext()){ val value = itr3.next(); //Console.OUT.print(" "+value); P.print(" "+value); } //Console.OUT.println(); P.println(); } } P.flush(); } public def getEdgeList():String{ return edgeListPath; } /** * Once an RDF graph's edge list has been partitioned by MetisPartitioner, we have to distribute * the contents of the RDF data set across the workers. This is different from distriuting a simple * edgelist because we have to handle the vertex, edge properties as well. */ public def distributePartitionedData():void{ //In the case of RDF graphs both central and native stores will be the same. val partitionFilesMap:HashMap[Int, AcaciaHashMapNativeStore] = new HashMap[Int, AcaciaHashMapNativeStore](); val centralStoresMap:HashMap[Int, AcaciaHashMapNativeStore] = new HashMap[Int, AcaciaHashMapNativeStore](); Console.OUT.println("--AAAA22--:vertexCount:" + vertexCount); var store:AcaciaHashMapNativeStore = null; partitionIDsMap = new HashMap[Int, String](); partitionIndex = new Rail[Short]((vertexCount+1) as Int); Console.OUT.println("----------------------------5"); var same:Int = 0n; var different:Int = 0n; val numberOfPartitions:Int = partitionFilesMap.keySet().size() < nThreads ? nThreads : partitionFilesMap.keySet().size() as Int; val numVerts:Rail[Int] = new Rail[Int](numberOfPartitions); for(var i:Int=0n;i<nParts;i++){ MetaDataDBInterface.runInsert("INSERT INTO ACACIA_META.PARTITION(GRAPH_IDGRAPH, IDPARTITION) VALUES(" + graphID + "," + i + ")"); store = new AcaciaHashMapNativeStore(Int.parseInt(graphID), i, Utils.call_getAcaciaProperty("org.acacia.server.runtime.location"), false); store.setOntologyFileName(ontologyFileName); store.initializeRelationshipMapWithProperties(predicates.keySet().size() as Int); initLocalStores(store,i); var itrN:x10.lang.Iterator[Int] = graphStorage.keySet().iterator(); val temp = graphStorage.keySet().size(); var count:Int = 0n; while(itrN.hasNext()){ val fromVertex = itrN.next(); val fromVertexPartition = partitionIndex(fromVertex) as Int; if(fromVertexPartition == i){ distributeLocalData(fromVertex,store); } } val result:Boolean = call_runUpdate("UPDATE ACACIA_META.PARTITION SET VERTEXCOUNT=" + store.getVertexCount() + ", EDGECOUNT=" + store.getEdgeCount() + " WHERE GRAPH_IDGRAPH=" + graphID + " and IDPARTITION=" + store.getPartitionID()); store.storeGraph(); } val edgeDistribution = getEdgeDistribution(); same = edgeDistribution(0); different = edgeDistribution(1); Console.OUT.println("same:" + same); Console.OUT.println("different:" + different); //In the second run we actually separate the graph data to multiple partitions. //The following code assume there is only single central partition val numberOfCentralPartitions:Int = nParts; val edgesPerCentralStore:Int = ((different / numberOfCentralPartitions) + 1n) as Int; MetaDataDBInterface.runUpdate("UPDATE ACACIA_META.GRAPH SET CENTRALPARTITIONCOUNT=" + numberOfCentralPartitions + ", VERTEXCOUNT=" + vertexCount + ", EDGECOUNT=" + edgeCount + " WHERE IDGRAPH=" + graphID); for(var i:Int = 0n; i < nParts; i++){ store = new AcaciaHashMapNativeStore(Int.parseInt(graphID), i as Int, Utils.call_getAcaciaProperty("org.acacia.server.runtime.location"), true); store.setOntologyFileName(ontologyFileName); store.initializeRelationshipMapWithProperties(predicates.keySet().size() as Int); initCentralStores(store,i); var itrN:x10.lang.Iterator[Int] = graphStorage.keySet().iterator(); val temp = graphStorage.keySet().size(); while(itrN.hasNext()){ val fromVertex = itrN.next(); val fromVertexPartition = partitionIndex(fromVertex) as Int; if(fromVertexPartition == i){ distributeCentralData(fromVertex,store); } } MetaDataDBInterface.runInsert("INSERT INTO ACACIA_META.CPARTITION(IDCPARTITION, IDGRAPH, VERTEXCOUNT, EDGECOUNT) VALUES(" + i + "," + graphID + "," + store.getVertexCount() + "," + store.getEdgeCount() + ")"); store.storeGraph(); } distributeCentralStore(numberOfCentralPartitions,graphID); distributeLocalStore(nParts, graphID); Console.OUT.println("Done partitioning..."); } public def distributeCentralStore(val n:Int, val graphID:String){ try{ val r:java.lang.Runtime = java.lang.Runtime.getRuntime(); var hostID:Int = 0n; var hostCount:Int = 0n; var nPlaces:Int = 0n; var hostName:String = null; var hostList:ArrayList[String] = new ArrayList[String](); var f:java.io.File = new java.io.File("machines.txt"); var br:java.io.BufferedReader = new java.io.BufferedReader(new java.io.FileReader(f)); var str:String = br.readLine(); while(str != null){ hostList.add(str.trim()); str = br.readLine(); } br.close(); hostCount = hostList.size() as Int; Console.OUT.println("hostSize:" + hostCount); var fs:FaultToleranceScheduler = new FaultToleranceScheduler(); var fsmap:HashMap[Int,String] = fs.mapReplicationstoPlaces(); for(var j:Int = 0n; j < n; j++){ nPlaces = AcaciaManager.getNPlaces(org.acacia.util.Utils.getPrivateHostList()(0)); hostID = (j % hostCount) as Int; hostName = hostList.get(hostID); val filePath:String = Utils_Java.getAcaciaProperty("org.acacia.server.runtime.location")+"/" + graphID + "_centralstore/"+graphID+"_"+j; Console.OUT.println("zip -rj "+filePath+"_trf.zip "+filePath); val process:java.lang.Process = r.exec("zip -rj "+filePath+"_trf.zip "+filePath); process.waitFor(); val instancePort:Int = PlaceToNodeMapper.getInstancePort(j); val fileTransferport:Int = PlaceToNodeMapper.getFileTransferServicePort(j); AcaciaManager.batchUploadCentralStore(hostName, instancePort, Long.parseLong(graphID), filePath+"_trf.zip", fileTransferport); val hostDI:String = call_runSelect("SELECT idhost FROM ACACIA_META.HOST WHERE name LIKE '" + hostName + "'")(0); MetaDataDBInterface.runInsert("INSERT INTO ACACIA_META.HOST_HAS_CPARTITION(HOST_IDHOST, CPARTITION_IDCPARTITION, CPARTITION_GRAPH_IDCGRAPH) VALUES(" + hostDI + "," + j + "," + graphID + ")"); //send replicates Console.OUT.println(fsmap.size()+":"+n+":"+j); val placeList = fsmap.get(j); if(placeList != null){ val repPlaces = placeList.substring(0n,placeList.length()-1n).split(","); var replicationHostID:Int = 0n; var replicationHostName:String = null; for(val repPlace in repPlaces){ val i:Int = Int.parse(repPlace); replicationHostID = (i % hostCount) as Int; replicationHostName = hostList.get(hostID); //val replicationActualPartID:String = partitionIDsMap.get(i); // val replicationWithinPlaceIndex:Int = ((i - hostID) as Int)/hostCount; val replicationInstancePort:Int = PlaceToNodeMapper.getInstancePort(i); // Console.OUT.println("withinPlaceIndex:" + replicationWithinPlaceIndex + " instancePort:" + replicationInstancePort); val replicationFileTransferport:Int = PlaceToNodeMapper.getFileTransferServicePort(i); AcaciaManager.batchUploadCentralReplication(replicationHostName, replicationInstancePort, Long.parseLong(graphID), filePath+"_trf.zip", replicationFileTransferport,i); // //val replicationHost:String = call_runSelect("SELECT idhost FROM ACACIA_META.HOST WHERE name LIKE '" + replicationHostName + "'")(0); MetaDataDBInterface.runInsert("INSERT INTO ACACIA_META.REPLICATION_STORED_IN(idreplication, stored_partition_id, stored_host_id) VALUES(" + j + "," + graphID + "_" + j + "," + replicationHostID + ")"); Console.OUT.println("Send replication "+graphID+"_"+j+" to worker "+i); } } } //delete central store files in tmp directory val centralStorePath:String = Utils_Java.getAcaciaProperty("org.acacia.server.runtime.location")+"/" + graphID + "_centralstore/"; val p:java.lang.Process = r.exec("rm -r "+centralStorePath); }catch(val e:Exception){ Console.OUT.println("Error : "+e.getMessage()); e.printStackTrace(); }catch(val e1:java.io.IOException){ Console.OUT.println("Error : "+e1.getMessage()); e1.printStackTrace(); }catch(val e2:java.lang.InterruptedException){ Console.OUT.println("Error : "+e2.getMessage()); e2.printStackTrace(); } } public def distributeLocalStore(val n:Int, val graphID:String){ try{ val r:java.lang.Runtime = java.lang.Runtime.getRuntime(); var hostID:Int = 0n; var hostCount:Int = 0n; var nPlaces:Int = 0n; var hostName:String = null; var hostList:ArrayList[String] = new ArrayList[String](); var f:java.io.File = new java.io.File("machines.txt"); var br:java.io.BufferedReader = new java.io.BufferedReader(new java.io.FileReader(f)); var str:String = br.readLine(); while(str != null){ hostList.add(str.trim()); str = br.readLine(); } br.close(); hostCount = hostList.size() as Int; Console.OUT.println("hostSize:" + hostCount); Console.OUT.println("n:" + n); var fs:FaultToleranceScheduler = new FaultToleranceScheduler(); var fsmap:HashMap[Int,String] = fs.mapReplicationstoPlaces(); for(var j:Int = 0n; j < n; j++){ nPlaces = AcaciaManager.getNPlaces(org.acacia.util.Utils.getPrivateHostList()(0)); hostID = (j % hostCount) as Int; hostName = hostList.get(hostID); val actualPartID:String = partitionIDsMap.get(j); val filePath:String = Utils_Java.getAcaciaProperty("org.acacia.server.runtime.location")+"/" + graphID + "_" + actualPartID; FileUtils.copyFile(new java.io.File(ontologyFileFullPath), new java.io.File(filePath + java.io.File.separator + ontologyFileName)); Console.OUT.println("zip -rj "+filePath+".zip "+filePath); val process:java.lang.Process = r.exec("zip -rj "+filePath+".zip "+filePath); process.waitFor(); val instancePort:Int = PlaceToNodeMapper.getInstancePort(j); val fileTransferport:Int = PlaceToNodeMapper.getFileTransferServicePort(j); AcaciaManager.batchUploadFile(hostName, instancePort, Long.parseLong(graphID), filePath+".zip", fileTransferport); val hostDI:String = call_runSelect("SELECT idhost FROM ACACIA_META.HOST WHERE name LIKE '" + hostName + "'")(0); MetaDataDBInterface.runInsert("INSERT INTO ACACIA_META.HOST_HAS_PARTITION(HOST_IDHOST, PARTITION_IDPARTITION, PARTITION_GRAPH_IDGRAPH) VALUES(" + hostDI + "," + actualPartID + "," + graphID + ")"); //send replicates Console.OUT.println(fsmap.size()+":"+n+":"+j); val placeList = fsmap.get(j); if(placeList != null){ val repPlaces = placeList.substring(0n,placeList.length()-1n).split(","); var replicationHostID:Int = 0n; var replicationHostName:String = null; for(val repPlace in repPlaces){ val i:Int = Int.parse(repPlace); replicationHostID = (i % hostCount) as Int; replicationHostName = hostList.get(hostID); val replicationInstancePort:Int = PlaceToNodeMapper.getInstancePort(i); // Console.OUT.println("withinPlaceIndex:" + replicationWithinPlaceIndex + " instancePort:" + replicationInstancePort); val replicationFileTransferport:Int = PlaceToNodeMapper.getFileTransferServicePort(i); AcaciaManager.batchUploadReplication(replicationHostName, replicationInstancePort, Long.parseLong(graphID), filePath+".zip", replicationFileTransferport,i); // //val replicationHost:String = call_runSelect("SELECT idhost FROM ACACIA_META.HOST WHERE name LIKE '" + replicationHostName + "'")(0); MetaDataDBInterface.runInsert("INSERT INTO ACACIA_META.REPLICATION_STORED_IN(idreplication, stored_partition_id, stored_host_id) VALUES(" + j + "," + graphID + "_" + actualPartID + "," + replicationHostID + ")"); // Console.OUT.println("Send replication "+graphID+"_"+j+" to worker "+i); } } //delete local store files in tmp directory val p1:java.lang.Process = r.exec("rm -r "+filePath); val p2:java.lang.Process = r.exec("rm "+filePath+".zip"); } }catch(val e:Exception){ Console.OUT.println("Error : "+e.getMessage()); e.printStackTrace(); }catch(val e1:java.io.IOException){ Console.OUT.println("Error : "+e1.getMessage()); e1.printStackTrace(); }catch(val e2:java.lang.InterruptedException){ Console.OUT.println("Error : "+e2.getMessage()); e2.printStackTrace(); } } private def initLocalStores(store:AcaciaHashMapNativeStore,i:Int){ var br:BufferedReader=null; var isFirstTime:Boolean = true; try{ Console.OUT.println("file path: --AA-->" + outputFilePath+"/grf.part."+nParts); br = new BufferedReader(new FileReader(outputFilePath+"/grf.part."+nParts)); var line:String = br.readLine(); var counter:Int = 0n; var partitionID:Int = 0n; //var refToHashMapNativeStore:AcaciaHashMapNativeStore = null; initPartFlag = false; while(line != null){ partitionID = Int.parseInt(line); //Console.OUT.println("counter:"+counter); partitionIndex(counter) = partitionID as Short;//This is kind of limitation at the moment. //refToHashMapNativeStore = partitionFilesMap.get(partitionID); if(partitionID == i){ if(isFirstTime){ isFirstTime = false; //It will be inefficient for storing the same set of predicates in each and every native store created. //However, for the moment we do it because the number of predicates available is less. val itr:x10.lang.Iterator[x10.util.Map.Entry[String, Long]] = predicates.entries().iterator() as x10.lang.Iterator[x10.util.Map.Entry[String, Long]]; while(itr.hasNext()){ val entry:x10.util.Map.Entry[String, Long] = itr.next(); store.addPredicate(entry.getValue() as Int, entry.getKey() as x10.lang.String); } } } line = br.readLine(); counter++; } }catch(val e:IOException){ e.printStackTrace(); } } private def getEdgeDistribution():Rail[Int]{ val edgeDistribution:Rail[Int] = new Rail[Int](2); var itr:x10.lang.Iterator[x10.util.Map.Entry[Int, x10.util.HashSet[Int]]] = graphStorage.entries().iterator() as x10.lang.Iterator[x10.util.Map.Entry[Int, x10.util.HashSet[Int]]]; var toVertexPartition:Int = 0n; var toVertex:Int = 0n; while(itr.hasNext()){ var entry:x10.util.Map.Entry[Int, x10.util.HashSet[Int]] = itr.next(); var fromVertex:Int = entry.getKey(); var fromVertexPartition:Int = partitionIndex(fromVertex); var hs:x10.util.HashSet[Int] = entry.getValue() as x10.util.HashSet[Int]; if(hs != null){ var itr2:x10.lang.Iterator[Int] = hs.iterator(); while(itr2.hasNext()){ toVertex = itr2.next(); toVertexPartition = partitionIndex(toVertex); if(fromVertexPartition != toVertexPartition){ edgeDistribution(1)++; }else{ edgeDistribution(0)++; } } }else{ continue; } } return edgeDistribution; } private def initCentralStores(store:AcaciaHashMapNativeStore,i:Int){ val itr2:x10.lang.Iterator[x10.util.Map.Entry[String, Long]] = predicates.entries().iterator() as x10.lang.Iterator[x10.util.Map.Entry[String, Long]]; while(itr2.hasNext()){ val entry:x10.util.Map.Entry[String, Long] = itr2.next(); store.addPredicate(entry.getValue() as Int, entry.getKey() as String); } } private def distributeLocalData(fromVertex:Int,store:AcaciaHashMapNativeStore){ var fromVertexPartition:Int = 0n; var toVertex:Int = 0n; var toVertexPartition:Int = 0n; val valItem:HashSet[Int] = graphStorage.get(fromVertex); fromVertexPartition = partitionIndex(fromVertex) as Short; val itr2:x10.lang.Iterator[Int] = valItem.iterator(); while(itr2.hasNext()){ toVertex = itr2.next(); toVertexPartition = partitionIndex(toVertex); //Console.OUT.println("-----------------B3"); if(fromVertexPartition == toVertexPartition){ //Console.OUT.println("-----------------B8"); //We add the starting vertex of the relationship to native store if(!store.containsVertex(fromVertex)){ var propertyValue:String = nodesTemp.get(fromVertex); store.addVertexWithProperty(fromVertex as Long, propertyValue); }else{ //We need not to worry about adding new properties to an existing vertex in the native store. //It is because we add the entire set of information of a vertex when we add a vertex at the first time. } //Console.OUT.println("-----------------B9"); //The ending vertex if(!store.containsVertex(toVertex)){ var propertyValue:String = nodesTemp.get(toVertex); store.addVertexWithProperty(toVertex as Long, propertyValue); }else{ //We need not to worry about adding new properties to an existing vertex in the native store. //It is because we add the entire set of information of a vertex when we add a vertex at the first time. } //Console.OUT.println("-----------------B10 : " + fromVertex); //Next, we add the relationship information to native store. val relMap:HashMap[Long,ArrayList[String]] = relationsMap.get(fromVertex); if(relMap != null){ //Console.OUT.println("-----------------B10--1 : " + relMap.entries().size()); //For each of the relationship type, we need to check whether the specified ending vertex (toVertex) is the //ending vertex of the relationship and then add it to the native store. val relIterator:x10.lang.Iterator[x10.util.Map.Entry[Long, ArrayList[String]]] = relMap.entries().iterator(); //Console.OUT.println("-----------------B10--2"); while(relIterator.hasNext()){ //Console.OUT.println("-----------------B10--3"); val item:x10.util.Map.Entry[Long, ArrayList[String]] = relIterator.next(); //Console.OUT.println("-----------------B10--4"); val key:Long = item.getKey(); //Console.OUT.println("-----------------B10--5"); val ll:ArrayList[String] = item.getValue(); //Console.OUT.println("-----------------B10--6"); if(ll != null){ if(ll.contains((""+toVertex))){ //Console.OUT.println("-----------------B10--6--1"); store.addRelationship(fromVertex as Long, toVertex as Long, key as Int); //Console.OUT.println("-----------------B10--6--2"); } } //Console.OUT.println("-----------------B10--7"); } //Console.OUT.println("-----------------B11"); } //We also add the attribute information to native store. val mp:HashMap[Long,ArrayList[String]] = attributeMap.get(fromVertex); if(mp != null){ val attribIterator:x10.lang.Iterator[x10.util.Map.Entry[Long, ArrayList[String]]] = mp.entries().iterator(); while(attribIterator.hasNext()){ val entr:x10.util.Map.Entry[Long, ArrayList[String]] = attribIterator.next(); val retType:Int = entr.getKey() as Int; val ll:ArrayList[String] = entr.getValue(); val itr3:x10.lang.Iterator[String] = ll.iterator(); while(itr3.hasNext()){ //x10.interop.Java.convert((itr3.next() as x10.lang.String).chars()) //x10.interop.Java.convert(new Rail[String](1)) store.addAttributeByValue(fromVertex as Int, retType as Int, itr3.next() as String); } } } // Console.OUT.println("-----------------B12"); val mp2:HashMap[Long,ArrayList[String]] = attributeMap.get(toVertex); if(mp2 != null){ val attribIterator:x10.lang.Iterator[x10.util.Map.Entry[Long, ArrayList[String]]] = mp2.entries().iterator(); while(attribIterator.hasNext()){ val entr:x10.util.Map.Entry[Long, ArrayList[String]] = attribIterator.next(); val retType:Int = entr.getKey() as Int; val ll:ArrayList[String] = entr.getValue(); val itr3:x10.lang.Iterator[String] = ll.iterator(); while(itr3.hasNext()){ //x10.interop.Java.convert((itr3.next() as x10.lang.String).chars()) //x10.interop.Java.convert(new Rail[String](1)) store.addAttributeByValue(fromVertex as Int, retType as Int, itr3.next() as String); } } } } // Console.OUT.println("-----------------B13"); } } private def distributeCentralData(fromVertex:Int,store:AcaciaHashMapNativeStore){ var fromVertexPartition:Int = 0n; var toVertex:Int = 0n; var toVertexPartition:Int = 0n; val valItem:HashSet[Int] = graphStorage.get(fromVertex); fromVertexPartition = partitionIndex(fromVertex) as Short; val itr2:x10.lang.Iterator[Int] = valItem.iterator(); while(itr2.hasNext()){ toVertex = itr2.next(); toVertexPartition = partitionIndex(toVertex); //Console.OUT.println("-----------------B3"); if(fromVertexPartition != toVertexPartition){ //Console.OUT.println("-----------------B8"); //We add the starting vertex of the relationship to native store if(!store.containsVertex(fromVertex)){ var propertyValue:String = nodesTemp.get(fromVertex); store.addVertexWithProperty(fromVertex as Long, propertyValue); }else{ //We need not to worry about adding new properties to an existing vertex in the native store. //It is because we add the entire set of information of a vertex when we add a vertex at the first time. } //Console.OUT.println("-----------------B9"); //The ending vertex if(!store.containsVertex(toVertex)){ var propertyValue:String = nodesTemp.get(toVertex); store.addVertexWithProperty(toVertex as Long, propertyValue); }else{ //We need not to worry about adding new properties to an existing vertex in the native store. //It is because we add the entire set of information of a vertex when we add a vertex at the first time. } //Console.OUT.println("-----------------B10 : " + fromVertex); //Next, we add the relationship information to native store. val relMap:HashMap[Long,ArrayList[String]] = relationsMap.get(fromVertex); if(relMap != null){ //Console.OUT.println("-----------------B10--1 : " + relMap.entries().size()); //For each of the relationship type, we need to check whether the specified ending vertex (toVertex) is the //ending vertex of the relationship and then add it to the native store. val relIterator:x10.lang.Iterator[x10.util.Map.Entry[Long, ArrayList[String]]] = relMap.entries().iterator(); //Console.OUT.println("-----------------B10--2"); while(relIterator.hasNext()){ //Console.OUT.println("-----------------B10--3"); val item:x10.util.Map.Entry[Long, ArrayList[String]] = relIterator.next(); //Console.OUT.println("-----------------B10--4"); val key:Long = item.getKey(); //Console.OUT.println("-----------------B10--5"); val ll:ArrayList[String] = item.getValue(); //Console.OUT.println("-----------------B10--6"); if(ll != null){ if(ll.contains((""+toVertex))){ //Console.OUT.println("-----------------B10--6--1"); store.addRelationship(fromVertex as Long, toVertex as Long, key as Int); //Console.OUT.println("-----------------B10--6--2"); } } //Console.OUT.println("-----------------B10--7"); } //Console.OUT.println("-----------------B11"); } //We also add the attribute information to native store. val mp:HashMap[Long,ArrayList[String]] = attributeMap.get(fromVertex); if(mp != null){ val attribIterator:x10.lang.Iterator[x10.util.Map.Entry[Long, ArrayList[String]]] = mp.entries().iterator(); while(attribIterator.hasNext()){ val entr:x10.util.Map.Entry[Long, ArrayList[String]] = attribIterator.next(); val retType:Int = entr.getKey() as Int; val ll:ArrayList[String] = entr.getValue(); val itr3:x10.lang.Iterator[String] = ll.iterator(); while(itr3.hasNext()){ //x10.interop.Java.convert((itr3.next() as x10.lang.String).chars()) //x10.interop.Java.convert(new Rail[String](1)) store.addAttributeByValue(fromVertex as Int, retType as Int, itr3.next() as String); } } } // Console.OUT.println("-----------------B12"); val mp2:HashMap[Long,ArrayList[String]] = attributeMap.get(toVertex); if(mp2 != null){ val attribIterator:x10.lang.Iterator[x10.util.Map.Entry[Long, ArrayList[String]]] = mp2.entries().iterator(); while(attribIterator.hasNext()){ val entr:x10.util.Map.Entry[Long, ArrayList[String]] = attribIterator.next(); val retType:Int = entr.getKey() as Int; val ll:ArrayList[String] = entr.getValue(); val itr3:x10.lang.Iterator[String] = ll.iterator(); while(itr3.hasNext()){ //x10.interop.Java.convert((itr3.next() as x10.lang.String).chars()) //x10.interop.Java.convert(new Rail[String](1)) store.addAttributeByValue(fromVertex as Int, retType as Int, itr3.next() as String); } } } } // Console.OUT.println("-----------------B13"); } } @Native("java", "org.acacia.metadata.db.java.MetaDataDBInterface.runSelect(#1)") static native def call_runSelect(String):Rail[String]; @Native("java", "org.acacia.metadata.db.java.MetaDataDBInterface.runUpdate(#1)") static native def call_runUpdate(String):Boolean; }
X10
4
mdherath/Acacia
src/org/acacia/partitioner/local/AcaciaRDFPartitioner.x10
[ "Apache-2.0" ]
This is a literate coffee source with lots of comments console.log 'Hello' The rest is ignored
Literate CoffeeScript
0
AutoscanForJava/net.code-story-http
src/test/resources/app/js/literate.litcoffee
[ "Apache-2.0" ]
=head1 DESCRIPTION move_parrot_logo.pir - move a Parrot logo with the SDL Parrot bindings =head1 SYNOPSIS To run this file, run the following command from the Parrot directory: $ parrot examples/sdl/move_parrot_logo.pir $ =cut .sub _main :main load_bytecode "SDL/App.pir" load_bytecode "SDL/Color.pir" load_bytecode "SDL/Rect.pir" load_bytecode "SDL/Image.pir" load_bytecode "SDL/Sprite.pir" load_bytecode "SDL/EventHandler.pir" load_bytecode "SDL/Event.pir" .local pmc app .local int app_type app = new ['SDL'; 'App'] app.'init'( 'width' => 640, 'height' => 480, 'bpp' => 0, 'flags' => 0 ) .local pmc main_screen main_screen = app.'surface'() .local pmc black .local int color_type black = new ['SDL'; 'Color'] black.'init'( 'r' => 0, 'g' => 0, 'b' => 0 ) .local pmc image .local int image_type .local string filename image = new ['SDL'; 'Image'] filename = 'examples/sdl/parrot_small.png' image.'init'( 'file' => filename ) .local pmc sprite_args .local pmc sprite .local int sprite_type sprite = new ['SDL'; 'Sprite'] sprite.'init'( 'surface' => image, 'source_x' => 0, 'source_y' => 0, 'dest_x' => 270, 'dest_y' => 212, 'bgcolor' => black ) .local pmc parent_class .local pmc class_type get_class parent_class, ['SDL'; 'EventHandler'] subclass class_type, parent_class, 'MoveLogo::EventHandler' .local pmc event_handler .local int handler_type event_handler = new 'MoveLogo::EventHandler' .local pmc event .local int event_type event = new ['SDL'; 'Event'] event.'init'() .local pmc handler_args handler_args = new 'Hash' handler_args[ 'screen' ] = main_screen handler_args[ 'sprite' ] = sprite event_handler.'init'( handler_args ) event_handler.'draw_screen'( main_screen, sprite ) event.'process_events'( event_handler, handler_args ) .end .namespace [ 'MoveLogo::EventHandler' ] .sub draw_screen :method .param pmc screen .param pmc sprite .local pmc prev_rect .local pmc rect .local pmc rect_array rect_array = new 'ResizablePMCArray' set rect_array, 2 (prev_rect, rect) = sprite.'draw_undraw'( screen ) set rect_array[ 0 ], prev_rect set rect_array[ 1 ], rect screen.'update_rects'( rect_array ) .return() .end .sub key_down_down :method .param pmc event_args .local pmc screen .local pmc sprite screen = event_args[ 'screen' ] sprite = event_args[ 'sprite' ] .local int y y = sprite.'y'() if y == 424 goto _draw inc y sprite.'y'( y ) _draw: self.'draw_screen'( screen, sprite ) .end .sub key_down_up :method .param pmc event_args .local pmc screen .local pmc sprite screen = event_args[ 'screen' ] sprite = event_args[ 'sprite' ] .local int y y = sprite.'y'() if y == 0 goto _draw dec y sprite.'y'( y ) _draw: self.'draw_screen'( screen, sprite ) .end .sub key_down_left :method .param pmc event_args .local pmc screen .local pmc sprite screen = event_args[ 'screen' ] sprite = event_args[ 'sprite' ] .local int x x = sprite.'x'() if x == 0 goto _draw dec x sprite.'x'( x ) _draw: self.'draw_screen'( screen, sprite ) .end .sub key_down_right :method .param pmc event_args .local pmc screen .local pmc sprite screen = event_args[ 'screen' ] sprite = event_args[ 'sprite' ] .local int x x = sprite.'x'() if x == 540 goto _draw inc x sprite.'x'( x ) _draw: self.'draw_screen'( screen, sprite ) .end .sub key_down_escape :method .param pmc event_args end .end =head1 COPYRIGHT Copyright (C) 2004-2008, Parrot Foundation. =cut # Local Variables: # mode: pir # fill-column: 100 # End: # vim: expandtab shiftwidth=4 ft=pir:
Parrot Internal Representation
5
winnit-myself/Wifie
examples/sdl/move_parrot_logo.pir
[ "Artistic-2.0" ]