content stringlengths 4 1.04M | lang stringclasses 358 values | score int64 0 5 | repo_name stringlengths 5 114 | repo_path stringlengths 4 229 | repo_licenses listlengths 1 8 |
|---|---|---|---|---|---|
12.34.56.78 STREAM example.com
12.34.56.78 DGRAM
12.34.56.78 RAW
2606:2800:220:1:248:1893:25c8:1946 STREAM
2606:2800:220:1:248:1893:25c8:1946 DGRAM
2606:2800:220:1:248:1893:25c8:1946 RAW
| DIGITAL Command Language | 1 | multani/inspec | test/unit/mock/cmd/getent-ahosts-example.com | [
"Apache-2.0"
] |
#tag Class
Protected Class GKLocalPlayer
Inherits GameKit.GKPlayer
#tag Method, Flags = &h21
Private Shared Function ClassRef() As Ptr
static ref as ptr = NSClassFromString("GKLocalPlayer")
return ref
End Function
#tag EndMethod
#tag Method, Flags = &h0
Sub DeleteSavedGamesWithNameCompletionHandler(name as CFStringRef, handler as NSError)
declare sub deleteSavedGamesWithName_ lib GameKitLib selector "deleteSavedGamesWithName:completionHandler:" (obj_id as ptr, name as CFStringRef, handler as ptr)
deleteSavedGamesWithName_(self, name, handler)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub FetchSavedGamesWithCompletionHandler(handler as NSArray)
declare sub fetchSavedGamesWithCompletionHandler_ lib GameKitLib selector "fetchSavedGamesWithCompletionHandler:" (obj_id as ptr, handler as ptr)
fetchSavedGamesWithCompletionHandler_(self, handler)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Attributes( Incomplete = "If you would like me to complete this method callback please send me a PM" ) Sub GenerateIdentityVerificationSignatureWithCompletionHandler(completionHandler as ptr)
declare sub generateIdentityVerificationSignatureWithCompletionHandler_ lib GameKitLib selector "generateIdentityVerificationSignatureWithCompletionHandler:" (obj_id as ptr, completionHandler as ptr)
generateIdentityVerificationSignatureWithCompletionHandler_(self, completionHandler)
#Pragma warning "incomplete, do not use"
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub LoadDefaultLeaderboardIdentifierWithCompletionHandler(completionHandler as TextCompletionHandler)
declare sub loadDefaultLeaderboardIdentifierWithCompletionHandler_ lib GameKitLib selector "loadDefaultLeaderboardIdentifierWithCompletionHandler:" (obj_id as ptr, completionHandler as Ptr)
dim handler as new TextCompletionHandlerWrapper(completionHandler)
dim blk as new iOSBlock(AddressOf handler.handler)
loadDefaultLeaderboardIdentifierWithCompletionHandler_(self, blk.Handle)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub LoadFriendPlayersWithCompletionHandler(completionHandler as NSArrayCompletionHandler)
declare sub loadFriendPlayersWithCompletionHandler_ lib GameKitLib selector "loadFriendPlayersWithCompletionHandler:" (obj_id as ptr, completionHandler as ptr)
dim handler as new GameKit.NSArrayCompletionHandlerWrapper(completionHandler)
dim blk as new iOSBlock(AddressOf handler.handler)
loadFriendPlayersWithCompletionHandler_(self, blk.Handle)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Shared Function LocalPlayer() As GKLocalPlayer
declare function localPlayer_ lib GameKitLib selector "localPlayer" (clsRef as ptr) as ptr
Return new GKLocalPlayer(localPlayer_(ClassRef))
End Function
#tag EndMethod
#tag Method, Flags = &h0
Sub RegisterListener(listener as GKLocalPlayerListener)
declare sub registerListener_ lib GameKitLib selector "registerListener:" (obj_id as ptr, listener as ptr)
registerListener_(self, listener)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub ResolveConflictingSavedGamesWithDataCompletionHandler(conflictingSavedGames as NSArray, data as NSData, handler as NSArray)
declare sub resolveConflictingSavedGames_ lib GameKitLib selector "resolveConflictingSavedGames:withData:completionHandler:" (obj_id as ptr, conflictingSavedGames as ptr, data as ptr, handler as ptr)
resolveConflictingSavedGames_(self, conflictingSavedGames, data, handler)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub SaveGameDataWithNameCompletionHandler(data as NSData, name as CFStringRef, handler as GKSavedGame)
declare sub saveGameData_ lib GameKitLib selector "saveGameData:withName:completionHandler:" (obj_id as ptr, data as ptr, name as CFStringRef, handler as ptr)
saveGameData_(self, data, name, handler)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub SetDefaultLeaderboardIdentifierCompletionHandler(leaderboardIdentifier as CFStringRef, completionHandler as GameKit.NSErrorCompletionHandler)
declare sub setDefaultLeaderboardIdentifier_ lib GameKitLib selector "setDefaultLeaderboardIdentifier:completionHandler:" (obj_id as ptr, leaderboardIdentifier as CFStringRef, completionHandler as ptr)
dim wrapper as new GameKit.NSErrorCompletionHandlerWrapper(completionHandler)
dim blk as new iOSBlock(AddressOf wrapper.Handler)
setDefaultLeaderboardIdentifier_(self, leaderboardIdentifier, blk.Handle)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub UnregisterAllListeners()
declare sub unregisterAllListeners_ lib GameKitLib selector "unregisterAllListeners" (obj_id as ptr)
unregisterAllListeners_(self)
End Sub
#tag EndMethod
#tag Method, Flags = &h0
Sub UnregisterListener(listener as GKLocalPlayerListener)
declare sub unregisterListener_ lib GameKitLib selector "unregisterListener:" (obj_id as ptr, listener as ptr)
unregisterListener_(self, listener)
End Sub
#tag EndMethod
#tag ComputedProperty, Flags = &h0
#tag Getter
Get
declare function authenticated_ lib GameKitLib selector "isAuthenticated" (obj_id as ptr) as Boolean
Return authenticated_(self)
End Get
#tag EndGetter
authenticated As Boolean
#tag EndComputedProperty
#tag ComputedProperty, Flags = &h0
#tag Getter
Get
declare function error_ lib GameKitLib selector "error" (obj_id as ptr) as Ptr
Return new NSError(error_(self))
End Get
#tag EndGetter
#tag Setter
Set
declare sub error_ lib GameKitLib selector "setError:" (obj_id as ptr, error as ptr)
error_(self, value)
End Set
#tag EndSetter
error As NSError
#tag EndComputedProperty
#tag ComputedProperty, Flags = &h0
#tag Getter
Get
declare function underage_ lib GameKitLib selector "isUnderage" (obj_id as ptr) as Boolean
Return underage_(self)
End Get
#tag EndGetter
underage As Boolean
#tag EndComputedProperty
#tag ViewBehavior
#tag ViewProperty
Name="alias"
Visible=false
Group="Behavior"
InitialValue=""
Type="Text"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="authenticated"
Visible=false
Group="Behavior"
InitialValue=""
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="displayName"
Visible=false
Group="Behavior"
InitialValue=""
Type="Text"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Index"
Visible=true
Group="ID"
InitialValue="-2147483648"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Left"
Visible=true
Group="Position"
InitialValue="0"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Name"
Visible=true
Group="ID"
InitialValue=""
Type="String"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="playerID"
Visible=false
Group="Behavior"
InitialValue=""
Type="Text"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Super"
Visible=true
Group="ID"
InitialValue=""
Type="String"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Top"
Visible=true
Group="Position"
InitialValue="0"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="underage"
Visible=false
Group="Behavior"
InitialValue=""
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag EndViewBehavior
End Class
#tag EndClass
| Xojo | 4 | kingj5/iOSKit | Modules/GameKitFolder/GameKit/GKLocalPlayer.xojo_code | [
"MIT"
] |
{{! Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/Beef }}
/*
* This file is automatically generated; any changes will be lost.
*/
#nullable enable
#pragma warning disable
using Beef;
using Beef.Data.Database.Cdc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System;
using {{Root.NamespaceCdcPublisher}}.Data;
namespace {{Root.NamespaceCdcPublisher}}.Services
{
/// <summary>
/// Provides the <see cref="CdcHostedService"/> capabilities for database object '{{Schema}}.{{Name}}'.
/// </summary>
public partial class {{ModelName}}CdcHostedService : CdcHostedService<I{{ModelName}}CdcData>
{
/// <summary>
/// Initializes a new instance of the <see cref="{{ModelName}}CdcHostedService"/> class.
/// </summary>
/// <param name="serviceProvider">The <see cref="IServiceProvider"/>.</param>
/// <param name="config">The <see cref="IConfiguration"/>.</param>
/// <param name="logger">The <see cref="ILogger"/>.</param>
public {{ModelName}}CdcHostedService(IServiceProvider serviceProvider, ILogger<{{ModelName}}CdcHostedService> logger, IConfiguration? config = null) : base(serviceProvider, logger, config) { }
}
}
#pragma warning restore
#nullable restore | Harbour | 4 | ciaranodonnell/Beef | tools/Beef.CodeGen.Core/Templates/DbCdcHostedService_cs.hb | [
"MIT"
] |
# Copyright 2020 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The AsyncIO version of the reflection servicer."""
from typing import AsyncIterable
import grpc
from grpc_reflection.v1alpha import reflection_pb2 as _reflection_pb2
from grpc_reflection.v1alpha._base import BaseReflectionServicer
class ReflectionServicer(BaseReflectionServicer):
"""Servicer handling RPCs for service statuses."""
async def ServerReflectionInfo(
self, request_iterator: AsyncIterable[
_reflection_pb2.ServerReflectionRequest], unused_context
) -> AsyncIterable[_reflection_pb2.ServerReflectionResponse]:
async for request in request_iterator:
if request.HasField('file_by_filename'):
yield self._file_by_filename(request.file_by_filename)
elif request.HasField('file_containing_symbol'):
yield self._file_containing_symbol(
request.file_containing_symbol)
elif request.HasField('file_containing_extension'):
yield self._file_containing_extension(
request.file_containing_extension.containing_type,
request.file_containing_extension.extension_number)
elif request.HasField('all_extension_numbers_of_type'):
yield self._all_extension_numbers_of_type(
request.all_extension_numbers_of_type)
elif request.HasField('list_services'):
yield self._list_services()
else:
yield _reflection_pb2.ServerReflectionResponse(
error_response=_reflection_pb2.ErrorResponse(
error_code=grpc.StatusCode.INVALID_ARGUMENT.value[0],
error_message=grpc.StatusCode.INVALID_ARGUMENT.value[1].
encode(),
))
__all__ = [
"ReflectionServicer",
]
| Python | 5 | warlock135/grpc | src/python/grpcio_reflection/grpc_reflection/v1alpha/_async.py | [
"Apache-2.0"
] |
package com.baeldung.batch.understanding;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.Properties;
import javax.batch.operations.JobOperator;
import javax.batch.runtime.BatchRuntime;
import javax.batch.runtime.BatchStatus;
import javax.batch.runtime.JobExecution;
import javax.batch.runtime.StepExecution;
import org.junit.jupiter.api.Test;
class CustomCheckPointIntegrationTest {
@Test
public void givenChunk_whenCustomCheckPoint_thenCommitCountIsThree() throws Exception {
JobOperator jobOperator = BatchRuntime.getJobOperator();
Long executionId = jobOperator.start("customCheckPoint", new Properties());
JobExecution jobExecution = jobOperator.getJobExecution(executionId);
jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
for (StepExecution stepExecution : jobOperator.getStepExecutions(executionId)) {
if (stepExecution.getStepName()
.equals("firstChunkStep")) {
jobOperator.getStepExecutions(executionId)
.stream()
.map(BatchTestHelper::getCommitCount)
.forEach(count -> assertEquals(3L, count.longValue()));
}
}
assertEquals(jobExecution.getBatchStatus(), BatchStatus.COMPLETED);
}
}
| Java | 4 | DBatOWL/tutorials | jee-7/src/test/java/com/baeldung/batch/understanding/CustomCheckPointIntegrationTest.java | [
"MIT"
] |
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24"><g><rect fill="none" height="24" width="24"/><rect fill="none" height="24" width="24"/></g><g><path d="M20,2H4C2.9,2,2,2.9,2,4v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M20,19c0,0.55-0.45,1-1,1h-1v-1 c0-0.55-0.45-1-1-1h-1.15c0.71-0.85,1.15-1.89,1.15-3c0-1.89-1.09-2.84-1.85-3.36c-1.86-1.27-2.23-2.78-2.25-3.72 c-0.01-0.4-0.43-0.63-0.77-0.43c-5.8,3.43-5.15,7-5.13,7.51c0.03,0.96,0.49,2.07,1.24,3H7c-0.55,0-1,0.45-1,1v1H5 c-0.55,0-1-0.45-1-1V5c0-0.55,0.45-1,1-1h14c0.55,0,1,0.45,1,1V19z M13.2,13.74c-0.08-0.46-0.07-0.85,0.08-1.28 c0.54,1.21,2.15,1.64,1.98,3.18c-0.19,1.69-2.11,2.37-3.39,1.32c0.76-0.24,1.4-1.04,1.53-1.63C13.52,14.78,13.29,14.29,13.2,13.74z"/></g></svg> | SVG | 1 | good-gym/material-ui | packages/material-ui-icons/material-icons/fireplace_rounded_24px.svg | [
"MIT"
] |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
static constexpr std::wstring_view AzureClientID = L"0";
| C | 2 | hessedoneen/terminal | src/cascadia/TerminalConnection/AzureClientID.h | [
"MIT"
] |
Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Shell.IOTest do
use MixTest.Case
import ExUnit.CaptureIO
import Mix.Shell.IO
test "prints info message to stdio" do
assert capture_io(fn ->
info("hello")
end) == "hello\n"
end
test "prints error message to stderr" do
assert capture_io(:stderr, fn ->
error("hello")
end) =~ "hello"
end
test "asks the user with yes? with implicit default option" do
assert capture_io("\n", fn -> yes?("Ok?") end) == "Ok? [Yn] "
assert capture_io("\n", fn -> assert yes?("Ok?") end)
assert capture_io("Yes", fn -> assert yes?("Ok?") end)
assert capture_io("yes", fn -> assert yes?("Ok?") end)
assert capture_io("y", fn -> assert yes?("Ok?") end)
assert capture_io("n", fn -> refute yes?("Ok?") end)
assert capture_io("", fn -> refute yes?("Ok?") end)
end
test "asks the user with yes? using :yes as default option" do
assert capture_io("\n", fn -> yes?("Ok?", default: :yes) end) == "Ok? [Yn] "
assert capture_io("\n", fn -> assert yes?("Ok?", default: :yes) end)
assert capture_io("Yes", fn -> assert yes?("Ok?", default: :yes) end)
assert capture_io("yes", fn -> assert yes?("Ok?", default: :yes) end)
assert capture_io("y", fn -> assert yes?("Ok?", default: :yes) end)
assert capture_io("n", fn -> refute yes?("Ok?") end)
assert capture_io("", fn -> refute yes?("Ok?") end)
end
test "asks the user with yes? using :no as default option" do
assert capture_io("\n", fn -> yes?("Ok?", default: :no) end) == "Ok? [yN] "
assert capture_io("Yes", fn -> assert yes?("Ok?", default: :no) end)
assert capture_io("yes", fn -> assert yes?("Ok?", default: :no) end)
assert capture_io("y", fn -> assert yes?("Ok?", default: :no) end)
assert capture_io("\n", fn -> refute yes?("Ok?", default: :no) end)
assert capture_io("n", fn -> refute yes?("Ok?", default: :no) end)
assert capture_io("", fn -> refute yes?("Ok?", default: :no) end)
end
test "asks the user with yes? and raise exception where default option is not valid" do
message = "expected :default to be either :yes or :no, got: :other"
assert_raise ArgumentError, message, fn ->
capture_io("\n", fn -> yes?("Ok?", default: :other) end)
end
end
test "runs a given command" do
nl = os_newline()
assert capture_io("", fn -> assert cmd("echo hello") == 0 end) == "hello" <> nl
will_print_sample()
assert capture_io("", fn -> assert cmd("echo hello", print_app: false) == 0 end) ==
"hello" <> nl
assert capture_io("", fn -> assert cmd("echo hello") == 0 end) == "==> sample\nhello" <> nl
end
defp will_print_sample do
Mix.Project.push(nil)
Mix.Project.push(MixTest.Case.Sample)
end
end
| Elixir | 4 | doughsay/elixir | lib/mix/test/mix/shell/io_test.exs | [
"Apache-2.0"
] |
(load "/Users/smihica/code/arc-js/tools/helper-compiler/compiler.arc")
(defop arc-compiler req
(let asm (do-compile (read (alref (req 'args) "code")))
(prn "(")
(each c asm
(write c)
(prn))
(pr ")")))
(serve 8800)
| Arc | 4 | smihica/arc-js | tools/helper-compiler/compiler-server.arc | [
"Artistic-2.0"
] |
#tips-wrapper
#tips
p
span == t('.tip', email: current_user.email)
p: span <strong class='text-danger'>#{t(".spam")}</strong>
.resend-button
= link_to activation_path(@activation), :method => :put, :class => 'btn btn-primary first' do
span.fui-mail
span #{t('helpers.submit.activation.update')}
| Slim | 3 | gsmlg/peatio | app/views/activations/new.html.slim | [
"MIT"
] |
(ns wisp.wisp
"Wisp program that reads wisp code from stdin and prints
compiled javascript code into stdout"
(:require [fs :refer [createReadStream]]
[path :refer [basename dirname join resolve]]
[module :refer [Module]]
[wisp.string :refer [split join upper-case replace]]
[wisp.sequence :refer [first second last count reduce rest
conj partition assoc drop empty?]]
[wisp.repl :refer [start] :rename {start start-repl}]
[wisp.engine.node]
[wisp.runtime :refer [str subs = nil?]]
[wisp.ast :refer [pr-str name]]
[wisp.compiler :refer [compile]]))
(defn flag?
[param]
;; HACK: Workaround for segfault #6691
(identical? (subs param 0 2) (name :--)))
(defn flag->key
[flag]
(subs flag 2))
;; Just mungle all the `--param value` pairs into global *env* hash.
(defn parse-params
[params]
(loop [input params
output {}]
(if (empty? input)
output
(let [name (first input)
value (second input)]
(if (flag? name)
(if (or (nil? value) (flag? value))
(recur (rest input)
(assoc output (flag->key name) true))
(recur (drop 2 input)
(assoc output (flag->key name) value)))
(recur (rest input)
output))))))
(defn compile-stdin
[options]
(with-stream-content process.stdin
compile-string
options))
(defn compile-file
[path options]
(with-stream-content (createReadStream path)
compile-string
(conj {:source-uri path} options)))
(defn compile-string
[source options]
(let [channel (or (:print options) :code)
output (compile source options)
content (if (= channel :code)
(:code output)
(JSON.stringify (get output channel) 2 2))]
(.write process.stdout (or content "nil"))
(if (:error output) (throw (:error output)))))
(defn with-stream-content
[input resume options]
(let [content ""]
(.setEncoding input "utf8")
(.resume input)
(.on input "data" #(set! content (str content %)))
(.once input "end" (fn [] (resume content options)))))
(defn run
[path]
;; Loading module as main one, same way as nodejs does it:
;; https://github.com/joyent/node/blob/master/lib/module.js#L489-493
(Module._load (resolve path) null true))
(defn main
[]
(let [options (parse-params (drop 2 process.argv))]
(cond (not process.stdin.isTTY) (compile-stdin options)
(< (count process.argv) 3) (start-repl)
(and (= (count process.argv) 3)
(not (flag? (last process.argv)))) (run (last process.argv))
(:compile options) (compile-file (:compile options) options))))
| wisp | 5 | bamboo/wisp | src/wisp.wisp | [
"BSD-3-Clause"
] |
# Copyright 2020 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""AsyncIO version of Channelz servicer."""
from grpc.experimental import aio
from grpc_channelz.v1._servicer import \
ChannelzServicer as _SyncChannelzServicer
import grpc_channelz.v1.channelz_pb2 as _channelz_pb2
import grpc_channelz.v1.channelz_pb2_grpc as _channelz_pb2_grpc
class ChannelzServicer(_channelz_pb2_grpc.ChannelzServicer):
"""AsyncIO servicer for handling RPCs for service statuses."""
@staticmethod
async def GetTopChannels(
request: _channelz_pb2.GetTopChannelsRequest,
context: aio.ServicerContext
) -> _channelz_pb2.GetTopChannelsResponse:
return _SyncChannelzServicer.GetTopChannels(request, context)
@staticmethod
async def GetServers(
request: _channelz_pb2.GetServersRequest,
context: aio.ServicerContext) -> _channelz_pb2.GetServersResponse:
return _SyncChannelzServicer.GetServers(request, context)
@staticmethod
async def GetServer(
request: _channelz_pb2.GetServerRequest,
context: aio.ServicerContext) -> _channelz_pb2.GetServerResponse:
return _SyncChannelzServicer.GetServer(request, context)
@staticmethod
async def GetServerSockets(
request: _channelz_pb2.GetServerSocketsRequest,
context: aio.ServicerContext
) -> _channelz_pb2.GetServerSocketsResponse:
return _SyncChannelzServicer.GetServerSockets(request, context)
@staticmethod
async def GetChannel(
request: _channelz_pb2.GetChannelRequest,
context: aio.ServicerContext) -> _channelz_pb2.GetChannelResponse:
return _SyncChannelzServicer.GetChannel(request, context)
@staticmethod
async def GetSubchannel(
request: _channelz_pb2.GetSubchannelRequest,
context: aio.ServicerContext
) -> _channelz_pb2.GetSubchannelResponse:
return _SyncChannelzServicer.GetSubchannel(request, context)
@staticmethod
async def GetSocket(
request: _channelz_pb2.GetSocketRequest,
context: aio.ServicerContext) -> _channelz_pb2.GetSocketResponse:
return _SyncChannelzServicer.GetSocket(request, context)
| Python | 4 | warlock135/grpc | src/python/grpcio_channelz/grpc_channelz/v1/_async.py | [
"Apache-2.0"
] |
#pragma TextEncoding="UTF-8"
#pragma rtGlobals=3
#pragma ModuleName= SIDAMSyncAxisRange
#include "SIDAM_Sync"
#include "SIDAM_Utilities_Image"
#include "SIDAM_Utilities_Panel"
#ifndef SIDAMshowProc
#pragma hide = 1
#endif
Static StrConstant SYNCKEY = "syncaxisrange"
//@
// Synchronize the axis range of windows.
//
// ## Parameters
// syncWinList : string
// The list of windows to be synchronized. If a window(s) that is
// not synchronized, it is synchronized with the remaining windows.
// If all the windows are synchronized, stop synchronization.
//@
Function SIDAMSyncAxisRange(String syncWinList)
STRUCT paramStruct s
s.list = syncWinList
if (validate(s))
print s.errMsg
return 1
endif
String fn = "SIDAMSyncAxisRange#hook"
String data = "list:" + s.list
SIDAMSync#set(SYNCKEY, fn, data)
if (SIDAMSync#calledFromPnl())
printf "%s%s(\"%s\")\r", PRESTR_CMD, GetRTStackInfo(1), s.list
endif
return 0
End
Static Function validate(STRUCT paramStruct &s)
s.errMsg = PRESTR_CAUTION + "SIDAMSyncAxisRange gave error: "
int i, n = ItemsInList(s.list)
for (i = 0; i < n; i++)
String grfName = StringFromList(i, s.list)
if (!SIDAMWindowExists(grfName))
s.errMsg += "the window list contains a window not found."
return 1
endif
String tName = StringFromList(0, ImageNameList(grfName, ";"))
if (!strlen(tName))
tName = StringFromList(0, TraceNameList(grfName, ";", 1))
endif
if (!strlen(tName))
s.errMsg += "the window list contains an empty window."
return 1
endif
endfor
return 0
End
Static Structure paramStruct
String list
String errMsg
EndStructure
Static Function menuDo()
pnl(WinName(0,1))
End
Static Function hook(STRUCT WMWinHookStruct &s)
switch (s.eventCode)
case 0: // activate
// In case a window(s) in the list had been closed before compiling
SIDAMSync#updateList(s.winName, SYNCKEY)
break
case 2: // kill:
SIDAMSync#reset(s.winName, SYNCKEY)
break
case 8: // modified
// In case a window(s) in the list had been closed before compiling
SIDAMSync#updateList(s.winName, SYNCKEY)
STRUCT SIDAMAxisRange axis0
SIDAMGetAxis(s.winName, topName(s.winName), axis0)
STRUCT SIDAMAxisRange axis1
String win, list = SIDAMSync#getList(s.winName, SYNCKEY), fnName
int i, n = ItemsInList(list)
for (i = 0; i < n; i++)
win = StringFromList(i,list)
SIDAMGetAxis(win, topName(win), axis1)
// This is necessary to prevent a loop caused by mutual calling
if (axis0.xmin == axis1.xmin && axis0.xmax == axis1.xmax \
&& axis0.ymin == axis1.ymin && axis0.ymax == axis1.ymax)
continue
endif
fnName = SIDAMSync#pause(win, SYNCKEY)
SetAxis/W=$win $axis1.xaxis axis0.xmin, axis0.xmax
SetAxis/W=$win $axis1.yaxis axis0.ymin, axis0.ymax
SIDAMSync#resume(win, SYNCKEY, fnName)
endfor
break
case 13: // renamed
SIDAMSync#updateList(s.winName, SYNCKEY, oldName=s.oldWinName)
break
endswitch
return 0
End
// Return the name of top image, or top trace
Static Function/S topName(String grfName)
String name = StringFromList(0, ImageNameList(grfName, ";"))
if (strlen(name))
return name
else
return StringFromList(0, TraceNameList(grfName, ";", 1))
endif
End
Static Function pnl(String grfName)
NewPanel/HOST=$grfName/EXT=0/W=(0,0,282,255) as "Syncronize Axis Range"
RenameWindow $grfName#$S_name, syncaxisrange
String pnlName = grfName + "#syncaxisrange"
String dfTmp = SIDAMSync#pnlInit(pnlName, SYNCKEY)
SetWindow $pnlName hook(self)=SIDAMWindowHookClose
SetWindow $pnlName userData(dfTmp)=dfTmp
ListBox winL pos={5,12}, size={270,150}, frame=2, mode=4, win=$pnlName
ListBox winL listWave=$(dfTmp+SIDAM_WAVE_LIST), win=$pnlName
ListBox winL selWave=$(dfTmp+SIDAM_WAVE_SELECTED), win=$pnlName
ListBox winL colorWave=$(dfTmp+SIDAM_WAVE_COLOR), win=$pnlName
Button selectB title="Select / Deselect all", pos={10,172}, size={120,22}, proc=SIDAMSync#pnlButton, win=$pnlName
Titlebox selectT title="You can also select a window by clicking it.", pos={10,200}, frame=0, fColor=(21760,21760,21760), win=$pnlName
Button doB title="Do It", pos={10,228}, size={70,22}, win=$pnlName
Button doB disable=(DimSize($(dfTmp+SIDAM_WAVE_SELECTED),0)==1)*2, win=$pnlName
Button doB userData(key)=SYNCKEY, userData(fn)="SIDAMSyncAxisRange", proc=SIDAMSync#pnlButton, win=$pnlName
Button cancelB title="Cancel", pos={201,228}, size={70,22}, proc=SIDAMSync#pnlButton, win=$pnlName
ModifyControlList ControlNameList(pnlName,";","*") focusRing=0, win=$pnlName
SetActiveSubwindow $grfName
End
| IGOR Pro | 5 | yuksk/SIDAM | src/SIDAM/func/SIDAM_SyncAxisRange.ipf | [
"MIT"
] |
React = require 'react'
ReactDOM = require 'react-dom'
ComposerHeaderActions = require('../lib/composer-header-actions').default
Fields = require('../lib/fields').default
ReactTestUtils = require('react-addons-test-utils')
{Actions} = require 'nylas-exports'
describe "ComposerHeaderActions", ->
makeField = (props = {}) ->
@onShowAndFocusField = jasmine.createSpy("onShowAndFocusField")
props.onShowAndFocusField = @onShowAndFocusField
props.enabledFields ?= []
props.draftClientId = 'a'
@component = ReactTestUtils.renderIntoDocument(
<ComposerHeaderActions {...props} />
)
it "renders the 'show' buttons for 'cc', 'bcc' when participantsFocused", ->
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: true})
showCc = ReactTestUtils.findRenderedDOMComponentWithClass(@component, "show-cc")
showBcc = ReactTestUtils.findRenderedDOMComponentWithClass(@component, "show-bcc")
showSubject = ReactTestUtils.findRenderedDOMComponentWithClass(@component, "show-subject")
expect(showCc).toBeDefined()
expect(showBcc).toBeDefined()
it "does not render the 'show' buttons for 'cc', 'bcc' when participantsFocused is false", ->
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: false})
showCc = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-cc")
showBcc = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-bcc")
showSubject = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-subject")
expect(showCc.length).toBe 0
expect(showBcc.length).toBe 0
it "hides show cc if it's enabled", ->
makeField.call(@, {enabledFields: [Fields.To, Fields.Cc], participantsFocused: true})
els = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-cc")
expect(els.length).toBe 0
it "hides show bcc if it's enabled", ->
makeField.call(@, {enabledFields: [Fields.To, Fields.Bcc], participantsFocused: true})
els = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-bcc")
expect(els.length).toBe 0
it "hides show subject if it's enabled", ->
makeField.call(@, {enabledFields: [Fields.To, Fields.Subject], participantsFocused: true})
els = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-subject")
expect(els.length).toBe 0
it "renders 'popout composer' in the inline mode", ->
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: true})
els = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-popout")
expect(els.length).toBe 1
it "doesn't render 'popout composer' if in a composer window", ->
spyOn(NylasEnv, 'isComposerWindow').andReturn(true)
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: true})
els = ReactTestUtils.scryRenderedDOMComponentsWithClass(@component, "show-popout")
expect(els.length).toBe 0
it "pops out the composer when clicked", ->
spyOn(Actions, "composePopoutDraft")
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: true})
el = ReactTestUtils.findRenderedDOMComponentWithClass(@component, "show-popout")
ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(el))
expect(Actions.composePopoutDraft).toHaveBeenCalled()
it "shows and focuses cc when clicked", ->
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: true})
el = ReactTestUtils.findRenderedDOMComponentWithClass(@component, "show-cc")
ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(el))
expect(@onShowAndFocusField).toHaveBeenCalledWith Fields.Cc
it "shows and focuses bcc when clicked", ->
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: true})
el = ReactTestUtils.findRenderedDOMComponentWithClass(@component, "show-bcc")
ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(el))
expect(@onShowAndFocusField).toHaveBeenCalledWith Fields.Bcc
it "shows subject when clicked", ->
makeField.call(@, {enabledFields: [Fields.To], participantsFocused: false})
el = ReactTestUtils.findRenderedDOMComponentWithClass(@component, "show-subject")
ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(el))
expect(@onShowAndFocusField).toHaveBeenCalledWith Fields.Subject
| CoffeeScript | 4 | cnheider/nylas-mail | packages/client-app/internal_packages/composer/spec/composer-header-actions-spec.cjsx | [
"MIT"
] |
/* $NetBSD: getaddrinfo.c,v 1.82 2006/03/25 12:09:40 rpaulo Exp $ */
/* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
/*
* This is an adaptation of Android's implementation of RFC 6724
* (in Android's getaddrinfo.c). It has some cosmetic differences
* from Android's getaddrinfo.c, but Android's getaddrinfo.c was
* used as a guide or example of a way to implement the RFC 6724 spec when
* this was written.
*/
#include "address_sorting_internal.h"
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
// Scope values increase with increase in scope.
static const int kIPv6AddrScopeLinkLocal = 1;
static const int kIPv6AddrScopeSiteLocal = 2;
static const int kIPv6AddrScopeGlobal = 3;
static address_sorting_source_addr_factory* g_current_source_addr_factory =
NULL;
static bool address_sorting_get_source_addr(const address_sorting_address* dest,
address_sorting_address* source) {
return g_current_source_addr_factory->vtable->get_source_addr(
g_current_source_addr_factory, dest, source);
}
bool address_sorting_get_source_addr_for_testing(
const address_sorting_address* dest, address_sorting_address* source) {
return address_sorting_get_source_addr(dest, source);
}
static int ipv6_prefix_match_length(const struct sockaddr_in6* sa,
const struct sockaddr_in6* sb) {
unsigned char* a = (unsigned char*)&sa->sin6_addr;
unsigned char* b = (unsigned char*)&sb->sin6_addr;
int cur_bit = 0;
while (cur_bit < 128) {
int high_bit = 1 << (CHAR_BIT - 1);
int a_val = a[cur_bit / CHAR_BIT] & (high_bit >> (cur_bit % CHAR_BIT));
int b_val = b[cur_bit / CHAR_BIT] & (high_bit >> (cur_bit % CHAR_BIT));
if (a_val == b_val) {
cur_bit++;
} else {
break;
}
}
return cur_bit;
}
static int in6_is_addr_loopback(const struct in6_addr* ipv6_address) {
uint32_t* bits32 = (uint32_t*)ipv6_address;
return bits32[0] == 0 && bits32[1] == 0 && bits32[2] == 0 &&
bits32[3] == htonl(1);
}
static int in6_is_addr_v4mapped(const struct in6_addr* ipv6_address) {
uint32_t* bits32 = (uint32_t*)ipv6_address;
return bits32[0] == 0 && bits32[1] == 0 && bits32[2] == htonl(0x0000ffff);
}
static int in6_is_addr_v4compat(const struct in6_addr* ipv6_address) {
uint32_t* bits32 = (uint32_t*)ipv6_address;
return bits32[0] == 0 && bits32[1] == 0 && bits32[2] == 0 && bits32[3] != 0 &&
bits32[3] != htonl(1);
}
static int in6_is_addr_sitelocal(const struct in6_addr* ipv6_address) {
uint8_t* bytes = (uint8_t*)ipv6_address;
return bytes[0] == 0xfe && (bytes[1] & 0xc0) == 0xc0;
}
static int in6_is_addr_linklocal(const struct in6_addr* ipv6_address) {
uint8_t* bytes = (uint8_t*)ipv6_address;
return bytes[0] == 0xfe && (bytes[1] & 0xc0) == 0x80;
}
static int in6_is_addr_6to4(const struct in6_addr* ipv6_address) {
uint8_t* bytes = (uint8_t*)ipv6_address;
return bytes[0] == 0x20 && bytes[1] == 0x02;
}
static int in6_is_addr_ula(const struct in6_addr* ipv6_address) {
uint8_t* bytes = (uint8_t*)ipv6_address;
return (bytes[0] & 0xfe) == 0xfc;
}
static int in6_is_addr_teredo(const struct in6_addr* ipv6_address) {
uint8_t* bytes = (uint8_t*)ipv6_address;
return bytes[0] == 0x20 && bytes[1] == 0x01 && bytes[2] == 0x00 &&
bytes[3] == 0x00;
}
static int in6_is_addr_6bone(const struct in6_addr* ipv6_address) {
uint8_t* bytes = (uint8_t*)ipv6_address;
return bytes[0] == 0x3f && bytes[1] == 0xfe;
}
address_sorting_family address_sorting_abstract_get_family(
const address_sorting_address* address) {
switch (((struct sockaddr*)address)->sa_family) {
case AF_INET:
return ADDRESS_SORTING_AF_INET;
case AF_INET6:
return ADDRESS_SORTING_AF_INET6;
default:
return ADDRESS_SORTING_UNKNOWN_FAMILY;
}
}
static int get_label_value(const address_sorting_address* resolved_addr) {
if (address_sorting_abstract_get_family(resolved_addr) ==
ADDRESS_SORTING_AF_INET) {
return 4;
} else if (address_sorting_abstract_get_family(resolved_addr) !=
ADDRESS_SORTING_AF_INET6) {
return 1;
}
struct sockaddr_in6* ipv6_addr = (struct sockaddr_in6*)&resolved_addr->addr;
if (in6_is_addr_loopback(&ipv6_addr->sin6_addr)) {
return 0;
} else if (in6_is_addr_v4mapped(&ipv6_addr->sin6_addr)) {
return 4;
} else if (in6_is_addr_6to4(&ipv6_addr->sin6_addr)) {
return 2;
} else if (in6_is_addr_teredo(&ipv6_addr->sin6_addr)) {
return 5;
} else if (in6_is_addr_ula(&ipv6_addr->sin6_addr)) {
return 13;
} else if (in6_is_addr_v4compat(&ipv6_addr->sin6_addr)) {
return 3;
} else if (in6_is_addr_sitelocal(&ipv6_addr->sin6_addr)) {
return 11;
} else if (in6_is_addr_6bone(&ipv6_addr->sin6_addr)) {
return 12;
}
return 1;
}
static int get_precedence_value(const address_sorting_address* resolved_addr) {
if (address_sorting_abstract_get_family(resolved_addr) ==
ADDRESS_SORTING_AF_INET) {
return 35;
} else if (address_sorting_abstract_get_family(resolved_addr) !=
ADDRESS_SORTING_AF_INET6) {
return 1;
}
struct sockaddr_in6* ipv6_addr = (struct sockaddr_in6*)&resolved_addr->addr;
if (in6_is_addr_loopback(&ipv6_addr->sin6_addr)) {
return 50;
} else if (in6_is_addr_v4mapped(&ipv6_addr->sin6_addr)) {
return 35;
} else if (in6_is_addr_6to4(&ipv6_addr->sin6_addr)) {
return 30;
} else if (in6_is_addr_teredo(&ipv6_addr->sin6_addr)) {
return 5;
} else if (in6_is_addr_ula(&ipv6_addr->sin6_addr)) {
return 3;
} else if (in6_is_addr_v4compat(&ipv6_addr->sin6_addr) ||
in6_is_addr_sitelocal(&ipv6_addr->sin6_addr) ||
in6_is_addr_6bone(&ipv6_addr->sin6_addr)) {
return 1;
}
return 40;
}
static int sockaddr_get_scope(const address_sorting_address* resolved_addr) {
if (address_sorting_abstract_get_family(resolved_addr) ==
ADDRESS_SORTING_AF_INET) {
return kIPv6AddrScopeGlobal;
} else if (address_sorting_abstract_get_family(resolved_addr) ==
ADDRESS_SORTING_AF_INET6) {
struct sockaddr_in6* ipv6_addr = (struct sockaddr_in6*)&resolved_addr->addr;
if (in6_is_addr_loopback(&ipv6_addr->sin6_addr) ||
in6_is_addr_linklocal(&ipv6_addr->sin6_addr)) {
return kIPv6AddrScopeLinkLocal;
}
if (in6_is_addr_sitelocal(&ipv6_addr->sin6_addr)) {
return kIPv6AddrScopeSiteLocal;
}
return kIPv6AddrScopeGlobal;
}
return 0;
}
static int compare_source_addr_exists(const address_sorting_sortable* first,
const address_sorting_sortable* second) {
if (first->source_addr_exists != second->source_addr_exists) {
return first->source_addr_exists ? -1 : 1;
}
return 0;
}
static int compare_source_dest_scope_matches(
const address_sorting_sortable* first,
const address_sorting_sortable* second) {
bool first_src_dst_scope_matches = false;
if (sockaddr_get_scope(&first->dest_addr) ==
sockaddr_get_scope(&first->source_addr)) {
first_src_dst_scope_matches = true;
}
bool second_src_dst_scope_matches = false;
if (sockaddr_get_scope(&second->dest_addr) ==
sockaddr_get_scope(&second->source_addr)) {
second_src_dst_scope_matches = true;
}
if (first_src_dst_scope_matches != second_src_dst_scope_matches) {
return first_src_dst_scope_matches ? -1 : 1;
}
return 0;
}
static int compare_source_dest_labels_match(
const address_sorting_sortable* first,
const address_sorting_sortable* second) {
bool first_label_matches = false;
if (get_label_value(&first->dest_addr) ==
get_label_value(&first->source_addr)) {
first_label_matches = true;
}
bool second_label_matches = false;
if (get_label_value(&second->dest_addr) ==
get_label_value(&second->source_addr)) {
second_label_matches = true;
}
if (first_label_matches != second_label_matches) {
return first_label_matches ? -1 : 1;
}
return 0;
}
static int compare_dest_precedence(const address_sorting_sortable* first,
const address_sorting_sortable* second) {
return get_precedence_value(&second->dest_addr) -
get_precedence_value(&first->dest_addr);
}
static int compare_dest_scope(const address_sorting_sortable* first,
const address_sorting_sortable* second) {
return sockaddr_get_scope(&first->dest_addr) -
sockaddr_get_scope(&second->dest_addr);
}
static int compare_source_dest_prefix_match_lengths(
const address_sorting_sortable* first,
const address_sorting_sortable* second) {
if (first->source_addr_exists &&
address_sorting_abstract_get_family(&first->source_addr) ==
ADDRESS_SORTING_AF_INET6 &&
second->source_addr_exists &&
address_sorting_abstract_get_family(&second->source_addr) ==
ADDRESS_SORTING_AF_INET6) {
int first_match_length =
ipv6_prefix_match_length((struct sockaddr_in6*)&first->source_addr.addr,
(struct sockaddr_in6*)&first->dest_addr.addr);
int second_match_length = ipv6_prefix_match_length(
(struct sockaddr_in6*)&second->source_addr.addr,
(struct sockaddr_in6*)&second->dest_addr.addr);
return second_match_length - first_match_length;
}
return 0;
}
static int rfc_6724_compare(const void* a, const void* b) {
const address_sorting_sortable* first = (address_sorting_sortable*)a;
const address_sorting_sortable* second = (address_sorting_sortable*)b;
int out = 0;
if ((out = compare_source_addr_exists(first, second))) {
return out;
}
if ((out = compare_source_dest_scope_matches(first, second))) {
return out;
}
if ((out = compare_source_dest_labels_match(first, second))) {
return out;
}
// TODO: Implement rule 3; avoid deprecated addresses.
// TODO: Implement rule 4; avoid temporary addresses.
if ((out = compare_dest_precedence(first, second))) {
return out;
}
// TODO: Implement rule 7; prefer native transports.
if ((out = compare_dest_scope(first, second))) {
return out;
}
if ((out = compare_source_dest_prefix_match_lengths(first, second))) {
return out;
}
// Prefer that the sort be stable otherwise
return (int)(first->original_index - second->original_index);
}
void address_sorting_override_source_addr_factory_for_testing(
address_sorting_source_addr_factory* factory) {
if (g_current_source_addr_factory == NULL) {
abort();
}
g_current_source_addr_factory->vtable->destroy(g_current_source_addr_factory);
g_current_source_addr_factory = factory;
}
static void sanity_check_private_fields_are_unused(
const address_sorting_sortable* sortable) {
address_sorting_address expected_source_addr;
memset(&expected_source_addr, 0, sizeof(expected_source_addr));
if (memcmp(&expected_source_addr, &sortable->source_addr,
sizeof(address_sorting_address)) ||
sortable->original_index || sortable->source_addr_exists) {
abort();
}
}
void address_sorting_rfc_6724_sort(address_sorting_sortable* sortables,
size_t sortables_len) {
for (size_t i = 0; i < sortables_len; i++) {
sanity_check_private_fields_are_unused(&sortables[i]);
sortables[i].original_index = i;
sortables[i].source_addr_exists = address_sorting_get_source_addr(
&sortables[i].dest_addr, &sortables[i].source_addr);
}
qsort(sortables, sortables_len, sizeof(address_sorting_sortable),
rfc_6724_compare);
}
void address_sorting_init() {
if (g_current_source_addr_factory != NULL) {
abort();
}
g_current_source_addr_factory =
address_sorting_create_source_addr_factory_for_current_platform();
}
void address_sorting_shutdown() {
if (g_current_source_addr_factory == NULL) {
abort();
}
g_current_source_addr_factory->vtable->destroy(g_current_source_addr_factory);
g_current_source_addr_factory = NULL;
}
| C | 4 | samotarnik/grpc | third_party/address_sorting/address_sorting.c | [
"Apache-2.0"
] |
# a demonstration of the 'edo' (equal division of the octave) ugen
# this example uses 22edo
# top line
'seq' '7 11 9 11 7 16 7 20 \
25 23 25 20 17 20 14 11' gen_vals
# bass line
'bass_pitch' '-37 -37 -15 -15 -19 -15 -24 \
-37 -37 -15 -15 -28 -24' gen_vals
'bass_amp' '1 0 .7 0 0 0 1 0 .7 0 0 0 0 0 1 1 0 1\
1 0 .7 0 0 0 1 0 .7 0 0 0 0 1 0 1' gen_vals
######################
# top line synthesis #
######################
# triangle wave
3 metro 0 'seq' tseq
22 edo 0.1 tri
# dup and add delay
dup 0.6 0.175 delay 0.5 *
# mix with itself
+
#######################
# bass line synthesis #
#######################
# bass pitch
360 '++--++----++-3[+]\
++--++---3[+]-3[+]' prop
0 'bass_pitch' tseq
22 edo 0.01 port
# bass amp
360 '2(++++)++ 2(++++)++ ++++ +3[+]\
2(++++)++ 2(++++)++ +3[+] +3[+]' prop
0 'bass_amp' tseq 0.2 * saw
1000 0.1 moogladder
+
| SourcePawn | 4 | brandenbyers/Sporth | examples/edo.sp | [
"MIT"
] |
/* We need access to debugger hooks */
#ifndef DEBUGGING
# define DEBUGGING
#endif
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
extern regexp* my_regcomp (pTHX_ char* exp, char* xend, PMOP* pm);
extern I32 my_regexec (pTHX_ regexp* prog, char* stringarg, char* strend,
char* strbeg, I32 minend, SV* screamer,
void* data, U32 flags);
extern void my_regfree (pTHX_ struct regexp* r);
extern char* my_re_intuit_start (pTHX_ regexp *prog, SV *sv, char *strpos,
char *strend, U32 flags,
struct re_scream_pos_data_s *data);
extern SV* my_re_intuit_string (pTHX_ regexp *prog);
static int oldfl;
#define R_DB 512
static void
deinstall(pTHX)
{
PL_regexecp = Perl_regexec_flags;
PL_regcompp = Perl_pregcomp;
PL_regint_start = Perl_re_intuit_start;
PL_regint_string = Perl_re_intuit_string;
PL_regfree = Perl_pregfree;
if (!oldfl)
PL_debug &= ~R_DB;
}
static void
install(pTHX)
{
PL_colorset = 0; /* Allow reinspection of ENV. */
PL_regexecp = &my_regexec;
PL_regcompp = &my_regcomp;
PL_regint_start = &my_re_intuit_start;
PL_regint_string = &my_re_intuit_string;
PL_regfree = &my_regfree;
oldfl = PL_debug & R_DB;
PL_debug |= R_DB;
}
MODULE = re PACKAGE = re
void
install()
CODE:
install(aTHX);
void
deinstall()
CODE:
deinstall(aTHX);
| XS | 3 | tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective | perl/ext/re/re.xs | [
"Apache-1.1"
] |
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="iso8859-1"/>
<xsl:template match="TEST">
<html>
<head>
<title>document.URL</title>
</head>
<body>
<script>
if (window.testRunner)
testRunner.dumpAsText();
if (document.URL.length > 0)
document.write("<p>Success</p>");
else
document.write("<p>Failure, document.URL is empty.</p>");
</script>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
| XSLT | 2 | zealoussnow/chromium | third_party/blink/web_tests/fast/xsl/xslt-url.xsl | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] |
global function CodeCallback_MapInit
void function CodeCallback_MapInit()
{
SetupLiveFireMaps()
// worker drone model
PrecacheModel( $"models/robots/aerial_unmanned_worker/aerial_unmanned_worker.mdl" )
// note: this map has no marvin spawns, have to spawn them using idle nodes
AddSpawnCallback_ScriptName( "worker_drone_spawn", DeckSpawnWorkerDrone )
AddSpawnCallback_ScriptName( "marvin_idle_node", DeckSpawnMarvinForIdleNode )
}
void function DeckSpawnWorkerDrone( entity spawnpoint )
{
entity drone = CreateWorkerDrone( TEAM_UNASSIGNED, spawnpoint.GetOrigin(), spawnpoint.GetAngles() )
DispatchSpawn( drone )
}
void function DeckSpawnMarvinForIdleNode( entity node )
{
entity marvin = CreateMarvin( TEAM_UNASSIGNED, node.GetOrigin(), node.GetAngles() )
DispatchSpawn( marvin )
// doing this because no ai rn
if ( GetAINScriptVersion() == -1 )
thread PlayAnim( marvin, node.kv.leveled_animation )
} | Squirrel | 4 | GeckoEidechse/NorthstarMods | Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut | [
"MIT"
] |
{
version: '1.0.0',
componentsMap: [
{
devMode: 'lowcode',
componentName: 'Slot',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Button',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'Button',
},
{
package: '@alife/mc-assets-1935',
version: '0.1.42',
exportName: 'AliAutoDiv',
main: 'build/lowcode/index.js',
destructuring: true,
subName: 'default',
componentName: 'AliAutoDivDefault',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Typography',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
subName: 'Text',
componentName: 'Typography.Text',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Typography',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
subName: 'Link',
componentName: 'Typography.Link',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Modal',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'Modal',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Select',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'Select',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Form',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
subName: 'Item',
componentName: 'Form.Item',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Input',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'Input',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Form',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'Form',
},
{
package: '@alife/container',
version: '0.3.7',
exportName: 'P',
main: 'lib/index.js',
destructuring: true,
subName: '',
componentName: 'NextP',
},
{
package: '@alife/container',
version: '0.3.7',
exportName: 'Block',
main: 'lib/index.js',
destructuring: true,
subName: 'Cell',
componentName: 'NextBlockCell',
},
{
package: '@alife/container',
version: '0.3.7',
exportName: 'Block',
main: 'lib/index.js',
destructuring: true,
subName: '',
componentName: 'NextBlock',
},
{
package: '@alife/mc-assets-1935',
version: '0.1.42',
exportName: 'AliAutoSearchTable',
main: 'build/lowcode/index.js',
destructuring: true,
subName: 'default',
componentName: 'AliAutoSearchTableDefault',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'ConfigProvider',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'ConfigProvider',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Empty',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'Empty',
},
{
package: '@alife/container',
version: '0.3.7',
exportName: 'Page',
main: 'lib/index.js',
destructuring: true,
subName: '',
componentName: 'NextPage',
},
{
devMode: 'lowcode',
componentName: 'Page',
},
{
package: '@alilc/antd-lowcode-materials',
version: '0.9.4',
exportName: 'Tooltip',
main: 'dist/antd-lowcode.esm.js',
destructuring: true,
componentName: 'Tooltip',
},
],
componentsTree: [
{
componentName: 'Page',
id: 'node_dockcviv8fo1',
props: {
ref: 'outterView',
style: {
height: '100%',
},
},
fileName: 'test',
dataSource: {
list: [],
},
css: 'body {\n font-size: 12px;\n}\n\n.botton {\n width: 100px;\n color: #ff00ff\n}',
lifeCycles: {
constructor: {
type: 'JSFunction',
value: "function() {\n this.__jp__init();\n this.statusDesc = {\n 0: '失败',\n 1: '成功',\n 2: '构建中',\n 3: '构建超时',\n };\n this.pageParams = {};\n }",
},
componentDidMount: {
type: 'JSFunction',
value: "function() {\n this.$ds.resolve('PROJECTS', {\n params: {\n size: 5000,\n },\n });\n // if (this.state.init === false) {\n // this.setState({\n // init: true,\n // });\n // }\n }",
},
componentDidUpdate: {
type: 'JSFunction',
value: 'function(prevProps, prevState, snapshot) {}',
},
componentWillUnmount: {
type: 'JSFunction',
value: 'function() {}',
},
},
methods: {
__jp__init: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
__jp__initRouter: {
type: 'JSFunction',
value: 'function() {\n if (window.arsenal) {\n this.$router = new window.jianpin.ArsenalRouter({\n app: this.props.microApp,\n });\n } else {\n this.$router = new window.jianpin.ArsenalRouter();\n }\n}',
},
__jp__initDataSource: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
__jp__initEnv: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
__jp__initConfig: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
__jp__initUtils: {
type: 'JSFunction',
value: 'function() {\n this.$utils = {\n message: window.jianpin.utils.message,\n axios: window.jianpin.utils.axios,\n moment: window.jianpin.utils.moment,\n };\n}',
},
fetchPkgs: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
onPageChange: {
type: 'JSFunction',
value: 'function(pageIndex, pageSize) {\n this.pageParams = {\n pageIndex,\n pageSize,\n };\n this.fetchPkgs();\n }',
},
renderTime: {
type: 'JSFunction',
value: "function(time) {\n return this.$utils.moment(time).format('YYYY-MM-DD HH:mm');\n }",
},
renderUserName: {
type: 'JSFunction',
value: 'function(user) {\n return user.user_name;\n }',
},
reload: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
handleResult: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
handleDetail: {
type: 'JSFunction',
value: 'function() {\n // 跳转详情页面 TODO\n }',
},
onResultCancel: {
type: 'JSFunction',
value: 'function() {\n this.setState({\n resultVisible: false,\n });\n }',
},
formatResult: {
type: 'JSFunction',
value: "function(item) {\n if (!item) {\n return '暂无结果';\n }\n const { channel, plat, version, status } = item;\n return [channel, plat, version, status].join('-');\n }",
},
handleDownload: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
onFinish: {
type: 'JSFunction',
value: 'function() { /*...*/ }',
},
},
state: {
pkgs: [],
total: 0,
isSearch: false,
projects: [],
results: [],
resultVisible: false,
},
children: [
{
componentName: 'Modal',
id: 'node_ocksh9yppxb',
props: {
title: '查看结果',
visible: {
type: 'JSExpression',
value: 'this.state.resultVisible',
},
footer: {
type: 'JSSlot',
value: [
{
componentName: 'Button',
id: 'node_ocksh9yppxf',
props: {
type: 'primary',
children: '确定',
__events: {
eventDataList: [
{
type: 'componentEvent',
name: 'onClick',
relatedEventName: 'onResultCancel',
},
],
eventList: [
{
name: 'onClick',
disabled: true,
},
],
},
onClick: {
type: 'JSFunction',
value: 'function(){this.onResultCancel.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
},
},
],
},
__events: {
eventDataList: [
{
type: 'componentEvent',
name: 'onCancel',
relatedEventName: 'onResultCancel',
},
],
eventList: [
{
name: 'onCancel',
disabled: true,
},
{
name: 'onOk',
disabled: false,
},
],
},
onCancel: {
type: 'JSFunction',
value: 'function(){this.onResultCancel.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
width: '720px',
centered: true,
},
hidden: true,
children: [
{
componentName: 'AliAutoDivDefault',
id: 'node_ockshazuxa4',
props: {
style: {
width: '100%',
},
},
loop: {
type: 'JSExpression',
value: 'this.state.results',
},
children: [
{
componentName: 'AliAutoDivDefault',
id: 'node_ockshazuxai',
props: {
style: {
width: '100%',
textAlign: 'left',
marginBottom: '10px',
},
},
condition: {
type: 'JSExpression',
value: 'this.state.results && this.state.results.length > 0',
},
children: [
{
componentName: 'Button',
id: 'node_ockshazuxah',
props: {
type: 'primary',
children: '下载全部',
size: 'small',
__events: {
eventDataList: [
{
type: 'componentEvent',
name: 'onClick',
relatedEventName: 'handleDownload',
},
],
eventList: [
{
name: 'onClick',
disabled: true,
},
],
},
onClick: {
type: 'JSFunction',
value: 'function(){this.handleDownload.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
},
},
],
},
{
componentName: 'Typography.Text',
id: 'node_ockshazuxa5',
props: {
children: {
type: 'JSExpression',
value: 'this.formatResult(this.item)',
},
},
},
{
componentName: 'Typography.Link',
id: 'node_ockshazuxa6',
props: {
href: {
type: 'JSExpression',
value: 'this.item.download_link',
},
target: '_blank',
children: ' - 点击下载',
},
condition: {
type: 'JSExpression',
value: 'this.item.download_link',
},
},
{
componentName: 'Typography.Link',
id: 'node_ockshazuxa7',
props: {
href: {
type: 'JSExpression',
value: 'this.item.release_notes',
},
target: '_blank',
children: ' - 跳转发布节点',
},
condition: {
type: 'JSExpression',
value: 'this.item.release_notes',
},
},
],
},
],
},
{
componentName: 'NextPage',
id: 'node_ocko19zplh1',
props: {
columns: 12,
headerDivider: true,
placeholderStyle: {
gridRowEnd: 'span 1',
gridColumnEnd: 'span 12',
},
placeholder: '页面主体内容:拖拽Block布局组件到这里',
header: {
type: 'JSSlot',
title: 'header',
},
headerProps: {
background: 'surface',
},
footer: {
type: 'JSSlot',
title: 'footer',
},
minHeight: '100vh',
},
title: '页面',
children: [
{
componentName: 'NextBlock',
id: 'node_ocko19zplh2',
props: {
prefix: 'next-',
placeholderStyle: {
height: '100%',
},
noPadding: false,
noBorder: false,
background: 'surface',
layoutmode: 'O',
colSpan: 12,
rowSpan: 1,
childTotalColumns: 12,
},
title: '区块',
children: [
{
componentName: 'NextBlockCell',
id: 'node_ocko19zplh3',
props: {
title: '',
prefix: 'next-',
placeholderStyle: {
height: '100%',
},
layoutmode: 'O',
childTotalColumns: 12,
isAutoContainer: true,
colSpan: 12,
rowSpan: 1,
},
children: [
{
componentName: 'NextP',
id: 'node_ocks8dtt1ms',
props: {
wrap: false,
type: 'body2',
verAlign: 'middle',
textSpacing: true,
align: 'left',
full: true,
flex: true,
},
title: '段落',
children: [
{
componentName: 'Form',
id: 'node_ocks8dtt1mt',
props: {
labelCol: {
span: 10,
},
wrapperCol: {
span: 14,
},
onFinish: {
type: 'JSFunction',
value: 'function(){this.onFinish.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
name: 'basic',
layout: 'inline',
__events: {
eventDataList: [
{
type: 'componentEvent',
name: 'onFinish',
relatedEventName: 'onFinish',
},
],
eventList: [
{
name: 'onFinish',
disabled: true,
},
{
name: 'onFinishFailed',
disabled: false,
},
{
name: 'onFieldsChange',
disabled: false,
},
{
name: 'onValuesChange',
disabled: false,
},
],
},
},
children: [
{
componentName: 'Form.Item',
id: 'node_ocks8dtt1mz',
props: {
label: '项目名称/渠道号',
name: 'channel_id',
},
children: [
{
componentName: 'Select',
id: 'node_ocksfuhwhsd',
props: {
style: {
width: '280px',
},
options: {
type: 'JSExpression',
value: 'this.state.projects',
},
showArrow: true,
tokenSeparators: [],
showSearch: true,
},
},
],
},
{
componentName: 'Form.Item',
id: 'node_ocks8dtt1m12',
props: {
label: '版本号',
name: 'buildId',
},
children: [
{
componentName: 'Input',
id: 'node_ocksfuhwhs3',
props: {
placeholder: '请输入',
style: {
width: '280px',
},
size: 'middle',
},
},
],
},
{
componentName: 'Form.Item',
id: 'node_ocks8dtt1m18',
props: {
label: '构建人',
name: 'user_id',
},
children: [
{
componentName: 'Select',
id: 'node_ocksfuhwhsi',
props: {
style: {
width: 200,
},
options: [
{
label: 'A',
value: 'A',
},
{
label: 'B',
value: 'B',
},
{
label: 'C',
value: 'C',
},
],
showSearch: true,
},
},
],
},
{
componentName: 'Form.Item',
id: 'node_ocks8dtt1m19',
props: {
label: 'ID',
name: 'id',
},
children: [
{
componentName: 'Input',
id: 'node_ocksfuhwhs8',
props: {
placeholder: '请输入',
style: {
width: '160px',
},
},
},
],
},
{
componentName: 'Form.Item',
id: 'node_ocks8dtt1mw',
props: {
wrapperCol: {
offset: 6,
},
},
children: [
{
componentName: 'Button',
id: 'node_ocks8dtt1mx',
props: {
type: 'primary',
children: '查询',
htmlType: 'submit',
},
},
],
},
],
},
],
},
],
},
],
},
{
componentName: 'NextBlock',
id: 'node_ockshc4ifn1b',
props: {
childTotalColumns: 12,
},
title: '区块',
children: [
{
componentName: 'NextBlockCell',
id: 'node_ockshc4ifn1c',
props: {
isAutoContainer: true,
colSpan: 12,
rowSpan: 1,
},
title: '子区块',
children: [
{
componentName: 'NextP',
id: 'node_ockshc4ifn1d',
props: {
wrap: false,
type: 'body2',
verAlign: 'middle',
textSpacing: true,
align: 'left',
flex: true,
},
title: '段落',
children: [
{
componentName: 'ConfigProvider',
id: 'node_ockshc4ifn1e',
props: {
locale: 'zh-CN',
},
children: [
{
componentName: 'AliAutoSearchTableDefault',
id: 'node_ocksfuhwhsx',
props: {
rowKey: 'key',
dataSource: {
type: 'JSExpression',
value: 'this.state.pkgs',
},
columns: [
{
title: 'ID',
dataIndex: 'id',
key: 'name',
width: 80,
},
{
title: '渠道号',
dataIndex: 'channels',
key: 'age',
width: 142,
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Typography.Text',
id: 'node_ocksh2bq0428',
props: {
children: {
type: 'JSExpression',
value: 'this.item',
},
style: {
display: 'block',
},
},
loop: {
type: 'JSExpression',
value: "this.text.split(',')",
},
},
],
},
},
{
title: '版本号',
dataIndex: 'dic_version',
key: 'address',
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Tooltip',
id: 'node_ocksso4xavj',
props: {
title: {
type: 'JSSlot',
value: [
{
componentName: 'Typography.Text',
id: 'node_ocksso4xavn',
props: {
children: {
type: 'JSExpression',
value: "this.item. channelId + ' / ' + this.item.version",
},
style: {
display: 'block',
color: '#FFFFFF',
},
},
loop: {
type: 'JSExpression',
value: 'this.text || []',
},
},
],
},
},
children: [
{
componentName: 'Typography.Text',
id: 'node_ocksso4xavm',
props: {
children: {
type: 'JSExpression',
value: 'this.text[0].version',
},
},
},
],
},
],
},
width: 120,
},
{
title: '构建Job',
dataIndex: 'job_name',
width: 180,
},
{
title: '构建类型',
dataIndex: 'packaging_type',
width: 94,
},
{
title: '构建状态',
dataIndex: 'status',
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Typography.Text',
id: 'node_ocksh3jkxzw',
props: {
children: {
type: 'JSExpression',
value: 'this.statusDesc[this.text]',
},
},
},
{
componentName: 'Icon',
id: 'node_ocksh3jkxzx',
props: {
type: 'SyncOutlined',
size: 16,
spin: true,
style: {
marginLeft: '10px',
},
},
condition: {
type: 'JSExpression',
value: 'this.text === 2',
},
},
],
},
width: 100,
},
{
title: '构建时间',
dataIndex: 'start_time',
render: {
type: 'JSFunction',
value: 'function(){ return this.renderTime.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
width: 148,
},
{
title: '构建人',
dataIndex: 'user',
render: {
type: 'JSFunction',
value: 'function(){ return this.renderUserName.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
width: 80,
},
{
title: 'Jenkins 链接',
dataIndex: 'jenkins_link',
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Typography.Link',
id: 'node_ocksh64kbx21',
props: {
href: {
type: 'JSExpression',
value: 'this.text',
},
target: '_blank',
children: '查看',
},
condition: {
type: 'JSExpression',
value: 'this.text',
},
},
{
componentName: 'Typography.Text',
id: 'node_ocksh64kbx22',
props: {
children: '暂无',
},
condition: {
type: 'JSExpression',
value: '!this.text',
},
},
],
},
width: 120,
},
{
title: '测试平台链接',
dataIndex: 'is_run_testing',
width: 120,
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Typography.Link',
id: 'node_ocksh3jkxz3e',
props: {
href: 'http://rivermap.alibaba.net/dashboard/testExecute',
target: '_blank',
children: '查看',
},
condition: {
type: 'JSExpression',
value: 'this.text',
},
},
{
componentName: 'Typography.Text',
id: 'node_ocksh3jkxz3f',
props: {
children: '暂无',
},
condition: {
type: 'JSExpression',
value: '!this.text',
},
},
],
},
},
{
title: '触发源',
dataIndex: 'source',
width: 120,
},
{
title: '详情',
dataIndex: 'id',
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Button',
id: 'node_ocksh8yryw7',
props: {
type: 'link',
children: '查看',
size: 'small',
style: {
padding: '0px',
},
__events: {
eventDataList: [
{
type: 'componentEvent',
name: 'onClick',
relatedEventName: 'handleDetail',
},
],
eventList: [
{
name: 'onClick',
disabled: true,
},
],
},
onClick: {
type: 'JSFunction',
value: 'function(){this.handleDetail.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
},
},
],
},
width: 80,
fixed: 'right',
},
{
title: '结果',
dataIndex: 'id',
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Button',
id: 'node_ocksh9v6jw7',
props: {
type: 'link',
children: '查看',
size: 'small',
style: {
padding: '0px',
},
__events: {
eventDataList: [
{
type: 'componentEvent',
name: 'onClick',
relatedEventName: 'handleResult',
paramStr: 'this.text',
},
],
eventList: [
{
name: 'onClick',
disabled: true,
},
],
},
onClick: {
type: 'JSFunction',
value: 'function(){this.handleResult.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
ghost: false,
href: {
type: 'JSExpression',
value: 'this.text',
},
},
},
],
},
width: 80,
fixed: 'right',
},
{
title: '重新执行',
dataIndex: 'id',
width: 92,
render: {
type: 'JSSlot',
params: ['text', 'record', 'index'],
value: [
{
componentName: 'Button',
id: 'node_ocksh96rad1g',
props: {
type: 'text',
children: '',
icon: {
type: 'JSSlot',
value: [
{
componentName: 'Icon',
id: 'node_ocksh96rad1j',
props: {
type: 'ReloadOutlined',
size: 14,
color: '#0593d3',
style: {
padding: '3px',
border: '1px solid #0593d3',
borderRadius: '14px',
cursor: 'pointer',
height: '22px',
},
spin: false,
},
},
],
},
shape: 'circle',
__events: {
eventDataList: [
{
type: 'componentEvent',
name: 'onClick',
relatedEventName: 'reload',
},
],
eventList: [
{
name: 'onClick',
disabled: true,
},
],
},
onClick: {
type: 'JSFunction',
value: 'function(){this.reload.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
},
},
],
},
fixed: 'right',
},
],
actions: [],
pagination: {
total: {
type: 'JSExpression',
value: 'this.state.total',
},
defaultPageSize: 8,
onPageChange: {
type: 'JSFunction',
value: 'function(){ return this.onPageChange.apply(this,Array.prototype.slice.call(arguments).concat([])) }',
},
},
scrollX: 1200,
},
condition: {
type: 'JSExpression',
value: '!this.state.isSearch || (this.state.isSearch && this.state.pkgs.length > 0)',
},
},
],
},
],
},
],
},
],
},
{
componentName: 'NextBlock',
id: 'node_ocksk6f8fa3b',
props: {
childTotalColumns: 12,
},
title: '区块',
children: [
{
componentName: 'NextBlockCell',
id: 'node_ocksk6f8fa3c',
props: {
isAutoContainer: true,
colSpan: 12,
rowSpan: 1,
},
title: '子区块',
children: [
{
componentName: 'NextP',
id: 'node_ocksk6f8fa3d',
props: {
wrap: false,
type: 'body2',
verAlign: 'middle',
textSpacing: true,
align: 'left',
flex: true,
},
title: '段落',
children: [
{
componentName: 'Empty',
id: 'node_ocksk6f8fa3e',
props: {
description: '暂无数据',
},
condition: {
type: 'JSExpression',
value: 'this.state.pkgs.length < 1 && this.state.isSearch',
},
},
],
},
],
},
],
},
],
},
],
},
],
i18n: {},
}
| JSON5 | 3 | raymondtm/lowcode-engine | modules/code-generator/test-cases/react-app/demo_10-jsslot/schema.json5 | [
"MIT"
] |
Integer>>euclidSub: secondNumber
"Euclidean algorithm with subtraction"
| a b |
a := self abs.
b := secondNumber abs.
[ a == b ] whileFalse: [
a > b ifTrue: [
a := a - b.
] ifFalse: [
b := b - a.
].
].
^a.
Integer>>euclidMod: secondNumber
"Euclidean algorithm with modulus."
| a b oldB |
a := self abs.
b := secondNumber abs.
[ b == 0 ] whileFalse: [
oldB := b.
b := a % b.
a := oldB.
].
^a.
Transcript show: ((64 * 67) euclidSub: (64 * 81)).
Transcript cr.
Transcript show: ((128 * 12) euclidMod: (128 * 77)).
| Smalltalk | 4 | atocil/algorithm-archive | contents/euclidean_algorithm/code/smalltalk/euclid.st | [
"MIT"
] |
package com.baeldung.prevent.commandline.application.runner.execution;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@Service
public class TaskService {
private static Logger logger = LoggerFactory.getLogger(TaskService.class);
public void execute(String task) {
logger.info("do " + task);
}
}
| Java | 4 | DBatOWL/tutorials | spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/prevent/commandline/application/runner/execution/TaskService.java | [
"MIT"
] |
// Coding Train
// http://thecodingtrain.com
// Poisson Disc Sampling: https://youtu.be/flQgnCUxHl
// Processing port by Max: https://github.com/TheLastDestroyer
float r = 4;
int k = 30;
PVector[] grid;
float w = r / sqrt(2);
ArrayList<PVector> active;
int cols, rows;
ArrayList<PVector> ordered;
void setup() {
size(400, 400);
background(0);
strokeWeight(4);
colorMode(HSB);
// STEP 0
cols = floor(width / w);
rows = floor(height / w);
grid = new PVector[cols*rows];
active = new ArrayList<PVector>();
ordered = new ArrayList<PVector>();
for (int i = 0; i < cols * rows; i++) {
grid[i] = null;
}
// STEP 1
float x = width / 2;
float y = height / 2;
int i = floor(x / w);
int j = floor(y / w);
PVector pos = new PVector(x, y);
grid[i + j * cols] = pos;
active.add(pos);
println(active);
//frameRate(1);
}
void draw() {
background(0);
//noLoop();
for (int total = 0; total < 25; total++) {
if (active.size() > 0) {
int randIndex = floor(random(active.size()));
PVector pos = active.get(randIndex);
boolean found = false;
for (int n = 0; n < k; n++) {
PVector sample = PVector.random2D();
float m = random(r, 2 * r);
sample.setMag(m);
sample.add(pos);
int col = floor(sample.x / w);
int row = floor(sample.y / w);
//println(col, row, cols, rows, grid[col + row * cols]);
if (col > -1 && row > -1 && col < cols && row < rows && grid[col + row * cols] == null) {
boolean ok = true;
for (int i = -1; i <= 1; i++) {
for (int j = -1; j <= 1; j++) {
int index = (col + i) + (row + j) * cols;
PVector neighbor = grid[index];
if (neighbor != null) {
float d = PVector.dist(sample, neighbor);
if (d < r) {
ok = false;
}
}
}
}
if (ok) {
found = true;
grid[col + row * cols] = sample;
active.add(sample);
ordered.add(sample);
// Should we break?
break;
}
}
}
if (!found) {
//active.remove(randIndex);
}
}
}
for (int i = 0; i < ordered.size(); i++) {
stroke(i % 360, 100, 100);
strokeWeight(r * 0.5);
point(ordered.get(i).x, ordered.get(i).y);
}
//println(active);
// for (var i = 0; i < active.length; i++) {
// stroke(255, 0, 255);
// strokeWeight(1);
// point(active[i].x, active[i].y);
// }
//console.log(active.length);
}
| Processing | 5 | aerinkayne/website | CodingChallenges/CC_033_poisson_disc/Processing/CC_033_poisson_disc/CC_033_poisson_disc.pde | [
"MIT"
] |
LOCATION = "location"
OFFSET = "offset"
BINDING = "binding"
INDEX = "index"
SET = "set"
BUILTIN = "builtin"
INPUT_ATTACHMENT_INDEX = "input_attachment_index"
ORIGIN_UPPER_LEFT = "origin_upper_left"
OVERRIDE_COVERAGE = "override_coverage"
BLEND_SUPPORT_ALL_EQUATIONS = "blend_support_all_equations"
BLEND_SUPPORT_MULTIPLY = "blend_support_multiply"
BLEND_SUPPORT_SCREEN = "blend_support_screen"
BLEND_SUPPORT_OVERLAY = "blend_support_overlay"
BLEND_SUPPORT_DARKEN = "blend_support_darken"
BLEND_SUPPORT_LIGHTEN = "blend_support_lighten"
BLEND_SUPPORT_COLORDODGE = "blend_support_colordodge"
BLEND_SUPPORT_COLORBURN = "blend_support_colorburn"
BLEND_SUPPORT_HARDLIGHT = "blend_support_hardlight"
BLEND_SUPPORT_SOFTLIGHT = "blend_support_softlight"
BLEND_SUPPORT_DIFFERENCE = "blend_support_difference"
BLEND_SUPPORT_EXCLUSION = "blend_support_exclusion"
BLEND_SUPPORT_HSL_HUE = "blend_support_hsl_hue"
BLEND_SUPPORT_HSL_SATURATION = "blend_support_hsl_saturation"
BLEND_SUPPORT_HSL_COLOR = "blend_support_hsl_color"
BLEND_SUPPORT_HSL_LUMINOSITY = "blend_support_hsl_luminosity"
PUSH_CONSTANT = "push_constant"
POINTS = "points"
LINES = "lines"
LINE_STRIP = "line_strip"
LINES_ADJACENCY = "lines_adjacency"
TRIANGLES = "triangles"
TRIANGLE_STRIP = "triangle_strip"
TRIANGLES_ADJACENCY = "triangles_adjacency"
MAX_VERTICES = "max_vertices"
INVOCATIONS = "invocations"
WHEN = "when"
KEY = "key"
CTYPE = "ctype"
INVALID = .
| Lex | 4 | despairblue/esy-skia | src/sksl/lex/layout.lex | [
"BSD-3-Clause"
] |
// run-pass
// Test that we can coerce an `@Object` to an `&Object`
trait Foo {
fn foo(&self) -> usize;
fn bar(&mut self) -> usize;
}
impl Foo for usize {
fn foo(&self) -> usize {
*self
}
fn bar(&mut self) -> usize {
*self += 1;
*self
}
}
fn do_it_mut(obj: &mut dyn Foo) {
let x = obj.bar();
let y = obj.foo();
assert_eq!(x, y);
do_it_imm(obj, y);
}
fn do_it_imm(obj: &dyn Foo, v: usize) {
let y = obj.foo();
assert_eq!(v, y);
}
pub fn main() {
let mut x: usize = 22;
let obj = &mut x as &mut dyn Foo;
do_it_mut(obj);
do_it_imm(obj, 23);
do_it_mut(obj);
}
| Rust | 4 | Eric-Arellano/rust | src/test/ui/objects-coerce-freeze-borrored.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
set "DRIVER_DOWNLOAD_LINK=https://s3.amazonaws.com/ossci-windows/452.39-data-center-tesla-desktop-win10-64bit-international.exe"
curl --retry 3 -kL %DRIVER_DOWNLOAD_LINK% --output 452.39-data-center-tesla-desktop-win10-64bit-international.exe
if errorlevel 1 exit /b 1
start /wait 452.39-data-center-tesla-desktop-win10-64bit-international.exe -s -noreboot
if errorlevel 1 exit /b 1
del 452.39-data-center-tesla-desktop-win10-64bit-international.exe || ver > NUL
| Batchfile | 3 | Hacky-DH/pytorch | .circleci/scripts/driver_update.bat | [
"Intel"
] |
implementation module Builtin.ABC
import _SystemArray
import StdList
import StdMisc
import Text
import Cloogle.API
import Cloogle.DB
builtin_abc_instructions :: [ABCInstructionEntry]
builtin_abc_instructions =
[ i_create
: arith_instructions ++
stack_operations ++
branches ++
miscellaneous ++
directives ++
[{zero & aie_instruction=i} \\ i <- other_instructions]
]
instance zero ABCInstructionEntry
where
zero =
{ aie_instruction = undef
, aie_arguments = []
, aie_description = "There is no documentation for this ABC instruction yet."
}
LABEL :== ABCArgument ABCTypeLabel False
LABEL_ :== ABCArgument ABCTypeLabel True
A_OFFSET :== ABCArgument ABCTypeAStackOffset False
B_OFFSET :== ABCArgument ABCTypeBStackOffset False
STRING :== ABCArgument ABCTypeString False
STRING_ :== ABCArgument ABCTypeString True
BOOL :== ABCArgument ABCTypeBool False
BOOL_ :== ABCArgument ABCTypeBool True
CHAR :== ABCArgument ABCTypeChar False
CHAR_ :== ABCArgument ABCTypeChar True
INT :== ABCArgument ABCTypeInt False
INT_ :== ABCArgument ABCTypeInt True
REAL :== ABCArgument ABCTypeReal False
REAL_ :== ABCArgument ABCTypeReal True
i_create :: ABCInstructionEntry
i_create =
{ zero
& aie_instruction = "create"
, aie_description = "Creates a new empty node and pushes its address to the A-stack."
}
arith_instructions :: [ABCInstructionEntry]
arith_instructions =
[ arith1 "absR" "Real" "absolute value"
, arith1 "acosR" "Real" "arccosine"
, arith1 "asinR" "Real" "arcsine"
, arith1 "atanR" "Real" "arctangent"
, arith1 "cosR" "Real" "cosine"
, arith1 "entierR" "Real" "(Int) entier (floor)"
, arith1 "expR" "Real" "exponential function (e^r)"
, arith1 "lnR" "Real" "natural logarithm"
, arith1 "log10R" "Real" "base-10 logarithm"
, arith1 "notB" "Bool" "logical negation"
, arith1 "sinR" "Real" "sine"
, arith1 "sqrtR" "Real" "square root"
, arith1 "tanR" "Real" "tangent"
, op1 "decI" "Int" "Decrements"
, op1 "incI" "Int" "Increments"
, op1 "negI" "Int" "Negates"
, op1 "negR" "Real" "Negates"
, op1 "not%" "Int" "Bitwise negates"
, op2 "addI" "Int" "Sums"
, op2 "addR" "Real" "Sums"
, op2 "andB" "Bool" "Logically conjuncts"
, op2 "and%" "Int" "Bitwise conjuncts"
, op2 "divI" "Int" "Divides"
, op2 "divR" "Real" "Divides"
, op2 "eqB" "Bool" "Checks equality on"
, op2 "eqC" "Char" "Checks equality on"
, op2 "eqI" "Int" "Checks equality on"
, op2 "eqR" "Real" "Checks equality on"
, i_eqAC_a
, op2 "gtC" "Char" "Checks greater-than on"
, op2 "gtI" "Int" "Checks greater-than on"
, op2 "gtR" "Real" "Checks greater-than on"
, op2 "ltC" "Char" "Checks less-than on"
, op2 "ltI" "Int" "Checks less-than on"
, op2 "ltR" "Real" "Checks less-than on"
, op2 "mulI" "Int" "Multiplies"
, op2 "mulR" "Real" "Multiplies"
, op2 "orB" "Bool" "Logically disjuncts"
, op2 "or%" "Int" "Bitwise disjuncts"
, op2 "powR" "Real" "Raises to the power on"
, op2 "remI" "Int" "Computes the remainder after division of"
, op2 "rotl%" "Int" "Bitwise left-rotate on"
, op2 "rotr%" "Int" "Bitwise right-rotate on"
, op2 "shiftl%" "Int" "Bitwise left-shift on"
, op2 "shiftr%" "Int" "Bitwise right-shift on"
, op2 "subI" "Int" "Subtracts"
, op2 "subR" "Real" "Subtracts"
, op2 "xor%" "Int" "Bitwise XOR on"
, eq_arg "Bool" BOOL 'A'
, eq_arg "Bool" BOOL 'B'
, eq_arg "Char" CHAR 'A'
, eq_arg "Char" CHAR 'B'
, eq_arg "Int" INT 'A'
, eq_arg "Int" INT 'B'
, eq_arg "Real" REAL 'A'
, eq_arg "Real" REAL 'B'
, convert "CtoI" "Char" "Int"
, convert "CtoAC" "Char" "String"
, convert "ItoC" "Int" "Char"
, convert "ItoR" "Int" "Real"
, convert "RtoI" "Real" "Int"
]
where
arith1 :: !String !String !String -> ABCInstructionEntry
arith1 instr type description =
{ zero
& aie_instruction = instr
, aie_description = "Computes the " + description + " of the " + type + " on top of the B-stack."
}
op1 :: !String !String !String -> ABCInstructionEntry
op1 instr type description =
{ zero
& aie_instruction = instr
, aie_description = description + " the " + type + " on top of the B-stack."
}
op2 :: !String !String !String -> ABCInstructionEntry
op2 instr type description =
{ zero
& aie_instruction = instr
, aie_description = description + " the two " + type + "s on top of the B-stack."
}
eq_arg :: !String !ABCArgument !Char -> ABCInstructionEntry
eq_arg type arg stack =
{ zero
& aie_instruction = {'e','q',type.[0],'_',toLower stack}
, aie_arguments = [arg, if (stack == 'A') A_OFFSET B_OFFSET]
, aie_description = "Checks equality between the first argument and the " + {stack} + "-stack element."
}
convert :: !String !String !String -> ABCInstructionEntry
convert instr fr to =
{ zero
& aie_instruction = instr
, aie_description = "Converts the " + fr + " on top of the B-stack to " + to + "."
}
i_eqAC_a =
{ zero
& aie_instruction = "eqAC_a"
, aie_arguments = [STRING]
, aie_description = "Checks that the string on top of the A-stack equals the argument string."
}
stack_operations :: [ABCInstructionEntry]
stack_operations =
[ push "Bool" BOOL
, push "Char" CHAR
, push "Int" INT
, push "Real" REAL
, push_a "Bool"
, push_a "Char"
, push_a "Int"
, push_a "Real"
, build "Bool" BOOL
, build "Char" CHAR
, build "Int" INT
, build "Real" REAL
, i_buildAC
, build_b "Bool"
, build_b "Char"
, build_b "Int"
, build_b "Real"
, i_create_array
, i_create_array_
, i_eq_desc
, i_eq_desc_b
, i_eq_nulldesc
, i_pop_a
, i_pop_b
, i_push_a
, i_push_b
, i_push_a_b
]
where
push :: !String !ABCArgument -> ABCInstructionEntry
push type arg =
{ zero
& aie_instruction = "push" + {type.[0]}
, aie_arguments = [arg]
, aie_description = "Pushes the " + type + " argument to the B-stack."
}
push_a :: !String -> ABCInstructionEntry
push_a type =
{ zero
& aie_instruction = "push" + {type.[0]} + "_a"
, aie_arguments = [INT]
, aie_description = "Pushes the " + type + " from the nth position on the A-stack to the B-stack."
}
build :: !String !ABCArgument -> ABCInstructionEntry
build type arg =
{ zero
& aie_instruction = "build" + {type.[0]}
, aie_arguments = [arg]
, aie_description = "Builds a " + type + "-node with the argument as value on the A-stack."
}
build_b :: !String -> ABCInstructionEntry
build_b type =
{ zero
& aie_instruction = "build" + {type.[0]} + "_b"
, aie_arguments = [INT]
, aie_description = "Builds a " + type + "-node with the value on the nth position of the B-stack on the A-stack."
}
i_buildAC =
{ zero
& aie_instruction = "buildAC"
, aie_arguments = [STRING]
, aie_description = "Pushes the argument string to the A-stack."
}
i_create_array =
{ zero
& aie_instruction = "create_array"
, aie_arguments = [LABEL, A_OFFSET, B_OFFSET]
, aie_description = join " "
[ "Creates an array on the A-stack."
, "The elements have type `label` (which can be `_` for any A-stack type)."
, "The last two arguments indicate the stack sizes of the elements."
, "The size and initial value are popped from the B and A stacks."
]
}
i_create_array_ =
{ zero
& aie_instruction = "create_array_"
, aie_arguments = [LABEL, A_OFFSET, B_OFFSET]
, aie_description = join " "
[ "Creates an array on the A-stack."
, "The elements have type `label` (which can be `_` for any A-stack type)."
, "The last two arguments indicate the stack sizes of the elements."
, "The size is popped from the B-stack; the elements are initialised as `_Nil` regardless of the type."
]
}
i_eq_desc =
{ zero
& aie_instruction = "eq_desc"
, aie_arguments = [LABEL, INT, A_OFFSET]
, aie_description = join " "
[ "Checks that the indicated node on the A-stack matches the descriptor given by the label."
, "The `int` argument is the arity of the descriptor."
]
}
i_eq_desc_b =
{ zero
& aie_instruction = "eq_desc_b"
, aie_arguments = [LABEL, A_OFFSET]
, aie_description = join " "
[ "The indicated node on the A-stack is assumed to be an array."
, "The instruction checks that the array is of the type indicated by `label`."
]
}
i_eq_nulldesc =
{ zero
& aie_instruction = "eq_nulldesc"
, aie_arguments = [LABEL, A_OFFSET]
, aie_description = "Checks that the indicated node on the A-stack matches the descriptor given by the label, ignoring arity."
}
i_pop_a =
{ zero
& aie_instruction = "pop_a"
, aie_arguments = [A_OFFSET]
, aie_description = "Pops elements off the A-stack until the referenced element."
}
i_pop_b =
{ zero
& aie_instruction = "pop_b"
, aie_arguments = [B_OFFSET]
, aie_description = "Pops elements off the B-stack until the referenced element."
}
i_push_a =
{ zero
& aie_instruction = "push_a"
, aie_arguments = [A_OFFSET]
, aie_description = "Pushes the referenced A-stack element on the A-stack."
}
i_push_b =
{ zero
& aie_instruction = "push_b"
, aie_arguments = [B_OFFSET]
, aie_description = "Pushes the referenced B-stack element on the B-stack."
}
i_push_a_b =
{ zero
& aie_instruction = "push_a_b"
, aie_arguments = [A_OFFSET, B_OFFSET]
, aie_description = "Pushes the A-stack element as an integer (i.e., a pointer to the heap) on the B-stack."
}
branches :: [ABCInstructionEntry]
branches =
[ i_jmp
, i_jmp_false
, i_jmp_true
, i_jsr
, i_jsr_eval
, i_rtn
]
where
i_jmp =
{ zero
& aie_instruction = "jmp"
, aie_arguments = [LABEL]
, aie_description = "Unconditional jump to a label."
}
i_jmp_false =
{ zero
& aie_instruction = "jmp_false"
, aie_arguments = [LABEL]
, aie_description = "Jump to a label if the Bool on top of the B-stack is false."
}
i_jmp_true =
{ zero
& aie_instruction = "jmp_true"
, aie_arguments = [LABEL]
, aie_description = "Jump to a label if the Bool on top of the B-stack is true."
}
i_jsr =
{ zero
& aie_instruction = "jsr"
, aie_arguments = [LABEL]
, aie_description = "Subroutine jump to a label. {{`rtn`}} returns to the instruction after this `jsr`."
}
i_jsr_eval =
{ zero
& aie_instruction = "jsr_eval"
, aie_arguments = [A_OFFSET, LABEL]
, aie_description = "Subroutine jump to evaluate the indicated A-stack element. {{`rtn`}} returns to the instruction after this `jsr_eval`."
}
i_rtn =
{ zero
& aie_instruction = "rtn"
, aie_description = "Returns from a subroutine call (e.g. {{`jsr`}})."
}
miscellaneous :: [ABCInstructionEntry]
miscellaneous =
[ i_ccall
, i_centry
, i_get_node_arity
, i_halt
, i_instruction
, i_load_i
, i_load_si16
, i_load_si32
, i_load_ui8
, i_no_op
, i_push_r_arg_t
, i_push_t_r_a
, i_push_t_r_args
]
where
i_ccall =
{ zero
& aie_instruction = "ccall"
, aie_arguments = [LABEL, STRING]
, aie_description = join "\n"
[ "Calls a C function."
, "Some of this is documented in https://svn.cs.ru.nl/repos/clean-tools/trunk/htoclean/CallingCFromClean.html."
, "The first argument is the name of the function, the second is the signature."
, "\n"
, "The signature has to be of the form `flags?input?sep output(sep state)?`, where"
, " - `sep` can be either `-` or `:`."
, " - `flags` can be `G` and/or `P`. `G` saves the state in global variables and is needed when the called C function will call Clean functions. `P` lets the callee pop arguments (necessary on 32-bit Windows)."
, " - `input` is a number of input argument types (allowed: `IpRrSsAOF`; see below)."
, " - `output` is a number of output argument types (allowed: `VIpRrSsAOF`; see below)."
, " - `state` is a carried state that is not passed to the C function, for example used to thread {{`World`}} in ccalls (allowed: `IpRSA`)."
, "\n"
, "Input, output and state argument types can be:"
, " - `I` for integers"
, " - `p` for pointers (e.g. from {{`System.Pointer`}}; on most systems this is identical to `I`)"
, " - [`Rr`] for reals"
, " - `S` for Clean Strings (`{#Char}`). If used as input type this passes a pointer to the string's length (number of characters). The actual array is at offset 4/8 (32/64 bit). If this is used as output type, the C function has to return a pointer to the string's length, followed by the actual string. A copy of the string will be created in the Clean heap, and this copy will be used by Clean. If the string was allocated in C, for example using malloc, it should be deallocated in C when it is no longer used."
, " - `s` for the characters of a Clean String (handy to use in conjuction with {{`packString`}}, as the string is not null-terminated). The length (number of characters) is at offset -4/-8. (32/64 bit)."
, " - `A` for A-stack elements. A pointer to the third block of the node is passed. For arrays, this is a pointer to the elements. One word higher is the element type. The size of the array is two words higher."
, " - [`OF`] for function pointers"
, " - `V` for `void`, packs the following argument types in a tuple (e.g. `VIR` means `(Int, Real)`)"
]
}
i_centry =
{ zero
& aie_instruction = "centry"
, aie_arguments = [LABEL, LABEL, STRING]
, aie_description = join "\n"
[ "Adds code to call a Clean function from C."
, "Usually it is not needed to write this instruction yourself."
, "It is generated with the `foreign export` construct.\n"
, "The first label is the name of the C function to generate."
, "The second label is the Clean function to link it to.\n"
, "The string argument indicates the type."
, "For more information, see {{`ccall`}}."
]
}
i_get_node_arity =
{ zero
& aie_instruction = "get_node_arity"
, aie_arguments = [A_OFFSET]
, aie_description = "Pushes the arity of the descriptor of the referenced A-stack element to the B-stack."
}
i_halt =
{ zero
& aie_instruction = "halt"
, aie_description = "Terminates the program immediately."
}
i_instruction =
{ zero
& aie_instruction = "instruction"
, aie_arguments = [INT]
, aie_description = "Adds the raw argument as a word in the generated object file."
}
i_load_i =
{ zero
& aie_instruction = "load_i"
, aie_arguments = [INT]
, aie_description = join "\n\n"
[ "Take the top of the B-stack as a pointer and read an integer from that pointer with the argument as offset."
, "See also {{`load_si16`}}, {{`load_si32`}}, {{`load_ui8`}}."
]
}
i_load_si16 =
{ zero
& aie_instruction = "load_si16"
, aie_arguments = [INT]
, aie_description = join "\n\n"
[ "Take the top of the B-stack as a pointer and read a 16-bit signed integer from that pointer with the argument as offset."
, "See also {{`load_i}}, {{`load_si32`}}, {{`load_ui8`}}."
]
}
i_load_si32 =
{ zero
& aie_instruction = "load_si32"
, aie_arguments = [INT]
, aie_description = join "\n\n"
[ "Take the top of the B-stack as a pointer and read a 32-bit signed integer from that pointer with the argument as offset."
, "This instruction is only available on 64-bit systems. On 32-bit systems, {{`load_i`}} has the same effect."
, "See also {{`load_i`}}, {{`load_si16`}}, {{`load_ui8`}}."
]
}
i_load_ui8 =
{ zero
& aie_instruction = "load_ui8"
, aie_arguments = [INT]
, aie_description = join "\n\n"
[ "Take the top of the B-stack as a pointer and read a 8-bit unsigned integer from that pointer with the argument as offset."
, "See also {{`load_i`}}, {{`load_si16`}}, {{`load_si32`}}."
]
}
i_no_op =
{ zero
& aie_instruction = "no_op"
, aie_description = join "\n"
[ "Do nothing. This is for example useful in the `cast` function:\n"
, "```clean"
, "cast :: .a -> .b"
, "cast _ = code {"
, "\tno_op"
, "}"
, "```"
]
}
i_push_r_arg_t =
{ zero
& aie_instruction = "push_r_arg_t"
, aie_description = join " "
[ "Gets the *n*th element from the type string of a record."
, "The type string is on top of the B-stack; *n* below that."
]
}
i_push_t_r_a =
{ zero
& aie_instruction = "push_t_r_a"
, aie_arguments = [A_OFFSET]
, aie_description = "Push the address of the type string of the referenced record to the B-stack."
}
i_push_t_r_args =
{ zero
& aie_instruction = "push_t_r_args"
, aie_description = "Pops a record from the A-stack, pushes its members in reversed order to both of the stacks, then pushes the address of the type string to the B-stack."
}
directives :: [ABCInstructionEntry]
directives =
[ d_d
, d_n
, d_nu
, d_o
, d_export
, d_inline
, d_module
, d_depend
, d_end
, d_endinfo
, d_start
]
where
d_d =
{ zero
& aie_instruction = ".d"
, aie_arguments = [A_OFFSET, B_OFFSET, STRING_]
, aie_description = concat
[ "Indicates how many stack elements are on the stack when a jump follows."
, "The first integer is the number of elements on the A-stack; the second that of B-stack elements."
, "The optional third argument indicates the type of the B-stack elements, e.g. `bbi` for two booleans and an integer."
]
}
d_n =
{ zero
& aie_instruction = ".n"
, aie_arguments = [A_OFFSET, LABEL]
, aie_description = concat
[ "Indicates the arity of node entry labels."
, "The label is the label of the corresponding descriptor, or `_` if it does not exist."
, "\n\nThere are some special cases:\n\n"
, "- An arity of `-1` is for tuple selectors;\n"
, "- An arity of `-2` is for indirection nodes;\n"
, "- An arity of `-3` is for record selectors of basic types;\n"
, "- An arity of `-4` is for record selectors of non-basic types.\n\n"
, "See also {{`.nu`}}."
]
}
d_nu =
{ zero
& aie_instruction = ".nu"
, aie_arguments = [A_OFFSET, B_OFFSET, LABEL]
, aie_description = concat
[ "Indicates the arity of node entry labels with arguments on the B-stack (otherwise, {{`.n`}} is used)."
, "The first integer is the number of A-stack arguments; the second the number of B-stack arguments."
, "The label is the label of the corresponding descriptor, or `_` if it does not exist."
]
}
d_o =
{ zero
& aie_instruction = ".o"
, aie_arguments = [A_OFFSET, B_OFFSET, STRING_]
, aie_description = concat
[ "Indicates how many stack elements are 'given back' to a calling function when a {{`rtn`}} follows."
, "The first integer is the number of elements on the A-stack; the second that of B-stack elements."
, "The optional third argument indicates the type of the B-stack elements, e.g. `bbi` for two booleans and an integer."
]
}
d_export =
{ zero
& aie_instruction = ".export"
, aie_arguments = [LABEL]
, aie_description = "Exports a label (allows linking)."
}
d_inline =
{ zero
& aie_instruction = ".inline"
, aie_arguments = [LABEL]
, aie_description = "Indicates that a label can (should) be inlined (usually for performance reasons)."
}
d_module =
{ zero
& aie_instruction = ".module"
, aie_arguments = [LABEL, STRING]
, aie_description = "Indicates the name of the module, and its label in the data segment."
}
d_depend =
{ zero
& aie_instruction = ".depend"
, aie_arguments = [STRING]
, aie_description = "Indicates a module that this module depends on."
}
d_end =
{ zero
& aie_instruction = ".end"
, aie_description = "Indicates the end of the ABC file."
}
d_endinfo =
{ zero
& aie_instruction = ".endinfo"
, aie_description = "Indicates the end of the metadata in the ABC file."
}
d_start =
{ zero
& aie_instruction = ".start"
, aie_arguments = [LABEL]
, aie_description = "Indicates the label to start execution at."
}
/**
* Instructions without documentation yet
*/
other_instructions :: [String]
other_instructions =
[ "add_args"
, "addLU"
, "build"
, "buildF_b"
, "buildh"
, "build_r"
, "build_u"
, "catS"
, "call"
, "cmpS"
, "ceilingR"
, "copy_graph"
, "code_channelP"
, "create_channel"
, "currentP"
, "del_args"
, "divLU"
, "divU"
, "eqD_b"
, "eq_symbol"
, "exit_false"
, "fill"
, "fill1"
, "fill2"
, "fill3"
, "fill1_r"
, "fill2_r"
, "fill3_r"
, "fillcaf"
, "fillcp"
, "fillcp_u"
, "fill_u"
, "fillh"
, "fillB"
, "fillB_b"
, "fillC"
, "fillC_b"
, "fillF_b"
, "fillI"
, "fillI_b"
, "fillR"
, "fillR_b"
, "fill_a"
, "fill_r"
, "floordivI"
, "getWL"
, "get_desc_arity"
, "get_desc_flags_b"
, "get_desc0_number"
, "gtU"
, "in"
, "is_record"
, "ItoP"
, "jmp_ap"
, "jmp_ap_upd"
, "jmp_upd"
, "jmp_eval"
, "jmp_eval_upd"
, "jmp_not_eqZ"
, "jrsr"
, "jsr_ap"
, "ltU"
, "modI"
, "mulUUL"
, "new_ext_reducer"
, "new_int_reducer"
, "newP"
, "out"
, "print"
, "printD"
, "print_char"
, "print_int"
, "print_real"
, "print_r_arg"
, "print_sc"
, "print_symbol"
, "print_symbol_sc"
, "pushcaf"
, "push_finalizers"
, "pushA_a"
, "pushD"
, "pushD_a"
, "pushF_a"
, "pushL"
, "pushLc"
, "pushzs"
, "push_arg"
, "push_arg_b"
, "push_args"
, "push_args_u"
, "push_array"
, "push_arraysize"
, "push_b_a"
, "push_node"
, "push_node_u"
, "push_a_r_args"
, "push_r_args"
, "push_r_args_a"
, "push_r_args_b"
, "push_r_args_u"
, "push_r_arg_D"
, "push_r_arg_u"
, "push_wl_args"
, "pushZ"
, "pushZR"
, "putWL"
, "randomP"
, "release"
, "remU"
, "replace"
, "repl_arg"
, "repl_args"
, "repl_args_b"
, "repl_r_args"
, "repl_r_args_a"
, "select"
, "send_graph"
, "send_request"
, "set_continue"
, "set_defer"
, "set_entry"
, "set_finalizers"
, "setwait"
, "shiftrU"
, "sincosR"
, "sliceS"
, "stop_reducer"
, "subLU"
, "addIo"
, "mulIo"
, "subIo"
, "suspend"
, "testcaf"
, "truncateR"
, "update_a"
, "updatepop_a"
, "update_b"
, "updatepop_b"
, "updateS"
, "update"
, ".algtype"
, ".caf"
, ".code"
, ".comp"
, ".a"
, ".desc"
, ".desc0"
, ".descn"
, ".descexp"
, ".descs"
, ".keep"
, ".impdesc"
, ".implab"
, ".implib"
, ".impmod"
, ".impobj"
, ".newlocallabel"
, ".n_string"
, ".pb"
, ".pd"
, ".pe"
, ".pl"
, ".pld"
, ".pn"
, ".pt"
, ".record"
, ".string"
]
| Clean | 5 | clean-cloogle/Cloogle | backend/Builtin/ABC.icl | [
"MIT"
] |
/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Implementation of this file has been influenced by Zend Diactoros
* @link https://github.com/zendframework/zend-diactoros
* @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md
*/
namespace Phalcon\Http\Message;
use Phalcon\Helper\Number;
use Phalcon\Http\Message\AbstractMessage;
use Phalcon\Http\Message\Exception\InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;
/**
* PSR-7 Response
*/
final class Response extends AbstractMessage implements ResponseInterface, ResponseStatusCodeInterface
{
/**
* Gets the response reason phrase associated with the status code.
*
* Because a reason phrase is not a required element in a response
* status line, the reason phrase value MAY be empty. Implementations MAY
* choose to return the default RFC 7231 recommended reason phrase (or
* those
* listed in the IANA HTTP Status Code Registry) for the response's
* status code.
*
* @see http://tools.ietf.org/html/rfc7231#section-6
* @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
*
* @var string
*/
protected reasonPhrase = "" { get };
/**
* Gets the response status code.
*
* The status code is a 3-digit integer result code of the server's attempt
* to understand and satisfy the request.
*
* @var int
*/
protected statusCode = 200 { get };
/**
* Response constructor.
*
* @param string $body
* @param int $code
* @param array $headers
*/
public function __construct(var body = "php://memory", int code = 200, array headers = [])
{
this->processCode(code);
let this->headers = this->processHeaders(headers),
this->body = this->processBody(body, "w+b");
}
/**
* Return an instance with the specified status code and, optionally,
* reason phrase.
*
* If no reason phrase is specified, implementations MAY choose to default
* to the RFC 7231 or IANA recommended reason phrase for the response's
* status code.
*
* This method MUST be implemented in such a way as to retain the
* immutability of the message, and MUST return an instance that has the
* updated status and reason phrase.
*
* @see http://tools.ietf.org/html/rfc7231#section-6
* @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
*
* @param int $code
* @param string $reasonPhrase
*
* @return Response
*/
public function withStatus(var code, var reasonPhrase = "") -> <Response>
{
var newInstance;
let newInstance = clone this;
newInstance->processCode(code, reasonPhrase);
return newInstance;
}
/**
* Returns the list of status codes available
*/
protected function getPhrases() -> array
{
return [
// Informational 1xx
self::STATUS_CONTINUE : "Continue", // Information - RFC 7231, 6.2.1
self::STATUS_SWITCHING_PROTOCOLS : "Switching Protocols", // Information - RFC 7231, 6.2.2
self::STATUS_PROCESSING : "Processing", // Information - RFC 2518, 10.1
self::STATUS_EARLY_HINTS : "Early Hints",
// Successful 2xx
self::STATUS_OK : "OK", // Success - RFC 7231, 6.3.1
self::STATUS_CREATED : "Created", // Success - RFC 7231, 6.3.2
self::STATUS_ACCEPTED : "Accepted", // Success - RFC 7231, 6.3.3
self::STATUS_NON_AUTHORITATIVE_INFORMATION : "Non-Authoritative Information", // Success - RFC 7231, 6.3.4
self::STATUS_NO_CONTENT : "No Content", // Success - RFC 7231, 6.3.5
self::STATUS_RESET_CONTENT : "Reset Content", // Success - RFC 7231, 6.3.6
self::STATUS_PARTIAL_CONTENT : "Partial Content", // Success - RFC 7233, 4.1
self::STATUS_MULTI_STATUS : "Multi-status", // Success - RFC 4918, 11.1
self::STATUS_ALREADY_REPORTED : "Already Reported", // Success - RFC 5842, 7.1
self::STATUS_IM_USED : "IM Used", // Success - RFC 3229, 10.4.1
// Redirection 3xx
self::STATUS_MULTIPLE_CHOICES : "Multiple Choices", // Redirection - RFC 7231, 6.4.1
self::STATUS_MOVED_PERMANENTLY : "Moved Permanently", // Redirection - RFC 7231, 6.4.2
self::STATUS_FOUND : "Found", // Redirection - RFC 7231, 6.4.3
self::STATUS_SEE_OTHER : "See Other", // Redirection - RFC 7231, 6.4.4
self::STATUS_NOT_MODIFIED : "Not Modified", // Redirection - RFC 7232, 4.1
self::STATUS_USE_PROXY : "Use Proxy", // Redirection - RFC 7231, 6.4.5
self::STATUS_RESERVED : "Switch Proxy", // Redirection - RFC 7231, 6.4.6 (Deprecated)
self::STATUS_TEMPORARY_REDIRECT : "Temporary Redirect", // Redirection - RFC 7231, 6.4.7
self::STATUS_PERMANENT_REDIRECT : "Permanent Redirect", // Redirection - RFC 7538, 3
// Client Errors 4xx
self::STATUS_BAD_REQUEST : "Bad Request", // Client Error - RFC 7231, 6.5.1
self::STATUS_UNAUTHORIZED : "Unauthorized", // Client Error - RFC 7235, 3.1
self::STATUS_PAYMENT_REQUIRED : "Payment Required", // Client Error - RFC 7231, 6.5.2
self::STATUS_FORBIDDEN : "Forbidden", // Client Error - RFC 7231, 6.5.3
self::STATUS_NOT_FOUND : "Not Found", // Client Error - RFC 7231, 6.5.4
self::STATUS_METHOD_NOT_ALLOWED : "Method Not Allowed", // Client Error - RFC 7231, 6.5.5
self::STATUS_NOT_ACCEPTABLE : "Not Acceptable", // Client Error - RFC 7231, 6.5.6
self::STATUS_PROXY_AUTHENTICATION_REQUIRED : "Proxy Authentication Required", // Client Error - RFC 7235, 3.2
self::STATUS_REQUEST_TIMEOUT : "Request Time-out", // Client Error - RFC 7231, 6.5.7
self::STATUS_CONFLICT : "Conflict", // Client Error - RFC 7231, 6.5.8
self::STATUS_GONE : "Gone", // Client Error - RFC 7231, 6.5.9
self::STATUS_LENGTH_REQUIRED : "Length Required", // Client Error - RFC 7231, 6.5.10
self::STATUS_PRECONDITION_FAILED : "Precondition Failed", // Client Error - RFC 7232, 4.2
self::STATUS_PAYLOAD_TOO_LARGE : "Request Entity Too Large", // Client Error - RFC 7231, 6.5.11
self::STATUS_URI_TOO_LONG : "Request-URI Too Large", // Client Error - RFC 7231, 6.5.12
self::STATUS_UNSUPPORTED_MEDIA_TYPE : "Unsupported Media Type", // Client Error - RFC 7231, 6.5.13
self::STATUS_RANGE_NOT_SATISFIABLE : "Requested range not satisfiable", // Client Error - RFC 7233, 4.4
self::STATUS_EXPECTATION_FAILED : "Expectation Failed", // Client Error - RFC 7231, 6.5.14
self::STATUS_IM_A_TEAPOT : "I'm a teapot", // Client Error - RFC 7168, 2.3.3
self::STATUS_MISDIRECTED_REQUEST : "Misdirected Request",
self::STATUS_UNPROCESSABLE_ENTITY : "Unprocessable Entity", // Client Error - RFC 4918, 11.2
self::STATUS_LOCKED : "Locked", // Client Error - RFC 4918, 11.3
self::STATUS_FAILED_DEPENDENCY : "Failed Dependency", // Client Error - RFC 4918, 11.4
self::STATUS_TOO_EARLY : "Unordered Collection",
self::STATUS_UPGRADE_REQUIRED : "Upgrade Required", // Client Error - RFC 7231, 6.5.15
self::STATUS_PRECONDITION_REQUIRED : "Precondition Required", // Client Error - RFC 6585, 3
self::STATUS_TOO_MANY_REQUESTS : "Too Many Requests", // Client Error - RFC 6585, 4
self::STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE : "Request Header Fields Too Large", // Client Error - RFC 6585, 5
self::STATUS_UNAVAILABLE_FOR_LEGAL_REASONS : "Unavailable For Legal Reasons", // Client Error - RFC 7725, 3
// Server Errors 5xx
self::STATUS_INTERNAL_SERVER_ERROR : "Internal Server Error", // Server Error - RFC 7231, 6.6.1
self::STATUS_NOT_IMPLEMENTED : "Not Implemented", // Server Error - RFC 7231, 6.6.2
self::STATUS_BAD_GATEWAY : "Bad Gateway", // Server Error - RFC 7231, 6.6.3
self::STATUS_SERVICE_UNAVAILABLE : "Service Unavailable", // Server Error - RFC 7231, 6.6.4
self::STATUS_GATEWAY_TIMEOUT : "Gateway Time-out", // Server Error - RFC 7231, 6.6.5
self::STATUS_VERSION_NOT_SUPPORTED : "HTTP Version not supported", // Server Error - RFC 7231, 6.6.6
self::STATUS_VARIANT_ALSO_NEGOTIATES : "Variant Also Negotiates", // Server Error - RFC 2295, 8.1
self::STATUS_INSUFFICIENT_STORAGE : "Insufficient Storage", // Server Error - RFC 4918, 11.5
self::STATUS_LOOP_DETECTED : "Loop Detected", // Server Error - RFC 5842, 7.2
self::STATUS_NOT_EXTENDED : "Not Extended", // Server Error - RFC 2774, 7
self::STATUS_NETWORK_AUTHENTICATION_REQUIRED : "Network Authentication Required", // Server Error - RFC 6585, 6
// Unofficial
self::STATUS_THIS_IS_FINE : "This is fine", // Unofficial - Apache Web Server
self::STATUS_PAGE_EXPIRED : "Page Expired", // Unofficial - Laravel Framework
self::STATUS_METHOD_FAILURE : "Method Failure", // Unofficial - Spring Framework
self::STATUS_LOGIN_TIMEOUT : "Login Time-out", // Unofficial - IIS
self::STATUS_NO_RESPONSE : "No Response", // Unofficial - nginx
self::STATUS_RETRY_WITH : "Retry With", // Unofficial - IIS
self::STATUS_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS : "Blocked by Windows Parental Controls (Microsoft)", // Unofficial - nginx
self::STATUS_REQUEST_HEADER_TOO_LARGE : "Request header too large", // Unofficial - nginx
self::STATUS_SSL_CERTIFICATE_ERROR : "SSL Certificate Error", // Unofficial - nginx
self::STATUS_SSL_CERTIFICATE_REQUIRED : "SSL Certificate Required", // Unofficial - nginx
self::STATUS_HTTP_REQUEST_SENT_TO_HTTPS_PORT : "HTTP Request Sent to HTTPS Port", // Unofficial - nginx
self::STATUS_INVALID_TOKEN_ESRI : "Invalid Token (Esri)", // Unofficial - ESRI
self::STATUS_CLIENT_CLOSED_REQUEST : "Client Closed Request", // Unofficial - nginx
self::STATUS_BANDWIDTH_LIMIT_EXCEEDED : "Bandwidth Limit Exceeded", // Unofficial - Apache/cPanel
self::STATUS_UNKNOWN_ERROR : "Unknown Error", // Unofficial - Cloudflare
self::STATUS_WEB_SERVER_IS_DOWN : "Web Server Is Down", // Unofficial - Cloudflare
self::STATUS_CONNECTION_TIMEOUT : "Connection Timed Out", // Unofficial - Cloudflare
self::STATUS_ORIGIN_IS_UNREACHABLE : "Origin Is Unreachable", // Unofficial - Cloudflare
self::STATUS_TIMEOUT_OCCURRED : "A Timeout Occurred", // Unofficial - Cloudflare
self::STATUS_SSL_HANDSHAKE_FAILED : "SSL Handshake Failed", // Unofficial - Cloudflare
self::STATUS_INVALID_SSL_CERTIFICATE : "Invalid SSL Certificate", // Unofficial - Cloudflare
self::STATUS_RAILGUN_ERROR : "Railgun Error", // Unofficial - Cloudflare
self::STATUS_ORIGIN_DNS_ERROR : "Origin DNS Error", // Unofficial - Cloudflare
self::STATUS_NETWORK_READ_TIMEOUT_ERROR : "Network read timeout error", // Unofficial
self::STATUS_NETWORK_CONNECT_TIMEOUT_ERROR : "Network Connect Timeout Error" // Unofficial
];
}
/**
* Set a valid status code and phrase
*
* @param mixed $code
* @param mixed $phrase
*/
protected function processCode(var code, var phrase = "") -> void
{
var phrases;
let phrases = this->getPhrases();
this->checkCodeType(code);
let code = (int) code;
this->checkCodeValue(code);
if unlikely typeof phrase !== "string" {
throw new InvalidArgumentException("Invalid response reason");
}
if likely "" === phrase && isset phrases[code] {
let phrase = phrases[code];
}
let this->statusCode = code,
this->reasonPhrase = phrase;
}
/**
* Checks if a code is integer or string
*
* @param mixed $code
*/
private function checkCodeType(var code) -> void
{
if unlikely (typeof code !== "int" && typeof code !== "string") {
throw new InvalidArgumentException(
"Invalid status code; it must be an integer or string"
);
}
}
/**
* Checks if a code is integer or string
*
* @param int $code
*/
private function checkCodeValue(int code) -> void
{
if (true !== Number::between(code, 100, 599)) {
throw new InvalidArgumentException(
"Invalid status code '" . code . "', (allowed values 100-599)"
);
}
}
}
| Zephir | 5 | BeMySlaveDarlin/cphalcon | phalcon/Http/Message/Response.zep | [
"BSD-3-Clause"
] |
/*
* Copyright (c) 2021, Sahan Fernando <sahan.h.fernando@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
#include <Kernel/Graphics/VirtIOGPU/FramebufferDevice.h>
#include <Kernel/TimerQueue.h>
namespace Kernel::Graphics::VirtIOGPU {
class DirtyRect {
public:
void union_rect(size_t x, size_t y, size_t width, size_t height);
bool is_dirty() const { return m_is_dirty; }
size_t x() const { return m_x0; }
size_t y() const { return m_y0; }
size_t width() const { return m_x1 - m_x0; }
size_t height() const { return m_y1 - m_y0; }
void clear() { m_is_dirty = false; }
private:
bool m_is_dirty { false };
size_t m_x0 { 0 };
size_t m_y0 { 0 };
size_t m_x1 { 0 };
size_t m_y1 { 0 };
};
class Console final : public GenericFramebufferConsole {
public:
static NonnullRefPtr<Console> initialize(RefPtr<FramebufferDevice> const&);
virtual void set_resolution(size_t width, size_t height, size_t pitch) override;
virtual void flush(size_t x, size_t y, size_t width, size_t height) override;
virtual void enable() override;
private:
void enqueue_refresh_timer();
virtual u8* framebuffer_data() override;
Console(RefPtr<FramebufferDevice> const&);
RefPtr<FramebufferDevice> m_framebuffer_device;
DirtyRect m_dirty_rect;
};
}
| C | 4 | r00ster91/serenity | Kernel/Graphics/VirtIOGPU/Console.h | [
"BSD-2-Clause"
] |
KIDS Distribution saved on Sep 03, 2015@16:03:22
PATIENT REFUSALS 1.0
**KIDS**:PATIENT REFUSALS 1.0^
**INSTALL NAME**
PATIENT REFUSALS 1.0
"BLD",8519,0)
PATIENT REFUSALS 1.0^^0^3150903^n
"BLD",8519,4,0)
^9.64PA^9999999.73^3
"BLD",8519,4,9000022,0)
9000022
"BLD",8519,4,9000022,222)
y^y^f^^^^n
"BLD",8519,4,9999999.102,0)
9999999.102
"BLD",8519,4,9999999.102,222)
y^y^f^^n^^y^o^n
"BLD",8519,4,9999999.73,0)
9999999.73
"BLD",8519,4,9999999.73,222)
y^y^f^^n^^y^o^n
"BLD",8519,4,"B",9000022,9000022)
"BLD",8519,4,"B",9999999.102,9999999.102)
"BLD",8519,4,"B",9999999.73,9999999.73)
"BLD",8519,6.3)
4
"BLD",8519,"KRN",0)
^9.67PA^9002226^21
"BLD",8519,"KRN",.4,0)
.4
"BLD",8519,"KRN",.401,0)
.401
"BLD",8519,"KRN",.402,0)
.402
"BLD",8519,"KRN",.403,0)
.403
"BLD",8519,"KRN",.5,0)
.5
"BLD",8519,"KRN",.84,0)
.84
"BLD",8519,"KRN",3.6,0)
3.6
"BLD",8519,"KRN",3.8,0)
3.8
"BLD",8519,"KRN",9.2,0)
9.2
"BLD",8519,"KRN",9.8,0)
9.8
"BLD",8519,"KRN",9.8,"NM",0)
^9.68A^1^1
"BLD",8519,"KRN",9.8,"NM",1,0)
BGOREF^^0^B8345777
"BLD",8519,"KRN",9.8,"NM","B","BGOREF",1)
"BLD",8519,"KRN",19,0)
19
"BLD",8519,"KRN",19.1,0)
19.1
"BLD",8519,"KRN",101,0)
101
"BLD",8519,"KRN",409.61,0)
409.61
"BLD",8519,"KRN",771,0)
771
"BLD",8519,"KRN",779.2,0)
779.2
"BLD",8519,"KRN",870,0)
870
"BLD",8519,"KRN",8989.51,0)
8989.51
"BLD",8519,"KRN",8989.52,0)
8989.52
"BLD",8519,"KRN",8994,0)
8994
"BLD",8519,"KRN",8994,"NM",0)
^9.68A^5^5
"BLD",8519,"KRN",8994,"NM",1,0)
BGOREF DEL^^0
"BLD",8519,"KRN",8994,"NM",2,0)
BGOREF GET^^0
"BLD",8519,"KRN",8994,"NM",3,0)
BGOREF GETREA^^0
"BLD",8519,"KRN",8994,"NM",4,0)
BGOREF REFLIST^^0
"BLD",8519,"KRN",8994,"NM",5,0)
BGOREF SET^^0
"BLD",8519,"KRN",8994,"NM","B","BGOREF DEL",1)
"BLD",8519,"KRN",8994,"NM","B","BGOREF GET",2)
"BLD",8519,"KRN",8994,"NM","B","BGOREF GETREA",3)
"BLD",8519,"KRN",8994,"NM","B","BGOREF REFLIST",4)
"BLD",8519,"KRN",8994,"NM","B","BGOREF SET",5)
"BLD",8519,"KRN",9002226,0)
9002226
"BLD",8519,"KRN","B",.4,.4)
"BLD",8519,"KRN","B",.401,.401)
"BLD",8519,"KRN","B",.402,.402)
"BLD",8519,"KRN","B",.403,.403)
"BLD",8519,"KRN","B",.5,.5)
"BLD",8519,"KRN","B",.84,.84)
"BLD",8519,"KRN","B",3.6,3.6)
"BLD",8519,"KRN","B",3.8,3.8)
"BLD",8519,"KRN","B",9.2,9.2)
"BLD",8519,"KRN","B",9.8,9.8)
"BLD",8519,"KRN","B",19,19)
"BLD",8519,"KRN","B",19.1,19.1)
"BLD",8519,"KRN","B",101,101)
"BLD",8519,"KRN","B",409.61,409.61)
"BLD",8519,"KRN","B",771,771)
"BLD",8519,"KRN","B",779.2,779.2)
"BLD",8519,"KRN","B",870,870)
"BLD",8519,"KRN","B",8989.51,8989.51)
"BLD",8519,"KRN","B",8989.52,8989.52)
"BLD",8519,"KRN","B",8994,8994)
"BLD",8519,"KRN","B",9002226,9002226)
"DATA",9999999.102,1,0)
182895007^1^1^R^^1
"DATA",9999999.102,2,0)
266721009^1^^N^^3
"DATA",9999999.102,3,0)
62014003^1^1^N^^1
"DATA",9999999.102,4,0)
416098002^1^1^N^^1
"DATA",9999999.102,5,0)
79899007^1^1^N^^1
"DATA",9999999.102,6,0)
59037007^1^1^N^^1
"DATA",9999999.102,7,0)
31438003^1^1^N^^1
"DATA",9999999.102,8,0)
397745006^1^^N^^3
"DATA",9999999.102,9,0)
107724000^1^^S^^3
"DATA",9999999.102,10,0)
182856006^1^1^S^^1
"DATA",9999999.102,11,0)
224194003^1^^S^^3
"DATA",9999999.102,12,0)
224198000^1^^S^^3
"DATA",9999999.102,13,0)
224199008^1^^S^^3
"DATA",9999999.102,14,0)
242990004^1^1^S^^1
"DATA",9999999.102,15,0)
419808006^1^^S^^3
"DATA",9999999.102,16,0)
424553001^1^^S^^3
"DATA",9999999.102,17,0)
275936005^1^^R^^3
"DATA",9999999.102,18,0)
134397009^1^1^R^^1
"DATA",9999999.102,19,0)
401084003^1^1^R^^1
"DATA",9999999.102,20,0)
413310006^^^R^^2
"DATA",9999999.102,21,0)
182890002^^^R^^2
"DATA",9999999.102,22,0)
105480006^^^R^^2
"DATA",9999999.102,23,0)
443390004^^^R^R^2
"DATA",9999999.102,24,0)
35688006^^^N^^2
"DATA",9999999.102,25,0)
410536001^^^N^^2
"DATA",9999999.102,26,0)
266756008^^^S^^2
"DATA",9999999.102,27,0)
270459005^^^S^^2
"DATA",9999999.102,28,0)
309846006^^^S^^2
"DATA",9999999.102,29,0)
385661002^^^U^U^2
"DATA",9999999.102,30,0)
410534003^^^N^N^2
"DATA",9999999.102,31,0)
275694009^^^F^F^2
"DATA",9999999.102,32,0)
410546004^^^P^P^2
"DATA",9999999.73,1,0)
EDUCATION TOPICS^9999999.09^.01
"DATA",9999999.73,2,0)
EXAM^9999999.15^.01
"DATA",9999999.73,3,0)
IMMUNIZATION^9999999.14^.01
"DATA",9999999.73,4,0)
LAB^60^.01
"DATA",9999999.73,5,0)
MAMMOGRAM^71^.01
"DATA",9999999.73,6,0)
PAP SMEAR^60^.01
"DATA",9999999.73,7,0)
RADIOLOGY EXAM^71^.01
"DATA",9999999.73,8,0)
SKIN TEST^9999999.28^.01
"DATA",9999999.73,9,0)
MEASUREMENTS^9999999.07^.02
"DATA",9999999.73,10,0)
EKG^9999999.68^.01
"DATA",9999999.73,11,0)
MEDICATION/DRUG^50^.01
"DATA",9999999.73,37,0)
CPT^81^2
"DATA",9999999.73,38,0)
ICD OPERATION/PROCEDURE^80.1^4
"DATA",9999999.73,39,0)
ADA CODE^9999999.31^.02
"DATA",9999999.73,40,0)
SNOMED^9002318.4^1
"FIA",9000022)
PATIENT REFUSALS FOR SERVICE/NMI
"FIA",9000022,0)
^AUPNPREF(
"FIA",9000022,0,0)
9000022AIP
"FIA",9000022,0,1)
y^y^f^^^^n
"FIA",9000022,0,10)
"FIA",9000022,0,11)
"FIA",9000022,0,"RLRO")
"FIA",9000022,9000022)
0
"FIA",9999999.102)
REFUSAL REASONS
"FIA",9999999.102,0)
^AUTTREFR(
"FIA",9999999.102,0,0)
9999999.102
"FIA",9999999.102,0,1)
y^y^f^^n^^y^o^n
"FIA",9999999.102,0,10)
"FIA",9999999.102,0,11)
"FIA",9999999.102,0,"RLRO")
"FIA",9999999.102,9999999.102)
0
"FIA",9999999.73)
REFUSAL TYPE
"FIA",9999999.73,0)
^AUTTREFT(
"FIA",9999999.73,0,0)
9999999.73a
"FIA",9999999.73,0,1)
y^y^f^^n^^y^o^n
"FIA",9999999.73,0,10)
"FIA",9999999.73,0,11)
"FIA",9999999.73,0,"RLRO")
"FIA",9999999.73,9999999.73)
0
"KRN",8994,2798,-1)
0^2
"KRN",8994,2798,0)
BGOREF GET^GET^BGOREF^4^^^^1
"KRN",8994,2798,1,0)
^^1^1^3061204.210155
"KRN",8994,2798,1,1,0)
Get refusal data.
"KRN",8994,2798,2,0)
^8994.02A^1^1
"KRN",8994,2798,2,1,0)
INP^1^^1^1
"KRN",8994,2798,2,1,1,0)
^^1^1^3061204.210211
"KRN",8994,2798,2,1,1,1,0)
Patient IEN ^ Refusal IEN
"KRN",8994,2798,2,"B","INP",1)
"KRN",8994,2798,2,"PARAMSEQ",1,1)
"KRN",8994,2798,3,0)
^^4^4^3061211.003234
"KRN",8994,2798,3,1,0)
List of records in the format:
"KRN",8994,2798,3,2,0)
R ^ Refusal IEN [2] ^ Type IEN [3] ^ Type Name [4] ^ Item IEN [5] ^
"KRN",8994,2798,3,3,0)
Item Name [6] ^ Provider IEN [7] ^ Provider Name [8] ^ Date [9] ^
"KRN",8994,2798,3,4,0)
Locked [10] ^ Reason [11] ^ Comment [12]
"KRN",8994,2799,-1)
0^1
"KRN",8994,2799,0)
BGOREF DEL^DEL^BGOREF^1
"KRN",8994,2799,1,0)
^^1^1^3061204.214525
"KRN",8994,2799,1,1,0)
Delete a refusal.
"KRN",8994,2799,2,0)
^8994.02A^1^1
"KRN",8994,2799,2,1,0)
REFIEN^1^^1^1
"KRN",8994,2799,2,1,1,0)
^^1^1^3061204.214536
"KRN",8994,2799,2,1,1,1,0)
Refusal IEN
"KRN",8994,2799,2,"B","REFIEN",1)
"KRN",8994,2799,2,"PARAMSEQ",1,1)
"KRN",8994,2799,3,0)
^^2^2^3061204.214539
"KRN",8994,2799,3,1,0)
Failure: -n^error text
"KRN",8994,2799,3,2,0)
Success: null
"KRN",8994,2800,-1)
0^5
"KRN",8994,2800,0)
BGOREF SET^SET^BGOREF^1
"KRN",8994,2800,1,0)
^8994.01^1^1^3061208^
"KRN",8994,2800,1,1,0)
Add/edit a refusal.
"KRN",8994,2800,2,0)
^8994.02A^1^1
"KRN",8994,2800,2,1,0)
INP^1^^1^1
"KRN",8994,2800,2,1,1,0)
^^2^2^3061208.154836
"KRN",8994,2800,2,1,1,1,0)
Refusal IEN [1] ^ Refusal Type [2] ^ Item IEN [3] ^ Patient IEN [4] ^
"KRN",8994,2800,2,1,1,2,0)
Refusal Date [6] ^ Comment [7] ^ Provider IEN [8] ^ Reason [9]
"KRN",8994,2800,2,"B","INP",1)
"KRN",8994,2800,2,"PARAMSEQ",1,1)
"KRN",8994,2800,3,0)
^8994.03^2^2^3061208^^
"KRN",8994,2800,3,1,0)
Failure: -n^error text
"KRN",8994,2800,3,2,0)
Success: null
"KRN",8994,2801,-1)
0^4
"KRN",8994,2801,0)
BGOREF REFLIST^REFLIST^BGOREF^1
"KRN",8994,2801,1,0)
^^1^1^3061205.093022
"KRN",8994,2801,1,1,0)
Return IEN for pap smear/mammogram/ekg.
"KRN",8994,2801,2,0)
^8994.02A^1^1
"KRN",8994,2801,2,1,0)
INP^1^^1^1
"KRN",8994,2801,2,1,1,0)
^^1^1^3061205.093127
"KRN",8994,2801,2,1,1,1,0)
One of the following values: PAP SMEAR, MAMMOGRAM, EKG.
"KRN",8994,2801,2,"B","INP",1)
"KRN",8994,2801,2,"PARAMSEQ",1,1)
"KRN",8994,2801,3,0)
^^2^2^3061205.093141
"KRN",8994,2801,3,1,0)
Failure: -n^error text
"KRN",8994,2801,3,2,0)
Success: IEN of specified item
"KRN",8994,2802,-1)
0^3
"KRN",8994,2802,0)
BGOREF GETREA^GETREA^BGOREF^4^^^^1
"KRN",8994,2802,1,0)
^^1^1^3130725.142754
"KRN",8994,2802,1,1,0)
Return list of refusal reasons for a given refusal type.
"KRN",8994,2802,2,0)
^8994.02A^1^1
"KRN",8994,2802,2,1,0)
TYPE^1^^1^1
"KRN",8994,2802,2,1,1,0)
^^2^2^3130725.142831
"KRN",8994,2802,2,1,1,1,0)
Refusal type in external format
"KRN",8994,2802,2,1,1,2,0)
EX:EXAM
"KRN",8994,2802,2,"B","TYPE",1)
"KRN",8994,2802,2,"PARAMSEQ",1,1)
"KRN",8994,2802,3,0)
^^6^6^3130725.142911
"KRN",8994,2802,3,1,0)
array in format
"KRN",8994,2802,3,2,0)
IEN[1]^TEXT[2]
"KRN",8994,2802,3,3,0)
"KRN",8994,2802,3,4,0)
^TMP("BGO",3024,1)="2^Absent response to treatment"
"KRN",8994,2802,3,5,0)
^TMP("BGO",3024,2)="8^Medical contraindication
"KRN",8994,2802,3,6,0)
MSC TAG LABEL (c): GETREA(RET,TYPE) ;EP
"MBREQ")
0
"ORD",16,8994)
8994;16;1;;;;;;;RPCDEL^XPDIA1
"ORD",16,8994,0)
REMOTE PROCEDURE
"QUES","XPF1",0)
Y
"QUES","XPF1","??")
^D REP^XPDH
"QUES","XPF1","A")
Shall I write over your |FLAG| File
"QUES","XPF1","B")
YES
"QUES","XPF1","M")
D XPF1^XPDIQ
"QUES","XPF2",0)
Y
"QUES","XPF2","??")
^D DTA^XPDH
"QUES","XPF2","A")
Want my data |FLAG| yours
"QUES","XPF2","B")
YES
"QUES","XPF2","M")
D XPF2^XPDIQ
"QUES","XPI1",0)
YO
"QUES","XPI1","??")
^D INHIBIT^XPDH
"QUES","XPI1","A")
Want KIDS to INHIBIT LOGONs during the install
"QUES","XPI1","B")
NO
"QUES","XPI1","M")
D XPI1^XPDIQ
"QUES","XPM1",0)
PO^VA(200,:EM
"QUES","XPM1","??")
^D MG^XPDH
"QUES","XPM1","A")
Enter the Coordinator for Mail Group '|FLAG|'
"QUES","XPM1","B")
"QUES","XPM1","M")
D XPM1^XPDIQ
"QUES","XPO1",0)
Y
"QUES","XPO1","??")
^D MENU^XPDH
"QUES","XPO1","A")
Want KIDS to Rebuild Menu Trees Upon Completion of Install
"QUES","XPO1","B")
NO
"QUES","XPO1","M")
D XPO1^XPDIQ
"QUES","XPZ1",0)
Y
"QUES","XPZ1","??")
^D OPT^XPDH
"QUES","XPZ1","A")
Want to DISABLE Scheduled Options, Menu Options, and Protocols
"QUES","XPZ1","B")
NO
"QUES","XPZ1","M")
D XPZ1^XPDIQ
"QUES","XPZ2",0)
Y
"QUES","XPZ2","??")
^D RTN^XPDH
"QUES","XPZ2","A")
Want to MOVE routines to other CPUs
"QUES","XPZ2","B")
NO
"QUES","XPZ2","M")
D XPZ2^XPDIQ
"RTN")
1
"RTN","BGOREF")
0^1^B8345777
"RTN","BGOREF",1,0)
BGOREF ; IHS/BAO/TMD - Manage REFUSALS ;03-Sep-2015 14:58;DKM
"RTN","BGOREF",2,0)
;;1.1;BGO COMPONENTS;**1,3,5,11,13**;Mar 20, 2007;Build 4
"RTN","BGOREF",3,0)
; Add/edit a refusal
"RTN","BGOREF",4,0)
; INP = Refusal IEN [1] ^ Refusal Type [2] ^ Item IEN [3] ^ Patient IEN [4] ^
"RTN","BGOREF",5,0)
; Refusal Date [5] ^ Comment [6] ^ Provider IEN [7] ^ Reason [8]
"RTN","BGOREF",6,0)
;Patch 5, changed mammogram code for bilateral mammogram
"RTN","BGOREF",7,0)
;Patch 13,changes for SNOMED
"RTN","BGOREF",8,0)
SET(RET,INP) ;EP
"RTN","BGOREF",9,0)
N DFN,REFIEN,REFTYP,ITEMIEN,REFDATE,COMMENT,REASON,PRV,HST,HIS,CT
"RTN","BGOREF",10,0)
S (CT,HIS)=""
"RTN","BGOREF",11,0)
S DFN=$P(INP,U,4)
"RTN","BGOREF",12,0)
I 'DFN S RET=$$ERR^BGOUTL(1050) Q
"RTN","BGOREF",13,0)
I '$D(^DPT(DFN,0)) S RET=$$ERR^BGOUTL(1001) Q
"RTN","BGOREF",14,0)
S REFIEN=+INP
"RTN","BGOREF",15,0)
S REFTYP=$P(INP,U,2)
"RTN","BGOREF",16,0)
S ITEMIEN=$P(INP,U,3)
"RTN","BGOREF",17,0)
S REFDATE=$P(INP,U,5)
"RTN","BGOREF",18,0)
S COMMENT=$P(INP,U,6)
"RTN","BGOREF",19,0)
S PRV=$P(INP,U,7)
"RTN","BGOREF",20,0)
S REASON=$P(INP,U,8)
"RTN","BGOREF",21,0)
I $L(REASON)>0 D
"RTN","BGOREF",22,0)
.;IHS/MSC/MGH Patch 11
"RTN","BGOREF",23,0)
.;S REASON=$$UPPER^BGOVPED2(REASON)
"RTN","BGOREF",24,0)
.;S REASON=$S(REASON="REFUSED SERVICE":"R",REASON="UNABLE TO SCREEN":"U",REASON="NOT MEDICALLY INDICATED":"N",REASON="NO RESPONSE TO FOLLOWUP":"F",REASON="PROVIDER DISCONTINUED":"P",1:"")
"RTN","BGOREF",25,0)
.;Patch 13 cfhanged reason to SNOMED
"RTN","BGOREF",26,0)
.S CT=$$GET1^DIQ(9999999.102,REASON,.01)
"RTN","BGOREF",27,0)
.S HIS=$$GET1^DIQ(9999999.102,REASON,.04,"I")
"RTN","BGOREF",28,0)
;S:REASON="" REASON="R"
"RTN","BGOREF",29,0)
S RET=$$REFSET2^BGOUTL2(DFN,REFDATE,ITEMIEN,REFTYP,HIS,COMMENT,PRV,REFIEN,CT)
"RTN","BGOREF",30,0)
Q
"RTN","BGOREF",31,0)
; Get refusal data
"RTN","BGOREF",32,0)
; INP = Patient IEN ^ Refusal IEN
"RTN","BGOREF",33,0)
; List of records in the format:
"RTN","BGOREF",34,0)
; R ^ Refusal IEN [2] ^ Type IEN [3] ^ Type Name [4] ^ Item IEN [5] ^ Item Name [6] ^ Provider IEN [7] ^
"RTN","BGOREF",35,0)
; Provider Name [8] ^ Date [9] ^ Locked [10] ^ Reason [11] ^ Comment [12]
"RTN","BGOREF",36,0)
GET(RET,INP) ;EP
"RTN","BGOREF",37,0)
N CNT,DFN,REFIEN
"RTN","BGOREF",38,0)
S RET=$$TMPGBL^BGOUTL
"RTN","BGOREF",39,0)
S DFN=+INP
"RTN","BGOREF",40,0)
S REFIEN=$P(INP,U,2)
"RTN","BGOREF",41,0)
I REFIEN S @RET@(1)=$$REFGET1^BGOUTL2(REFIEN)
"RTN","BGOREF",42,0)
E D
"RTN","BGOREF",43,0)
.S REFIEN="",CNT=0
"RTN","BGOREF",44,0)
.F S REFIEN=$O(^AUPNPREF("AC",DFN,REFIEN),-1) Q:'REFIEN D
"RTN","BGOREF",45,0)
..S CNT=CNT+1,@RET@(CNT)=$$REFGET1^BGOUTL2(REFIEN)
"RTN","BGOREF",46,0)
Q
"RTN","BGOREF",47,0)
; Delete a refusal
"RTN","BGOREF",48,0)
DEL(RET,REFIEN) ;EP
"RTN","BGOREF",49,0)
S RET=$$REFDEL^BGOUTL2(REFIEN)
"RTN","BGOREF",50,0)
Q
"RTN","BGOREF",51,0)
; Return IEN for pap smear/mammogram/ekg
"RTN","BGOREF",52,0)
REFLIST(RET,INP) ;EP
"RTN","BGOREF",53,0)
S INP=$$UP^XLFSTR(INP)
"RTN","BGOREF",54,0)
I INP="PAP SMEAR" S RET=$O(^LAB(60,"B","PAP SMEAR",0))
"RTN","BGOREF",55,0)
E I INP="MAMMOGRAM" S RET=$O(^RAMIS(71,"D",76056,0))
"RTN","BGOREF",56,0)
E I INP="EKG" S RET=$O(^AUTTDXPR("B","ECG SUMMARY",0))
"RTN","BGOREF",57,0)
E S RET=$$ERR^BGOUTL(1051,INP)
"RTN","BGOREF",58,0)
Q
"RTN","BGOREF",59,0)
;Return the list of SNOMED reasons for refusal
"RTN","BGOREF",60,0)
;Returns the list with the
"RTN","BGOREF",61,0)
;IEN [1] ^ TEXT [2]
"RTN","BGOREF",62,0)
GETREA(RET,TYPE) ;EP
"RTN","BGOREF",63,0)
N IEN,SCREEN,CNT
"RTN","BGOREF",64,0)
S RET=$$TMPGBL^BGOUTL
"RTN","BGOREF",65,0)
S TYPE=$$UP^XLFSTR(TYPE)
"RTN","BGOREF",66,0)
S CNT=0
"RTN","BGOREF",67,0)
I $G(TYPE)="" S TYPE="IMMUNIZATION"
"RTN","BGOREF",68,0)
S IEN=0 F S IEN=$O(^AUTTREFR(IEN)) Q:'+IEN D
"RTN","BGOREF",69,0)
.S SCREEN=$$GET1^DIQ(9999999.102,IEN,.06,"I")
"RTN","BGOREF",70,0)
.I TYPE="MEDICATION/DRUG"&(SCREEN=1!(SCREEN=3)) D ADD(IEN)
"RTN","BGOREF",71,0)
.E I SCREEN=2!(SCREEN=3) D ADD(IEN)
"RTN","BGOREF",72,0)
Q
"RTN","BGOREF",73,0)
ADD(IEN) ;Add to array
"RTN","BGOREF",74,0)
N IN,OUT,X,ARR,DESC,TXT
"RTN","BGOREF",75,0)
S CT=$$GET1^DIQ(9999999.102,IEN,.01)
"RTN","BGOREF",76,0)
S IN=CT_"^36^^1^"
"RTN","BGOREF",77,0)
S OUT="ARR"
"RTN","BGOREF",78,0)
S X=$$CNCLKP^BSTSAPI(.OUT,.IN)
"RTN","BGOREF",79,0)
I X>0 D
"RTN","BGOREF",80,0)
.S TXT=@OUT@(1,"PRE","TRM")
"RTN","BGOREF",81,0)
.S CNT=CNT+1
"RTN","BGOREF",82,0)
.S @RET@(CNT)=IEN_U_TXT
"RTN","BGOREF",83,0)
Q
"SEC","^DIC",9000022,9000022,0,"AUDIT")
M
"SEC","^DIC",9000022,9000022,0,"DD")
@
"SEC","^DIC",9000022,9000022,0,"DEL")
M
"SEC","^DIC",9000022,9000022,0,"LAYGO")
M
"SEC","^DIC",9000022,9000022,0,"RD")
M
"SEC","^DIC",9000022,9000022,0,"WR")
M
"SEC","^DIC",9999999.102,9999999.102,0,"AUDIT")
@
"SEC","^DIC",9999999.102,9999999.102,0,"DD")
@
"SEC","^DIC",9999999.102,9999999.102,0,"DEL")
@
"SEC","^DIC",9999999.102,9999999.102,0,"LAYGO")
@
"SEC","^DIC",9999999.102,9999999.102,0,"RD")
@
"SEC","^DIC",9999999.102,9999999.102,0,"WR")
@
"SEC","^DIC",9999999.73,9999999.73,0,"AUDIT")
@
"SEC","^DIC",9999999.73,9999999.73,0,"DD")
@
"SEC","^DIC",9999999.73,9999999.73,0,"DEL")
@
"SEC","^DIC",9999999.73,9999999.73,0,"LAYGO")
@
"SEC","^DIC",9999999.73,9999999.73,0,"WR")
@
"VER")
8.0^22.0
"^DD",9000022,9000022,0)
FIELD^^1302^19
"^DD",9000022,9000022,0,"DT")
3130416
"^DD",9000022,9000022,0,"IX","AA",9000022,.02)
"^DD",9000022,9000022,0,"IX","AAONE",9000022,.05)
"^DD",9000022,9000022,0,"IX","AATHREE",9000022,.03)
"^DD",9000022,9000022,0,"IX","AATWO",9000022,.06)
"^DD",9000022,9000022,0,"IX","AC",9000022,.02)
"^DD",9000022,9000022,0,"IX","AD",9000022,.03)
"^DD",9000022,9000022,0,"IX","ADLM",9000022,.08)
"^DD",9000022,9000022,0,"IX","AE",9000022,.05)
"^DD",9000022,9000022,0,"IX","AETOO",9000022,.06)
"^DD",9000022,9000022,0,"IX","ASNMMAP",9000022,.07)
"^DD",9000022,9000022,0,"IX","AV9",9000022,.01)
"^DD",9000022,9000022,0,"IX","B",9000022,.01)
"^DD",9000022,9000022,0,"NM","PATIENT REFUSALS FOR SERVICE/NMI")
"^DD",9000022,9000022,0,"VRPK")
BJPC
"^DD",9000022,9000022,.01,0)
SERVICE TYPE^RP9999999.73'^AUTTREFT(^0;1^Q
"^DD",9000022,9000022,.01,1,0)
^.1
"^DD",9000022,9000022,.01,1,1,0)
9000022^B
"^DD",9000022,9000022,.01,1,1,1)
S ^AUPNPREF("B",$E(X,1,30),DA)=""
"^DD",9000022,9000022,.01,1,1,2)
K ^AUPNPREF("B",$E(X,1,30),DA)
"^DD",9000022,9000022,.01,1,2,0)
9000022^AV9^MUMPS
"^DD",9000022,9000022,.01,1,2,1)
S:$D(APCDLOOK) DIC("DR")=""
"^DD",9000022,9000022,.01,1,2,2)
Q
"^DD",9000022,9000022,.01,1,3,0)
^^TRIGGER^9000022^.08
"^DD",9000022,9000022,.01,1,3,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.01,1,3,2)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.01,1,3,"CREATE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.01,1,3,"DELETE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.01,1,3,"DT")
3100706
"^DD",9000022,9000022,.01,1,3,"FIELD")
#.08
"^DD",9000022,9000022,.01,3)
"^DD",9000022,9000022,.01,"DT")
3101214
"^DD",9000022,9000022,.02,0)
PATIENT NAME^RP9000001'I^AUPNPAT(^0;2^Q
"^DD",9000022,9000022,.02,1,0)
^.1
"^DD",9000022,9000022,.02,1,1,0)
9000022^AC
"^DD",9000022,9000022,.02,1,1,1)
S ^AUPNPREF("AC",$E(X,1,30),DA)=""
"^DD",9000022,9000022,.02,1,1,2)
K ^AUPNPREF("AC",$E(X,1,30),DA)
"^DD",9000022,9000022,.02,1,2,0)
9000022^AA^MUMPS
"^DD",9000022,9000022,.02,1,2,1)
I $P(^AUPNPREF(DA,0),U,3)]"",$P(^(0),U,5)]"",$P(^(0),U,6)]"" S ^AUPNPREF("AA",X,$P(^AUPNPREF(DA,0),U,5),$P(^(0),U,6),(9999999-$P(^(0),U,3)),DA)=""
"^DD",9000022,9000022,.02,1,2,2)
I $P(^AUPNPREF(DA,0),U,3)]"",$P(^(0),U,5)]"",$P(^(0),U,6)]"" K ^AUPNPREF("AA",X,$P(^AUPNPREF(DA,0),U,5),$P(^(0),U,6),(9999999-$P(^(0),U,3)),DA)
"^DD",9000022,9000022,.02,1,2,"DT")
2991203
"^DD",9000022,9000022,.02,"DT")
2991203
"^DD",9000022,9000022,.03,0)
DATE DECLINED/NOT INDICATED^RD^^0;3^S %DT="E" D ^%DT S X=Y K:DT<X!(2600000>X) X
"^DD",9000022,9000022,.03,1,0)
^.1
"^DD",9000022,9000022,.03,1,1,0)
9000022^AD
"^DD",9000022,9000022,.03,1,1,1)
S ^AUPNPREF("AD",$E(X,1,30),DA)=""
"^DD",9000022,9000022,.03,1,1,2)
K ^AUPNPREF("AD",$E(X,1,30),DA)
"^DD",9000022,9000022,.03,1,2,0)
9000022^AATHREE^MUMPS
"^DD",9000022,9000022,.03,1,2,1)
I $P(^AUPNPREF(DA,0),U,2)]"",$P(^(0),U,5)]"",$P(^(0),U,6)]"" S ^AUPNPREF("AA",$P(^AUPNPREF(DA,0),U,2),$P(^(0),U,5),$P(^(0),U,6),(9999999-X),DA)=""
"^DD",9000022,9000022,.03,1,2,2)
I $P(^AUPNPREF(DA,0),U,2)]"",$P(^(0),U,5)]"",$P(^(0),U,6)]"" K ^AUPNPREF("AA",$P(^AUPNPREF(DA,0),U,2),$P(^(0),U,5),$P(^(0),U,6),(9999999-X),DA)
"^DD",9000022,9000022,.03,1,2,"DT")
2991205
"^DD",9000022,9000022,.03,1,3,0)
^^TRIGGER^9000022^.08
"^DD",9000022,9000022,.03,1,3,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.03,1,3,2)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.03,1,3,"CREATE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.03,1,3,"DELETE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.03,1,3,"DT")
3100706
"^DD",9000022,9000022,.03,1,3,"FIELD")
#.08
"^DD",9000022,9000022,.03,3)
TYPE A DATE BETWEEN 1960 AND TODAY
"^DD",9000022,9000022,.03,"DT")
3101214
"^DD",9000022,9000022,.04,0)
SERVICE DESC/PREFERRED TERM^RF^^0;4^K:$L(X)>160!($L(X)<1) X
"^DD",9000022,9000022,.04,1,0)
^.1
"^DD",9000022,9000022,.04,1,1,0)
^^TRIGGER^9000022^.08
"^DD",9000022,9000022,.04,1,1,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.04,1,1,2)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.04,1,1,"CREATE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.04,1,1,"DELETE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.04,1,1,"FIELD")
#.08
"^DD",9000022,9000022,.04,3)
Answer must be 1-160 characters in length.
"^DD",9000022,9000022,.04,12)
OLD LOOKUP
"^DD",9000022,9000022,.04,12.1)
S DIC(0)=$S($D(APCDALVR):"LO",1:"EMQLO")
"^DD",9000022,9000022,.04,"DT")
3130416
"^DD",9000022,9000022,.05,0)
POINTER FILE^P1'^DIC(^0;5^Q
"^DD",9000022,9000022,.05,1,0)
^.1
"^DD",9000022,9000022,.05,1,1,0)
9000022^AAONE^MUMPS
"^DD",9000022,9000022,.05,1,1,1)
I $P(^AUPNPREF(DA,0),U,2)]"",$P(^(0),U,3)]"",$P(^(0),U,6)]"" S ^AUPNPREF("AA",$P(^AUPNPREF(DA,0),U,2),X,$P(^(0),U,6),(9999999-$P(^(0),U,3)),DA)=""
"^DD",9000022,9000022,.05,1,1,2)
I $P(^AUPNPREF(DA,0),U,2)]"",$P(^(0),U,3)]"",$P(^(0),U,6)]"" K ^AUPNPREF("AA",$P(^AUPNPREF(DA,0),U,2),X,$P(^(0),U,6),(9999999-$P(^(0),U,3)),DA)
"^DD",9000022,9000022,.05,1,1,"DT")
2991205
"^DD",9000022,9000022,.05,1,2,0)
9000022^AE^MUMPS
"^DD",9000022,9000022,.05,1,2,1)
I $P(^AUPNPREF(DA,0),U,6) S ^AUPNPREF("AE",X,$P(^(0),U,6),DA)=""
"^DD",9000022,9000022,.05,1,2,2)
I $P(^AUPNPREF(DA,0),U,6) K ^AUPNPREF("AE",X,$P(^(0),U,6),DA)
"^DD",9000022,9000022,.05,1,2,"DT")
3070505
"^DD",9000022,9000022,.05,3)
"^DD",9000022,9000022,.05,"DT")
3070505
"^DD",9000022,9000022,.06,0)
POINTER VALUE^F^^0;6^K:$L(X)>30!($L(X)<1) X
"^DD",9000022,9000022,.06,1,0)
^.1
"^DD",9000022,9000022,.06,1,1,0)
9000022^AATWO^MUMPS
"^DD",9000022,9000022,.06,1,1,1)
I $P(^AUPNPREF(DA,0),U,2)]"",$P(^(0),U,3)]"",$P(^(0),U,5)]"" S ^AUPNPREF("AA",$P(^AUPNPREF(DA,0),U,2),$P(^(0),U,5),X,(9999999-$P(^(0),U,3)),DA)=""
"^DD",9000022,9000022,.06,1,1,2)
I $P(^AUPNPREF(DA,0),U,2)]"",$P(^(0),U,3)]"",$P(^(0),U,5)]"" K ^AUPNPREF("AA",$P(^AUPNPREF(DA,0),U,2),$P(^(0),U,5),X,(9999999-$P(^(0),U,3)),DA)
"^DD",9000022,9000022,.06,1,1,"DT")
2991205
"^DD",9000022,9000022,.06,1,2,0)
9000022^AETOO^MUMPS
"^DD",9000022,9000022,.06,1,2,1)
I $P(^AUPNPREF(DA,0),U,5) S ^AUPNPREF("AE",$P(^(0),U,5),X,DA)=""
"^DD",9000022,9000022,.06,1,2,2)
I $P(^AUPNPREF(DA,0),U,5) K ^AUPNPREF("AE",$P(^(0),U,5),X,DA)
"^DD",9000022,9000022,.06,1,2,"DT")
3070505
"^DD",9000022,9000022,.06,3)
Answer must be 1-30 characters in length.
"^DD",9000022,9000022,.06,"DT")
3070505
"^DD",9000022,9000022,.07,0)
REASON NOT DONE^S^R:DECLINED SERVICE;N:NOT MEDICALLY INDICATED;F:NO RESPONSE TO FOLLOWUP;P:PROVIDER DISCONTINUED;U:CONSIDERED AND NOT DONE;S:SYSTEM REASON;^0;7^Q
"^DD",9000022,9000022,.07,1,0)
^.1
"^DD",9000022,9000022,.07,1,1,0)
^^TRIGGER^9000022^.08
"^DD",9000022,9000022,.07,1,1,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.07,1,1,2)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,.07,1,1,"CREATE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.07,1,1,"DELETE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,.07,1,1,"FIELD")
#.08
"^DD",9000022,9000022,.07,1,2,0)
9000022^ASNMMAP^MUMPS
"^DD",9000022,9000022,.07,1,2,1)
D REFMAP^AUPNMAP
"^DD",9000022,9000022,.07,1,2,2)
Q
"^DD",9000022,9000022,.07,1,2,"DT")
3130416
"^DD",9000022,9000022,.07,3)
"^DD",9000022,9000022,.07,"DT")
3130416
"^DD",9000022,9000022,.08,0)
DATE LAST MODIFIED^D^^0;8^S %DT="ESTX" D ^%DT S X=Y K:Y<1 X
"^DD",9000022,9000022,.08,1,0)
^.1
"^DD",9000022,9000022,.08,1,1,0)
9000022^ADLM
"^DD",9000022,9000022,.08,1,1,1)
S ^AUPNPREF("ADLM",$E(X,1,30),DA)=""
"^DD",9000022,9000022,.08,1,1,2)
K ^AUPNPREF("ADLM",$E(X,1,30),DA)
"^DD",9000022,9000022,.08,1,1,"DT")
3100329
"^DD",9000022,9000022,.08,5,1,0)
9000022^.01^3
"^DD",9000022,9000022,.08,5,2,0)
9000022^.03^3
"^DD",9000022,9000022,.08,5,3,0)
9000022^.04^1
"^DD",9000022,9000022,.08,5,4,0)
9000022^.07^1
"^DD",9000022,9000022,.08,5,5,0)
9000022^1101^1
"^DD",9000022,9000022,.08,5,6,0)
9000022^1204^1
"^DD",9000022,9000022,.08,9)
^
"^DD",9000022,9000022,.08,"DT")
3100507
"^DD",9000022,9000022,1.01,0)
CONCEPT ID REASON NOT DONE^F^^1;1^K:$L(X)>20!($L(X)<1) X
"^DD",9000022,9000022,1.01,1,0)
^.1^^0
"^DD",9000022,9000022,1.01,3)
Answer must be 1-20 characters in length.
"^DD",9000022,9000022,1.01,"DT")
3130416
"^DD",9000022,9000022,1.019,0)
CONCEPT ID RND FSN^CJ8^^ ; ^S Y(9000022,1.019,1)=$S($D(^AUPNPREF(D0,1)):^(1),1:"") S X=$P(Y(9000022,1.019,1),U,1),X=$$CONFSN^AUPNVUTL(X)
"^DD",9000022,9000022,1.019,9)
^
"^DD",9000022,9000022,1.019,9.01)
9000022^1.01
"^DD",9000022,9000022,1.019,9.1)
AUPNCIDFSN(#1.01)
"^DD",9000022,9000022,1.019,"DT")
3130528
"^DD",9000022,9000022,1.02,0)
DESC ID REASON NOT DONE^F^^1;2^K:$L(X)>20!($L(X)<1) X
"^DD",9000022,9000022,1.02,3)
Answer must be 1-20 characters in length.
"^DD",9000022,9000022,1.02,"DT")
3130411
"^DD",9000022,9000022,1101,0)
COMMENT^F^^11;1^K:$L(X)>245!($L(X)<1) X
"^DD",9000022,9000022,1101,1,0)
^.1
"^DD",9000022,9000022,1101,1,1,0)
^^TRIGGER^9000022^.08
"^DD",9000022,9000022,1101,1,1,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,1101,1,1,2)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,1101,1,1,"CREATE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,1101,1,1,"DELETE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,1101,1,1,"FIELD")
#.08
"^DD",9000022,9000022,1101,3)
Answer must be 1-245 characters in length.
"^DD",9000022,9000022,1101,"DT")
3100706
"^DD",9000022,9000022,1204,0)
PROVIDER WHO DOCUMENTED^P200'^VA(200,^12;4^Q
"^DD",9000022,9000022,1204,1,0)
^.1
"^DD",9000022,9000022,1204,1,1,0)
^^TRIGGER^9000022^.08
"^DD",9000022,9000022,1204,1,1,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,1204,1,1,2)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^AUPNPREF(DIV(0),0)),DIV=X S $P(^(0),U,8)=DIV,DIH=9000022,DIG=.08 D ^DICR
"^DD",9000022,9000022,1204,1,1,"CREATE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,1204,1,1,"DELETE VALUE")
S X=$$NOW^XLFDT
"^DD",9000022,9000022,1204,1,1,"FIELD")
#.08
"^DD",9000022,9000022,1204,"DT")
3100706
"^DD",9000022,9000022,1216,0)
DATE/TIME ENTERED^D^^12;16^S %DT="ESTXR" D ^%DT S X=Y K:Y<1 X
"^DD",9000022,9000022,1216,1,0)
^.1
"^DD",9000022,9000022,1216,1,1,0)
^^TRIGGER^9000022^1217
"^DD",9000022,9000022,1216,1,1,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,12)):^(12),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X=DIV I '$G(APCDVMUX) S X=DUZ X ^DD(9000022,1216,1,1,1.4)
"^DD",9000022,9000022,1216,1,1,1.4)
S DIH=$G(^AUPNPREF(DIV(0),12)),DIV=X S $P(^(12),U,17)=DIV,DIH=9000022,DIG=1217 D ^DICR
"^DD",9000022,9000022,1216,1,1,2)
Q
"^DD",9000022,9000022,1216,1,1,"CREATE VALUE")
I '$G(APCDVMUX) S X=DUZ
"^DD",9000022,9000022,1216,1,1,"DELETE VALUE")
NO EFFECT
"^DD",9000022,9000022,1216,1,1,"DT")
3120423
"^DD",9000022,9000022,1216,1,1,"FIELD")
#1217
"^DD",9000022,9000022,1216,1,2,0)
^^TRIGGER^9000022^1218
"^DD",9000022,9000022,1216,1,2,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,12)):^(12),1:"") S X=$P(Y(1),U,18),X=X S DIU=X K Y S X=DIV I '$G(APCDVMUX) S X=$$NOW^XLFDT X ^DD(9000022,1216,1,2,1.4)
"^DD",9000022,9000022,1216,1,2,1.4)
S DIH=$G(^AUPNPREF(DIV(0),12)),DIV=X S $P(^(12),U,18)=DIV,DIH=9000022,DIG=1218 D ^DICR
"^DD",9000022,9000022,1216,1,2,2)
Q
"^DD",9000022,9000022,1216,1,2,"CREATE VALUE")
I '$G(APCDVMUX) S X=$$NOW^XLFDT
"^DD",9000022,9000022,1216,1,2,"DELETE VALUE")
NO EFFECT
"^DD",9000022,9000022,1216,1,2,"DT")
3120423
"^DD",9000022,9000022,1216,1,2,"FIELD")
#1218
"^DD",9000022,9000022,1216,"DT")
3120423
"^DD",9000022,9000022,1217,0)
ENTERED BY^P200'^VA(200,^12;17^Q
"^DD",9000022,9000022,1217,5,1,0)
9000022^1216^1
"^DD",9000022,9000022,1217,"DT")
3120301
"^DD",9000022,9000022,1218,0)
DATE/TIME LAST MODIFIED^D^^12;18^S %DT="ESTXR" D ^%DT S X=Y K:Y<1 X
"^DD",9000022,9000022,1218,1,0)
^.1
"^DD",9000022,9000022,1218,1,1,0)
^^TRIGGER^9000022^1219
"^DD",9000022,9000022,1218,1,1,1)
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^AUPNPREF(D0,12)):^(12),1:"") S X=$P(Y(1),U,19),X=X S DIU=X K Y S X=DIV I '$G(APCDVMUX) S X=DUZ X ^DD(9000022,1218,1,1,1.4)
"^DD",9000022,9000022,1218,1,1,1.4)
S DIH=$G(^AUPNPREF(DIV(0),12)),DIV=X S $P(^(12),U,19)=DIV,DIH=9000022,DIG=1219 D ^DICR
"^DD",9000022,9000022,1218,1,1,2)
Q
"^DD",9000022,9000022,1218,1,1,"CREATE VALUE")
I '$G(APCDVMUX) S X=DUZ
"^DD",9000022,9000022,1218,1,1,"DELETE VALUE")
NO EFFECT
"^DD",9000022,9000022,1218,1,1,"DT")
3120423
"^DD",9000022,9000022,1218,1,1,"FIELD")
#1219
"^DD",9000022,9000022,1218,5,1,0)
9000022^1216^2
"^DD",9000022,9000022,1218,"DT")
3120423
"^DD",9000022,9000022,1219,0)
LAST MODIFIED BY^P200'^VA(200,^12;19^Q
"^DD",9000022,9000022,1219,5,1,0)
9000022^1218^1
"^DD",9000022,9000022,1219,"DT")
3120301
"^DD",9000022,9000022,1301,0)
CONCEPT ID FOR REFUSED SERVICE^F^^13;1^K:$L(X)>20!($L(X)<1) X
"^DD",9000022,9000022,1301,3)
Answer must be 1-20 characters in length.
"^DD",9000022,9000022,1301,"DT")
3130416
"^DD",9000022,9000022,1302,0)
DESC ID FOR REFUSED SERVICE^F^^13;2^K:$L(X)>30!($L(X)<1) X
"^DD",9000022,9000022,1302,3)
Answer must be 1-30 characters in length.
"^DD",9000022,9000022,1302,"DT")
3130416
"^DD",9999999.102,9999999.102,0)
FIELD^^.06^7
"^DD",9999999.102,9999999.102,0,"DT")
3130416
"^DD",9999999.102,9999999.102,0,"IX","AM",9999999.102,.05)
"^DD",9999999.102,9999999.102,0,"IX","B",9999999.102,.01)
"^DD",9999999.102,9999999.102,0,"NM","REFUSAL REASONS")
"^DD",9999999.102,9999999.102,0,"VRPK")
BJPC
"^DD",9999999.102,9999999.102,.01,0)
CONCEPT ID^RF^^0;1^K:$L(X)>20!($L(X)<1)!'(X'?1P.E) X
"^DD",9999999.102,9999999.102,.01,1,0)
^.1
"^DD",9999999.102,9999999.102,.01,1,1,0)
9999999.102^B
"^DD",9999999.102,9999999.102,.01,1,1,1)
S ^AUTTREFR("B",$E(X,1,30),DA)=""
"^DD",9999999.102,9999999.102,.01,1,1,2)
K ^AUTTREFR("B",$E(X,1,30),DA)
"^DD",9999999.102,9999999.102,.01,3)
Answer must be 1-20 characters in length.
"^DD",9999999.102,9999999.102,.01,"DT")
3130411
"^DD",9999999.102,9999999.102,.019,0)
CONCEPT ID PREFERRED TERM^CJ40^^ ; ^S Y(9999999.102,.019,1)=$S($D(^AUTTREFR(D0,0)):^(0),1:"") S X=$P(Y(9999999.102,.019,1),U,1),X=$$CONFSN^AUPNVUTL(X)
"^DD",9999999.102,9999999.102,.019,9)
^
"^DD",9999999.102,9999999.102,.019,9.01)
9999999.102^.01
"^DD",9999999.102,9999999.102,.019,9.1)
AUPNCIDFSN(#.01)
"^DD",9999999.102,9999999.102,.019,"DT")
3130724
"^DD",9999999.102,9999999.102,.02,0)
USE WITH MEDICATION REFUSAL^S^1:YES;^0;2^Q
"^DD",9999999.102,9999999.102,.02,"DT")
3130411
"^DD",9999999.102,9999999.102,.03,0)
USE ONLY W/MEDICATION REFUSAL^S^1:YES;^0;3^Q
"^DD",9999999.102,9999999.102,.03,"DT")
3130411
"^DD",9999999.102,9999999.102,.04,0)
.07 CODE VALUE^S^R:DECLINED SERVICE;N:NOT MEDICALLY INDICATED;F:NO RESPONSE TO FOLLOWUP;P:PROVIDER DISCONTINUED;U:CONSIDERED AND NOT DONE;S:SYSTEM REASON;^0;4^Q
"^DD",9999999.102,9999999.102,.04,"DT")
3130411
"^DD",9999999.102,9999999.102,.05,0)
.07 MAP TO CONCEPT^S^R:DECLINED SERVICE;N:NOT MEDICALLY INDICATED;F:NO RESPONSE TO FOLLOWUP;P:PROVIDER DISCONTINUED;U:CONSIDERED AND NOT DONE;S:SYSTEM REASON;^0;5^Q
"^DD",9999999.102,9999999.102,.05,1,0)
^.1
"^DD",9999999.102,9999999.102,.05,1,1,0)
9999999.102^AM
"^DD",9999999.102,9999999.102,.05,1,1,1)
S ^AUTTREFR("AM",$E(X,1,30),DA)=""
"^DD",9999999.102,9999999.102,.05,1,1,2)
K ^AUTTREFR("AM",$E(X,1,30),DA)
"^DD",9999999.102,9999999.102,.05,1,1,"DT")
3130411
"^DD",9999999.102,9999999.102,.05,"DT")
3130411
"^DD",9999999.102,9999999.102,.06,0)
SCREEN^S^1:MEDS;2:ALL EXCEPT MEDS;3:ALL;^0;6^Q
"^DD",9999999.102,9999999.102,.06,"DT")
3130416
"^DD",9999999.73,9999999.73,0)
FIELD^^.03^3
"^DD",9999999.73,9999999.73,0,"DDA")
Y
"^DD",9999999.73,9999999.73,0,"DT")
2991209
"^DD",9999999.73,9999999.73,0,"IX","B",9999999.73,.01)
"^DD",9999999.73,9999999.73,0,"NM","REFUSAL TYPE")
"^DD",9999999.73,9999999.73,0,"PT",811.902,.01)
"^DD",9999999.73,9999999.73,0,"PT",9000022,.01)
"^DD",9999999.73,9999999.73,0,"PT",9001002.215,.01)
"^DD",9999999.73,9999999.73,0,"PT",9003203.215,.01)
"^DD",9999999.73,9999999.73,0,"VRPK")
AUT
"^DD",9999999.73,9999999.73,.01,0)
REFUSAL TYPE^RF^^0;1^K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X
"^DD",9999999.73,9999999.73,.01,1,0)
^.1
"^DD",9999999.73,9999999.73,.01,1,1,0)
9999999.73^B
"^DD",9999999.73,9999999.73,.01,1,1,1)
S ^AUTTREFT("B",$E(X,1,30),DA)=""
"^DD",9999999.73,9999999.73,.01,1,1,2)
K ^AUTTREFT("B",$E(X,1,30),DA)
"^DD",9999999.73,9999999.73,.01,3)
Answer must be 3-30 characters in length.
"^DD",9999999.73,9999999.73,.01,"DT")
2991209
"^DD",9999999.73,9999999.73,.02,0)
PRIMARY FILE^RP1'^DIC(^0;2^Q
"^DD",9999999.73,9999999.73,.02,"DT")
2991209
"^DD",9999999.73,9999999.73,.03,0)
FIELD FOR DESCRIPTION^RF^^0;3^K:$L(X)>20!($L(X)<1) X
"^DD",9999999.73,9999999.73,.03,3)
Answer must be 1-20 characters in length.
"^DD",9999999.73,9999999.73,.03,"DT")
2991209
"^DIC",9000022,9000022,0)
PATIENT REFUSALS FOR SERVICE/NMI^9000022
"^DIC",9000022,9000022,0,"GL")
^AUPNPREF(
"^DIC",9000022,9000022,"%D",0)
^^2^2^3081113^
"^DIC",9000022,9000022,"%D",1,0)
This file contains all refusals for patient services. The reason for
"^DIC",9000022,9000022,"%D",2,0)
refusal can be documented.
"^DIC",9000022,"B","PATIENT REFUSALS FOR SERVICE/NMI",9000022)
"^DIC",9999999.102,9999999.102,0)
REFUSAL REASONS^9999999.102
"^DIC",9999999.102,9999999.102,0,"GL")
^AUTTREFR(
"^DIC",9999999.102,"B","REFUSAL REASONS",9999999.102)
"^DIC",9999999.73,9999999.73,0)
REFUSAL TYPE^9999999.73
"^DIC",9999999.73,9999999.73,0,"GL")
^AUTTREFT(
"^DIC",9999999.73,9999999.73,"%D",0)
^^19^19^3020920^
"^DIC",9999999.73,9999999.73,"%D",1,0)
DATA DICTIONARY...:
"^DIC",9999999.73,9999999.73,"%D",2,0)
This is a standard RPMS data dictionary, maintained in the AUT package.
"^DIC",9999999.73,9999999.73,"%D",3,0)
Changes to this data dictionary must be submitted to the RPMS DBA.
"^DIC",9999999.73,9999999.73,"%D",4,0)
"^DIC",9999999.73,9999999.73,"%D",5,0)
ENTRIES IN THIS FILE...:
"^DIC",9999999.73,9999999.73,"%D",6,0)
This is a standard RPMS dd designed to accomodate local entry, and to
"^DIC",9999999.73,9999999.73,"%D",7,0)
be translated from one uci into all uci's. Entries into REFUSAL TYPE is
"^DIC",9999999.73,9999999.73,"%D",8,0)
locally controlled (non-standard codeset), but is initially populated with
"^DIC",9999999.73,9999999.73,"%D",9,0)
a core set of entries.
"^DIC",9999999.73,9999999.73,"%D",10,0)
"^DIC",9999999.73,9999999.73,"%D",11,0)
HISTORY:
"^DIC",9999999.73,9999999.73,"%D",12,0)
12/09/99 - The REFUSAL TYPE file is created at the request of the Patient
"^DIC",9999999.73,9999999.73,"%D",13,0)
Care Component. There is a patient (AUPN) file that will allow the user
"^DIC",9999999.73,9999999.73,"%D",14,0)
to enter a service that the patient refused. E.g., refusing a mammogram.
"^DIC",9999999.73,9999999.73,"%D",15,0)
The REFUSAL TYPE file will contain the type of refusal.
"^DIC",9999999.73,9999999.73,"%D",16,0)
"^DIC",9999999.73,9999999.73,"%D",17,0)
Feb 00 - Distribution accomplished via AUT*98.1*5, in support of AUPN and
"^DIC",9999999.73,9999999.73,"%D",18,0)
APCD. Initially populated with 8 entries.
"^DIC",9999999.73,"B","REFUSAL TYPE",9999999.73)
**END**
**END**
| Genshi | 3 | mdgeek/VistA-FHIR-CWF | Scripts/Install/CWF/kid/15-bgoref-1.0.kid | [
"Apache-2.0"
] |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Text;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.EditorConfigSettings.DataProvider
{
public partial class DataProviderTests
{
private class TestViewModel : ISettingsEditorViewModel
{
public void NotifyOfUpdate() { }
Task<SourceText> ISettingsEditorViewModel.UpdateEditorConfigAsync(SourceText sourceText)
{
throw new NotImplementedException();
}
}
}
}
| C# | 3 | Cadris/roslyn | src/EditorFeatures/CSharpTest/EditorConfigSettings/DataProvider/DataProviderTests.TestViewModel.cs | [
"MIT"
] |
INSERT INTO CITY (ID, NAME, STATE, COUNTRY) values (2000, 'Washington', 'DC', 'US');
INSERT INTO CITY (ID, NAME, STATE, COUNTRY) values (2001, 'San Francisco', 'CA', 'US');
| SQL | 3 | techAi007/spring-boot | spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-r2dbc/src/main/resources/data.sql | [
"Apache-2.0"
] |
; Basic setup script for the Inno Setup installer builder. For more
; information on the free installer builder, see www.jrsoftware.org.
;
; This script was contributed by Tim Peters.
; It was designed for Inno Setup 2.0.19 but works with later versions as well.
[Setup]
AppName=Expat
AppId=expat
AppVersion=2.1.0
AppVerName=Expat 2.1.0
AppCopyright=Copyright 1998-2012 Thai Open Source Software Center, Clark Cooper, and the Expat maintainers
AppPublisher=The Expat Developers
AppPublisherURL=http://www.libexpat.org/
AppSupportURL=http://www.libexpat.org/
AppUpdatesURL=http://www.libexpat.org/
UninstallDisplayName=Expat XML Parser 2.1.0
VersionInfoVersion=2.1.0
DefaultDirName={pf}\Expat 2.1.0
UninstallFilesDir={app}\Uninstall
Compression=lzma
SolidCompression=yes
SourceDir=..
OutputDir=win32
DisableStartupPrompt=yes
AllowNoIcons=yes
DisableProgramGroupPage=yes
DisableReadyPage=yes
[Files]
Flags: ignoreversion; Source: win32\bin\Release\xmlwf.exe; DestDir: "{app}\Bin"
Flags: ignoreversion; Source: win32\MANIFEST.txt; DestDir: "{app}"
Flags: ignoreversion; Source: Changes; DestDir: "{app}"; DestName: Changes.txt
Flags: ignoreversion; Source: COPYING; DestDir: "{app}"; DestName: COPYING.txt
Flags: ignoreversion; Source: README; DestDir: "{app}"; DestName: README.txt
Flags: ignoreversion; Source: doc\*.html; DestDir: "{app}\Doc"
Flags: ignoreversion; Source: doc\*.css; DestDir: "{app}\Doc"
Flags: ignoreversion; Source: doc\*.png; DestDir: "{app}\Doc"
Flags: ignoreversion; Source: win32\bin\Release\*.dll; DestDir: "{app}\Bin"
Flags: ignoreversion; Source: win32\bin\Release\*.lib; DestDir: "{app}\Bin"
Flags: ignoreversion; Source: expat.dsw; DestDir: "{app}\Source"
Flags: ignoreversion; Source: win32\README.txt; DestDir: "{app}\Source"
Flags: ignoreversion; Source: bcb5\*.bp*; DestDir: "{app}\Source\bcb5"
Flags: ignoreversion; Source: bcb5\*.mak; DestDir: "{app}\Source\bcb5"
Flags: ignoreversion; Source: bcb5\*.def; DestDir: "{app}\Source\bcb5"
Flags: ignoreversion; Source: bcb5\*.txt; DestDir: "{app}\Source\bcb5"
Flags: ignoreversion; Source: bcb5\*.bat; DestDir: "{app}\Source\bcb5"
Flags: ignoreversion; Source: lib\*.c; DestDir: "{app}\Source\lib"
Flags: ignoreversion; Source: lib\*.h; DestDir: "{app}\Source\lib"
Flags: ignoreversion; Source: lib\*.def; DestDir: "{app}\Source\lib"
Flags: ignoreversion; Source: lib\*.dsp; DestDir: "{app}\Source\lib"
Flags: ignoreversion; Source: examples\*.c; DestDir: "{app}\Source\examples"
Flags: ignoreversion; Source: examples\*.dsp; DestDir: "{app}\Source\examples"
Flags: ignoreversion; Source: tests\*.c; DestDir: "{app}\Source\tests"
Flags: ignoreversion; Source: tests\*.cpp; DestDir: "{app}\Source\tests"
Flags: ignoreversion; Source: tests\*.h; DestDir: "{app}\Source\tests"
Flags: ignoreversion; Source: tests\README.txt; DestDir: "{app}\Source\tests"
Flags: ignoreversion; Source: tests\benchmark\*.c; DestDir: "{app}\Source\tests\benchmark"
Flags: ignoreversion; Source: tests\benchmark\*.ds*; DestDir: "{app}\Source\tests\benchmark"
Flags: ignoreversion; Source: tests\benchmark\README.txt; DestDir: "{app}\Source\tests\benchmark"
Flags: ignoreversion; Source: xmlwf\*.c*; DestDir: "{app}\Source\xmlwf"
Flags: ignoreversion; Source: xmlwf\*.h; DestDir: "{app}\Source\xmlwf"
Flags: ignoreversion; Source: xmlwf\*.dsp; DestDir: "{app}\Source\xmlwf"
[Messages]
WelcomeLabel1=Welcome to the Expat XML Parser Setup Wizard
WelcomeLabel2=This will install [name/ver] on your computer.%n%nExpat is an XML parser with a C-language API, and is primarily made available to allow developers to build applications which use XML using a portable API and fast implementation.%n%nIt is strongly recommended that you close all other applications you have running before continuing. This will help prevent any conflicts during the installation process.
| Inno Setup | 3 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/Inno Setup/expat.iss | [
"MIT"
] |
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mozlinguas-v2.eclass
# @MAINTAINER:
# mozilla@gentoo.org
# @AUTHOR:
# Nirbheek Chauhan <nirbheek@gentoo.org>
# Ian Stakenvicius <axs@gentoo.org>
# @SUPPORTED_EAPIS: 2 3 4 5 6
# @BLURB: Handle language packs for mozilla products
# @DESCRIPTION:
# Sets IUSE according to MOZ_LANGS (language packs available). Also exports
# src_unpack, src_compile and src_install for use in ebuilds, and provides
# supporting functions for langpack generation and installation.
inherit mozextension
case "${EAPI:-0}" in
0|1)
die "EAPI ${EAPI:-0} does not support the '->' SRC_URI operator";;
2|3|4|5|6)
EXPORT_FUNCTIONS src_unpack src_compile src_install;;
*)
die "EAPI ${EAPI} is not supported, contact eclass maintainers";;
esac
# @ECLASS-VARIABLE: MOZ_LANGS
# @DESCRIPTION:
# Array containing the list of language pack xpis available for
# this release. The list can be updated with scripts/get_langs.sh from the
# mozilla overlay.
: ${MOZ_LANGS:=()}
# @ECLASS-VARIABLE: MOZ_PV
# @DESCRIPTION:
# Ebuild package version converted to equivalent upstream version.
# Defaults to ${PV}, and should be overridden for alphas, betas, and RCs
: ${MOZ_PV:="${PV}"}
# @ECLASS-VARIABLE: MOZ_PN
# @DESCRIPTION:
# Ebuild package name converted to equivalent upstream name.
# Defaults to ${PN}, and should be overridden for binary ebuilds.
: ${MOZ_PN:="${PN}"}
# @ECLASS-VARIABLE: MOZ_P
# @DESCRIPTION:
# Ebuild package name + version converted to upstream equivalent.
# Defaults to ${MOZ_PN}-${MOZ_PV}
: ${MOZ_P:="${MOZ_PN}-${MOZ_PV}"}
# @ECLASS-VARIABLE: MOZ_FTP_URI
# @DESCRIPTION:
# The ftp URI prefix for the release tarballs and language packs.
: ${MOZ_FTP_URI:=""}
# @ECLASS-VARIABLE: MOZ_HTTP_URI
# @DESCRIPTION:
# The http URI prefix for the release tarballs and language packs.
: ${MOZ_HTTP_URI:=""}
# @ECLASS-VARIABLE: MOZ_LANGPACK_HTTP_URI
# @DESCRIPTION:
# An alternative http URI if it differs from official mozilla URI.
# Defaults to whatever MOZ_HTTP_URI was set to.
: ${MOZ_LANGPACK_HTTP_URI:=${MOZ_HTTP_URI}}
# @ECLASS-VARIABLE: MOZ_LANGPACK_PREFIX
# @DESCRIPTION:
# The relative path till the lang code in the langpack file URI.
# Defaults to ${MOZ_PV}/linux-i686/xpi/
: ${MOZ_LANGPACK_PREFIX:="${MOZ_PV}/linux-i686/xpi/"}
# @ECLASS-VARIABLE: MOZ_LANGPACK_SUFFIX
# @DESCRIPTION:
# The suffix after the lang code in the langpack file URI.
# Defaults to '.xpi'
: ${MOZ_LANGPACK_SUFFIX:=".xpi"}
# @ECLASS-VARIABLE: MOZ_LANGPACK_UNOFFICIAL
# @DESCRIPTION:
# The status of the langpack, used to differentiate within
# Manifests and on Gentoo mirrors as to when the langpacks are
# generated officially by Mozilla or if they were generated
# unofficially by others (ie the Gentoo mozilla team). When
# this var is set, the distfile will have a .unofficial.xpi
# suffix.
: ${MOZ_LANGPACK_UNOFFICIAL:=""}
# @ECLASS-VARIABLE: MOZ_GENERATE_LANGPACKS
# @DESCRIPTION:
# This flag specifies whether or not the langpacks should be
# generated directly during the build process, rather than
# being downloaded and installed from upstream pre-built
# extensions. Primarily it supports pre-release builds.
# Defaults to empty.
: ${MOZ_GENERATE_LANGPACKS:=""}
# @ECLASS-VARIABLE: MOZ_L10N_SOURCEDIR
# @DESCRIPTION:
# The path that l10n sources can be found at, once unpacked.
# Defaults to ${WORKDIR}/l10n-sources
: ${MOZ_L10N_SOURCEDIR:="${WORKDIR}/l10n-sources"}
# @ECLASS-VARIABLE: MOZ_L10N_URI_PREFIX
# @DESCRIPTION:
# The full URI prefix of the distfile for each l10n locale. The
# AB_CD and MOZ_L10N_URI_SUFFIX will be appended to this to complete the
# SRC_URI when MOZ_GENERATE_LANGPACKS is set. If empty, nothing will
# be added to SRC_URI.
# Defaults to empty.
: ${MOZ_L10N_URI_PREFIX:=""}
# @ECLASS-VARIABLE: MOZ_L10N_URI_SUFFIX
# @DESCRIPTION:
# The suffix of l10n source distfiles.
# Defaults to '.tar.xz'
: ${MOZ_L10N_URI_SUFFIX:=".tar.xz"}
# @ECLASS-VARIABLE: MOZ_FORCE_UPSTREAM_L10N
# @DESCRIPTION:
# Set this to use upstream langpaks even if the package normally
# shouldn't (ie it is an alpha or beta package)
: ${MOZ_FORCE_UPSTREAM_L10N:=""}
# @ECLASS-VARIABLE: MOZ_TOO_REGIONALIZED_FOR_L10N
# @INTERNAL
# @DESCRIPTION:
# Upstream identifiers that should not contain region subtags in L10N
MOZ_TOO_REGIONALIZED_FOR_L10N=( fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO nn-NO pa-IN sv-SE )
# @ECLASS-VARIABLE: MOZ_INSTALL_L10N_XPIFILE
# @DESCRIPTION:
# Install langpacks as .xpi file instead of unpacked directory.
# Leave unset to install unpacked
: ${MOZ_INSTALL_L10N_XPIFILE:=""}
# Add l10n_* to IUSE according to available language packs
# No language packs for alphas and betas
if ! [[ -n ${MOZ_GENERATE_LANGPACKS} ]] ; then
if ! [[ ${PV} =~ alpha|beta ]] || { [[ ${PN} == seamonkey ]] && ! [[ ${PV} =~ alpha ]] ; } || [[ -n ${MOZ_FORCE_UPSTREAM_L10N} ]] ; then
[[ -z ${MOZ_FTP_URI} ]] && [[ -z ${MOZ_LANGPACK_HTTP_URI} ]] && die "No URI set to download langpacks, please set one of MOZ_{FTP,HTTP_LANGPACK}_URI"
for x in "${MOZ_LANGS[@]}" ; do
# en and en_US are handled internally
if [[ ${x} == en ]] || [[ ${x} == en-US ]]; then
continue
fi
# strip region subtag if $x is in the list
if has ${x} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
xflag=${x%%-*}
else
xflag=${x}
fi
SRC_URI+=" l10n_${xflag/[_@]/-}? ("
[[ -n ${MOZ_FTP_URI} ]] && SRC_URI+="
${MOZ_FTP_URI}/${MOZ_LANGPACK_PREFIX}${x}${MOZ_LANGPACK_SUFFIX} -> ${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi"
[[ -n ${MOZ_LANGPACK_HTTP_URI} ]] && SRC_URI+="
${MOZ_LANGPACK_HTTP_URI}/${MOZ_LANGPACK_PREFIX}${x}${MOZ_LANGPACK_SUFFIX} -> ${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi"
SRC_URI+=" )"
IUSE+=" l10n_${xflag/[_@]/-}"
# We used to do some magic if specific/generic locales were missing, but
# we stopped doing that due to bug 325195.
done
fi
else
for x in "${MOZ_LANGS[@]}" ; do
# en and en_US are handled internally
if [[ ${x} == en ]] || [[ ${x} == en-US ]]; then
continue
fi
# strip region subtag if $x is in the list
if has ${x} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
xflag=${x%%-*}
else
xflag=${x}
fi
# Do NOT grab l10n sources from hg tip at this time, since it is a moving target
# if [[ ${PV} =~ alpha ]]; then
# # Please note that this URI is not deterministic - digest breakage could occur
# SRC_URI+=" l10n_${xflag/[_@]/-}? ( http://hg.mozilla.org/releases/l10n/mozilla-aurora/ach/archive/tip.tar.bz2 -> ${MOZ_P}-l10n-${x}.tar.bz2 )"
# elif [[ ${PV} =~ beta ]] && ! [[ ${PN} == seamonkey ]]; then
# # Please note that this URI is not deterministic - digest breakage could occur
# SRC_URI+=" l10n_${xflag/[_@]/-}? ( http://hg.mozilla.org/releases/l10n/mozilla-beta/ach/archive/tip.tar.bz2 -> ${MOZ_P}-l10n-${x}.tar.bz2 )"
# elif [[ -n ${MOZ_L10N_URI_PREFIX} ]]; then
if [[ -n ${MOZ_L10N_URI_PREFIX} ]]; then
SRC_URI+=" l10n_${xflag/[_@]/-}? ( ${MOZ_L10N_URI_PREFIX}${x}${MOZ_L10N_URI_SUFFIX} )"
fi
IUSE+=" l10n_${xflag/[_@]/-}"
done
fi
unset x xflag
# @FUNCTION: mozlinguas_export
# @INTERNAL
# @DESCRIPTION:
# Generate the list of language packs called "mozlinguas"
# This list is used to unpack and install the xpi language packs
mozlinguas_export() {
if [[ ${PN} == seamonkey ]] ; then
[[ ${PV} =~ alpha ]] && ! [[ -n ${MOZ_GENERATE_LANGPACKS} ]] && return
else
[[ ${PV} =~ alpha|beta ]] && ! [[ -n ${MOZ_GENERATE_LANGPACKS} ]] && return
fi
local lingua lflag
mozlinguas=()
# Set mozlinguas based on the enabled l10n_* USE flags.
for lingua in "${MOZ_LANGS[@]}"; do
# strip region subtag if $x is in the list
if has ${lingua} en en-US; then
# For mozilla products, en and en_US are handled internally
continue
elif has ${lingua} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
lflag=${lingua%%-*}
else
lflag=${lingua}
fi
use l10n_${lflag/[_@]/-} && mozlinguas+=( ${lingua} )
done
# Compatibility code - Check LINGUAS and warn if anything set there isn't enabled via l10n
for lingua in ${LINGUAS}; do
if has ${lingua//[_@]/-} en en-US; then
# For mozilla products, en and en_US are handled internally
continue
# If this language is supported by ${P},
elif has ${lingua} "${MOZ_LANGS[@]//-/_}"; then
# Warn the language is missing, if it isn't already there
has ${lingua//[_@]/-} "${mozlinguas[@]//[_@]/-}" || \
ewarn "LINGUAS value ${lingua} is not enabled using L10N use flags"
continue
# For each short lingua that isn't in MOZ_LANGS,
# We used to add *all* long MOZ_LANGS to the mozlinguas list,
# but we stopped doing that due to bug 325195.
else
:
fi
einfo "Sorry, but ${P} does not support the ${lingua} locale in LINGUAS"
done
}
# @FUNCTION: mozlinguas_src_unpack
# @DESCRIPTION:
# Unpack xpi language packs according to the user's LINGUAS settings
mozlinguas_src_unpack() {
local x
if ! [[ -n ${MOZ_GENERATE_LANGPACKS} ]]; then
mozlinguas_export
for x in "${mozlinguas[@]}"; do
# FIXME: Add support for unpacking xpis to portage
xpi_unpack "${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi"
done
if [[ "${mozlinguas[*]}" != "" && "${mozlinguas[*]}" != "en" ]]; then
einfo "Selected language packs (first will be default): ${mozlinguas[*]}"
fi
fi
}
# For the phase function export
mozlinguas-v2_src_unpack() {
mozlinguas_src_unpack
}
# @FUNCTION: mozlinguas_mozconfig
# @DESCRIPTION:
# if applicable, add the necessary flag to .mozconfig to support
# the generation of locales. Note that this function requires
# mozconfig_annontate to already be declared via an inherit of
# mozconfig or mozcoreconf.
mozlinguas_mozconfig() {
if [[ -n ${MOZ_GENERATE_LANGPACKS} ]]; then
if declare -f mozconfig_annotate >/dev/null ; then
mozconfig_annotate 'for building locales' --with-l10n-base=${MOZ_L10N_SOURCEDIR}
else
die "Could not configure l10n-base, mozconfig_annotate not declared -- missing inherit?"
fi
fi
}
# @FUNCTION: mozlinguas_src_compile
# @DESCRIPTION:
# if applicable, build the selected locales.
mozlinguas_src_compile() {
if [[ -n ${MOZ_GENERATE_LANGPACKS} ]]; then
# leverage BUILD_OBJ_DIR if set otherwise assume PWD.
local x y targets=( "langpack" ) localedir="${BUILD_OBJ_DIR:-.}"
case ${PN} in
*firefox)
localedir+="/browser/locales"
;;
seamonkey)
localedir+="/suite/locales"
;;
*thunderbird)
localedir+="/mail/locales"
targets+=( "calendar-langpack" )
;;
*) die "Building locales for ${PN} is not supported."
esac
pushd "${localedir}" > /dev/null || die
mozlinguas_export
for x in "${mozlinguas[@]}"; do for y in "${targets[@]}"; do
emake ${y}-${x} LOCALE_MERGEDIR="./${y}-${x}"
done; done
popd > /dev/null || die
fi
}
# For the phase function export
mozlinguas-v2_src_compile() {
mozlinguas_src_compile
}
# @FUNCTION: mozlinguas_xpistage_langpacks
# @DESCRIPTION:
# Add extra langpacks to the xpi-stage dir for prebuilt plugins
#
# First argument is the path to the extension
# Second argument is the prefix of the source (same as first if unspecified)
# Remaining arguments are the modules in the extension that are localized
# (basename of first if unspecified)
#
# Example - installing extra langpacks for lightning:
# src_install() {
# ... # general installation steps
# mozlinguas_xpistage_langpacks \
# "${BUILD_OBJ_DIR}"/dist/xpi-stage/lightning \
# "${WORKDIR}"/lightning \
# lightning calendar
# ... # proceed with installation from the xpi-stage dir
# }
mozlinguas_xpistage_langpacks() {
local l c modpath="${1}" srcprefix="${1}" modules=( "${1##*/}" )
shift
if [[ -n ${1} ]] ; then srcprefix="${1}" ; shift ; fi
if [[ -n ${1} ]] ; then modules=( $@ ) ; fi
mozlinguas_export
mkdir -p "${modpath}/chrome" || die
for l in "${mozlinguas[@]}"; do for c in "${modules[@]}" ; do
if [[ -e "${srcprefix}-${l}/chrome/${c}-${l}" ]]; then
cp -RLp -t "${modpath}/chrome" "${srcprefix}-${l}/chrome/${c}-${l}" || die
grep "locale ${c} ${l} chrome/" "${srcprefix}-${l}/chrome.manifest" \
>>"${modpath}/chrome.manifest" || die
elif [[ -e "${srcprefix}/chrome/${c}-${l}" ]]; then
cp -RLp -t "${modpath}/chrome" "${srcprefix}/chrome/${c}-${l}" || die
grep "locale ${c} ${l} chrome/" "${srcprefix}/chrome.manifest" \
>>"${modpath}/chrome.manifest" || die
else
ewarn "Locale ${l} was not found for ${c}, skipping."
fi
done; done
}
# @FUNCTION: mozlinguas-v2_src_install
# @DESCRIPTION:
# Install xpi language packs according to the user's L10N settings
# NOTE - uses ${BUILD_OBJ_DIR} or PWD if unset, for source-generated langpacks
mozlinguas_src_install() {
local x
mozlinguas_export
if [[ -n ${MOZ_GENERATE_LANGPACKS} ]] && [[ -n ${mozlinguas[*]} ]]; then
local repopath="${WORKDIR}/${PN}-generated-langpacks"
mkdir -p "${repopath}" || die
pushd "${BUILD_OBJ_DIR:-.}"/dist/*/xpi > /dev/null || die
for x in "${mozlinguas[@]}"; do
cp "${MOZ_P}.${x}.langpack.xpi" \
"${repopath}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi" || die
xpi_unpack "${repopath}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi"
done
popd > /dev/null || die
fi
for x in "${mozlinguas[@]}"; do
if [[ -n ${MOZ_INSTALL_L10N_XPIFILE} ]]; then
xpi_copy "${WORKDIR}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}"
else
xpi_install "${WORKDIR}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}"
fi
done
}
# For the phase function export
mozlinguas-v2_src_install() {
mozlinguas_src_install
}
| Gentoo Eclass | 5 | NighttimeDriver50000/Sabayon-Packages | local_overlay/eclass/mozlinguas-v2.eclass | [
"MIT"
] |
# Test long literals with missing end
@prefix : <http://example.org/ex#> .
:a :b """a long
literal
with
newlines
| Turtle | 2 | joshrose/audacity | lib-src/lv2/serd/tests/bad/bad-14.ttl | [
"CC-BY-3.0"
] |
#include <ATen/core/ATenGeneral.h>
| C++ | 0 | Hacky-DH/pytorch | aten/src/ATen/core/ATenGeneral.cpp | [
"Intel"
] |
2016-02-18 12:59:22 > fsociety (whoami@localhost) has joined #NicholasB
2016-02-18 12:59:22 [12:59]
2016-02-18 12:59:22 - Channel #NicholasB: 2 nicks (2 ops, 0 halfops, 0 voices, 0 normals)
| IRC log | 0 | 0x4b1dN/2016-dots | misc/weechat/logs/irc.bitlbee.#nicholasb.weechatlog | [
"MIT"
] |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Http;
using Xunit;
namespace Microsoft.AspNetCore.Mvc
{
public class HttpNotFoundResultTests
{
[Fact]
public void HttpNotFoundResult_InitializesStatusCode()
{
// Arrange & act
var notFound = new NotFoundResult();
// Assert
Assert.Equal(StatusCodes.Status404NotFound, notFound.StatusCode);
}
}
} | C# | 4 | tomaswesterlund/aspnetcore | src/Mvc/Mvc.Core/test/HttpNotFoundResultTests.cs | [
"MIT"
] |
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/lite/delegates/gpu/common/task/testing_util.h"
#include "absl/strings/str_cat.h"
namespace tflite {
namespace gpu {
absl::Status PointWiseNear(const std::vector<float>& ref,
const std::vector<float>& to_compare, float eps) {
if (ref.size() != to_compare.size()) {
return absl::InternalError(absl::StrCat("ref size(", ref.size(),
") != to_compare size(",
to_compare.size(), ")"));
}
for (int i = 0; i < ref.size(); ++i) {
const float abs_diff = fabs(ref[i] - to_compare[i]);
if (abs_diff > eps) {
return absl::InternalError(absl::StrCat(
"ref[", i, "] = ", ref[i], ", to_compare[", i, "] = ", to_compare[i],
", abs diff = ", abs_diff, " > ", eps, " (eps)"));
}
}
return absl::OkStatus();
}
} // namespace gpu
} // namespace tflite
| C++ | 4 | EricRemmerswaal/tensorflow | tensorflow/lite/delegates/gpu/common/task/testing_util.cc | [
"Apache-2.0"
] |
751e76e8199196d454941c45d1b3a323f1433bd6
7dd65592d0ab2fe0d0257d571abf032cd9db93dc
5dedfbf9ea599dd4e3ca6a80b333c472fd0b3f69
9652d86bedf43ad264362e6e6eba6eb764508127
8f9dff39a81ee4abcbad2ad8bafff090415a2be8
f93ec34e9e34a8f8ff7d600cdad83047b1bcb45c
e2192e8a7dd8dd1c88321959b477968b941aa973
dce76b2613052ea012204404a97b3c25eac31715
7d0f6c64afb419bbd7e971e943d7404b0e0daab4
d7729816650e581d7462d52ad6f732da0e2ec93b
f8c698da3164ef8fa4258692d118cc9a902c5acc
85a1f9ba4da24c24e582d9b891dacbd1b043f971
f932d0188616c964416b91fb9cf76ba9790a921e
97f9281a1383879d72ac52a6a3e9e8b9a4a4f655
fe7c45126731f7384640b0b0045fd40bac72e2a2
7025b4efb3ff42eb4d6d71fab6b53b4f4967e3dd
b67cb6edeabc0c8b927c9ea327628e7aa63e2d52
ad1e852b08eba53df306ec9daa8c643426953f94
ebfbe6819fcdebab061732ce91df7d586a037dee
b907c3a2a3b27789dfb509b730dd47703c272868
29a78213caa9eea824acf08022ab9dfc83414f56
7ff45303774ef7a52fffd8011981034b258cb86b
d0a79df189fe1ad5c306cc70497b358415da579e
0959e80121f36aea13b3bad361c15dac26189e2f
2f396b29b27324300d0c59b17c3abc1835bd3dbb
bfebb73562d4541b32a02ba664d140b5a574792f
0c7aaf6caa7e5424b63d317f0f8f1f9fa40d5560
1306b9e4ff56513a476841bac7ba48d69516b1da
5a416cc9148f4a377b672c8ae5d3287adaafadec
d39c4704664e1deb76c9331e637564c257d68a08
d805f6f251f7479ebd853b3d0f4b9b2656d92f1d
9e42601eeaedc244e15f17375adb0e2cd08efdc9
| RMarkdown | 0 | Axeleron/keyhunt | tests/1to32.rmd | [
"MIT"
] |
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.types;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
import org.jetbrains.kotlin.descriptors.ClassifierDescriptor;
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor;
import org.jetbrains.kotlin.resolve.calls.inference.CallHandle;
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystem;
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderImpl;
import org.jetbrains.kotlin.types.checker.KotlinTypeChecker;
import java.util.*;
import static org.jetbrains.kotlin.resolve.calls.inference.constraintPosition.ConstraintPositionKind.SPECIAL;
import static org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getBuiltIns;
public class TypeIntersector {
public static boolean isIntersectionEmpty(@NotNull KotlinType typeA, @NotNull KotlinType typeB) {
return intersectTypes(new LinkedHashSet<>(Arrays.asList(typeA, typeB))) == null;
}
@Nullable
public static KotlinType intersectTypes(@NotNull Collection<KotlinType> types) {
assert !types.isEmpty() : "Attempting to intersect empty collection of types, this case should be dealt with on the call site.";
if (types.size() == 1) {
return types.iterator().next();
}
// Intersection of T1..Tn is an intersection of their non-null versions,
// made nullable is they all were nullable
KotlinType nothingOrNullableNothing = null;
boolean allNullable = true;
List<KotlinType> nullabilityStripped = new ArrayList<>(types.size());
for (KotlinType type : types) {
if (KotlinTypeKt.isError(type)) continue;
if (KotlinBuiltIns.isNothingOrNullableNothing(type)) {
nothingOrNullableNothing = type;
}
allNullable &= type.isMarkedNullable();
nullabilityStripped.add(TypeUtils.makeNotNullable(type));
}
if (nothingOrNullableNothing != null) {
return TypeUtils.makeNullableAsSpecified(nothingOrNullableNothing, allNullable);
}
if (nullabilityStripped.isEmpty()) {
// All types were errors
return ErrorUtils.createErrorType("Intersection of error types: " + types);
}
KotlinTypeChecker typeChecker = KotlinTypeChecker.DEFAULT;
// Now we remove types that have subtypes in the list
List<KotlinType> resultingTypes = new ArrayList<>();
outer:
for (KotlinType type : nullabilityStripped) {
if (!TypeUtils.canHaveSubtypes(typeChecker, type)) {
boolean relativeToAll = true;
for (KotlinType other : nullabilityStripped) {
// It makes sense to check for subtyping (other <: type), despite that
// type is not supposed to be open, for there're enums
boolean mayBeEqual = TypeUnifier.mayBeEqual(type, other);
boolean relative = typeChecker.isSubtypeOf(type, other) || typeChecker.isSubtypeOf(other, type);
if (!mayBeEqual && !relative) {
return null;
}
else if (!relative) {
// To build T & (final A), instead of returning just A as intersection
relativeToAll = false;
break;
}
}
if (relativeToAll) return TypeUtils.makeNullableAsSpecified(type, allNullable);
}
for (KotlinType other : nullabilityStripped) {
if (!type.equals(other) && typeChecker.isSubtypeOf(other, type)) {
continue outer;
}
}
// Don't add type if it is already present, to avoid trivial type intersections in result
for (KotlinType other : resultingTypes) {
if (typeChecker.equalTypes(other, type)) {
continue outer;
}
}
resultingTypes.add(type);
}
if (resultingTypes.isEmpty()) {
// If we ended up here, it means that all types from `nullabilityStripped` were excluded by the code above
// most likely, this is because they are all semantically interchangeable (e.g. List<Foo>! and List<Foo>),
// in that case, we can safely select the best representative out of that set and return it
// TODO: maybe return the most specific among the types that are subtypes to all others in the `nullabilityStripped`?
// TODO: e.g. among {Int, Int?, Int!}, return `Int` (now it returns `Int!`).
KotlinType bestRepresentative = FlexibleTypesKt.singleBestRepresentative(nullabilityStripped);
if (bestRepresentative == null) {
bestRepresentative = UtilsKt.hackForTypeIntersector(nullabilityStripped);
}
if (bestRepresentative == null) {
throw new AssertionError("Empty intersection for types " + types);
}
return TypeUtils.makeNullableAsSpecified(bestRepresentative, allNullable);
}
if (resultingTypes.size() == 1) {
return TypeUtils.makeNullableAsSpecified(resultingTypes.get(0), allNullable);
}
return new IntersectionTypeConstructor(resultingTypes).createType();
}
/**
* Note: this method was used in overload and override bindings to approximate type parameters with several bounds,
* but as it turned out at some point, that logic was inconsistent with Java rules, so it was simplified.
* Most of the other usages of this method are left untouched but probably should be investigated closely if they're still valid.
*/
@NotNull
public static KotlinType getUpperBoundsAsType(@NotNull TypeParameterDescriptor descriptor) {
return intersectUpperBounds(descriptor, descriptor.getUpperBounds());
}
public static KotlinType intersectUpperBounds(@NotNull TypeParameterDescriptor descriptor, @NotNull List<KotlinType> upperBounds) {
assert !upperBounds.isEmpty() : "Upper bound list is empty: " + descriptor;
KotlinType upperBoundsAsType = intersectTypes(upperBounds);
return upperBoundsAsType != null ? upperBoundsAsType : getBuiltIns(descriptor).getNothingType();
}
private static class TypeUnifier {
private static class TypeParameterUsage {
private final TypeParameterDescriptor typeParameterDescriptor;
private final Variance howTheTypeParameterIsUsed;
public TypeParameterUsage(TypeParameterDescriptor typeParameterDescriptor, Variance howTheTypeParameterIsUsed) {
this.typeParameterDescriptor = typeParameterDescriptor;
this.howTheTypeParameterIsUsed = howTheTypeParameterIsUsed;
}
}
public static boolean mayBeEqual(@NotNull KotlinType type, @NotNull KotlinType other) {
return unify(type, other);
}
private static boolean unify(KotlinType withParameters, KotlinType expected) {
// T -> how T is used
Map<TypeParameterDescriptor, Variance> parameters = new HashMap<>();
Function1<TypeParameterUsage, Unit> processor = parameterUsage -> {
Variance howTheTypeIsUsedBefore = parameters.get(parameterUsage.typeParameterDescriptor);
if (howTheTypeIsUsedBefore == null) {
howTheTypeIsUsedBefore = Variance.INVARIANT;
}
parameters.put(parameterUsage.typeParameterDescriptor,
parameterUsage.howTheTypeParameterIsUsed.superpose(howTheTypeIsUsedBefore));
return Unit.INSTANCE;
};
processAllTypeParameters(withParameters, Variance.INVARIANT, processor, parameters::containsKey);
processAllTypeParameters(expected, Variance.INVARIANT, processor, parameters::containsKey);
ConstraintSystem.Builder constraintSystem = new ConstraintSystemBuilderImpl();
TypeSubstitutor substitutor = constraintSystem.registerTypeVariables(CallHandle.NONE.INSTANCE, parameters.keySet(), false);
constraintSystem.addSubtypeConstraint(withParameters, substitutor.substitute(expected, Variance.INVARIANT), SPECIAL.position());
return constraintSystem.build().getStatus().isSuccessful();
}
private static void processAllTypeParameters(
KotlinType type,
Variance howThisTypeIsUsed,
Function1<TypeParameterUsage, Unit> result,
Function1<TypeParameterDescriptor, Boolean> containsParameter
) {
ClassifierDescriptor descriptor = type.getConstructor().getDeclarationDescriptor();
if (descriptor instanceof TypeParameterDescriptor) {
if (containsParameter.invoke((TypeParameterDescriptor) descriptor)) return;
result.invoke(new TypeParameterUsage((TypeParameterDescriptor) descriptor, howThisTypeIsUsed));
for (KotlinType superType : type.getConstructor().getSupertypes()) {
processAllTypeParameters(superType, howThisTypeIsUsed, result, containsParameter);
}
}
for (TypeProjection projection : type.getArguments()) {
if (projection.isStarProjection()) continue;
processAllTypeParameters(projection.getType(), projection.getProjectionKind(), result, containsParameter);
}
}
}
}
| Java | 4 | Mu-L/kotlin | compiler/frontend/src/org/jetbrains/kotlin/types/TypeIntersector.java | [
"ECL-2.0",
"Apache-2.0"
] |
\ require parsers.fth
\ require strings.fth
\ try to split strings using parsers
: sep parser EOS | whitespace & me | whitespace end-parser ;
: content parser whitespace not & me | sep end-parser ;
: field parser sep & content | content end-parser ;
variable fields
: finalize ( addr u -- list )
2drop
fields @ reverse
fields @ free-list
;
: add-field ( addr u addr u -- )
>r >r drop r@
over - trim String fields @ cons fields !
r> r>
;
\ splits a string on consecutive whitespace
: split ( addr u -- list )
fields off begin
dup while
2dup field drop add-field
repeat
finalize
;
| Forth | 4 | jephthai/EvilVM | samples/split.fth | [
"MIT"
] |
import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
export interface TabScrollButtonClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if `orientation="vertical"`. */
vertical: string;
/** State class applied to the root element if `disabled={true}`. */
disabled: string;
}
export type TabScrollButtonClassKey = keyof TabScrollButtonClasses;
export function getTabScrollButtonUtilityClass(slot: string): string {
return generateUtilityClass('MuiTabScrollButton', slot);
}
const tabScrollButtonClasses: TabScrollButtonClasses = generateUtilityClasses(
'MuiTabScrollButton',
['root', 'vertical', 'horizontal', 'disabled'],
);
export default tabScrollButtonClasses;
| TypeScript | 4 | dany-freeman/material-ui | packages/mui-material/src/TabScrollButton/tabScrollButtonClasses.ts | [
"MIT"
] |
# Detects MS15-034 vulnerabilities by inspecting inbound HTTP requests and web server responses
# Any generated notices should have their sub value inspected for the appropriate exploitable RANGE values
# CrowdStrike 2015
# josh.liburdi@crowdstrike.com
@load base/frameworks/notice
@load base/protocols/http
module CrowdStrike;
export {
redef enum Notice::Type += {
MS15034_Vulnerability,
MS15034_Server_Crash
};
}
# RANGE values seen in each connection are stored here
global ranges: table[string] of string;
# Potentially crashed servers are stored here and are dropped from the table after 10 seconds of being added
global crash_check: table[addr] of string &create_expire=10secs;
event bro_init()
{
# do a bunch of stuff required by sumstats
local r1: SumStats::Reducer = [$stream="http.ms15034.down", $apply=set(SumStats::SUM)];
local r2: SumStats::Reducer = [$stream="http.ms15034.up", $apply=set(SumStats::SUM)];
SumStats::create([$name="detect-ms15034",
$epoch=5secs,
$reducers=set(r1, r2),
$epoch_result(ts: time, key: SumStats::Key, result: SumStats::Result) =
{
if ( "http.ms15034.up" in result && "http.ms15034.down" in result
&& result["http.ms15034.down"]$sum > 1 )
{
local down = result["http.ms15034.down"];
local up = result["http.ms15034.up"];
local total_sum = down$sum + up$sum;
local down_perc = down$sum / total_sum;
if ( down_perc > 90 )
{
local sub_msg = fmt("Range used: %s",crash_check[key$host]);
NOTICE([$note=MS15034_Server_Crash,
$src=key$host,
$msg=fmt("%s may have crashed due to MS15-034",cat(key$host)),
$sub=sub_msg,
$identifier=cat(key$host)]);
}
}
delete crash_check[key$host];
}
]);
}
# RANGE values are extracted from client HTTP headers if the web server has a private IP address or if the web server is within the local network
event http_header(c: connection, is_orig: bool, name: string, value: string)
{
if ( ! is_orig )
return;
if ( Site::is_local_addr(c$id$resp_h) == T || Site::is_private_addr(c$id$resp_h) == T )
if ( name == "RANGE" )
ranges[c$uid] = value;
}
# If an HTTP reply is seen for connections in the ranges table, then the web server's response code is checked for a match with the vulnerability
# A notice is generated that contains the client RANGE request
# If the server response code isn't 416, then the traffic is ignored
event http_reply(c: connection, version: string, code: count, reason: string)
{
if ( c$uid in ranges )
{
if ( code == 416 )
{
local sub_msg = fmt("Range used: %s",ranges[c$uid]);
NOTICE([$note=MS15034_Vulnerability,
$conn=c,
$msg=fmt("%s may be vulnerable to MS15-034",c$id$resp_h),
$sub=sub_msg,
$identifier=cat(c$id$resp_h,ranges[c$uid])]);
delete ranges[c$uid];
}
else if ( code != 416 )
delete ranges[c$uid];
}
}
# If no server response was seen, then poll the web server to see if it has crashed
# The ranges table is cleaned up as connections are dropped from Bro
event connection_state_remove(c: connection)
{
if ( c?$http )
{
if ( c$id$resp_h in crash_check )
{
if ( ! c$http?$status_code )
{
SumStats::observe("http.ms15034.down",
SumStats::Key($host=c$id$resp_h),
SumStats::Observation($num=1));
}
else
{
SumStats::observe("http.ms15034.up",
SumStats::Key($host=c$id$resp_h),
SumStats::Observation($num=1));
}
}
if ( c$uid in ranges )
{
if ( ! c$http?$status_code )
{
crash_check[c$id$resp_h] = ranges[c$uid];
delete ranges[c$uid];
}
else
delete ranges[c$uid];
}
}
}
| Bro | 5 | kingtuna/cs-bro | bro-scripts/msb/detect-ms15-034.bro | [
"BSD-2-Clause"
] |
private use Vector;
config const testIters = 8;
var lst: vector(int);
for i in 1..testIters do
lst.append(i);
lst.pop();
var idx = lst.indexOf(testIters, 1, testIters);
| Chapel | 3 | jhh67/chapel | test/library/draft/Vector/indexOf/vectorIndexOfHaltEnd.chpl | [
"ECL-2.0",
"Apache-2.0"
] |
// compiledir
// Copyright 2016 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.
// Issue 16317: cmd/compile: internal compiler error:
// unhandled OCONV INT -> TUNSAFEPTR
package ignored
| Go | 1 | Havoc-OS/androidprebuilts_go_linux-x86 | test/fixedbugs/issue16317.go | [
"BSD-3-Clause"
] |
-- This is a new query in TPCDS v2.7
with results as (
select
sum(ws_net_paid) as total_sum,
i_category, i_class,
0 as g_category,
0 as g_class
from
web_sales, date_dim d1, item
where
d1.d_month_seq between 1212 and 1212 + 11
and d1.d_date_sk = ws_sold_date_sk
and i_item_sk = ws_item_sk
group by
i_category, i_class),
results_rollup as(
select
total_sum,
i_category,
i_class,
g_category,
g_class,
0 as lochierarchy
from
results
union
select
sum(total_sum) as total_sum,
i_category,
NULL as i_class,
0 as g_category,
1 as g_class,
1 as lochierarchy
from
results
group by
i_category
union
select
sum(total_sum) as total_sum,
NULL as i_category,
NULL as i_class,
1 as g_category,
1 as g_class,
2 as lochierarchy
from
results)
select
total_sum,
i_category ,i_class, lochierarchy,
rank() over (
partition by lochierarchy,
case when g_class = 0 then i_category end
order by total_sum desc) as rank_within_parent
from
results_rollup
order by
lochierarchy desc,
case when lochierarchy = 0 then i_category end,
rank_within_parent
limit 100
| SQL | 4 | OlegPt/spark | sql/core/src/test/resources/tpcds-v2.7.0/q86a.sql | [
"Apache-2.0"
] |
typedef void (^dispatch_block_t)(void);
| C | 1 | lwhsu/swift | test/SILGen/Inputs/usr/include/dispatch.h | [
"Apache-2.0"
] |
import { usingEvalSync, usingEval } from '../lib/utils'
export async function getServerSideProps() {
return {
props: await usingEval(),
}
}
export default function Page(props) {
return (
<div>
{props.value} and {usingEvalSync().value}
</div>
)
}
| JavaScript | 4 | blomqma/next.js | test/integration/middleware/with-eval/pages/index.js | [
"MIT"
] |
%%
%unicode 12.1
%public
%class UnicodeScripts_12_1_extensions_6
%type int
%standalone
%include ../../resources/common-unicode-all-enumerated-property-defined-values-only-java
%%
<<EOF>> { printOutput(); return 1; }
\p{Script_Extensions:Gunjala_Gondi} { setCurCharPropertyValue("Script_Extensions:Gunjala_Gondi"); }
\p{Script_Extensions:Modi} { setCurCharPropertyValue("Script_Extensions:Modi"); }
\p{Script_Extensions:Psalter_Pahlavi} { setCurCharPropertyValue("Script_Extensions:Psalter_Pahlavi"); }
\p{Script_Extensions:Sharada} { setCurCharPropertyValue("Script_Extensions:Sharada"); }
\p{Script_Extensions:Yi} { setCurCharPropertyValue("Script_Extensions:Yi"); }
[^] { }
| JFlex | 3 | Mivik/jflex | testsuite/testcases/src/test/cases/unicode-scripts/UnicodeScripts_12_1_extensions_6.flex | [
"BSD-3-Clause"
] |
<% unless klass.sections.length == 1 then %>
<nav id="sections-section" class="section">
<h3 class="section-header">Sections</h3>
<ul class="link-list">
<% klass.sort_sections.each do |section| %>
<li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
<% end %>
</ul>
</nav>
<% end %>
| RHTML | 3 | coralnexus/rdoc-darkfish-template | _sidebar_sections.rhtml | [
"Apache-2.0"
] |
one = "x value"
Origin two = "origin value"
Ground three = "ground value"
Text four = "text value"
nil five = "nil value"
"Should be 3 times" println
one println
Ground one println
Text one println
"----------------" println
"Should be 3 times" println
Origin two println
Text two println
nil two println
"----------------" println
"Should be 4 times" println
three println
Ground three println
Text three println
nil three println
"----------------" println
"Should be 1 times" println
Text four println
"----------------" println
"Should be 1 time" println
nil five println
"----------------" println
"Shoud fail" println
five println
| Ioke | 1 | olabini/ioke | test/scripts/value2.ik | [
"ICU",
"MIT"
] |
package influxdb_test
import "csv"
import "testing"
import "testing/expect"
option now = () => (2030-01-01T00:00:00Z)
input = "#datatype,string,long,dateTime:RFC3339,string,string,string,double
#group,false,false,false,true,true,true,false
#default,_result,,,,,,
,result,table,_time,_measurement,host,_field,_value
,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83
,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.63
,,1,2018-05-22T19:53:26Z,system,host.local,load3,1.72
,,2,2018-05-22T19:53:26Z,system,host.local,load4,1.77
,,2,2018-05-22T19:53:36Z,system,host.local,load4,1.78
,,2,2018-05-22T19:53:46Z,system,host.local,load4,1.77
"
testcase filter {
expect.planner(rules: [
"influxdata/influxdb.FromStorageRule": 1,
"PushDownRangeRule": 1,
"PushDownFilterRule": 1,
])
want = csv.from(csv: "#datatype,string,long,dateTime:RFC3339,string,string,string,double
#group,false,false,false,true,true,true,false
#default,_result,,,,,,
,result,table,_time,_measurement,host,_field,_value
,,0,2018-05-22T19:53:26Z,system,host.local,load1,1.83
,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.63
")
got = testing.loadStorage(csv: input)
|> range(start: -100y)
|> filter(fn: (r) => r._measurement == "system" and r._field == "load1")
|> drop(columns: ["_start", "_stop"])
testing.diff(want, got)
}
| FLUX | 4 | ldwformat/influxdb | query/stdlib/influxdata/influxdb/filter_test.flux | [
"MIT"
] |
#+TITLE: ui/nav-flash
#+DATE: June 4, 2017
#+SINCE: v2.0
#+STARTUP: inlineimages
* Table of Contents :TOC:
- [[#description][Description]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#configuration][Configuration]]
* Description
This module flashes the line around the cursor after any significant motion, to
make it easy to follow after big operations.
#+begin_quote
Tremendously helpful on large, 1600p+ or 4K displays.
#+end_quote
** Plugins
+ [[https://github.com/rolandwalker/nav-flash][nav-flash]]
* Prerequisites
This module has no dependencies.
* Configuration
By default, ~nav-flash~ will be triggered whenever ~recenter~ is called or an
entry is added to the jump-list (managed by better-jumper).
~recenter~ is called after many hooks and commands, such as:
+ better-jumper-post-jump-hook
+ rtags-after-find-file-hook
+ org-follow-link-hook
+ imenu-after-jump-hook
+ counsel-grep-post-action-hook
+ dumb-jump-after-jump-hook
| Org | 3 | leezu/doom-emacs | modules/ui/nav-flash/README.org | [
"MIT"
] |
dnl Check for headers needed by timelib
AC_CHECK_HEADERS([io.h])
dnl Check for strtoll, atoll
AC_CHECK_FUNCS(strtoll atoll)
PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c
lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
PHP_NEW_EXTENSION(date, php_date.c $timelib_sources, no,, $PHP_DATE_CFLAGS)
PHP_ADD_BUILD_DIR([$ext_builddir/lib], 1)
PHP_ADD_INCLUDE([$ext_builddir/lib])
PHP_ADD_INCLUDE([$ext_srcdir/lib])
PHP_INSTALL_HEADERS([ext/date], [php_date.h lib/timelib.h lib/timelib_config.h])
AC_DEFINE([HAVE_TIMELIB_CONFIG_H], [1], [Have timelib_config.h])
cat > $ext_builddir/lib/timelib_config.h <<EOF
#ifdef PHP_WIN32
# include "config.w32.h"
#else
# include <php_config.h>
#endif
#include <php_stdint.h>
#include "zend.h"
#define timelib_malloc emalloc
#define timelib_realloc erealloc
#define timelib_calloc ecalloc
#define timelib_strdup estrdup
#define timelib_strndup estrndup
#define timelib_free efree
EOF
| M4 | 3 | NathanFreeman/php-src | ext/date/config0.m4 | [
"PHP-3.01"
] |
/*
* Copyright 2014 The Sculptor Project Team, including the original
* author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sculptor.generator.cartridge.builder
import java.util.List
import javax.inject.Inject
import org.sculptor.generator.chain.ChainOverridable
import org.sculptor.generator.ext.Helper
import org.sculptor.generator.util.HelperBase
import sculptormetamodel.Attribute
import sculptormetamodel.DomainObject
import sculptormetamodel.Enum
import sculptormetamodel.Module
import sculptormetamodel.NamedElement
import sculptormetamodel.Reference
@ChainOverridable
class BuilderHelper {
@Inject extension HelperBase helperBase
@Inject extension Helper helper
@Inject extension BuilderProperties properties
def getBuilderPackage(Module module) {
concatPackage(getBasePackage(module), getBuilderPackage())
}
def getBuilderPackage(DomainObject it) {
getBuilderPackage(module)
}
def List<Attribute> getBuilderAttributes(DomainObject domainObject) {
domainObject.allAttributes.filter[a|!a.isUuid && a != domainObject.idAttribute && a.name != "version"].toList
}
def List<Reference> getBuilderReferences(DomainObject domainObject) {
domainObject.allReferences.toList
}
def List<NamedElement> getBuilderConstructorParameters(DomainObject domainObject) {
domainObject.constructorParameters
}
def List<NamedElement> getBuilderProperties(DomainObject domainObject) {
val List<NamedElement> retVal = newArrayList
retVal.addAll(domainObject.builderAttributes)
retVal.addAll(domainObject.builderReferences)
retVal
}
def String getBuilderClassName(DomainObject domainObject) {
domainObject.name + "Builder"
}
def String getBuilderFqn(DomainObject domainObject) {
domainObject.builderPackage + "." + domainObject.builderClassName
}
def dispatch boolean needsBuilder(DomainObject domainObject) {
domainObject.^abstract == false
}
def dispatch boolean needsBuilder(Enum domainObject) {
false
}
}
| Xtend | 4 | sculptor/sculptor | sculptor-cartridges/sculptor-cartridge-builder/src/main/java/org/sculptor/generator/cartridge/builder/BuilderHelper.xtend | [
"Apache-2.0"
] |
#include <console>
main()
{
new arr[2];
new test = test;
new test2 = arr[test2];
#pragma unused test, test2
}
| PAWN | 0 | pawn-lang/pawn | source/compiler/tests/gh_436_local_var_self_init.pwn | [
"Zlib"
] |
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/core/grappler/graph_analyzer/graph_analyzer.h"
#include <algorithm>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/memory/memory.h"
#include "tensorflow/core/grappler/graph_analyzer/test_tools.h"
namespace tensorflow {
namespace grappler {
namespace graph_analyzer {
namespace test {
using ::testing::ElementsAre;
using ::testing::Eq;
using ::testing::Ne;
using ::testing::SizeIs;
using ::testing::UnorderedElementsAre;
class GraphAnalyzerTest : public ::testing::Test, protected TestGraphs {
protected:
Status BuildMap() { return gran_->BuildMap(); }
void FindSubgraphs() { gran_->FindSubgraphs(); }
void DropInvalidSubgraphs() { gran_->DropInvalidSubgraphs(); }
Status CollateResult() { return gran_->CollateResult(); }
void ExtendSubgraph(Subgraph* parent) { gran_->ExtendSubgraph(parent); }
void ExtendSubgraphPortAllOrNone(Subgraph* parent, GenNode* node,
GenNode::Port port) {
gran_->ExtendSubgraphPortAllOrNone(parent, node, port);
}
void ExtendSubgraphAllOrNone(Subgraph* parent, GenNode* node) {
gran_->ExtendSubgraphAllOrNone(parent, node);
}
std::vector<string> DumpRawSubgraphs() { return gran_->DumpRawSubgraphs(); }
std::vector<string> DumpPartials() {
std::vector<string> result;
for (const auto& it : gran_->partial_) {
result.emplace_back(it->Dump());
}
return result;
}
const GenNodeMap& GetNodes() { return gran_->nodes_; }
GenNode* GetNode(const string& name) { return gran_->nodes_.at(name).get(); }
SubgraphPtrSet& GetResult() { return gran_->result_; }
SubgraphPtrSet& GetPartial() { return gran_->partial_; }
std::deque<Subgraph*>& GetTodo() { return gran_->todo_; }
// Gets initialized by a particular test from a suitable GraphDef.
std::unique_ptr<GraphAnalyzer> gran_;
};
TEST_F(GraphAnalyzerTest, BuildMap) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_3n_self_control_, 1);
Status st = BuildMap();
EXPECT_THAT(st, Eq(Status::OK()));
auto& map = GetNodes();
EXPECT_THAT(map.find("node1"), Ne(map.end()));
EXPECT_THAT(map.find("node2"), Ne(map.end()));
EXPECT_THAT(map.find("node3"), Ne(map.end()));
}
TEST_F(GraphAnalyzerTest, BuildMapError) {
// A duplicate node.
(*graph_3n_self_control_.add_node()) = MakeNodeConst("node1");
gran_ = absl::make_unique<GraphAnalyzer>(graph_3n_self_control_, 1);
Status st = BuildMap();
ASSERT_THAT(
st, Eq(Status(error::INVALID_ARGUMENT, "Duplicate node name 'node1'.")));
}
TEST_F(GraphAnalyzerTest, FindSubgraphs0) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_3n_self_control_, 0);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
FindSubgraphs();
auto& subgraphs = GetResult();
EXPECT_THAT(subgraphs, SizeIs(0));
EXPECT_THAT(DumpRawSubgraphs(), ElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
TEST_F(GraphAnalyzerTest, FindSubgraphs1) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_3n_self_control_, 1);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
FindSubgraphs();
auto& subgraphs = GetResult();
EXPECT_THAT(subgraphs, SizeIs(3));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: BroadcastGradientArgs(node3)",
"1: Const(node1)",
"1: Sub(node2)"
));
// clang-format on
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// The required subgraphs are larger than the graph.
TEST_F(GraphAnalyzerTest, FindSubgraphsTooLarge) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_3n_self_control_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
FindSubgraphs();
EXPECT_THAT(DumpRawSubgraphs(), ElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
//===
// Successfully propagate backwards through a multi-input link,
// with the base (currently-extending) node already in the graph.
TEST_F(GraphAnalyzerTest, MultiInputSuccessBackwardsBaseIn) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")}));
ExtendSubgraphPortAllOrNone(root.get(), GetNode("add2"),
GenNode::Port(true, 0));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: AddN(add2), Const(const2_1), Const(const2_2), Const(const2_3)"
));
// clang-format on
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Successfully propagate backwards through a multi-input link,
// with the base (currently-extending) node not in the graph yet.
TEST_F(GraphAnalyzerTest, MultiInputSuccessBackwardsBaseOut) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto parent = absl::make_unique<Subgraph>(Subgraph::Identity());
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")}));
ExtendSubgraphPortAllOrNone(parent.get(), GetNode("add2"),
GenNode::Port(true, 0));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: AddN(add2), Const(const2_1), Const(const2_2), Const(const2_3)"
));
// clang-format on
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Successfully propagate backwards through a multi-input link,
// where the target subgraph size is larger.
TEST_F(GraphAnalyzerTest, MultiInputSuccessBackwardsIncomplete) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 5);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")}));
ExtendSubgraphPortAllOrNone(root.get(), GetNode("add2"),
GenNode::Port(true, 0));
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre());
// clang-format off
EXPECT_THAT(DumpPartials(), UnorderedElementsAre(
"1: AddN(add2), Const(const2_1), Const(const2_2), Const(const2_3)"
));
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(1));
}
// Propagate backwards through a multi-input link, finding that the
// resulting subgraph would be too large.
TEST_F(GraphAnalyzerTest, MultiInputTooLargeBackwards) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 3);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")}));
ExtendSubgraphPortAllOrNone(root.get(), GetNode("add2"),
GenNode::Port(true, 0));
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Propagate backwards through a multi-input link, finding that nothing
// would be added to the parent subgraph.
TEST_F(GraphAnalyzerTest, MultiInputNothingAddedBackwards) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root = absl::make_unique<Subgraph>(
Subgraph::Identity({GetNode("add2"), GetNode("const2_1"),
GetNode("const2_2"), GetNode("const2_3")}));
ExtendSubgraphPortAllOrNone(root.get(), GetNode("add2"),
GenNode::Port(true, 0));
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Successfully propagate forwards through a multi-input link,
// with the base (currently-extending) node not in the subgraph yet.
TEST_F(GraphAnalyzerTest, MultiInputSuccessForwardsBaseOut) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("const2_1")}));
ExtendSubgraphPortAllOrNone(root.get(), GetNode("add2"),
GenNode::Port(true, 0));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: AddN(add2), Const(const2_1), Const(const2_2), Const(const2_3)"
));
// clang-format on
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Successfully propagate backwards through a multi-input link.
TEST_F(GraphAnalyzerTest, MultiInputSuccessBackwardsFull) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")}));
ExtendSubgraph(root.get());
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: AddN(add2), Const(const2_1), Const(const2_2), Const(const2_3)"
));
EXPECT_THAT(DumpPartials(), UnorderedElementsAre(
"1: AddN(add2), Sub(sub)"
));
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(1));
}
// Successfully propagate forwards through a multi-input link.
TEST_F(GraphAnalyzerTest, MultiInputSuccessForwardsFull) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("const2_1")}));
ExtendSubgraph(root.get());
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: AddN(add2), Const(const2_1), Const(const2_2), Const(const2_3)"
));
// clang-format on
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
TEST_F(GraphAnalyzerTest, DropInvalidSubgraphsMulti) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_multi_input_, 3);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
// A good one, multi-input is all-in.
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("const1_1"),
GetNode("const1_2"),
GetNode("add1"),
})));
// A good one, multi-input is all-out
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("add1"),
GetNode("add2"),
GetNode("sub"),
})));
// A bad one, multi-input is partially in.
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("const1_1"),
GetNode("add1"),
GetNode("sub"),
})));
// A bad one, multi-input is partially in.
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("add2"),
GetNode("const2_1"),
GetNode("const2_2"),
})));
DropInvalidSubgraphs();
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: AddN(add1), AddN(add2), Sub(sub)",
"1: AddN(add1), Const(const1_1), Const(const1_2)"
));
// clang-format on
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
//===
// Successfully propagate backwards through a multi-input link,
// with the base (currently-extending) node already in the graph.
TEST_F(GraphAnalyzerTest, AllOrNoneInputSuccessBackwards) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("pass2")}));
ExtendSubgraphAllOrNone(root.get(), GetNode("pass2"));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: Const(const2_1), Const(const2_2), Const(const2_3), IdentityN(pass2)"
));
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Successfully propagate backwards through a multi-input link,
// but no control links propagate. It also tests the situation
// where the target subgraph size is larger.
TEST_F(GraphAnalyzerTest, AllOrNoneInputSuccessBackwardsNoControl) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 5);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("pass1")}));
ExtendSubgraphAllOrNone(root.get(), GetNode("pass1"));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre(
"1: Const(const1_1), Const(const1_2), IdentityN(pass1)"
));
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(1));
}
// The control links propagate separately as all-or-none, even on the nodes
// that are all-or-none for the normal inputs.
TEST_F(GraphAnalyzerTest, AllOrNoneInputSeparateControl) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 5);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("pass1")}));
ExtendSubgraphPortAllOrNone(root.get(), GetNode("pass1"),
GenNode::Port(true, -1));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre(
"1: Const(const2_1), Const(const2_2), Const(const2_3), IdentityN(pass1)"
));
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(1));
}
// Propagate backwards from all-or-none-input node, finding that the
// resulting subgraph would be too large.
TEST_F(GraphAnalyzerTest, AllOrNoneInputTooLargeBackwards) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 3);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("pass2")}));
ExtendSubgraphAllOrNone(root.get(), GetNode("pass2"));
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Propagate backwards from all-or-none-input node, finding that nothing
// would be added to the parent subgraph.
TEST_F(GraphAnalyzerTest, AllOrNoneInputNothingAddedBackwards) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root = absl::make_unique<Subgraph>(
Subgraph::Identity({GetNode("pass2"), GetNode("const2_1"),
GetNode("const2_2"), GetNode("const2_3")}));
ExtendSubgraphAllOrNone(root.get(), GetNode("pass2"));
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre());
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Successfully propagate forwards to all-or-none-input node,
// with the base (currently-extending) node not in the subgraph yet.
TEST_F(GraphAnalyzerTest, AllOrNoneInputSuccessForwardsBaseOut) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("const2_1")}));
ExtendSubgraphAllOrNone(root.get(), GetNode("pass2"));
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: Const(const2_1), Const(const2_2), Const(const2_3), IdentityN(pass2)"
));
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(0));
}
// Successfully propagate backwards from all-or-none-input node.
TEST_F(GraphAnalyzerTest, AllOrNoneInputSuccessBackwardsFull) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("pass2")}));
ExtendSubgraph(root.get());
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: Const(const2_1), Const(const2_2), Const(const2_3), IdentityN(pass2)"
));
EXPECT_THAT(DumpPartials(), UnorderedElementsAre(
"1: IdentityN(pass2), Sub(sub)"
));
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(1));
}
// Successfully propagate forwards to all-or-none-input node. This includes
// both all-or-none-input for the normal inputs, and multi-input by the
// control path.
TEST_F(GraphAnalyzerTest, AllOrNoneInputSuccessForwardsFull) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 4);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
auto root =
absl::make_unique<Subgraph>(Subgraph::Identity({GetNode("const2_1")}));
ExtendSubgraph(root.get());
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: Const(const2_1), Const(const2_2), Const(const2_3), IdentityN(pass2)",
"1: Const(const2_1), Const(const2_2), Const(const2_3), IdentityN(pass1)"
));
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
// clang-format on
EXPECT_THAT(GetTodo(), SizeIs(0));
}
TEST_F(GraphAnalyzerTest, DropInvalidSubgraphsAllOrNone) {
gran_ = absl::make_unique<GraphAnalyzer>(graph_all_or_none_, 3);
Status st = BuildMap();
ASSERT_THAT(st, Eq(Status::OK()));
// A good one, all-or-none is all-in.
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("const1_1"),
GetNode("const1_2"),
GetNode("pass1"),
})));
// A good one, all-or-none is all-out
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("pass1"),
GetNode("pass2"),
GetNode("sub"),
})));
// A bad one, all-or-none is partially in.
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("const1_1"),
GetNode("pass1"),
GetNode("sub"),
})));
// A bad one, all-or-none is partially in.
GetResult().insert(absl::make_unique<Subgraph>(Subgraph::Identity({
GetNode("pass2"),
GetNode("const2_1"),
GetNode("const2_2"),
})));
DropInvalidSubgraphs();
// clang-format off
EXPECT_THAT(DumpRawSubgraphs(), UnorderedElementsAre(
"1: IdentityN(pass1), IdentityN(pass2), Sub(sub)",
"1: Const(const1_1), Const(const1_2), IdentityN(pass1)"
));
// clang-format on
EXPECT_THAT(DumpPartials(), UnorderedElementsAre());
EXPECT_THAT(GetTodo(), SizeIs(0));
}
} // end namespace test
} // end namespace graph_analyzer
} // end namespace grappler
} // end namespace tensorflow
| C++ | 4 | abhaikollara/tensorflow | tensorflow/core/grappler/graph_analyzer/graph_analyzer_test.cc | [
"Apache-2.0"
] |
*Hello World in Foxpro
@5,5 say ("Hello World!")
| xBase | 2 | saurabhcommand/Hello-world | Foxpro/helloworld.prg | [
"MIT"
] |
class HelloWorld extends Mutator;
function PostBeginPlay()
{
Super.PostBeginPlay();
Log("Hello World");
}
| UnrealScript | 2 | rojenzaman/hello-world | u/Unreal Script.uc | [
"MIT"
] |
'reach 0.1';
export const main = Reach.App(
{}, [Participant('A', {})], (A) => {
A.publish();
// This should trigger Err_Eval_ContinueNotInWhile (?)
[ x ] = [ 3 ];
continue;
}
);
| RenderScript | 3 | chikeabuah/reach-lang | hs/t/n/Err_Eval_ContinueNotInWhile.rsh | [
"Apache-2.0"
] |
<nav class="navbar navbar-toggleable-md navbar-inverse fixed-top bg-inverse">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">Book Rater <span *ngIf="principal.isAdmin()">Admin</span></a>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
</ul>
<button *ngIf="principal.authenticated" type="button" class="btn btn-link" (click)="onLogout()">Logout</button>
</div>
</nav>
<div class="jumbotron">
<div class="container">
<h1>Book Rater App</h1>
<p *ngIf="!principal.authenticated" class="lead">Anyone can view the books.</p>
<p *ngIf="principal.authenticated && !principal.isAdmin()" class="lead">Users can view and create ratings</p>
<p *ngIf="principal.isAdmin()" class="lead">Admins can do anything!</p>
</div>
</div>
<section class="books">
<div class="container">
<div class="row">
<div class="col-md">
<div class="row">
<div class="col-md-12">
<app-book-list [principal]="principal" (onBookSelected)="selectBook($event)"></app-book-list>
</div>
</div>
</div>
<div *ngIf="selectedBook != null" class="col-md-3">
<app-book-detail [selectedBook]="selectedBook" [principal]="principal" (closeBook)="closeBookDetail()"></app-book-detail>
</div>
</div>
</div>
</section>
| HTML | 3 | zeesh49/tutorials | spring-cloud/spring-cloud-bootstrap/gateway/src/main/angular/ui/src/app/app.component.html | [
"MIT"
] |
{ lib
, stdenv
, fetchFromGitHub
, libpcap
, libnet
}:
stdenv.mkDerivation rec {
pname = "tcptraceroute";
version = "1.5beta7";
src = fetchFromGitHub {
owner = "mct";
repo = "tcptraceroute";
rev = "${pname}-${version}";
hash = "sha256-KU4MLWtOFzzNr+I99fRbhBokhS1JUNL+OgVltkOGav4=";
};
# for reasons unknown --disable-static configure flag doesn't disable static
# linking.. we instead override CFLAGS with -static omitted
preBuild = ''
makeFlagsArray=(CFLAGS=" -g -O2 -Wall")
'';
buildInputs = [ libpcap libnet ];
meta = {
description = "A traceroute implementation using TCP packets";
homepage = "https://github.com/mct/tcptraceroute";
license = lib.licenses.gpl2;
maintainers = [ ];
};
}
| Nix | 4 | siddhantk232/nixpkgs | pkgs/tools/networking/tcptraceroute/default.nix | [
"MIT"
] |
@file:JvmName("Utils")
@file:JvmMultifileClass
val bVal: Int get() = 0
| Groff | 1 | Mu-L/kotlin | jps-plugin/testData/incremental/withJava/other/multifileDependantUsage/partB.kt.new.1 | [
"ECL-2.0",
"Apache-2.0"
] |
{-# LANGUAGE CPP, RankNTypes, UndecidableInstances, GADTs, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.ValueOutput
(
-- * Hierarchy
--
-- $hierarchy
-- * Widget Functions
--
-- $functions
)
where
#include "Fl_ExportMacros.h"
#include "Fl_Types.h"
#include "Fl_Value_OutputC.h"
import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Dispatch
import Graphics.UI.FLTK.LowLevel.Hierarchy
{# fun Fl_Value_Output_draw as draw'' { id `Ptr ()' } -> `()' #}
instance (impl ~ ( IO ())) => Op (Draw ()) ValueOutput orig impl where
runOp _ _ valueOutput = withRef valueOutput $ \valueOutputPtr -> draw'' valueOutputPtr
{#fun Fl_Value_Output_handle as valueOutputHandle' { id `Ptr ()', id `CInt' } -> `Int' #}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) ValueOutput orig impl where
runOp _ _ valueOutput event = withRef valueOutput (\p -> valueOutputHandle' p (fromIntegral . fromEnum $ event)) >>= return . successOrUnknownEvent
{# fun Fl_Value_Output_resize as resize' { id `Ptr ()',`Int',`Int',`Int',`Int' } -> `()' supressWarningAboutRes #}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) ValueOutput orig impl where
runOp _ _ valueOutput rectangle = withRef valueOutput $ \valueOutputPtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
resize' valueOutputPtr x_pos y_pos w_pos h_pos
{# fun Fl_Value_Output_hide as hide' { id `Ptr ()' } -> `()' #}
instance (impl ~ ( IO ())) => Op (Hide ()) ValueOutput orig impl where
runOp _ _ valueOutput = withRef valueOutput $ \valueOutputPtr -> hide' valueOutputPtr
{# fun Fl_Value_Output_show as show' { id `Ptr ()' } -> `()' #}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) ValueOutput orig impl where
runOp _ _ valueOutput = withRef valueOutput $ \valueOutputPtr -> show' valueOutputPtr
-- $hierarchy
-- @
-- "Graphics.UI.FLTK.LowLevel.Base.Widget"
-- |
-- v
-- "Graphics.UI.FLTK.LowLevel.Base.Valuator"
-- |
-- v
-- "Graphics.UI.FLTK.LowLevel.Base.ValueOutput"
-- |
-- v
-- "Graphics.UI.FLTK.LowLevel.ValueOutput"
-- @
-- $functions
-- @
-- draw :: 'Ref' 'ValueOutput' -> 'IO' ()
--
-- handle :: 'Ref' 'ValueOutput' -> 'Event' -> 'IO' ('Either' 'UnknownEvent' ())
--
-- hide :: 'Ref' 'ValueOutput' -> 'IO' ()
--
-- resize :: 'Ref' 'ValueOutput' -> 'Rectangle' -> 'IO' ()
--
-- showWidget :: 'Ref' 'ValueOutput' -> 'IO' ()
-- @
| C2hs Haskell | 3 | ericu/fltkhs | src/Graphics/UI/FLTK/LowLevel/ValueOutput.chs | [
"MIT"
] |
%li.commit
.commit-row-title
= link_to truncate_sha(event.commit_id), project_commit_path(project, event.commit_id), class: "commit-sha", alt: '', title: truncate_sha(event.commit_id)
·
= markdown event_commit_title(event.commit_title), project: project, pipeline: :single_line, author: event.author
| Haml | 3 | hugorebelo/gitlabhq | app/views/events/_commit.html.haml | [
"MIT"
] |
{%- extends "basic/search.html" %}
{% block extrahead %}
<script type="text/javascript" src="{{ pathto('searchindex.js', 1) }}" defer></script>
<script src="{{ pathto('_static/underscore.js', 1) }}"></script>
<script src="{{ pathto('_static/doctools.js', 1) }}"></script>
<script src="{{ pathto('_static/language_data.js', 1) }}"></script>
<script src="{{ pathto('_static/js/searchtools.js', 1) }}"></script>
{% endblock %}
| HTML | 4 | emarkou/scikit-learn | doc/themes/scikit-learn-modern/search.html | [
"BSD-3-Clause"
] |
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Search Genre in Chosic
# @raycast.mode inline
# Optional parameters:
# @raycast.packageName Web Searches
# @raycast.icon images/chosic.png
# Documentation:
# @raycast.description Find the current Spotify track's gender in Chosic
# @raycast.author quelhasu
# @raycast.authorURL https://github.com/quelhasu
tell application "Spotify"
try
set spotifyURI to spotify url of the current track
set trackName to name of the current track
set trackArtist to artist of the current track
end try
end tell
set AppleScript's text item delimiters to ":"
set trackID to third text item of spotifyURI
log trackName & " ~ " & trackArtist
open location "https://www.chosic.com/music-genre-finder/?track=" & trackID
| AppleScript | 4 | daviddzhou/script-commands | commands/web-searches/search-gender-in-chosic.applescript | [
"MIT"
] |
--TEST--
Funktionstest mb_ereg_search_regs()
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
function_exists('mb_ereg_search_regs') or die("skip mb_ereg_search_regs() not available");
?>
--FILE--
<?php
// homepage:
//$mb_str = "Алексей Федорович Карамазов был Алексей Федорович Карамазов был kyrillischer string string";
// = "Lorem ipsum dolor sit amet"
mb_ereg_search_init("Алексей Федорович Карамазов был Алексей Федорович Карамазов был");
$match= mb_ereg_search_regs("ов");
var_dump($match);
?>
--EXPECT--
array(1) {
[0]=>
string(4) "ов"
}
| PHP | 4 | NathanFreeman/php-src | ext/mbstring/tests/mb_ereg_search_regs.phpt | [
"PHP-3.01"
] |
Cortos by Johan Paz begins here.
Include Basic Screen Effects Sp by Emily Short.
[upgraded to I7 6M, by sarganar - 04.01.2017]
Chapter 1 - Narrator voices
A narrator voice is a kind of thing. A narrator voice has a text called voice style.
[ DEFAULT VOICE ]
Default voice is a narrator voice. The voice style of default voice is "[roman type]".
Chapter 2 - Narrator
To tell the fragment on (table - a table-name), cleaning the screen or cleaning the screen after each phrase:
if cleaning the screen
begin;
tell the fragment on table;
clear the screen;
otherwise if cleaning the screen after each phrase;
let N be the number of rows in table;
repeat through table begin;
decrease N by 1;
if there is voice
begin;
say voice style of voice entry;
otherwise;
say voice style of default voice;
end if;
say "[phrase entry]";
if there is voice
begin;
say roman type;
otherwise;
say voice style of default voice;
end if;
wait for any key;
clear the screen;
end repeat;
otherwise;
let N be the number of rows in table;
repeat through table begin;
decrease N by 1;
if there is voice entry
begin;
say voice style of voice entry;
otherwise;
say voice style of default voice;
end if;
say "[phrase entry]";
if there is voice entry
begin;
say roman type;
end if;
say paragraph break;
if N is not 0, wait for any key;
end repeat;
end if.
To tell the next fragment on (table - a table-name), cleaning the screen or cleaning the screen after each phrase:
let next be next step of table;
choose a row with step of next in table;
if cleaning the screen:
tell the fragment on narrative entry, cleaning the screen;
otherwise if cleaning the screen after each phrase:
tell the fragment on narrative entry, cleaning the screen after each phrase;
otherwise:
tell the fragment on narrative entry.
To initiate narrative (table - a table-name):
if there is a narrative of table in the Table of Variable Narrative:
choose row with a narrative of table in the Table of Variable Narrative;
now the counter entry is 1;[04.01.2017]
otherwise if the number of blank rows in the Table of Variable Narrative is not 0:
choose a blank row in the Table of Variable Narrative;
now the counter entry is 1;[04.01.2017]
now the narrative entry is table.[04.01.2017]
To increase narrative (table - a table-name):
if there is a narrative of table in the Table of Variable Narrative:
choose row with a narrative of table in the Table of Variable Narrative;
increase counter entry by 1;
otherwise:
initiate narrative table.
To decide which number is the next step of (table - a table-name):
increase narrative table;
choose a row with narrative of table in Table of Variable Narrative;
if there is a step of counter entry in table:
decide on the counter entry;
otherwise:
let N be the number of rows in table;
choose row N in table;
decide on the step entry.
[ Tabla de contadores de narraciones variables ]
Table of Variable Narrative
counter narrative
a number a table-name
with 29 blank rows
[ Just for compilation ]
Table of Fake Intro
voice phrase
a voice a text
Table of Fake Next
step narrative
a number a table-name
Cortos ends here.
---- DOCUMENTATION ----
Esta extensión permite crear diversas formas de secuencias no interactivas -conocidas en el pasado en el mundo hispano como 'cortos', debido al peculiar nombre de la librería equivalente en Inform 6- en un relato. Estas secuencias pueden ser usadas típicamente como una introducción, o como un cambio de escena o de fase.
Section: Una secuencia no interactiva simple.
La forma de crear una secuencia es muy simple. Hay que crear una tabla con, al menos, una columna llamada 'phrase'. Bajo esta columna cada 'texto' incluído será uno de los párrafos que se irán mostrando durante la secuencia:
Table of Secuencia 1
phrase
"Esto es un ejemplo de secuencia."
"Está claro,¿no?"
"Y puede tener partes [one of]aleatorias[or]decidas por el azar[at random], por supuesto"
Para mostrar esta secuencia basta con invocar el comando 'tell the fragment on', de esta forma:
tell the fragment on Table of Secuencia 1
Existen además dos variantes para este comando:
tell the fragment on Table of Secuencia 1, cleaning the screen
que limpiaría la pantalla al finalizar la secuencia y:
tell the fragment on Table of Secuencia 1, cleaning the screen after each phrase
que limpiaría la pantalla tras cada párrafo mostrado.
Section: Voces
Aunque es posible incluir cualquier efecto de texto o tipografía variable a la manera tradicional de I7 en los textos de cualquier secuencia (como [italic type]), es posible clarificar qué narrador está 'contando' cada párrafo creando voces narradoras (narrator voice) y asociándoles un texto de estilo. De la siguiente forma:
_Narrador1 is a narrator voice. The voice style of _narrador1 is "[italic type]".
_Narrador2 is a narrator voice. The voice style of _narrador2 is "[bold type]".
Si no se define ninguna voz narradora, ni se declaran todas los párrafos serán 'dichos' por el narrador por defecto cuya definición es:
Default voice is a narrator voice. The voice style of default voice is "[roman type]".
Y será a 'roman type' a lo que se regresará al finalizar cada párrafo.
Para determinar en cada párrafo qué narrador lo 'dice' bastará con añadir a la tabla una columna llamada 'voice' de esta forma:
Table of Secuencia 2
voice phrase
_Narrador1 "Esta frase la dice el narrador 1."
_Narrador2 "Y esta el narrador 2."
_Narrador1 "Y esta de nuevo el narrador 1."
_Narrador2 "Aunque esta sea del narrador 2."
Section: Secuencias de secuencias
Finalmente es posible crear secuencias de secuencias de la siguiente manera:
Table of Secuencias
step narrative
1 Table of Secuencia 1
2 Table of Secuencia 2
Esta secuencia de secuencias se puede usar mediante el comando 'tell the next fragment on', así:
tell the next fragment on Table of Secuencias
que la primera vez que se invocase mostraría la secuencia 1 y la segunda vez la secuencia 2 (por los números incluídos en la columna 'step'). Este nuevo comando de secuencias de secuencias tiene las mismas opciones que el comando básico de limpiar la pantalla al finalizar o con cada párrafo. Estas secuencias de secuencias pueden ser especialmente útiles en el caso de tener que mostrar varias secuencias según el número de veces que se intenta una misma cosa, es decir, son el equivalente en secuencia al texto variable: "[one of]primera vez[or]segunda vez[or]tercera vez[stopping]". | Inform 7 | 3 | brtl-fhc/I7-Spanish | EXTENSIONES/Cortos.i7x | [
"Artistic-2.0"
] |
import module namespace qt3ts='http://www.basex.org/modules/qt3ts' at 'qt3ts/qt3ts.xqm';
declare option db:chop "off";
declare option db:intparse "off";
declare variable $QT3TS external;
qt3ts:to-junit(
$QT3TS,
'*',
'org.basex.qt3ts',
'src/test/java/org/basex/qt3ts',
function($type, $vals) {
switch($type)
case 'spec'
return $vals = ('XQ10', 'XQ10+', 'XQ30', 'XQ30+')
case 'xsd-version'
return $vals = '1.0'
case 'feature'
return switch($vals)
case 'collection-stability'
case 'directory-as-collection-uri'
case 'moduleImport'
case 'higherOrderFunctions'
return true()
case 'schemaAware'
case 'schemaValidation'
case 'schemaImport'
case 'staticTyping'
case 'namespace-axis'
case 'schema-location-hint'
case 'xpath-1.0-compatibility'
return false()
default return (qt3ts:debug('Unknown feature', $vals), true())
case 'xml-version'
return some $v in $vals satisfies tokenize($v, ':')[1] = '1.0'
case 'default-language'
case 'language'
return $vals = 'en'
case 'unicode-normalization-form'
return $vals = ('NFD', 'NFC', 'NFKD', 'NFKC')
default
return (qt3ts:debug('Unknown dependency', $type), true())
}
) | XQuery | 3 | JensErat/basex | basex-tests/src/main/xquery/qt3ts.xq | [
"BSD-3-Clause"
] |
#pragma once
#include <chrono>
#include "envoy/common/pure.h"
namespace Envoy {
/**
* Less typing for common system time and steady time type.
*
* SystemTime should be used when getting a time to present to the user, e.g. for logging.
* MonotonicTime should be used when tracking time for computing an interval.
*/
using Seconds = std::chrono::seconds;
using SystemTime = std::chrono::time_point<std::chrono::system_clock>;
using MonotonicTime = std::chrono::time_point<std::chrono::steady_clock>;
/**
* Captures a system-time source, capable of computing both monotonically increasing
* and real time.
*/
class TimeSource {
public:
virtual ~TimeSource() = default;
/**
* @return the current system time; not guaranteed to be monotonically increasing.
*/
virtual SystemTime systemTime() PURE;
/**
* @return the current monotonic time.
*/
virtual MonotonicTime monotonicTime() PURE;
};
} // namespace Envoy
| C | 4 | dcillera/envoy | envoy/common/time.h | [
"Apache-2.0"
] |
.foo.svelte-xyz{color:red}.foocc.svelte-xyz{color:red}.aa.svelte-xyz{color:red}.bb.svelte-xyz{color:red}.cc.svelte-xyz{color:red}.dd.svelte-xyz{color:red}.aabar.svelte-xyz{color:red}.fooddbar.svelte-xyz{color:red}.baz.svelte-xyz{color:red} | CSS | 0 | Theo-Steiner/svelte | test/css/samples/unused-selector-string-concat/expected.css | [
"MIT"
] |
default
{
state_entry()
{
// set sit target, otherwise this will not work
llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION);
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
key av = llAvatarOnSitTarget();
//evaluated as true if not NULL_KEY or invalid
if (av)
{
llSay(0, "Hello " + llKey2Name(av) + ", thank you for sitting down");
}
}
}
}
| LSL | 4 | defraged/opensim | bin/assets/ScriptsAssetSet/llAvatarOnSitTarget.lsl | [
"BSD-3-Clause"
] |
fd :: FromDevice(00:00:5A:98:F9:28);
td :: ToDevice(00:00:5A:98:F9:28);
out :: Queue(1024) -> td;
fd -> cl :: Classifier(12/0800, 12/0806);
cl[0]
-> Strip(14)
-> WebGen(7.1.0.0/16, 1.0.0.1, 500)
-> EtherEncap(0x0800, 00:00:5A:98:F9:28, 00:03:47:0D:39:57)
-> out;
cl[1]
-> ARPResponder(1.0.0.2 00:00:5A:98:F9:28)
-> out;
| Click | 3 | MacWR/Click-changed-for-ParaGraph | conf/webgen.click | [
"Apache-2.0"
] |
const $_c0$ = function (a0, a1) { return { collapsedHeight: a0, expandedHeight: a1 }; };
const $_c1$ = function (a0, a1) { return { value: a0, params: a1 }; };
const $_c2$ = function (a0, a1) { return { collapsedWidth: a0, expandedWidth: a1 }; };
…
hostVars: 14,
hostBindings: function MyComponent_HostBindings(rf, ctx) {
if (rf & 2) {
$r3$.ɵɵsyntheticHostProperty("@expansionHeight",
$r3$.ɵɵpureFunction2(5, $_c1$, ctx.getExpandedState(),
$r3$.ɵɵpureFunction2(2, $_c0$, ctx.collapsedHeight, ctx.expandedHeight)
)
)("@expansionWidth",
$r3$.ɵɵpureFunction2(11, $_c1$, ctx.getExpandedState(),
$r3$.ɵɵpureFunction2(8, $_c2$, ctx.collapsedWidth, ctx.expandedWidth)
)
);
}
}, | JavaScript | 3 | John-Cassidy/angular | packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/elements/host_binding_pure_functions.js | [
"MIT"
] |
# Copyright (c) 2022 Fyde Innovations Limited and the openFyde Authors.
# Distributed under the license specified in the root directory of this project.
EAPI="5"
DESCRIPTION="Google drive related files"
HOMEPAGE="https://drive.google.com/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE=""
RDEPEND=""
DEPEND="${RDEPEND}"
S=${WORKDIR}
src_install() {
exeinto /opt/google/drive-file-stream
doexe ${FILESDIR}/drivefs
}
| Gentoo Ebuild | 4 | FydeOS/chromium_os_for_raspberry_pi | project-cros-pi/chromeos-base/google-drive-fs/google-drive-fs-0.0.1.ebuild | [
"BSD-2-Clause"
] |
from .otBase import BaseTTXConverter
class table__f_e_a_t(BaseTTXConverter):
pass
| Python | 1 | odidev/fonttools | Lib/fontTools/ttLib/tables/_f_e_a_t.py | [
"Apache-2.0",
"MIT"
] |
GET HTTP/1.1\r\n
\r\n | HTTP | 1 | ashishmjn/gunicorn | tests/requests/invalid/002.http | [
"MIT"
] |
----------------------------------------------------------------------------------
-- Engineer: Mike Field <hamster@snap.net.nz>
--
-- Module Name: tcp_extract_header - Behavioral
--
-- Description: Extract the TCP header fields
--
------------------------------------------------------------------------------------
-- FPGA_Webserver from https://github.com/hamsternz/FPGA_Webserver
------------------------------------------------------------------------------------
-- The MIT License (MIT)
--
-- Copyright (c) 2015 Michael Alan Field <hamster@snap.net.nz>
--
-- 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.
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity tcp_extract_header is
port(
clk : in std_logic;
data_in : in std_logic_vector(7 downto 0) := (others => '0');
data_valid_in : in std_logic := '0';
data_out : out std_logic_vector(7 downto 0) := (others => '0');
data_valid_out : out std_logic := '0';
tcp_hdr_valid : out std_logic := '0';
tcp_src_port : out std_logic_vector(15 downto 0) := (others => '0');
tcp_dst_port : out std_logic_vector(15 downto 0) := (others => '0');
tcp_seq_num : out std_logic_vector(31 downto 0) := (others => '0');
tcp_ack_num : out std_logic_vector(31 downto 0) := (others => '0');
tcp_window : out std_logic_vector(15 downto 0) := (others => '0');
tcp_flag_urg : out std_logic := '0';
tcp_flag_ack : out std_logic := '0';
tcp_flag_psh : out std_logic := '0';
tcp_flag_rst : out std_logic := '0';
tcp_flag_syn : out std_logic := '0';
tcp_flag_fin : out std_logic := '0';
tcp_checksum : out std_logic_vector(15 downto 0) := (others => '0');
tcp_urgent_ptr : out std_logic_vector(15 downto 0) := (others => '0'));
end tcp_extract_header;
architecture Behavioral of tcp_extract_header is
signal i_tcp_hdr_valid : std_logic := '0';
signal i_tcp_src_port : std_logic_vector(15 downto 0) := (others => '0');
signal i_tcp_dst_port : std_logic_vector(15 downto 0) := (others => '0');
signal i_tcp_seq_num : std_logic_vector(31 downto 0) := (others => '0');
signal i_tcp_ack_num : std_logic_vector(31 downto 0) := (others => '0');
signal i_tcp_window : std_logic_vector(15 downto 0) := (others => '0');
signal i_tcp_flag_urg : std_logic := '0';
signal i_tcp_flag_ack : std_logic := '0';
signal i_tcp_flag_psh : std_logic := '0';
signal i_tcp_flag_rst : std_logic := '0';
signal i_tcp_flag_syn : std_logic := '0';
signal i_tcp_flag_fin : std_logic := '0';
signal i_tcp_checksum : std_logic_vector(15 downto 0) := (others => '0');
signal i_tcp_urgent_ptr : std_logic_vector(15 downto 0) := (others => '0');
signal byte_hdr_len : unsigned(10 downto 0) := (others => '0');
signal data_count : unsigned(10 downto 0) := (others => '0');
signal count : unsigned( 4 downto 0) := (others => '0');
begin
tcp_hdr_valid <= i_tcp_hdr_valid;
tcp_src_port <= i_tcp_src_port;
tcp_dst_port <= i_tcp_dst_port;
tcp_seq_num <= i_tcp_seq_num;
tcp_ack_num <= i_tcp_ack_num;
tcp_window <= i_tcp_window;
tcp_flag_urg <= i_tcp_flag_urg;
tcp_flag_ack <= i_tcp_flag_ack;
tcp_flag_psh <= i_tcp_flag_psh;
tcp_flag_rst <= i_tcp_flag_rst;
tcp_flag_syn <= i_tcp_flag_syn;
tcp_flag_fin <= i_tcp_flag_fin;
tcp_checksum <= i_tcp_checksum;
tcp_urgent_ptr <= i_tcp_urgent_ptr;
process(clk)
begin
if rising_edge(clk) then
data_valid_out <= '0';
data_out <= (others => '0');
i_tcp_hdr_valid <= '0';
if data_valid_in = '1' then
case count is
when "00000" => i_tcp_src_port(15 downto 8) <= data_in;
when "00001" => i_tcp_src_port( 7 downto 0) <= data_in;
when "00010" => i_tcp_dst_port(15 downto 8) <= data_in;
when "00011" => i_tcp_dst_port( 7 downto 0) <= data_in;
when "00100" => i_tcp_seq_num(31 downto 24) <= data_in;
when "00101" => i_tcp_seq_num(23 downto 16) <= data_in;
when "00110" => i_tcp_seq_num(15 downto 8) <= data_in;
when "00111" => i_tcp_seq_num( 7 downto 0) <= data_in;
when "01000" => i_tcp_ack_num(31 downto 24) <= data_in;
when "01001" => i_tcp_ack_num(23 downto 16) <= data_in;
when "01010" => i_tcp_ack_num(15 downto 8) <= data_in;
when "01011" => i_tcp_ack_num( 7 downto 0) <= data_in;
when "01100" => byte_hdr_len(5 downto 2) <= unsigned(data_in( 7 downto 4));
when "01101" => i_tcp_flag_urg <= data_in(5);
i_tcp_flag_ack <= data_in(4);
i_tcp_flag_psh <= data_in(3);
i_tcp_flag_rst <= data_in(2);
i_tcp_flag_syn <= data_in(1);
i_tcp_flag_fin <= data_in(0);
when "01110" => i_tcp_window(15 downto 8) <= data_in;
when "01111" => i_tcp_window( 7 downto 0) <= data_in;
when "10000" => i_tcp_checksum(15 downto 8) <= data_in;
when "10001" => i_tcp_checksum( 7 downto 0) <= data_in;
when "10010" => i_tcp_urgent_ptr(15 downto 8) <= data_in;
when "10011" => i_tcp_urgent_ptr( 7 downto 0) <= data_in;
when others => if data_count = byte_hdr_len then
data_valid_out <= data_valid_in;
data_out <= data_in;
i_tcp_hdr_valid <= '1';
elsif data_count > byte_hdr_len then
data_valid_out <= data_valid_in;
data_out <= data_in;
i_tcp_hdr_valid <= '0';
end if;
end case;
if count /= "11111" then
count <= count+1;
end if;
data_count <= data_count + 1;
else
-- For when TCP packets have no data
if data_count = byte_hdr_len and byte_hdr_len /= 0 then
i_tcp_hdr_valid <= '1';
end if;
data_valid_out <= '0';
data_out <= data_in;
count <= (others => '0');
data_count <= (others => '0');
end if;
end if;
end process;
end Behavioral; | VHDL | 5 | hamsternz/FPGA_Webserver | hdl/tcp/tcp_extract_header.vhd | [
"MIT"
] |
# mscore
> Ova komanda je pseudonim za `musescore`.
- Pregledaj dokumentaciju za izvornu komandu:
`tldr musescore`
| Markdown | 1 | derNiklaas/tldr | pages.bs/common/mscore.md | [
"CC-BY-4.0"
] |
#layer {
marker-width: 10;
marker-allow-overlap: true;
marker-fill: peru;
}
#layer::label {
text-face-name: "DejaVu Sans Book";
text-name: "'1'";
text-fill: tomato;
text-allow-overlap: true;
}
| CartoCSS | 4 | nimix/carto | test/rendering-mss/basic_attachment_separate_with_label.mss | [
"Apache-2.0"
] |
To test this, send https://www.google.com/search?q=test@example.com or gmail.com?q=bengotow@gmail.com
to yourself from a client that allows plaintext or html editing.
What about gmail.com/bengotow@gmail.com - Oh man you're asking for trouble.
| HTML | 0 | cnheider/nylas-mail | packages/client-app/internal_packages/message-list/spec/autolinker-fixtures/both-email-and-url-in.html | [
"MIT"
] |
<div class="popup alert corner" id="popup-delete">
<button class="close"><img src="../assets/cross.svg" alt="close" title="close message"></button>
<p class="message">
<b class="uppercase">ARE YOU SURE YOU WOULD LIKE TO DELETE YOUR ACCOUNT?</b>
<br><br>
<button class="white" id="delete-account-confirm-button" onclick="confirmAccountDeletion();">yes, delete my account</button>
<br><br>
<button class="bold white" onclick="hidePopup('popup-delete');">no, wait!</button>
</p>
</div> | Kit | 2 | pws1453/web-client | source/imports/app/account-popup-delete-account.kit | [
"MIT"
] |
.markdown > p {
margin-top: 12px;
}
.font-bold {
font-weight: 700;
}
.foo .foo\:markdown > p {
margin-top: 12px;
}
.foo .foo\:font-bold {
font-weight: 700;
}
.foo .foo\:visited\:markdown:visited > p {
margin-top: 12px;
}
.foo .foo\:hover\:font-bold:hover {
font-weight: 700;
}
@media (min-width: 640px) {
.foo .sm\:foo\:font-bold {
font-weight: 700;
}
}
@media (min-width: 768px) {
.foo .md\:foo\:focus\:font-bold:focus {
font-weight: 700;
}
}
@media (min-width: 1024px) {
.foo .lg\:foo\:disabled\:markdown:disabled > p {
margin-top: 12px;
}
}
| CSS | 3 | mickaelamimba/Round-game | node_modules/tailwindcss/jit/tests/modify-selectors.test.css | [
"MIT"
] |
a quote from the necronomicon = "That is not dead which can eternal lie.
And with strange aeons even death may die."
console.log (a quote from the necronomicon)
| PogoScript | 0 | featurist/pogoscript | examples/multilineString.pogo | [
"BSD-2-Clause"
] |
CREATE OR REPLACE FUNCTION hdb_catalog.check_violation(msg text) RETURNS bool AS
$$
BEGIN
RAISE check_violation USING message=msg;
END;
$$ LANGUAGE plpgsql;
| SQL | 4 | gh-oss-contributor/graphql-engine-1 | server/src-rsr/migrations/29_to_30.sql | [
"Apache-2.0",
"MIT"
] |
[
{
"@id": "http://example.com/IriCollissions",
"http://example.com/vocab/collidingTerm": [
{
"@value": "value 1"
},
{
"@value": 2
},
{
"@value": 3
},
{
"@value": "four"
},
{
"@value": 5
}
]
}
] | JSONLD | 1 | fsteeg/json-ld-api | tests/flatten/0034-out.jsonld | [
"W3C"
] |
# Allow SSH tab completion for mosh hostnames
compdef mosh=ssh
| Shell | 3 | chensanle/ohmyzsh | plugins/mosh/mosh.plugin.zsh | [
"MIT"
] |
package com.baeldung.hamcrest;
import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
public class IsPositiveInteger extends TypeSafeMatcher<Integer> {
public void describeTo(Description description) {
description.appendText("a positive integer");
}
@Factory
public static Matcher<Integer> isAPositiveInteger() {
return new IsPositiveInteger();
}
@Override
protected boolean matchesSafely(Integer integer) {
return integer > 0;
}
}
| Java | 4 | DBatOWL/tutorials | libraries-testing/src/test/java/com/baeldung/hamcrest/IsPositiveInteger.java | [
"MIT"
] |
--TEST--
Try finally (with for continue)
--FILE--
<?php
function foo () {
for($i = 0; $i < 5; $i++) {
do {
try {
try {
} finally {
}
} catch (Exception $e) {
} finally {
continue;
}
} while (0);
}
}
foo();
?>
--EXPECTF--
Fatal error: jump out of a finally block is disallowed in %stry_finally_009.php on line %d
| PHP | 2 | guomoumou123/php5.5.10 | Zend/tests/try_finally_009.phpt | [
"PHP-3.01"
] |
ARCHIVE_READ_DISK(3) manual page
== NAME ==
'''archive_read_disk_new''',
'''archive_read_disk_set_behavior''',
'''archive_read_disk_set_symlink_logical''',
'''archive_read_disk_set_symlink_physical''',
'''archive_read_disk_set_symlink_hybrid''',
'''archive_read_disk_entry_from_file''',
'''archive_read_disk_gname''',
'''archive_read_disk_uname''',
'''archive_read_disk_set_uname_lookup''',
'''archive_read_disk_set_gname_lookup''',
'''archive_read_disk_set_standard_lookup'''
- functions for reading objects from disk
== LIBRARY ==
Streaming Archive Library (libarchive, -larchive)
== SYNOPSIS ==
'''<nowiki>#include <archive.h></nowiki>'''
<br>
''struct archive *''
<br>
'''archive_read_disk_new'''(''void'');
<br>
''int''
<br>
'''archive_read_disk_set_behavior'''(''struct archive *'', ''int'');
<br>
''int''
<br>
'''archive_read_disk_set_symlink_logical'''(''struct archive *'');
<br>
''int''
<br>
'''archive_read_disk_set_symlink_physical'''(''struct archive *'');
<br>
''int''
<br>
'''archive_read_disk_set_symlink_hybrid'''(''struct archive *'');
<br>
''const char *''
<br>
'''archive_read_disk_gname'''(''struct archive *'', ''gid_t'');
<br>
''const char *''
<br>
'''archive_read_disk_uname'''(''struct archive *'', ''uid_t'');
<br>
''int''
<br>
'''archive_read_disk_set_gname_lookup'''(''struct archive *'', ''void *'', ''const char *(*lookup)(void *, gid_t)'', ''void (*cleanup)(void *)'');
<br>
''int''
<br>
'''archive_read_disk_set_uname_lookup'''(''struct archive *'', ''void *'', ''const char *(*lookup)(void *, uid_t)'', ''void (*cleanup)(void *)'');
<br>
''int''
<br>
'''archive_read_disk_set_standard_lookup'''(''struct archive *'');
<br>
''int''
<br>
'''archive_read_disk_entry_from_file'''(''struct archive *'', ''struct archive_entry *'', ''int fd'', ''const struct stat *'');
== DESCRIPTION ==
These functions provide an API for reading information about
objects on disk.
In particular, they provide an interface for populating
'''struct archive_entry'''
objects.
<dl>
<dt>'''archive_read_disk_new'''()</dt><dd>
Allocates and initializes a
'''struct archive'''
object suitable for reading object information from disk.
</dd><dt>'''archive_read_disk_set_behavior'''()</dt><dd>
Configures various behavior options when reading entries from disk.
The flags field consists of a bitwise OR of one or more of the
following values:
<dl>
<dt>'''ARCHIVE_READDISK_HONOR_NODUMP'''</dt><dd>
Skip files and directories with the nodump file attribute (file flag) set.
By default, the nodump file attribute is ignored.
</dd><dt>'''ARCHIVE_READDISK_MAC_COPYFILE'''</dt><dd>
Mac OS X specific.
Read metadata (ACLs and extended attributes) with
[[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]].
By default, metadata is read using
[[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]].
</dd><dt>'''ARCHIVE_READDISK_NO_ACL'''</dt><dd>
Do not read Access Control Lists.
By default, ACLs are read from disk.
</dd><dt>'''ARCHIVE_READDISK_NO_FFLAGS'''</dt><dd>
Do not read file attributes (file flags).
By default, file attributes are read from disk.
See
[[chattr(1)|http://www.freebsd.org/cgi/man.cgi?query=chattr&sektion=1]]
(Linux)
or
[[chflags(1)|http://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=1]]
(FreeBSD, Mac OS X)
for more information on file attributes.
</dd><dt>'''ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS'''</dt><dd>
Do not traverse mount points.
By default, mount points are traversed.
</dd><dt>'''ARCHIVE_READDISK_NO_XATTR'''</dt><dd>
Do not read extended file attributes (xattrs).
By default, extended file attributes are read from disk.
See
[[xattr(7)|http://www.freebsd.org/cgi/man.cgi?query=xattr&sektion=7]]
(Linux,)
[[xattr(2)|http://www.freebsd.org/cgi/man.cgi?query=xattr&sektion=2]]
(Mac OS X,)
or
[[getextattr(8)|http://www.freebsd.org/cgi/man.cgi?query=getextattr&sektion=8]]
(FreeBSD)
for more information on extended file attributes.
</dd><dt>'''ARCHIVE_READDISK_RESTORE_ATIME'''</dt><dd>
Restore access time of traversed files.
By default, access time of traversed files is not restored.
</dd></dl>
</dd><dt>
'''archive_read_disk_set_symlink_logical'''(),
'''archive_read_disk_set_symlink_physical'''(),
'''archive_read_disk_set_symlink_hybrid'''()
</dt> <dd>
This sets the mode used for handling symbolic links.
The
"logical"
mode follows all symbolic links.
The
"physical"
mode does not follow any symbolic links.
The
"hybrid"
mode currently behaves identically to the
"logical"
mode.
</dd><dt>
'''archive_read_disk_gname'''(),
'''archive_read_disk_uname'''()
</dt> <dd>
Returns a user or group name given a gid or uid value.
By default, these always return a NULL string.
</dd><dt>
'''archive_read_disk_set_gname_lookup'''(),
'''archive_read_disk_set_uname_lookup'''()
</dt> <dd>
These allow you to override the functions used for
user and group name lookups.
You may also provide a
'''void *'''
pointer to a private data structure and a cleanup function for
that data.
The cleanup function will be invoked when the
'''struct archive'''
object is destroyed or when new lookup functions are registered.
</dd><dt>'''archive_read_disk_set_standard_lookup'''()</dt><dd>
This convenience function installs a standard set of user
and group name lookup functions.
These functions use
[[getpwuid(3)|http://www.freebsd.org/cgi/man.cgi?query=getpwuid&sektion=3]]
and
[[getgrgid(3)|http://www.freebsd.org/cgi/man.cgi?query=getgrgid&sektion=3]]
to convert ids to names, defaulting to NULL if the names cannot
be looked up.
These functions also implement a simple memory cache to reduce
the number of calls to
[[getpwuid(3)|http://www.freebsd.org/cgi/man.cgi?query=getpwuid&sektion=3]]
and
[[getgrgid(3)|http://www.freebsd.org/cgi/man.cgi?query=getgrgid&sektion=3]].
</dd><dt>'''archive_read_disk_entry_from_file'''()</dt><dd>
Populates a
'''struct archive_entry'''
object with information about a particular file.
The
'''archive_entry'''
object must have already been created with
[[ManPagerchiventryew3]]
and at least one of the source path or path fields must already be set.
(If both are set, the source path will be used.)
Information is read from disk using the path name from the
'''struct archive_entry'''
object.
If a file descriptor is provided, some information will be obtained using
that file descriptor, on platforms that support the appropriate
system calls.
If a pointer to a
'''struct stat'''
is provided, information from that structure will be used instead
of reading from the disk where appropriate.
This can provide performance benefits in scenarios where
'''struct stat'''
information has already been read from the disk as a side effect
of some other operation.
(For example, directory traversal libraries often provide this information.)
Where necessary, user and group ids are converted to user and group names
using the currently-registered lookup functions above.
This affects the file ownership fields and ACL values in the
'''struct archive_entry'''
object.
</dd></dl>
More information about the
''struct'' archive
object and the overall design of the library can be found in the
[[ManPageibarchive3]]
overview.
== EXAMPLES ==
The following illustrates basic usage of the library by
showing how to use it to copy an item on disk into an archive.
```text
void
file_to_archive(struct archive *a, const char *name)
{
char buff[8192];
size_t bytes_read;
struct archive *ard;
struct archive_entry *entry;
int fd;
ard = archive_read_disk_new();
archive_read_disk_set_standard_lookup(ard);
entry = archive_entry_new();
fd = open(name, O_RDONLY);
if (fd < 0)
return;
archive_entry_copy_pathname(entry, name);
archive_read_disk_entry_from_file(ard, entry, fd, NULL);
archive_write_header(a, entry);
while ((bytes_read = read(fd, buff, sizeof(buff))) > 0)
archive_write_data(a, buff, bytes_read);
archive_write_finish_entry(a);
archive_read_free(ard);
archive_entry_free(entry);
}
```
== RETURN VALUES ==
Most functions return
'''ARCHIVE_OK'''
(zero) on success, or one of several negative
error codes for errors.
Specific error codes include:
'''ARCHIVE_RETRY'''
for operations that might succeed if retried,
'''ARCHIVE_WARN'''
for unusual conditions that do not prevent further operations, and
'''ARCHIVE_FATAL'''
for serious errors that make remaining operations impossible.
'''archive_read_disk_new'''()
returns a pointer to a newly-allocated
'''struct archive'''
object or NULL if the allocation failed for any reason.
'''archive_read_disk_gname'''()
and
'''archive_read_disk_uname'''()
return
'''const char *'''
pointers to the textual name or NULL if the lookup failed for any reason.
The returned pointer points to internal storage that
may be reused on the next call to either of these functions;
callers should copy the string if they need to continue accessing it.
== ERRORS ==
Detailed error codes and textual descriptions are available from the
'''archive_errno'''()
and
'''archive_error_string'''()
functions.
== SEE ALSO ==
[[ManPageBsdtar1]],
[[ManPagerchiveead3]],
[[ManPagerchivetil3]],
[[ManPagerchiverite3]],
[[ManPagerchiveriteisk3]],
[[ManPageibarchive3]]
== HISTORY ==
The
'''libarchive'''
library first appeared in
FreeBSD 5.3.
The
'''archive_read_disk'''
interface was added to
'''libarchive''' 2.6
and first appeared in
FreeBSD 8.0.
== AUTHORS ==
The
'''libarchive'''
library was written by
Tim Kientzle <kientzle@FreeBSD.org.>
== BUGS ==
The
"standard"
user name and group name lookup functions are not the defaults because
[[getgrgid(3)|http://www.freebsd.org/cgi/man.cgi?query=getgrgid&sektion=3]]
and
[[getpwuid(3)|http://www.freebsd.org/cgi/man.cgi?query=getpwuid&sektion=3]]
are sometimes too large for particular applications.
The current design allows the application author to use a more
compact implementation when appropriate.
The full list of metadata read from disk by
'''archive_read_disk_entry_from_file'''()
is necessarily system-dependent.
The
'''archive_read_disk_entry_from_file'''()
function reads as much information as it can from disk.
Some method should be provided to limit this so that clients who
do not need ACLs, for instance, can avoid the extra work needed
to look up such information.
This API should provide a set of methods for walking a directory tree.
That would make it a direct parallel of the
[[ManPagerchiveead3]]
API.
When such methods are implemented, the
"hybrid"
symbolic link mode will make sense.
| MediaWiki | 5 | probonopd/imagewriter | dependencies/libarchive-3.4.2/doc/wiki/ManPageArchiveReadDisk3.wiki | [
"Apache-2.0"
] |
2019-09-18 22:45:04 New key binding (context "default"): meta2-1;5P => /bar scroll buflist * -100%
2019-09-18 22:45:04 New key binding (context "default"): meta2-1;5Q => /bar scroll buflist * +100%
2019-09-18 22:45:04 New key binding (context "default"): meta-meta-OQ => /bar scroll buflist * e
2019-09-18 22:45:04 New key binding (context "default"): meta2-1;3Q => /bar scroll buflist * e
2019-09-18 22:45:04 New key binding (context "default"): meta2-1;3P => /bar scroll buflist * b
2019-09-18 22:45:04 New key binding (context "default"): meta-meta-OP => /bar scroll buflist * b
2019-09-18 22:45:04 New key binding (context "default"): meta-OQ => /bar scroll buflist * +100%
2019-09-18 22:45:04 New key binding (context "default"): meta-OP => /bar scroll buflist * -100%
2019-09-18 22:45:04 New key binding (context "default"): meta-meta2-12~ => /bar scroll buflist * e
2019-09-18 22:45:04 New key binding (context "default"): meta-meta2-11~ => /bar scroll buflist * b
2019-09-18 22:45:04 New key binding (context "default"): meta2-12^ => /bar scroll buflist * +100%
2019-09-18 22:45:04 New key binding (context "default"): meta2-12~ => /bar scroll buflist * +100%
2019-09-18 22:45:04 New key binding (context "default"): meta2-11^ => /bar scroll buflist * -100%
2019-09-18 22:45:04 New key binding (context "default"): meta2-11~ => /bar scroll buflist * -100%
2019-09-18 22:45:04 Plugins loaded: alias, buflist, charset, exec, fifo, fset, irc, logger, lua, perl, python, relay, ruby, script, spell, tcl, trigger, xfer
2019-09-18 23:05:59 =!= You can not write text in this buffer
2019-09-18 23:06:03 =!= You can not write text in this buffer
2019-09-18 23:06:08 =!= You can not write text in this buffer
2019-09-18 23:06:32 fifo: pipe closed
2019-09-18 23:06:34 Plugins loaded: alias, buflist, charset, exec, fifo, fset, irc, logger, lua, perl, python, relay, ruby, script, spell, tcl, trigger, xfer
2019-09-18 23:06:36 [core]
2019-09-18 23:06:36 away command filter key plugin reload set version
2019-09-18 23:06:36 bar cursor help layout print repeat unset wait
2019-09-18 23:06:36 buffer debug history mouse proxy save upgrade window
2019-09-18 23:06:36 color eval input mute quit secure uptime
2019-09-18 23:06:36 [trigger]
2019-09-18 23:06:36 trigger
2019-09-18 23:06:36 [alias]
2019-09-18 23:06:36 AAWAY C IG M REDRAW UMODE WII
2019-09-18 23:06:36 alias CHAT J MSGBUF SAY V WM
2019-09-18 23:06:36 ANICK CL K MUB SIGNOFF W WW
2019-09-18 23:06:36 BEEP CLOSE KB N T WC
2019-09-18 23:06:36 BYE EXIT LEAVE Q UB WI
2019-09-18 23:06:36 [buflist]
2019-09-18 23:06:36 buflist
2019-09-18 23:06:36 [fset]
2019-09-18 23:06:36 fset
2019-09-18 23:06:36 [perl]
2019-09-18 23:06:36 perl
2019-09-18 23:06:36 [ruby]
2019-09-18 23:06:36 ruby
2019-09-18 23:06:36 [logger]
2019-09-18 23:06:36 logger
2019-09-18 23:06:36 [python]
2019-09-18 23:06:36 python
2019-09-18 23:06:36 [xfer]
2019-09-18 23:06:36 me xfer
2019-09-18 23:06:36 [charset]
2019-09-18 23:06:36 charset
2019-09-18 23:06:36 [fifo]
2019-09-18 23:06:36 fifo
2019-09-18 23:06:36 [exec]
2019-09-18 23:06:36 exec
2019-09-18 23:06:36 [irc]
2019-09-18 23:06:36 admin die lusers ping saquit userhost
2019-09-18 23:06:36 allchan disconnect map pong server users
2019-09-18 23:06:36 allpv halfop me query service version
2019-09-18 23:06:36 allserv ignore mode quiet servlist voice
2019-09-18 23:06:36 ban info motd quote squery wallchops
2019-09-18 23:06:36 cap invite msg reconnect squit wallops
2019-09-18 23:06:36 connect ison names rehash stats who
2019-09-18 23:06:36 ctcp join nick remove summon whois
2019-09-18 23:06:36 cycle kick notice restart time whowas
2019-09-18 23:06:36 dcc kickban notify sajoin topic
2019-09-18 23:06:36 dehalfop kill op samode trace
2019-09-18 23:06:36 deop links oper sanick unban
2019-09-18 23:06:36 devoice list part sapart unquiet
2019-09-18 23:06:36 [relay]
2019-09-18 23:06:36 relay
2019-09-18 23:06:36 [script]
2019-09-18 23:06:36 script
2019-09-18 23:06:36 [lua]
2019-09-18 23:06:36 lua
2019-09-18 23:06:36 [spell]
2019-09-18 23:06:36 spell
2019-09-18 23:06:36 [tcl]
2019-09-18 23:06:36 tcl
2019-09-18 23:06:48 =!= You can not write text in this buffer
2019-09-18 23:06:50 =!= irc: command "ping" must be executed on irc buffer (server, channel or private)
2019-09-18 23:06:58 No server
2019-09-18 23:07:01 =!= Error: unknown command "/add" (type /help for help)
2019-09-18 23:07:39 =!= irc: unable to add temporary server "freenode" because the addition of temporary servers with command /connect is currently disabled
2019-09-18 23:07:39 =!= irc: if you want to add a standard server, use the command "/server add" (see /help server); if you really want to add a temporary server (NOT SAVED), turn on the option irc.look.temporary_servers
2019-09-18 23:07:52 No server
2019-09-18 23:07:58 =!= Too few arguments for command "/server add" (help on command: /help server)
2019-09-18 23:08:07 [irc] /server list|listfull [<name>]
2019-09-18 23:08:07 add <name> <hostname>[/<port>] [-temp] [-<option>[=<value>]] [-no<option>]
2019-09-18 23:08:07 copy|rename <name> <new_name>
2019-09-18 23:08:07 reorder <name> [<name>...]
2019-09-18 23:08:07 open <name>|-all [<name>...]
2019-09-18 23:08:07 del|keep <name>
2019-09-18 23:08:07 deloutq|jump|raw
2019-09-18 23:08:07 list, add or remove IRC servers
2019-09-18 23:08:07 list: list servers (without argument, this list is displayed)
2019-09-18 23:08:07 listfull: list servers with detailed info for each server
2019-09-18 23:08:07 add: add a new server
2019-09-18 23:08:07 name: server name, for internal and display use; this name is used to connect to the server (/connect name) and to set server options: irc.server.name.xxx
2019-09-18 23:08:07 hostname: name or IP address of server, with optional port (default: 6667), many addresses can be separated by a comma
2019-09-18 23:08:07 -temp: add a temporary server (not saved)
2019-09-18 23:08:07 option: set option for server (for boolean option, value can be omitted)
2019-09-18 23:08:07 nooption: set boolean option to 'off' (for example: -nossl)
2019-09-18 23:08:07 copy: duplicate a server
2019-09-18 23:08:07 rename: rename a server
2019-09-18 23:08:07 reorder: reorder list of servers
2019-09-18 23:08:07 open: open the server buffer without connecting
2019-09-18 23:08:07 keep: keep server in config file (for temporary servers only)
2019-09-18 23:08:07 del: delete a server
2019-09-18 23:08:07 deloutq: delete messages out queue for all servers (all messages WeeChat is currently sending)
2019-09-18 23:08:07 jump: jump to server buffer
2019-09-18 23:08:07 raw: open buffer with raw IRC data
2019-09-18 23:08:07 Examples:
2019-09-18 23:08:07 /server listfull
2019-09-18 23:08:07 /server add freenode chat.freenode.net
2019-09-18 23:08:07 /server add freenode chat.freenode.net/6697 -ssl -autoconnect
2019-09-18 23:08:07 /server add chatspike irc.chatspike.net/6667,irc.duckspike.net/6667
2019-09-18 23:08:07 /server copy freenode freenode-test
2019-09-18 23:08:07 /server rename freenode-test freenode2
2019-09-18 23:08:07 /server reorder freenode2 freenode
2019-09-18 23:08:07 /server del freenode
2019-09-18 23:08:07 /server deloutq
2019-09-18 23:08:26 irc: server freenode added
2019-09-18 23:08:31 All servers:
2019-09-18 23:08:31 freenode
2019-09-18 23:08:48 [core]
2019-09-18 23:08:48 away cursor history mute reload unset window
2019-09-18 23:08:48 bar debug input plugin repeat upgrade
2019-09-18 23:08:48 buffer eval key print save uptime
2019-09-18 23:08:48 color filter layout proxy secure version
2019-09-18 23:08:48 command help mouse quit set wait
2019-09-18 23:08:48 [trigger]
2019-09-18 23:08:48 trigger
2019-09-18 23:08:48 [alias]
2019-09-18 23:08:48 AAWAY C IG M REDRAW UMODE WII
2019-09-18 23:08:48 alias CHAT J MSGBUF SAY V WM
2019-09-18 23:08:48 ANICK CL K MUB SIGNOFF W WW
2019-09-18 23:08:48 BEEP CLOSE KB N T WC
2019-09-18 23:08:48 BYE EXIT LEAVE Q UB WI
2019-09-18 23:08:48 [buflist]
2019-09-18 23:08:48 buflist
2019-09-18 23:08:48 [fset]
2019-09-18 23:08:48 fset
2019-09-18 23:08:48 [perl]
2019-09-18 23:08:48 perl
2019-09-18 23:08:48 [ruby]
2019-09-18 23:08:48 ruby
2019-09-18 23:08:48 [logger]
2019-09-18 23:08:48 logger
2019-09-18 23:08:48 [python]
2019-09-18 23:08:48 python
2019-09-18 23:08:48 [xfer]
2019-09-18 23:08:48 me xfer
2019-09-18 23:08:48 [charset]
2019-09-18 23:08:48 charset
2019-09-18 23:08:48 [fifo]
2019-09-18 23:08:48 fifo
2019-09-18 23:08:48 [exec]
2019-09-18 23:08:48 exec
2019-09-18 23:08:48 [irc]
2019-09-18 23:08:48 admin halfop motd rehash time
2019-09-18 23:08:48 allchan ignore msg remove topic
2019-09-18 23:08:48 allpv info names restart trace
2019-09-18 23:08:48 allserv invite nick sajoin unban
2019-09-18 23:08:48 ban ison notice samode unquiet
2019-09-18 23:08:48 cap join notify sanick userhost
2019-09-18 23:08:48 connect kick op sapart users
2019-09-18 23:08:48 ctcp kickban oper saquit version
2019-09-18 23:08:48 cycle kill part server voice
2019-09-18 23:08:48 dcc links ping service wallchops
2019-09-18 23:08:48 dehalfop list pong servlist wallops
2019-09-18 23:08:48 deop lusers query squery who
2019-09-18 23:08:48 devoice map quiet squit whois
2019-09-18 23:08:48 die me quote stats whowas
2019-09-18 23:08:48 disconnect mode reconnect summon
2019-09-18 23:08:48 [relay]
2019-09-18 23:08:48 relay
2019-09-18 23:08:48 [script]
2019-09-18 23:08:48 script
2019-09-18 23:08:48 [lua]
2019-09-18 23:08:48 lua
2019-09-18 23:08:48 [spell]
2019-09-18 23:08:48 spell
2019-09-18 23:08:48 [tcl]
2019-09-18 23:08:48 tcl
2019-09-18 23:14:36 [irc] /server list|listfull [<name>]
2019-09-18 23:14:36 add <name> <hostname>[/<port>] [-temp] [-<option>[=<value>]] [-no<option>]
2019-09-18 23:14:36 copy|rename <name> <new_name>
2019-09-18 23:14:36 reorder <name> [<name>...]
2019-09-18 23:14:36 open <name>|-all [<name>...]
2019-09-18 23:14:36 del|keep <name>
2019-09-18 23:14:36 deloutq|jump|raw
2019-09-18 23:14:36 list, add or remove IRC servers
2019-09-18 23:14:36 list: list servers (without argument, this list is displayed)
2019-09-18 23:14:36 listfull: list servers with detailed info for each server
2019-09-18 23:14:36 add: add a new server
2019-09-18 23:14:36 name: server name, for internal and display use; this name is used to connect to the server (/connect name) and to set server options: irc.server.name.xxx
2019-09-18 23:14:36 hostname: name or IP address of server, with optional port (default: 6667), many addresses can be separated by a comma
2019-09-18 23:14:36 -temp: add a temporary server (not saved)
2019-09-18 23:14:36 option: set option for server (for boolean option, value can be omitted)
2019-09-18 23:14:36 nooption: set boolean option to 'off' (for example: -nossl)
2019-09-18 23:14:36 copy: duplicate a server
2019-09-18 23:14:36 rename: rename a server
2019-09-18 23:14:36 reorder: reorder list of servers
2019-09-18 23:14:36 open: open the server buffer without connecting
2019-09-18 23:14:36 keep: keep server in config file (for temporary servers only)
2019-09-18 23:14:36 del: delete a server
2019-09-18 23:14:36 deloutq: delete messages out queue for all servers (all messages WeeChat is currently sending)
2019-09-18 23:14:36 jump: jump to server buffer
2019-09-18 23:14:36 raw: open buffer with raw IRC data
2019-09-18 23:14:36 Examples:
2019-09-18 23:14:36 /server listfull
2019-09-18 23:14:36 /server add freenode chat.freenode.net
2019-09-18 23:14:36 /server add freenode chat.freenode.net/6697 -ssl -autoconnect
2019-09-18 23:14:36 /server add chatspike irc.chatspike.net/6667,irc.duckspike.net/6667
2019-09-18 23:14:36 /server copy freenode freenode-test
2019-09-18 23:14:36 /server rename freenode-test freenode2
2019-09-18 23:14:36 /server reorder freenode2 freenode
2019-09-18 23:14:36 /server del freenode
2019-09-18 23:14:36 /server deloutq
2019-09-18 23:14:40 [irc] /server list|listfull [<name>]
2019-09-18 23:14:40 add <name> <hostname>[/<port>] [-temp] [-<option>[=<value>]] [-no<option>]
2019-09-18 23:14:40 copy|rename <name> <new_name>
2019-09-18 23:14:40 reorder <name> [<name>...]
2019-09-18 23:14:40 open <name>|-all [<name>...]
2019-09-18 23:14:40 del|keep <name>
2019-09-18 23:14:40 deloutq|jump|raw
2019-09-18 23:14:40 list, add or remove IRC servers
2019-09-18 23:14:40 list: list servers (without argument, this list is displayed)
2019-09-18 23:14:40 listfull: list servers with detailed info for each server
2019-09-18 23:14:40 add: add a new server
2019-09-18 23:14:40 name: server name, for internal and display use; this name is used to connect to the server (/connect name) and to set server options: irc.server.name.xxx
2019-09-18 23:14:40 hostname: name or IP address of server, with optional port (default: 6667), many addresses can be separated by a comma
2019-09-18 23:14:40 -temp: add a temporary server (not saved)
2019-09-18 23:14:40 option: set option for server (for boolean option, value can be omitted)
2019-09-18 23:14:40 nooption: set boolean option to 'off' (for example: -nossl)
2019-09-18 23:14:40 copy: duplicate a server
2019-09-18 23:14:40 rename: rename a server
2019-09-18 23:14:40 reorder: reorder list of servers
2019-09-18 23:14:40 open: open the server buffer without connecting
2019-09-18 23:14:40 keep: keep server in config file (for temporary servers only)
2019-09-18 23:14:40 del: delete a server
2019-09-18 23:14:40 deloutq: delete messages out queue for all servers (all messages WeeChat is currently sending)
2019-09-18 23:14:40 jump: jump to server buffer
2019-09-18 23:14:40 raw: open buffer with raw IRC data
2019-09-18 23:14:40 Examples:
2019-09-18 23:14:40 /server listfull
2019-09-18 23:14:40 /server add freenode chat.freenode.net
2019-09-18 23:14:40 /server add freenode chat.freenode.net/6697 -ssl -autoconnect
2019-09-18 23:14:40 /server add chatspike irc.chatspike.net/6667,irc.duckspike.net/6667
2019-09-18 23:14:40 /server copy freenode freenode-test
2019-09-18 23:14:40 /server rename freenode-test freenode2
2019-09-18 23:14:40 /server reorder freenode2 freenode
2019-09-18 23:14:40 /server del freenode
2019-09-18 23:14:40 /server deloutq
2019-09-18 23:16:02 Option changed: irc.server.freenode.nicks = "kkY,kkYrusobad,kkYurshiet" (default if null: "kky,kky1,kky2,kky3,kky4")
2019-09-18 23:16:25 Option changed: irc.server.freenode.username = "kkY" (default if null: "kky")
2019-09-18 23:16:35 Option changed: irc.server.freenode.realname = "PY" (default if null: "")
2019-09-18 23:16:47 Option changed: irc.server.freenode.autoconnect = on (default if null: off)
2019-09-18 23:35:21 fifo: pipe closed
2019-09-18 23:35:24 Plugins loaded: alias, buflist, charset, exec, fifo, fset, irc, logger, lua, perl, python, relay, ruby, script, spell, tcl, trigger, xfer
2019-09-18 23:35:35 fifo: pipe closed
2019-09-18 23:43:04 Plugins loaded: alias, buflist, charset, exec, fifo, fset, irc, logger, lua, perl, python, relay, ruby, script, spell, tcl, trigger, xfer
2019-09-19 00:05:12 fifo: pipe closed
| IRC log | 1 | akshaykumar23399/DOTS | weechat/logs/core.weechat.weechatlog | [
"Unlicense"
] |
<p>
<b>DDF (<%= @ddfName -%>) for project: <%= @project.name -%></b>
</p>
<pre>
<font size=-1>
<%=@ddfText-%>
</font>
</pre>
<%= link_to 'Download DDF', {:action => 'download_ddf', :id => @project.id} -%>
| RHTML | 2 | andypohl/kent | src/hg/encode/hgEncodeSubmit/app/views/pipeline/show_ddf.rhtml | [
"MIT"
] |
<?xml version='1.0' encoding='UTF-8'?>
<Project Type="Project" LVVersion="13008000">
<Property Name="NI.LV.All.SourceOnly" Type="Bool">true</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="SMO.Basic.lvclass" Type="LVClass" URL="../SMO.Basic/SMO.Basic.lvclass"/>
<Item Name="SMO.BasicByRef.lvclass" Type="LVClass" URL="../SMO.BasicByRef/SMO.BasicByRef.lvclass"/>
<Item Name="SMO.ByRefWithEvents.lvclass" Type="LVClass" URL="../SMO.ByRefWithEvents/SMO.ByRefWithEvents.lvclass"/>
<Item Name="Dependencies" Type="Dependencies">
<Item Name="vi.lib" Type="Folder">
<Item Name="Add State(s) to Queue__jki_lib_state_machine.vi" Type="VI" URL="/<vilib>/addons/_JKI Toolkits/State Machine/_jki_lib_state_machine.llb/Add State(s) to Queue__jki_lib_state_machine.vi"/>
<Item Name="Attribute.Config.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Support/Attribute.Config/Attribute.Config.lvclass"/>
<Item Name="Attribute.Identity.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Support/Attribute.Identity/Attribute.Identity.lvclass"/>
<Item Name="Attribute.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Support/Attribute/Attribute.lvclass"/>
<Item Name="Attribute.Owner.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Support/Attribute.Owner/Attribute.Owner.lvclass"/>
<Item Name="Attribute.SharedResource.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Support/Attribute.SharedResource/Attribute.SharedResource.lvclass"/>
<Item Name="Attribute.StartupBehavior.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Support/Attribute.StartupBehavior/Attribute.StartupBehavior.lvclass"/>
<Item Name="Clear Errors.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Clear Errors.vi"/>
<Item Name="Dependency.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Dependency/Dependency.lvclass"/>
<Item Name="Error Cluster From Error Code.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Error Cluster From Error Code.vi"/>
<Item Name="Get File Extension.vi" Type="VI" URL="/<vilib>/Utility/libraryn.llb/Get File Extension.vi"/>
<Item Name="Get LV Class Name.vi" Type="VI" URL="/<vilib>/Utility/LVClass/Get LV Class Name.vi"/>
<Item Name="Get Rendezvous Status.vi" Type="VI" URL="/<vilib>/Utility/rendezvs.llb/Get Rendezvous Status.vi"/>
<Item Name="GetNamedRendezvousPrefix.vi" Type="VI" URL="/<vilib>/Utility/rendezvs.llb/GetNamedRendezvousPrefix.vi"/>
<Item Name="MD5Checksum core.vi" Type="VI" URL="/<vilib>/Utility/MD5Checksum.llb/MD5Checksum core.vi"/>
<Item Name="MD5Checksum format message-digest.vi" Type="VI" URL="/<vilib>/Utility/MD5Checksum.llb/MD5Checksum format message-digest.vi"/>
<Item Name="MD5Checksum pad.vi" Type="VI" URL="/<vilib>/Utility/MD5Checksum.llb/MD5Checksum pad.vi"/>
<Item Name="MD5Checksum string.vi" Type="VI" URL="/<vilib>/Utility/MD5Checksum.llb/MD5Checksum string.vi"/>
<Item Name="Parse State Queue__jki_lib_state_machine.vi" Type="VI" URL="/<vilib>/addons/_JKI Toolkits/State Machine/_jki_lib_state_machine.llb/Parse State Queue__jki_lib_state_machine.vi"/>
<Item Name="Registry-SMO.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/Registry/Registry-SMO.lvclass"/>
<Item Name="Release Waiting Procs.vi" Type="VI" URL="/<vilib>/Utility/rendezvs.llb/Release Waiting Procs.vi"/>
<Item Name="RemoveNamedRendezvousPrefix.vi" Type="VI" URL="/<vilib>/Utility/rendezvs.llb/RemoveNamedRendezvousPrefix.vi"/>
<Item Name="Rendezvous RefNum" Type="VI" URL="/<vilib>/Utility/rendezvs.llb/Rendezvous RefNum"/>
<Item Name="RendezvousDataCluster.ctl" Type="VI" URL="/<vilib>/Utility/rendezvs.llb/RendezvousDataCluster.ctl"/>
<Item Name="Resize Rendezvous.vi" Type="VI" URL="/<vilib>/Utility/rendezvs.llb/Resize Rendezvous.vi"/>
<Item Name="Search and Replace Pattern.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Search and Replace Pattern.vi"/>
<Item Name="Set Busy.vi" Type="VI" URL="/<vilib>/Utility/cursorutil.llb/Set Busy.vi"/>
<Item Name="Set Cursor (Cursor ID).vi" Type="VI" URL="/<vilib>/Utility/cursorutil.llb/Set Cursor (Cursor ID).vi"/>
<Item Name="Set Cursor (Icon Pict).vi" Type="VI" URL="/<vilib>/Utility/cursorutil.llb/Set Cursor (Icon Pict).vi"/>
<Item Name="Set Cursor.vi" Type="VI" URL="/<vilib>/Utility/cursorutil.llb/Set Cursor.vi"/>
<Item Name="SMO.lvclass" Type="LVClass" URL="/<vilib>/JKI/JKI SMO/SMO/SMO.lvclass"/>
<Item Name="Trim Whitespace.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Trim Whitespace.vi"/>
<Item Name="Unset Busy.vi" Type="VI" URL="/<vilib>/Utility/cursorutil.llb/Unset Busy.vi"/>
<Item Name="VariantType.lvlib" Type="Library" URL="/<vilib>/Utility/VariantDataType/VariantType.lvlib"/>
<Item Name="whitespace.ctl" Type="VI" URL="/<vilib>/Utility/error.llb/whitespace.ctl"/>
</Item>
</Item>
<Item Name="Build Specifications" Type="Build"/>
</Item>
</Project>
| LabVIEW | 2 | JKISoftware/JKI-SMO-Templates | src/base templates/Base Templates.lvproj | [
"BSD-3-Clause"
] |
datatype node
= Node of
{ Label : string
, SubForest : list node
}
fun getNode () : transaction node =
return (Node { Label = "foo", SubForest = [] })
fun main () : transaction page = return <xml><body>
<button onclick={
n <- rpc (getNode ());
case n of
Node {Label = l, ...} => alert ("l = " ^ l)
}/>
</body></xml>
| UrWeb | 3 | apple314159/urweb | tests/rpcNested.ur | [
"BSD-3-Clause"
] |
enum A {
B { x: Option<isize> },
C
}
fn main() {
let x = A::B { x: Some(3) };
match x { //~ ERROR non-exhaustive patterns
A::C => {}
A::B { x: None } => {}
}
}
| Rust | 3 | Eric-Arellano/rust | src/test/ui/pattern/usefulness/struct-like-enum-nonexhaustive.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProductVersion>3.5</ProductVersion>
<ProjectGuid>{d6d563f4-0983-4ab5-b167-3e684b6080b2}</ProjectGuid>
<OutputType>exe</OutputType>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<AllowLegacyCreate>False</AllowLegacyCreate>
<Name>Sugar.Cooper.Test</Name>
<RootNamespace>Sugar.Test</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<OutputPath>bin\Debug\Java\</OutputPath>
<DefineConstants>DEBUG;TRACE;</DefineConstants>
<StartMode>Project</StartMode>
<RegisterForComInterop>False</RegisterForComInterop>
<CpuType>anycpu</CpuType>
<RuntimeVersion>v25</RuntimeVersion>
<XmlDoc>False</XmlDoc>
<XmlDocWarningLevel>WarningOnPublicMembers</XmlDocWarningLevel>
<EnableUnmanagedDebugging>False</EnableUnmanagedDebugging>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>true</Optimize>
<OutputPath>.\bin\Release\Java</OutputPath>
<GenerateDebugInfo>False</GenerateDebugInfo>
<EnableAsserts>False</EnableAsserts>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<CaptureConsoleOutput>False</CaptureConsoleOutput>
<StartMode>Project</StartMode>
<RegisterForComInterop>False</RegisterForComInterop>
<CpuType>anycpu</CpuType>
<RuntimeVersion>v25</RuntimeVersion>
<XmlDoc>False</XmlDoc>
<XmlDocWarningLevel>WarningOnPublicMembers</XmlDocWarningLevel>
<EnableUnmanagedDebugging>False</EnableUnmanagedDebugging>
</PropertyGroup>
<ItemGroup>
<Reference Include="com.remobjects.elements.rtl.jar">
<Private>True</Private>
</Reference>
<Reference Include="RemObjects.Elements.EUnit.jar">
<Private>True</Private>
</Reference>
<Reference Include="rt.jar" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main\Cooper\Program.pas" />
<Compile Include="Tests\AutoreleasePool.pas" />
<Compile Include="Tests\Binary.pas" />
<Compile Include="Tests\Convert.pas" />
<Compile Include="Tests\Cryptography\Utils.pas" />
<Compile Include="Tests\Data\Json\JsonArray.pas" />
<Compile Include="Tests\Data\Json\JsonObject.pas" />
<Compile Include="Tests\Data\Json\JsonObjectParser.pas" />
<Compile Include="Tests\Data\Json\JsonTokenizer.pas" />
<Compile Include="Tests\Data\Json\JsonValueTest.pas" />
<Compile Include="Tests\DateTime.pas" />
<Compile Include="Tests\Dictionary.pas" />
<Compile Include="Tests\Encoding.pas" />
<Compile Include="Tests\Extensions.pas" />
<Compile Include="Tests\Guid.pas" />
<Compile Include="Tests\HashSet.pas" />
<Compile Include="Tests\HTTP.pas" />
<Compile Include="Tests\IO\File.pas" />
<Compile Include="Tests\IO\FileHandle.pas" />
<Compile Include="Tests\IO\FileUtils.pas" />
<Compile Include="Tests\IO\Folder.pas" />
<Compile Include="Tests\IO\FolderUtils.pas" />
<Compile Include="Tests\IO\Path.pas" />
<Compile Include="Tests\List.pas" />
<Compile Include="Tests\Math.pas" />
<Compile Include="Tests\MessageDigest.pas" />
<Compile Include="Tests\Queue.pas" />
<Compile Include="Tests\Random.pas" />
<Compile Include="Tests\RegularExpressions.pas" />
<Compile Include="Tests\Stack.pas" />
<Compile Include="Tests\String.pas" />
<Compile Include="Tests\StringBuilder.pas" />
<Compile Include="Tests\Url.pas" />
<Compile Include="Tests\UserSettings.pas" />
<Compile Include="Tests\Xml\CharacterData.pas" />
<Compile Include="Tests\Xml\Document.pas" />
<Compile Include="Tests\Xml\DocumentType.pas" />
<Compile Include="Tests\Xml\Element.pas" />
<Compile Include="Tests\Xml\Node.pas" />
<Compile Include="Tests\Xml\ProcessingInstruction.pas" />
<Compile Include="Tests\Xml\TestData.pas" />
</ItemGroup>
<ItemGroup>
<Folder Include="Main\" />
<Folder Include="Main\Cooper\" />
<Folder Include="Tests" />
<Folder Include="Tests\Data\" />
<Folder Include="Tests\Data\Json\" />
<Folder Include="Tests\Xml" />
<Folder Include="Tests\IO" />
<Folder Include="Tests\Cryptography" />
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sugar.Data\Sugar.Data.Cooper.oxygene">
<Name>Sugar.Data.Cooper</Name>
<Project>{83e22c95-cbc5-4977-87f6-0b18b8181703}</Project>
<Private>True</Private>
<HintPath>..\Sugar.Data\bin\Java\sugar.data.jar</HintPath>
</ProjectReference>
<ProjectReference Include="..\Sugar\Sugar.Cooper.oxygene">
<Name>Sugar.Cooper</Name>
<Project>{d1ee6c41-515b-4175-873f-ee188ac43450}</Project>
<Private>True</Private>
<HintPath>..\Sugar\bin\Java\sugar.jar</HintPath>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\RemObjects Software\Oxygene\RemObjects.Oxygene.Cooper.targets" />
<PropertyGroup>
<PreBuildEvent />
</PropertyGroup>
</Project> | Oxygene | 2 | nchevsky/remobjects-sugar | Sugar.Tests/Sugar.Cooper.Test.oxygene | [
"BSD-3-Clause"
] |
@import "~library/style.sass" | Sass | 0 | acidburn0zzz/parcel | packages/core/integration-tests/test/integration/sass-webpack-import-error/index.sass | [
"MIT"
] |
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = 'regional';
checkConfig(config);
@endpoint = getEndpoint('mhub', @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 CreateAppRequest {
productId?: string(name='ProductId'),
name?: string(name='Name'),
type?: int32(name='Type'),
bundleId?: string(name='BundleId'),
packageName?: string(name='PackageName'),
encodedIcon?: string(name='EncodedIcon'),
industryId?: string(name='IndustryId'),
}
model CreateAppResponseBody = {
requestId?: string(name='RequestId'),
appInfo?: {
type?: int32(name='Type'),
appKey?: string(name='AppKey'),
description?: string(name='Description'),
packageName?: string(name='PackageName'),
createTime?: string(name='CreateTime'),
productId?: int32(name='ProductId'),
bundleId?: string(name='BundleId'),
name?: string(name='Name'),
modifyTime?: string(name='ModifyTime'),
}(name='AppInfo'),
}
model CreateAppResponse = {
headers: map[string]string(name='headers'),
body: CreateAppResponseBody(name='body'),
}
async function createAppWithOptions(request: CreateAppRequest, runtime: Util.RuntimeOptions): CreateAppResponse {
Util.validateModel(request);
var query = {};
query["ProductId"] = request.productId;
query["Name"] = request.name;
query["Type"] = request.type;
query["BundleId"] = request.bundleId;
query["PackageName"] = request.packageName;
query["EncodedIcon"] = request.encodedIcon;
query["IndustryId"] = request.industryId;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'CreateApp',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function createApp(request: CreateAppRequest): CreateAppResponse {
var runtime = new Util.RuntimeOptions{};
return createAppWithOptions(request, runtime);
}
model CreateProductRequest {
name?: string(name='Name'),
}
model CreateProductResponseBody = {
requestId?: string(name='RequestId'),
productId?: long(name='ProductId'),
}
model CreateProductResponse = {
headers: map[string]string(name='headers'),
body: CreateProductResponseBody(name='body'),
}
async function createProductWithOptions(request: CreateProductRequest, runtime: Util.RuntimeOptions): CreateProductResponse {
Util.validateModel(request);
var query = {};
query["Name"] = request.name;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'CreateProduct',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function createProduct(request: CreateProductRequest): CreateProductResponse {
var runtime = new Util.RuntimeOptions{};
return createProductWithOptions(request, runtime);
}
model DeleteAppRequest {
appKey?: string(name='AppKey'),
}
model DeleteAppResponseBody = {
requestId?: string(name='RequestId'),
}
model DeleteAppResponse = {
headers: map[string]string(name='headers'),
body: DeleteAppResponseBody(name='body'),
}
async function deleteAppWithOptions(request: DeleteAppRequest, runtime: Util.RuntimeOptions): DeleteAppResponse {
Util.validateModel(request);
var query = {};
query["AppKey"] = request.appKey;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'DeleteApp',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function deleteApp(request: DeleteAppRequest): DeleteAppResponse {
var runtime = new Util.RuntimeOptions{};
return deleteAppWithOptions(request, runtime);
}
model DeleteProductRequest {
productId?: string(name='ProductId'),
}
model DeleteProductResponseBody = {
message?: string(name='Message'),
requestId?: string(name='RequestId'),
}
model DeleteProductResponse = {
headers: map[string]string(name='headers'),
body: DeleteProductResponseBody(name='body'),
}
async function deleteProductWithOptions(request: DeleteProductRequest, runtime: Util.RuntimeOptions): DeleteProductResponse {
Util.validateModel(request);
var query = {};
query["ProductId"] = request.productId;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'DeleteProduct',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function deleteProduct(request: DeleteProductRequest): DeleteProductResponse {
var runtime = new Util.RuntimeOptions{};
return deleteProductWithOptions(request, runtime);
}
model ListAppsRequest {
productId?: string(name='ProductId'),
page?: string(name='Page'),
pageSize?: string(name='PageSize'),
osType?: int32(name='OsType'),
}
model ListAppsResponseBody = {
requestId?: string(name='RequestId'),
ubsmsStatus?: string(name='UbsmsStatus'),
total?: int32(name='Total'),
appInfos?: {
appInfo?: [
{
type?: int32(name='Type'),
industryId?: int32(name='IndustryId'),
appKey?: string(name='AppKey'),
packageName?: string(name='PackageName'),
encodedIcon?: string(name='EncodedIcon'),
name?: string(name='Name'),
bundleId?: string(name='BundleId'),
readonly?: boolean(name='Readonly'),
}
](name='AppInfo')
}(name='AppInfos'),
}
model ListAppsResponse = {
headers: map[string]string(name='headers'),
body: ListAppsResponseBody(name='body'),
}
async function listAppsWithOptions(request: ListAppsRequest, runtime: Util.RuntimeOptions): ListAppsResponse {
Util.validateModel(request);
var query = {};
query["ProductId"] = request.productId;
query["Page"] = request.page;
query["PageSize"] = request.pageSize;
query["OsType"] = request.osType;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'ListApps',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listApps(request: ListAppsRequest): ListAppsResponse {
var runtime = new Util.RuntimeOptions{};
return listAppsWithOptions(request, runtime);
}
model ListProductsRequest {
offset?: int32(name='Offset'),
size?: int32(name='Size'),
simple?: boolean(name='Simple'),
productName?: string(name='ProductName'),
}
model ListProductsResponseBody = {
requestId?: string(name='RequestId'),
ubsmsStatus?: string(name='UbsmsStatus'),
total?: int32(name='Total'),
productInfos?: {
productInfo?: [
{
industryId?: int32(name='IndustryId'),
platforms?: string(name='Platforms'),
createTime?: string(name='CreateTime'),
encodedIcon?: string(name='EncodedIcon'),
productId?: int32(name='ProductId'),
name?: string(name='Name'),
readonly?: boolean(name='Readonly'),
}
](name='ProductInfo')
}(name='ProductInfos'),
}
model ListProductsResponse = {
headers: map[string]string(name='headers'),
body: ListProductsResponseBody(name='body'),
}
async function listProductsWithOptions(request: ListProductsRequest, runtime: Util.RuntimeOptions): ListProductsResponse {
Util.validateModel(request);
var query = {};
query["Offset"] = request.offset;
query["Size"] = request.size;
query["Simple"] = request.simple;
query["ProductName"] = request.productName;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'ListProducts',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listProducts(request: ListProductsRequest): ListProductsResponse {
var runtime = new Util.RuntimeOptions{};
return listProductsWithOptions(request, runtime);
}
model ModifyAppRequest {
appKey?: string(name='AppKey'),
name?: string(name='Name'),
bundleId?: string(name='BundleId'),
packageName?: string(name='PackageName'),
encodedIcon?: string(name='EncodedIcon'),
industryId?: int32(name='IndustryId'),
}
model ModifyAppResponseBody = {
requestId?: string(name='RequestId'),
}
model ModifyAppResponse = {
headers: map[string]string(name='headers'),
body: ModifyAppResponseBody(name='body'),
}
async function modifyAppWithOptions(request: ModifyAppRequest, runtime: Util.RuntimeOptions): ModifyAppResponse {
Util.validateModel(request);
var query = {};
query["AppKey"] = request.appKey;
query["Name"] = request.name;
query["BundleId"] = request.bundleId;
query["PackageName"] = request.packageName;
query["EncodedIcon"] = request.encodedIcon;
query["IndustryId"] = request.industryId;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'ModifyApp',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function modifyApp(request: ModifyAppRequest): ModifyAppResponse {
var runtime = new Util.RuntimeOptions{};
return modifyAppWithOptions(request, runtime);
}
model ModifyProductRequest {
productId?: string(name='ProductId'),
name?: string(name='Name'),
}
model ModifyProductResponseBody = {
requestId?: string(name='RequestId'),
}
model ModifyProductResponse = {
headers: map[string]string(name='headers'),
body: ModifyProductResponseBody(name='body'),
}
async function modifyProductWithOptions(request: ModifyProductRequest, runtime: Util.RuntimeOptions): ModifyProductResponse {
Util.validateModel(request);
var query = {};
query["ProductId"] = request.productId;
query["Name"] = request.name;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'ModifyProduct',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function modifyProduct(request: ModifyProductRequest): ModifyProductResponse {
var runtime = new Util.RuntimeOptions{};
return modifyProductWithOptions(request, runtime);
}
model OpenEmasServiceRequest {
ownerId?: long(name='OwnerId'),
}
model OpenEmasServiceResponseBody = {
requestId?: string(name='RequestId'),
orderId?: string(name='OrderId'),
}
model OpenEmasServiceResponse = {
headers: map[string]string(name='headers'),
body: OpenEmasServiceResponseBody(name='body'),
}
async function openEmasServiceWithOptions(request: OpenEmasServiceRequest, runtime: Util.RuntimeOptions): OpenEmasServiceResponse {
Util.validateModel(request);
var query = {};
query["OwnerId"] = request.ownerId;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'OpenEmasService',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function openEmasService(request: OpenEmasServiceRequest): OpenEmasServiceResponse {
var runtime = new Util.RuntimeOptions{};
return openEmasServiceWithOptions(request, runtime);
}
model QueryAppInfoRequest {
appKey?: string(name='AppKey'),
}
model QueryAppInfoResponseBody = {
requestId?: string(name='RequestId'),
appInfo?: {
certDevelopExpiration?: string(name='CertDevelopExpiration'),
type?: int32(name='Type'),
status?: int32(name='Status'),
industryId?: int32(name='IndustryId'),
packageName?: string(name='PackageName'),
createTime?: string(name='CreateTime'),
readonly?: boolean(name='Readonly'),
certProductExpiration?: string(name='CertProductExpiration'),
appName?: string(name='AppName'),
appKey?: string(name='AppKey'),
encodedIcon?: string(name='EncodedIcon'),
certDevelopAvail?: boolean(name='CertDevelopAvail'),
productId?: long(name='ProductId'),
bundleId?: string(name='BundleId'),
certProductAvail?: boolean(name='CertProductAvail'),
}(name='AppInfo'),
}
model QueryAppInfoResponse = {
headers: map[string]string(name='headers'),
body: QueryAppInfoResponseBody(name='body'),
}
async function queryAppInfoWithOptions(request: QueryAppInfoRequest, runtime: Util.RuntimeOptions): QueryAppInfoResponse {
Util.validateModel(request);
var query = {};
query["AppKey"] = request.appKey;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'QueryAppInfo',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function queryAppInfo(request: QueryAppInfoRequest): QueryAppInfoResponse {
var runtime = new Util.RuntimeOptions{};
return queryAppInfoWithOptions(request, runtime);
}
model QueryAppSecurityInfoRequest {
appKey?: string(name='AppKey'),
}
model QueryAppSecurityInfoResponseBody = {
requestId?: string(name='RequestId'),
appSecurityInfo?: {
appSecret?: string(name='AppSecret'),
appKey?: string(name='AppKey'),
}(name='AppSecurityInfo'),
}
model QueryAppSecurityInfoResponse = {
headers: map[string]string(name='headers'),
body: QueryAppSecurityInfoResponseBody(name='body'),
}
async function queryAppSecurityInfoWithOptions(request: QueryAppSecurityInfoRequest, runtime: Util.RuntimeOptions): QueryAppSecurityInfoResponse {
Util.validateModel(request);
var query = {};
query["AppKey"] = request.appKey;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'QueryAppSecurityInfo',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function queryAppSecurityInfo(request: QueryAppSecurityInfoRequest): QueryAppSecurityInfoResponse {
var runtime = new Util.RuntimeOptions{};
return queryAppSecurityInfoWithOptions(request, runtime);
}
model QueryProductInfoRequest {
productId?: string(name='ProductId'),
}
model QueryProductInfoResponseBody = {
productInfo?: {
industryId?: int32(name='IndustryId'),
encodedIcon?: string(name='EncodedIcon'),
name?: string(name='Name'),
readonly?: boolean(name='Readonly'),
iconName?: string(name='IconName'),
}(name='ProductInfo'),
requestId?: string(name='RequestId'),
}
model QueryProductInfoResponse = {
headers: map[string]string(name='headers'),
body: QueryProductInfoResponseBody(name='body'),
}
async function queryProductInfoWithOptions(request: QueryProductInfoRequest, runtime: Util.RuntimeOptions): QueryProductInfoResponse {
Util.validateModel(request);
var query = {};
query["ProductId"] = request.productId;
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
body = Util.toMap(request),
};
var params = new OpenApi.Params{
action = 'QueryProductInfo',
version = '2017-08-25',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function queryProductInfo(request: QueryProductInfoRequest): QueryProductInfoResponse {
var runtime = new Util.RuntimeOptions{};
return queryProductInfoWithOptions(request, runtime);
}
| Tea | 4 | aliyun/alibabacloud-sdk | mhub-20170825/main.tea | [
"Apache-2.0"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.