content
stringlengths
4
1.04M
lang
stringclasses
358 values
score
int64
0
5
repo_name
stringlengths
5
114
repo_path
stringlengths
4
229
repo_licenses
sequencelengths
1
8
label ccc4007: call gl(0,"bgcc0012") call vsp(0,1) call vsp(1,0) call vsp(2,0) call vsp(3,0) call vsp(4,0) call vsp(5,0) with wipeleft call gl(1,"TCYM0004|TCYM0002") call gp(1,t=center)#x=180 call vsp(1,1) with dissolve voice "vfCCC4007mki000" 美希 "「うおおー、揺れるとジンジン響くですー」" 太一 "「我慢しろ、今名医を召還してやる」" "窓をあけて、口笛を吹いた。" "カムヒア! ヨーコ!" 太一 "「…………」" "来ないな。" "再度、口笛を吹いた。" "カムヒアッ! ヨーコッ!" 太一 "「……………………」" "あれえ。" call gl(1,"TCYM0002|TCYM0002") call vsp(1,1) with dissolve voice "vfCCC4007mki001" 美希 "「すんごく裂けてます、わたしの腕」" 太一 "「あわわ」" "仕方ない、俺が手当てするしか。" "袖をまくりあげる。" "傷口のある部分を見る。" 太一 "「う……」" "やっぱり血の匂いはきつい。" "洗濯ばさみで鼻をつまんだ。" call gl(1,"TCYM0000|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki002" 美希 "「それは?」" 太一 "「ごねでのし(これでよし)」" call gl(1,"TCYM0001|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki003" 美希 "「……まさか治療の一環?」" "勝手に納得してくれた。" "ええと……まず水で……。" "洗面器の水で、血を洗い流す。" "ほっとする。" 美希 "「……………………」" "美希は俺を推し量るように、じっと見つめていた。" "消毒……。" call gl(1,"TCYM0002|TCYM0002") call vsp(1,1) with dissolve voice "vfCCC4007mki005" 美希 "「みぎゃー」" "染みたらしい。" "もういっちょ。" voice "vfCCC4007mki006" 美希 "「はぎゃー」" "こんなもんか。" "ガーゼ。" "包帯。" "包帯どめ。" "そでを戻す。" 太一 "「ふう」" "洗濯ばさみはもういらない。" stop bgm 太一 "「オペ終了」" call gl(1,"TCYM0001|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki007" 美希 "「……ジンジンします、傷口が痺れる感じです」" 太一 "「それは恋だ」" voice "vfCCC4007mki008" 美希 "「こ、これが恋」" 太一 "「しかもトゥルーラブだ。好感度は89%。間違いないね」" call gl(1,"TCYM0000|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki009" 美希 "「そーかー。これが恋……」" play bgm "bgm/bgm021.ogg" 太一 "「恋の花咲く気分はどうか」" call gl(1,"TCYM0021|TCYM0021") call vsp(1,1) with dissolve voice "vfCCC4007mki010" 美希 "「……わかりません。恋する間もない人生でした」" 太一 "「くっ、泣かせやがる」" call gl(1,"TCYM0000|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki011" 美希 "「というか、血の苦手な先輩に手当てさせちゃってすみません」" 太一 "「なに。医者もいないし、怪我は一大事だ。自愛してくれ」" call gl(1,"TCYM0001|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki012" 美希 "「自愛してます……すごく……」" 太一 "「ならよし」" voice "vfCCC4007mki013" 美希 "「なにかお礼しないといけないですね」" 太一 "「下着の一枚でもくれれば」" call gl(1,"TCYM0041|TCYM0041") call vsp(1,1) with dissolve voice "vfCCC4007mki014" 美希 "「……うーおー、たけぇ……」" 太一 "「冗談だ。霧ちんに殺される」" call gl(1,"TCYM0000|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki015" 美希 "「他にご希望の品は?」" 太一 "「んー、ファーストキスはもうもらったしなぁ」" call gl(1,"TCYM0041|TCYM0041") call vsp(1,1) with dissolve voice "vfCCC4007mki016" 美希 "「ぐ、そうでした……」" "ミキミキはショックを受けた。" 太一 "「思い出にせよ」" voice "vfCCC4007mki017" 美希 "「イヤでもこの思い出を抱えて生きていくわたし……」" call gl(1,"TCYM0000|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki018" 美希 "「エロ以外でありませぬか?」" 太一 "「うーん……デート……」" "閃く。" 太一 "「ダブルデート」" call gl(1,"TCYM0004|TCYM0002") call vsp(1,1) with dissolve voice "vfCCC4007mki019" 美希 "「え、どの組み合わせで?」" 太一 "「あー、俺と、美希と霧ちん」" call gl(1,"TCYM0001|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki020" 美希 "「女の子がダブルなだけじゃないですか」" 太一 "「で、俺のことをふたりじめしてくれ」" call gl(1,"TCYM0000|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki021" 美希 "「まあ、そのくらいでよければ」" 太一 "「いいの?」" call gl(1,"TCYM0003|TCYM0003") call vsp(1,1) with dissolve voice "vfCCC4007mki022" 美希 "「いいですよ」" "両手に花だな。" call gl(1,"TCYM0021|TCYM0021") call vsp(1,1) with dissolve voice "vfCCC4007mki023" 美希 "「……一人だったらどーしよっかなーって感じでしたけど、霧ちんが一緒なら全然OKです」" 太一 "「警戒されているらしい」" call gl(1,"TCYM0003|TCYM0003") call vsp(1,1) with dissolve voice "vfCCC4007mki024" 美希 "「してまーす」" voice "vfCCC4007mki025" 美希 "「先輩は、あぶないですからー」" 太一 "「ははははは」" "けれど美希は知らない。" "俺が本当に、危険であることを。" "衝動。" "時折、身じろぐ。" "俺はそういうものと、闘っている。" 太一 "「美希っちにはいろいろ世話になりっぱなしだな」" call gl(1,"TCYM0000|TCYM0000") call vsp(1,1) with dissolve 美希 "「?」" 太一 "「月曜も助けてもらったし……サンキューな」" voice "vfCCC4007mki027" 美希 "「……んまあ……どってことは」" 太一 "「霧ちん助けた動きは良かったなー。別人かと思ったぞ」" 太一 "「本当に……」" "見違えるほどに敏捷で。" "けど美希って、そんな鋭かったかな。" "俺を引きずって、自宅まで運んだんだっけ。" "そんな力、あるのかな。" 太一 "「蹴りも鋭かったし……そういえば……」" "考え込む。" "なにか引っかかっている。" call gl(1,"TCYM0001|TCYM0000") call vsp(1,1) with dissolve voice "vfCCC4007mki028" 美希 "「あ、あのー」" 太一 "「ん?」" voice "vfCCC4007mki029" 美希 "「……ちゅ」" "頬に。" "曜子ちゃん以外からされたのは初めてだった。" call gl(1,"TCYM0003|TCYM0003") call vsp(1,1) with dissolve voice "vfCCC4007mki030" 美希 "「お礼の前払いですっ」" 太一 "「お、お、お釣り払っちゃうんだからしてっ!」" "俺は美希に飛び込んでいく。" call gl(4,"sgcc0015") hide pic1 with dissolve call vsp(4,1) with dissolve play se "se106" with vpunch stop bgm pause (1000.0/1000.0) pause (500.0/1000.0) call gl(4,"sgcc0015s") call gl(0,"bgcc0012s") call vsp(4,1) call vsp(0,1) with Dissolve(500.0/1000.0) call gl(0,"bgcc0000d") call vsp(0,1) call vsp(4,0) with Dissolve(500.0/1000.0) pause (1000.0/1000.0) pause (500.0/1000.0) return #
Ren'Py
3
fossabot/cross-channel_chinese-localization_project
AllPlatforms/scripts/ccc/ccc4007.rpy
[ "Apache-2.0" ]
include "sys.sl"; include "stdio.sl"; # TODO: [nice] implement "-p" var args = cmdargs()+1; if (!*args) { fputs(2, "usage: mkdir NAME...\n"); exit(1); }; var n; while (*args) { n = mkdir(*args); if (n < 0) fprintf(2, "mkdir: %s: %s\n", [*args, strerror(n)]); args++; };
Slash
3
jes/scamp-cpu
sys/mkdir.sl
[ "Unlicense" ]
<mat-slider value="50" aria-label="unit(s)"></mat-slider>
HTML
0
tungyingwaltz/components
src/components-examples/material/slider/slider-harness/slider-harness-example.html
[ "MIT" ]
PollDevice(eth1) -> ToHost; FastUDPSource(1300000, 4000000, 60, 00:03:47:0D:39:57, 2.0.0.2, 1234, 1:2:3:4:5:6, 2.0.0.1, 1234, 1, 0, 1) -> ToDevice(eth1);
Click
1
MacWR/Click-changed-for-ParaGraph
conf/fastudpsrc.click
[ "Apache-2.0" ]
import is_value from require "moonscript.types" construct_comprehension = (inner, clauses) -> current_stms = inner for i=#clauses,1,-1 clause = clauses[i] t = clause[1] current_stms = switch t when "for" {_, name, bounds} = clause {"for", name, bounds, current_stms} when "foreach" {_, names, iter} = clause {"foreach", names, {iter}, current_stms} when "when" {_, cond} = clause {"if", cond, current_stms} else error "Unknown comprehension clause: "..t current_stms = {current_stms} current_stms[1] comprehension_has_value = (comp) -> is_value comp[2] {:construct_comprehension, :comprehension_has_value}
MoonScript
4
Shados/moonscript
moonscript/transform/comprehension.moon
[ "MIT", "Unlicense" ]
fn main() {} pub struct Value {} pub fn new() -> Result<Value, ()> { Ok(Value { } } //~^ ERROR mismatched closing delimiter
Rust
1
Eric-Arellano/rust
src/test/ui/parser/unclosed_delim_mod.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
insert into User (id, firstName, lastName, email, age) values (1, 'john', 'doe', '[email protected]', 22); insert into User (id, firstName, lastName, email, age) values (2, 'tom', 'doe', '[email protected]', 26); insert into MyUser (id, firstName, lastName, email, age) values (1, 'john', 'doe', '[email protected]', 22); insert into MyUser (id, firstName, lastName, email, age) values (2, 'tom', 'doe', '[email protected]', 26);
SQL
1
zeesh49/tutorials
spring-rest-query-language/src/main/resources/data.sql
[ "MIT" ]
# A single user identity: a key, a way to find that key, one or more email # addresses, and a keybase profile {Utils} = require 'nylas-exports' path = require 'path' module.exports = class Identity constructor: ({key, addresses, isPriv, keybase_profile}) -> @clientId = Utils.generateTempId() @key = key ? null # keybase keymanager object @isPriv = isPriv ? false # is this a private key? @timeout = null # the time after which this key (if private) needs to be unlocked again @addresses = addresses ? [] # email addresses associated with this identity @keybase_profile = keybase_profile ? null # a kb profile object associated with this identity Object.defineProperty(@, 'keyPath', { get: -> if @addresses.length > 0 keyDir = path.join(NylasEnv.getConfigDirPath(), 'keys') thisDir = if @isPriv then path.join(keyDir, 'private') else path.join(keyDir, 'public') keyPath = path.join(thisDir, @addresses.join(" ")) else keyPath = null return keyPath }) if @isPriv @setTimeout() fingerprint: -> if @key? return @key.get_pgp_fingerprint().toString('hex') return null setTimeout: -> delay = 1000 * 60 * 30 # 30 minutes in ms @timeout = Date.now() + delay isTimedOut: -> return @timeout < Date.now() uid: -> if @key? uid = @key.get_pgp_fingerprint().toString('hex') else if @keybase_profile? uid = @keybase_profile.components.username.val else if @addresses.length > 0 uid = @addresses.join('') else uid = @clientId return uid
CoffeeScript
5
cnheider/nylas-mail
packages/client-app/internal_packages/keybase/lib/identity.coffee
[ "MIT" ]
 BzJ 
PureBasic
1
cnheider/onnx
onnx/backend/test/data/node/test_bitshift_right_uint32/test_data_set_0/output_0.pb
[ "MIT" ]
--- layout: post title: "Text Bug" date: 2014-03-01 comments: true external-url: author: Eric Seidel published: false categories: benchmarks, text demo: TextBug.hs --- For our last post on `text`, we return to the topic of building a new `Text` value, i.e. proving the safety of write operations. <!-- more --> <div class="hidden"> \begin{code} {-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, RecordWildCards, UnboxedTuples, ExistentialQuantification #-} {-@ LIQUID "--no-termination" @-} module TextBug where import Control.Monad.ST.Unsafe (unsafeIOToST) import Foreign.C.Types (CSize) import GHC.Base hiding (unsafeChr) import GHC.ST import GHC.Word (Word16(..)) import Data.Bits hiding (shiftL) import Data.Word import Language.Haskell.Liquid.Prelude -------------------------------------------------------------------------------- --- From TextInternal -------------------------------------------------------------------------------- {-@ shiftL :: i:Nat -> n:Nat -> {v:Nat | ((n = 1) => (v = (i * 2)))} @-} shiftL :: Int -> Int -> Int shiftL = undefined -- (I# x#) (I# i#) = I# (x# `iShiftL#` i#) {-@ measure isUnknown :: Size -> Prop isUnknown (Exact n) = false isUnknown (Max n) = false isUnknown (Unknown) = true @-} {-@ measure getSize :: Size -> Int getSize (Exact n) = n getSize (Max n) = n @-} {-@ invariant {v:Size | (getSize v) >= 0} @-} data Size = Exact {-# UNPACK #-} !Int -- ^ Exact size. | Max {-# UNPACK #-} !Int -- ^ Upper bound on size. | Unknown -- ^ Unknown size. deriving (Eq, Show) {-@ upperBound :: k:Nat -> s:Size -> {v:Nat | v = ((isUnknown s) ? k : (getSize s))} @-} upperBound :: Int -> Size -> Int upperBound _ (Exact n) = n upperBound _ (Max n) = n upperBound k _ = k data Step s a = Done | Skip !s | Yield !a !s data Stream a = forall s. Stream (s -> Step s a) -- stepper function !s -- current state !Size -- size hint {-@ data Array = Array { aBA :: ByteArray# , aLen :: Nat } @-} data Array = Array { aBA :: ByteArray# , aLen :: !Int } {-@ measure alen :: Array -> Int alen (Array a n) = n @-} {-@ aLen :: a:Array -> {v:Nat | v = (alen a)} @-} {-@ type ArrayN N = {v:Array | (alen v) = N} @-} {-@ type AValidI A = {v:Nat | v < (alen A)} @-} {-@ type AValidO A = {v:Nat | v <= (alen A)} @-} {-@ type AValidL O A = {v:Nat | (v+O) <= (alen A)} @-} {-@ data MArray s = MArray { maBA :: MutableByteArray# s , maLen :: Nat } @-} data MArray s = MArray { maBA :: MutableByteArray# s , maLen :: !Int } {-@ measure malen :: MArray s -> Int malen (MArray a n) = n @-} {-@ maLen :: a:MArray s -> {v:Nat | v = (malen a)} @-} {-@ type MArrayN s N = {v:MArray s | (malen v) = N} @-} {-@ type MAValidI MA = {v:Nat | v < (malen MA)} @-} {-@ type MAValidO MA = {v:Nat | v <= (malen MA)} @-} {-@ new :: forall s. n:Nat -> ST s (MArrayN s n) @-} new :: forall s. Int -> ST s (MArray s) new n | n < 0 || n .&. highBit /= 0 = error $ "Data.Text.Array.new: size overflow" | otherwise = ST $ \s1# -> case newByteArray# len# s1# of (# s2#, marr# #) -> (# s2#, MArray marr# n #) where !(I# len#) = bytesInArray n highBit = maxBound `xor` (maxBound `shiftR` 1) bytesInArray n = n `shiftL` 1 {-@ unsafeWrite :: ma:MArray s -> MAValidI ma -> Word16 -> ST s () @-} unsafeWrite :: MArray s -> Int -> Word16 -> ST s () unsafeWrite MArray{..} i@(I# i#) (W16# e#) | i < 0 || i >= maLen = liquidError "out of bounds" | otherwise = ST $ \s1# -> case writeWord16Array# maBA i# e# s1# of s2# -> (# s2#, () #) {-@ copyM :: dest:MArray s -> didx:MAValidO dest -> src:MArray s -> sidx:MAValidO src -> {v:Nat | (((didx + v) <= (malen dest)) && ((sidx + v) <= (malen src)))} -> ST s () @-} copyM :: MArray s -- ^ Destination -> Int -- ^ Destination offset -> MArray s -- ^ Source -> Int -- ^ Source offset -> Int -- ^ Count -> ST s () copyM dest didx src sidx count | count <= 0 = return () | otherwise = liquidAssert (sidx + count <= maLen src) . liquidAssert (didx + count <= maLen dest) . unsafeIOToST $ memcpyM (maBA dest) (fromIntegral didx) (maBA src) (fromIntegral sidx) (fromIntegral count) {-@ memcpyM :: MutableByteArray# s -> CSize -> MutableByteArray# s -> CSize -> CSize -> IO () @-} memcpyM :: MutableByteArray# s -> CSize -> MutableByteArray# s -> CSize -> CSize -> IO () memcpyM = undefined {-@ unsafeFreeze :: ma:MArray s -> ST s (ArrayN (malen ma)) @-} unsafeFreeze :: MArray s -> ST s Array unsafeFreeze MArray{..} = ST $ \s# -> (# s#, Array (unsafeCoerce# maBA) maLen #) {-@ unsafeIndex :: a:Array -> AValidI a -> Word16 @-} unsafeIndex :: Array -> Int -> Word16 unsafeIndex Array{..} i@(I# i#) | i < 0 || i >= aLen = liquidError "out of bounds" | otherwise = case indexWord16Array# aBA i# of r# -> (W16# r#) data Text = Text Array Int Int {-@ data Text [tlen] = Text (tarr :: Array) (toff :: TValidO tarr) (tlen :: TValidL toff tarr) @-} {-@ type TValidI T = {v:Nat | v < (tlen T)} @-} {-@ type TValidO A = {v:Nat | v <= (alen A)} @-} {-@ type TValidL O A = {v:Nat | (v+O) <= (alen A)} @-} -------------------------------------------------------------------------------- --- From TextRead -------------------------------------------------------------------------------- {-@ measure numchars :: Array -> Int -> Int -> Int @-} {-@ measure tlength :: Text -> Int @-} {-@ invariant {v:Text | (tlength v) = (numchars (tarr v) (toff v) (tlen v))} @-} -------------------------------------------------------------------------------- --- From TextWrite -------------------------------------------------------------------------------- {-@ qualif Ord(v:int, i:int, x:Char) : ((((ord x) < 65536) => (v = i)) && (((ord x) >= 65536) => (v = (i + 1)))) @-} {-@ predicate Room C MA I = (((One C) => (RoomN 1 MA I)) && ((Two C) => (RoomN 2 MA I))) @-} {-@ predicate RoomN N MA I = (I+N <= (malen MA)) @-} {-@ measure ord :: Char -> Int @-} {-@ ord :: c:Char -> {v:Int | v = (ord c)} @-} {-@ predicate One C = ((ord C) < 65536) @-} {-@ predicate Two C = ((ord C) >= 65536) @-} {-@ writeChar :: ma:MArray s -> i:Nat -> {v:Char | (Room v ma i)} -> ST s {v:Nat | (RoomN v ma i)} @-} writeChar :: MArray s -> Int -> Char -> ST s Int writeChar marr i c | n < 0x10000 = do unsafeWrite marr i (fromIntegral n) return 1 | otherwise = do unsafeWrite marr i lo unsafeWrite marr (i+1) hi return 2 where n = ord c m = n - 0x10000 lo = fromIntegral $ (m `shiftR` 10) + 0xD800 hi = fromIntegral $ (m .&. 0x3FF) + 0xDC00 -------------------------------------------------------------------------------- --- Helpers -------------------------------------------------------------------------------- {-@ qualif MALenLE(v:int, a:MArray s): v <= (malen a) @-} {-@ qualif ALenLE(v:int, a:Array): v <= (alen a) @-} \end{code} </div> Let's take a look at `mapAccumL`, which combines a map and a fold over a `Stream` and bundles the result of the map into a new `Text`. Again, we'll want to focus our attention on the `Yield` case of the inner loop. \begin{code} mapAccumL f z0 (Stream next0 s0 len) = (nz, Text na 0 nl) where mlen = upperBound 4 len (na,(nz,nl)) = runST $ do (marr,x) <- (new mlen >>= \arr -> outer arr mlen z0 s0 0) arr <- unsafeFreeze marr return (arr,x) outer arr top = loop where loop !z !s !i = case next0 s of Done -> return (arr, (z,i)) Skip s' -> loop z s' i Yield x s' | j >= top -> do let top' = (top + 1) `shiftL` 1 arr' <- new top' copyM arr' 0 arr 0 top outer arr' top' z s i | otherwise -> do let (z',c) = f z x d <- writeChar arr i c loop z' s' (i+d) where j | ord x < 0x10000 = i | otherwise = i + 1 \end{code} If you recall `unstream` from last time, you'll notice that this loop body looks almost identical to the one found in `unstream`, but LiquidHaskell has flagged the `writeChar` call as unsafe! What's going on here? Let's take a look at `j`, recalling that it carried a crucial part of the safety \begin{code} proof last time, and see what LiquidHaskell was able to infer. {v:Int | ((ord x >= 65536) => (v == i+1)) && ((ord x < 65536) => (v == i))} \end{code} Well that's not very useful at all! LiquidHaskell can prove that it's safe to write `x` but here we are trying to write `c` into the array. This is actually a *good* thing though, because `c` is the result of calling an arbitrary function `f` on `x`! We haven't constrained `f` in any way, so it could easily return a character above `U+10000` given any input. So `mapAccumL` is actually *unsafe*, and our first wild bug caught by LiquidHaskell! The fix is luckily easy, we simply have to lift the `let (z',c) = f z x` binder into the `where` clause, and change `j` to depend on `ord c` instead. \begin{code} mapAccumL' f z0 (Stream next0 s0 len) = (nz, Text na 0 nl) where mlen = upperBound 4 len (na,(nz,nl)) = runST $ do (marr,x) <- (new mlen >>= \arr -> outer arr mlen z0 s0 0) arr <- unsafeFreeze marr return (arr,x) outer arr top = loop where loop !z !s !i = case next0 s of Done -> return (arr, (z,i)) Skip s' -> loop z s' i Yield x s' | j >= top -> do let top' = (top + 1) `shiftL` 1 arr' <- new top' copyM arr' 0 arr 0 top outer arr' top' z s i | otherwise -> do d <- writeChar arr i c loop z' s' (i+d) where (z',c) = f z x j | ord c < 0x10000 = i | otherwise = i + 1 \end{code} LiquidHaskell happily accepts our revised `mapAccumL`, as did the `text` maintainers. We hope you've enjoyed this whirlwind tour of using LiquidHaskell to verify production code, we have many more examples in the `benchmarks` folder of our GitHub repository for the intrepid reader.
Literate Haskell
5
curiousleo/liquidhaskell
docs/blog/2014-03-01-text-bug.lhs
[ "MIT", "BSD-3-Clause" ]
require "./repl" # Records the position in the stack for local variables. # # This is almost a Hash where the keys are names and the values # are indexes, but it's a bit more complex because blocks create # separate scopes where name clashes can happen. # # So if we have a code like this: # # ``` # a = 0 # b = 1 # foo do |a| # b = a # end # c = 2 # ``` # # We actually want to store: # - a in the first position (0-8 bytes) # - b in the second position (8-16 bytes) # - the a in the block is a different var, so we put it in (16-24) # - now that the block is over, that new a (or any variable that only # exists inside the block) are no longer reachable so: # - c can also be put in (16-24) class Crystal::Repl::LocalVars record Key, name : String, block_level : Int32 def initialize(@context : Context) @types = {} of Key => Type @name_to_index = {} of Key => Int32 @bytesize = 0 @max_bytesize = 0 @block_level = 0 @bytesize_per_block_level = [] of Int32 end def initialize(local_vars : LocalVars) @context = local_vars.@context @types = [email protected] @name_to_index = local_vars.@name_to_index.dup @bytesize = local_vars.@bytesize @max_bytesize = local_vars.@max_bytesize @block_level = local_vars.@block_level @bytesize_per_block_level = local_vars.@bytesize_per_block_level end def push_block : Nil @bytesize_per_block_level << @bytesize @block_level += 1 end def pop_block : Nil # Undefine variables that belong to the current block @types.reject! { |key, type| key.block_level == @block_level } @name_to_index.reject! { |key, index| key.block_level == @block_level } @block_level -= 1 @bytesize = @bytesize_per_block_level.pop end def current_bytesize @bytesize end def max_bytesize @max_bytesize end def names_at_block_level_zero @name_to_index.keys.select { |key| key.block_level == 0 }.map(&.name) end def names @name_to_index.keys.map(&.name) end def declare(name : String, type : Type) : Int32? is_self = name == "self" return if is_self && type.is_a?(Program) key = Key.new(name, @block_level) index = @bytesize @name_to_index[key] = index @types[key] = type if is_self && type.passed_by_value? @bytesize += sizeof(Pointer(UInt8)) else @bytesize += @context.aligned_sizeof_type(type) end @max_bytesize = @bytesize if @bytesize > @max_bytesize index end def name_to_index(name : String, block_level : Int32) : Int32 @name_to_index[Key.new(name, block_level)] end def name_to_index?(name : String, block_level : Int32) : Int32? @name_to_index[Key.new(name, block_level)]? end def type(name : String, block_level : Int32) : Type @types[Key.new(name, block_level)] end def type?(name : String, block_level : Int32) : Type? @types[Key.new(name, block_level)]? end def to_s(io : IO) : Nil return if @max_bytesize == 0 io << "local table (bytesize: " << @max_bytesize << ")\n" @name_to_index.each do |key, index| io << "\t" unless index == 0 io << key.name << '@' << index io << 'B' << key.block_level if key.block_level > 0 io << ':' << @types[key] end end def dup LocalVars.new(self) end end
Crystal
5
jessedoyle/crystal
src/compiler/crystal/interpreter/local_vars.cr
[ "Apache-2.0" ]
from CryptoAttacks.EllipticCurve.singular_sage import log_singular def test_node(): print('Test discrete log with node') x,y = QQ['x,y'].gens() f = x^3 + 2*x^2 + x p = 340282366920938463463374607431768178229 P = (4, 10) Q = (104708042197107879674895393611622483404, 276453155315387771858614408885950682409) # will take some time, maybe smaller example will be better d, _ = log_singular(f, p, P, Q) assert d == 35996229751200732572713356533972460509 def test_cusp(): print('Test discrete log with cusp') x,y = QQ['x,y'].gens() f = x^3 + 330762886318172394930696774593722907073441522749*x^2 + 6688528763308432271990130594743714957884433976*x + 759214505060964991648440027744756938681220132782 p = 785482254973602570424508065997142892171538672071 P = (1, 68596750097555148647236998220450053605331891340) Q = (453762742842106273626661098428675073042272925939, 680431771406393872682158079307720147623468587944) d, _ = log_singular(f, p, P, Q) assert d == 733677047520440525642834723493438680490143125031 if __name__ == "__main__": test_cusp() test_node()
Sage
4
akbarszcz/CryptoAttacks
CryptoAttacks/tests/EllipticCurve/test_singular.sage
[ "MIT" ]
RwProjectSpecificationV2 { #specName : 'project', #projectSpecPath : 'platforms/gemstone/projects/FileSystemGs/rowan', #componentsPath : 'platforms/gemstone/projects/FileSystemGs/rowan/componentsV2', #packagesPath : 'platforms/gemstone/projects/FileSystemGs/rowan/src', #projectsPath : 'platforms/gemstone/projects/FileSystemGs/rowan/projectsV2', #specsPath : 'platforms/gemstone/projects/FileSystemGs/rowan/specsV2', #packageFormat : 'tonel', #comment : 'V2 FileSystemGs project specification' }
STON
1
GemTalk/Rowan
platforms/gemstone/projects/FileSystemGs/rowan/project.ston
[ "MIT" ]
--TEST-- Test stream_isatty with redirected STDIN/STDERR --SKIPIF-- <?php if (getenv("SKIP_IO_CAPTURE_TESTS")) { die("skip I/O capture test"); } ?> --CAPTURE_STDIO-- STDIN STDERR --FILE-- <?php require __DIR__.'/stream_isatty.inc'; testToStdErr(); ?> --EXPECT-- STDIN (constant): bool(false) STDIN (fopen): bool(false) STDIN (php://fd/0): bool(false) STDOUT (constant): bool(true) STDOUT (fopen): bool(true) STDOUT (php://fd/1): bool(true) STDERR (constant): bool(false) STDERR (fopen): bool(false) STDERR (php://fd/2): bool(false) Invalid stream (php://temp): bool(false) Invalid stream (php://input): bool(false) Invalid stream (php://memory): bool(false) File stream: bool(false)
PHP
4
NathanFreeman/php-src
tests/output/stream_isatty_in-err.phpt
[ "PHP-3.01" ]
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Emulates undefined through Codegen.py. */ [LegacyUnenumerableNamedProperties] interface HTMLAllCollection { readonly attribute unsigned long length; getter Node? (unsigned long index); Node? item(unsigned long index); (Node or HTMLCollection)? item(DOMString name); legacycaller (Node or HTMLCollection)? (DOMString name); getter (Node or HTMLCollection)? namedItem(DOMString name); };
WebIDL
4
tlively/wasm-bindgen
crates/web-sys/webidls/enabled/HTMLAllCollection.webidl
[ "Apache-2.0", "MIT" ]
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.netbeans.modules.languages.apacheconf.lexer; import org.netbeans.spi.lexer.LexerInput; import org.netbeans.spi.lexer.LexerRestartInfo; import org.netbeans.modules.web.common.api.ByteStack; @org.netbeans.api.annotations.common.SuppressWarnings({"SF_SWITCH_FALLTHROUGH", "URF_UNREAD_FIELD", "DLS_DEAD_LOCAL_STORE", "DM_DEFAULT_ENCODING"}) %% %public %class ApacheConfColoringLexer %type ApacheConfTokenId %function nextToken %unicode %caseless %char %eofval{ if(input.readLength() > 0) { // backup eof input.backup(1); //and return the text as error token return ApacheConfTokenId.AC_UNKNOWN; } else { return null; } %eofval} %{ private ByteStack stack = new ByteStack(); private LexerInput input; public ApacheConfColoringLexer(LexerRestartInfo info) { this.input = info.input(); if(info.state() != null) { //reset state setState((LexerState) info.state()); } else { zzState = zzLexicalState = YYINITIAL; stack.clear(); } } public static final class LexerState { final ByteStack stack; /** the current state of the DFA */ final int zzState; /** the current lexical state */ final int zzLexicalState; LexerState(ByteStack stack, int zzState, int zzLexicalState) { this.stack = stack; this.zzState = zzState; this.zzLexicalState = zzLexicalState; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || obj.getClass() != this.getClass()) { return false; } LexerState state = (LexerState) obj; return (this.stack.equals(state.stack) && (this.zzState == state.zzState) && (this.zzLexicalState == state.zzLexicalState)); } @Override public int hashCode() { int hash = 11; hash = 31 * hash + this.zzState; hash = 31 * hash + this.zzLexicalState; if (stack != null) { hash = 31 * hash + this.stack.hashCode(); } return hash; } } public LexerState getState() { return new LexerState(stack.copyOf(), zzState, zzLexicalState); } public void setState(LexerState state) { this.stack.copyFrom(state.stack); this.zzState = state.zzState; this.zzLexicalState = state.zzLexicalState; } protected int getZZLexicalState() { return zzLexicalState; } protected void popState() { yybegin(stack.pop()); } protected void pushState(final int state) { stack.push(getZZLexicalState()); yybegin(state); } // End user code %} IDENTIFIER=[[:letter:]_\x7f-\xff][[:letter:][:digit:]_\x7f-\xff]* WHITESPACE=[ \t]+ NEWLINE=("\r"|"\n"|"\r\n") ZERO=0 DECIMAL=[\+\-]?[1-9][0-9]* OCTAL=0[0-7]+ HEXADECIMAL=0[xX][0-9A-Fa-f]+ EXPONENT=[eE][\+\-]?[0-9]+ FLOAT_1=[0-9]+\.[0-9]+{EXPONENT}? FLOAT_2=\.[0-9]+{EXPONENT}? FLOAT_3=[0-9]+\.{EXPONENT}? FLOAT_4=[0-9]+{EXPONENT} FLOAT=[\+\-]?({FLOAT_1} | {FLOAT_2} | {FLOAT_3} | {FLOAT_4}) NUMBER={ZERO} | {DECIMAL} | {OCTAL} | {HEXADECIMAL} | {FLOAT} LITERAL=([^+#%\"',=\[\]\{\}\(\)\<\>\t\n\r@ ])+ D_STRING="\""([^"\r""\n""\r\n""\""]|"\\\"")*"\"" S_STRING="'"([^"\r""\n""\r\n""'"]|"\\'")*"'" STRING = {D_STRING} | {S_STRING} COMMENT="#"[^"\r""\n""\r\n"]* VARIABLE="%{"{LITERAL}"}" FLAG="["([:letter:] | [:digit:] | "=" | ",")+"]" CLOSE_TAG="</"{IDENTIFIER}">" TAG_PARAM=[^"\r""\n""\r\n""\t"" ""<"">"]* DIRECTIVE_PARAM_TOKEN=[^"\r""\n""\r\n""\t"" "] %state ST_HIGHLIGHTING_ERROR %state ST_IN_OPEN_TAG %state ST_IN_DIRECTIVE %% <YYINITIAL, ST_IN_OPEN_TAG, ST_IN_DIRECTIVE>{WHITESPACE}+ { return ApacheConfTokenId.AC_WHITESPACE; } <YYINITIAL> { {CLOSE_TAG} { return ApacheConfTokenId.AC_TAG; } "<"{IDENTIFIER} { pushState(ST_IN_OPEN_TAG); return ApacheConfTokenId.AC_TAG; } {IDENTIFIER} { pushState(ST_IN_DIRECTIVE); return ApacheConfTokenId.AC_DIRECTIVE; } {NEWLINE} { return ApacheConfTokenId.AC_WHITESPACE; } {COMMENT} { return ApacheConfTokenId.AC_COMMENT; } } <ST_IN_OPEN_TAG> { ">" { popState(); return ApacheConfTokenId.AC_TAG; } {TAG_PARAM} { return ApacheConfTokenId.AC_TAG_PARAM; } } <ST_IN_DIRECTIVE> { {NUMBER} { return ApacheConfTokenId.AC_NUMBER; } {VARIABLE} { return ApacheConfTokenId.AC_VARIABLE; } {FLAG} { return ApacheConfTokenId.AC_FLAG; } {STRING} { return ApacheConfTokenId.AC_STRING; } {DIRECTIVE_PARAM_TOKEN} { return ApacheConfTokenId.AC_DIRECTIVE_PARAM_TOKEN; } {NEWLINE} { popState(); return ApacheConfTokenId.AC_WHITESPACE; } } /* ============================================ Stay in this state until we find a whitespace. After we find a whitespace we go the the prev state and try again from the next token. ============================================ */ <ST_HIGHLIGHTING_ERROR> { {WHITESPACE} { popState(); return ApacheConfTokenId.AC_WHITESPACE; } . | {NEWLINE} { return ApacheConfTokenId.AC_UNKNOWN; } } /* ============================================ This rule must be the last in the section!! it should contain all the states. ============================================ */ <YYINITIAL, ST_IN_OPEN_TAG, ST_IN_DIRECTIVE> { . { yypushback(yylength()); pushState(ST_HIGHLIGHTING_ERROR); } {NEWLINE} { yypushback(yylength()); pushState(ST_HIGHLIGHTING_ERROR); } }
JFlex
5
timfel/netbeans
webcommon/languages.apacheconf/tools/ApacheConfColoringLexer.flex
[ "Apache-2.0" ]
Make type hints for http parser stricter
Cucumber
4
adamko147/aiohttp
CHANGES/5267.feature
[ "Apache-2.0" ]
#world[[FOO] = [BAR]] { polygon-fill: #FFF; line-color:#F00; line-width: 0.5; } #world[[BAR] = [HI]] { polygon-fill: #FFF; line-color:#F00; line-width: 0.5; } #world[[BAR] = [HI]] { polygon-fill: #FFF; line-color:#F00; line-width: 5; } #world[[BAR] > [HI]] { polygon-fill: #FFF; line-color:#F00; line-width: 5; }
CartoCSS
1
nimix/carto
test/rendering/filter_comparing_fields.mss
[ "Apache-2.0" ]
/* 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/distributed_runtime/collective_param_resolver_distributed.h" #include "absl/container/flat_hash_map.h" #include "tensorflow/core/common_runtime/device_mgr.h" #include "tensorflow/core/common_runtime/test_collective_executor_mgr.h" #include "tensorflow/core/distributed_runtime/device_resolver_distributed.h" #include "tensorflow/core/distributed_runtime/test_utils.h" #include "tensorflow/core/distributed_runtime/worker.h" #include "tensorflow/core/distributed_runtime/worker_env.h" #include "tensorflow/core/framework/cancellation.h" #include "tensorflow/core/lib/core/notification.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/random.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/util/device_name_utils.h" namespace tensorflow { namespace { static std::unique_ptr<Device> NewDevice(const string& type, const string& name) { class FakeDevice : public Device { public: explicit FakeDevice(const DeviceAttributes& attr) : Device(nullptr, attr) {} Status Sync() override { return Status::OK(); } Allocator* GetAllocator(AllocatorAttributes) override { return nullptr; } }; DeviceAttributes attr; attr.set_name(name); attr.set_device_type(type); attr.mutable_locality()->set_numa_node(3); // a non-default value attr.set_incarnation(random::New64()); return absl::make_unique<FakeDevice>(attr); } class FakeCache : public TestWorkerCache { public: // Override the Locality methods to actually pass through to the // worker. bool GetDeviceLocalityNonBlocking(const string& device, DeviceLocality* locality) override { return false; } void GetDeviceLocalityAsync(const string& device, DeviceLocality* locality, StatusCallback done) override { string task_name; string dev_part; if (!DeviceNameUtils::SplitDeviceName(device, &task_name, &dev_part)) { done(errors::Internal("failed to parse device name")); return; } auto it = workers_.find(task_name); if (it == workers_.end()) { done(errors::Internal("failed to find worker ", task_name)); return; } WorkerInterface* wi = it->second; GetStatusRequest req; GetStatusResponse resp; Status status = wi->GetStatus(&req, &resp); if (!status.ok()) { done(status); return; } for (const auto& it : resp.device_attributes()) { if (it.name() == device) { *locality = it.locality(); done(Status::OK()); return; } } done(errors::Internal("device not found: ", device)); } }; class FakeNcclCommunicator : public NcclCommunicatorInterface { public: // We only need to define GenerateCommunicatorKey(). string GenerateCommunicatorKey() override { return "mock-communicator-key"; } void Enqueue(std::shared_ptr<CollectiveContext> col_ctx, StatusCallback done) override { done(Status::OK()); } void StartAbort(const Status& s) override {} }; class DeviceResDistTest : public ::testing::Test { public: ~DeviceResDistTest() override { for (auto& name_param : cp_) { name_param.second->Unref(); } } protected: void DefineWorkers(int num_workers, int num_devices, const string& device_type, bool nccl) { for (int w = 0; w < num_workers; ++w) { string name = strings::StrCat("/job:worker/replica:0/task:", w); DefineWorker(name, device_type, num_devices, nccl); } } void DefineWorker(const string& worker_name, const string& device_type, int num_devices, bool nccl) { ConfigProto config; config.mutable_experimental()->set_collective_group_leader( "/job:worker/replica:0/task:0"); config.mutable_experimental()->set_collective_nccl(nccl); std::vector<std::unique_ptr<Device>> devices; for (int i = 0; i < num_devices; ++i) { devices.push_back(NewDevice( device_type, strings::StrCat(worker_name, "/device:", device_type, ":", i))); } device_mgrs_[worker_name] = absl::make_unique<StaticDeviceMgr>(std::move(devices)); std::vector<string>* dv = &dev_by_task_[worker_name]; dv->clear(); for (auto* d : device_mgrs_[worker_name]->ListDevices()) { dv->push_back(d->name()); } dev_resolvers_[worker_name] = absl::make_unique<DeviceResolverDistributed>( device_mgrs_[worker_name].get()); cp_resolvers_[worker_name] = absl::make_unique<CollectiveParamResolverDistributed>( config, device_mgrs_[worker_name].get(), dev_resolvers_[worker_name].get(), &nccl_communicator_, &wc_, worker_name); auto worker_env = absl::make_unique<WorkerEnv>(); worker_env->env = Env::Default(); worker_env->local_devices = device_mgrs_[worker_name]->ListDevices(); worker_env->device_mgr = device_mgrs_[worker_name].get(); worker_env->collective_executor_mgr = absl::make_unique<TestCollectiveExecutorMgr>( cp_resolvers_[worker_name].get(), /*rma=*/nullptr); workers_[worker_name] = absl::make_unique<Worker>(worker_env.get()); worker_envs_[worker_name] = std::move(worker_env); wc_.AddWorker(worker_name, workers_[worker_name].get()); } void DefineCollectiveParams(int num_workers, int num_devices, const string& device_type, CollectiveType coll_type = REDUCTION_COLLECTIVE, int source_rank = 0) { for (int wi = 0; wi < num_workers; ++wi) { string task_name = strings::StrCat("/job:worker/replica:0/task:", wi); for (int di = 0; di < num_devices; ++di) { int idx = wi * num_devices + di; string device_name = strings::StrCat(task_name, "/device:", device_type, ":", di); cp_[device_name] = CreateCollectiveParams(num_workers, num_devices, device_type, coll_type, idx == source_rank); } } } CollectiveParams* CreateCollectiveParams(int num_workers, int num_devices, const string& device_type, CollectiveType coll_type, bool is_source) { const int kGroupKey = 5; const int kInstanceKey = 3; auto* cp = new CollectiveParams(); cp->is_source = is_source; cp->group.group_key = kGroupKey; cp->group.group_size = num_workers * num_devices; cp->group.device_type = DeviceType(device_type); cp->group.num_tasks = num_workers; cp->instance.instance_key = kInstanceKey; cp->instance.type = coll_type; cp->instance.data_type = DT_FLOAT; cp->instance.shape = TensorShape({64}); cp->instance.impl_details.subdiv_offsets.push_back(0); return cp; } void IssueRequests(int num_workers, int num_devices) { { mutex_lock l(mu_); num_done_ = 0; } int group_size = num_workers * num_devices; for (int wi = 0; wi < num_workers; ++wi) { string task_name = strings::StrCat("/job:worker/replica:0/task:", wi); for (int di = 0; di < num_devices; ++di) { string device_name = strings::StrCat(task_name, "/device:CPU:", di); IssueRequest(task_name, device_name, group_size); } } } void IssueRequest(const string& task_name, const string& device_name, int group_size) { Device* device = nullptr; TF_CHECK_OK(device_mgrs_[task_name]->LookupDevice(device_name, &device)); CollectiveParams* cp = cp_[device_name]; CollectiveParamResolverDistributed* cp_res = cp_resolvers_[task_name].get(); CHECK(cp_res); cp_res->CompleteParamsAsync( device->attributes(), cp, &cm_, [this, device_name, group_size](const Status& s) { status_[device_name] = s; { mutex_lock l(mu_); ++num_done_; if (num_done_ == group_size) { done_.notify_all(); } } }); } void ValidateCollectiveParams(int num_workers, int num_devices) { int device_count = num_workers * num_devices; { mutex_lock l(mu_); if (num_done_ < device_count) { done_.wait(l); } } // Verify that all cp_ values get the same set of task and device // names, with unique default_rank in the expected order. const int dev_count = num_workers * num_devices; string dev0 = "/job:worker/replica:0/task:0/device:CPU:0"; for (int wi = 0; wi < num_workers; ++wi) { string task_name = strings::StrCat("/job:worker/replica:0/task:", wi); for (int di = 0; di < num_devices; ++di) { string device_name = strings::StrCat(task_name, "/device:CPU:", di); int idx = wi * num_devices + di; TF_ASSERT_OK(status_[device_name]); EXPECT_EQ(cp_[device_name]->default_rank, idx); EXPECT_EQ(cp_[device_name]->group.members.size(), dev_count); EXPECT_EQ(cp_[device_name]->group.members[idx].device.name(), device_name); EXPECT_EQ(cp_[device_name]->group.members[idx].task, task_name); ValidateDeviceResolver(*cp_[device_name], task_name); if (idx > 0) { EXPECT_EQ(cp_[dev0]->group.runtime_details.communicator_key, cp_[device_name]->group.runtime_details.communicator_key); for (int i = 0; i < dev_count; ++i) { EXPECT_EQ(cp_[dev0]->group.members[i].device.name(), cp_[device_name]->group.members[i].device.name()); EXPECT_EQ(cp_[dev0]->group.members[i].task, cp_[device_name]->group.members[i].task); } } } } } void ValidateDeviceResolver(const CollectiveParams& cp, const string& task) { for (const CollGroupMember& member : cp.group.members) { DeviceAttributes attributes; TF_ASSERT_OK(dev_resolvers_[task]->GetDeviceAttributes( member.device.name(), &attributes)); } } void RestartWorker(int worker_idx, int num_workers, int num_devices, const string& device_type, bool nccl, CollectiveType coll_type = REDUCTION_COLLECTIVE, bool is_source = false) { string worker_name = strings::StrCat("/job:worker/replica:0/task:", worker_idx); DefineWorker(worker_name, device_type, num_devices, nccl); for (int i = 0; i < num_devices; ++i) { string device_name = strings::StrCat(worker_name, "/device:", device_type, ":", i); if (cp_.find(device_name) != cp_.end()) { cp_[device_name]->Unref(); } cp_[device_name] = CreateCollectiveParams( num_workers, num_devices, device_type, coll_type, is_source); status_.erase(device_name); } } FakeCache wc_; FakeNcclCommunicator nccl_communicator_; CancellationManager cm_; // Below are keyed by task names. absl::flat_hash_map<string, std::unique_ptr<DeviceMgr>> device_mgrs_; absl::flat_hash_map<string, std::unique_ptr<DeviceResolverDistributed>> dev_resolvers_; absl::flat_hash_map<string, std::unique_ptr<CollectiveParamResolverDistributed>> cp_resolvers_; absl::flat_hash_map<string, std::vector<string>> dev_by_task_; absl::flat_hash_map<string, std::unique_ptr<WorkerEnv>> worker_envs_; absl::flat_hash_map<string, std::unique_ptr<Worker>> workers_; // Below are keyed by device names; absl::flat_hash_map<string, CollectiveParams*> cp_; absl::flat_hash_map<string, Status> status_; mutex mu_; int num_done_ TF_GUARDED_BY(mu_); condition_variable done_; }; TEST_F(DeviceResDistTest, Workers1Devices1) { const int num_workers = 1; const int num_devices = 1; DefineWorkers(num_workers, num_devices, "CPU", /*nccl*/ false); DefineCollectiveParams(num_workers, num_devices, "CPU"); IssueRequests(num_workers, num_devices); ValidateCollectiveParams(num_workers, num_devices); } TEST_F(DeviceResDistTest, Workers2Devices2) { const int num_workers = 2; const int num_devices = 2; DefineWorkers(num_workers, num_devices, "CPU", /*nccl*/ false); DefineCollectiveParams(num_workers, num_devices, "CPU"); IssueRequests(num_workers, num_devices); ValidateCollectiveParams(num_workers, num_devices); } TEST_F(DeviceResDistTest, DifferentIncarnation) { const int num_workers = 2; const int num_devices = 1; DefineWorkers(num_workers, num_devices, "CPU", /*nccl*/ false); DefineCollectiveParams(num_workers, num_devices, "CPU"); IssueRequests(num_workers, num_devices); RestartWorker(1, num_workers, num_devices, "CPU", /*nccl*/ false); const string task_name = "/job:worker/replica:0/task:1"; const string device_name = absl::StrCat(task_name, "/device:CPU:0"); IssueRequest(task_name, device_name, num_workers * num_devices); EXPECT_TRUE(errors::IsFailedPrecondition(status_[device_name])); } TEST_F(DeviceResDistTest, BroadcastSourceRank0) { const int num_workers = 2; const int num_devices = 2; const int source_rank = 0; DefineWorkers(num_workers, num_devices, "CPU", /*nccl*/ false); DefineCollectiveParams(num_workers, num_devices, "CPU", BROADCAST_COLLECTIVE, source_rank); IssueRequests(num_workers, num_devices); ValidateCollectiveParams(num_workers, num_devices); } TEST_F(DeviceResDistTest, BroadcastSourceRank3) { const int num_workers = 2; const int num_devices = 2; const int source_rank = 3; DefineWorkers(num_workers, num_devices, "CPU", /*nccl*/ false); DefineCollectiveParams(num_workers, num_devices, "CPU", BROADCAST_COLLECTIVE, source_rank); IssueRequests(num_workers, num_devices); ValidateCollectiveParams(num_workers, num_devices); } TEST_F(DeviceResDistTest, Workers4Devices3) { const int num_workers = 4; const int num_devices = 3; DefineWorkers(num_workers, num_devices, "CPU", true); DefineCollectiveParams(num_workers, num_devices, "CPU"); IssueRequests(num_workers, num_devices); ValidateCollectiveParams(num_workers, num_devices); } } // namespace } // namespace tensorflow
C++
4
EricRemmerswaal/tensorflow
tensorflow/core/distributed_runtime/collective_param_resolver_distributed_test.cc
[ "Apache-2.0" ]
// Copyright 2021 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. //go:build !faketime // +build !faketime #include "go_asm.h" #include "go_tls.h" #include "textflag.h" #define SYS_clock_gettime 228 // func time.now() (sec int64, nsec int32, mono int64) TEXT time·now<ABIInternal>(SB),NOSPLIT,$16-24 MOVQ SP, R12 // Save old SP; R12 unchanged by C code. MOVQ g_m(R14), BX // BX unchanged by C code. // Set vdsoPC and vdsoSP for SIGPROF traceback. // Save the old values on stack and restore them on exit, // so this function is reentrant. MOVQ m_vdsoPC(BX), CX MOVQ m_vdsoSP(BX), DX MOVQ CX, 0(SP) MOVQ DX, 8(SP) LEAQ sec+0(FP), DX MOVQ -8(DX), CX // Sets CX to function return address. MOVQ CX, m_vdsoPC(BX) MOVQ DX, m_vdsoSP(BX) CMPQ R14, m_curg(BX) // Only switch if on curg. JNE noswitch MOVQ m_g0(BX), DX MOVQ (g_sched+gobuf_sp)(DX), SP // Set SP to g0 stack noswitch: SUBQ $32, SP // Space for two time results ANDQ $~15, SP // Align for C code MOVL $0, DI // CLOCK_REALTIME LEAQ 16(SP), SI MOVQ runtime·vdsoClockgettimeSym(SB), AX CMPQ AX, $0 JEQ fallback CALL AX MOVL $1, DI // CLOCK_MONOTONIC LEAQ 0(SP), SI MOVQ runtime·vdsoClockgettimeSym(SB), AX CALL AX ret: MOVQ 16(SP), AX // realtime sec MOVQ 24(SP), DI // realtime nsec (moved to BX below) MOVQ 0(SP), CX // monotonic sec IMULQ $1000000000, CX MOVQ 8(SP), DX // monotonic nsec MOVQ R12, SP // Restore real SP // Restore vdsoPC, vdsoSP // We don't worry about being signaled between the two stores. // If we are not in a signal handler, we'll restore vdsoSP to 0, // and no one will care about vdsoPC. If we are in a signal handler, // we cannot receive another signal. MOVQ 8(SP), SI MOVQ SI, m_vdsoSP(BX) MOVQ 0(SP), SI MOVQ SI, m_vdsoPC(BX) // set result registers; AX is already correct MOVQ DI, BX ADDQ DX, CX RET fallback: MOVQ $SYS_clock_gettime, AX SYSCALL MOVL $1, DI // CLOCK_MONOTONIC LEAQ 0(SP), SI MOVQ $SYS_clock_gettime, AX SYSCALL JMP ret
GAS
4
rleungx/go
src/runtime/time_linux_amd64.s
[ "BSD-3-Clause" ]
%!PS-Adobe-3.0 Resource-ProcSet %%Title: VIM-CIDFont %%Version: 1.0 0 %%EndComments % Editing of this file is NOT RECOMMENDED. You run a very good risk of causing % all PostScript printing from VIM failing if you do. PostScript is not called % a write-only language for nothing! /CP currentpacking d T setpacking /SB 256 string d /CIDN? systemdict/composefont known d /GS? systemdict/.makeoperator known d CIDN?{ GS?{/vim_findresource{2 copy resourcestatus not{1 index SB cvs runlibfile}{ pop pop}ifelse findresource}bd/vim_composefont{0 get/CIDFont vim_findresource exch/CMap vim_findresource exch[exch]composefont pop}bd}{/vim_findresource /findresource ld/vim_composefont{composefont pop}bd}ifelse }{ /vim_fontname{0 get SB cvs length dup SB exch(-)putinterval 1 add dup SB exch dup 256 exch sub getinterval 3 -1 roll exch cvs length add SB exch 0 exch getinterval cvn}bd/vim_composefont{vim_fontname findfont d}bd } ifelse /cfs{exch scalefont d}bd /sffs{findfont 3 1 roll 1 index mul exch 2 index/FontMatrix get matrix copy scale makefont d}bd CP setpacking % vim:ff=unix: %%EOF
PostScript
2
uga-rosa/neovim
runtime/print/cidfont.ps
[ "Vim" ]
/home/spinalvm/hdl/riscv-compliance/work//I-JALR-01.elf: file format elf32-littleriscv Disassembly of section .text.init: 80000000 <_start>: 80000000: 00001097 auipc ra,0x1 80000004: 01008093 addi ra,ra,16 # 80001010 <codasip_signature_start> 80000008: 12345137 lui sp,0x12345 8000000c: 67810113 addi sp,sp,1656 # 12345678 <_start-0x6dcba988> 80000010: 00000197 auipc gp,0x0 80000014: 01018193 addi gp,gp,16 # 80000020 <_start+0x20> 80000018: 00018067 jr gp 8000001c: 00000113 li sp,0 80000020: 0000a023 sw zero,0(ra) 80000024: 0020a223 sw sp,4(ra) 80000028: 00001097 auipc ra,0x1 8000002c: ff008093 addi ra,ra,-16 # 80001018 <test_A2_res> 80000030: fff00113 li sp,-1 80000034: fff00193 li gp,-1 80000038: 0fedd237 lui tp,0xfedd 8000003c: ba920213 addi tp,tp,-1111 # fedcba9 <_start-0x70123457> 80000040: 00000f97 auipc t6,0x0 80000044: 038f8f93 addi t6,t6,56 # 80000078 <_start+0x78> 80000048: 000f8067 jr t6 8000004c: 00000113 li sp,0 80000050: 00000193 li gp,0 80000054: 00000213 li tp,0 80000058: 876541b7 lui gp,0x87654 8000005c: 32118193 addi gp,gp,801 # 87654321 <_end+0x76532b1> 80000060: 00000297 auipc t0,0x0 80000064: 03828293 addi t0,t0,56 # 80000098 <_start+0x98> 80000068: 00028067 jr t0 8000006c: 00000113 li sp,0 80000070: 00000193 li gp,0 80000074: 00000213 li tp,0 80000078: 9abce137 lui sp,0x9abce 8000007c: ef010113 addi sp,sp,-272 # 9abcdef0 <_end+0x1abcce80> 80000080: 00000797 auipc a5,0x0 80000084: fd878793 addi a5,a5,-40 # 80000058 <_start+0x58> 80000088: 00078067 jr a5 8000008c: 00000113 li sp,0 80000090: 00000193 li gp,0 80000094: 00000213 li tp,0 80000098: 0000a023 sw zero,0(ra) 8000009c: 0020a223 sw sp,4(ra) 800000a0: 0030a423 sw gp,8(ra) 800000a4: 0040a623 sw tp,12(ra) 800000a8: 00001497 auipc s1,0x1 800000ac: f5848493 addi s1,s1,-168 # 80001000 <test_B1_data> 800000b0: 00001517 auipc a0,0x1 800000b4: f7850513 addi a0,a0,-136 # 80001028 <test_B1_res> 800000b8: fff00113 li sp,-1 800000bc: fff00193 li gp,-1 800000c0: fff00213 li tp,-1 800000c4: fff00293 li t0,-1 800000c8: 55555337 lui t1,0x55555 800000cc: 55530313 addi t1,t1,1365 # 55555555 <_start-0x2aaaaaab> 800000d0: 0004ac83 lw s9,0(s1) 800000d4: 0044ac03 lw s8,4(s1) 800000d8: 00000397 auipc t2,0x0 800000dc: 03438393 addi t2,t2,52 # 8000010c <B1b_link+0x14> 800000e0: 000380e7 jalr t2 800000e4 <B1a_link>: 800000e4: 222221b7 lui gp,0x22222 800000e8: 22218193 addi gp,gp,546 # 22222222 <_start-0x5dddddde> 800000ec: 00000417 auipc s0,0x0 800000f0: 04040413 addi s0,s0,64 # 8000012c <B1b_link+0x34> 800000f4: 00040fe7 jalr t6,s0 800000f8 <B1b_link>: 800000f8: 444442b7 lui t0,0x44444 800000fc: 44428293 addi t0,t0,1092 # 44444444 <_start-0x3bbbbbbc> 80000100: 00000f17 auipc t5,0x0 80000104: 04cf0f13 addi t5,t5,76 # 8000014c <B1b_link+0x54> 80000108: 000f0067 jr t5 8000010c: 11111137 lui sp,0x11111 80000110: 11110113 addi sp,sp,273 # 11111111 <_start-0x6eeeeeef> 80000114: 00008067 ret 80000118: 00000113 li sp,0 8000011c: 00000193 li gp,0 80000120: 00000213 li tp,0 80000124: 00000293 li t0,0 80000128: 00000313 li t1,0 8000012c: 33333237 lui tp,0x33333 80000130: 33320213 addi tp,tp,819 # 33333333 <_start-0x4ccccccd> 80000134: 000f8067 jr t6 80000138: 00000113 li sp,0 8000013c: 00000193 li gp,0 80000140: 00000213 li tp,0 80000144: 00000293 li t0,0 80000148: 00000313 li t1,0 8000014c: 0190c3b3 xor t2,ra,s9 80000150: 018fc433 xor s0,t6,s8 80000154: 00252023 sw sp,0(a0) 80000158: 00352223 sw gp,4(a0) 8000015c: 00452423 sw tp,8(a0) 80000160: 00552623 sw t0,12(a0) 80000164: 00652823 sw t1,16(a0) 80000168: 00752a23 sw t2,20(a0) 8000016c: 00852c23 sw s0,24(a0) 80000170: 00001497 auipc s1,0x1 80000174: e9848493 addi s1,s1,-360 # 80001008 <test_B2_data> 80000178: 00001517 auipc a0,0x1 8000017c: ecc50513 addi a0,a0,-308 # 80001044 <test_B2_res> 80000180: fff00113 li sp,-1 80000184: fff00193 li gp,-1 80000188: fff00213 li tp,-1 8000018c: fff00293 li t0,-1 80000190: fff00313 li t1,-1 80000194: 0004ac03 lw s8,0(s1) 80000198: 0044ac83 lw s9,4(s1) 8000019c: 00000797 auipc a5,0x0 800001a0: 02c78793 addi a5,a5,44 # 800001c8 <B1b_link+0xd0> 800001a4: 00078067 jr a5 800001a8: 777771b7 lui gp,0x77777 800001ac: 77718193 addi gp,gp,1911 # 77777777 <_start-0x8888889> 800001b0: 001f8067 jr 1(t6) 800001b4: 00000113 li sp,0 800001b8: 00000193 li gp,0 800001bc: 00000213 li tp,0 800001c0: 00000293 li t0,0 800001c4: 00000313 li t1,0 800001c8: 66666137 lui sp,0x66666 800001cc: 66610113 addi sp,sp,1638 # 66666666 <_start-0x1999999a> 800001d0: 00000f97 auipc t6,0x0 800001d4: fd9f8f93 addi t6,t6,-39 # 800001a9 <B1b_link+0xb1> 800001d8: 000f8fe7 jalr t6,t6 800001dc <B2b_link>: 800001dc: 88889237 lui tp,0x88889 800001e0: 88820213 addi tp,tp,-1912 # 88888888 <_end+0x8887818> 800001e4: 00000097 auipc ra,0x0 800001e8: 02108093 addi ra,ra,33 # 80000205 <B2c_link+0x15> 800001ec: 000080e7 jalr ra 800001f0 <B2c_link>: 800001f0: aaaab337 lui t1,0xaaaab 800001f4: aaa30313 addi t1,t1,-1366 # aaaaaaaa <_end+0x2aaa9a3a> 800001f8: 00000f17 auipc t5,0x0 800001fc: 02cf0f13 addi t5,t5,44 # 80000224 <B2c_link+0x34> 80000200: 000f0067 jr t5 80000204: 9999a2b7 lui t0,0x9999a 80000208: 99928293 addi t0,t0,-1639 # 99999999 <_end+0x19998929> 8000020c: 00108067 jr 1(ra) 80000210: 00000113 li sp,0 80000214: 00000193 li gp,0 80000218: 00000213 li tp,0 8000021c: 00000293 li t0,0 80000220: 00000313 li t1,0 80000224: 018fc3b3 xor t2,t6,s8 80000228: 0190c433 xor s0,ra,s9 8000022c: 00252023 sw sp,0(a0) 80000230: 00352223 sw gp,4(a0) 80000234: 00452423 sw tp,8(a0) 80000238: 00552623 sw t0,12(a0) 8000023c: 00652823 sw t1,16(a0) 80000240: 00752a23 sw t2,20(a0) 80000244: 00852c23 sw s0,24(a0) 80000248: 00001097 auipc ra,0x1 8000024c: e1808093 addi ra,ra,-488 # 80001060 <test_C_res> 80000250: 11111237 lui tp,0x11111 80000254: 11120213 addi tp,tp,273 # 11111111 <_start-0x6eeeeeef> 80000258: 00000197 auipc gp,0x0 8000025c: 00f18193 addi gp,gp,15 # 80000267 <B2c_link+0x77> 80000260: 00118067 jr 1(gp) 80000264: 00000213 li tp,0 80000268: 222222b7 lui t0,0x22222 8000026c: 22228293 addi t0,t0,546 # 22222222 <_start-0x5dddddde> 80000270: 00000197 auipc gp,0x0 80000274: 01118193 addi gp,gp,17 # 80000281 <B2c_link+0x91> 80000278: fff18067 jr -1(gp) 8000027c: 00000293 li t0,0 80000280: 33333337 lui t1,0x33333 80000284: 33330313 addi t1,t1,819 # 33333333 <_start-0x4ccccccd> 80000288: 00000197 auipc gp,0x0 8000028c: 81118193 addi gp,gp,-2031 # 7ffffa99 <_start-0x567> 80000290: 7ff18067 jr 2047(gp) 80000294: 00000313 li t1,0 80000298: 444443b7 lui t2,0x44444 8000029c: 44438393 addi t2,t2,1092 # 44444444 <_start-0x3bbbbbbc> 800002a0: 00001197 auipc gp,0x1 800002a4: 81018193 addi gp,gp,-2032 # 80000ab0 <complience_halt_break+0x7ac> 800002a8: 80018067 jr -2048(gp) 800002ac: 00000393 li t2,0 800002b0: 0040a023 sw tp,0(ra) 800002b4: 0050a223 sw t0,4(ra) 800002b8: 0060a423 sw t1,8(ra) 800002bc: 0070a623 sw t2,12(ra) 800002c0: 00001517 auipc a0,0x1 800002c4: d5050513 addi a0,a0,-688 # 80001010 <codasip_signature_start> 800002c8: 00001597 auipc a1,0x1 800002cc: da858593 addi a1,a1,-600 # 80001070 <_end> 800002d0: f0100637 lui a2,0xf0100 800002d4: f2c60613 addi a2,a2,-212 # f00fff2c <_end+0x700feebc> 800002d8 <complience_halt_loop>: 800002d8: 02b50663 beq a0,a1,80000304 <complience_halt_break> 800002dc: 00c52683 lw a3,12(a0) 800002e0: 00d62023 sw a3,0(a2) 800002e4: 00852683 lw a3,8(a0) 800002e8: 00d62023 sw a3,0(a2) 800002ec: 00452683 lw a3,4(a0) 800002f0: 00d62023 sw a3,0(a2) 800002f4: 00052683 lw a3,0(a0) 800002f8: 00d62023 sw a3,0(a2) 800002fc: 01050513 addi a0,a0,16 80000300: fd9ff06f j 800002d8 <complience_halt_loop> 80000304 <complience_halt_break>: 80000304: f0100537 lui a0,0xf0100 80000308: f2050513 addi a0,a0,-224 # f00fff20 <_end+0x700feeb0> 8000030c: 00052023 sw zero,0(a0) 80000310: 0000 unimp ... Disassembly of section .data: 80001000 <test_B1_data>: 80001000: 00e4 addi s1,sp,76 80001002: 8000 0x8000 80001004: 00f8 addi a4,sp,76 80001006: 8000 0x8000 80001008 <test_B2_data>: 80001008: 01dc addi a5,sp,196 8000100a: 8000 0x8000 8000100c: 01f0 addi a2,sp,204 8000100e: 8000 0x8000 80001010 <codasip_signature_start>: 80001010: ffff 0xffff 80001012: ffff 0xffff 80001014: ffff 0xffff 80001016: ffff 0xffff 80001018 <test_A2_res>: 80001018: ffff 0xffff 8000101a: ffff 0xffff 8000101c: ffff 0xffff 8000101e: ffff 0xffff 80001020: ffff 0xffff 80001022: ffff 0xffff 80001024: ffff 0xffff 80001026: ffff 0xffff 80001028 <test_B1_res>: 80001028: ffff 0xffff 8000102a: ffff 0xffff 8000102c: ffff 0xffff 8000102e: ffff 0xffff 80001030: ffff 0xffff 80001032: ffff 0xffff 80001034: ffff 0xffff 80001036: ffff 0xffff 80001038: ffff 0xffff 8000103a: ffff 0xffff 8000103c: ffff 0xffff 8000103e: ffff 0xffff 80001040: ffff 0xffff 80001042: ffff 0xffff 80001044 <test_B2_res>: 80001044: ffff 0xffff 80001046: ffff 0xffff 80001048: ffff 0xffff 8000104a: ffff 0xffff 8000104c: ffff 0xffff 8000104e: ffff 0xffff 80001050: ffff 0xffff 80001052: ffff 0xffff 80001054: ffff 0xffff 80001056: ffff 0xffff 80001058: ffff 0xffff 8000105a: ffff 0xffff 8000105c: ffff 0xffff 8000105e: ffff 0xffff 80001060 <test_C_res>: 80001060: ffff 0xffff 80001062: ffff 0xffff 80001064: ffff 0xffff 80001066: ffff 0xffff 80001068: ffff 0xffff 8000106a: ffff 0xffff 8000106c: ffff 0xffff 8000106e: ffff 0xffff
ObjDump
3
cbrune/VexRiscv
src/test/resources/asm/I-JALR-01.elf.objdump
[ "MIT" ]
#%RAML 1.0 Library # This is the file /libraries/traits.raml usage: This library defines some basic traits uses: myDataTypes: !include dataTypes.raml traits: hasRequestItem: usage: Use this trait for resources whose request body is a single item body: application/json: type: <<resourcePathName|!singularize>> hasResponseItem: usage: Use this trait for resources whose response body is a single item responses: 200: body: application/json: type: <<resourcePathName|!singularize>> hasResponseCollection: usage: Use this trait for resources whose response body is a collection of items responses: 200: body: application/json: type: <<resourcePathName|!singularize>>[] hasNotFound: usage: Use this trait for resources that could respond with a 404 status responses: 404: body: application/json: type: myDataTypes.Error
RAML
4
zeesh49/tutorials
raml/annotations/libraries/traits.raml
[ "MIT" ]
import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon([/*#__PURE__*/_jsx("path", { d: "M19.06 2.6 11.6 8.7l-1.21-1.04 2.48-1.43c.57-.33.67-1.11.21-1.57l-2.95-2.95a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l2.03 2.03-5.4 3.11c-.23.13-.39.35-.46.6l-.96 3.49c-.07.26-.04.53.1.77l1.74 3.02c.28.48.89.64 1.37.37.48-.28.64-.89.37-1.37l-1.53-2.66.36-1.29L9.5 13l.44 8c.03.56.49 1 1.05 1s1.02-.44 1.05-1l.45-9 7.87-7.96c.36-.36.38-.93.05-1.32-.34-.4-.94-.45-1.35-.12z" }, "0"), /*#__PURE__*/_jsx("circle", { cx: "5", cy: "5", r: "2" }, "1")], 'SportsMartialArtsRounded');
JavaScript
3
dany-freeman/material-ui
packages/mui-icons-material/lib/esm/SportsMartialArtsRounded.js
[ "MIT" ]
package test; public class Nesting { public test.Nesting.Second.Third.FourthImpl getImpl() { return null; } public static final class Second { public static final class Third { public interface Fourth { public boolean isImplemented(); } public static final class FourthImpl implements Fourth { @Override public boolean isImplemented() { return true; } } } } }
Java
4
qussarah/declare
compiler/testData/compileKotlinAgainstJava/Nesting.java
[ "Apache-2.0" ]
=begin comment Perl 6 example for ace =end comment class Cook is Employee { has @.utensils is rw; has @.cookbooks is rw; method cook( $food ) { say "Cooking $food"; } method clean_utensils { say "Cleaning $_" for @.utensils; } } class Baker is Cook { method cook( $confection ) { say "Baking a tasty $confection"; } } my $cook = Cook.new( utensils => <spoon ladle knife pan>, cookbooks => 'The Joy of Cooking', salary => 40000); $cook.cook( 'pizza' ); # OUTPUT: «Cooking pizza␤» say $cook.utensils.perl; # OUTPUT: «["spoon", "ladle", "knife", "pan"]␤» say $cook.cookbooks.perl; # OUTPUT: «["The Joy of Cooking"]␤» say $cook.salary; # OUTPUT: «40000␤» my $baker = Baker.new( utensils => 'self cleaning oven', cookbooks => "The Baker's Apprentice", salary => 50000); $baker.cook('brioche'); # OUTPUT: «Baking a tasty brioche␤» say $baker.utensils.perl; # OUTPUT: «["self cleaning oven"]␤» say $baker.cookbooks.perl; # OUTPUT: «["The Baker's Apprentice"]␤» say $baker.salary; # OUTPUT: «50000␤»
Perl6
4
cannerycoders/ace-builds
demo/kitchen-sink/docs/perl6.p6
[ "BSD-3-Clause" ]
// Copyright (c) Brice Lambson // The Brice Lambson licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/ using System.Text.Json.Serialization; using ImageResizer.Properties; namespace ImageResizer.Models { public class CustomSize : ResizeSize { [JsonIgnore] public override string Name { get => Resources.Input_Custom; set { /* no-op */ } } [JsonConstructor] public CustomSize(ResizeFit fit, double width, double height, ResizeUnit unit) { Fit = fit; Width = width; Height = height; Unit = unit; } public CustomSize() { } } }
C#
4
tameemzabalawi/PowerToys
src/modules/imageresizer/ui/Models/CustomSize.cs
[ "MIT" ]
(ns wisp.test.sequence (:require [wisp.test.util :refer [is thrown?]] [wisp.src.sequence :refer [cons conj list list? seq vec empty? count first second third rest last butlast take drop repeat concat reverse sort map filter reduce assoc every? some partition interleave nth]] [wisp.src.runtime :refer [str inc dec even? odd? vals =]])) (is (empty? "") "\"\" is empty") (is (empty? []) "[] is empty") (is (empty? nil) "nil is empty") (is (empty? {}) "{} is empty") (is (empty? '()) "'() is empty") (is (= (count "") 0) "count 0 in \"\"") (is (= (count "hello") 5) "count 5 in \"hello\"") (is (= (count []) 0) "count 0 in []") (is (= (count [1 2 3 "hi"]) 4) "1 2 3 \"hi\"") (is (= (count nil) 0) "count 0 in nil") (is (= (count {}) 0) "count 0 in {}") (is (= (count {:hello :world}) 1) "count 1 in {:hello :world}") (is (= (count '()) 0) "count 0 in '()") (is (= (count '(1 2)) 2) "count 2 in '(1 2)") (is (= nil (first nil))) (is (= nil (first ""))) (is (= \h (first "hello"))) (is (= nil (first []))) (is (= 1 (first [1 2 3]))) (is (= nil (first '()))) (is (= \a (first '(\a \b \c)))) (is (= nil (first {}))) (is (= [:a 1] (first {:a 1, :b 2}))) (is (= nil (second nil))) (is (= nil (second ""))) (is (= nil (second "h"))) (is (= \e (second "hello"))) (is (= nil (second []))) (is (= nil (second [1]))) (is (= 2 (second [1 2 3]))) (is (= nil (second '()))) (is (= nil (second '(:a)))) (is (= \b (second '(\a \b \c)))) (is (= nil (second {}))) (is (= nil (second {:a 1}))) (is (= [:b 2] (second {:a 1, :b 2}))) (is (= nil (third nil))) (is (= nil (third ""))) (is (= nil (third "h"))) (is (= \l (third "hello"))) (is (= nil (third []))) (is (= nil (third [1]))) (is (= 3 (third [1 2 3]))) (is (= nil (third '()))) (is (= nil (third '(:a)))) (is (= \c (third '(\a \b \c)))) (is (= nil (third {}))) (is (= nil (third {:a 1}))) (is (= [:c 3] (third {:a 1, :b 2, :c 3}))) (is (= nil (last nil))) (is (= nil (last []))) (is (= 3 (last [1 2 3]))) (is (= \o (last "hello"))) (is (= nil (last ""))) (is (= \c (last '(\a \b \c)))) (is (= nil (last '()))) (is (= \c (last '(\a \b \c)))) (is (= [:b 2] (last {:a 1, :b 2}))) (is (= nil (last {}))) (is (= nil (butlast nil))) (is (= nil (butlast '()))) (is (= nil (butlast '(1)))) (is (= '(1 2) (butlast '(1 2 3)))) (is (= nil (butlast []))) (is (= nil (butlast [1]))) (is (= [1 2] (butlast [1 2 3]))) (is (= nil (butlast {}))) (is (= nil (butlast {:a 1}))) (is (= [[:a 1]] (butlast {:a 1, :b 2}))) (is (= [] (rest {:a 1}))) (is (= "" (rest "a"))) (is (= '(2 3 4) (rest '(1 2 3 4)))) (is (= [2 3] (rest [1 2 3]))) (is (= [[:b 2]] (rest {:a 1 :b 2}))) (is (= "ello" (rest "hello"))) (is (= '() (rest nil))) (is (= '() (rest '()))) (is (= [] (rest [1]))) (is (= [] (rest {:a 1}))) (is (= "" (rest "a"))) (is (= '(2 3 4) (rest '(1 2 3 4)))) (is (= [2 3] (rest [1 2 3]))) (is (= [[:b 2]] (rest {:a 1 :b 2}))) (is (= "ello" (rest "hello"))) (is (list? '()) "'() is list") (is (not (list? 2)) "2 is not list") (is (not (list? {})) "{} is not list") (is (not (list? [])) "[] is not list") (is (not (empty? '(1 2 3 4))) "non empty list returns false on empty?") (is (= (count '(1 2 3 4)) 4) "list has expected length") (is (= (first (list 1 2 3 4)) 1) "first returns first item in the list") (is (= (rest '(1 2 3 4)) '(2 3 4)) "rest returns rest items") (is (identical? (str '(1 2 3 4)) "(1 2 3 4)") "stringification returns list") (is (not (empty? (cons 1 '()))) "cons creates non-empty list") (is (not (empty? (cons 1 nil))) "cons onto nil is list of that item") (is (= (cons 1 nil) '(1))) (is (= 1 (first (cons 1 nil)))) (is (= '() (rest (cons 1 nil)))) (is (= (cons 1 '(2 3)) '(1 2 3)) "cons returns new list prefixed with first argument") (is (not (empty? (cons 1 (list)))) "cons creates non-empty list") (is (= (cons 1 (list 2 3)) (list 1 2 3)) "cons returns new list prefixed with first argument") (is (= '(1) (conj nil 1))) (is (= '(2 1) (conj nil 1 2))) (is (= '(1) (conj '() 1))) (is (= '(2 1) (conj '() 1 2))) (is (= '(4 1 2 3) (conj '(1 2 3) 4))) (is (= [1] (conj [] 1))) (is (= [1 2] (conj [] 1 2))) (is (= ["a" "b" "c" "d"] (conj ["a" "b" "c"] "d"))) (is (= [1 2 3 4] (conj [1 2] 3 4))) (is (= [[1 2] [3 4] [5 6]] (conj [[1 2] [3 4]] [5 6]))) (is (= {:nationality "Chinese", :age 25 :firstname "John", :lastname "Doe"} (conj {:firstname "John" :lastname "Doe"} {:age 25 :nationality "Chinese"}))) ;; TODO fix this test ;; (is (= {5 6, 1 2, 3 4} (conj {1 2, 3 4} [5 6]))) (is (not (empty? (cons 1 nil))) "cons onto nil is list of that item") (is (= (cons 1 nil) '(1))) (is (= 1 (first (cons 1 nil)))) (is (= '() (rest (cons 1 nil)))) (is (= (cons 1 '(2 3)) '(1 2 3)) "cons returns new list prefixed with first argument") (is (not (empty? (cons 1 (list)))) "cons creates non-empty list") (is (= (cons 1 (list 2 3)) (list 1 2 3)) "cons returns new list prefixed with first argument") (is (= (reverse '(1 2 3 4)) '(4 3 2 1)) "reverse reverses order of items") (is (= [1 2 3 4] (reverse [4 3 2 1]))) (is (= '() (reverse nil))) (is (= [[:b 2] [:a 1]] (reverse {:a 1, :b 2}))) (is (not (empty? (list 1 2 3 4))) "non empty list returns false on empty?") (is (= (count (list 1 2 3 4)) 4) "list has expected length") (is (= (first (list 1 2 3 4)) 1) "first returns first item in the list") (is (= (rest (list 1 2 3 4)) (list 2 3 4)) "rest returns rest items") (is (identical? (str (list 1 2 3 4)) "(1 2 3 4)") "stringification returs list") (is (empty? (list)) "list without arguments creates empty list") (is (= [1 2 3] (vec '(1 2 3)))) (is (= [1 2 3] (vec [1 2 3]))) (is (= [] (vec '()))) (is (= [] (vec nil))) (is (= [\f \o \o] (vec "foo"))) (is (= [[:a 1] [:b 2]] (vec {:a 1 :b 2}))) (is (= '() (map inc nil))) (is (= '() (map inc '()))) (is (= [] (map inc []))) (is (= [] (map inc {}))) (is (= '(2 3 4) (map inc '(1 2 3)))) (is (= [2 3 4 5 6] (map inc [1 2 3 4 5]))) (is (= [(str :a 1), (str :b 2)] (map (fn [pair] (apply str pair)) {:a 1 :b 2}))) (is (= '() (filter even? nil))) (is (= '() (filter even? '()))) (is (= [] (filter even? []))) (is (= [] (filter even? {}))) (is (= [2 4] (filter even? [1 2 3 4]))) (is (= '(2 4) (filter even? '(1 2 3 4)))) (is (= [[:b 2]] (filter (fn [pair] (even? (second pair))) {:a 1 :b 2}))) (is (= (reduce (fn [result v] (+ result v)) '(1 2 3 4)) 10) "initial value is optional") (is (= (reduce (fn [result v] (+ result v)) [1 2 3 4]) 10) "initial value is optional") (is (= (reduce (fn [result v] (+ result v)) 5 '()) 5) "initial value is returned for empty list") (is (= (reduce (fn [result v] (+ result v)) 5 []) 5)) (is (= (reduce (fn [result v] (+ result v)) 5 nil) 5) "initial value is returned for empty list") (is (= (reduce (fn [result v] (+ result v)) 5 '(1)) 6) "works with single item") (is (= (reduce (fn [result v] (+ result v)) 5 [1]) 6)) (is (= (reduce (fn [result v] (+ result v)) '(5)) 5) "works with single item & no initial") (is (= (reduce (fn [result v] (+ result v)) [5]) 5)) (is (= '() (take 1 nil))) (is (= '() (take 1 '()))) (is (= [] (take 2 ""))) (is (= [] (take 2 {}))) (is (= [\f \o] (take 2 "foo"))) (is (= '(1 2) (take 2 '(1 2 3 4)))) (is (= [1 2 3] (take 3 [1 2 3 4]))) (is (= [[:a 1] [:b 2]] (take 2 {:a 1 :b 2 :c 3}))) (is (= '() (drop 1 nil) )) (is (= '() (drop 1 '()))) (is (= [] (drop 1 []))) (is (= '(1 2 3) (drop -1 '(1 2 3)))) (is (= [1 2 3 4] (drop -1 [1 2 3 4]))) (is (= '(1 2 3) (drop 0 '(1 2 3)))) (is (= [1 2 3 4] (drop 0 [1 2 3 4]))) (is (= '(3 4) (drop 2 '(1 2 3 4)))) (is (= [2 3 4] (drop 1 [1 2 3 4]))) (is (= '(1 2 3 4) (concat '(1 2) '(3 4)))) (is (= '(1 2 3 4 5) (concat '(1 2) '() '() '(3 4) '(5)))) (is (= '(1 2 3 4) (concat [1 2] [3 4]))) (is (= (list :a :b 1 [2 3] 4) (concat [:a :b] nil [1 [2 3] 4]))) (is (= (list 1 2 3 4 [:a 1] [:b 2]) (concat [1] [2] '(3 4) {:a 1, :b 2}))) (is (= (list :a :b 1 [2 3] 4) (concat [:a :b] nil [1 [2 3] 4]))) (is (= (list 1 2 3 4 5 6 7 [:a 9] [:b 10]) (concat [1] [2] '(3 4) [5 6 7] {:a 9 :b 10}))) (is (= '() (sort nil))) (is (= '() (sort (fn [a b] (> a b)) nil))) (is (= [] (sort []))) (is (= [1 2 3 4] (sort [3 1 2 4]))) (is (= [ 10, 5, 2 ] (sort (fn [a b] (> a b)) (vals {:foo 5, :bar 2, :baz 10})))) (is (= [[:c 3] [:a 2] [:b 1]] (sort (fn [a b] (> (last a) (last b))) {:b 1 :c 3 :a 2}))) (is (= '(1 2 3 4) (sort '(3 1 2 4)))) (is (= '(4 3 2 1) (sort (fn [a b] (> a b)) '(3 1 2 4)))) (is (= '("dear" "frient" "hello" "my") (sort '("hello" "my" "dear" "frient")))) (is (= [7 7 7 7] (repeat 4 7))) (is (= [] (repeat 0 7))) (is (= [] (repeat -1 7))) (is (= [7] (repeat 1 7))) (is (= {:a :b} (assoc {} :a :b))) (is (= {:a :b :c :d} (assoc {:a :b} :c :d))) (is (= {:a :c} (assoc {:a :b} :a :c))) (is (every? even? [2 4 6 8])) (is (not (every? even? [2 4 6 8 9]))) (is (every? even? '(2 4 6 8))) (is (not (every? even? '(2 4 5)))) (is (= false (some even? []))) (is (= false (some even? ()))) (is (= false (some even? [1 3 5 7]))) (is (= false (some even? '(1 3 5 7)))) (is (some even? [1 2 3])) (is (some even? '(1 2 3))) (is (= [[1 2] [3 4] [5 6] [7 8]] (partition 2 [1 2 3 4 5 6 7 8 9]))) (is (= [[1 2 3] [3 4 5] [5 6 7] [7 8 9]] (partition 3 2 [1 2 3 4 5 6 7 8 9]))) (is (= [[1 2 3 4 5] [3 4 5 6 7] [5 6 7 8 :a]] (partition 5 2 [:a :b :c :d] [1 2 3 4 5 6 7 8]))) (is (= [[1 2 3] [3 4 5] [5 6 7] [7 8 :a]] (partition 3 2 [:a :b :c :d] [1 2 3 4 5 6 7 8]))) (is (= [1 4 2 5 3 6] (interleave [1 2 3] [4 5 6]))) (is (= [1 4 2 5 3 6] (interleave [1 2 3] '(4 5 6)))) (is (= [1 4 2 5 3 6] (interleave '(1 2 3) [4 5 6]))) (is (= [1 4 2 5 3 6] (interleave [1 2 3 3.5] [4 5 6]))) (is (= [1 4 2 5 3 6] (interleave [1 2 3] [4 5 6 7]))) (is (= [] (interleave [1 2 3] []))) (is (= [] (interleave [] [4 5 6]))) (is (= [] (interleave [1 2 3] [4 5 6 7] []))) (is (= '(1 4 8) (interleave [1 2 3] [4 5 6 7] [8]))) (is (= '(1 4 8 2 5 9) (interleave [1 2 3] [4 5 6 7] [8 9]))) (is (= '(1 4 8 2 5 9 3 6 10) (interleave [1 2 3] [4 5 6 7] [8 9 10]))) (is (= '(1 4 8 2 5 9 3 6 10) (interleave [1 2 3] [4 5 6 7] [8 9 10 11]))) (is (= (nth nil 1) nil)) (is (= (nth nil 1 :not-found) :not-found)) (is (= (nth "hello" 2) \l)) (is (= (nth '(1 2 3 4) 3) 4)) (is (= (nth '(1 2 3 4) 0) 1)) (is (= (nth [1 2 3 4] 3) 4)) (is (= (nth [1 2 3 4] 4) nil)) (is (= (nth [1 2 3 4] 2) 3)) (is (= (nth [1 2 3 4] 0) 1)) (is (= (nth (seq {:foo 1 :bar 2}) 1) [:bar 2]))
wisp
5
bamboo/wisp
test/sequence.wisp
[ "BSD-3-Clause" ]
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. ' vbc /t:library /optionstrict- /vbruntime* /nowarn VBConversions.vb Option Explicit On MustInherit Class TestBase(Of TT1, TT2, TT3, TT4, TT5, TT6, TT7, TT8, TT9, TT10, TT11, TT12, TT13, TT14, TT15, TT16, TT17, TT18, TT19, TT20, TT21) #If Not SKIP Then MustOverride Sub M4(Of MT1, MT2 As Class, MT3 As MT1, MT4 As {Class, MT1}, MT5 As MT2, MT6 As {Class, MT2}, MT7, MT8 As {MT7, TT1})( a As MT1(), b As MT2(), c As MT3(), d As MT4(), e As MT5(), f As MT6(), g As MT7(), h As MT8(), i As Class8(), j As Class9(), k As Class11(), l As Class8(,), m As Class9(,), n As Class8()(), o As Class9()(), p As Interface5(), q As Structure1(), r As Integer(), s As Long(), t As Enum1(), u As Enum2(), v As Enum4(), w As System.ValueType(), x As Object() ) MustOverride Sub M5(Of MT1 As TT1, MT2 As MT1, MT3 As TT2, MT4 As TT3, MT5 As TT4, MT6 As TT5, MT7 As TT6, MT8 As TT7, MT9 As TT1, MT10 As TT8, MT11 As TT8, MT12 As Class1, MT13 As Class1, MT14, MT15 As {MT14, TT9}, MT16 As TT9, MT17 As TT9)( a As MT1(), b As MT2(), c As MT3(), d As MT4(), e As MT5(), f As MT6(), g As MT7(), h As MT8(), i As MT9(), j As Integer(), k As UInteger(), l As Enum1(), m As Structure1(), n As MT10(), o As MT11(), p As Class1(), q As MT12(), r As MT13(), s As System.ValueType(), t As MT14(), u As MT15(), v As MT16(), w As MT17() ) MustOverride Sub M7(Of _ MT1 As TT9, MT2 As TT10, MT3 As TT11, MT4 As TT12, MT5 As TT13, MT6 As TT14, MT7 As TT15, MT8 As TT16, MT9 As TT17, MT10 As TT18, MT11 As TT19, MT12 As TT15, MT13 As TT20, MT14 As TT8, MT15 As TT21)( a As MT1, b As MT2, c As MT3, d As MT4, e As MT5, f As MT6, g As MT7, h As MT8, i As MT9, j As MT10, k As MT11, l As MT12, m As MT13, n As MT14, o As Interface1, p As Object, q As System.Enum, r As Enum1, s As Enum2, t As Integer(), u As UInteger(), v As Class9(), w As Structure1, x As System.Collections.IEnumerable, y As System.Collections.Generic.IList(Of Class9), z As MT15 ) MustOverride Sub M8(Of MT1, MT2 As Class, MT3 As MT1, MT4 As {Class, MT1}, MT5 As MT2, MT6 As {Class, MT2}, MT7, MT8 As {MT7, TT1})( a As MT1, b As MT2, c As MT3, d As MT4, e As MT5, f As MT6, g As MT7, h As MT8 ) MustOverride Sub M9(Of MT1 As TT1, MT2 As MT1, MT3 As TT2, MT4 As TT3, MT5 As TT4, MT6 As TT5, MT7 As TT6, MT8 As TT7, MT9 As TT1, MT10 As TT8, MT11 As TT8, MT12 As Class1, MT13 As Class1, MT14, MT15 As {MT14, TT9}, MT16 As TT9, MT17 As TT9)( a As MT1, b As MT2, c As MT3, d As MT4, e As MT5, f As MT6, g As MT7, h As MT8, i As MT9, j As Integer, k As UInteger, l As Enum1, m As Structure1, n As MT10, o As MT11, p As Class1, q As MT12, r As MT13, s As System.ValueType, t As MT14, u As MT15, v As MT16, w As MT17 ) #End If End Class Class Test Inherits TestBase(Of Integer, UInteger, Long, Enum1, Enum2, Enum4, Enum5, Structure1, System.ValueType, System.Object, System.Enum, Enum1, Enum2, Enum4, Integer(), UInteger(), Class8(), Class9(), Class10(), Class11, Class9(,)) #If Not SKIP Then Sub M1( a As Class1, b As Class1, c As Class2, d As Class1(), e As Class1(), f As Class2(), g As Class2.Class3(Of Integer), h As Class2.Class3(Of Integer), i As Class2.Class3(Of Byte), j As Class4(Of Integer), k As Class4(Of Integer), l As Class4(Of Byte), m As Class4(Of Integer).Class5(Of Integer), n As Class4(Of Integer).Class5(Of Integer), o As Class4(Of Byte).Class5(Of Integer), p As Class4(Of Integer).Class5(Of Byte), q As Class4(Of Integer).Class6, r As Class4(Of Integer).Class6, s As Class4(Of Byte).Class6, t As Class4(Of Integer).Class6.Class7(Of Integer), u As Class4(Of Integer).Class6.Class7(Of Integer), v As Class4(Of Byte).Class6.Class7(Of Integer), w As Class4(Of Integer).Class6.Class7(Of Byte) ) ' Identity a = b 'a = c 'error BC30311: Value of type 'Class2' cannot be converted to 'Class1'. 'a = d 'error BC30311: Value of type '1-dimensional array of Class1' cannot be converted to 'Class1'. d = e 'd = f 'error BC30332: Value of type '1-dimensional array of Class2' cannot be converted to '1-dimensional array of Class1' because 'Class2' is not derived from 'Class1'. g = h 'g = i 'error BC30311: Value of type 'Class2.Class3(Of Byte)' cannot be converted to 'Class2.Class3(Of Integer)'. 'g = j 'error BC30311: Value of type 'Class4(Of Integer)' cannot be converted to 'Class2.Class3(Of Integer)'. j = k 'j = l 'error BC30311: Value of type 'Class4(Of Byte)' cannot be converted to 'Class4(Of Integer)'. m = n 'm = o 'error BC30311: Value of type 'Class4(Of Byte).Class5(Of Integer)' cannot be converted to 'Class4(Of Integer).Class5(Of Integer)'. 'm = p 'error BC30311: Value of type 'Class4(Of Integer).Class5(Of Byte)' cannot be converted to 'Class4(Of Integer).Class5(Of Integer)'. q = r 'q = s 'error BC30311: Value of type 'Class4(Of Byte).Class6' cannot be converted to 'Class4(Of Integer).Class6'. t = u 't = v 'error BC30311: Value of type 'Class4(Of Byte).Class6.Class7(Of Integer)' cannot be converted to 'Class4(Of Integer).Class6.Class7(Of Integer)'. 't = w 'error BC30311: Value of type 'Class4(Of Integer).Class6.Class7(Of Byte)' cannot be converted to 'Class4(Of Integer).Class6.Class7(Of Integer)'. End Sub Sub M2( a As Enum1, b As Enum1, c As Enum2, d As Enum3, e As Integer, f As Long, g As Short, h As Enum4 ) a = b a = c 'error BC30512: Option Strict On disallows implicit conversions from 'Enum2' to 'Enum1'. a = d 'error BC30512: Option Strict On disallows implicit conversions from 'Enum3' to 'Enum1'. a = e 'error BC30512: Option Strict On disallows implicit conversions from 'Integer' to 'Enum1'. a = f 'error BC30512: Option Strict On disallows implicit conversions from 'Long' to 'Enum1'. a = g 'error BC30512: Option Strict On disallows implicit conversions from 'Short' to 'Enum1'. a = h 'error BC30512: Option Strict On disallows implicit conversions from 'Enum4' to 'Enum1'. e = a e = c 'error BC30512: Option Strict On disallows implicit conversions from 'Enum2' to 'Integer'. e = d f = a f = c f = d g = a 'error BC30512: Option Strict On disallows implicit conversions from 'Enum1' to 'Short'. g = c 'error BC30512: Option Strict On disallows implicit conversions from 'Enum2' to 'Short'. g = d End Sub Sub M3( a As Object, b As Class8, c As Class9, d As Class10, e As Class11, f As System.Array, g As Integer(), h As Integer(,), i As Interface1, j As Interface2, k As Interface3, l As Interface4, m As Interface5, n As Interface6, o As Interface7, p As System.Collections.IEnumerable, q As System.Collections.Generic.IList(Of Integer), r As System.Collections.Generic.ICollection(Of Integer), s As System.Collections.Generic.IEnumerable(Of Integer), t As System.Collections.Generic.IList(Of Long), u As Class9(), v As System.Collections.Generic.IList(Of Class8), w As System.Collections.Generic.IList(Of Class11), x As System.Action ) '§8.8 Widening Conversions '• From a reference type to a base type. '§8.9 Narrowing Conversions '• From a reference type to a more derived type. a = a a = d b = b b = c b = d c = d d = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Class10'. c = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Class9'. d = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Class10'. d = c 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Class10'. 'c = e 'error BC30311: Value of type 'Class11' cannot be converted to 'Class9'. 'e = c 'error BC30311: Value of type 'Class9' cannot be converted to 'Class11'. a = g f = g a = h f = h g = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to '1-dimensional array of Integer'. g = f 'error BC30512: Option Strict On disallows implicit conversions from 'System.Array' to '1-dimensional array of Integer'. h = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to '2-dimensional array of Integer'. h = f 'error BC30512: Option Strict On disallows implicit conversions from 'System.Array' to '2-dimensional array of Integer'. 'Add test for Void ' void <-> void ' object <-> void '§8.8 Widening Conversions '• From a reference type to an interface type, provided that the type ' implements the interface or a variant compatible interface. '§8.9 Narrowing Conversions '• From a class type to an interface type, provided the class type does not implement ' the interface type or an interface type variant compatible with it. '• From an interface type to another interface type, provided there is no inheritance ' relationship between the two types and provided they are not variant compatible. i = d j = d k = d l = c l = d m = b m = c m = d n = d p = g p = h q = g r = g s = g v = u i = i i = j i = k i = o n = o i = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface1'. i = c 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface1'. i = e 'error BC30512: Option Strict On disallows implicit conversions from 'Class11' to 'Interface1'. 'warning BC42322: Runtime errors might occur when converting 'Class11' to 'Interface1'. j = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface2'. j = c 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface2'. k = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface3'. k = c 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface3'. l = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface4'. n = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface6'. n = c 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface6'. o = b 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'Interface7'. o = c 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'Interface7'. o = d 'error BC30512: Option Strict On disallows implicit conversions from 'Class10' to 'Interface7'. 'q = h 'error BC30311: Value of type '2-dimensional array of Integer' cannot be converted to 'System.Collections.Generic.IList(Of Integer)'. 'r = h 'error BC30311: Value of type '2-dimensional array of Integer' cannot be converted to 'System.Collections.Generic.ICollection(Of Integer)'. 's = h 'error BC30311: Value of type '2-dimensional array of Integer' cannot be converted to 'System.Collections.Generic.IEnumerable(Of Integer)'. t = g 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to 'System.Collections.Generic.IList(Of Long)'. w = u 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class9' to 'System.Collections.Generic.IList(Of Class11)'. i = l 'error BC30512: Option Strict On disallows implicit conversions from 'Interface4' to 'Interface1'. o = x 'error BC30512: Option Strict On disallows implicit conversions from 'System.Action' to 'Interface7'. 'warning BC42322: Runtime errors might occur when converting 'System.Action' to 'Interface7'. '§8.8 Widening Conversions '• From an interface type to Object. '§8.9 Narrowing Conversions '• From an interface type to a class type. a = o x = o 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'System.Action'. 'warning BC42322: Runtime errors might occur when converting 'Interface7' to 'System.Action'. e = o 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'Class11'. 'warning BC42322: Runtime errors might occur when converting 'Interface7' to 'Class11'. 'g = o 'error BC30311: Value of type 'Interface7' cannot be converted to '1-dimensional array of Integer'. 'h = o 'error BC30311: Value of type 'Interface7' cannot be converted to '2-dimensional array of Integer'. 'u = o 'error BC30311: Value of type 'Interface7' cannot be converted to '1-dimensional array of Class9'. g = p 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.IEnumerable' to '1-dimensional array of Integer'. h = p 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.IEnumerable' to '2-dimensional array of Integer'. g = q 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Integer)' to '1-dimensional array of Integer'. 'h = q 'error BC30311: Value of type 'System.Collections.Generic.IList(Of Integer)' cannot be converted to '2-dimensional array of Integer'. g = t 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Long)' to '1-dimensional array of Integer'. 'h = t 'error BC30311: Value of type 'System.Collections.Generic.IList(Of Long)' cannot be converted to '2-dimensional array of Integer'. g = w 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class11)' to '1-dimensional array of Integer'. 'h = w 'error BC30311: Value of type 'System.Collections.Generic.IList(Of Class11)' cannot be converted to '2-dimensional array of Integer'. 'Add tests for Module2 ' Module2 <-> Interface ' Module2 <-> Object '§8.8 Widening Conversions '• From an interface type to a variant compatible interface type. '• From a delegate type to a variant compatible delegate type. End Sub Overrides Sub M4(Of MT1, MT2 As Class, MT3 As MT1, MT4 As {Class, MT1}, MT5 As MT2, MT6 As {Class, MT2}, MT7, MT8 As {MT7, Integer})( a As MT1(), b As MT2(), c As MT3(), d As MT4(), e As MT5(), f As MT6(), g As MT7(), h As MT8(), i As Class8(), j As Class9(), k As Class11(), l As Class8(,), m As Class9(,), n As Class8()(), o As Class9()(), p As Interface5(), q As Structure1(), r As Integer(), s As Long(), t As Enum1(), u As Enum2(), v As Enum4(), w As System.ValueType(), x As Object() ) '§8.8 Widening Conversions '• From an array type S with an element type SE to an array type T with an element type TE, provided all of the following are true: ' • S and T differ only in element type. ' • Both SE and TE are reference types or are type parameters known to be a reference type. ' • A widening reference, array, or type parameter conversion exists from SE to TE. '§8.9 Narrowing Conversions '• From an array type S with an element type SE, to an array type T with an element type TE, ' provided that all of the following are true: ' • S and T differ only in element type. ' • Both SE and TE are reference types or are type parameters not known to be value types. ' • A narrowing reference, array, or type parameter conversion exists from SE to TE. a = a l = l n = n a = d b = f i = j i = k l = m n = o p = i x = i x = w a = c 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT3' to '1-dimensional array of MT1'. c = a 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT3'. d = a 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT4'. b = e 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT5' to '1-dimensional array of MT2'. e = b 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT2' to '1-dimensional array of MT5'. f = b 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT2' to '1-dimensional array of MT6'. g = h 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT8' to '1-dimensional array of MT7'. h = g 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT7' to '1-dimensional array of MT8'. j = i 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class8' to '1-dimensional array of Class9'. k = i 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class8' to '1-dimensional array of Class11'. m = l 'error BC30512: Option Strict On disallows implicit conversions from '2-dimensional array of Class8' to '2-dimensional array of Class9'. o = n 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of 1-dimensional array of Class8' to '1-dimensional array of 1-dimensional array of Class9'. i = p 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Interface5' to '1-dimensional array of Class8'. i = x 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Object' to '1-dimensional array of Class8'. w = x 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Object' to '1-dimensional array of System.ValueType'. 'a = b 'error BC30332: Value of type '1-dimensional array of MT2' cannot be converted to '1-dimensional array of MT1' because 'MT2' is not derived from 'MT1'. 'b = a 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT2' because 'MT1' is not derived from 'MT2'. 'b = d 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of MT2' because 'MT4' is not derived from 'MT2'. 'd = b 'error BC30332: Value of type '1-dimensional array of MT2' cannot be converted to '1-dimensional array of MT4' because 'MT2' is not derived from 'MT4'. 'a = g 'error BC30332: Value of type '1-dimensional array of MT7' cannot be converted to '1-dimensional array of MT1' because 'MT7' is not derived from 'MT1'. 'g = a 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT7' because 'MT1' is not derived from 'MT7'. 'j = k 'error BC30332: Value of type '1-dimensional array of Class11' cannot be converted to '1-dimensional array of Class9' because 'Class11' is not derived from 'Class9'. 'i = l 'error BC30414: Value of type '2-dimensional array of Class8' cannot be converted to '1-dimensional array of Class8' because the array types have different numbers of dimensions. 'l = i 'error BC30414: Value of type '1-dimensional array of Class8' cannot be converted to '2-dimensional array of Class8' because the array types have different numbers of dimensions. 'l = n 'error BC30332: Value of type '1-dimensional array of 1-dimensional array of Class8' cannot be converted to '2-dimensional array of Class8' because '1-dimensional array of Class8' is not derived from 'Class8'. 'n = l 'error BC30332: Value of type '2-dimensional array of Class8' cannot be converted to '1-dimensional array of 1-dimensional array of Class8' because 'Class8' is not derived from '1-dimensional array of Class8'. 'p = q 'error BC30332: Value of type '1-dimensional array of Structure1' cannot be converted to '1-dimensional array of Interface5' because 'Structure1' is not derived from 'Interface5'. 'q = p 'error BC30332: Value of type '1-dimensional array of Interface5' cannot be converted to '1-dimensional array of Structure1' because 'Interface5' is not derived from 'Structure1'. 'q = w 'error BC30332: Value of type '1-dimensional array of System.ValueType' cannot be converted to '1-dimensional array of Structure1' because 'System.ValueType' is not derived from 'Structure1'. 'w = q 'error BC30333: Value of type '1-dimensional array of Structure1' cannot be converted to '1-dimensional array of System.ValueType' because 'Structure1' is not a reference type. '§8.8 Widening Conversions '• From an array type S with an enumerated element type SE to an array type T with an element type TE, ' provided all of the following are true: ' • S and T differ only in element type. ' • TE is the underlying type of SE. '§8.9 Narrowing Conversions '• From an array type S with an element type SE to an array type T with an enumerated element type TE, ' provided all of the following are true: ' • S and T differ only in element type. ' • SE is the underlying type of TE. r = t s = u t = r 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to '1-dimensional array of Enum1'. u = s 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Long' to '1-dimensional array of Enum2'. t = v 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum4' to '1-dimensional array of Enum1'. v = t 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum1' to '1-dimensional array of Enum4'. 'r = s 'error BC30332: Value of type '1-dimensional array of Long' cannot be converted to '1-dimensional array of Integer' because 'Long' is not derived from 'Integer'. 's = r 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of Long' because 'Integer' is not derived from 'Long'. 'r = u 'error BC30332: Value of type '1-dimensional array of Enum2' cannot be converted to '1-dimensional array of Integer' because 'Enum2' is not derived from 'Integer'. 'u = r 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of Enum2' because 'Integer' is not derived from 'Enum2'. 't = u 'error BC30332: Value of type '1-dimensional array of Enum2' cannot be converted to '1-dimensional array of Enum1' because 'Enum2' is not derived from 'Enum1'. 'u = t 'error BC30332: Value of type '1-dimensional array of Enum1' cannot be converted to '1-dimensional array of Enum2' because 'Enum1' is not derived from 'Enum2'. End Sub Public Overloads Overrides Sub M5(Of _ MT1 As Integer, MT2 As MT1, MT3 As UInteger, MT4 As Long, MT5 As Enum1, MT6 As Enum2, MT7 As Enum4, MT8 As Enum5, MT9 As Integer, MT10 As Structure1, MT11 As Structure1, MT12 As Class1, MT13 As Class1, MT14, MT15 As {MT14, System.ValueType}, MT16 As System.ValueType, MT17 As System.ValueType)( a() As MT1, b() As MT2, c() As MT3, d() As MT4, e() As MT5, f() As MT6, g() As MT7, h() As MT8, i() As MT9, j As Integer(), k As UInteger(), l As Enum1(), m As Structure1(), n As MT10(), o As MT11(), p As Class1(), q As MT12(), r As MT13(), s As System.ValueType(), t As MT14(), u As MT15(), v As MT16(), w As MT17() ) a = b b = a ' error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT2'. j = a j = e l = e a = e 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT5' to '1-dimensional array of MT1'. e = a 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of MT5'. e = g 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT7' to '1-dimensional array of MT5'. g = e 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT5' to '1-dimensional array of MT7'. a = j 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to '1-dimensional array of MT1'. a = l 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum1' to '1-dimensional array of MT1'. l = a 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT1' to '1-dimensional array of Enum1'. e = j 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to '1-dimensional array of MT5'. e = l 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Enum1' to '1-dimensional array of MT5'. 'a = i 'error BC30332: Value of type '1-dimensional array of MT9' cannot be converted to '1-dimensional array of MT1' because 'MT9' is not derived from 'MT1'. 'a = c 'error BC30332: Value of type '1-dimensional array of MT3' cannot be converted to '1-dimensional array of MT1' because 'MT3' is not derived from 'MT1'. 'c = a 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT3' because 'MT1' is not derived from 'MT3'. 'a = d 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of MT1' because 'MT4' is not derived from 'MT1'. 'd = a 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT4' because 'MT1' is not derived from 'MT4'. 'a = f 'error BC30332: Value of type '1-dimensional array of MT6' cannot be converted to '1-dimensional array of MT1' because 'MT6' is not derived from 'MT1'. 'f = a 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT6' because 'MT1' is not derived from 'MT6'. 'a = h 'error BC30332: Value of type '1-dimensional array of MT8' cannot be converted to '1-dimensional array of MT1' because 'MT8' is not derived from 'MT1'. 'h = a 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of MT8' because 'MT1' is not derived from 'MT8'. 'e = f 'error BC30332: Value of type '1-dimensional array of MT6' cannot be converted to '1-dimensional array of MT5' because 'MT6' is not derived from 'MT5'. 'f = e 'error BC30332: Value of type '1-dimensional array of MT5' cannot be converted to '1-dimensional array of MT6' because 'MT5' is not derived from 'MT6'. 'e = h 'error BC30332: Value of type '1-dimensional array of MT8' cannot be converted to '1-dimensional array of MT5' because 'MT8' is not derived from 'MT5'. 'h = e 'error BC30332: Value of type '1-dimensional array of MT5' cannot be converted to '1-dimensional array of MT8' because 'MT5' is not derived from 'MT8'. 'a = k 'error BC30332: Value of type '1-dimensional array of UInteger' cannot be converted to '1-dimensional array of MT1' because 'UInteger' is not derived from 'MT1'. 'k = a 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of UInteger' because 'MT1' is not derived from 'UInteger'. 'e = k 'error BC30332: Value of type '1-dimensional array of UInteger' cannot be converted to '1-dimensional array of MT5' because 'UInteger' is not derived from 'MT5'. 'k = e 'error BC30332: Value of type '1-dimensional array of MT5' cannot be converted to '1-dimensional array of UInteger' because 'MT5' is not derived from 'UInteger'. 'j = k 'error BC30332: Value of type '1-dimensional array of UInteger' cannot be converted to '1-dimensional array of Integer' because 'UInteger' is not derived from 'Integer'. 'k = j 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of UInteger' because 'Integer' is not derived from 'UInteger'. m = n p = q n = m 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Structure1' to '1-dimensional array of MT10'. q = p 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class1' to '1-dimensional array of MT12'. s = u 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT15' to '1-dimensional array of System.ValueType'. u = s 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of System.ValueType' to '1-dimensional array of MT15'. t = u 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT15' to '1-dimensional array of MT14'. u = t 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT14' to '1-dimensional array of MT15'. s = v 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of MT16' to '1-dimensional array of System.ValueType'. v = s 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of System.ValueType' to '1-dimensional array of MT16'. 'n = o 'error BC30332: Value of type '1-dimensional array of MT11' cannot be converted to '1-dimensional array of MT10' because 'MT11' is not derived from 'MT10'. 'o = n 'error BC30332: Value of type '1-dimensional array of MT10' cannot be converted to '1-dimensional array of MT11' because 'MT10' is not derived from 'MT11'. 'q = r 'error BC30332: Value of type '1-dimensional array of MT13' cannot be converted to '1-dimensional array of MT12' because 'MT13' is not derived from 'MT12'. 'r = q 'error BC30332: Value of type '1-dimensional array of MT12' cannot be converted to '1-dimensional array of MT13' because 'MT12' is not derived from 'MT13'. 'v = w 'error BC30332: Value of type '1-dimensional array of MT17' cannot be converted to '1-dimensional array of MT16' because 'MT17' is not derived from 'MT16'. 'w = v 'error BC30332: Value of type '1-dimensional array of MT16' cannot be converted to '1-dimensional array of MT17' because 'MT16' is not derived from 'MT17'. End Sub Sub M6(Of _ MT1, MT2 As Structure, MT3 As Class, MT4 As Interface3, MT5 As Interface3, MT6 As {Class, Interface3}, MT7 As {Class, Interface3}, MT8 As Class10, MT9 As Class12, MT10 As MT1, MT11 As MT10, MT12 As Class9, MT13 As MT12, MT14 As MT1)( a As Object, b As MT1, c As MT2, d As MT3, e As Interface3, f As MT4, g As MT5, h As MT6, i As MT7, j As Interface1, k As MT8, l As Class10, m As Class8, n As Class12, o As MT9, p As System.ValueType, q As MT10, r As MT11, s As MT13, t As Class9, u As Interface7, v As MT14 ) '§8.8 Widening Conversions '• From a type parameter to Object. '§8.9 Narrowing Conversions '• From Object to a type parameter. a = b a = c a = d b = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT1'. c = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT2'. d = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT3'. '§8.8 Widening Conversions '• From a type parameter to an interface type constraint or any interface variant compatible with an interface type constraint. e = f e = h f = e 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'MT4'. h = e 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'MT6'. 'f = g 'error BC30311: Value of type 'MT5' cannot be converted to 'MT4'. 'g = f 'error BC30311: Value of type 'MT4' cannot be converted to 'MT5'. 'h = i 'error BC30311: Value of type 'MT7' cannot be converted to 'MT6'. 'i = h 'error BC30311: Value of type 'MT6' cannot be converted to 'MT7'. '§8.8 Widening Conversions '• From a type parameter to an interface implemented by a class constraint. e = k j = k j = f k = e 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'MT8'. k = j 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT8'. f = j 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT4'. '§8.8 Widening Conversions '• From a type parameter to an interface variant compatible with an interface implemented by a class constraint. '§8.8 Widening Conversions '• From a type parameter to a class constraint, or a base type of the class constraint. '§8.9 Narrowing Conversions '• From a class constraint, or a base type of the class constraint to a type parameter. l = k m = k p = c k = l 'error BC30512: Option Strict On disallows implicit conversions from 'Class10' to 'MT8'. k = m 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'MT8'. c = p 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'MT2'. 'n = k 'error BC30311: Value of type 'MT8' cannot be converted to 'Class12'. 'k = n 'error BC30311: Value of type 'Class12' cannot be converted to 'MT8'. 'k = o 'error BC30311: Value of type 'MT9' cannot be converted to 'MT8'. 'o = k 'error BC30311: Value of type 'MT8' cannot be converted to 'MT9'. '§8.8 Widening Conversions '• From a type parameter T to a type parameter constraint TX, or anything TX has a widening conversion to. '§8.9 Narrowing Conversions '• From a type parameter constraint TX to a type parameter T, or from anything that has narrowing conversion to TX. b = q b = r t = s m = s q = b 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT10'. r = b 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT11'. s = t 'error BC30512: Option Strict On disallows implicit conversions from 'Class9' to 'MT13'. s = m 'error BC30512: Option Strict On disallows implicit conversions from 'Class8' to 'MT13'. 'l = s 'error BC30311: Value of type 'MT13' cannot be converted to 'Class10'. 's = l 'error BC30311: Value of type 'Class10' cannot be converted to 'MT13'. '§8.9 Narrowing Conversions '• From a type parameter to an interface type, provided the type parameter is not constrained ' to that interface or constrained to a class that implements that interface. u = k 'error BC30512: Option Strict On disallows implicit conversions from 'MT8' to 'Interface7'. k = u 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT8'. u = f 'error BC30512: Option Strict On disallows implicit conversions from 'MT4' to 'Interface7'. f = u 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT4'. 'TODO: Test with explicit structure constraint or a sealed class constraint '§8.9 Narrowing Conversions '• From an interface type to a type parameter. u = b 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'Interface7'. b = u 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT1'. u = c 'error BC30512: Option Strict On disallows implicit conversions from 'MT2' to 'Interface7'. c = u 'error BC30512: Option Strict On disallows implicit conversions from 'Interface7' to 'MT2'. ' Misc 'v = q 'error BC30311: Value of type 'MT10' cannot be converted to 'MT14'. 'q = v 'error BC30311: Value of type 'MT14' cannot be converted to 'MT10'. End Sub Public Overrides Sub M7( Of MT1 As System.ValueType, MT2 As Object, MT3 As System.Enum, MT4 As Enum1, MT5 As Enum2, MT6 As Enum4, MT7 As Integer(), MT8 As UInteger(), MT9 As Class8(), MT10 As Class9(), MT11 As Class10(), MT12 As Integer(), MT13 As Class11, MT14 As Structure1, MT15 As Class9(,))( a As MT1, b As MT2, c As MT3, d As MT4, e As MT5, f As MT6, g As MT7, h As MT8, i As MT9, j As MT10, k As MT11, l As MT12, m As MT13, n As MT14, o As Interface1, p As Object, q As System.Enum, r As Enum1, s As Enum2, t As Integer(), u As UInteger(), v As Class9(), w As Structure1, x As System.Collections.IEnumerable, y As System.Collections.Generic.IList(Of Class9), z As MT15 ) p = a p = b q = c q = d r = d t = g v = j v = k w = n x = i y = j y = k a = p 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT1'. b = p 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'MT2'. c = q 'error BC30512: Option Strict On disallows implicit conversions from 'System.Enum' to 'MT3'. d = q 'error BC30512: Option Strict On disallows implicit conversions from 'System.Enum' to 'MT4'. d = r 'error BC30512: Option Strict On disallows implicit conversions from 'Enum1' to 'MT4'. g = t 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Integer' to 'MT7'. j = v 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class9' to 'MT10'. k = v 'error BC30512: Option Strict On disallows implicit conversions from '1-dimensional array of Class9' to 'MT11'. n = w 'error BC30512: Option Strict On disallows implicit conversions from 'Structure1' to 'MT14'. i = x 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.IEnumerable' to 'MT9'. y = i 'error BC30512: Option Strict On disallows implicit conversions from 'MT9' to 'System.Collections.Generic.IList(Of Class9)'. i = y 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT9'. j = y 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT10' k = y 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT11' y = z 'error BC30512: Option Strict On disallows implicit conversions from 'MT15' to 'System.Collections.Generic.IList(Of Class9)' z = y 'error BC30512: Option Strict On disallows implicit conversions from 'System.Collections.Generic.IList(Of Class9)' to 'MT15' n = o 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT14'. o = n 'error BC30512: Option Strict On disallows implicit conversions from 'MT14' to 'Interface1'. m = o 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT13'. o = m 'error BC30512: Option Strict On disallows implicit conversions from 'MT13' to 'Interface1'. d = o 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'MT4'. o = d 'error BC30512: Option Strict On disallows implicit conversions from 'MT4' to 'Interface1'. 'r = e 'error BC30311: Value of type 'MT5' cannot be converted to 'Enum1'. 'e = r 'error BC30311: Value of type 'Enum1' cannot be converted to 'MT5'. 's = d 'error BC30311: Value of type 'MT4' cannot be converted to 'Enum2'. 'd = s 'error BC30311: Value of type 'Enum2' cannot be converted to 'MT4'. 'r = f 'error BC30311: Value of type 'MT6' cannot be converted to 'Enum1'. 'f = r 'error BC30311: Value of type 'Enum1' cannot be converted to 'MT6'. 't = h 'error BC30311: Value of type 'MT8' cannot be converted to '1-dimensional array of Integer'. 'h = t 'error BC30311: Value of type '1-dimensional array of Integer' cannot be converted to 'MT8'. 'v = i 'error BC30311: Value of type 'MT9' cannot be converted to '1-dimensional array of Class9'. 'i = v 'error BC30311: Value of type '1-dimensional array of Class9' cannot be converted to 'MT9'. 'a = b 'error BC30311: Value of type 'MT2' cannot be converted to 'MT1'. 'b = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT2'. 'g = h 'error BC30311: Value of type 'MT8' cannot be converted to 'MT7'. 'h = g 'error BC30311: Value of type 'MT7' cannot be converted to 'MT8'. 'g = l 'error BC30311: Value of type 'MT12' cannot be converted to 'MT7'. 'l = g 'error BC30311: Value of type 'MT7' cannot be converted to 'MT12'. 'c = d 'error BC30311: Value of type 'MT4' cannot be converted to 'MT3'. 'd = c 'error BC30311: Value of type 'MT3' cannot be converted to 'MT4'. 'i = j 'error BC30311: Value of type 'MT10' cannot be converted to 'MT9'. 'j = i 'error BC30311: Value of type 'MT9' cannot be converted to 'MT10'. 'a = n 'error BC30311: Value of type 'MT14' cannot be converted to 'MT1'. 'n = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT14'. 'd = f 'error BC30311: Value of type 'MT6' cannot be converted to 'MT4'. 'f = d 'error BC30311: Value of type 'MT4' cannot be converted to 'MT6'. End Sub Public Overrides Sub M8(Of _ MT1, MT2 As Class, MT3 As MT1, MT4 As {Class, MT1}, MT5 As MT2, MT6 As {Class, MT2}, MT7, MT8 As {MT7, Integer})( a As MT1, b As MT2, c As MT3, d As MT4, e As MT5, f As MT6, g As MT7, h As MT8 ) a = a a = d b = f a = c b = e g = h c = a 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT3'. d = a 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT4'. e = b 'error BC30512: Option Strict On disallows implicit conversions from 'MT2' to 'MT5'. f = b 'error BC30512: Option Strict On disallows implicit conversions from 'MT2' to 'MT6'. h = g 'error BC30512: Option Strict On disallows implicit conversions from 'MT7' to 'MT8'. 'a = b 'error BC30311: Value of type 'MT2' cannot be converted to 'MT1'. 'b = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT2'. 'b = d 'error BC30311: Value of type 'MT4' cannot be converted to 'MT2'. 'd = b 'error BC30311: Value of type 'MT2' cannot be converted to 'MT4'. 'a = g 'error BC30311: Value of type 'MT7' cannot be converted to 'MT1'. 'g = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT7'. End Sub Public Overrides Sub M9(Of MT1 As Integer, MT2 As MT1, MT3 As UInteger, MT4 As Long, MT5 As Enum1, MT6 As Enum2, MT7 As Enum4, MT8 As Enum5, MT9 As Integer, MT10 As Structure1, MT11 As Structure1, MT12 As Class1, MT13 As Class1, MT14, MT15 As {MT14, System.ValueType}, MT16 As System.ValueType, MT17 As System.ValueType)(a As MT1, b As MT2, c As MT3, d As MT4, e As MT5, f As MT6, g As MT7, h As MT8, i As MT9, j As Integer, k As UInteger, l As Enum1, m As Structure1, n As MT10, o As MT11, p As Class1, q As MT12, r As MT13, s As System.ValueType, t As MT14, u As MT15, v As MT16, w As MT17) a = b j = a j = e l = e m = n p = q s = u t = u s = v b = a 'error BC30512: Option Strict On disallows implicit conversions from 'MT1' to 'MT2'. a = j 'error BC30512: Option Strict On disallows implicit conversions from 'Integer' to 'MT1'. e = j 'error BC30512: Option Strict On disallows implicit conversions from 'Integer' to 'MT5'. e = l 'error BC30512: Option Strict On disallows implicit conversions from 'Enum1' to 'MT5'. n = m 'error BC30512: Option Strict On disallows implicit conversions from 'Structure1' to 'MT10'. q = p 'error BC30512: Option Strict On disallows implicit conversions from 'Class1' to 'MT12'. u = s 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'MT15'. u = t 'error BC30512: Option Strict On disallows implicit conversions from 'MT14' to 'MT15'. v = s 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'MT16'. 'a = e 'error BC30311: Value of type 'MT5' cannot be converted to 'MT1'. 'e = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT5'. 'e = g 'error BC30311: Value of type 'MT7' cannot be converted to 'MT5'. 'g = e 'error BC30311: Value of type 'MT5' cannot be converted to 'MT7'. 'a = l 'error BC30311: Value of type 'Enum1' cannot be converted to 'MT1'. 'l = a 'error BC30311: Value of type 'MT1' cannot be converted to 'Enum1'. 'a = i 'error BC30311: Value of type 'MT9' cannot be converted to 'MT1'. 'a = c 'error BC30311: Value of type 'MT3' cannot be converted to 'MT1'. 'c = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT3'. 'a = d 'error BC30311: Value of type 'MT4' cannot be converted to 'MT1'. 'd = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT4'. 'a = f 'error BC30311: Value of type 'MT6' cannot be converted to 'MT1'. 'f = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT6'. 'a = h 'error BC30311: Value of type 'MT8' cannot be converted to 'MT1'. 'h = a 'error BC30311: Value of type 'MT1' cannot be converted to 'MT8'. 'e = f 'error BC30311: Value of type 'MT6' cannot be converted to 'MT5'. 'f = e 'error BC30311: Value of type 'MT5' cannot be converted to 'MT6'. 'e = h 'error BC30311: Value of type 'MT8' cannot be converted to 'MT5'. 'h = e 'error BC30311: Value of type 'MT5' cannot be converted to 'MT8'. 'a = k 'error BC30311: Value of type 'UInteger' cannot be converted to 'MT1'. 'k = a 'error BC30311: Value of type 'MT1' cannot be converted to 'UInteger'. 'e = k 'error BC30311: Value of type 'UInteger' cannot be converted to 'MT5'. 'k = e 'error BC30311: Value of type 'MT5' cannot be converted to 'UInteger'. 'n = o 'error BC30311: Value of type 'MT11' cannot be converted to 'MT10'. 'o = n 'error BC30311: Value of type 'MT10' cannot be converted to 'MT11'. 'q = r 'error BC30311: Value of type 'MT13' cannot be converted to 'MT12'. 'r = q 'error BC30311: Value of type 'MT12' cannot be converted to 'MT13'. 'v = w 'error BC30311: Value of type 'MT17' cannot be converted to 'MT16'. 'w = v 'error BC30311: Value of type 'MT16' cannot be converted to 'MT17'. End Sub Sub M10( a As Object, b As System.ValueType, c As System.Enum, d As Interface1, e As Interface7, f As Structure2, g As Structure1, h As Enum1, i As Interface3 ) '§8.8 Widening Conversions '• From a value type to a base type. '• From a value type to an interface type that the type implements. '§8.9 Narrowing Conversions '• From a reference type to a more derived value type. '• From an interface type to a value type, provided the value type implements the interface type. a = f b = f a = h b = h c = h d = f i = f f = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Structure2'. f = b 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'Structure2'. h = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Enum1'. h = b 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'Enum1'. h = c 'error BC30512: Option Strict On disallows implicit conversions from 'System.Enum' to 'Enum1'. f = d 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'Structure2'. f = i 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'Structure2'. 'c = f 'error BC30311: Value of type 'Structure2' cannot be converted to 'System.Enum'. 'f = c 'error BC30311: Value of type 'System.Enum' cannot be converted to 'Structure2'. 'd = h 'error BC30311: Value of type 'Enum1' cannot be converted to 'Interface1'. 'h = d 'error BC30311: Value of type 'Interface1' cannot be converted to 'Enum1'. 'e = f 'error BC30311: Value of type 'Structure2' cannot be converted to 'Interface7'. 'f = e 'error BC30311: Value of type 'Interface7' cannot be converted to 'Structure2'. 'f = g 'error BC30311: Value of type 'Structure1' cannot be converted to 'Structure2'. 'g = f 'error BC30311: Value of type 'Structure2' cannot be converted to 'Structure1'. 'f = h 'error BC30311: Value of type 'Enum1' cannot be converted to 'Structure2'. 'h = f 'error BC30311: Value of type 'Structure2' cannot be converted to 'Enum1'. End Sub Sub M11( a As Object, b As ValueType, c As Structure2, d As Structure2?, e As Interface1, f As Interface3, g As Interface7, h As Integer, i As Integer?, j As Long, k As Long? ) '§8.8 Widening Conversions '• From a type T to the type T?. '• From a type T? to a type S?, where there is a widening conversion from the type T to the type S. '• From a type T to a type S?, where there is a widening conversion from the type T to the type S. '• From a type T? to an interface type that the type T implements. '§8.9 Narrowing Conversions '• From a type T? to a type T. '• From a type T? to a type S?, where there is a narrowing conversion from the type T to the type S. '• From a type T to a type S?, where there is a narrowing conversion from the type T to the type S. '• From a type S? to a type T, where there is a conversion from the type S to the type T. d = d a = d b = d d = c e = d f = d i = h k = i d = a 'error BC30512: Option Strict On disallows implicit conversions from 'Object' to 'Structure2?'. d = b 'error BC30512: Option Strict On disallows implicit conversions from 'System.ValueType' to 'Structure2?'. c = d 'error BC30512: Option Strict On disallows implicit conversions from 'Structure2?' to 'Structure2'. d = e 'error BC30512: Option Strict On disallows implicit conversions from 'Interface1' to 'Structure2?'. d = f 'error BC30512: Option Strict On disallows implicit conversions from 'Interface3' to 'Structure2?'. h = i 'error BC30512: Option Strict On disallows implicit conversions from 'Integer?' to 'Integer'. i = k 'error BC30512: Option Strict On disallows implicit conversions from 'Long?' to 'Integer?'. i = j 'error BC30512: Option Strict On disallows implicit conversions from 'Long' to 'Integer?'. j = i 'error BC30512: Option Strict On disallows implicit conversions from 'Integer?' to 'Long'. 'c = i 'error BC30311: Value of type 'Integer?' cannot be converted to 'Structure2'. 'i = c 'error BC30311: Value of type 'Structure2' cannot be converted to 'Integer?'. 'd = h 'error BC30311: Value of type 'Integer' cannot be converted to 'Structure2?'. 'h = d 'error BC30311: Value of type 'Structure2?' cannot be converted to 'Integer'. 'd = i 'error BC30311: Value of type 'Integer?' cannot be converted to 'Structure2?'. 'i = d 'error BC30311: Value of type 'Structure2?' cannot be converted to 'Integer?'. End Sub Sub M12( a As String, b As Char, c As Char() ) '§8.8 Widening Conversions '• From Char() to String. '§8.9 Narrowing Conversions '• From String to Char(). a = b a = c b = a 'error BC30512: Option Strict On disallows implicit conversions from 'String' to 'Char'. c = a 'error BC30512: Option Strict On disallows implicit conversions from 'String' to '1-dimensional array of Char'. 'b = c 'error BC30311: Value of type '1-dimensional array of Char' cannot be converted to 'Char'. 'c = b 'error BC30311: Value of type 'Char' cannot be converted to '1-dimensional array of Char'. End Sub #End If Sub M13(Of MT1, MT2, MT3 As MT1, MT4 As Class, MT5 As Class8, MT6 As Class9, MT7 As Class12, MT8 As {Class8, MT6})( a As Object, b As ValueType, c As Integer, d As Long, e As Enum1, f As Enum2, g As Enum4, h As Class8(), i As Class9(), j As Class11(), k As MT1, l As MT2, m As MT3, n As MT1(), o As MT2(), p As MT2(,), q As MT4, r As MT5, s As MT6, t As MT7, u As Integer(), v As MT4(), w As MT8 ) a = DirectCast(b, Object) a = DirectCast(c, Object) b = DirectCast(a, ValueType) b = DirectCast(c, ValueType) c = DirectCast(a, Integer) c = DirectCast(b, Integer) c = DirectCast(c, Integer) 'c = DirectCast(d, Integer) 'error BC30311: Value of type 'Long' cannot be converted to 'Integer'. c = DirectCast(e, Integer) d = DirectCast(d, Long) 'd = DirectCast(c, Long) 'error BC30311: Value of type 'Integer' cannot be converted to 'Long'. e = DirectCast(e, Enum1) 'e = DirectCast(f, Enum1) 'error BC30311: Value of type 'Enum2' cannot be converted to 'Enum1'. e = DirectCast(g, Enum1) f = DirectCast(f, Enum2) 'f = DirectCast(g, Enum2) ' error BC30311: Value of type 'Enum4' cannot be converted to 'Enum2'. h = DirectCast(i, Class8()) i = DirectCast(h, Class9()) 'i = DirectCast(j, Class9()) ' error BC30332: Value of type '1-dimensional array of Class11' cannot be converted to '1-dimensional array of Class9' because 'Class11' is not derived from 'Class9'. k = DirectCast(k, MT1) 'k = DirectCast(l, MT1) ' error BC30311: Value of type 'MT2' cannot be converted to 'MT1'. k = DirectCast(m, MT1) 'k = DirectCast(q, MT1) ' error BC30311: Value of type 'MT4' cannot be converted to 'MT1'. 'l = DirectCast(k, MT2) ' Value of type 'MT1' cannot be converted to 'MT2'. m = DirectCast(k, MT3) 'n = DirectCast(o, MT1()) ' Value of type '1-dimensional array of MT2' cannot be converted to '1-dimensional array of MT1' because 'MT2' is not derived from 'MT1'. 'n = DirectCast(p, MT1()) ' error BC30332: Value of type '2-dimensional array of MT2' cannot be converted to '1-dimensional array of MT1' because 'MT2' is not derived from 'MT1'. 'n = DirectCast(u, MT1()) ' error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of MT1' because 'Integer' is not derived from 'MT1'. 'q = DirectCast(k, MT4) ' error BC30311: Value of type 'MT1' cannot be converted to 'MT4'. 'q = DirectCast(b, MT4) ' error BC30311: Value of type 'System.ValueType' cannot be converted 'q = DirectCast(c, MT4) ' error BC30311: Value of type 'Integer' cannot be converted to 'MT4' 'r = DirectCast(s, MT5) ' error BC30311: Value of type 'MT6' cannot be converted to 'MT5'. 'r = DirectCast(t, MT5) ' error BC30311: Value of type 'MT7' cannot be converted to 'MT5'. 'r = DirectCast(w, MT5) ' error BC30311: Value of type 'MT8' cannot be converted to 'MT5'. 's = DirectCast(r, MT6) ' error BC30311: Value of type 'MT5' cannot be converted to 'MT6'. 's = DirectCast(t, MT6) ' error BC30311: Value of type 'MT7' cannot be converted to 'MT6'. s = DirectCast(w, MT6) 't = DirectCast(r, MT7) ' error BC30311: Value of type 'MT5' cannot be converted to 'MT7'. 't = DirectCast(s, MT7) ' error BC30311: Value of type 'MT6' cannot be converted to 'MT7'. 't = DirectCast(w, MT7) ' error BC30311: Value of type 'MT8' cannot be converted to 'MT7'. 'u = DirectCast(n, Integer()) 'error BC30332: Value of type '1-dimensional array of MT1' cannot be converted to '1-dimensional array of Integer' because 'MT1' is not derived from 'Integer'. 'u = DirectCast(v, Integer()) 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of Integer' because 'MT4' is not derived from 'Integer'. 'v = DirectCast(u, MT4()) 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of MT4' because 'Integer' is not derived from 'MT4'. a = DirectCast(Nothing, Object) b = DirectCast(Nothing, ValueType) c = DirectCast(Nothing, Integer) c = DirectCast(0, Integer) 'c = DirectCast(0L, Integer) 'error BC30311: Value of type 'Long' cannot be converted to 'Integer'. 'd = DirectCast(0, Long) ' error BC30311: Value of type 'Integer' cannot be converted to 'Long'. d = DirectCast(0L, Long) e = DirectCast(0, Enum1) 'e = DirectCast(0L, Enum1) ' error BC30311: Value of type 'Long' cannot be converted to 'Enum1'. e = DirectCast(Nothing, Enum1) k = DirectCast(Nothing, MT1) q = DirectCast(Nothing, MT4) a = TryCast(b, Object) a = TryCast(c, Object) b = TryCast(a, ValueType) b = TryCast(c, ValueType) 'c = TryCast(a, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'c = TryCast(b, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'c = TryCast(c, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'c = TryCast(d, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'c = TryCast(e, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'd = TryCast(d, Long) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. 'd = TryCast(c, Long) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. 'e = TryCast(e, Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. 'e = TryCast(f, Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. 'e = TryCast(g, Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. 'f = TryCast(f, Enum2) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum2' is a value type. 'f = TryCast(g, Enum2) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum2' is a value type. h = TryCast(i, Class8()) i = TryCast(h, Class9()) 'i = TryCast(j, Class9()) ' error BC30332: Value of type '1-dimensional array of Class11' cannot be converted to '1-dimensional array of Class9' because 'Class11' is not derived from 'Class9'. 'k = TryCast(k, MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. 'k = TryCast(l, MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. 'k = TryCast(m, MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. 'k = TryCast(q, MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. 'l = TryCast(k, MT2) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT2' has no class constraint. 'm = TryCast(k, MT3) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT3' has no class constraint. n = TryCast(o, MT1()) n = TryCast(p, MT1()) n = TryCast(u, MT1()) q = TryCast(k, MT4) q = TryCast(b, MT4) q = TryCast(c, MT4) r = TryCast(s, MT5) r = TryCast(t, MT5) r = TryCast(w, MT5) s = TryCast(r, MT6) 's = TryCast(t, MT6) ' error BC30311: Value of type 'MT7' cannot be converted to 'MT6'. s = TryCast(w, MT6) t = TryCast(r, MT7) 't = TryCast(s, MT7) ' error BC30311: Value of type 'MT6' cannot be converted to 'MT7'. 't = TryCast(w, MT7) ' error BC30311: Value of type 'MT8' cannot be converted to 'MT7'. u = TryCast(n, Integer()) 'u = TryCast(v, Integer()) 'error BC30332: Value of type '1-dimensional array of MT4' cannot be converted to '1-dimensional array of Integer' because 'MT4' is not derived from 'Integer'. 'v = TryCast(u, MT4()) 'error BC30332: Value of type '1-dimensional array of Integer' cannot be converted to '1-dimensional array of MT4' because 'Integer' is not derived from 'MT4'. a = TryCast(Nothing, Object) a = TryCast(0, Object) b = TryCast(Nothing, ValueType) 'c = TryCast(Nothing, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'c = TryCast(0, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'c = TryCast(0L, Integer) ' error BC30792: 'TryCast' operand must be reference type, but 'Integer' is a value type. 'd = TryCast(0, Long) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. 'd = TryCast(0L, Long) ' error BC30792: 'TryCast' operand must be reference type, but 'Long' is a value type. 'e = TryCast(0, Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. 'e = TryCast(0L, Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. 'e = TryCast(Nothing, Enum1) ' error BC30792: 'TryCast' operand must be reference type, but 'Enum1' is a value type. 'k = TryCast(Nothing, MT1) ' error BC30793: 'TryCast' operands must be class-constrained type parameter, but 'MT1' has no class constraint. q = TryCast(Nothing, MT4) End Sub End Class Structure Structure1 Implements Interface5 End Structure Structure Structure2 Implements Interface3 End Structure Class Class8 Implements Interface5 End Class Class Class9 Inherits Class8 Implements Interface4 End Class Class Class10 Inherits Class9 Implements Interface3, Interface6 End Class NotInheritable Class Class11 Inherits Class8 End Class Class Class12 Inherits Class8 End Class Interface Interface1 End Interface Interface Interface2 Inherits Interface1 End Interface Interface Interface3 Inherits Interface2 End Interface Interface Interface4 End Interface Interface Interface5 End Interface Interface Interface6 End Interface Interface Interface7 Inherits Interface1, Interface6 End Interface Module Module2 End Module Enum Enum1 As Integer e End Enum Enum Enum2 As Long e End Enum Enum Enum3 As Short e End Enum Enum Enum4 As Integer e End Enum Enum Enum5 As UInteger e End Enum Class Class1 End Class Class Class2 Class Class3(Of T) End Class End Class Class Class4(Of T) Class Class5(Of S) End Class Class Class6 Class Class7(Of S) End Class End Class End Class
Visual Basic
5
ffMathy/roslyn
src/Compilers/Test/Resources/Core/SymbolsTests/VBConversions.vb
[ "MIT" ]
require "./properties" class String # Iterates the grapheme boundaries in this string and yields for each grapheme # cluster the byte index of the first character and the byte index of the last # byte of the last character in the cluster. That is the byte span of the # respective grapheme cluster in the entire string. # The third input value is the last character itself, which can be used # to avoid multiple decoding in single-char graphemes. private def each_grapheme_boundary(& : Range(Int32, Int32), Char -> Nil) : Nil state = Grapheme::Property::Start reader = Char::Reader.new(self) last_char = reader.current_char # cache last_property to avoid re-calculation on the following iteration last_property = Grapheme::Property.from(last_char) last_boundary = 0 while reader.has_next? char = reader.next_char property = Grapheme::Property.from(char) boundary, state = Grapheme.break?(last_property, property, state) if boundary index = reader.pos yield last_boundary...index, last_char last_boundary = index end last_char = char last_property = property end end # :nodoc: class GraphemeIterator include Iterator(Grapheme) @last_char : Char @last_property : Grapheme::Property def initialize(str : String) @reader = Char::Reader.new(str) @state = Grapheme::Property::Start @last_char = @reader.current_char # cache last_property to avoid re-calculation on the following iteration @last_property = Grapheme::Property.from(@last_char) @last_boundary = 0 end def next return stop unless @reader.has_next? while char = @reader.next_char property = Grapheme::Property.from(char) boundary, @state = Grapheme.break?(@last_property, property, @state) last_char = @last_char @last_char = char @last_property = property if boundary index = @reader.pos grapheme = Grapheme.new(@reader.string, @last_boundary...index, last_char) @last_boundary = index return grapheme end end Grapheme.new(@reader.string, @[email protected], @last_char) end end # `Grapheme` represents a Unicode grapheme cluster, which describes the smallest # functional unit of a writing system. This is also called a *user-perceived character*. # # In the latin alphabet, most graphemes consist of a single Unicode codepoint # (equivalent to `Char`). But a grapheme can also consist of a sequence of codepoints, # which combine into a single unit. # # For example, the string `"e\u0301"` consists of two characters, the latin small letter `e` # and the combining acute accent `´`. Together, they form a single grapheme: `é`. # That same grapheme could alternatively be described in a single codepoint, `\u00E9` (latin small letter e with acute). # But the combinatory possibilities are far bigger than the amount of directly # available codepoints. # # ``` # "e\u0301".size # => 2 # "é".size # => 1 # # "e\u0301".grapheme_size # => 1 # "é".grapheme_size # => 1 # ``` # # This combination of codepoints is common in some non-latin scripts. It's also # often used with emojies to create customized combination. For example, the # thumbs up sign `👍` (`U+1F44D`) combined with an emoji modifier such as # `U+1F3FC` assign a colour to the emoji. # # Instances of this type can be acquired via `String#each_grapheme` or `String#graphemes`. # # The algorithm to determine boundaries between grapheme clusters is specified # in the [Unicode Standard Annex #29](https://www.unicode.org/reports/tr29/tr29-37.html#Grapheme_Cluster_Boundaries), # and implemented in Version Unicode 13.0.0. @[Experimental("The grapheme API is still under development. Join the discussion at [#11610](https://github.com/crystal-lang/crystal/issues/11610).")] struct Grapheme # For efficency reasons we avoid allocating a string for graphemes consisting # of only a single character. # As a trade-off, this leads to multi dispatch on this ivar. But that's # acceptable compared to the allocation overhead. # # Graphemes consisting of a single character are always represented as # `Char`, never as `String` to simplify comparability. This invariant is # protected by the constructor. @cluster : Char | String # :nodoc: def self.new(string : String, range : Range(Int32, Int32), char : Char) : self if char.bytesize == range.size new(char) else new(string.byte_slice(range.begin, range.end - range.begin)) end end # :nodoc: def initialize(@cluster) end # Appends the characters in this grapheme cluster to *io*. def to_s(io : IO) : Nil io << @cluster end # Returns the characters in this grapheme cluster. def to_s : String case cluster = @cluster in Char cluster.to_s in String cluster end end # Appends a representation of this grapheme cluster to *io*. def inspect(io : IO) : Nil io << "String::Grapheme(" @cluster.inspect(io) io << ")" end # Returns the number of characters in this grapheme cluster. def size : Int32 case cluster = @cluster in Char 1 in String cluster.size end end # Returns the number of bytes in the UTF-8 representation of this grapheme cluster. def bytesize : Int32 @cluster.bytesize end # Returns `true` if *other* is equivalent to `self`. # # Two graphemes are considered equivalent if they contain the same sequence # of codepoints. def ==(other : self) : Bool @cluster == other.@cluster end # :nodoc: def self.break?(c1 : Char, c2 : Char) : Bool break?(Property.from(c1), Property.from(c2)) end # :nodoc: # # Returns whether there is a grapheme break between boundclasses lbc and tbc. # # Please note that evaluation of GB10 (grapheme breaks between emoji zwj sequences) # and GB 12/13 (regional indicator code points) require knowledge of previous characters # which is not handled by this overload. This may result in an incorrect break before # an E_Modifier class codepoint and an incorrectly missing break between two # REGIONAL_INDICATOR class code points if such support does not exist in the caller. # # The rules are graphically displayed in a table on https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest.html # # The implementation is insipred by https://github.com/JuliaStrings/utf8proc/blob/462093b3924c7491defc67fda4bc7a27baf9b088/utf8proc.c#L261 def self.break?(lbc : Property, tbc : Property) : Bool return true if lbc.start? # GB1 return false if lbc.cr? && tbc.lf? # GB3 return true if lbc.cr? || lbc.lf? || lbc.control? # GB4 return true if tbc.cr? || tbc.lf? || tbc.control? # GB5 return false if lbc.l? && (tbc.l? || tbc.v? || tbc.lv? || tbc.lvt?) # GB6 return false if (lbc.lv? || lbc.v?) && (tbc.v? || tbc.t?) # GB7 return false if (lbc.lvt? || lbc.t?) && tbc.t? # GB8 return false if tbc.extend? || tbc.zwj? # GB9 return false if tbc.spacing_mark? # GB9a return false if lbc.prepend? # GB9b return false if lbc.extended_plus_zero_width? && tbc.extended_pictographic? # GB11 (requires additional handling) return false if lbc.regional_indicator? && tbc.regional_indicator? # GB12/13 (requires additional handling) true # GB999 end # :nodoc: def self.break?(c1 : Char, c2 : Char, state : Property) : {Bool, Property} break?(Property.from(c1), Property.from(c2), state) end # :nodoc: # # Returns whether there is a grapheme break between boundclasses lbc and tbc. # # Please note that evaluation of GB10 (grapheme breaks between emoji zwj sequences) # and GB 12/13 (regional indicator code points) require knowledge of previous characters # which is accounted for in the state argument. The caller is expected to # store the returned state and pass it when calling this method the next time. # The initial value is `Property::Start`. # # The implementation is inspired by https://github.com/JuliaStrings/utf8proc/blob/462093b3924c7491defc67fda4bc7a27baf9b088/utf8proc.c#L291 def self.break?(lbc : Property, tbc : Property, state : Property) : {Bool, Property} if state.start? state = lbc_override = lbc else lbc_override = state end break_permitted = break?(lbc_override, tbc) # Special support for GB 12/13 made possible by GB999. After two RI # class codepoints we want to force a break. Do this by resetting the # second RI's bound class to UTF8PROC_BOUNDCLASS_OTHER, to force a break # after that character according to GB999 (unless of course such a break is # forbidden by a different rule such as GB9). if state == tbc && tbc.regional_indicator? state = Property::Any # Special support for GB11 (emoji extend* zwj / emoji) elsif state.extended_pictographic? if tbc.extend? # fold EXTEND codepoints into emoji state = Property::ExtendedPictographic elsif tbc.zwj? state = Property::ExtendedPlusZeroWidth # state to record emoji+zwg combo else state = tbc end else state = tbc end {break_permitted, state} end end end
Crystal
5
nanobowers/crystal
src/string/grapheme/grapheme.cr
[ "Apache-2.0" ]
( var osc = NetAddr("127.0.0.1", 5891); ~anim = Pbind( \dur, 4, \dest, osc, \msg, "/", \text, "test!", \wait, Pwhite(1,5), \scale, Pseq((0.1,0.15..0.75), inf) * Pxrand((1..5),inf), \rotate, Pxrand((1..10)/2, inf), \vertical, Pwhite(1,5), \horizontal, Pxrand((1..5)/10, inf) * 2, \zPosition, Pxrand((-5..10), inf), \figure, Pxrand(["Dancer", "Shroom"], inf), \play, { ~dest.sendBundle(~latency, [~msg, ~text, ~wait, ~scale, ~rotate, ~vertical, ~horizontal, ~zPosition, ~figure]) } ).trace.play; )
SuperCollider
3
lvm/Tidal-Unity
Unity.scd
[ "MIT" ]
/******************************************************************************** * Copyright (c) {date} Red Hat Inc. and/or its affiliates and others * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * http://www.apache.org/licenses/LICENSE-2.0 * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ import com.intellij.openapi.actionSystem { AnAction, AnActionEvent, CommonDataKeys } import org.eclipse.ceylon.ide.intellij.model { getModelManager } shared class ToggleModelUpdateAction() extends AnAction() { shared actual void actionPerformed(AnActionEvent e) { if (exists project = CommonDataKeys.project.getData(e.dataContext), exists modelManager = getModelManager(project)) { modelManager.automaticModelUpdateEnabled = !modelManager.automaticModelUpdateEnabled; } } shared actual void update(AnActionEvent e) { if (exists project = CommonDataKeys.project.getData(e.dataContext), exists modelManager = getModelManager(project)) { e.presentation.enabled = true; value what = " automatic update of the Ceylon model (``modelManager.delayBeforeUpdatingAfterChange/1000``s after any change)"; value action = modelManager.automaticModelUpdateEnabled then "Disable" else "Enable"; e.presentation.text = action + what; } else { e.presentation.enabled = false; } } }
Ceylon
4
Kopilov/ceylon-ide-intellij
source/org/eclipse/ceylon/ide/intellij/action/ToggleModelUpdateAction.ceylon
[ "Apache-2.0" ]
- dashboard: ad_performance_overview title: Ad Performance Overview layout: tile tile_size: 100 filters: elements: - name: total_ads title: Total Keywords (Ads) type: single_value model: google_adwords explore: master_stats measures: [ad.count] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: total_cost_usd title: Total Cost (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.total_cost_usd] sorts: [master_stats.total_cost_usd desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: average_cost_per_conversion title: Average Cost per Conversion (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.average_cost_per_conversion] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: total_impressions title: Total Impressions (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.total_impressions] sorts: [master_stats.total_impressions desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: total_interactions title: Total Interactions (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.total_interactions] sorts: [master_stats.total_interactions desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: average_interaction_rate title: Average Interaction Rate (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.average_interaction_rate] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: total_clicks title: Total Clicks (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.total_clicks] sorts: [master_stats.total_clicks desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: total_conversions title: Total Conversions (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.total_conversions] sorts: [master_stats.total_conversions desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: average_conversion_rate title: Average Conversion Rate (Ads) type: single_value model: google_adwords explore: master_stats measures: [master_stats.average_conversion_rate] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles custom_color_enabled: false custom_color: forestgreen show_single_value_title: true show_comparison: false comparison_type: value comparison_reverse_colors: false show_comparison_label: true stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} height: 1 width: 4 - name: ad_performance_over_time title: Ad Performance over Time (Ads) type: looker_column model: google_adwords explore: master_stats dimensions: [master_stats._data_date] fill_fields: [master_stats._data_date] measures: [master_stats.total_impressions, master_stats.total_clicks, master_stats.total_conversions] sorts: [master_stats._data_date desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles stacking: normal show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" - name: ad_efficiency_over_time title: Ad Efficiency Over Time (Ads) type: looker_line model: google_adwords explore: master_stats dimensions: [master_stats._data_date] fill_fields: [master_stats._data_date] measures: [master_stats.average_interaction_rate, master_stats.average_conversion_rate, master_stats.average_cost_per_click] sorts: [master_stats._data_date desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: false show_y_axis_labels: false show_y_axis_ticks: false y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear show_null_points: true point_style: none interpolation: monotone ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} - name: ad_keyword_performance title: Ad Keyword Performance (Ads) type: table model: google_adwords explore: master_stats dimensions: [ad.headline_part1] measures: [master_stats.total_impressions, master_stats.total_clicks, master_stats.average_interaction_rate, master_stats.total_conversions, master_stats.average_conversion_rate, master_stats.total_cost_usd] filters: ad.headline_part1: "-NULL" sorts: [master_stats.total_impressions desc] limit: '500' column_limit: '50' query_timezone: America/Los_Angeles show_view_names: true show_row_numbers: true truncate_column_names: false hide_totals: false hide_row_totals: false table_theme: gray limit_displayed_rows: false stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true y_axis_combined: true show_y_axis_labels: true show_y_axis_ticks: true y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: {} - name: add_a_unique_name_1487316761 title: Ad Performance (Ads) type: looker_bar model: google_adwords explore: master_stats dimensions: [ad.creative_id] measures: [master_stats.average_conversion_rate, master_stats.total_conversions] sorts: [master_stats.total_conversions desc] limit: '10' column_limit: '50' query_timezone: America/Los_Angeles stacking: '' show_value_labels: false label_density: 25 legend_position: center x_axis_gridlines: false y_axis_gridlines: true show_view_names: true limit_displayed_rows: false y_axis_combined: false show_y_axis_labels: false show_y_axis_ticks: false y_axis_tick_density: default y_axis_tick_density_custom: 5 show_x_axis_label: true show_x_axis_ticks: true x_axis_scale: auto y_axis_scale_mode: linear ordering: none show_null_labels: false show_totals_labels: false show_silhouette: false totals_color: "#808080" series_types: master_stats.average_conversion_rate: line column_spacing_ratio: 0.2 series_labels: {} series_colors: master_stats.total_conversions: "#1D98D3" master_stats.average_conversion_rate: "#3B4260"
LookML
3
umesh0894/google_adwords
ad_performance_overview.dashboard.lookml
[ "MIT" ]
package gw.internal.gosu.regression enhancement EnhancedInterfaceEnhancement : EnhancedInterface { static function callInternalMethod() : String { return InternalJavaClass.doStuff() } }
Gosu
4
tcmoore32/sheer-madness
gosu-test/src/test/gosu/gw/internal/gosu/regression/EnhancedInterfaceEnhancement.gsx
[ "Apache-2.0" ]
CREATE TABLE `tb_bpukgjzglw` ( `col_sgxesfcvdh` blob, `col_tjhvpjnswu` bigint(20) unsigned DEFAULT NULL, `col_vvbowgfzum` varchar(200) DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tb_chzhfzbmgu` ( `col_zqritfblef` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 DEFAULT NULL, `col_tvyzdewvuz` int(17) DEFAULT NULL, `col_rigzrdrdlq` decimal(31,15) DEFAULT NULL, UNIQUE KEY `uk_ckjnyzlzhn` (`col_rigzrdrdlq`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `tb_osccbhgwdn` ( `col_wuvofglkav` blob, UNIQUE KEY `col_wuvofglkav` (`col_wuvofglkav`(20)), UNIQUE KEY `col_wuvofglkav_2` (`col_wuvofglkav`(18)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SQL
1
yuanweikang2020/canal
parse/src/test/resources/ddl/table/mysql_6.sql
[ "Apache-2.0" ]
module com.networknt.audit { exports com.networknt.audit; requires com.networknt.config; requires com.networknt.handler; requires com.networknt.utility; requires com.networknt.mask; requires com.fasterxml.jackson.core; requires org.slf4j; requires java.logging; }
Jasmin
3
KellyShao/light-4j
audit/src/main/java/module-info.j
[ "Apache-2.0" ]
<!DOCTYPE html> <html> <head> <title>setInterval() test</title> <script> document.addEventListener("DOMContentLoaded", function () { var output = document.getElementById("output"); var counter = 0; function updateOutput () { output.innerHTML = `setInterval() was called ${counter} times!`; } updateOutput(); setInterval(function () { counter++; updateOutput(); }, 1000); }); </script> </head> <body> <div id="output"></div> </body> </html>
HTML
4
r00ster91/serenity
Base/res/html/misc/set-interval.html
[ "BSD-2-Clause" ]
{{- define "sql-name" -}} {{- if .Values.inf.sql.host -}} {{- .Values.inf.sql.host -}} {{- else -}} {{- printf "%s" "sql-data" -}} {{- end -}} {{- end -}}
Smarty
4
slizard00/eShopOnContainers
k8s/helm/sql-data/templates/_names.tpl
[ "MIT" ]
internal class TestClass { internal var field = "goodbye" }
Swift
1
lwhsu/swift
test/Interpreter/Inputs/testable_key_path_2.swift
[ "Apache-2.0" ]
sub init() if not m.global.hasField("value") then print "inside component init, m.global.brsIntField: " m.global.brsIntField m.global.addField("value", "string", false) m.global.value = "Globally setting this value" else m.top.text = m.global.value end if end sub
Brightscript
3
lkipke/brs
test/e2e/resources/components/scripts/MGlobalWidget.brs
[ "MIT" ]
#include "caffe2/operators/order_switch_ops.h" #include <string> namespace caffe2 { REGISTER_CPU_OPERATOR(NHWC2NCHW, NHWC2NCHWOp<float, CPUContext>); REGISTER_CPU_OPERATOR(NCHW2NHWC, NCHW2NHWCOp<float, CPUContext>); OPERATOR_SCHEMA(NHWC2NCHW) .NumInputs(1) .NumOutputs(1) .TensorInferenceFunction([](const OperatorDef& /*unused*/ /*def*/, const std::vector<TensorShape>& in) { CAFFE_ENFORCE_GE( in[0].dims_size(), 3, "Input for NHWC2NCHW must be >= 3 dimensional"); std::vector<TensorShape> out(1); out[0].add_dims(in[0].dims(0)); out[0].add_dims(in[0].dims(in[0].dims_size() - 1)); for (auto i = 1; i < in[0].dims_size() - 1; ++i) { out[0].add_dims(in[0].dims(i)); } return out; }) .SetDoc(R"DOC( The operator switches the order of data in a tensor from NHWC- sample index N, height H, width H and channels C, to the NCHW order (this is for 2D images). In general, this operator switches the order of data in a tensor from N H_1 ... H_k C to N C H_1 ... H_k for k-dimensional features, and currently supports k=1, 2, and 3. )DOC") .Input(0, "data", "The input data (Tensor) in the NHWC order.") .Output(0, "output", "The output tensor (Tensor) in the NCHW order."); OPERATOR_SCHEMA(NCHW2NHWC) .NumInputs(1) .NumOutputs(1) .TensorInferenceFunction([](const OperatorDef& /*unused*/ /*def*/, const std::vector<TensorShape>& in) { CAFFE_ENFORCE_GE( in[0].dims_size(), 3, "Input for NCHW2NHWC must be >= 3 dimensional"); std::vector<TensorShape> out(1); out[0].add_dims(in[0].dims(0)); for (auto i = 2; i < in[0].dims_size(); ++i) { out[0].add_dims(in[0].dims(i)); } out[0].add_dims(in[0].dims(1)); return out; }) .SetDoc(R"DOC( The operator switches the order of data in a tensor from NCHW- sample index N, channels C, height H and width W, to the NHWC order (this is for 2D images). In general, this operator switches the order of data in a tensor from N C H_1 ... H_k to N H_1 ... H_k C for k-dimensional features, and currently supports k=1, 2, and 3. )DOC") .Input(0, "data", "The input data (Tensor) in the NCHW order.") .Output(0, "output", "The output tensor (Tensor) in the NHWC order."); namespace { class GetNHWC2NCHWGradient : public GradientMakerBase { using GradientMakerBase::GradientMakerBase; std::vector<OperatorDef> GetGradientDefs() override { return SingleGradientDef( "NCHW2NHWC", "", std::vector<std::string>{GO(0)}, std::vector<std::string>{GI(0)}); } }; class GetNCHW2NHWCGradient : public GradientMakerBase { using GradientMakerBase::GradientMakerBase; std::vector<OperatorDef> GetGradientDefs() override { return SingleGradientDef( "NHWC2NCHW", "", std::vector<std::string>{GO(0)}, std::vector<std::string>{GI(0)}); } }; } // namespace REGISTER_GRADIENT(NHWC2NCHW, GetNHWC2NCHWGradient); REGISTER_GRADIENT(NCHW2NHWC, GetNCHW2NHWCGradient); } // namespace caffe2
C++
5
Hacky-DH/pytorch
caffe2/operators/order_switch_ops.cc
[ "Intel" ]
module libpq is pkgconfig("libpq") in "C header" `{ #include <libpq-fe.h> `} in "C body" `{ PGconn *conn; PGresult *res; int nFields, i, j; `} extern class Postgres new connect `{ conn = PQconnectdb("dbname = postgres"); return conn; `} fun exec(query: String) import String.to_cstring `{ const char *c_query = String_to_cstring(query); res = PQexec(conn, c_query); nFields = PQnfields(res); for (i = 0; i < nFields; i++) printf("%-15s", PQfname(res, i)); printf("\n\n"); /* next, print out the rows */ for (i = 0; i < PQntuples(res); i++) { for (j = 0; j < nFields; j++) printf("%-15s", PQgetvalue(res, i, j)); printf("\n"); } `} fun connect_ok: Bool `{ return PQstatus(conn) == CONNECTION_OK; `} fun close `{ PQfinish(conn); `} end var pg = new Postgres.connect assert pg.connect_ok pg.exec("select * from pg_catalog.pg_user;") pg.close assert not pg.connect_ok
Nit
4
ajnavarro/language-dataset
data/github.com/michauds/pqnit/d1403590bfd645a43b30b7284cb49cff8eb40f12/libpq.nit
[ "MIT" ]
#!/bin/bash set -eu -o pipefail # Variables confFile=/tmp/$1.conf domainName=$2 outDir=$3 # Create certificate cp /etc/ssl/openssl.cnf "$confFile" echo "[subjectAltName]" >> "$confFile" echo "subjectAltName = DNS:$domainName, DNS:*.$domainName" >> "$confFile" mkdir -p $outDir openssl req -days 365 -newkey rsa:2048 -nodes -sha256 -x509 \ -config "$confFile" -extensions subjectAltName -subj "/CN=$domainName" \ -out "$outDir/$domainName.crt" -keyout "$outDir/$domainName.key" chmod -R 400 "$outDir" cp "$outDir/$domainName.crt" /usr/local/share/ca-certificates
Shell
4
coreyscherbing/angular
aio/aio-builds-setup/dockerbuild/nginx/create-selfsigned-cert.sh
[ "MIT" ]
' ********** Copyright 2016 Roku Corp. All Rights Reserved. ********** 'Main Video Node Initialization function init() m.video = m.top m.video.focusable = true end function 'Custom Event Key Handling '@param key [String] case-sensitive key string, that identifies which button was pressed. '@param press [Boolean] true if the key was pressed, and false if the key was released. '@return [Boolean] message to the firmware to indicate that a particular event has been handled function onKeyEvent(key as String, press as Boolean) as Boolean handled = false 'handle back key for video exit if (key = "back") m.top.navBack = true handled = true endif return handled end function
Brightscript
4
khangh/samples
advertising/FullRAFSceneGraphSample/components/MainVideo.brs
[ "MIT" ]
Theorem Action_Eq_Inj : forall a b, aAct a = aAct b -> a = b. Proof. intros; inversion H; auto. Qed. Theorem Action_Eq_Inj_inv : forall a b, a <> b -> aAct a <> aAct b. Proof. intros. intro. apply Action_Eq_Inj in H0. contradiction. Qed. Definition Action_lt (a1 a2:Action) : Prop := match a1 with | noAct => match a2 with | noAct => False | _ => True end | aAct a => match a2 with | noAct => False | aAct b => a < b end end. Definition Action_gt (a1 a2:Action) : Prop := match a1 with | noAct => match a2 with | noAct => False | _ => False end | aAct a => match a2 with | noAct => True | aAct b => a > b end end. Definition Action_cmp (a1 a2 : Action) : comparison := match a1 with | noAct => match a2 with | noAct => Eq | aAct _ => Lt end | aAct x => match a2 with | noAct => Gt | aAct y => _cmp x y end end. Lemma Action_gt_imp_lt : forall x y, Action_gt x y -> Action_lt y x. Proof. destruct x. - intros. unfold Action_gt in H. destruct y. elim H. elim H. - intros. unfold Action_gt in H. destruct y. simpl. auto. simpl. omega. Qed. Lemma Action_lt_imp_gt : forall x y, Action_lt x y -> Action_gt y x. Proof. destruct x. - intros. unfold Action_lt in H. destruct y. elim H. simpl. auto. - intros. unfold Action_lt in H. destruct y. elim H. simpl. auto. Qed. Lemma Action_neg_lt_imp : forall x y, ~Action_lt x y -> Action_gt x y \/ x = y. Proof. destruct x. - intros. unfold Action_lt in H. destruct y. auto. elim H. auto. - intros. unfold Action_lt in H. destruct y. simpl. auto. simpl. apply Nat.nlt_ge in H. apply le_lt_or_eq in H. destruct H;auto. Qed. Lemma Action_lt_eq_dec : forall a1 a2, {Action_lt a1 a2}+{~Action_lt a1 a2}. Proof. destruct a1. - intro. simpl. destruct a2; simpl; auto. - intro. simpl. destruct a2;auto. apply lt_dec. Qed. Lemma Action_gt_eq_dec : forall a1 a2, {Action_gt a1 a2}+{~Action_gt a1 a2}. Proof. destruct a1. - intro. simpl. destruct a2; simpl; auto. - intro. simpl. destruct a2;auto. apply lt_dec. Qed. Instance Action_lt_trans : Transitive Action_lt. Proof. repeat red. induction x;intros. - destruct y. + simpl in H. elim H. + destruct z. * simpl in H0. elim H0. * auto. - destruct y. + simpl in H. elim H. + destruct z. * auto. * simpl in H,H0. etransitivity;eauto. Qed.
Coq
5
dmrpe/SchedulingAlgebraCoq
tmp/leftovers.coq
[ "MIT" ]
@0x997ccd7814c156ca; struct Foo {}
Cap'n Proto
1
bbqsrc/capnproto-rust
capnpc/test/schema/test-in-dir.capnp
[ "MIT" ]
import * as fs from 'fs'; import * as assert from 'assert'; import { svelte, loadConfig, tryToLoadJson } from '../helpers'; describe('stats', () => { fs.readdirSync(`${__dirname}/samples`).forEach(dir => { if (dir[0] === '.') return; // add .solo to a sample directory name to only run that test const solo = /\.solo/.test(dir); const skip = /\.skip/.test(dir); if (solo && process.env.CI) { throw new Error('Forgot to remove `solo: true` from test'); } (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`${__dirname}/samples/${dir}/_config.js`); const filename = `${__dirname}/samples/${dir}/input.svelte`; const input = fs.readFileSync(filename, 'utf-8').replace(/\s+$/, ''); const expectedError = tryToLoadJson( `${__dirname}/samples/${dir}/error.json` ); let result; let error; try { result = svelte.compile(input, config.options); config.test(assert, result.stats); } catch (e) { error = e; } if (error || expectedError) { if (error && !expectedError) { throw error; } if (expectedError && !error) { throw new Error(`Expected an error: ${expectedError.message}`); } assert.equal(error.message, expectedError.message); assert.deepEqual(error.start, expectedError.start); assert.deepEqual(error.end, expectedError.end); assert.equal(error.pos, expectedError.pos); } }); }); it('returns a stats object when options.generate is false', () => { const { stats } = svelte.compile('', { generate: false }); assert.equal(typeof stats.timings.total, 'number'); }); });
TypeScript
4
Theo-Steiner/svelte
test/stats/index.ts
[ "MIT" ]
" Vim syntax file " Language: Kyocera PreScribe2e " Maintainer: Klaus Muth <[email protected]> " URL: http://www.hampft.de/vim/syntax/prescribe.vim " Last Change: 2005 Mar 04 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif syn match prescribeSpecial "!R!" " all prescribe commands syn keyword prescribeStatement ALTF AMCR ARC ASFN ASTK BARC BLK BOX CALL syn keyword prescribeStatement CASS CIR CLIP CLPR CLSP COPY CPTH CSET CSTK syn keyword prescribeStatement CTXT DAF DAM DAP DELF DELM DPAT DRP DRPA DUPX syn keyword prescribeStatement DXPG DXSD DZP ENDD ENDM ENDR EPL EPRM EXIT syn keyword prescribeStatement FDIR FILL FLAT FLST FONT FPAT FRPO FSET FTMD syn keyword prescribeStatement GPAT ICCD INTL JOG LDFC MAP MCRO MDAT MID syn keyword prescribeStatement MLST MRP MRPA MSTK MTYP MZP NEWP PAGE PARC PAT syn keyword prescribeStatement PCRP PCZP PDIR RDRP PDZP PELP PIE PMRA PMRP PMZP syn keyword prescribeStatement PRBX PRRC PSRC PXPL RDMP RES RSL RGST RPCS RPF syn keyword prescribeStatement RPG RPP RPU RTTX RTXT RVCD RVRD SBM SCAP SCCS syn keyword prescribeStatement SCF SCG SCP SCPI SCRC SCS SCU SDP SEM SETF SFA syn keyword prescribeStatement SFNT SIMG SIR SLJN SLM SLPI SLPP SLS SMLT SPD syn keyword prescribeStatement SPL SPLT SPO SPSZ SPW SRM SRO SROP SSTK STAT STRK syn keyword prescribeStatement SULP SVCP TATR TEXT TPRS UNIT UOM WIDE WRED XPAT syn match prescribeStatement "\<ALTB\s\+[ACDEGRST]\>" syn match prescribeStatement "\<CPPY\s\+[DE]\>" syn match prescribeStatement "\<EMCR\s\+[DE]\>" syn match prescribeStatement "\<FRPO\s\+INIT\>" syn match prescribeStatement "\<JOB[DLOPST]\>" syn match prescribeStatement "\<LDFC\s\+[CFS]\>" syn match prescribeStatement "\<RWER\s\+[DFILRSTW]\>" syn match prescribeCSETArg "[0-9]\{1,3}[A-Z]" syn match prescribeFRPOArg "[A-Z][0-9]\{1,2}" syn match prescribeNumber "[0-9]\+" syn region prescribeString start=+'+ end=+'+ skip=+\\'+ syn region prescribeComment start=+CMNT+ end=+;+ " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link prescribeSpecial PreProc hi def link prescribeStatement Statement hi def link prescribeNumber Number hi def link prescribeCSETArg String hi def link prescribeFRPOArg String hi def link prescribeComment Comment let b:current_syntax = "prescribe" " vim: ts=8
VimL
4
uga-rosa/neovim
runtime/syntax/prescribe.vim
[ "Vim" ]
export default /* glsl */` #ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif `;
JavaScript
4
brunnacroches/portifolio-brunna
node_modules/three/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.js
[ "Unlicense" ]
struct FancyNum { num: u8, } fn main() { let fancy_num = FancyNum { num: 5 }; let fancy_ref = &fancy_num; let x = move || { //~ ERROR E0505 println!("child function: {}", fancy_num.num); }; x(); println!("main function: {}", fancy_ref.num); }
Rust
4
Eric-Arellano/rust
src/test/ui/error-codes/E0504.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
// @noImplicitReferences: true // @traceResolution: true // @allowJs: true // @esModuleInterop: true // @fullEmitPaths: true // @Filename: /node_modules/foo/bar/foobar.js module.exports = { a: 10 }; // @Filename: /a.ts import foobar from "foo/bar/foobar.js"; // @Filename: /tsconfig.json { "compilerOptions": { "baseUrl": ".", "paths": { "*": ["node_modules/*", "src/types"] }, "allowJs": true, "outDir": "bin" } }
TypeScript
3
nilamjadhav/TypeScript
tests/cases/compiler/pathMappingBasedModuleResolution_withExtension_MapedToNodeModules.ts
[ "Apache-2.0" ]
i 00001 12 24 02010 00 042 0012 i 00002 00 012 2000 00 040 0012 i 00003 00 010 0000 00 000 2010 i 00004 00 000 2011 00 000 2012 i 00005 17 24 02011 00 010 2000 i 00006 17 000 0000 12 045 0017 i 00007 17 25 77777 15 31 00073 i 00010 17 24 02007 00 010 0000 i 00011 17 000 0001 17 000 0003 i 00012 00 010 2000 00 22 00002 i 00013 17 000 0000 12 045 0017 i 00014 17 25 00002 15 31 00073 i 00015 00 010 0000 00 000 2011 i 00016 17 24 02013 17 010 0000 i 00017 00 040 0002 00 036 0130 i 00020 00 040 0003 17 010 0000 i 00021 00 040 0004 00 036 0130 i 00022 00 040 0005 17 010 0000 i 00023 00 040 0006 00 036 0140 i 00024 00 040 0007 15 31 00110 i 00025 17 24 02013 00 22 77777 i 00026 17 010 0000 00 040 0006 i 00027 00 036 0140 00 040 0007 i 00030 17 110 7776 00 040 0004 i 00031 00 036 0140 00 040 0005 i 00032 17 110 7775 00 040 0002 i 00033 00 036 0140 00 040 0003 i 00034 17 25 77775 15 31 00110 i 00035 04 24 00001 07 24 77777 i 00036 03 24 77777 17 24 02013 i 00037 17 23 00000 06 24 00000 i 00040 17 23 00000 04 24 00000 i 00041 17 23 00000 02 24 00000 i 00042 00 22 00000 15 31 00110 i 00043 17 24 02010 00 010 2003 i 00044 00 003 0000 00 003 2004 i 00045 00 003 2005 17 23 77776 i 00046 02 24 00000 02 35 00072 i 00047 12 045 0017 17 25 77776 i 00050 17 35 00072 17 24 02010 i 00051 00 010 2001 00 003 2002 i 00052 17 011 0000 00 27 00072 i 00053 00 010 2001 00 003 2002 i 00054 17 013 0000 00 003 2001 i 00055 00 003 2002 17 015 0000 i 00056 17 012 0000 00 27 00072 i 00057 00 010 2001 00 003 2002 i 00060 00 003 2000 17 020 0000 i 00061 17 021 0000 00 012 2001 i 00062 00 27 00072 00 003 2000 i 00063 17 022 0000 00 012 2006 i 00064 00 27 00072 00 003 2000 i 00065 17 023 0000 00 012 2003 i 00066 00 27 00072 00 010 2000 i 00067 17 000 0000 17 026 0000 i 00070 00 27 00072 00 22 00000 i 00071 06 33 12345 00 22 00000 i 00072 02 33 76543 00 22 00000 i 00073 17 35 00072 00 010 2010 i 00074 00 040 0002 02 35 00072 i 00075 00 036 0130 00 040 0002 i 00076 02 35 00072 00 010 2012 i 00077 00 040 0002 02 35 00072 i 00100 00 036 0130 00 040 0002 i 00101 02 35 00072 00 010 2011 i 00102 00 040 0002 00 036 0130 i 00103 00 040 0003 02 25 00001 i 00104 02 35 00072 03 25 00001 i 00105 03 35 00072 00 010 2007 i 00106 00 000 2010 00 000 2011 i 00107 00 000 2012 15 30 00000 i 00110 12 045 0017 17 25 00001 i 00111 17 35 00072 02 25 77777 i 00112 02 35 00072 03 25 00001 i 00113 03 35 00072 04 35 00072 i 00114 05 35 00072 06 25 77777 i 00115 06 35 00072 07 25 00001 i 00116 07 35 00072 15 30 00000 d 02000 7777 7777 7777 7777 d 02001 5252 5252 5252 5252 d 02002 2525 2525 2525 2525 d 02003 0000 0000 0000 0001 d 02004 0000 0000 0000 0002 d 02005 0000 0000 0000 0003 d 02006 0000 0000 0000 0060 d 02007 7777 7777 0000 0001
Octave
1
besm6/mesm6
test/stack/stack.oct
[ "MIT" ]
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # namespace rb SpecNamespace struct Hello { 1: string greeting = "hello world" } enum SomeEnum { ONE TWO } struct StructWithSomeEnum { 1: SomeEnum some_enum; } union TestUnion { /** * A doc string */ 1: string string_field; 2: i32 i32_field; 3: i32 other_i32_field; 4: SomeEnum enum_field; 5: binary binary_field; } struct Foo { 1: i32 simple = 53, 2: string words = "words", 3: Hello hello = {'greeting' : "hello, world!"}, 4: list<i32> ints = [1, 2, 2, 3], 5: map<i32, map<string, double>> complex, 6: set<i16> shorts = [5, 17, 239], 7: optional string opt_string 8: bool my_bool } struct Foo2 { 1: binary my_binary } struct BoolStruct { 1: bool yesno = 1 } struct SimpleList { 1: list<bool> bools, 2: list<byte> bytes, 3: list<i16> i16s, 4: list<i32> i32s, 5: list<i64> i64s, 6: list<double> doubles, 7: list<string> strings, 8: list<map<i16, i16>> maps, 9: list<list<i16>> lists, 10: list<set<i16>> sets, 11: list<Hello> hellos } exception Xception { 1: string message, 2: i32 code = 1 } service NonblockingService { Hello greeting(1:bool english) bool block() oneway void unblock(1:i32 n) oneway void shutdown() void sleep(1:double seconds) } union My_union { 1: bool im_true, 2: byte a_bite, 3: i16 integer16, 4: i32 integer32, 5: i64 integer64, 6: double double_precision, 7: string some_characters, 8: i32 other_i32 9: SomeEnum some_enum; 10: map<SomeEnum, list<SomeEnum>> my_map; } struct Struct_with_union { 1: My_union fun_union 2: i32 integer32 3: string some_characters } struct StructWithEnumMap { 1: map<SomeEnum, list<SomeEnum>> my_map; } # Nested lists struct NestedListInList { 1: list<list<byte>> value } struct NestedListInSet { 1: set<list<byte>> value } struct NestedListInMapKey { 1: map<list<byte>, byte> value } struct NestedListInMapValue { 1: map<byte, list<byte>> value } # Nested sets struct NestedSetInList { 1: list<set<byte>> value } struct NestedSetInSet { 1: set<set<byte>> value } struct NestedSetInMapKey { 1: map<set<byte>, byte> value } struct NestedSetInMapValue { 1: map<byte, set<byte>> value } # Nested maps struct NestedMapInList { 1: list<map<byte, byte>> value } struct NestedMapInSet { 1: set<map<byte, byte>> value } struct NestedMapInMapKey { 2: map<map<byte, byte>, byte> value } struct NestedMapInMapValue { 2: map<byte, map<byte, byte>> value }
Thrift
4
Jimexist/thrift
lib/rb/spec/ThriftSpec.thrift
[ "Apache-2.0" ]
FROM larskanis/rake-compiler-dock-mri-x86_64-linux:1.1.0
Dockerfile
0
warlock135/grpc
third_party/rake-compiler-dock/rake_x86_64-linux/Dockerfile
[ "Apache-2.0" ]
----------------------------------------- --- MATLAB/OCTAVE interface of LIBSVM --- ----------------------------------------- Table of Contents ================= - Introduction - Installation - Usage - Returned Model Structure - Other Utilities - Examples - Additional Information Introduction ============ This tool provides a simple interface to LIBSVM, a library for support vector machines (http://www.csie.ntu.edu.tw/~cjlin/libsvm). It is very easy to use as the usage and the way of specifying parameters are the same as that of LIBSVM. Installation ============ On Windows systems, pre-built binary files are already in the directory '..\windows', so no need to conduct installation. Now we provide binary files only for 64bit MATLAB on Windows. If you would like to re-build the package, please rely on the following steps. We recommend using make.m on both MATLAB and OCTAVE. Just type 'make' to build 'libsvmread.mex', 'libsvmwrite.mex', 'svmtrain.mex', and 'svmpredict.mex'. On MATLAB or Octave: >> make If make.m does not work on MATLAB (especially for Windows), try 'mex -setup' to choose a suitable compiler for mex. Make sure your compiler is accessible and workable. Then type 'make' to start the installation. Example: matlab>> mex -setup (ps: MATLAB will show the following messages to setup default compiler.) Please choose your compiler for building external interface (MEX) files: Would you like mex to locate installed compilers [y]/n? y Select a compiler: [1] Microsoft Visual C/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio [0] None Compiler: 1 Please verify your choices: Compiler: Microsoft Visual C/C++ 7.1 Location: C:\Program Files\Microsoft Visual Studio Are these correct?([y]/n): y matlab>> make On Unix systems, if neither make.m nor 'mex -setup' works, please use Makefile and type 'make' in a command window. Note that we assume your MATLAB is installed in '/usr/local/matlab'. If not, please change MATLABDIR in Makefile. Example: linux> make To use octave, type 'make octave': Example: linux> make octave For a list of supported/compatible compilers for MATLAB, please check the following page: http://www.mathworks.com/support/compilers/current_release/ Usage ===== matlab> model = svmtrain(training_label_vector, training_instance_matrix [, 'libsvm_options']); -training_label_vector: An m by 1 vector of training labels (type must be double). -training_instance_matrix: An m by n matrix of m training instances with n features. It can be dense or sparse (type must be double). -libsvm_options: A string of training options in the same format as that of LIBSVM. matlab> [predicted_label, accuracy, decision_values/prob_estimates] = svmpredict(testing_label_vector, testing_instance_matrix, model [, 'libsvm_options']); matlab> [predicted_label] = svmpredict(testing_label_vector, testing_instance_matrix, model [, 'libsvm_options']); -testing_label_vector: An m by 1 vector of prediction labels. If labels of test data are unknown, simply use any random values. (type must be double) -testing_instance_matrix: An m by n matrix of m testing instances with n features. It can be dense or sparse. (type must be double) -model: The output of svmtrain. -libsvm_options: A string of testing options in the same format as that of LIBSVM. Returned Model Structure ======================== The 'svmtrain' function returns a model which can be used for future prediction. It is a structure and is organized as [Parameters, nr_class, totalSV, rho, Label, ProbA, ProbB, nSV, sv_coef, SVs]: -Parameters: parameters -nr_class: number of classes; = 2 for regression/one-class svm -totalSV: total #SV -rho: -b of the decision function(s) wx+b -Label: label of each class; empty for regression/one-class SVM -ProbA: pairwise probability information; empty if -b 0 or in one-class SVM -ProbB: pairwise probability information; empty if -b 0 or in one-class SVM -nSV: number of SVs for each class; empty for regression/one-class SVM -sv_coef: coefficients for SVs in decision functions -SVs: support vectors If you do not use the option '-b 1', ProbA and ProbB are empty matrices. If the '-v' option is specified, cross validation is conducted and the returned model is just a scalar: cross-validation accuracy for classification and mean-squared error for regression. More details about this model can be found in LIBSVM FAQ (http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html) and LIBSVM implementation document (http://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.pdf). Result of Prediction ==================== The function 'svmpredict' has three outputs. The first one, predictd_label, is a vector of predicted labels. The second output, accuracy, is a vector including accuracy (for classification), mean squared error, and squared correlation coefficient (for regression). The third is a matrix containing decision values or probability estimates (if '-b 1' is specified). If k is the number of classes in training data, for decision values, each row includes results of predicting k(k-1)/2 binary-class SVMs. For classification, k = 1 is a special case. Decision value +1 is returned for each testing instance, instead of an empty vector. For probabilities, each row contains k values indicating the probability that the testing instance is in each class. Note that the order of classes here is the same as 'Label' field in the model structure. Other Utilities =============== A matlab function libsvmread reads files in LIBSVM format: [label_vector, instance_matrix] = libsvmread('data.txt'); Two outputs are labels and instances, which can then be used as inputs of svmtrain or svmpredict. A matlab function libsvmwrite writes Matlab matrix to a file in LIBSVM format: libsvmwrite('data.txt', label_vector, instance_matrix] The instance_matrix must be a sparse matrix. (type must be double) For 32bit and 64bit MATLAB on Windows, pre-built binary files are ready in the directory `..\windows', but in future releases, we will only include 64bit MATLAB binary files. These codes are prepared by Rong-En Fan and Kai-Wei Chang from National Taiwan University. Examples ======== Train and test on the provided data heart_scale: matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale'); matlab> model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07'); matlab> [predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); % test the training data For probability estimates, you need '-b 1' for training and testing: matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale'); matlab> model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07 -b 1'); matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale'); matlab> [predict_label, accuracy, prob_estimates] = svmpredict(heart_scale_label, heart_scale_inst, model, '-b 1'); To use precomputed kernel, you must include sample serial number as the first column of the training and testing data (assume your kernel matrix is K, # of instances is n): matlab> K1 = [(1:n)', K]; % include sample serial number as first column matlab> model = svmtrain(label_vector, K1, '-t 4'); matlab> [predict_label, accuracy, dec_values] = svmpredict(label_vector, K1, model); % test the training data We give the following detailed example by splitting heart_scale into 150 training and 120 testing data. Constructing a linear kernel matrix and then using the precomputed kernel gives exactly the same testing error as using the LIBSVM built-in linear kernel. matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale'); matlab> matlab> % Split Data matlab> train_data = heart_scale_inst(1:150,:); matlab> train_label = heart_scale_label(1:150,:); matlab> test_data = heart_scale_inst(151:270,:); matlab> test_label = heart_scale_label(151:270,:); matlab> matlab> % Linear Kernel matlab> model_linear = svmtrain(train_label, train_data, '-t 0'); matlab> [predict_label_L, accuracy_L, dec_values_L] = svmpredict(test_label, test_data, model_linear); matlab> matlab> % Precomputed Kernel matlab> model_precomputed = svmtrain(train_label, [(1:150)', train_data*train_data'], '-t 4'); matlab> [predict_label_P, accuracy_P, dec_values_P] = svmpredict(test_label, [(1:120)', test_data*train_data'], model_precomputed); matlab> matlab> accuracy_L % Display the accuracy using linear kernel matlab> accuracy_P % Display the accuracy using precomputed kernel Note that for testing, you can put anything in the testing_label_vector. For more details of precomputed kernels, please read the section ``Precomputed Kernels'' in the README of the LIBSVM package. Additional Information ====================== This interface was initially written by Jun-Cheng Chen, Kuan-Jen Peng, Chih-Yuan Yang and Chih-Huai Cheng from Department of Computer Science, National Taiwan University. The current version was prepared by Rong-En Fan and Ting-Fan Wu. If you find this tool useful, please cite LIBSVM as follows Chih-Chung Chang and Chih-Jen Lin, LIBSVM : a library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1--27:27, 2011. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm For any question, please contact Chih-Jen Lin <[email protected]>, or check the FAQ page: http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#/Q9:_MATLAB_interface
Matlab
4
cjhammond/neuroelf
_files/contrib/libSVM/README.matlab
[ "BSD-2-Clause" ]
package extensions import spock.lang.Narrative import spock.lang.Specification import spock.lang.Title @Title("""This title is easy to read for humans""") class CustomTitleTest extends Specification { } @Narrative(""" as a user i want to save favourite items and then get the list of them """) class NarrativeDescriptionTest extends Specification { }
Groovy
4
DBatOWL/tutorials
testing-modules/groovy-spock/src/test/groovy/extensions/CustomTitleTest.groovy
[ "MIT" ]
/* * Copyright 2008 The Closure Library Authors. All Rights Reserved. * * Use of this source code is governed by the Apache License, Version 2.0. * See the COPYING file for details. */ /* Author: [email protected] (Larry Powelson) */ .goog-hovercard div { border: solid 5px #69748C; width: 300px; height: 115px; background-color: white; font-family: arial, sans-serif; } .goog-hovercard .goog-shadow { border: transparent; background-color: black; filter: alpha(Opacity=1); opacity: 0.01; -moz-opacity: 0.01; } .goog-hovercard table { border-collapse: collapse; border-spacing: 0px; } .goog-hovercard-icons td { border-bottom: 1px solid #ccc; padding: 0px; margin: 0px; text-align: center; height: 19px; width: 100px; font-size: 90%; } .goog-hovercard-icons td + td { border-left: 1px solid #ccc; } .goog-hovercard-content { border-collapse: collapse; } .goog-hovercard-content td { padding-left: 15px; }
CSS
3
maze-runnar/modal-component
modal/node_modules/accessibility-developer-tools/lib/closure-library/closure/goog/css/hovercard.css
[ "MIT" ]
const Y = 100; const X = nil; const S = "string"; const Z = true; const E: int = 10; const F: str = "typed string"; dbg(Y); dbg(X); dbg(S); dbg(Z); dbg(E); dbg(F);
Ox
3
Chacix/oxide-lang
tests/scripts/constant.ox
[ "MIT" ]
// run-pass #![feature(trait_alias)] trait Foo = PartialEq<i32> + Send; trait Bar = Foo + Sync; trait I32Iterator = Iterator<Item = i32>; pub fn main() { let a: &dyn Bar = &123; assert!(*a == 123); let b = Box::new(456) as Box<dyn Foo>; assert!(*b == 456); let c: &mut dyn I32Iterator = &mut vec![123].into_iter(); assert_eq!(c.next(), Some(123)); }
Rust
4
Eric-Arellano/rust
src/test/ui/traits/trait-alias/trait-alias-object.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
/**************************************************************************** * * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ import QtQuick 2.3 import QtQuick.Controls 2.12 import QtQuick.Dialogs 1.3 import QtQuick.Layouts 1.12 import QGroundControl 1.0 import QGroundControl.Controls 1.0 import QGroundControl.ScreenTools 1.0 QGCPopupDialog { title: qsTr("Select Altitude Mode") buttons: StandardButton.Close Component.onCompleted: { // Check for custom build override on AMSL usage if (!QGroundControl.corePlugin.options.showMissionAbsoluteAltitude && dialogProperties.currentAltMode != QGroundControl.AltitudeModeAbsolute) { dialogProperties.rgRemoveModes.push(QGroundControl.AltitudeModeAbsolute) } // Remove modes specified by consumer for (var i=0; i<dialogProperties.rgRemoveModes.length; i++) { for (var j=0; j<buttonModel.count; j++) { if (buttonModel.get(j).modeValue == dialogProperties.rgRemoveModes[i]) { buttonModel.remove(j) break } } } buttonRepeater.model = buttonModel } ListModel { id: buttonModel ListElement { modeName: qsTr("Relative To Launch") help: qsTr("Specified altitudes are relative to launch position height.") modeValue: QGroundControl.AltitudeModeRelative } ListElement { modeName: qsTr("AMSL") help: qsTr("Specified altitudes are Above Mean Sea Level.") modeValue: QGroundControl.AltitudeModeAbsolute } ListElement { modeName: qsTr("Calculated Above Terrain") help: qsTr("Specified altitudes are distance above terrain. Actual altitudes sent to vehicle are calculated from terrain data and sent as AMSL values.") modeValue: QGroundControl.AltitudeModeCalcAboveTerrain } ListElement { modeName: qsTr("Terrain Frame") help: qsTr("Specified altitudes are distance above terrain. The actual altitude flown is controlled by the vehicle either from terrain height maps being sent to vehicle or a distance sensor.") modeValue: QGroundControl.AltitudeModeTerrainFrame } ListElement { modeName: qsTr("Mixed Modes") help: qsTr("The altitude mode can differ for each individual item.") modeValue: QGroundControl.AltitudeModeMixed } } Column { spacing: ScreenTools.defaultFontPixelWidth Repeater { id: buttonRepeater Button { hoverEnabled: true checked: modeValue == dialogProperties.currentAltMode background: Rectangle { radius: ScreenTools.defaultFontPixelHeight / 2 color: pressed | hovered | checked ? QGroundControl.globalPalette.buttonHighlight: QGroundControl.globalPalette.button } contentItem: Column { spacing: 0 QGCLabel { id: modeNameLabel text: modeName color: pressed | hovered | checked ? QGroundControl.globalPalette.buttonHighlightText: QGroundControl.globalPalette.buttonText } QGCLabel { width: ScreenTools.defaultFontPixelWidth * 40 text: help wrapMode: Label.WordWrap font.pointSize: ScreenTools.smallFontPointSize color: modeNameLabel.color } } onClicked: { dialogProperties.updateAltModeFn(modeValue) hideDialog() } } } } }
QML
5
dlech/qgroundcontrol
src/QmlControls/AltModeDialog.qml
[ "Apache-2.0" ]
declare namespace fts="http://www.w3.org/2007/xpath-full-text"; declare function fts:matchTokenInfos ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $stopWords as xs:string*, $queryTokens as element(fts:queryToken)* ) as element(fts:tokenInfo)* {()}; declare function fts:evaluate ( $ftSelection as element(*, fts:ftSelection), $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryTokenNum as xs:integer ) as element(fts:allMatches) { if (fn:count($ftSelection/fts:matchOptions) > 0) then (: First we deal with all match options that the :) (: FTSelection might bear: we add the match options :) (: to the current match options structure, and :) (: pass the new structure to the recursive call. :) let $newFTSelection := <fts:selection>{$ftSelection/* [fn:not(self::fts:matchOptions)]}</fts:selection> return fts:evaluate($newFTSelection, $searchContext, fts:replaceMatchOptions($matchOptions, $ftSelection/fts:matchOptions), $queryTokenNum) else if (fn:count($ftSelection/fts:weight) > 0) then (: Weight has no bearing on semantics -- just :) (: call "evaluate" on nested FTSelection :) let $newFTSelection := $ftSelection/*[fn:not(self::fts:weight)] return fts:evaluate($newFTSelection, $searchContext, $matchOptions, $queryTokenNum) else typeswitch ($ftSelection/*[1]) case $nftSelection as element(fts:ftWords) return (: Apply the FTWords in the search context :) fts:ApplyFTWords($searchContext, $matchOptions, $nftSelection/@type, $nftSelection/fts:queryItem, $queryTokenNum + 1) case $nftSelection as element(fts:ftAnd) return let $left := fts:evaluate($nftSelection/fts:left, $searchContext, $matchOptions, $queryTokenNum) let $newQueryTokenNum := $left/@stokenNum let $right := fts:evaluate($nftSelection/fts:right, $searchContext, $matchOptions, $newQueryTokenNum) return fts:ApplyFTAnd($left, $right) case $nftSelection as element(fts:ftOr) return let $left := fts:evaluate($nftSelection/fts:left, $searchContext, $matchOptions, $queryTokenNum) let $newQueryTokenNum := $left/@stokenNum let $right := fts:evaluate($nftSelection/fts:right, $searchContext, $matchOptions, $newQueryTokenNum) return fts:ApplyFTOr($left, $right) case $nftSelection as element(fts:ftUnaryNot) return let $nested := fts:evaluate($nftSelection/fts:selection, $searchContext, $matchOptions, $queryTokenNum) return fts:ApplyFTUnaryNot($nested) case $nftSelection as element(fts:ftMildNot) return let $left := fts:evaluate($nftSelection/fts:left, $searchContext, $matchOptions, $queryTokenNum) let $newQueryTokenNum := $left/@stokenNum let $right := fts:evaluate($nftSelection/fts:right, $searchContext, $matchOptions, $newQueryTokenNum) return fts:ApplyFTMildNot($left, $right) case $nftSelection as element(fts:ftOrder) return let $nested := fts:evaluate($nftSelection/fts:selection, $searchContext, $matchOptions, $queryTokenNum) return fts:ApplyFTOrder($nested) case $nftSelection as element(fts:ftScope) return let $nested := fts:evaluate($nftSelection/fts:selection, $searchContext, $matchOptions, $queryTokenNum) return fts:ApplyFTScope($nftSelection/@type, $nftSelection/@scope, $nested) case $nftSelection as element(fts:ftContent) return let $nested := fts:evaluate($nftSelection/fts:selection, $searchContext, $matchOptions, $queryTokenNum) return fts:ApplyFTContent($searchContext, $nftSelection/@type, $nested) case $nftSelection as element(fts:ftDistance) return let $nested := fts:evaluate($nftSelection/fts:selection, $searchContext, $matchOptions, $queryTokenNum) return fts:ApplyFTDistance($nftSelection/@type, $nftSelection/fts:range, $nested) case $nftSelection as element(fts:ftWindow) return let $nested := fts:evaluate($nftSelection/fts:selection, $searchContext, $matchOptions, $queryTokenNum) return fts:ApplyFTWindow($nftSelection/@type, $nftSelection/@size, $nested) case $nftSelection as element(fts:ftTimes) return let $nested := fts:evaluate($nftSelection/fts:selection, $searchContext, $matchOptions, $queryTokenNum) return fts:ApplyFTTimes($nftSelection/fts:range, $nested) default return <fts:allMatches stokenNum="0" /> }; (: simplified version not dealing with special match options :) declare function fts:applyQueryTokensAsPhraseSimple ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryTokens as element(fts:queryToken)*, $queryPos as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$queryPos}"> { for $tokenInfo in fts:matchTokenInfos( $searchContext, $matchOptions, (), $queryTokens ) return <fts:match> <fts:stringInclude queryPos="{$queryPos}" isContiguous="true"> {$tokenInfo} </fts:stringInclude> </fts:match> } </fts:allMatches> }; declare function fts:MakeDisjunction ( $curRes as element(fts:allMatches), $rest as element(fts:allMatches)* ) as element(fts:allMatches) { if (fn:count($rest) = 0) then $curRes else let $firstAllMatches := $rest[1] let $restAllMatches := fn:subsequence($rest, 2) let $newCurRes := fts:ApplyFTOr($curRes, $firstAllMatches) return fts:MakeDisjunction($newCurRes, $restAllMatches) }; declare function fts:ApplyFTWordsAnyWord ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryItems as element(fts:queryItem)*, $queryPos as xs:integer ) as element(fts:allMatches) { (: Tokenization of query string has already occurred. :) (: Get sequence of QueryTokens over all query items. :) let $queryTokens := $queryItems/fts:queryToken return if (fn:count($queryItems) eq 0) then <fts:allMatches stokenNum="0" /> else let $allAllMatches := for $queryToken at $pos in $queryTokens return fts:applyQueryTokensAsPhrase($searchContext, $matchOptions, $queryToken, $queryPos + $pos - 1) let $firstAllMatches := $allAllMatches[1] let $restAllMatches := fn:subsequence($allAllMatches, 2) return fts:MakeDisjunction($firstAllMatches, $restAllMatches) }; declare function fts:MakeConjunction ( $curRes as element(fts:allMatches), $rest as element(fts:allMatches)* ) as element(fts:allMatches) { if (fn:count($rest) = 0) then $curRes else let $firstAllMatches := $rest[1] let $restAllMatches := fn:subsequence($rest, 2) let $newCurRes := fts:ApplyFTAnd($curRes, $firstAllMatches) return fts:MakeConjunction($newCurRes, $restAllMatches) }; declare function fts:ApplyFTWordsAllWord ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryItems as element(fts:queryItem)*, $queryPos as xs:integer ) as element(fts:allMatches) { (: Tokenization of query strings has already occurred. :) (: Get sequence of QueryTokens over all query items :) let $queryTokens := $queryItems/fts:queryToken return if (fn:count($queryTokens) eq 0) then <fts:allMatches stokenNum="0" /> else let $allAllMatches := for $queryToken at $pos in $queryTokens return fts:applyQueryTokensAsPhrase($searchContext, $matchOptions, $queryToken, $queryPos + $pos - 1) let $firstAllMatches := $allAllMatches[1] let $restAllMatches := fn:subsequence($allAllMatches, 2) return fts:MakeConjunction($firstAllMatches, $restAllMatches) }; declare function fts:ApplyFTWordsPhrase ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryItems as element(fts:queryItem)*, $queryPos as xs:integer ) as element(fts:allMatches) { (: Get sequence of QueryTokenInfos over all query items :) let $queryTokens := $queryItems/fts:queryToken return if (fn:count($queryTokens) eq 0) then <fts:allMatches stokenNum="0" /> else fts:applyQueryTokensAsPhrase($searchContext, $matchOptions, $queryTokens, $queryPos) }; declare function fts:ApplyFTWordsAny ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryItems as element(fts:queryItem)*, $queryPos as xs:integer ) as element(fts:allMatches) { if (fn:count($queryItems) eq 0) then <fts:allMatches stokenNum="0" /> else let $firstQueryItem := $queryItems[1] let $restQueryItem := fn:subsequence($queryItems, 2) let $firstAllMatches := fts:ApplyFTWordsPhrase($searchContext, $matchOptions, $firstQueryItem, $queryPos) let $newQueryPos := if ($firstAllMatches//@queryPos) then fn:max($firstAllMatches//@queryPos) + 1 else $queryPos let $restAllMatches := fts:ApplyFTWordsAny($searchContext, $matchOptions, $restQueryItem, $newQueryPos) return fts:ApplyFTOr($firstAllMatches, $restAllMatches) }; declare function fts:ApplyFTWordsAll ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryItems as element(fts:queryItem)*, $queryPos as xs:integer ) as element(fts:allMatches) { if (fn:count($queryItems) = 0) then <fts:allMatches stokenNum="0" /> else let $firstQueryItem := $queryItems[1] let $restQueryItem := fn:subsequence($queryItems, 2) let $firstAllMatches := fts:ApplyFTWordsPhrase($searchContext, $matchOptions, $firstQueryItem, $queryPos) return if ($restQueryItem) then let $newQueryPos := if ($firstAllMatches//@queryPos) then fn:max($firstAllMatches//@queryPos) + 1 else $queryPos let $restAllMatches := fts:ApplyFTWordsAll($searchContext, $matchOptions, $restQueryItem, $newQueryPos) return fts:ApplyFTAnd($firstAllMatches, $restAllMatches) else $firstAllMatches }; declare function fts:ApplyFTWords ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $type as fts:ftWordsType, $queryItems as element(fts:queryItem)*, $queryPos as xs:integer ) as element(fts:allMatches) { if ($type eq "any word") then fts:ApplyFTWordsAnyWord($searchContext, $matchOptions, $queryItems, $queryPos) else if ($type eq "all word") then fts:ApplyFTWordsAllWord($searchContext, $matchOptions, $queryItems, $queryPos) else if ($type eq "phrase") then fts:ApplyFTWordsPhrase($searchContext, $matchOptions, $queryItems, $queryPos) else if ($type eq "any") then fts:ApplyFTWordsAny($searchContext, $matchOptions, $queryItems, $queryPos) else fts:ApplyFTWordsAll($searchContext, $matchOptions, $queryItems, $queryPos) }; declare function fts:applyQueryTokensAsPhrase ( $searchContext as item(), $matchOptions as element(fts:matchOptions), $queryTokens as element(fts:queryToken)*, $queryPos as xs:integer ) as element(fts:allMatches) { let $thesaurusOption := $matchOptions/fts:thesaurus[1] return if ($thesaurusOption and $thesaurusOption/@thesaurusIndicator eq "with") then let $noThesaurusOptions := <fts:matchOptions>{ $matchOptions/*[fn:not(self::fts:thesaurus)] }</fts:matchOptions> let $lookupRes := fts:applyThesaurusOption($thesaurusOption, $queryTokens) return fts:ApplyFTWordsAny($searchContext, $noThesaurusOptions, $lookupRes, $queryPos) else (: from here on we have a single sequence of query tokens :) (: which is to be matched a phrase; no alternatives anymore :) <fts:allMatches stokenNum="{$queryPos}"> { for $pos in fts:matchTokenInfos( $searchContext, $matchOptions, fts:applyStopWordOption($matchOptions/fts:stopwords), $queryTokens ) return <fts:match> <fts:stringInclude queryPos="{$queryPos}" isContiguous="true"> {$pos} </fts:stringInclude> </fts:match> } </fts:allMatches> }; declare function fts:replaceMatchOptions ( $matchOptions as element(fts:matchOptions), $newMatchOptions as element(fts:matchOptions) ) as element(fts:matchOptions) { <fts:matchOptions> { (if ($newMatchOptions/fts:thesaurus) then $newMatchOptions/fts:thesaurus else $matchOptions/fts:thesaurus), (if ($newMatchOptions/fts:stopwords) then $newMatchOptions/fts:stopwords else $matchOptions/fts:stopwords), (if ($newMatchOptions/fts:case) then $newMatchOptions/fts:case else $matchOptions/fts:case), (if ($newMatchOptions/fts:diacritics) then $newMatchOptions/fts:diacritics else $matchOptions/fts:diacritics), (if ($newMatchOptions/fts:stem) then $newMatchOptions/fts:stem else $matchOptions/fts:stem), (if ($newMatchOptions/fts:wildcard) then $newMatchOptions/fts:wildcard else $matchOptions/fts:wildcard), (if ($newMatchOptions/fts:language) then $newMatchOptions/fts:language else $matchOptions/fts:language) } </fts:matchOptions> }; declare function fts:resolveStopWordsUri ( $uri as xs:string? ) as xs:string* {()}; declare function fts:lookupThesaurus ( $tokens as element(fts:queryToken)*, $thesaurusName as xs:string?, $thesaurusLanguage as xs:string?, $relationship as xs:string?, $range as element(fts:range)? ) as element(fts:queryItem)* {()}; declare function fts:applyThesaurusOption ( $matchOption as element(fts:thesaurus), $queryTokens as element(fts:queryToken)* ) as element(fts:queryItem)* { if ($matchOption/@thesaurusIndicator = "with") then fts:lookupThesaurus( $queryTokens, $matchOption/fts:thesaurusName, $matchOption/@language, $matchOption/fts:relationship, $matchOption/fts:range ) else if ($matchOption/@thesaurusIndicator = "without") then <fts:queryItem> {$queryTokens} </fts:queryItem> else () }; declare function fts:applyStopWordOption ( $stopWordOption as element(fts:stopwords)? ) as xs:string* { if ($stopWordOption) then let $swords := typeswitch ($stopWordOption/*[1]) case $e as element(fts:stopword) return $e/text() case $e as element(fts:uri) return fts:resolveStopWordsUri($e/text()) case element(fts:default-stopwords) return fts:resolveStopWordsUri(()) default return () return fts:calcStopWords( $swords, $stopWordOption/fts:oper ) else () }; declare function fts:calcStopWords ( $stopWords as xs:string*, $opers as element(fts:oper)* ) as xs:string* { if ( fn:empty($opers) ) then $stopWords else let $swords := typeswitch ($opers[1]/*[1]) case $e as element(fts:stopword) return $e/text() case $e as element(fts:uri) return fts:resolveStopWordsUri($e/text()) default return () return if ($opers[1]/@type eq "union") then fts:calcStopWords( ($stopWords, $swords), $opers[fn:position() gt 2] ) else (: "except" :) fts:calcStopWords( $stopWords[fn:not(.)=$swords], $opers[fn:position() gt 2] ) }; declare function fts:ApplyFTOr ( $allMatches1 as element(fts:allMatches), $allMatches2 as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{fn:max(($allMatches1/@stokenNum, $allMatches2/@stokenNum))}"> {$allMatches1/fts:match,$allMatches2/fts:match} </fts:allMatches> }; declare function fts:ApplyFTAnd ( $allMatches1 as element(fts:allMatches), $allMatches2 as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{fn:max(($allMatches1/@stokenNum, $allMatches2/@stokenNum))}" > { for $sm1 in $allMatches1/fts:match for $sm2 in $allMatches2/fts:match return <fts:match> {$sm1/*, $sm2/*} </fts:match> } </fts:allMatches> }; declare function fts:InvertStringMatch ( $strm as element(*,fts:stringMatch) ) as element(*,fts:stringMatch) { if ($strm instance of element(fts:stringExclude)) then <fts:stringInclude queryPos="{$strm/@queryPos}" isContiguous="{$strm/@isContiguous}"> {$strm/fts:tokenInfo} </fts:stringInclude> else <fts:stringExclude queryPos="{$strm/@queryPos}" isContiguous="{$strm/@isContiguous}"> {$strm/fts:tokenInfo} </fts:stringExclude> }; declare function fts:UnaryNotHelper ( $matches as element(fts:match)* ) as element(fts:match)* { if (fn:empty($matches)) then <fts:match/> else for $sm in $matches[1]/* for $rest in fts:UnaryNotHelper( fn:subsequence($matches, 2) ) return <fts:match> { fts:InvertStringMatch($sm), $rest/* } </fts:match> }; declare function fts:ApplyFTUnaryNot ( $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { fts:UnaryNotHelper($allMatches/fts:match) } </fts:allMatches> }; declare function fts:CoveredIncludePositions ( $match as element(fts:match) ) as xs:integer* { for $strInclude in $match/fts:stringInclude return $strInclude/fts:tokenInfo/@startPos to $strInclude/fts:tokenInfo/@endPos }; declare function fts:ApplyFTMildNot ( $allMatches1 as element(fts:allMatches), $allMatches2 as element(fts:allMatches) ) as element(fts:allMatches) { if (fn:count($allMatches1//fts:stringExclude) gt 0) then fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'FTDY0017'), "Invalid expression on the left-hand side of a not-in") else if (fn:count($allMatches2//fts:stringExclude) gt 0) then fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'FTDY0017'), "Invalid expression on the right-hand side of a not-in") else if (fn:count($allMatches2//fts:stringInclude) eq 0) then $allMatches1 else <fts:allMatches stokenNum="{$allMatches1/@stokenNum}"> { $allMatches1/fts:match[ every $matches2 in $allMatches2/fts:match satisfies let $posSet1 := fts:CoveredIncludePositions(.) let $posSet2 := fts:CoveredIncludePositions($matches2) return some $pos in $posSet1 satisfies fn:not($pos = $posSet2) ] } </fts:allMatches> }; declare function fts:ApplyFTOrder ( $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match where every $stringInclude1 in $match/fts:stringInclude, $stringInclude2 in $match/fts:stringInclude satisfies (($stringInclude1/fts:tokenInfo/@startPos <= $stringInclude2/fts:tokenInfo/@startPos) and ($stringInclude1/@queryPos <= $stringInclude2/@queryPos)) or (($stringInclude1/fts:tokenInfo/@startPos>= $stringInclude2/fts:tokenInfo/@startPos) and ($stringInclude1/@queryPos >= $stringInclude2/@queryPos)) return <fts:match> { $match/fts:stringInclude, for $stringExcl in $match/fts:stringExclude where every $stringIncl in $match/fts:stringInclude satisfies (($stringExcl/fts:tokenInfo/@startPos <= $stringIncl/fts:tokenInfo/@startPos) and ($stringExcl/@queryPos <= $stringIncl/@queryPos)) or (($stringExcl/fts:tokenInfo/@startPos >= $stringIncl/fts:tokenInfo/@startPos) and ($stringExcl/@queryPos >= $stringIncl/@queryPos)) return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTScopeSameSentence ( $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match where every $stringInclude1 in $match/fts:stringInclude, $stringInclude2 in $match/fts:stringInclude satisfies $stringInclude1/fts:tokenInfo/@startSent = $stringInclude2/fts:tokenInfo/@startSent and $stringInclude1/fts:tokenInfo/@startSent = $stringInclude1/fts:tokenInfo/@endSent and $stringInclude2/fts:tokenInfo/@startSent = $stringInclude2/fts:tokenInfo/@endSent and $stringInclude1/fts:tokenInfo/@startSent > 0 and $stringInclude2/fts:tokenInfo/@startSent > 0 return <fts:match> { $match/fts:stringInclude, for $stringExcl in $match/fts:stringExclude where $stringExcl/fts:tokenInfo/@startSent = 0 or ($stringExcl/fts:tokenInfo/@startSent = $stringExcl/fts:tokenInfo/@endSent and (every $stringIncl in $match/fts:stringInclude satisfies $stringIncl/fts:tokenInfo/@startSent = $stringExcl/fts:tokenInfo/@startSent) ) return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTScopeDifferentSentence ( $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match where every $stringInclude1 in $match/fts:stringInclude, $stringInclude2 in $match/fts:stringInclude satisfies $stringInclude1 is $stringInclude2 or $stringInclude1/fts:tokenInfo/@endSent < $stringInclude2/fts:tokenInfo/@startSent or $stringInclude2/fts:tokenInfo/@endSent < $stringInclude1/fts:tokenInfo/@startSent return <fts:match> { $match/fts:stringInclude, for $stringExcl in $match/fts:stringExclude where every $stringIncl in $match/fts:stringInclude satisfies $stringExcl/fts:tokenInfo/@endSent < $stringIncl/fts:tokenInfo/@startSent or $stringIncl/fts:tokenInfo/@endSent < $stringExcl/fts:tokenInfo/@startSent return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTScopeSameParagraph ( $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match where every $stringInclude1 in $match/fts:stringInclude, $stringInclude2 in $match/fts:stringInclude satisfies $stringInclude1/fts:tokenInfo/@startPara = $stringInclude2/fts:tokenInfo/@startPara and $stringInclude1/fts:tokenInfo/@startPara = $stringInclude1/fts:tokenInfo/@endPara and $stringInclude2/fts:tokenInfo/@startPara = $stringInclude2/fts:tokenInfo/@endPara and $stringInclude1/fts:tokenInfo/@startPara > 0 and $stringInclude2/fts:tokenInfo/@endPara > 0 return <fts:match> { $match/fts:stringInclude, for $stringExcl in $match/fts:stringExclude where $stringExcl/fts:tokenInfo/@startPara = 0 or ($stringExcl/fts:tokenInfo/@startPara = $stringExcl/fts:tokenInfo/@endPara and (every $stringIncl in $match/fts:stringInclude satisfies $stringIncl/fts:tokenInfo/@startPara = $stringExcl/fts:tokenInfo/@startPara) ) return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTScopeDifferentParagraph ( $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match where every $stringInclude1 in $match/fts:stringInclude, $stringInclude2 in $match/fts:stringInclude satisfies $stringInclude1 is $stringInclude2 or $stringInclude1/fts:tokenInfo/@endPara < $stringInclude2/fts:tokenInfo/@startPara or $stringInclude2/fts:tokenInfo/@endPara < $stringInclude1/fts:tokenInfo/@startPara return <fts:match> { $match/fts:stringInclude, for $stringExcl in $match/fts:stringExclude where every $stringIncl in $match/fts:stringInclude satisfies $stringExcl/fts:tokenInfo/@endPara < $stringIncl/fts:tokenInfo/@startPara or $stringIncl/fts:tokenInfo/@endPara < $stringExcl/fts:tokenInfo/@startPara return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTScope ( $type as fts:scopeType, $selector as fts:scopeSelector, $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { if ($type eq "same" and $selector eq "sentence") then fts:ApplyFTScopeSameSentence($allMatches) else if ($type eq "different" and $selector eq "sentence") then fts:ApplyFTScopeDifferentSentence($allMatches) else if ($type eq "same" and $selector eq "paragraph") then fts:ApplyFTScopeSameParagraph($allMatches) else fts:ApplyFTScopeDifferentParagraph($allMatches) }; declare function fts:ApplyFTContent ( $searchContext as item(), $type as fts:contentMatchType, $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { $allMatches/fts:match[ let $start_pos := fts:getLowestTokenPosition($searchContext), $end_pos := fts:getHighestTokenPosition($searchContext), $match := . return if ($type eq "entire content") then every $pos in $start_pos to $end_pos satisfies some $si in $match/fts:stringInclude[data(@isContiguous)] satisfies fts:TokenInfoCoversTokenPosition($si/fts:tokenInfo, $pos) else let $pos := if ($type eq "at start") then $start_pos else (: $type eq "at end" :) $end_pos return some $ti in $match/fts:stringInclude/fts:tokenInfo satisfies fts:TokenInfoCoversTokenPosition($ti, $pos) ] } </fts:allMatches> }; declare function fts:TokenInfoCoversTokenPosition( $tokenInfo as element(fts:tokenInfo), $tokenPosition as xs:integer ) as xs:boolean { ($tokenPosition >= $tokenInfo/@startPos) and ($tokenPosition <= $tokenInfo/@endPos) }; declare function fts:getLowestTokenPosition( $searchContext as item() ) as xs:integer {3}; declare function fts:getHighestTokenPosition( $searchContext as item() ) as xs:integer {3}; declare function fts:joinIncludes( $strIncls as element(fts:stringInclude)* ) as element(fts:stringInclude)? { if (fn:empty($strIncls)) then $strIncls else let $posSet := fts:CoveredIncludePositions(<fts:match>$strIncls</fts:match>), $minPos := fn:min($strIncls/fts:tokenInfo/@startPos), $maxPos := fn:max($strIncls/fts:tokenInfo/@endPos), $isContiguous := ( every $pos in $minPos to $maxPos satisfies ($pos = $posSet) ) and ( every $strIncl in $strIncls satisfies $strIncl/@isContiguous ) return <fts:stringInclude queryPos="{$strIncls[1]/@queryPos}" isContiguous="{$isContiguous}"> <fts:tokenInfo startPos ="{$minPos}" endPos ="{$maxPos}" startSent="{fn:min($strIncls/fts:tokenInfo/@startSent)}" endSent ="{fn:max($strIncls/fts:tokenInfo/@endSent)}" startPara="{fn:min($strIncls/fts:tokenInfo/@startPara)}" endPara ="{fn:max($strIncls/fts:tokenInfo/@endPara)}"/> </fts:stringInclude> }; declare function fts:ApplyFTWordWindow ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $minpos := fn:min($match/fts:stringInclude/fts:tokenInfo/@startPos), $maxpos := fn:max($match/fts:stringInclude/fts:tokenInfo/@endPos) for $windowStartPos in ($maxpos - $n + 1 to $minpos) let $windowEndPos := $windowStartPos + $n - 1 return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExclude in $match/fts:stringExclude where $stringExclude/fts:tokenInfo/@startPos >= $windowStartPos and $stringExclude/fts:tokenInfo/@endPos <= $windowEndPos return $stringExclude } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTSentenceWindow ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $minpos := fn:min($match/fts:stringInclude/fts:tokenInfo/@startSent), $maxpos := fn:max($match/fts:stringInclude/fts:tokenInfo/@endSent) for $windowStartPos in ($maxpos - $n + 1 to $minpos) let $windowEndPos := $windowStartPos + $n - 1 return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExclude in $match/fts:stringExclude where $stringExclude/fts:tokenInfo/@startSent >= $windowStartPos and $stringExclude/fts:tokenInfo/@endSent <= $windowEndPos return $stringExclude } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTParagraphWindow ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $minpos := fn:min($match/fts:stringInclude/fts:tokenInfo/@startPara), $maxpos := fn:max($match/fts:stringInclude/fts:tokenInfo/@endPara) for $windowStartPos in ($maxpos - $n + 1 to $minpos) let $windowEndPos := $windowStartPos + $n - 1 return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExclude in $match/fts:stringExclude where $stringExclude/fts:tokenInfo/@startPara >= $windowStartPos and $stringExclude/fts:tokenInfo/@endPara <= $windowEndPos return $stringExclude } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTWindow ( $type as fts:distanceType, $size as xs:integer, $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { if ($type eq "word") then fts:ApplyFTWordWindow($allMatches, $size) else if ($type eq "sentence") then fts:ApplyFTSentenceWindow($allMatches, $size) else fts:ApplyFTParagraphWindow($allMatches, $size) }; declare function fts:ApplyFTDistance ( $type as fts:distanceType, $range as element(fts:range), $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { if ($type eq "word") then if ($range/@type eq "exactly") then fts:ApplyFTWordDistanceExactly($allMatches, $range/@n) else if ($range/@type eq "at least") then fts:ApplyFTWordDistanceAtLeast($allMatches, $range/@n) else if ($range/@type eq "at most") then fts:ApplyFTWordDistanceAtMost( $allMatches, $range/@n) else fts:ApplyFTWordDistanceFromTo( $allMatches, $range/@m, $range/@n) else if ($type eq "sentence") then if ($range/@type eq "exactly") then fts:ApplyFTSentenceDistanceExactly($allMatches, $range/@n) else if ($range/@type eq "at least") then fts:ApplyFTSentenceDistanceAtLeast($allMatches, $range/@n) else if ($range/@type eq "at most") then fts:ApplyFTSentenceDistanceAtMost( $allMatches, $range/@n) else fts:ApplyFTSentenceDistanceFromTo( $allMatches, $range/@m, $range/@n) else if ($range/@type eq "exactly") then fts:ApplyFTParagraphDistanceExactly($allMatches, $range/@n) else if ($range/@type eq "at least") then fts:ApplyFTParagraphDistanceAtLeast($allMatches, $range/@n) else if ($range/@type eq "at most") then fts:ApplyFTParagraphDistanceAtMost( $allMatches, $range/@n) else fts:ApplyFTParagraphDistanceFromTo( $allMatches, $range/@m, $range/@n) }; declare function fts:ApplyFTWordDistanceExactly( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPos ascending, $si/fts:tokenInfo/@endPos ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $idx in 1 to fn:count($sorted) - 1 satisfies fts:wordDistance( $sorted[$idx]/fts:tokenInfo, $sorted[$idx+1]/fts:tokenInfo ) = $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:wordDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) = $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTWordDistanceAtLeast ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPos ascending, $si/fts:tokenInfo/@endPos ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:wordDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) >= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:wordDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) >= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTWordDistanceAtMost ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPos ascending, $si/fts:tokenInfo/@endPos ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:wordDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) <= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:wordDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) <= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTWordDistanceFromTo ( $allMatches as element(fts:allMatches), $m as xs:integer, $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPos ascending, $si/fts:tokenInfo/@endPos ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:wordDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) >= $m and fts:wordDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) <= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:wordDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) >= $m and fts:wordDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) <= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:wordDistance ( $tokenInfo1 as element(fts:tokenInfo), $tokenInfo2 as element(fts:tokenInfo) ) as xs:integer { (: Ensure tokens are in order :) let $sorted := for $ti in ($tokenInfo1, $tokenInfo2) order by $ti/@startPos ascending, $ti/@endPos ascending return $ti return (: -1 because we count starting at 0 :) $sorted[2]/@startPos - $sorted[1]/@endPos - 1 }; declare function fts:ApplyFTSentenceDistanceExactly ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startSent ascending, $si/fts:tokenInfo/@endSent ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:sentenceDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) = $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:sentenceDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) = $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTSentenceDistanceAtLeast ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startSent ascending, $si/fts:tokenInfo/@endSent ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:sentenceDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) >= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:sentenceDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) >= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTSentenceDistanceAtMost ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startSent ascending, $si/fts:tokenInfo/@endSent ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:sentenceDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) <= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:sentenceDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) <= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTSentenceDistanceFromTo ( $allMatches as element(fts:allMatches), $m as xs:integer, $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startSent ascending, $si/fts:tokenInfo/@endSent ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:sentenceDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) >= $m and fts:sentenceDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) <= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:sentenceDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) >= $m and fts:sentenceDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) <= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:sentenceDistance ( $tokenInfo1 as element(fts:tokenInfo), $tokenInfo2 as element(fts:tokenInfo) ) as xs:integer { (: Ensure tokens are in order :) let $sorted := for $ti in ($tokenInfo1, $tokenInfo2) order by $ti/@startPos ascending, $ti/@endPos ascending return $ti return (: -1 because we count starting at 0 :) $sorted[2]/@startSent - $sorted[1]/@endSent - 1 }; declare function fts:ApplyFTParagraphDistanceExactly ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPara ascending, $si/fts:tokenInfo/@endPara ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:paraDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) = $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:paraDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) = $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTParagraphDistanceAtLeast ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPara ascending, $si/fts:tokenInfo/@endPara ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:paraDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) >= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:paraDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) >= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTParagraphDistanceAtMost ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPara ascending, $si/fts:tokenInfo/@endPara ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:paraDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) <= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:paraDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) <= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:ApplyFTParagraphDistanceFromTo ( $allMatches as element(fts:allMatches), $m as xs:integer, $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match let $sorted := for $si in $match/fts:stringInclude order by $si/fts:tokenInfo/@startPara ascending, $si/fts:tokenInfo/@endPara ascending return $si where if (fn:count($sorted) le 1) then fn:true() else every $index in (1 to fn:count($sorted) - 1) satisfies fts:paraDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) >= $m and fts:paraDistance( $sorted[$index]/fts:tokenInfo, $sorted[$index+1]/fts:tokenInfo ) <= $n return <fts:match> { fts:joinIncludes($match/fts:stringInclude), for $stringExcl in $match/fts:stringExclude where some $stringIncl in $match/fts:stringInclude satisfies fts:paraDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) >= $m and fts:paraDistance( $stringIncl/fts:tokenInfo, $stringExcl/fts:tokenInfo ) <= $n return $stringExcl } </fts:match> } </fts:allMatches> }; declare function fts:paraDistance ( $tokenInfo1 as element(fts:tokenInfo), $tokenInfo2 as element(fts:tokenInfo) ) as xs:integer { (: Ensure tokens are in order :) let $sorted := for $ti in ($tokenInfo1, $tokenInfo2) order by $ti/@startPos ascending, $ti/@endPos ascending return $ti return (: -1 because we count starting at 0 :) $sorted[2]/@startPara - $sorted[1]/@endPara - 1 }; declare function fts:FormCombinations ( $sms as element(fts:match)*, $k as xs:integer ) as element(fts:match)* (: Find all combinations of exactly $k elements from $sms, and for each such combination, construct a match whose children are copies of all the children of all the elements in the combination. Return the sequence of all such matches. :) { if ($k eq 0) then <fts:match/> else if (fn:count($sms) lt $k) then () else if (fn:count($sms) eq $k) then <fts:match>{$sms/*}</fts:match> else let $first := $sms[1], $rest := fn:subsequence($sms, 2) return ( (: all the combinations that does not involve $first :) fts:FormCombinations($rest, $k), (: and all the combinations that do involve $first :) for $combination in fts:FormCombinations($rest, $k - 1) return <fts:match> { $first/*, $combination/* } </fts:match> ) }; declare function fts:FormCombinationsAtLeast ( $sms as element(fts:match)*, $times as xs:integer) as element(fts:match)* (: Find all combinations of $times or more elements from $sms, and for each such combination, construct a match whose children are copies of all the children of all the elements in the combination. Return the sequence of all such matches. :) { for $k in $times to fn:count($sms) return fts:FormCombinations($sms, $k) }; declare function fts:FormRange ( $sms as element(fts:match)*, $l as xs:integer, $u as xs:integer, $stokenNum as xs:integer ) as element(fts:allMatches) { if ($l > $u) then <fts:allMatches stokenNum="0" /> else let $am1 := <fts:allMatches stokenNum="{$stokenNum}"> {fts:FormCombinationsAtLeast($sms, $l)} </fts:allMatches> let $am2 := <fts:allMatches stokenNum="{$stokenNum}"> {fts:FormCombinationsAtLeast($sms, $u+1)} </fts:allMatches> return fts:ApplyFTAnd($am1, fts:ApplyFTUnaryNot($am2)) }; declare function fts:ApplyFTTimesExactly ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { fts:FormRange($allMatches/fts:match, $n, $n, $allMatches/@stokenNum) }; declare function fts:ApplyFTTimesAtLeast ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> {fts:FormCombinationsAtLeast($allMatches/fts:match, $n)} </fts:allMatches> }; declare function fts:ApplyFTTimesAtMost ( $allMatches as element(fts:allMatches), $n as xs:integer ) as element(fts:allMatches) { fts:FormRange($allMatches/fts:match, 0, $n, $allMatches/@stokenNum) }; declare function fts:ApplyFTTimesFromTo ( $allMatches as element(fts:allMatches), $m as xs:integer, $n as xs:integer ) as element(fts:allMatches) { fts:FormRange($allMatches/fts:match, $m, $n, $allMatches/@stokenNum) }; declare function fts:ApplyFTTimes ( $range as element(fts:range), $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { if (fn:count($allMatches//fts:stringExclude) gt 0) then fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'XPST0003')) else if ($range/@type eq "exactly") then fts:ApplyFTTimesExactly($allMatches, $range/@n) else if ($range/@type eq "at least") then fts:ApplyFTTimesAtLeast($allMatches, $range/@n) else if ($range/@type eq "at most") then fts:ApplyFTTimesAtMost($allMatches, $range/@n) else fts:ApplyFTTimesFromTo($allMatches, $range/@m, $range/@n) }; declare function fts:FTContainsExpr ( $searchContextItems as item()*, $ignoreNodes as node()*, $ftSelection as element(*,fts:ftSelection), $defOptions as element(fts:matchOptions) ) as xs:boolean { some $searchContext in $searchContextItems satisfies let $newSearchContext := fts:reconstruct( $searchContext, $ignoreNodes ) return if (fn:empty($newSearchContext)) then fn:false() else let $allMatches := fts:evaluate($ftSelection, $newSearchContext, $defOptions, 0) return some $match in $allMatches/fts:match satisfies fn:count($match/fts:stringExclude) eq 0 }; declare function fts:reconstruct ( $n as item(), $ignore as node()* ) as item()? { typeswitch ($n) case node() return if (some $i in $ignore satisfies $n is $i) then () else if ($n instance of element()) then let $nodeName := fn:node-name($n) let $nodeContent := for $nn in $n/node() return fts:reconstruct($nn,$ignore) return element {$nodeName} {$nodeContent} else if ($n instance of document-node()) then document { for $nn in $n/node() return fts:reconstruct($nn, $ignore) } else $n default return $n }; 1
XQuery
5
JensErat/basex
basex-examples/src/main/resources/xml/xqft.xq
[ "BSD-3-Clause" ]
HAI 1.2 BTW Opens LOLCODE program HOW IZ I scary YR numbr BTW This is a Function IM IN YR loop UPPIN YR var TIL BOTH SAEM var AN numbr BTW For Loop with Range NOT BOTH SAEM var AN 0, O RLY? BTW LOLCode is 0 indexed, If Statement skips outputting 0 YA RLY, BOTH SAEM MOD OF var AN 3 AN 0, O RLY? BTW If Statement check for mod 3 YA RLY, BOTH SAEM MOD OF var AN 5 AN 0, O RLY? BTW If Statement check for mod 5 YA RLY, VISIBLE "SPIDERS" BTW Output WIN (True) NO WAI, VISIBLE "KATS" BTW Output FAIL (False) (modulo 3) OIC BTW Close If Statement MEBBE BOTH SAEM MOD OF var AN 5 AN 0 BTW Else Statement check for mod 5 VISIBLE "BATS" BTW Output WIN NO WAI, VISIBLE var BTW Output FAIL OIC BTW Close If Statement OIC BTW Close If Statement IM OUTTA YR loop BTW Closes Loop IF U SAY SO BTW Closes Function I HAS A numbr BTW Sets var 'numbr' VISIBLE "GIMMEH NUMBR" BTW Requests input from user GIMMEH numbr BTW Sets var 'numbr' as type String from input numbr R MAEK numbr NUMBR BTW Converts var 'numbr' to type Int I IZ scary YR SUM OF numbr AN 1 MKAY BTW Calls Function and passes numbr + 1 KTHXBYE BTW Closes LOLCODE program
LOLCODE
5
PushpneetSingh/Hello-world
LOLCODE/scary.lol
[ "MIT" ]
Red/System [ Title: "Red/System empty script" Author: "Nenad Rakocevic" File: %empty.reds Tabs: 4 Rights: "Copyright (C) 2011-2018 Red Foundation. All rights reserved." License: "BSD-3 - https://github.com/red/red/blob/master/BSD-3-License.txt" ]
Red
0
0xflotus/red
system/tests/source/compiler/empty.reds
[ "BSL-1.0", "BSD-3-Clause" ]
#!/bin/bash set -eux ############################################################################## # Common util functions for Android build scripts. ############################################################################## if [ -z "$PYTORCH_DIR" ]; then echo "PYTORCH_DIR not set!" exit 1 fi check_android_sdk() { if [ -z "$ANDROID_HOME" ]; then echo "ANDROID_HOME not set; please set it to Android sdk directory" exit 1 fi if [ ! -d "$ANDROID_HOME" ]; then echo "ANDROID_HOME not a directory; did you install it under $ANDROID_HOME?" exit 1 fi echo "ANDROID_HOME:$ANDROID_HOME" } check_gradle() { GRADLE_PATH=$PYTORCH_DIR/android/gradlew echo "GRADLE_PATH:$GRADLE_PATH" } parse_abis_list() { ABIS_LIST="x86" CUSTOM_ABIS_LIST=false if [ $# -gt 0 ]; then ABIS_LIST=$1 CUSTOM_ABIS_LIST=true fi echo "ABIS_LIST:$ABIS_LIST" echo "CUSTOM_ABIS_LIST:$CUSTOM_ABIS_LIST" } build_android() { PYTORCH_ANDROID_DIR="$PYTORCH_DIR/android" BUILD_ROOT="${BUILD_ROOT:-$PYTORCH_DIR}" echo "BUILD_ROOT:$BUILD_ROOT" LIB_DIR="$PYTORCH_ANDROID_DIR/pytorch_android/src/main/jniLibs" INCLUDE_DIR="$PYTORCH_ANDROID_DIR/pytorch_android/src/main/cpp/libtorch_include" # These directories only contain symbolic links. rm -rf "$LIB_DIR" && mkdir -p "$LIB_DIR" rm -rf "$INCLUDE_DIR" && mkdir -p "$INCLUDE_DIR" for abi in $(echo "$ABIS_LIST" | tr ',' '\n') do echo "abi:$abi" ANDROID_BUILD_ROOT="$BUILD_ROOT/build_android_$abi" ANDROID_ABI="$abi" \ BUILD_ROOT="$ANDROID_BUILD_ROOT" \ "$PYTORCH_DIR/scripts/build_android.sh" \ -DANDROID_CCACHE="$(which ccache)" \ -DUSE_LITE_INTERPRETER_PROFILER="OFF" echo "$abi build output lib,include at $ANDROID_BUILD_ROOT/install" ln -s "$ANDROID_BUILD_ROOT/install/lib" "$LIB_DIR/$abi" ln -s "$ANDROID_BUILD_ROOT/install/include" "$INCLUDE_DIR/$abi" done }
Shell
4
Hacky-DH/pytorch
android/common.sh
[ "Intel" ]
#!/usr/bin/env python3 from __future__ import annotations from typing import Any, Generic, Iterable, Iterator, TypeVar T = TypeVar("T", bound=bool) class SkewNode(Generic[T]): """ One node of the skew heap. Contains the value and references to two children. """ def __init__(self, value: T) -> None: self._value: T = value self.left: SkewNode[T] | None = None self.right: SkewNode[T] | None = None @property def value(self) -> T: """Return the value of the node.""" return self._value @staticmethod def merge( root1: SkewNode[T] | None, root2: SkewNode[T] | None ) -> SkewNode[T] | None: """Merge 2 nodes together.""" if not root1: return root2 if not root2: return root1 if root1.value > root2.value: root1, root2 = root2, root1 result = root1 temp = root1.right result.right = root1.left result.left = SkewNode.merge(temp, root2) return result class SkewHeap(Generic[T]): """ A data structure that allows inserting a new value and to pop the smallest values. Both operations take O(logN) time where N is the size of the structure. Wiki: https://en.wikipedia.org/wiki/Skew_heap Visualization: https://www.cs.usfca.edu/~galles/visualization/SkewHeap.html >>> list(SkewHeap([2, 3, 1, 5, 1, 7])) [1, 1, 2, 3, 5, 7] >>> sh = SkewHeap() >>> sh.pop() Traceback (most recent call last): ... IndexError: Can't get top element for the empty heap. >>> sh.insert(1) >>> sh.insert(-1) >>> sh.insert(0) >>> list(sh) [-1, 0, 1] """ def __init__(self, data: Iterable[T] | None = ()) -> None: """ >>> sh = SkewHeap([3, 1, 3, 7]) >>> list(sh) [1, 3, 3, 7] """ self._root: SkewNode[T] | None = None if data: for item in data: self.insert(item) def __bool__(self) -> bool: """ Check if the heap is not empty. >>> sh = SkewHeap() >>> bool(sh) False >>> sh.insert(1) >>> bool(sh) True >>> sh.clear() >>> bool(sh) False """ return self._root is not None def __iter__(self) -> Iterator[T]: """ Returns sorted list containing all the values in the heap. >>> sh = SkewHeap([3, 1, 3, 7]) >>> list(sh) [1, 3, 3, 7] """ result: list[Any] = [] while self: result.append(self.pop()) # Pushing items back to the heap not to clear it. for item in result: self.insert(item) return iter(result) def insert(self, value: T) -> None: """ Insert the value into the heap. >>> sh = SkewHeap() >>> sh.insert(3) >>> sh.insert(1) >>> sh.insert(3) >>> sh.insert(7) >>> list(sh) [1, 3, 3, 7] """ self._root = SkewNode.merge(self._root, SkewNode(value)) def pop(self) -> T | None: """ Pop the smallest value from the heap and return it. >>> sh = SkewHeap([3, 1, 3, 7]) >>> sh.pop() 1 >>> sh.pop() 3 >>> sh.pop() 3 >>> sh.pop() 7 >>> sh.pop() Traceback (most recent call last): ... IndexError: Can't get top element for the empty heap. """ result = self.top() self._root = ( SkewNode.merge(self._root.left, self._root.right) if self._root else None ) return result def top(self) -> T: """ Return the smallest value from the heap. >>> sh = SkewHeap() >>> sh.insert(3) >>> sh.top() 3 >>> sh.insert(1) >>> sh.top() 1 >>> sh.insert(3) >>> sh.top() 1 >>> sh.insert(7) >>> sh.top() 1 """ if not self._root: raise IndexError("Can't get top element for the empty heap.") return self._root.value def clear(self) -> None: """ Clear the heap. >>> sh = SkewHeap([3, 1, 3, 7]) >>> sh.clear() >>> sh.pop() Traceback (most recent call last): ... IndexError: Can't get top element for the empty heap. """ self._root = None if __name__ == "__main__": import doctest doctest.testmod()
Python
5
mudaseranwer/Python
data_structures/heap/skew_heap.py
[ "MIT" ]
namespace java services.moleculer.serializers.thrift enum DataType { DATATYPE_UNDEFINED = 0, DATATYPE_NULL = 1, DATATYPE_JSON = 2, DATATYPE_BUFFER = 3 } struct PacketEvent { 1: string ver, 2: string sender, 3: string id, 4: string event, 5: optional binary data, 6: DataType dataType, 7: list<string> groups, 8: bool broadcast, 9: string meta, 10: i32 level, 11: optional bool tracing, 12: optional string parentID, 13: optional string requestID, 14: optional bool stream, 15: optional i32 seq, 16: optional string caller, 17: bool needAck, } struct PacketRequest { 1: string ver, 2: string sender, 3: string id, 4: string action, 5: optional binary params, 6: DataType paramsType, 7: string meta, 8: double timeout, 9: i32 level, 10: optional bool tracing, 11: optional string parentID, 12: optional string requestID, 13: optional bool stream, 14: optional i32 seq, 15: optional string caller, } struct PacketResponse { 1: string ver, 2: string sender, 3: string id, 4: bool success, 5: optional binary data, 6: DataType dataType, 7: optional string error, 8: string meta, 9: optional bool stream, 10: optional i32 seq, } struct PacketDiscover { 1: string ver, 2: string sender, } struct Client { 1: string type, 2: string version, 3: string langVersion, } struct PacketInfo { 1: string ver, 2: string sender, 3: string services, 4: string config, 5: list<string> ipList, 6: string hostname, 7: Client client, 8: i32 seq, 9: string instanceID, 10: string metadata, } struct PacketDisconnect { 1: string ver, 2: string sender, } struct PacketHeartbeat { 1: string ver, 2: string sender, 3: double cpu, } struct PacketPing { 1: string ver, 2: string sender, 3: i64 time, 4: string id, } struct PacketPong { 1: string ver, 2: string sender, 3: i64 time, 4: i64 arrived, 5: string id, } struct PacketGossipHello { 1: string ver, 2: string sender, 3: string host, 4: i32 port, } struct PacketGossipRequest { 1: string ver, 2: string sender, 3: optional string online, 4: optional string offline, } struct PacketGossipResponse { 1: string ver, 2: string sender, 3: optional string online, 4: optional string offline, }
Thrift
4
hexagon6/moleculer
src/serializers/thrift/packets.thrift
[ "MIT" ]
package com.baeldung.jackson.jsonnode; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; public class GetAllKeysFromJSON { public List<String> getKeysInJsonUsingMaps(String json, ObjectMapper mapper) throws JsonMappingException, JsonProcessingException { List<String> keys = new ArrayList<>(); Map<String, Object> jsonElements = mapper.readValue(json, new TypeReference<Map<String, Object>>() { }); getAllKeys(jsonElements, keys); return keys; } private void getAllKeys(Map<String, Object> jsonElements, List<String> keys) { jsonElements.entrySet() .forEach(entry -> { keys.add(entry.getKey()); if (entry.getValue() instanceof Map) { Map<String, Object> map = (Map<String, Object>) entry.getValue(); getAllKeys(map, keys); } else if (entry.getValue() instanceof List) { List<?> list = (List<?>) entry.getValue(); list.forEach(listEntry -> { if (listEntry instanceof Map) { Map<String, Object> map = (Map<String, Object>) listEntry; getAllKeys(map, keys); } }); } }); } public List<String> getKeysInJsonUsingJsonNodeFieldNames(String json, ObjectMapper mapper) throws JsonMappingException, JsonProcessingException { List<String> keys = new ArrayList<>(); JsonNode jsonNode = mapper.readTree(json); Iterator<String> iterator = jsonNode.fieldNames(); iterator.forEachRemaining(e -> keys.add(e)); return keys; } public List<String> getAllKeysInJsonUsingJsonNodeFieldNames(String json, ObjectMapper mapper) throws JsonMappingException, JsonProcessingException { List<String> keys = new ArrayList<>(); JsonNode jsonNode = mapper.readTree(json); getAllKeysUsingJsonNodeFieldNames(jsonNode, keys); return keys; } public List<String> getAllKeysInJsonUsingJsonNodeFields(String json, ObjectMapper mapper) throws JsonMappingException, JsonProcessingException { List<String> keys = new ArrayList<>(); JsonNode jsonNode = mapper.readTree(json); getAllKeysUsingJsonNodeFields(jsonNode, keys); return keys; } private void getAllKeysUsingJsonNodeFields(JsonNode jsonNode, List<String> keys) { if (jsonNode.isObject()) { Iterator<Entry<String, JsonNode>> fields = jsonNode.fields(); fields.forEachRemaining(field -> { keys.add(field.getKey()); getAllKeysUsingJsonNodeFieldNames((JsonNode) field.getValue(), keys); }); } else if (jsonNode.isArray()) { ArrayNode arrayField = (ArrayNode) jsonNode; arrayField.forEach(node -> { getAllKeysUsingJsonNodeFieldNames(node, keys); }); } } private void getAllKeysUsingJsonNodeFieldNames(JsonNode jsonNode, List<String> keys) { if (jsonNode.isObject()) { Iterator<String> fieldNames = jsonNode.fieldNames(); fieldNames.forEachRemaining(fieldName -> { keys.add(fieldName); getAllKeysUsingJsonNodeFieldNames(jsonNode.get(fieldName), keys); }); } else if (jsonNode.isArray()) { ArrayNode arrayField = (ArrayNode) jsonNode; arrayField.forEach(node -> { getAllKeysUsingJsonNodeFieldNames(node, keys); }); } } public List<String> getKeysInJsonUsingJsonParser(String json, ObjectMapper mapper) throws IOException { List<String> keys = new ArrayList<>(); JsonNode jsonNode = mapper.readTree(json); JsonParser jsonParser = jsonNode.traverse(); while (!jsonParser.isClosed()) { if (jsonParser.nextToken() == JsonToken.FIELD_NAME) { keys.add((jsonParser.getCurrentName())); } } return keys; } public List<String> getKeysInJsonUsingJsonParser(String json) throws JsonParseException, IOException { List<String> keys = new ArrayList<>(); JsonFactory factory = new JsonFactory(); JsonParser jsonParser = factory.createParser(json); while (!jsonParser.isClosed()) { if (jsonParser.nextToken() == JsonToken.FIELD_NAME) { keys.add((jsonParser.getCurrentName())); } } return keys; } }
Java
4
DBatOWL/tutorials
jackson-modules/jackson/src/main/java/com/baeldung/jackson/jsonnode/GetAllKeysFromJSON.java
[ "MIT" ]
import * as React from 'react'; import { styled } from '@mui/material/styles'; import Box from '@mui/material/Box'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemAvatar from '@mui/material/ListItemAvatar'; import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import Avatar from '@mui/material/Avatar'; import IconButton from '@mui/material/IconButton'; import FormGroup from '@mui/material/FormGroup'; import FormControlLabel from '@mui/material/FormControlLabel'; import Checkbox from '@mui/material/Checkbox'; import Grid from '@mui/material/Grid'; import Typography from '@mui/material/Typography'; import FolderIcon from '@mui/icons-material/Folder'; import DeleteIcon from '@mui/icons-material/Delete'; function generate(element) { return [0, 1, 2].map((value) => React.cloneElement(element, { key: value, }), ); } const Demo = styled('div')(({ theme }) => ({ backgroundColor: theme.palette.background.paper, })); export default function InteractiveList() { const [dense, setDense] = React.useState(false); const [secondary, setSecondary] = React.useState(false); return ( <Box sx={{ flexGrow: 1, maxWidth: 752 }}> <FormGroup row> <FormControlLabel control={ <Checkbox checked={dense} onChange={(event) => setDense(event.target.checked)} /> } label="Enable dense" /> <FormControlLabel control={ <Checkbox checked={secondary} onChange={(event) => setSecondary(event.target.checked)} /> } label="Enable secondary text" /> </FormGroup> <Grid container spacing={2}> <Grid item xs={12} md={6}> <Typography sx={{ mt: 4, mb: 2 }} variant="h6" component="div"> Text only </Typography> <Demo> <List dense={dense}> {generate( <ListItem> <ListItemText primary="Single-line item" secondary={secondary ? 'Secondary text' : null} /> </ListItem>, )} </List> </Demo> </Grid> <Grid item xs={12} md={6}> <Typography sx={{ mt: 4, mb: 2 }} variant="h6" component="div"> Icon with text </Typography> <Demo> <List dense={dense}> {generate( <ListItem> <ListItemIcon> <FolderIcon /> </ListItemIcon> <ListItemText primary="Single-line item" secondary={secondary ? 'Secondary text' : null} /> </ListItem>, )} </List> </Demo> </Grid> </Grid> <Grid container spacing={2}> <Grid item xs={12} md={6}> <Typography sx={{ mt: 4, mb: 2 }} variant="h6" component="div"> Avatar with text </Typography> <Demo> <List dense={dense}> {generate( <ListItem> <ListItemAvatar> <Avatar> <FolderIcon /> </Avatar> </ListItemAvatar> <ListItemText primary="Single-line item" secondary={secondary ? 'Secondary text' : null} /> </ListItem>, )} </List> </Demo> </Grid> <Grid item xs={12} md={6}> <Typography sx={{ mt: 4, mb: 2 }} variant="h6" component="div"> Avatar with text and icon </Typography> <Demo> <List dense={dense}> {generate( <ListItem secondaryAction={ <IconButton edge="end" aria-label="delete"> <DeleteIcon /> </IconButton> } > <ListItemAvatar> <Avatar> <FolderIcon /> </Avatar> </ListItemAvatar> <ListItemText primary="Single-line item" secondary={secondary ? 'Secondary text' : null} /> </ListItem>, )} </List> </Demo> </Grid> </Grid> </Box> ); }
JavaScript
3
dany-freeman/material-ui
docs/data/material/components/lists/InteractiveList.js
[ "MIT" ]
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. * * The origin of this IDL file is * https://compat.spec.whatwg.org/#webkitcssmatrix-interface */ [Constructor, Constructor(DOMString transformList), Constructor(WebKitCSSMatrix other), Exposed=Window, Func="mozilla::dom::WebKitCSSMatrix::FeatureEnabled"] interface WebKitCSSMatrix : DOMMatrix { // Mutable transform methods [Throws] WebKitCSSMatrix setMatrixValue(DOMString transformList); // Immutable transform methods WebKitCSSMatrix multiply(WebKitCSSMatrix other); [Throws] WebKitCSSMatrix inverse(); WebKitCSSMatrix translate(optional unrestricted double tx = 0, optional unrestricted double ty = 0, optional unrestricted double tz = 0); WebKitCSSMatrix scale(optional unrestricted double scaleX = 1, optional unrestricted double scaleY, optional unrestricted double scaleZ = 1); WebKitCSSMatrix rotate(optional unrestricted double rotX = 0, optional unrestricted double rotY, optional unrestricted double rotZ); WebKitCSSMatrix rotateAxisAngle(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double z = 0, optional unrestricted double angle = 0); WebKitCSSMatrix skewX(optional unrestricted double sx = 0); WebKitCSSMatrix skewY(optional unrestricted double sy = 0); };
WebIDL
4
tlively/wasm-bindgen
crates/web-sys/webidls/enabled/WebKitCSSMatrix.webidl
[ "Apache-2.0", "MIT" ]
#!/usr/bin/pike // -*- mode: pike -*- // $Id: hello.pike,v 1.1 2004-05-19 18:10:16 bfulgham Exp $ // http://www.bagley.org/~doug/shootout/ int main() { write("hello world\n"); }
Pike
2
kragen/shootout
bench/hello/hello.pike
[ "BSD-3-Clause" ]
#ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif #include "myea.h" SV * my_eadvalue(pTHX_ _ead ead, int index) { SV *sv; int size = _ead_value_size(ead, index); const char *p; if (size == -1) { Perl_die(aTHX_ "Error getting size of EA: %s", strerror(errno)); } p = _ead_get_value(ead, index); return newSVpv(p, size); } #define my_eadreplace(ead, index, sv, flag) \ _ead_replace((ead), (index), flag, SvPVX(sv), SvCUR(sv)) #define my_eadadd(ead, name, sv, flag) \ _ead_add((ead), (name), flag, SvPVX(sv), SvCUR(sv)) MODULE = OS2::ExtAttr PACKAGE = OS2::ExtAttr PREFIX = my_ead SV * my_eadvalue(ead, index) _ead ead int index CODE: RETVAL = my_eadvalue(aTHX_ ead, index); OUTPUT: RETVAL int my_eadreplace(ead, index, sv, flag = 0) _ead ead int index SV * sv int flag int my_eadadd(ead, name, sv, flag = 0) _ead ead char * name SV * sv int flag MODULE = OS2::ExtAttr PACKAGE = OS2::ExtAttr PREFIX = _ea void _ea_free(ptr) struct _ea * ptr int _ea_get(dst, path, handle, name) struct _ea * dst char * path int handle char * name int _ea_put(src, path, handle, name) struct _ea * src char * path int handle char * name int _ea_remove(path, handle, name) char * path int handle char * name MODULE = OS2::ExtAttr PACKAGE = OS2::ExtAttr PREFIX = _ead int _ead_add(ead, name, flags, value, size) _ead ead char * name int flags void * value int size void _ead_clear(ead) _ead ead int _ead_copy(dst_ead, src_ead, src_index) _ead dst_ead _ead src_ead int src_index int _ead_count(ead) _ead ead _ead _ead_create() int _ead_delete(ead, index) _ead ead int index void _ead_destroy(ead) _ead ead int _ead_fea2list_size(ead) _ead ead void * _ead_fea2list_to_fealist(src) void * src void * _ead_fealist_to_fea2list(src) void * src int _ead_find(ead, name) _ead ead char * name const void * _ead_get_fea2list(ead) _ead ead int _ead_get_flags(ead, index) _ead ead int index const char * _ead_get_name(ead, index) _ead ead int index const void * _ead_get_value(ead, index) _ead ead int index int _ead_name_len(ead, index) _ead ead int index int _ead_read(ead, path, handle, flags) _ead ead char * path int handle int flags int _ead_replace(ead, index, flags, value, size) _ead ead int index int flags void * value int size void _ead_sort(ead) _ead ead int _ead_use_fea2list(ead, src) _ead ead void * src int _ead_value_size(ead, index) _ead ead int index int _ead_write(ead, path, handle, flags) _ead ead char * path int handle int flags
XS
4
vlinhd11/vlinhd11-android-scripting
perl/src/os2/OS2/ExtAttr/ExtAttr.xs
[ "Apache-2.0" ]
create table t (a int);
SQL
1
WizardXiao/tidb
br/tests/lightning_cmdline_override/data/cmdline_override.t-schema.sql
[ "Apache-2.0" ]
unit Compress; { Inno Setup Copyright (C) 1997-2010 Jordan Russell Portions by Martijn Laan For conditions of distribution and use, see LICENSE.TXT. Abstract compression classes, and some generic compression-related functions $jrsoftware: issrc/Projects/Compress.pas,v 1.14 2010/09/07 03:09:36 jr Exp $ } interface uses Windows, SysUtils, Int64Em, FileClass; type ECompressError = class(Exception); ECompressDataError = class(ECompressError); ECompressInternalError = class(ECompressError); TCompressorProps = class end; TCompressorProgressProc = procedure(BytesProcessed: Cardinal) of object; TCompressorWriteProc = procedure(const Buffer; Count: Longint) of object; TCustomCompressorClass = class of TCustomCompressor; TCustomCompressor = class private FEntered: Integer; FProgressProc: TCompressorProgressProc; FWriteProc: TCompressorWriteProc; protected procedure DoCompress(const Buffer; Count: Longint); virtual; abstract; procedure DoFinish; virtual; abstract; property ProgressProc: TCompressorProgressProc read FProgressProc; property WriteProc: TCompressorWriteProc read FWriteProc; public constructor Create(AWriteProc: TCompressorWriteProc; AProgressProc: TCompressorProgressProc; CompressionLevel: Integer; ACompressorProps: TCompressorProps); virtual; procedure Compress(const Buffer; Count: Longint); procedure Finish; end; TDecompressorReadProc = function(var Buffer; Count: Longint): Longint of object; TCustomDecompressorClass = class of TCustomDecompressor; TCustomDecompressor = class private FReadProc: TDecompressorReadProc; protected property ReadProc: TDecompressorReadProc read FReadProc; public constructor Create(AReadProc: TDecompressorReadProc); virtual; procedure DecompressInto(var Buffer; Count: Longint); virtual; abstract; procedure Reset; virtual; abstract; end; TStoredCompressor = class(TCustomCompressor) protected procedure DoCompress(const Buffer; Count: Longint); override; procedure DoFinish; override; end; TStoredDecompressor = class(TCustomDecompressor) public procedure DecompressInto(var Buffer; Count: Longint); override; procedure Reset; override; end; TCompressedBlockWriter = class private FCompressor: TCustomCompressor; FFile: TFile; FStartPos: Integer64; FTotalBytesStored: Cardinal; FInBufferCount, FOutBufferCount: Cardinal; FInBuffer, FOutBuffer: array[0..4095] of Byte; procedure CompressorWriteProc(const Buffer; Count: Longint); procedure DoCompress(const Buf; var Count: Cardinal); procedure FlushOutputBuffer; public constructor Create(AFile: TFile; ACompressorClass: TCustomCompressorClass; CompressionLevel: Integer; ACompressorProps: TCompressorProps); destructor Destroy; override; procedure Finish; procedure Write(const Buffer; Count: Cardinal); end; TCompressedBlockReader = class private FDecompressor: TCustomDecompressor; FFile: TFile; FInBytesLeft: Cardinal; FInitialized: Boolean; FInBufferNext: Cardinal; FInBufferAvail: Cardinal; FInBuffer: array[0..4095] of Byte; function DecompressorReadProc(var Buffer; Count: Longint): Longint; procedure ReadChunk; public constructor Create(AFile: TFile; ADecompressorClass: TCustomDecompressorClass); destructor Destroy; override; procedure Read(var Buffer; Count: Cardinal); end; function GetCRC32(const Buf; BufSize: Cardinal): Longint; procedure TransformCallInstructions(var Buf; Size: Integer; const Encode: Boolean; const AddrOffset: LongWord); function UpdateCRC32(CurCRC: Longint; const Buf; BufSize: Cardinal): Longint; implementation const SCompressorStateInvalid = 'Compressor state invalid'; SStoredDataError = 'Unexpected end of stream'; SCompressedBlockDataError = 'Compressed block is corrupted'; var CRC32TableInited: BOOL; CRC32Table: array[Byte] of Longint; procedure InitCRC32Table; var CRC: Longint; I, N: Integer; begin for I := 0 to 255 do begin CRC := I; for N := 0 to 7 do begin if Odd(CRC) then CRC := (CRC shr 1) xor Longint($EDB88320) else CRC := CRC shr 1; end; Crc32Table[I] := CRC; end; end; function UpdateCRC32(CurCRC: Longint; const Buf; BufSize: Cardinal): Longint; var P: ^Byte; begin if not CRC32TableInited then begin InitCRC32Table; InterlockedExchange(Integer(CRC32TableInited), Ord(True)); end; P := @Buf; while BufSize <> 0 do begin CurCRC := CRC32Table[Lo(CurCRC) xor P^] xor (CurCRC shr 8); Dec(BufSize); Inc(P); end; Result := CurCRC; end; function GetCRC32(const Buf; BufSize: Cardinal): Longint; begin Result := UpdateCRC32(Longint($FFFFFFFF), Buf, BufSize) xor Longint($FFFFFFFF); end; procedure TransformCallInstructions(var Buf; Size: Integer; const Encode: Boolean; const AddrOffset: LongWord); { [Version 3] Converts relative addresses in x86/x64 CALL and JMP instructions to absolute addresses if Encode is True, or the inverse if Encode is False. } type PByteArray = ^TByteArray; TByteArray = array[0..$7FFFFFFE] of Byte; var P: PByteArray; I: Integer; Addr, Rel: LongWord; begin if Size < 5 then Exit; Dec(Size, 4); P := @Buf; I := 0; while I < Size do begin { Does it appear to be a CALL or JMP instruction with a relative 32-bit address? } if (P[I] = $E8) or (P[I] = $E9) then begin Inc(I); { Verify that the high byte of the address is $00 or $FF. If it isn't, then what we've encountered most likely isn't a CALL or JMP. } if (P[I+3] = $00) or (P[I+3] = $FF) then begin { Change the lower 3 bytes of the address to be relative to the beginning of the buffer, instead of to the next instruction. If decoding, do the opposite. } Addr := (AddrOffset + LongWord(I) + 4) and $FFFFFF; { may wrap, but OK } Rel := P[I] or (P[I+1] shl 8) or (P[I+2] shl 16); if not Encode then Dec(Rel, Addr); { For a slightly higher compression ratio, we want the resulting high byte to be $00 for both forward and backward jumps. The high byte of the original relative address is likely to be the sign extension of bit 23, so if bit 23 is set, toggle all bits in the high byte. } if Rel and $800000 <> 0 then P[I+3] := not P[I+3]; if Encode then Inc(Rel, Addr); P[I] := Byte(Rel); P[I+1] := Byte(Rel shr 8); P[I+2] := Byte(Rel shr 16); end; Inc(I, 4); end else Inc(I); end; end; { TCustomCompressor } constructor TCustomCompressor.Create(AWriteProc: TCompressorWriteProc; AProgressProc: TCompressorProgressProc; CompressionLevel: Integer; ACompressorProps: TCompressorProps); begin inherited Create; FWriteProc := AWriteProc; FProgressProc := AProgressProc; end; procedure TCustomCompressor.Compress(const Buffer; Count: Longint); begin if FEntered <> 0 then raise ECompressInternalError.Create(SCompressorStateInvalid); Inc(FEntered); DoCompress(Buffer, Count); Dec(FEntered); end; procedure TCustomCompressor.Finish; begin if FEntered <> 0 then raise ECompressInternalError.Create(SCompressorStateInvalid); Inc(FEntered); DoFinish; Dec(FEntered); end; { TCustomDecompressor } constructor TCustomDecompressor.Create(AReadProc: TDecompressorReadProc); begin inherited Create; FReadProc := AReadProc; end; { TStoredCompressor } procedure TStoredCompressor.DoCompress(const Buffer; Count: Longint); begin WriteProc(Buffer, Count); if Assigned(ProgressProc) then ProgressProc(Count); end; procedure TStoredCompressor.DoFinish; begin end; { TStoredDecompressor } procedure TStoredDecompressor.DecompressInto(var Buffer; Count: Longint); var P: ^Byte; NumRead: Longint; begin P := @Buffer; while Count > 0 do begin NumRead := ReadProc(P^, Count); if NumRead = 0 then raise ECompressDataError.Create(SStoredDataError); Inc(P, NumRead); Dec(Count, NumRead); end; end; procedure TStoredDecompressor.Reset; begin end; { TCompressedBlockWriter } type TCompressedBlockHeader = packed record StoredSize: LongWord; { Total bytes written, including the CRCs } Compressed: Boolean; { True if data is compressed, False if not } end; constructor TCompressedBlockWriter.Create(AFile: TFile; ACompressorClass: TCustomCompressorClass; CompressionLevel: Integer; ACompressorProps: TCompressorProps); var HdrCRC: Longint; Hdr: TCompressedBlockHeader; begin inherited Create; FFile := AFile; if Assigned(ACompressorClass) and (CompressionLevel <> 0) then FCompressor := ACompressorClass.Create(CompressorWriteProc, nil, CompressionLevel, ACompressorProps); FStartPos := AFile.Position; { Note: These will be overwritten by Finish } HdrCRC := 0; AFile.WriteBuffer(HdrCRC, SizeOf(HdrCRC)); Hdr.StoredSize := 0; Hdr.Compressed := False; AFile.WriteBuffer(Hdr, SizeOf(Hdr)); end; destructor TCompressedBlockWriter.Destroy; begin FCompressor.Free; inherited; end; procedure TCompressedBlockWriter.FlushOutputBuffer; { Flushes contents of FOutBuffer into the file, with a preceding CRC } var CRC: Longint; begin CRC := GetCRC32(FOutBuffer, FOutBufferCount); FFile.WriteBuffer(CRC, SizeOf(CRC)); Inc(FTotalBytesStored, SizeOf(CRC)); FFile.WriteBuffer(FOutBuffer, FOutBufferCount); Inc(FTotalBytesStored, FOutBufferCount); FOutBufferCount := 0; end; procedure TCompressedBlockWriter.CompressorWriteProc(const Buffer; Count: Longint); var P: ^Byte; Bytes: Cardinal; begin P := @Buffer; while Count > 0 do begin Bytes := Count; if Bytes > SizeOf(FOutBuffer) - FOutBufferCount then Bytes := SizeOf(FOutBuffer) - FOutBufferCount; Move(P^, FOutBuffer[FOutBufferCount], Bytes); Inc(FOutBufferCount, Bytes); if FOutBufferCount = SizeOf(FOutBuffer) then FlushOutputBuffer; Dec(Count, Bytes); Inc(P, Bytes); end; end; procedure TCompressedBlockWriter.DoCompress(const Buf; var Count: Cardinal); begin if Count > 0 then begin if Assigned(FCompressor) then FCompressor.Compress(Buf, Count) else CompressorWriteProc(Buf, Count); end; Count := 0; end; procedure TCompressedBlockWriter.Write(const Buffer; Count: Cardinal); var P: ^Byte; Bytes: Cardinal; begin { Writes are buffered strictly as an optimization, to avoid feeding tiny blocks to the compressor } P := @Buffer; while Count > 0 do begin Bytes := Count; if Bytes > SizeOf(FInBuffer) - FInBufferCount then Bytes := SizeOf(FInBuffer) - FInBufferCount; Move(P^, FInBuffer[FInBufferCount], Bytes); Inc(FInBufferCount, Bytes); if FInBufferCount = SizeOf(FInBuffer) then DoCompress(FInBuffer, FInBufferCount); Dec(Count, Bytes); Inc(P, Bytes); end; end; procedure TCompressedBlockWriter.Finish; var Pos: Integer64; HdrCRC: Longint; Hdr: TCompressedBlockHeader; begin DoCompress(FInBuffer, FInBufferCount); if Assigned(FCompressor) then FCompressor.Finish; if FOutBufferCount > 0 then FlushOutputBuffer; Pos := FFile.Position; FFile.Seek64(FStartPos); Hdr.StoredSize := FTotalBytesStored; Hdr.Compressed := Assigned(FCompressor); HdrCRC := GetCRC32(Hdr, SizeOf(Hdr)); FFile.WriteBuffer(HdrCRC, SizeOf(HdrCRC)); FFile.WriteBuffer(Hdr, SizeOf(Hdr)); FFile.Seek64(Pos); end; { TCompressedBlockReader } constructor TCompressedBlockReader.Create(AFile: TFile; ADecompressorClass: TCustomDecompressorClass); var HdrCRC: Longint; Hdr: TCompressedBlockHeader; P: Integer64; begin inherited Create; FFile := AFile; if (AFile.Read(HdrCRC, SizeOf(HdrCRC)) <> SizeOf(HdrCRC)) or (AFile.Read(Hdr, SizeOf(Hdr)) <> SizeOf(Hdr)) then raise ECompressDataError.Create(SCompressedBlockDataError); if HdrCRC <> GetCRC32(Hdr, SizeOf(Hdr)) then raise ECompressDataError.Create(SCompressedBlockDataError); P := AFile.Position; Inc64(P, Hdr.StoredSize); if Compare64(P, AFile.Size) > 0 then raise ECompressDataError.Create(SCompressedBlockDataError); if Hdr.Compressed then FDecompressor := ADecompressorClass.Create(DecompressorReadProc); FInBytesLeft := Hdr.StoredSize; FInitialized := True; end; destructor TCompressedBlockReader.Destroy; var P: Integer64; begin FDecompressor.Free; if FInitialized then begin { Must seek ahead if the caller didn't read everything that was originally compressed, or if it did read everything but zlib is in a "CHECK" state (i.e. it didn't read and verify the trailing adler32 yet due to lack of input bytes). } P := FFile.Position; Inc64(P, FInBytesLeft); FFile.Seek64(P); end; inherited; end; procedure TCompressedBlockReader.ReadChunk; var CRC: Longint; Len: Cardinal; begin { Read chunk CRC } if FInBytesLeft < SizeOf(CRC) + 1 then raise ECompressDataError.Create(SCompressedBlockDataError); FFile.ReadBuffer(CRC, SizeOf(CRC)); Dec(FInBytesLeft, SizeOf(CRC)); { Read chunk data } Len := FInBytesLeft; if Len > SizeOf(FInBuffer) then Len := SizeOf(FInBuffer); FFile.ReadBuffer(FInBuffer, Len); Dec(FInBytesLeft, Len); FInBufferNext := 0; FInBufferAvail := Len; if CRC <> GetCRC32(FInBuffer, Len) then raise ECompressDataError.Create(SCompressedBlockDataError); end; function TCompressedBlockReader.DecompressorReadProc(var Buffer; Count: Longint): Longint; var P: ^Byte; Bytes: Cardinal; begin Result := 0; P := @Buffer; while Count > 0 do begin if FInBufferAvail = 0 then begin if FInBytesLeft = 0 then Break; ReadChunk; end; Bytes := Count; if Bytes > FInBufferAvail then Bytes := FInBufferAvail; Move(FInBuffer[FInBufferNext], P^, Bytes); Inc(FInBufferNext, Bytes); Dec(FInBufferAvail, Bytes); Inc(P, Bytes); Dec(Count, Bytes); Inc(Result, Bytes); end; end; procedure TCompressedBlockReader.Read(var Buffer; Count: Cardinal); begin if Assigned(FDecompressor) then FDecompressor.DecompressInto(Buffer, Count) else begin { Not compressed -- call DecompressorReadProc directly } if Cardinal(DecompressorReadProc(Buffer, Count)) <> Count then raise ECompressDataError.Create(SCompressedBlockDataError); end; end; end.
Pascal
5
Patriccollu/issrc
Projects/Compress.pas
[ "FSFAP" ]
[Constructor(DOMString type, optional RTCDTMFToneChangeEventInit eventInitDict)] interface RTCDTMFToneChangeEvent : Event { readonly attribute DOMString tone; }; dictionary RTCDTMFToneChangeEventInit : EventInit { DOMString tone = ""; };
WebIDL
3
tlively/wasm-bindgen
crates/web-sys/webidls/enabled/RTCDTMFToneChangeEvent.webidl
[ "Apache-2.0", "MIT" ]
pub main coginit(0, @entry, 0) dat org 0 entry _fetch1 rdlong result1, arg01 add arg01, #4 rdlong _var03, arg01 mov _var02, _var03 mov result2, _var02 _fetch1_ret ret _fetch2 rdlong result1, arg01 add arg01, #4 rdlong _var03, arg01 mov _var02, _var03 mov result2, _var02 _fetch2_ret ret result1 long 0 result2 long 0 COG_BSS_START fit 496 org COG_BSS_START _var01 res 1 _var02 res 1 _var03 res 1 arg01 res 1 fit 496
Parrot Assembly
2
archivest/spin2cpp
Test/Expect/stest257.pasm
[ "MIT" ]
# Adds a simple shadow below an object. # Place this ShadowMath25D node as a child of a Shadow25D, which # is below the target object in the scene tree (not as a child). tool extends KinematicBody class_name ShadowMath25D, "res://addons/node25d/icons/shadow_math_25d_icon.png" # The maximum distance below objects that shadows will appear (in 3D units). var shadow_length = 1000.0 var _shadow_root: Node25D var _target_math: Spatial func _ready(): _shadow_root = get_parent() var index = _shadow_root.get_position_in_parent() if (index > 0): # Else, Shadow is not in a valid place. _target_math = _shadow_root.get_parent().get_child(index - 1).get_child(0) func _process(_delta): if _target_math == null: if _shadow_root != null: _shadow_root.visible = false return # Shadow is not in a valid place or you're viewing the Shadow25D scene. translation = _target_math.translation var k = move_and_collide(Vector3.DOWN * shadow_length) if k == null: _shadow_root.visible = false else: _shadow_root.visible = true global_transform = transform
GDScript
5
jonbonazza/godot-demo-projects
misc/2.5d/addons/node25d/shadow_math_25d.gd
[ "MIT" ]
'reach 0.1'; 'use strict'; const TIMEOUT_PERIOD = 60 * 1000; //const MINIMUM_FEE = 1000; //----------------------------------------------------------------------------- // Token operative & compliance parameters //----------------------------------------------------------------------------- const TokenParameters = Object({ maxTransfers: UInt, }) //----------------------------------------------------------------------------- // Interaction interfaces //----------------------------------------------------------------------------- const IManager = { getBootstrapParams: Fun([], Tuple(Token, TokenParameters)), setupComplete: Fun([], Null) } const ISender = { getAxfer: Fun([], Tuple(UInt)) } const IReceiver = { accAxfer: Fun([UInt], Bool) } //----------------------------------------------------------------------------- // Helper functions //----------------------------------------------------------------------------- function validateParams(params) { assume(params.maxTransfers >= 1); } //----------------------------------------------------------------------------- // DApp Entry point //----------------------------------------------------------------------------- export const main = Reach.App( {}, [ Participant('Manager', IManager), ParticipantClass('Sender', ISender), ParticipantClass('Receiver', IReceiver)], (Manager, Sender, Receiver) => { // Step1:Manager must set token parameters Manager.only(() => { const [token, params] = declassify(interact.getBootstrapParams()); validateParams(params); interact.setupComplete(); }) Manager.publish(token, params); var run = true invariant (balance() == 0 && balance(token) == 0) while(run) { Sender.only(() => { }) Receiver.only(() => { }) commit() Anybody.publish() continue; } commit(); } );
RenderScript
4
chikeabuah/reach-lang
hs/t/y/pr-149.rsh
[ "Apache-2.0" ]
KIDS Distribution saved on Apr 07, 2015@10:54:12 XU*8*654 **KIDS**:XU*8.0*654^ **INSTALL NAME** XU*8.0*654 "BLD",1533,0) XU*8.0*654^KERNEL^0^3150407^y "BLD",1533,1,0) ^^2^2^3150109^ "BLD",1533,1,1,0) Kernel patch XU*8*654. This patch supports MFS. Please refer to the "BLD",1533,1,2,0) description in Forum Patch Module for details. "BLD",1533,4,0) ^9.64PA^4.005^1 "BLD",1533,4,4.005,0) 4.005 "BLD",1533,4,4.005,2,0) ^9.641^4.0051^1 "BLD",1533,4,4.005,2,4.0051,0) FILE/SUBFILE NUMBER (sub-file) "BLD",1533,4,4.005,2,4.0051,1,0) ^9.6411^^ "BLD",1533,4,4.005,222) y^n^p^^^^n^^n "BLD",1533,4,4.005,224) "BLD",1533,4,"APDD",4.005,4.0051) "BLD",1533,4,"B",4.005,4.005) "BLD",1533,6.3) 29 "BLD",1533,"INID") ^y "BLD",1533,"INIT") POST^XUMF654P "BLD",1533,"KRN",0) ^9.67PA^9002226^22 "BLD",1533,"KRN",.4,0) .4 "BLD",1533,"KRN",.401,0) .401 "BLD",1533,"KRN",.402,0) .402 "BLD",1533,"KRN",.403,0) .403 "BLD",1533,"KRN",.5,0) .5 "BLD",1533,"KRN",.84,0) .84 "BLD",1533,"KRN",3.6,0) 3.6 "BLD",1533,"KRN",3.8,0) 3.8 "BLD",1533,"KRN",9.2,0) 9.2 "BLD",1533,"KRN",9.8,0) 9.8 "BLD",1533,"KRN",9.8,"NM",0) ^9.68A^4^4 "BLD",1533,"KRN",9.8,"NM",1,0) XUMF654^^0^B20811218 "BLD",1533,"KRN",9.8,"NM",2,0) XUMF654P^^0^B68896964 "BLD",1533,"KRN",9.8,"NM",3,0) XUMF5I^^0^B99383408 "BLD",1533,"KRN",9.8,"NM",4,0) XUMF5II^^0^B14398872 "BLD",1533,"KRN",9.8,"NM","B","XUMF5I",3) "BLD",1533,"KRN",9.8,"NM","B","XUMF5II",4) "BLD",1533,"KRN",9.8,"NM","B","XUMF654",1) "BLD",1533,"KRN",9.8,"NM","B","XUMF654P",2) "BLD",1533,"KRN",19,0) 19 "BLD",1533,"KRN",19.1,0) 19.1 "BLD",1533,"KRN",101,0) 101 "BLD",1533,"KRN",409.61,0) 409.61 "BLD",1533,"KRN",771,0) 771 "BLD",1533,"KRN",779.2,0) 779.2 "BLD",1533,"KRN",870,0) 870 "BLD",1533,"KRN",8989.51,0) 8989.51 "BLD",1533,"KRN",8989.52,0) 8989.52 "BLD",1533,"KRN",8993,0) 8993 "BLD",1533,"KRN",8994,0) 8994 "BLD",1533,"KRN",9002226,0) 9002226 "BLD",1533,"KRN","B",.4,.4) "BLD",1533,"KRN","B",.401,.401) "BLD",1533,"KRN","B",.402,.402) "BLD",1533,"KRN","B",.403,.403) "BLD",1533,"KRN","B",.5,.5) "BLD",1533,"KRN","B",.84,.84) "BLD",1533,"KRN","B",3.6,3.6) "BLD",1533,"KRN","B",3.8,3.8) "BLD",1533,"KRN","B",9.2,9.2) "BLD",1533,"KRN","B",9.8,9.8) "BLD",1533,"KRN","B",19,19) "BLD",1533,"KRN","B",19.1,19.1) "BLD",1533,"KRN","B",101,101) "BLD",1533,"KRN","B",409.61,409.61) "BLD",1533,"KRN","B",771,771) "BLD",1533,"KRN","B",779.2,779.2) "BLD",1533,"KRN","B",870,870) "BLD",1533,"KRN","B",8989.51,8989.51) "BLD",1533,"KRN","B",8989.52,8989.52) "BLD",1533,"KRN","B",8993,8993) "BLD",1533,"KRN","B",8994,8994) "BLD",1533,"KRN","B",9002226,9002226) "BLD",1533,"QDEF") ^^^^NO^^^^NO^^NO "BLD",1533,"QUES",0) ^9.62^^ "BLD",1533,"REQB",0) ^9.611^^ "FIA",4.005) MD5 Signature "FIA",4.005,0) ^DIC(4.005, "FIA",4.005,0,0) 4.005 "FIA",4.005,0,1) y^n^p^^^^n^^n "FIA",4.005,0,10) "FIA",4.005,0,11) "FIA",4.005,0,"RLRO") "FIA",4.005,0,"VR") 8.0^XU "FIA",4.005,4.005) 1 "FIA",4.005,4.005,1) "FIA",4.005,4.0051) 0 "FIA",4.005,4.00511) 0 "INIT") POST^XUMF654P "IX",4.005,4.005,"AC",0) 4.005^AC^Sequence for XUMF5I routine^R^^R^IR^W^4.00511^^^^^S "IX",4.005,4.005,"AC",1) S ^DIC(4.005,"AC",X(1),$E(X(2),1,5),DA(2),DA(1),DA)="" "IX",4.005,4.005,"AC",2) K ^DIC(4.005,"AC",X(1),$E(X(2),1,5),DA(2),DA(1),DA) "IX",4.005,4.005,"AC",2.5) K ^DIC(4.005,"AC") "IX",4.005,4.005,"AC",11.1,0) ^.114IA^2^2 "IX",4.005,4.005,"AC",11.1,1,0) 1^C^^^^1 "IX",4.005,4.005,"AC",11.1,1,1.5) S X=DA(2) "IX",4.005,4.005,"AC",11.1,2,0) 2^F^4.00511^1^5^2^F "IX",4.005,4.005,"AC",11.1,2,3) "MBREQ") 0 "PKG",3,-1) 1^1 "PKG",3,0) KERNEL^XU^SIGN-ON, SECURITY, MENU DRIVER, DEVICES, TASKMAN^ "PKG",3,22,0) ^9.49I^1^1 "PKG",3,22,1,0) 8.0^3090706^3090706^6 "PKG",3,22,1,"PAH",1,0) 654^3150407^82 "PKG",3,22,1,"PAH",1,1,0) ^^2^2^3150407 "PKG",3,22,1,"PAH",1,1,1,0) Kernel patch XU*8*654. This patch supports MFS. Please refer to the "PKG",3,22,1,"PAH",1,1,2,0) description in Forum Patch Module for details. "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") 4 "RTN","XUMF5I") 0^3^B99383408 "RTN","XUMF5I",1,0) XUMF5I ;ISS/PAVEL - XUMF5 MD5 Hash Entry point ;02/26/2015 "RTN","XUMF5I",2,0) ;;8.0;KERNEL;**383,407,502,654**;July 10, 1995;Build 29 "RTN","XUMF5I",3,0) ; "RTN","XUMF5I",4,0) ;MD5 based on info from 4.005 SORT BY VUID or USER DEFINED SORTING "RTN","XUMF5I",5,0) ; "RTN","XUMF5I",6,0) Q "RTN","XUMF5I",7,0) EN(X0,MODE,IENCOUNT) ;entry point to get MD5 algorithm "RTN","XUMF5I",8,0) ; Lookup uses AMASTERVUID for files and B x-ref for subfiles.... "RTN","XUMF5I",9,0) ; "RTN","XUMF5I",10,0) ; X0 = IEN or name of entry from 4.005 file "RTN","XUMF5I",11,0) ; MODE = 0 regular mode.. last HASH value returned in Apl. ACK. "RTN","XUMF5I",12,0) ; 1 debugging mode.. all values + hash codess returned in Apl ACK "RTN","XUMF5I",13,0) ; 1.1 debugging mode.. all values (no hash codes) returned in Apl ACK "RTN","XUMF5I",14,0) ; 2 debugging mode.. all fields values, all hash values, all hash codes returned in Apl. ACK. "RTN","XUMF5I",15,0) ; IENCOUNT = maximum entries for MD5 hash.. if NULL.. all entries counted... "RTN","XUMF5I",16,0) ; FILTER = value of filter field defined in file 4.005, field 8. Passed in by HL7 message (X0). "RTN","XUMF5I",17,0) ; "RTN","XUMF5I",18,0) ; TMP(sequence, def entry IEN, file/subfile #, field #)="" "RTN","XUMF5I",19,0) ; TMP1(,"1,120.82,2,",2)="INTERNAL" "RTN","XUMF5I",20,0) ; TMP2(FILE #,FIELD #)="" if internal value requested... "RTN","XUMF5I",21,0) N X,Y,X1,X2,X3,X20,X201,X1NEW,X2NEW,X2OLD,X0NAME,XP,H,CNT,CNTT,CNHT,XMD5,XDATE,XXP "RTN","XUMF5I",22,0) N DIC,ERR,ROOT,ROOTX,ROOTB,ROOTB0,POINTER,JUMP,START,TMP,TMP1,TMP2,TMP3,TMP4,TMP5,TMP6,TMP7,TMP8,FDA,VERSION "RTN","XUMF5I",23,0) N SLEV,LEV,IENS,VAL,VALUE,SORT,SORT1,EXITMD5,FILTER,FILTER1,FILTER2,ACTFIL,SORTXREF,SORTACT,MAPFLG,VAR,VAR0,VAR1,VAR2,VAR3 "RTN","XUMF5I",24,0) N A,B,C,D,ABCD "RTN","XUMF5I",25,0) S:X0["~" FILTER=$P(X0,"~",2),ACTFIL=$P(X0,"~",3),X0=$P(X0,"~",1) ;parse out file name/IEN and filter value if it exists "RTN","XUMF5I",26,0) D INIT^XUMF5II S X1=0,VAR="",VAR0=0,MAPFLG=0 "RTN","XUMF5I",27,0) S VAR1=99.99,VAR2="99.991*",VAR3=99.991 ; fields for files other than Mappings "RTN","XUMF5I",28,0) F S VAR=$O(^DIC(4.005,"B",VAR)) Q:VAR="" D "RTN","XUMF5I",29,0) .I VAR="Mappings" S VAR0=0,VAR0=$O(^DIC(4.005,"B",VAR,VAR0)) "RTN","XUMF5I",30,0) .I VAR0=X0 S VAR1=.01,VAR2="3*",VAR3=3,MAPFLG=1 ; fields for Mapping file "RTN","XUMF5I",31,0) S FILTER1=$$GET1^DIQ(4.005,X0,8) "RTN","XUMF5I",32,0) S SORTXREF=$$GET1^DIQ(4.005,X0,7) "RTN","XUMF5I",33,0) 2 F S X1=$O(TMP(X1)) Q:'$$NEXTB1(LEV)!EXITMD5 S:'X1 X1=SLEV(LEV),X2OLD=0 S X2=$O(TMP(X1,X0,0)) Q:'X2 D "RTN","XUMF5I",34,0) .S (XP,JUMP)=0,XXP=$O(TMP(X1,X0,X2,0)) "RTN","XUMF5I",35,0) .;************ File/subfile has changed ************ "RTN","XUMF5I",36,0) .D:X2'=X2OLD "RTN","XUMF5I",37,0) ..;K ^TMP("UNIQUE",$J) "RTN","XUMF5I",38,0) ..; "RTN","XUMF5I",39,0) ..;************ File Level & Start ************ "RTN","XUMF5I",40,0) ..I $D(^DIC(X2)),START D Q "RTN","XUMF5I",41,0) ...S START=0,SLEV(1)=X1,X2OLD(1)=X2 "RTN","XUMF5I",42,0) ...K ROOT,ROOTB,ROOTB0,X02,X021,TMP1 "RTN","XUMF5I",43,0) ...S LEV=1,IENS="" "RTN","XUMF5I",44,0) ...D GETONE(LEV,X2) "RTN","XUMF5I",45,0) ..; "RTN","XUMF5I",46,0) ..;************ Going Up ************ "RTN","XUMF5I",47,0) ..I $G(^DD(X2OLD,0,"UP"))=X2 D Q "RTN","XUMF5I",48,0) ...K ^TMP("UNIQUE",$J,X2OLD) "RTN","XUMF5I",49,0) ...I $$NEXTB(LEV,X2OLD) S JUMP=2 Q "RTN","XUMF5I",50,0) ...K ROOT(LEV),ROOTB(LEV),ROOTB0(LEV),X20(LEV),X201(LEV),TMP1(LEV),X2OLD(LEV) "RTN","XUMF5I",51,0) ...S LEV=LEV-1,IENS=$P(IENS,",",$L(IENS,",")-LEV,9999),X2=X2OLD(LEV) "RTN","XUMF5I",52,0) ..Q:JUMP "RTN","XUMF5I",53,0) ..; "RTN","XUMF5I",54,0) ..;************ Going DOWN ************ "RTN","XUMF5I",55,0) ..I $G(^DD(X2,0,"UP"))=X2OLD D Q "RTN","XUMF5I",56,0) ...S LEV=LEV+1,SLEV(LEV)=X1,X2OLD(LEV)=X2 "RTN","XUMF5I",57,0) ...D GETONE(LEV,X2) "RTN","XUMF5I",58,0) ..; "RTN","XUMF5I",59,0) ..;************ Same Level other multiple... ************ "RTN","XUMF5I",60,0) ..I $G(^DD(X2,0,"UP"))=$G(^DD(X2OLD,0,"UP")),+$G(^DD(X2OLD,0,"UP")),+$G(^DD(X2,0,"UP")) D Q "RTN","XUMF5I",61,0) ...I $$NEXTB(LEV,X2OLD) S JUMP=2 Q "RTN","XUMF5I",62,0) ...K ROOT(LEV),ROOTB(LEV),ROOTB0(LEV),X20(LEV),X201(LEV),TMP1(LEV),X2OLD(LEV) "RTN","XUMF5I",63,0) ...S IENS=$P(IENS,",",$L(IENS,",")-LEV+1,9999) ;B:'$L(IENS) "RTN","XUMF5I",64,0) ...S SLEV(LEV)=X1 "RTN","XUMF5I",65,0) ...S X2OLD(LEV)=X2 "RTN","XUMF5I",66,0) ...;S X2=X2OLD "RTN","XUMF5I",67,0) ...D GETONE(LEV,X2) "RTN","XUMF5I",68,0) ..Q:JUMP "RTN","XUMF5I",69,0) ..; "RTN","XUMF5I",70,0) ..;************ New File not start... ************ "RTN","XUMF5I",71,0) ..I $D(^DIC(X2)) D Q "RTN","XUMF5I",72,0) ...S:'$D(X2NEW) X2NEW=X2,X1NEW=X1 "RTN","XUMF5I",73,0) ...I $$NEXTB(LEV,X2OLD(LEV)) S JUMP=2 Q "RTN","XUMF5I",74,0) ...K ROOT(LEV),ROOTB(LEV),ROOTB0(LEV),X20(LEV),X201(LEV),TMP1(LEV),SLEV(LEV),X2OLD(LEV) "RTN","XUMF5I",75,0) ...S IENS=$P(IENS,",",$L(IENS,",")-LEV+1,9999) ;B:'$L(IENS) "RTN","XUMF5I",76,0) ...I LEV=1 S (X1,SLEV(1))=X1NEW,(X2,X2OLD(1))=X2NEW K X1NEW,X2NEW D GETONE(LEV,X2) Q ;;;;;;;;GET TO THE BOTTOM LEVEL = 1 NOT ANY OTHRER'S B X-REF "RTN","XUMF5I",77,0) ...S LEV=LEV-1,X1=SLEV(LEV)-1,X2=+$G(X2OLD(LEV-1)),XP=1 "RTN","XUMF5I",78,0) ..; "RTN","XUMF5I",79,0) ..;************ Last sequence number ************ "RTN","XUMF5I",80,0) ..I X2OLD=0 D Q "RTN","XUMF5I",81,0) 21 ...I $$NEXTB(LEV,X2) S JUMP=2 Q "RTN","XUMF5I",82,0) ...K ROOT(LEV),ROOTB(LEV),ROOTB0(LEV),X20(LEV),X201(LEV),TMP1(LEV),X2OLD(LEV) "RTN","XUMF5I",83,0) ...Q:LEV=1 "RTN","XUMF5I",84,0) ...S LEV=LEV-1,IENS=$P(IENS,",",$L(IENS,",")-LEV,9999),X2=X2OLD(LEV) ;,X1=SLEV(LEV)-1,XP=1 "RTN","XUMF5I",85,0) ...G 21 "RTN","XUMF5I",86,0) ..Q "RTN","XUMF5I",87,0) ..; "RTN","XUMF5I",88,0) .S X2OLD=X2 "RTN","XUMF5I",89,0) .Q:JUMP "RTN","XUMF5I",90,0) .;************ Get value & MD5 ************ "RTN","XUMF5I",91,0) .S X3=$O(TMP(X1+XP,X0,X2,0)) Q:'X3 "RTN","XUMF5I",92,0) .S VAL=$S($L(IENS):$G(TMP1(LEV,X2,IENS,X3)),1:"") "RTN","XUMF5I",93,0) .Q:'$L(VAL) "RTN","XUMF5I",94,0) .D:$O(TMP1(LEV,X2,IENS,X3,0)) "RTN","XUMF5I",95,0) ..N X4 S X4=0,VAL="" F S X4=$O(TMP1(LEV,X2,IENS,X3,X4)) Q:'X4 S VAL=VAL_$G(TMP1(LEV,X2,IENS,X3,X4)) "RTN","XUMF5I",96,0) .;Filter out non-matching entries if a filter exists "RTN","XUMF5I",97,0) .Q:'$$FILTER() "RTN","XUMF5I",98,0) .;If value set as uniqueue and already exist dont take it into MD5 "RTN","XUMF5I",99,0) .Q:'$L(VAL) "RTN","XUMF5I",100,0) .I $G(TMP5(X2,X3)) Q:$D(^TMP("UNIQUE",$J,X2,X3,VAL)) S ^TMP("UNIQUE",$J,X2,X3,VAL)="" "RTN","XUMF5I",101,0) .D "RTN","XUMF5I",102,0) ..N X,TMP,I "RTN","XUMF5I",103,0) ..I X3=VAR1,$D(^DIC(X2)) S CNTT=CNTT+1 I $G(IENCOUNT),CNTT>IENCOUNT S EXITMD5=1,CNTT=CNTT-1 Q "RTN","XUMF5I",104,0) ..D:MODE>1.99 SETACK("File #: "_X2_" Field #: "_X3_" Value: "_VAL_" IENS: "_IENS) "RTN","XUMF5I",105,0) ..S CNT=$G(CNT)+1 "RTN","XUMF5I",106,0) ..S VALUE=VALUE_VAL "RTN","XUMF5I",107,0) 211 ..Q:$L(VALUE)<65 "RTN","XUMF5I",108,0) ..S X=$E(VALUE,65,$L(VALUE)),VALUE=$E(VALUE,1,64) "RTN","XUMF5I",109,0) ..D:MODE "RTN","XUMF5I",110,0) ...D SETACK($S(MODE=1.1:"",1:"Value: ")_VALUE) "RTN","XUMF5I",111,0) ...D:MODE'=1.1 SETACK("HASH: "_$$MAIN^XUMF5BYT($$HEX^XUMF5AU($$MD5E^XUMF5AU(ABCD,VALUE,0,CNHT+1*64)))) "RTN","XUMF5I",112,0) ..S ABCD=$$MD5E^XUMF5AU(ABCD,VALUE,1) "RTN","XUMF5I",113,0) ..S VALUE=X,CNHT=CNHT+1 "RTN","XUMF5I",114,0) ..G 211 "RTN","XUMF5I",115,0) .Q "RTN","XUMF5I",116,0) G END^XUMF5II "RTN","XUMF5I",117,0) Q "RTN","XUMF5I",118,0) GETONE(LEV,X2) ;GET DATA "RTN","XUMF5I",119,0) S ROOT(LEV)=$$ROOT^DILFD(X2,"1,"_IENS,,"ERR") "RTN","XUMF5I",120,0) Q:'$L(ROOT(LEV)) "RTN","XUMF5I",121,0) I $D(ERR) D Q "RTN","XUMF5I",122,0) .S ERROR="1^MD5 ROOT retrieval error, File/Subfile #: "_X2_" IENS: 1,"_IENS,EXITMD5=1,JUMP=2 "RTN","XUMF5I",123,0) .D EM^XUMFX("file DIE call error message in RDT",.ERR) "RTN","XUMF5I",124,0) .K ERR "RTN","XUMF5I",125,0) I SORTXREF'="" S:'$D(@(ROOT(LEV)_""""_SORTXREF_""""_")")) SORTXREF="" "RTN","XUMF5I",126,0) S ROOTX(LEV)=ROOT(LEV)_"X201(LEV))" ;FOR LOOKUP OF ENTRIES "RTN","XUMF5I",127,0) S SORT1="",SORT="B" ; S:$D(^DIC(X2)) SORT="AMASTERVUID",SORT1="1," "RTN","XUMF5I",128,0) I $D(^DIC(X2)) D "RTN","XUMF5I",129,0) .S SORT="AMASTERVUID",SORT1="1," "RTN","XUMF5I",130,0) .I (SORTXREF'="") S SORT1="",SORT=SORTXREF "RTN","XUMF5I",131,0) S ROOTB(LEV)=ROOT(LEV)_""""_SORT_""",X20(LEV))" "RTN","XUMF5I",132,0) S X20(LEV)="",ROOTB0(LEV)=ROOT(LEV)_""""_SORT_""",X20(LEV),"_SORT1_"X201(LEV))" "RTN","XUMF5I",133,0) S:SORT="B" POINTER=$G(TMP7(X2,XXP)) ;Pointer = pointer to file # "RTN","XUMF5I",134,0) I SORT="B",+POINTER D ;Handle pointer type of subfile... "RTN","XUMF5I",135,0) .N BB S POINTER=$E(POINTER,2,$L(POINTER)) "RTN","XUMF5I",136,0) .; ^TMP("PROOT",$J,Subfile #,IEN from up level,"Name sorted",IEN level)="" "RTN","XUMF5I",137,0) .; ^TMP("PROOT",$J,Subfile #,IEN from up level,X20(LEV),X201(LEV))="" "RTN","XUMF5I",138,0) .K ^TMP("PROOT",$J,X2) "RTN","XUMF5I",139,0) .;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "RTN","XUMF5I",140,0) .S X201(LEV)=0 F S X201(LEV)=$O(@(ROOTX(LEV))) Q:'X201(LEV) D "RTN","XUMF5I",141,0) ..I $G(TMP4(X2,XXP)) D ; If sort By VUID "RTN","XUMF5I",142,0) ...S BB=$$GET1^DIQ(X2,X201(LEV)_","_IENS,XXP,"I") ;BB=IEN of poited to field "RTN","XUMF5I",143,0) ...S:BB BB=$$GET1^DIQ(TMP4(X2,XXP),BB_",",VAR1,"E") ;BB=VUID "RTN","XUMF5I",144,0) ..E S BB=$$GET1^DIQ(X2,X201(LEV)_","_IENS,XXP,"E") ; Else sort by .01 BB= .01 "RTN","XUMF5I",145,0) ..S:$L(BB) ^TMP("PROOT",$J,X2,BB,X201(LEV))="" "RTN","XUMF5I",146,0) .;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "RTN","XUMF5I",147,0) .S ROOTB(LEV)="^TMP(""PROOT"",$J,"_X2_",X20(LEV))" "RTN","XUMF5I",148,0) .S ROOTB0(LEV)="^TMP(""PROOT"",$J,"_X2_",X20(LEV),X201(LEV))" "RTN","XUMF5I",149,0) I SORT="B",LEV=2,X2=+$P(^DD(X2OLD(1),VAR3,0),U,2) D ;Handle Effective Date/Status multiple... only last date taken to HASH... TERMSTATUS "RTN","XUMF5I",150,0) .K ^TMP("PROOT",$J,X2) "RTN","XUMF5I",151,0) .S X20(LEV)=$O(@(ROOTB(LEV)),-1) ;Get last date.. "RTN","XUMF5I",152,0) .Q:'$L(X20(LEV)) ;No Data in Effective Date Multiple. "RTN","XUMF5I",153,0) .S X201(LEV)=0,X201(LEV)=+$O(@ROOTB0(LEV)) "RTN","XUMF5I",154,0) .Q:'X201(LEV) "RTN","XUMF5I",155,0) .S ROOTB(LEV)="^TMP(""PROOT"",$J,"_X2_",X20(LEV))" "RTN","XUMF5I",156,0) .S ROOTB0(LEV)="^TMP(""PROOT"",$J,"_X2_",X20(LEV),X201(LEV))" "RTN","XUMF5I",157,0) .S ^TMP("PROOT",$J,X2,X20(LEV),X201(LEV))="" "RTN","XUMF5I",158,0) S X20(LEV)="" "RTN","XUMF5I",159,0) I SORTXREF'="" S X20(LEV)=0,X201(LEV)=0 "RTN","XUMF5I",160,0) GET1 I SORTXREF="" S X20(LEV)=$O(@(ROOTB(LEV))) Q:'$L(X20(LEV)) S X201(LEV)=0,X201(LEV)=$O(@(ROOTB0(LEV))) "RTN","XUMF5I",161,0) I SORTXREF'="" S TMP8=$Q(@(ROOTB0(LEV))),X20(LEV)=$P(TMP8,",",3),X201(LEV)=+$P(TMP8,",",4) Q:'$L(X20(LEV)) "RTN","XUMF5I",162,0) I (SORTXREF'=""),'$O(@(ROOTB0(LEV))),('$L($O(@(ROOTB(LEV))))),'$$ACTALL() S EXITMD5=1 Q "RTN","XUMF5I",163,0) I $D(^DIC(X2)),'$$ACTIVE(X2,X201(LEV)_","_IENS) G GET1 ;If not active entry.. skip it.. "RTN","XUMF5I",164,0) S IENS=X201(LEV)_","_IENS "RTN","XUMF5I",165,0) Q:'X201(LEV) "RTN","XUMF5I",166,0) D GETSIE(X2,IENS,LEV) "RTN","XUMF5I",167,0) Q "RTN","XUMF5I",168,0) NEXTB(LEV,X2X) ;Get next IEN from xref on current level.. if exist "RTN","XUMF5I",169,0) ;Is there other entry at current level to be proceeded.. ?? get next "B" x-ref set old X2 = NEW X2 and go to loop "RTN","XUMF5I",170,0) Q:'$D(X20(LEV)) 0 "RTN","XUMF5I",171,0) N1 Q:'$L(X20(LEV)) 0 "RTN","XUMF5I",172,0) I LEV=1,'($O(@(ROOTB0(LEV)))!$L($O(@(ROOTB(LEV))))) S EXITMD5=1 Q 1 "RTN","XUMF5I",173,0) Q:'($O(@(ROOTB0(LEV)))!$L($O(@(ROOTB(LEV))))) 0 "RTN","XUMF5I",174,0) S:X201(LEV) X201(LEV)=$O(@(ROOTB0(LEV))) ;Try get new IEN fron B-xref "RTN","XUMF5I",175,0) I 'X201(LEV) S X20(LEV)=$O(@(ROOTB(LEV))),X201(LEV)=0 S:$L(X20(LEV)) X201(LEV)=$O(@(ROOTB0(LEV))) "RTN","XUMF5I",176,0) Q:'X201(LEV) 0 "RTN","XUMF5I",177,0) I $D(^DIC(X2X)),'$$ACTIVE(X2X,X201(LEV)_","_$P(IENS,",",2,99)) G N1 ;If not active entry.. skip it.. "RTN","XUMF5I",178,0) S $P(IENS,",",1)=X201(LEV) "RTN","XUMF5I",179,0) S X2=X2X "RTN","XUMF5I",180,0) D GETSIE(X2,IENS,LEV) "RTN","XUMF5I",181,0) S X1=SLEV(LEV)-1,XP=1 "RTN","XUMF5I",182,0) Q 1 "RTN","XUMF5I",183,0) NEXTB1(LEV) ;See if some other entries in x-ref at any level exist... no variable is set. "RTN","XUMF5I",184,0) ; "RTN","XUMF5I",185,0) Q:X1 1 "RTN","XUMF5I",186,0) 3 Q:LEV=0 0 "RTN","XUMF5I",187,0) I LEV>1,'$L($G(X20(LEV))) G 4 "RTN","XUMF5I",188,0) I LEV=1,'$L($G(X20(LEV))) Q 0 "RTN","XUMF5I",189,0) I LEV=1,'($O(@(ROOTB0(LEV)))!$L($O(@(ROOTB(LEV))))) Q 0 "RTN","XUMF5I",190,0) I LEV=1,'$$ACTALL() Q 0 "RTN","XUMF5I",191,0) I X201(LEV),$O(@(ROOTB0(LEV))) Q 1 "RTN","XUMF5I",192,0) Q:$L($O(@(ROOTB(LEV)))) 1 "RTN","XUMF5I",193,0) Q:LEV=1 0 "RTN","XUMF5I",194,0) 4 S LEV=LEV-1 G 3 "RTN","XUMF5I",195,0) Q "RTN","XUMF5I",196,0) SETACK(X,MODE) ;SET APPL. Acknowledgment + WRIGHT ?? "RTN","XUMF5I",197,0) W X,! "RTN","XUMF5I",198,0) S:$G(MODE) ^TMP("XUMF ERROR",$J,XMD5,$O(^TMP("XUMF ERROR",$J,XMD5,9999999999999),-1)+1)=X "RTN","XUMF5I",199,0) Q "RTN","XUMF5I",200,0) UP(X) ;Upercase conversion "RTN","XUMF5I",201,0) Q $TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") "RTN","XUMF5I",202,0) ACTIVE(FILE,IEN) ;GET 1 = Active 0 = Inactive "RTN","XUMF5I",203,0) I $G(ACTFIL) Q 1 "RTN","XUMF5I",204,0) N TMP,BB,X,X1,X2,XT,XX "RTN","XUMF5I",205,0) D GETS^DIQ(FILE,IEN,VAR2,"I","TMP","ERR") "RTN","XUMF5I",206,0) S (XT,XX)=0,X="TMP" "RTN","XUMF5I",207,0) F S X=$Q(@(X)) Q:'$L(X) D "RTN","XUMF5I",208,0) .S X1=$G(@(X)),X=$Q(@(X)),X2=$G(@(X)) S:X1>XT XT=X1,XX=+X2 "RTN","XUMF5I",209,0) .I MAPFLG=1 S X=$Q(@(X)) "RTN","XUMF5I",210,0) Q XX "RTN","XUMF5I",211,0) GETSIE(X2,IENS,LEV) ;GET Internal/External values + replace pointed field .01 with VUID "RTN","XUMF5I",212,0) K TMP1(LEV) D GETS^DIQ(X2,IENS,"*","","TMP1(LEV)") "RTN","XUMF5I",213,0) ;D:$D(TMP2(X2))!$D(TMP4(X2)) ;remove p654 "RTN","XUMF5I",214,0) D:$D(TMP2(X2))!$D(TMP4(X2))!$D(TMP8(X2)) "RTN","XUMF5I",215,0) .N TMP3,I "RTN","XUMF5I",216,0) .D GETS^DIQ(X2,IENS,"*","I","TMP3") "RTN","XUMF5I",217,0) .S I="" F S I=$O(TMP2(X2,I)) Q:'I S:$D(TMP1(LEV,X2,IENS,I)) TMP1(LEV,X2,IENS,I)=TMP3(X2,IENS,I,"I") "RTN","XUMF5I",218,0) .;+++++++++++++++ Replace pointed .01 field with VUID if indicate so in 4.005 "RTN","XUMF5I",219,0) .S I="" F S I=$O(TMP4(X2,I)) Q:'I S:$D(TMP1(LEV,X2,IENS,I)) TMP1(LEV,X2,IENS,I)=$$GET1^DIQ(TMP4(X2,I),TMP3(X2,IENS,I,"I")_",",VAR1) "RTN","XUMF5I",220,0) .;+++++++++++++++ Process post action on field patch XU*8.0*654 "RTN","XUMF5I",221,0) .S I="" F S I=$O(TMP8(X2,I)) Q:'I X:$D(TMP1(LEV,X2,IENS,I)) TMP8(X2,I) "RTN","XUMF5I",222,0) Q "RTN","XUMF5I",223,0) ACTALL() ;See if there is some active entry on the file.... "RTN","XUMF5I",224,0) I $G(SORTACT) Q 1 "RTN","XUMF5I",225,0) N X1,X2,ACT "RTN","XUMF5I",226,0) S ACT=0,X1=X20(1),X2=X201(1) "RTN","XUMF5I",227,0) S:X20(1) X20(1)=X20(1)-.01 "RTN","XUMF5I",228,0) I SORTXREF="" F S X20(1)=$O(@(ROOTB(1))) Q:(X20(1)="")!ACT F S X201(1)=$O(@(ROOTB0(1))) Q:X201(1)="" I $$ACTIVE(X2OLD(1),X201(1)) S ACT=1 Q "RTN","XUMF5I",229,0) I SORTXREF'="" D "RTN","XUMF5I",230,0) .S X20(1)="" "RTN","XUMF5I",231,0) .F S X20(1)=$O(@(ROOTB(1))) Q:(X20(1)="")!ACT S X201(1)="" F S X201(1)=$O(@(ROOTB0(1))) Q:X201(1)="" I $$ACTIVE(X2OLD(1),X201(1)) S ACT=1,SORTACT=1 Q "RTN","XUMF5I",232,0) S X20(1)=X1,X201(1)=X2 "RTN","XUMF5I",233,0) Q ACT "RTN","XUMF5I",234,0) FILTER() ;if filter value passed in via HL7 message, verify it matches file/field value "RTN","XUMF5I",235,0) ; FILTER = VALUE IN HL7 MESSAGE "RTN","XUMF5I",236,0) ; FILTER1 = FIELD NUMBER IN 4.005 "RTN","XUMF5I",237,0) ; FILTER2 = VALUE OF FIELD IN REFERENCED FILE "RTN","XUMF5I",238,0) ; If reference file is "Mappings", resolve pointer of 757.33 field .02 to 757.32 field 5 and compare "RTN","XUMF5I",239,0) I '$D(FILTER) Q 1 "RTN","XUMF5I",240,0) I MAPFLG D "RTN","XUMF5I",241,0) .S FILTER2=$$GET1^DIQ(X2OLD(1),X201(1),FILTER1,"I") "RTN","XUMF5I",242,0) .S FILTER2=$$GET1^DIQ(757.32,FILTER2,5) "RTN","XUMF5I",243,0) I 'MAPFLG S FILTER2=$$GET1^DIQ(X2,X201(1),FILTER1) "RTN","XUMF5I",244,0) I ($G(FILTER2)'=$G(FILTER)) Q 0 "RTN","XUMF5I",245,0) Q 1 "RTN","XUMF5II") 0^4^B14398872 "RTN","XUMF5II",1,0) XUMF5II ;ISS/PAVEL - XUMF5 MD5 Hash Entry point ;02/02/2015 "RTN","XUMF5II",2,0) ;;8.0;KERNEL;**407,654**;July 10, 1995;Build 29 "RTN","XUMF5II",3,0) ; "RTN","XUMF5II",4,0) ;MD5 based on info from 4.005 SORT BY VUID "RTN","XUMF5II",5,0) ; "RTN","XUMF5II",6,0) Q "RTN","XUMF5II",7,0) INIT ; "RTN","XUMF5II",8,0) K ^TMP("PROOT",$J) ;ROOT of file in the case of pointer... "RTN","XUMF5II",9,0) K ^TMP("UNIQUE",$J) ; Global of unique Values "RTN","XUMF5II",10,0) N X1,X11,X2,X20,X22,X3,X10,X21 "RTN","XUMF5II",11,0) ;TMP5(sequence #)= 1 if unique value "RTN","XUMF5II",12,0) S DIC=4.005,X=$S(X0:"`",1:"")_X0,DIC(0)="Z",U="^" D ^DIC "RTN","XUMF5II",13,0) I Y=-1 S ERROR="1^Unknown entry of 4.005 File: "_X0 Q "RTN","XUMF5II",14,0) S X0=+Y,X0NAME=$P(Y(0),U) S:'$G(MODE) MODE=+$P(Y(0),U,2) K TMP M TMP=@($$ROOT^DILFD(4.005,,0)_"""AC"",X0)") "RTN","XUMF5II",15,0) ; Set TMP5 if pointer type of field "RTN","XUMF5II",16,0) S X1=0,(X10,X20)=0 F S X1=$O(TMP(X1)) Q:'X1 S X2=$O(TMP(X1,X0,0)) D "RTN","XUMF5II",17,0) .S X3=$O(TMP(X1,X0,X2,0)) "RTN","XUMF5II",18,0) .S X11=$O(TMP(X1)),X21=$O(TMP(+X11,X0,0)) "RTN","XUMF5II",19,0) .I X20'=X2,X2'=X21,'$D(^DIC(X2)),$G(^DD(X2,0))'["EFFECTIVE DATE/TIME" S TMP6(X2,X3)=1 "RTN","XUMF5II",20,0) .S X20=X2 "RTN","XUMF5II",21,0) .S POINTER=$$POINTER(X2,X3) "RTN","XUMF5II",22,0) .S:POINTER TMP7(X2,X3)=POINTER "RTN","XUMF5II",23,0) D GETS^DIQ(4.005,X0_",","**","","TMP1") "RTN","XUMF5II",24,0) S A="" F S A=$O(TMP1(4.00511,A)) Q:'$L(A) D "RTN","XUMF5II",25,0) .N X1,X2 "RTN","XUMF5II",26,0) .S X1=$P(A,",",2),X2=$P(A,",",1) "RTN","XUMF5II",27,0) .S:TMP1(4.00511,A,2)="INTERNAL" TMP2(X1,X2)="" "RTN","XUMF5II",28,0) .;+++++++++++++++Set array of fields of pointer type VUID into TMP4 +++++++++++++++++++++++++ "RTN","XUMF5II",29,0) .;TMP1(4.00511,A,3) = File Number Of Pointed to Field for VUID sort "RTN","XUMF5II",30,0) .S:TMP1(4.00511,A,3) TMP4(X1,X2)=TMP1(4.00511,A,3) "RTN","XUMF5II",31,0) .;+++++++++++++++Set array of columns with Unique value into TMP5 +++++++++++++++++++++++++ "RTN","XUMF5II",32,0) .;TMP1(4.00511,A,4) = Unique value YES "RTN","XUMF5II",33,0) .S:TMP1(4.00511,A,4)="YES" TMP5(X1,X2)=1 "RTN","XUMF5II",34,0) .;TMP1(4.00511,A,5) = Post processing logic XU*8.0*654 "RTN","XUMF5II",35,0) .S X=$G(TMP1(4.00511,A,5)) S:$L(X) TMP8(X1,X2)=X ; XU*8.0*654 "RTN","XUMF5II",36,0) ; "RTN","XUMF5II",37,0) ;MODE set from input parameter or from file. "RTN","XUMF5II",38,0) S A=$C(1,35,69,103) "RTN","XUMF5II",39,0) S B=$C(137,171,205,239) "RTN","XUMF5II",40,0) S C=$C(254,220,186,152) "RTN","XUMF5II",41,0) S D=$C(118,84,50,16) "RTN","XUMF5II",42,0) S ABCD=A_B_C_D "RTN","XUMF5II",43,0) S (CNT,CNTT,CNHT)=0 "RTN","XUMF5II",44,0) S VALUE="" "RTN","XUMF5II",45,0) ;X1 = SEQUENCE "RTN","XUMF5II",46,0) ;X2 = FILE/SUBFILE # "RTN","XUMF5II",47,0) ;X3 = Field # "RTN","XUMF5II",48,0) ;TMP(MD5 Sequence ,IEN of entry from 4.005 file , File/Subfile#,field#)="" "RTN","XUMF5II",49,0) ;TMP1 = FILE # ALL ENTRIES "RTN","XUMF5II",50,0) ;TMP2(file#, field #)="" Set.. if INTERNAL value required "RTN","XUMF5II",51,0) ;TMP4(file#, field #)=Subfile # Set if SORT by VUID for subfile = file # "RTN","XUMF5II",52,0) ;TMP5(file#, field #)= 1 if unique value requested "RTN","XUMF5II",53,0) ;TMP6(file#, field #)= 1 if column mode.. it's not used yet... "RTN","XUMF5II",54,0) ;TMP7(file#, field #)=file # of pointer type field "RTN","XUMF5II",55,0) ;TMP8(file#, field #)= Postprocessing logic ; XU*8.0*654 "RTN","XUMF5II",56,0) S START=1,X1=0,LEV=0,X2OLD=0,XMD5=$O(^TMP("XUMF ERROR",$J,9999999999999),-1)+1,EXITMD5=0 "RTN","XUMF5II",57,0) Q "RTN","XUMF5II",58,0) END ;************ So get the final ABCD value... ************ "RTN","XUMF5II",59,0) S ABCD=$$MD5E^XUMF5AU(ABCD,VALUE,0,CNHT*64+$L(VALUE)) "RTN","XUMF5II",60,0) D:MODE "RTN","XUMF5II",61,0) .W ! D SETACK^XUMF5I($S(MODE=1.1:"",1:"Last value: ")_VALUE) "RTN","XUMF5II",62,0) .D SETACK^XUMF5I("LAST HASH: "_$$MAIN^XUMF5BYT($$HEX^XUMF5AU(ABCD))) W ! "RTN","XUMF5II",63,0) .D SETACK^XUMF5I("Total number of Characters included in Hash : "_(CNHT*64+$L(VALUE))) "RTN","XUMF5II",64,0) .D SETACK^XUMF5I("Length of last value: "_$L(VALUE)) "RTN","XUMF5II",65,0) .D SETACK^XUMF5I("Number of file entries: "_CNTT) "RTN","XUMF5II",66,0) .D SETACK^XUMF5I("Number of hash entries: "_(CNHT+1)) "RTN","XUMF5II",67,0) .D SETACK^XUMF5I("Number of values: "_CNT) "RTN","XUMF5II",68,0) .W ! "RTN","XUMF5II",69,0) ;************ Hex conversion + storage of the final ABCD value ************ "RTN","XUMF5II",70,0) S VALUE=$$MAIN^XUMF5BYT($$HEX^XUMF5AU(ABCD)) "RTN","XUMF5II",71,0) K FDA "RTN","XUMF5II",72,0) S FDA(4.005,X0_",",4)=$$NOW^XLFDT "RTN","XUMF5II",73,0) S FDA(4.005,X0_",",5)=VALUE "RTN","XUMF5II",74,0) K ERR D FILE^DIE(,"FDA","ERR") "RTN","XUMF5II",75,0) I $D(ERR) D "RTN","XUMF5II",76,0) .S ERROR="1^MD5 Date updating error" "RTN","XUMF5II",77,0) .D EM^XUMFX("file DIE call error message in RDT",.ERR) "RTN","XUMF5II",78,0) .K ERR "RTN","XUMF5II",79,0) D SETACK^XUMF5I("MD5 Signature Entry: "_X0NAME) "RTN","XUMF5II",80,0) D SETACK^XUMF5I("Local Hash value: "_VALUE) "RTN","XUMF5II",81,0) S ERROR=$G(ERROR) "RTN","XUMF5II",82,0) S X1=$O(@($$ROOT^DILFD(4.009,,0,"ERR")_"0)"))_"," "RTN","XUMF5II",83,0) D GETS^DIQ(4.009,X1,"*",,"TMP3") S VERSION=$G(TMP3(4.009,X1,1)) "RTN","XUMF5II",84,0) S $P(ERROR,U,2)=$P(ERROR,U,2)_";CHECKSUM:"_VALUE_";VERSION:"_VERSION_";" "RTN","XUMF5II",85,0) D SETACK^XUMF5I("ERROR variable: "_ERROR) "RTN","XUMF5II",86,0) K ^TMP("PROOT",$J) "RTN","XUMF5II",87,0) Q VALUE "RTN","XUMF5II",88,0) Q "RTN","XUMF5II",89,0) POINTER(X2,XXP) ;GET THE POINTER FILE # "RTN","XUMF5II",90,0) N FTYPE,TT,I "RTN","XUMF5II",91,0) S:'$G(XXP) XXP=.01 "RTN","XUMF5II",92,0) D FIELD^DID(X2,XXP,,"TYPE;POINTER","TT") "RTN","XUMF5II",93,0) Q:$G(TT("TYPE"))'="POINTER" 0 "RTN","XUMF5II",94,0) Q:'$L($G(TT("POINTER"))) 0 "RTN","XUMF5II",95,0) S TT="1^"_TT("POINTER") "RTN","XUMF5II",96,0) Q TT "RTN","XUMF654") 0^1^B20811218 "RTN","XUMF654",1,0) XUMF654 ;OIFO-BP/BATRAN - MFS parameters file ;03/25/2015 "RTN","XUMF654",2,0) ;;8.0;KERNEL;**654**;Jul 10, 1995;Build 29 "RTN","XUMF654",3,0) ;Per VHA Directive 10-92-142, this routine should not be modified "RTN","XUMF654",4,0) Q "RTN","XUMF654",5,0) ;------------------------------------------------- "RTN","XUMF654",6,0) ADD(IEN,DATA) ; ADD ZERO NODE "RTN","XUMF654",7,0) N FDA,FDAIEN,XFIELD,XVALUE,XCOUNT,XDATA,XI,XDATA1 "RTN","XUMF654",8,0) S XDATA=$$STRIP^XLFSTR(DATA,"]") "RTN","XUMF654",9,0) S XCOUNT=$L(DATA)-$L(XDATA)+1 "RTN","XUMF654",10,0) S FDAIEN(1)=IEN "RTN","XUMF654",11,0) S FDA(4.001,"?+1,",.01)=IEN "RTN","XUMF654",12,0) F XI=1:1:XCOUNT D "RTN","XUMF654",13,0) . S XDATA1=$P(DATA,"]",XI),XFIELD=+$P(XDATA1,";",1),XVALUE=$P(XDATA1,";",2) "RTN","XUMF654",14,0) . I XFIELD'>0 Q "RTN","XUMF654",15,0) . S FDA(4.001,"?+1,",XFIELD)=XVALUE "RTN","XUMF654",16,0) .Q "RTN","XUMF654",17,0) D UPDATE^DIE("","FDA","FDAIEN","ERR") "RTN","XUMF654",18,0) I $D(ERR) D "RTN","XUMF654",19,0) .D EM("UPDATE PARAMETR error on file #"_IEN,.ERR) "RTN","XUMF654",20,0) .K ERR "RTN","XUMF654",21,0) Q "RTN","XUMF654",22,0) ;---------------------------------------------- "RTN","XUMF654",23,0) ADDMD5(XUNAME) ; ADD ZERO NODE "RTN","XUMF654",24,0) N IENS1 "RTN","XUMF654",25,0) K FDA "RTN","XUMF654",26,0) S FDA(4.005,"+1,",.01)=XUNAME "RTN","XUMF654",27,0) ;S FDA(4.005,"+1,",6)=0 "RTN","XUMF654",28,0) D UPDATE^DIE("E","FDA",,"ERR") "RTN","XUMF654",29,0) I $D(ERR) D "RTN","XUMF654",30,0) .D EM("UPDATE MD5 error on file "_XUNAME,.ERR) "RTN","XUMF654",31,0) .K ERR "RTN","XUMF654",32,0) Q "RTN","XUMF654",33,0) ;--------------------------------------------------- "RTN","XUMF654",34,0) SCMD5(XUNAME,FILEN) ; ADD SECOND LEVEL "RTN","XUMF654",35,0) N XUIEN,IENS,XC "RTN","XUMF654",36,0) K FDA "RTN","XUMF654",37,0) S XUIEN=$O(^DIC(4.005,"B",XUNAME,0)) "RTN","XUMF654",38,0) I XUIEN'>0 Q "RTN","XUMF654",39,0) K FDA "RTN","XUMF654",40,0) S IENS="?+1,"_XUIEN_"," "RTN","XUMF654",41,0) S FDA(4.0051,IENS,.01)=FILEN "RTN","XUMF654",42,0) D UPDATE^DIE("E","FDA",,"ERR") "RTN","XUMF654",43,0) I $D(ERR) D "RTN","XUMF654",44,0) .D EM("UPDATE MD5 error on file "_XUNAME,.ERR) "RTN","XUMF654",45,0) .K ERR "RTN","XUMF654",46,0) Q "RTN","XUMF654",47,0) ;-------------------------------------------------- "RTN","XUMF654",48,0) SUBMD5(XUNAME,XDATA,FILEN,XIEN) ; ADD THIRD LEVEL "RTN","XUMF654",49,0) N XUIEN,IENS,XC "RTN","XUMF654",50,0) K FDA "RTN","XUMF654",51,0) S XUIEN=$O(^DIC(4.005,"B",XUNAME,0)) "RTN","XUMF654",52,0) I XUIEN'>0 Q "RTN","XUMF654",53,0) ; "RTN","XUMF654",54,0) S XC="," "RTN","XUMF654",55,0) S IENS="+1"_XC_FILEN_XC_XUIEN_XC "RTN","XUMF654",56,0) S FDAIEN(1)=XIEN "RTN","XUMF654",57,0) S FDA(4.00511,IENS,.01)=$P(XDATA,"^",1) "RTN","XUMF654",58,0) S FDA(4.00511,IENS,1)=$P(XDATA,"^",2) "RTN","XUMF654",59,0) S FDA(4.00511,IENS,2)=$P(XDATA,"^",3) "RTN","XUMF654",60,0) S FDA(4.00511,IENS,3)=$P(XDATA,"^",4) "RTN","XUMF654",61,0) S FDA(4.00511,IENS,4)=$P(XDATA,"^",5) "RTN","XUMF654",62,0) S FDA(4.00511,IENS,5)=$P(XDATA,"^",6,7) "RTN","XUMF654",63,0) D UPDATE^DIE("","FDA","FDAIEN","ERR") "RTN","XUMF654",64,0) ;D UPDATE^DIE("E","FDA",,"ERR") "RTN","XUMF654",65,0) I $D(ERR) D "RTN","XUMF654",66,0) .D EM("UPDATE MD5 error on file "_XUNAME,.ERR) "RTN","XUMF654",67,0) .K ERR "RTN","XUMF654",68,0) Q "RTN","XUMF654",69,0) ;--------------------------------------------- "RTN","XUMF654",70,0) DEL(IEN) ; Delete entries "RTN","XUMF654",71,0) N DIK,DA "RTN","XUMF654",72,0) S DIK="^DIC(4.001,",DA=IEN D ^DIK "RTN","XUMF654",73,0) Q "RTN","XUMF654",74,0) ; "RTN","XUMF654",75,0) DELMD5(XUNAME) ; Delete entries "RTN","XUMF654",76,0) N DIK,DA "RTN","XUMF654",77,0) I $G(XUNAME)="" Q "RTN","XUMF654",78,0) S DA=$O(^DIC(4.005,"B",XUNAME,0)) "RTN","XUMF654",79,0) I DA'>0 Q "RTN","XUMF654",80,0) S DIK="^DIC(4.005," D ^DIK "RTN","XUMF654",81,0) Q "RTN","XUMF654",82,0) ; "RTN","XUMF654",83,0) ;----------------------------------------------- "RTN","XUMF654",84,0) NODES(IEN,XDATA,XCOUNT) ; -- ADD SEQUENCES "RTN","XUMF654",85,0) ; "RTN","XUMF654",86,0) N DATA,I "RTN","XUMF654",87,0) F I=1:1:XCOUNT D "RTN","XUMF654",88,0) . S DATA=$T(@XDATA+I) "RTN","XUMF654",89,0) . D ADD1(DATA,IEN) "RTN","XUMF654",90,0) . Q "RTN","XUMF654",91,0) Q "RTN","XUMF654",92,0) ;---------------------------------------------- "RTN","XUMF654",93,0) ADD1(DATA,IEN) ;add sub level - ADD SINGLE SEQUENCE "RTN","XUMF654",94,0) N NODE,IENS "RTN","XUMF654",95,0) K FDA "RTN","XUMF654",96,0) S DATA=$P(DATA,";",2) "RTN","XUMF654",97,0) S NODE=$P(DATA,"^",1) "RTN","XUMF654",98,0) S DATA=$P(DATA,"^",2,99) "RTN","XUMF654",99,0) S IENS="+"_NODE_","_IEN_"," "RTN","XUMF654",100,0) S FDA(4.011,IENS,.01)=$P(DATA,"^",1) "RTN","XUMF654",101,0) S FDA(4.011,IENS,.02)=$P(DATA,"^",2) "RTN","XUMF654",102,0) S FDA(4.011,IENS,.03)=$P(DATA,"^",3) "RTN","XUMF654",103,0) S FDA(4.011,IENS,.04)=$P(DATA,"^",4) "RTN","XUMF654",104,0) S FDA(4.011,IENS,.05)=$P(DATA,"^",5) "RTN","XUMF654",105,0) S FDA(4.011,IENS,.06)=$P(DATA,"^",6) "RTN","XUMF654",106,0) S FDA(4.011,IENS,.07)=$P(DATA,"^",7) "RTN","XUMF654",107,0) S FDA(4.011,IENS,.08)=$P(DATA,"^",8) "RTN","XUMF654",108,0) S FDA(4.011,IENS,.09)=$P(DATA,"^",9) "RTN","XUMF654",109,0) S FDA(4.011,IENS,.11)=$P(DATA,"^",11) "RTN","XUMF654",110,0) S FDA(4.011,IENS,.12)=$P(DATA,"^",12) "RTN","XUMF654",111,0) S FDA(4.011,IENS,.13)=$P(DATA,"^",13) "RTN","XUMF654",112,0) S FDA(4.011,IENS,.14)=$P(DATA,"^",14) "RTN","XUMF654",113,0) S FDA(4.011,IENS,.15)=$P(DATA,"^",15) "RTN","XUMF654",114,0) S FDA(4.011,IENS,.16)=$P(DATA,"^",16) "RTN","XUMF654",115,0) D UPDATE^DIE("E","FDA",,"ERR") "RTN","XUMF654",116,0) I $D(ERR) D "RTN","XUMF654",117,0) .D EM("UPDATE PARAMETER error on file #"_IEN,.ERR) "RTN","XUMF654",118,0) .K ERR "RTN","XUMF654",119,0) Q "RTN","XUMF654",120,0) ;------------------------------------------------ "RTN","XUMF654",121,0) ADD2(XIEN1,XNAME,XCOUNT,XDATA) ; add sub-sub level "RTN","XUMF654",122,0) N XC,IENS,ERR,XIEN2 "RTN","XUMF654",123,0) K FDA "RTN","XUMF654",124,0) S XIEN2=+$O(^DIC(4.001,XIEN1,1,"B",XNAME,0)) "RTN","XUMF654",125,0) I XIEN2'>0 Q "RTN","XUMF654",126,0) S XC="," "RTN","XUMF654",127,0) S IENS="+"_XCOUNT_XC_XIEN2_XC_XIEN1_XC "RTN","XUMF654",128,0) S FDA(4.111,IENS,.01)=$P(XDATA,"^",1) ; SUBFILE SEQUENCE "RTN","XUMF654",129,0) S FDA(4.111,IENS,.02)=$P(XDATA,"^",2) ; SUBFILE COLUMN NAME "RTN","XUMF654",130,0) S FDA(4.111,IENS,.03)=$P(XDATA,"^",3) ; SUBFILE FIELD NUMBER "RTN","XUMF654",131,0) S FDA(4.111,IENS,.04)=$P(XDATA,"^",4) ; SUBFILE FIELD VUID "RTN","XUMF654",132,0) S FDA(4.111,IENS,.05)=$P(XDATA,"^",5) ; SUBFILE FIELD TYPE "RTN","XUMF654",133,0) D UPDATE^DIE("","FDA","FDAIEN","ERR") "RTN","XUMF654",134,0) I $D(ERR) D "RTN","XUMF654",135,0) .D EM("UPDATE PARAMETER error on file "_XNAME,.ERR) "RTN","XUMF654",136,0) .K ERR "RTN","XUMF654",137,0) Q "RTN","XUMF654",138,0) ;------------------------------------------------ "RTN","XUMF654",139,0) EM(ERROR,ERR,XMSUB) ; -- error message "RTN","XUMF654",140,0) N X,XMTEXT,XMDUZ "RTN","XUMF654",141,0) D MSG^DIALOG("AM",.X,80,,"ERR") "RTN","XUMF654",142,0) S X(.1)="HL7 message ID: "_$G(HL("MID")) "RTN","XUMF654",143,0) S X(.2)="",X(.3)=$G(ERROR),X(.4)="" "RTN","XUMF654",144,0) S:$G(XMSUB)="" XMSUB="MFS ERROR" "RTN","XUMF654",145,0) S:'$D(XMY("[email protected]")) XMY("G.XUMF [email protected]")="" "RTN","XUMF654",146,0) S XMDUZ=.5 "RTN","XUMF654",147,0) S XMTEXT="X(" "RTN","XUMF654",148,0) D ^XMD "RTN","XUMF654",149,0) Q "RTN","XUMF654",150,0) ;---------------------------------------------- "RTN","XUMF654",151,0) DATA9904 ;9999999.04 "RTN","XUMF654",152,0) ;1^Term^.01^^^^^^^75^^^^^^1^ "RTN","XUMF654",153,0) ;2^VistA_MVX_Code^.02^^^^^^^3^^^^^^2^ "RTN","XUMF654",154,0) ;3^VistA_MVX_Notes^201^^^^^^^99^^^^^^3^ "RTN","XUMF654",155,0) ;4^vista_replaced_by^99.97^^^^^^^^^^^VUID^^4^ "RTN","XUMF654",156,0) ;5^Status^.02^^9999999.0499^^^^^^^^^^^5^ "RTN","XUMF654",157,0) ;6^VistA_Inactive_Flag^.03^^^^^^^1^^^^^^6^ "RTN","XUMF654",158,0) ;------------------------------------------------- "RTN","XUMF654",159,0) DATA ;9999999.14 "RTN","XUMF654",160,0) ;1^Term^.01^^^^^^^99^^^^^^1^ "RTN","XUMF654",161,0) ;2^VistA_Acronym^8802^^^^^^^20^^^^^^2^ "RTN","XUMF654",162,0) ;3^VistA_CDC_Full_Vaccine_Name^2^^^^^^^^^^^^^3^1 "RTN","XUMF654",163,0) ;4^VistA_CDC_Product_Name^.01^ST^9999999.145^^VistA_CDC_Product_Name^^^30^^^0^^^4^ "RTN","XUMF654",164,0) ;5^VistA_Combination_Immunization^.2^^^^^^^1^^^^^^5^ "RTN","XUMF654",165,0) ;6^VistA_Class^100^^^^^^^^^^^^^6^ "RTN","XUMF654",166,0) ;7^VistA_CVX_Mapping^.01^^9999999.143^^VistA_CVX_Mapping^^^^^^^^^7^ "RTN","XUMF654",167,0) ;8^VistA_CVX_Code^.03^^^^^^^3^^^^^^8^ "RTN","XUMF654",168,0) ;9^VistA_Inactive_Flag^.07^^^^^^^1^^^^^^9^ "RTN","XUMF654",169,0) ;10^VistA_Max_No_In_Series^.05^^^^^^^^^^^^^10^ "RTN","XUMF654",170,0) ;11^VistA_Mnemonic^8801^^^^^^^3^^^^^^11^ "RTN","XUMF654",171,0) ;12^VistA_Reading_Required^.51^^^^^^^1^^^^^^12^ "RTN","XUMF654",172,0) ;13^VistA_Selectable_For_Historic^8803^^^^^^^^^^^^^13^ "RTN","XUMF654",173,0) ;14^VistA_Synonym^.01^ST^9999999.141^^VistA_Synonym^^^30^^^0^^^14^ "RTN","XUMF654",174,0) ;15^vista_has_vis^.01^ST^9999999.144^^vista_has_vis^^^15^^^0^VUID^^15^ "RTN","XUMF654",175,0) ;16^vista_replaced_by^99.97^^^^^^^^^^^VUID^^16^ "RTN","XUMF654",176,0) ;17^Status^.02^^9999999.1499^^^^^^^^^^^17^ "RTN","XUMF654",177,0) ;------------------------------------------------ "RTN","XUMF654",178,0) DATA9928 ;9999999.28 "RTN","XUMF654",179,0) ;1^Term^.01^^^^^^^30^^^^^^1^ "RTN","XUMF654",180,0) ;2^VistA_Class^100^^^^^^^^^^^^^2^ "RTN","XUMF654",181,0) ;3^VistA_Inactive_Flag^.03^^^^^^^1^^^^^^4^ "RTN","XUMF654",182,0) ;4^VistA_Mnemonic^8801^^^^^^^3^^^^^^5^ "RTN","XUMF654",183,0) ;5^VistA_Print_Name^1201^^^^^^^15^^^^^^6^ "RTN","XUMF654",184,0) ;6^VistA_Skin_Test_Code^.02^^^^^^^2^^^^^^7^ "RTN","XUMF654",185,0) ;7^VistA_Skin_Test_Mapping^.01^ST^9999999.283^^VistA_Skin_Test_Mapping^^^30^^^^^^8^ "RTN","XUMF654",186,0) ;8^vista_replaced_by^99.97^^^^^^^^^^^VUID^^9^ "RTN","XUMF654",187,0) ;9^Status^.02^^9999999.2899^^^^^^^^^^^10^ "RTN","XUMF654",188,0) ;------------------------------------------------- "RTN","XUMF654",189,0) DATA920 ;920 "RTN","XUMF654",190,0) ;1^Term^.01^^^^^^^50^^^^^^1^ "RTN","XUMF654",191,0) ;2^VistA_VIS_Bar_Code^100^^^^^^^24^^^^^^2^ "RTN","XUMF654",192,0) ;3^VistA_VIS_Edition_Date^.02^^^^^^^^^^^^^3^ "RTN","XUMF654",193,0) ;4^VistA_VIS_Edition_Status^.03^^^^^^^^^^^^^4^ "RTN","XUMF654",194,0) ;5^VistA_VIS_Language^.04^^^^^^^^^^^^^5^ "RTN","XUMF654",195,0) ;6^VistA_VIS_URL^101^^^^^^^99^^^^^^6^ "RTN","XUMF654",196,0) ;7^vista_replaced_by^99.97^^^^^^^^^^^VUID^^7^ "RTN","XUMF654",197,0) ;8^Status^.02^^920.99^^^^^^^^^^^8^ "RTN","XUMF654",198,0) ;------------------------------------------------- "RTN","XUMF654",199,0) DATA9201 ;920.1 "RTN","XUMF654",200,0) ;1^Term^.01^^^^^^^60^^^^^^1^ "RTN","XUMF654",201,0) ;2^VistA_HL7_Code^.02^^^^^^^2^^^^^^2^ "RTN","XUMF654",202,0) ;3^vista_replaced_by^99.97^^^^^^^^^^^VUID^^3^ "RTN","XUMF654",203,0) ;4^Status^.02^^920.199^^^^^^^^^^^4^ "RTN","XUMF654",204,0) ;5^VistA_Inactive_Flag^.03^^^^^^^1^^^^^^5^ "RTN","XUMF654",205,0) ;------------------------------------------------- "RTN","XUMF654",206,0) DATA9202 ;920.2 "RTN","XUMF654",207,0) ;1^Term^.01^^^^^^^30^^^^^^1^ "RTN","XUMF654",208,0) ;2^VistA_FDA_NCIT_Code^.03^^^^^^^6^^^^^^2^ "RTN","XUMF654",209,0) ;3^VistA_HL7_Code^.02^^^^^^^3^^^^^^3^ "RTN","XUMF654",210,0) ;4^VistA_Textual_Definition^.04^^^^^^^90^^^^^^4^ "RTN","XUMF654",211,0) ;5^vista_replaced_by^99.97^^^^^^^^^^^VUID^^5^ "RTN","XUMF654",212,0) ;6^Status^.02^^920.299^^^^^^^^^^^6^ "RTN","XUMF654",213,0) ;------------------------------------------------- "RTN","XUMF654",214,0) DATA9203 ;920.3 "RTN","XUMF654",215,0) ;1^Term^.01^^^^^^^30^^^^^^1^ "RTN","XUMF654",216,0) ;2^VistA_HL7_Code^.02^^^^^^^4^^^^^^2^ "RTN","XUMF654",217,0) ;3^vista_replaced_by^99.97^^^^^^^^^^^VUID^^3^ "RTN","XUMF654",218,0) ;4^Status^.02^^920.399^^^^^^^^^^^4^ "RTN","XUMF654",219,0) ;---------------------------------------------- "RTN","XUMF654",220,0) DATA9204 ;920.4 "RTN","XUMF654",221,0) ;1^Term^.01^^^^^^^30^^^^^^1^ "RTN","XUMF654",222,0) ;2^VistA_CDC_Code^.04^^^^^^^2^^^^^^2^ "RTN","XUMF654",223,0) ;3^VistA_HL7_Code^.02^^^^^^^10^^^^^^3^ "RTN","XUMF654",224,0) ;4^VistA_HL7_Code_Set^.05^^^^^^^10^^^^^^4^ "RTN","XUMF654",225,0) ;5^VistA_Inactive_Flag^.03^^^^^^^1^^^^^^5^ "RTN","XUMF654",226,0) ;6^VistA_Long_Name^1^^^^^^^99^^^^^^6^ "RTN","XUMF654",227,0) ;7^VistA_Textual_Definition^2^^^^^^^99^^^^^^7^ "RTN","XUMF654",228,0) ;8^vista_replaced_by^99.97^^^^^^^^^^^VUID^^8^ "RTN","XUMF654",229,0) ;9^Status^.02^^920.499^^^^^^^^^^^9^ "RTN","XUMF654",230,0) ;10^VistA_Precaution^.06^ST^^^^^^1^^^^^^10^ "RTN","XUMF654",231,0) ;11^vista_applies_to^.01^ST^920.43^^vista_applies_to^^^15^^^0^VUID^^11^ "RTN","XUMF654",232,0) ;--------------------------------------------- "RTN","XUMF654",233,0) DATA9205 ;920.5 "RTN","XUMF654",234,0) ;1^Term^.01^^^^^^^30^^^^^^1^ "RTN","XUMF654",235,0) ;2^VistA_HL7_Code^.02^^^^^^^2^^^^^^2^ "RTN","XUMF654",236,0) ;3^vista_replaced_by^99.97^^^^^^^^^^^VUID^^3^ "RTN","XUMF654",237,0) ;4^Status^.02^^920.599^^^^^^^^^^^4^ "RTN","XUMF654",238,0) ;--------------------------------------------- "RTN","XUMF654P") 0^2^B68896964 "RTN","XUMF654P",1,0) XUMF654P ;OIFO-BP/BATRAN - MFS parameters file ;04/02/2015 "RTN","XUMF654P",2,0) ;;8.0;KERNEL;**654**;Jul 10, 1995;Build 29 "RTN","XUMF654P",3,0) ;Per VHA Directive 10-92-142, this routine should not be modified "RTN","XUMF654P",4,0) Q "RTN","XUMF654P",5,0) ;---------------------------------------------- "RTN","XUMF654P",6,0) POST ; -- Entry point "RTN","XUMF654P",7,0) N XUMF S XUMF=1 "RTN","XUMF654P",8,0) D 9904,9914,9928 ; "RTN","XUMF654P",9,0) D 920,9201,9202,9203,9204,9205 ; "RTN","XUMF654P",10,0) N X S X="XUMF654" X ^%ZOSF("DEL") "RTN","XUMF654P",11,0) K XMY "RTN","XUMF654P",12,0) Q "RTN","XUMF654P",13,0) ;---------------------------------------------- "RTN","XUMF654P",14,0) 9904 ; FILE 9999999.04 "RTN","XUMF654P",15,0) N XFIEN,XFILE "RTN","XUMF654P",16,0) S XFIEN=9999999.04 "RTN","XUMF654P",17,0) S XFILE="Imm Manufacturers" "RTN","XUMF654P",18,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",19,0) D ADD^XUMF654(XFIEN,".03;Imm Manufacturers].07;Imm Manufacturers]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",20,0) D NODES^XUMF654(XFIEN,"DATA9904",6) ; call ADD1 to add sub_entry "RTN","XUMF654P",21,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",22,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",23,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",24,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",25,0) D SUBMD5^XUMF654(XFILE,".02^30^^^",XFIEN,.02) "RTN","XUMF654P",26,0) D SUBMD5^XUMF654(XFILE,"99.97^50^^9999999.04^",XFIEN,99.97) "RTN","XUMF654P",27,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",28,0) D SUBMD5^XUMF654(XFILE,"201^40^^^",XFIEN,201) "RTN","XUMF654P",29,0) D SUBMD5^XUMF654(XFILE,".03^25^I^^",XFIEN,.03) "RTN","XUMF654P",30,0) Q "RTN","XUMF654P",31,0) ;----------------------------------------------- "RTN","XUMF654P",32,0) 9914 ; FILE 9999999.14 "RTN","XUMF654P",33,0) N XFIEN,XFILE "RTN","XUMF654P",34,0) S XFIEN=9999999.14 "RTN","XUMF654P",35,0) S XFILE="Imm Procedures" "RTN","XUMF654P",36,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",37,0) D ADD^XUMF654(XFIEN,".03;Imm Procedures].07;Imm Procedures]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",38,0) D NODES^XUMF654(XFIEN,"DATA",17) ; call ADD1 to add sub_entry "RTN","XUMF654P",39,0) D ADD2^XUMF654(XFIEN,"VistA_Synonym",1,"1^VistA_Synonym^.01^^") "RTN","XUMF654P",40,0) D ADD2^XUMF654(XFIEN,"VistA_CVX_Mapping",1,"1^VistA_CVX_Mapping^.01^^") "RTN","XUMF654P",41,0) D ADD2^XUMF654(XFIEN,"VistA_CDC_Product_Name",1,"1^VistA_CDC_Product_Name^.01^^") "RTN","XUMF654P",42,0) D ADD2^XUMF654(XFIEN,"vista_has_vis",1,"1^vista_has_vis^.01^1^") "RTN","XUMF654P",43,0) ;MD5 "RTN","XUMF654P",44,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",45,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",46,0) S XFIEN=9999999.14 "RTN","XUMF654P",47,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",48,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",49,0) D SUBMD5^XUMF654(XFILE,".03^80^^^",XFIEN,.03) "RTN","XUMF654P",50,0) D SUBMD5^XUMF654(XFILE,".05^110^^^",XFIEN,.05) "RTN","XUMF654P",51,0) D SUBMD5^XUMF654(XFILE,".07^100^I^^^D M9992803^PXVZRT",XFIEN,.07) "RTN","XUMF654P",52,0) D SUBMD5^XUMF654(XFILE,".2^70^I^^^D M999142^PXVZRT",XFIEN,.2) "RTN","XUMF654P",53,0) D SUBMD5^XUMF654(XFILE,".51^130^^^",XFIEN,.51) "RTN","XUMF654P",54,0) D SUBMD5^XUMF654(XFILE,"2^40^^^",XFIEN,2) "RTN","XUMF654P",55,0) D SUBMD5^XUMF654(XFILE,"10^150^^^",XFIEN,10) "RTN","XUMF654P",56,0) D SUBMD5^XUMF654(XFILE,"99.97^170^^9999999.14^",XFIEN,99.97) "RTN","XUMF654P",57,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",58,0) D SUBMD5^XUMF654(XFILE,"100^60^^^",XFIEN,100) "RTN","XUMF654P",59,0) D SUBMD5^XUMF654(XFILE,"8801^120^^^",XFIEN,8801) "RTN","XUMF654P",60,0) D SUBMD5^XUMF654(XFILE,"8802^30^^^",XFIEN,8802) "RTN","XUMF654P",61,0) D SUBMD5^XUMF654(XFILE,"8803^140^^^",XFIEN,8803) "RTN","XUMF654P",62,0) S XFIEN=9999999.143 "RTN","XUMF654P",63,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",64,0) D SUBMD5^XUMF654(XFILE,".01^90^^^^D M999143^PXVZRT",XFIEN,.01) "RTN","XUMF654P",65,0) S XFIEN=9999999.144 "RTN","XUMF654P",66,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",67,0) D SUBMD5^XUMF654(XFILE,".01^160^^920^",XFIEN,.01) "RTN","XUMF654P",68,0) S XFIEN=9999999.145 "RTN","XUMF654P",69,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",70,0) D SUBMD5^XUMF654(XFILE,".01^50^^^",XFIEN,.01) "RTN","XUMF654P",71,0) Q "RTN","XUMF654P",72,0) ;---------------------------------------------- "RTN","XUMF654P",73,0) 9928 ;FILE #9999999.28 - Skin Tests "RTN","XUMF654P",74,0) N XFIEN,XFILE "RTN","XUMF654P",75,0) S XFIEN=9999999.28 "RTN","XUMF654P",76,0) S XFILE="Skin Tests" "RTN","XUMF654P",77,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",78,0) D ADD^XUMF654(XFIEN,".03;Skin Tests].07;Skin Tests]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",79,0) D NODES^XUMF654(XFIEN,"DATA9928",9) ; call ADD1 to add sub_entry "RTN","XUMF654P",80,0) D ADD2^XUMF654(XFIEN,"VistA_Skin_Test_Mapping",1,"1^VistA_Skin_Test_Mapping^.01^^") "RTN","XUMF654P",81,0) ;DM5 "RTN","XUMF654P",82,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",83,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",84,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",85,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",86,0) D SUBMD5^XUMF654(XFILE,".02^80^^^",XFIEN,.02) "RTN","XUMF654P",87,0) D SUBMD5^XUMF654(XFILE,".03^50^I^^^D M9992803^PXVZRT",XFIEN,.03) "RTN","XUMF654P",88,0) D SUBMD5^XUMF654(XFILE,"99.97^110^^9999999.28^",XFIEN,99.97) "RTN","XUMF654P",89,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",90,0) D SUBMD5^XUMF654(XFILE,"100^30^^^",XFIEN,100) "RTN","XUMF654P",91,0) D SUBMD5^XUMF654(XFILE,"1201^70^^^",XFIEN,1201) "RTN","XUMF654P",92,0) D SUBMD5^XUMF654(XFILE,"8801^60^^^",XFIEN,8801) "RTN","XUMF654P",93,0) S XFIEN=9999999.283 "RTN","XUMF654P",94,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",95,0) D SUBMD5^XUMF654(XFILE,".01^90^^^^D M999283^PXVZRT",XFIEN,.01) "RTN","XUMF654P",96,0) Q "RTN","XUMF654P",97,0) ;----------------------------------------------- "RTN","XUMF654P",98,0) 920 ; FILE #920 "RTN","XUMF654P",99,0) N XFIEN,XFILE "RTN","XUMF654P",100,0) S XFIEN=920 "RTN","XUMF654P",101,0) S XFILE="Imm VIS" "RTN","XUMF654P",102,0) D DEL^XUMF654(XFIEN) ;delete entry "RTN","XUMF654P",103,0) D ADD^XUMF654(XFIEN,".03;Imm VIS].07;Imm VIS]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",104,0) D NODES^XUMF654(XFIEN,"DATA920",8) ;call ADD1 to add sub_entry "RTN","XUMF654P",105,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",106,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",107,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",108,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",109,0) D SUBMD5^XUMF654(XFILE,".02^40^I^^^D M92002^PXVZRT",XFIEN,.02) "RTN","XUMF654P",110,0) D SUBMD5^XUMF654(XFILE,".03^70^^^^D M92003^PXVZRT",XFIEN,.03) "RTN","XUMF654P",111,0) D SUBMD5^XUMF654(XFILE,".04^50^^^^D M92004^PXVZRT",XFIEN,.04) "RTN","XUMF654P",112,0) D SUBMD5^XUMF654(XFILE,"99.97^90^^920^",XFIEN,99.97) "RTN","XUMF654P",113,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",114,0) D SUBMD5^XUMF654(XFILE,"100^60^^^^",XFIEN,100) "RTN","XUMF654P",115,0) D SUBMD5^XUMF654(XFILE,"101^80^^^",XFIEN,101) "RTN","XUMF654P",116,0) Q "RTN","XUMF654P",117,0) ;---------------------------------------------- "RTN","XUMF654P",118,0) 9201 ; FILE #920.1 "RTN","XUMF654P",119,0) N XFIEN,XFILE "RTN","XUMF654P",120,0) S XFIEN=920.1 "RTN","XUMF654P",121,0) S XFILE="Imm Info Sources" "RTN","XUMF654P",122,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",123,0) D ADD^XUMF654(XFIEN,".03;Imm Info Sources].07;Imm Info Sources]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",124,0) D NODES^XUMF654(XFIEN,"DATA9201",5) ; call ADD1 to add sub_entry "RTN","XUMF654P",125,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",126,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",127,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",128,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",129,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",130,0) D SUBMD5^XUMF654(XFILE,".02^30^^^",XFIEN,.02) "RTN","XUMF654P",131,0) D SUBMD5^XUMF654(XFILE,"99.97^40^^920.1^",XFIEN,99.97) "RTN","XUMF654P",132,0) D SUBMD5^XUMF654(XFILE,".03^35^I^^",XFIEN,.03) "RTN","XUMF654P",133,0) Q "RTN","XUMF654P",134,0) ;----------------------------------------------- "RTN","XUMF654P",135,0) 9202 ; FILE #920.2 "RTN","XUMF654P",136,0) N XFIEN,XFILE "RTN","XUMF654P",137,0) S XFIEN=920.2 "RTN","XUMF654P",138,0) S XFILE="Imm Admin Routes" "RTN","XUMF654P",139,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",140,0) D ADD^XUMF654(XFIEN,".03;Imm Admin Routes].07;Imm Admin Routes]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",141,0) D NODES^XUMF654(XFIEN,"DATA9202",6) ; call ADD1 to add sub_entry "RTN","XUMF654P",142,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",143,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",144,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",145,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",146,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",147,0) D SUBMD5^XUMF654(XFILE,".03^30^^^",XFIEN,.03) "RTN","XUMF654P",148,0) D SUBMD5^XUMF654(XFILE,".02^40^^^",XFIEN,.02) "RTN","XUMF654P",149,0) D SUBMD5^XUMF654(XFILE,".04^50^^^",XFIEN,.04) "RTN","XUMF654P",150,0) D SUBMD5^XUMF654(XFILE,"99.97^60^^920.2^",XFIEN,99.97) "RTN","XUMF654P",151,0) Q "RTN","XUMF654P",152,0) ;----------------------------------------------- "RTN","XUMF654P",153,0) 9203 ; FILE 920.3 "RTN","XUMF654P",154,0) N XFIEN,XFILE "RTN","XUMF654P",155,0) S XFIEN=920.3 "RTN","XUMF654P",156,0) S XFILE="Imm Body Sites" "RTN","XUMF654P",157,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",158,0) D ADD^XUMF654(XFIEN,".03;Imm Body Sites].07;Imm Body Sites]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",159,0) D NODES^XUMF654(XFIEN,"DATA9203",4) ; call ADD1 to add sub_entry "RTN","XUMF654P",160,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",161,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",162,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",163,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",164,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",165,0) D SUBMD5^XUMF654(XFILE,".02^30^^^",XFIEN,.02) "RTN","XUMF654P",166,0) D SUBMD5^XUMF654(XFILE,"99.97^40^^920.3^",XFIEN,99.97) "RTN","XUMF654P",167,0) Q "RTN","XUMF654P",168,0) ;----------------------------------------------- "RTN","XUMF654P",169,0) 9204 ; FILE 920.4 "RTN","XUMF654P",170,0) N XFIEN,XFILE "RTN","XUMF654P",171,0) S XFIEN=920.4 "RTN","XUMF654P",172,0) S XFILE="Imm Contraindications" "RTN","XUMF654P",173,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",174,0) D ADD^XUMF654(XFIEN,".03;Imm Contraindications].07;Imm Contraindications]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",175,0) D NODES^XUMF654(XFIEN,"DATA9204",11) ; call ADD1 to add sub_entry "RTN","XUMF654P",176,0) D ADD2^XUMF654(XFIEN,"vista_applies_to",1,"1^vista_applies_to^.01^1^") "RTN","XUMF654P",177,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",178,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",179,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",180,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",181,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",182,0) D SUBMD5^XUMF654(XFILE,".04^30^^^",XFIEN,.04) "RTN","XUMF654P",183,0) D SUBMD5^XUMF654(XFILE,".02^40^^^",XFIEN,.02) "RTN","XUMF654P",184,0) D SUBMD5^XUMF654(XFILE,".05^50^^^",XFIEN,.05) "RTN","XUMF654P",185,0) D SUBMD5^XUMF654(XFILE,".03^60^I^^",XFIEN,.03) "RTN","XUMF654P",186,0) D SUBMD5^XUMF654(XFILE,"1^70^^^",XFIEN,1) "RTN","XUMF654P",187,0) D SUBMD5^XUMF654(XFILE,".06^75^I^^",XFIEN,.06) "RTN","XUMF654P",188,0) D SUBMD5^XUMF654(XFILE,"2^80^^^",XFIEN,2) "RTN","XUMF654P",189,0) D SUBMD5^XUMF654(XFILE,"99.97^90^^920.4^",XFIEN,99.97) "RTN","XUMF654P",190,0) S XFIEN=920.43 "RTN","XUMF654P",191,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",192,0) D SUBMD5^XUMF654(XFILE,".01^85^^9999999.14^",XFIEN,.01) "RTN","XUMF654P",193,0) Q "RTN","XUMF654P",194,0) ;------------------------------------------------ "RTN","XUMF654P",195,0) 9205 ; FILE 920.5 "RTN","XUMF654P",196,0) N XFIEN,XFILE "RTN","XUMF654P",197,0) S XFIEN=920.5 "RTN","XUMF654P",198,0) S XFILE="Imm Refusal Reasons" "RTN","XUMF654P",199,0) D DEL^XUMF654(XFIEN) ; delete entry "RTN","XUMF654P",200,0) D ADD^XUMF654(XFIEN,".03;Imm Refusal Reasons].07;Imm Refusal Reasons]5;D ZRT^PXVZRT]") ; add entry "RTN","XUMF654P",201,0) D NODES^XUMF654(XFIEN,"DATA9205",4) ; call ADD1 to add sub_entry "RTN","XUMF654P",202,0) D DELMD5^XUMF654(XFILE) "RTN","XUMF654P",203,0) D ADDMD5^XUMF654(XFILE) "RTN","XUMF654P",204,0) D SCMD5^XUMF654(XFILE,XFIEN) "RTN","XUMF654P",205,0) D SUBMD5^XUMF654(XFILE,".01^20^^^",XFIEN,.01) "RTN","XUMF654P",206,0) D SUBMD5^XUMF654(XFILE,".02^30^^^",XFIEN,.02) "RTN","XUMF654P",207,0) D SUBMD5^XUMF654(XFILE,"99.97^40^^920.5^",XFIEN,99.97) "RTN","XUMF654P",208,0) D SUBMD5^XUMF654(XFILE,"99.99^10^^^",XFIEN,99.99) "RTN","XUMF654P",209,0) Q "RTN","XUMF654P",210,0) ;------------------------------------------------- "RTN","XUMF654P",211,0) TEST ; "RTN","XUMF654P",212,0) N XUMF,XMY S XUMF=1 "RTN","XUMF654P",213,0) S XMY("[email protected]")="" "RTN","XUMF654P",214,0) D 9204,9904,9914,9928,920,9201,9202,9203,9204,9205 ; "RTN","XUMF654P",215,0) Q "UP",4.005,4.0051,-1) 4.005^1 "UP",4.005,4.0051,0) 4.0051 "UP",4.005,4.00511,-2) 4.005^1 "UP",4.005,4.00511,-1) 4.0051^1 "UP",4.005,4.00511,0) 4.00511 "VER") 8.0^22.0 "^DD",4.005,4.005,1,0) FILE/SUBFILE NUMBER^4.0051^^1;0 "^DD",4.005,4.005,1,21,0) ^.001^2^2^3150220^^^^ "^DD",4.005,4.005,1,21,1,0) This field is the Internal File Number (IFN) of the MD5 table supported "^DD",4.005,4.005,1,21,2,0) by the Master File Server (MFS). "^DD",4.005,4.0051,0) FILE/SUBFILE NUMBER SUB-FIELD^^1^2 "^DD",4.005,4.0051,0,"DT") 3150130 "^DD",4.005,4.0051,0,"IX","B",4.0051,.01) "^DD",4.005,4.0051,0,"NM","FILE/SUBFILE NUMBER") "^DD",4.005,4.0051,0,"UP") 4.005 "^DD",4.005,4.0051,.01,0) FILE/SUBFILE NUMBER^MFX^^0;1^K:$L(X)>15!($L(X)<1) X S:$D(X) DINUM=X "^DD",4.005,4.0051,.01,.1) File/Subfile Number "^DD",4.005,4.0051,.01,1,0) ^.1 "^DD",4.005,4.0051,.01,1,1,0) 4.0051^B "^DD",4.005,4.0051,.01,1,1,1) S ^DIC(4.005,DA(1),1,"B",$E(X,1,30),DA)="" "^DD",4.005,4.0051,.01,1,1,2) K ^DIC(4.005,DA(1),1,"B",$E(X,1,30),DA) "^DD",4.005,4.0051,.01,3) Select file/subfile number to be included in MD5 procedure of the Master File Server (MFS) mechanism "^DD",4.005,4.0051,.01,21,0) ^^2^2^3050818^ "^DD",4.005,4.0051,.01,21,1,0) This field is the Internal File Number (IFN) of the MD5 table supported "^DD",4.005,4.0051,.01,21,2,0) by the Master File Server (MFS). "^DD",4.005,4.0051,.01,"DT") 3060517 "^DD",4.005,4.0051,1,0) FIELD NUMBER^4.00511^^1;0 "^DD",4.005,4.0051,1,21,0) ^.001^2^2^3150220^^^^ "^DD",4.005,4.0051,1,21,1,0) This is the field number of file/subfile to be included in MD5 procedure "^DD",4.005,4.0051,1,21,2,0) of the Master File Server (MFS). "^DD",4.005,4.00511,0) FIELD NUMBER SUB-FIELD^^4^5 "^DD",4.005,4.00511,0,"DT") 3150130 "^DD",4.005,4.00511,0,"IX","B",4.00511,.01) "^DD",4.005,4.00511,0,"NM","FIELD NUMBER") "^DD",4.005,4.00511,0,"UP") 4.0051 "^DD",4.005,4.00511,.01,0) FIELD NUMBER^MFX^^0;1^K:+X'=X!(X>999999)!(X<.001) X S:$D(X) DINUM=X "^DD",4.005,4.00511,.01,1,0) ^.1 "^DD",4.005,4.00511,.01,1,1,0) 4.00511^B "^DD",4.005,4.00511,.01,1,1,1) S ^DIC(4.005,DA(2),1,DA(1),1,"B",$E(X,1,30),DA)="" "^DD",4.005,4.00511,.01,1,1,2) K ^DIC(4.005,DA(2),1,DA(1),1,"B",$E(X,1,30),DA) "^DD",4.005,4.00511,.01,3) Select field number of file/subfile to be included in MD5 procedure of the Master File Server (MFS). "^DD",4.005,4.00511,.01,21,0) ^^2^2^3150130^ "^DD",4.005,4.00511,.01,21,1,0) Number of file/subfile to be included in MD5 procedure of the Master File "^DD",4.005,4.00511,.01,21,2,0) Server (MFS). "^DD",4.005,4.00511,.01,"DT") 3150130 "^DD",4.005,4.00511,1,0) SEQUENCE^NJ5,0^^0;2^K:+X'=X!(X>99999)!(X<1)!(X?.E1"."1N.N) X "^DD",4.005,4.00511,1,3) Type the sequence # the field will be taken in MD5 hash, a number between 1 and 99999. "^DD",4.005,4.00511,1,21,0) ^.001^1^1^3150130^^^ "^DD",4.005,4.00511,1,21,1,0) Order sequence, the field will be taken in MD5 hash. "^DD",4.005,4.00511,1,"DT") 3150130 "^DD",4.005,4.00511,2,0) External/Internal^SX^I:INTERNAL;E:EXTERNAL;^0;3^Q "^DD",4.005,4.00511,2,3) Enter the type of FileMan value to use, Internal or External. "^DD",4.005,4.00511,2,21,0) ^.001^1^1^3150202^^ "^DD",4.005,4.00511,2,21,1,0) Get External or internal Fileman value. Default = External "^DD",4.005,4.00511,2,"DT") 3150130 "^DD",4.005,4.00511,3,0) VUID FROM FILE^NJ21,8^^0;4^K:+X'=X!(X>999999999999)!(X<1)!(X?.E1"."9N.N) X "^DD",4.005,4.00511,3,3) Enter the number of the file being pointed to. Type '@' and press Enter to clear this setting "^DD",4.005,4.00511,3,21,0) ^^2^2^3060426^ "^DD",4.005,4.00511,3,21,1,0) If Pointer type field to .01 (Name), replace Name with VUID of pointed "^DD",4.005,4.00511,3,21,2,0) file. Field holds Pointed File #. "^DD",4.005,4.00511,3,"DT") 3060426 "^DD",4.005,4.00511,4,0) Distinct values^S^0:NO;1:YES;^0;5^Q "^DD",4.005,4.00511,4,3) Enter 1 for 'YES', if the field value must be unique, else enter 0 for 'NO'. "^DD",4.005,4.00511,4,21,0) ^^3^3^3150202^ "^DD",4.005,4.00511,4,21,1,0) If this field is set to 'YES' and the field value already exists, only "^DD",4.005,4.00511,4,21,2,0) repeated value will be excluded from MD5, other record's fields will not "^DD",4.005,4.00511,4,21,3,0) be affected. "^DD",4.005,4.00511,4,"DT") 3150130 "^DD",4.005,4.00511,5,0) POST-PROCESSING LOGIC^K^^1;E1,245^K:$L(X)>245 X D:$D(X) ^DIM "^DD",4.005,4.00511,5,3) Enter Standard MUMPS code "^DD",4.005,4.00511,5,9) @ "^DD",4.005,4.00511,5,21,0) ^.001^2^2^3150129^^^ "^DD",4.005,4.00511,5,21,1,0) This is Standard MUMPS code that gets executed for field exceptional "^DD",4.005,4.00511,5,21,2,0) treatment. **END** **END**
Genshi
3
mdgeek/VistA-FHIR-CWF
Scripts/Install/CWF/kid/20-XU654.kid
[ "Apache-2.0" ]
method methodNamesForObject(obj: Unknown) -> List { def methodMirrors: List = platform.mirrors.ClassMirror.reflecting(obj).methods def methodNames: List = platform.kernel.Array.new(methodMirrors.size) var i: Number := 1 methodMirrors.do { methodMirror: Unknown -> methodNames.at (i.asInteger) put (methodMirror.name) i := i + 1 } methodNames } method invoke (methodName: Unknown) on (obj: Unknown) -> Unknown { def objMirror: Unknown = platform.mirrors.ObjectMirror.reflecting(obj) objMirror.perform(methodName.asSymbol) } method invoke (methodName: Unknown) on (obj: Unknown) withArguments (args: Unknown) -> Unknown { def objMirror: Unknown = platform.mirrors.ObjectMirror.reflecting(obj) objMirror.perform(methodName.asSymbol)withArguments(args) }
Grace
3
FinnC/moth-SOMns
grace-lib/Modules/mirrors.grace
[ "MIT" ]
module ciena-waveserver-chassis { namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-chassis"; prefix chassis; import ciena-waveserver-typedefs { prefix cienawstypes; } organization "Ciena Corporation"; contact "Web URL: http://www.ciena.com/ Postal: 7035 Ridge Road Hanover, Maryland 21076 U.S.A. Phone: +1 800-921-1144 Fax: +1 410-694-5750"; description "This module defines Chassis data for the Waveserver Platform."; revision 2017-12-20 { description "Added management-port 'mode', 'speed', and 'duplex' for wayside channel configuration. Added return code for waveserver-wcs-restart and waveserver-wcs-restart-cold."; reference "Waveserver Ai user's guide."; } revision 2017-09-05 { description "Waveserver Platform Data Model Migrated from Waveserver Classic R1.4 YANG model. Updated namespace to 'ciena-waveserver'. Added 'waveserver ai chassis' type. Updated several UI and description strings. Added access-panel container, wcs container, and inventory view of components. Added slot power management and wcs-restart RPCs. Removed 10-second delay from restart RPCs and remove restart-cancel RPCs. Added access-panel capabilities. Moved several device-id attributes into common grouping used by all components. Removed 'number-of-fans', 'number-of-temperature-sensors' and 'status' list from 'cooling-fan-units/properties' container."; reference "Waveserver Ai user's guide."; } typedef mac-block-size { type uint32; description "MAC address block size."; } typedef chassis-operation-state { type enumeration { enum "uninstalled" { description "Device is not present."; } enum "normal" { description "Device is up/operational."; } enum "faulted" { description "Device is in a failed/faulted state."; } } description "Chassis operational state. Applies to PSU, CFU, AP, WCS components in the chassis."; } grouping device-id-group { description "Common group of device identification attributes for components in the chassis."; leaf model { type cienawstypes:string-maxl-50; config false; description "Device model information."; } leaf description { type cienawstypes:string-maxl-254; config false; description "Device description."; } leaf serial-number { type cienawstypes:string-maxl-50; config false; description "Device serial number information."; } leaf part-number { type cienawstypes:string-maxl-50; config false; description "Device part number information."; } leaf revision { type cienawstypes:string-maxl-50; config false; description "Device revision information."; } leaf manufacture-date { type cienawstypes:string-maxl-50; config false; description "Device Manufacture Date, in string format."; } } container waveserver-chassis { description "Waveserver chassis configuration data and operational data."; container identification { config false; description "Waveserver chassis identification attributes."; leaf type { type enumeration { enum "unknown chassis" { description "Chassis type is unknown."; } enum "waveserver chassis" { description "Waveserver WL3e Chassis."; } enum "waveserver ai chassis" { description "Waveserver Ai Chassis."; } } config false; description "Type enum value of the Chassis."; } uses device-id-group; } container capabilities { config false; description "Waveserver chassis capabilities attributes."; container control { description "Control module capabilities for this chassis."; leaf count { type uint8; config false; description "Number of control modules available to the Waveserver chassis."; } leaf type { type cienawstypes:module-type-bits; config false; description "Chassis control module type. Can be integrated or field-replaceable."; } } container access-panel { description "Access Panel capabilities for this chassis."; leaf count { type uint8; config false; description "Number of access panel modules available to the Waveserver chassis."; } leaf type { type cienawstypes:module-type-bits; config false; description "Chassis access panel module type. Can be integrated or field-replaceable."; } } container switch { description "Switch module capabilities for this chassis."; leaf count { type uint8; config false; description "Number of switch modules available to the Waveserver chassis."; } leaf type { type cienawstypes:module-type-bits; config false; description "Chassis switch module type. Can be integrated or field-replaceable."; } } container modules { description "Service module capabilities for this chassis."; leaf count { type uint8; config false; description "Total number of service modules available to a fully-equipped Waveserver chassis."; } leaf type { type cienawstypes:module-type-bits; config false; description "Chassis service module type. Can be integrated or field-replaceable."; } } container fan { description "Fan unit capabilities for this chassis."; leaf count { type uint8; config false; description "Number of fan units available to the Waveserver chassis."; } leaf type { type cienawstypes:module-type-bits; config false; description "Chassis fan unit type. Can be integrated or field-replaceable."; } } container air-filter { description "Air filter capabilities for this chassis."; leaf supported { type cienawstypes:yes-no-enum; config false; description "Is the air filter supported on the Waveserver chassis."; } leaf type { type cienawstypes:module-type-bits; config false; description "Chassis air filter type. Can be integrated or field-replaceable."; } leaf active { type cienawstypes:yes-no-enum; config false; description "Is the air filter active on the Waveserver chassis."; } } container power { description "Power supply capabilities for this chassis."; leaf count { type uint8; config false; description "Number of power supply units available to the Waveserver chassis."; } leaf type { type cienawstypes:module-type-bits; config false; description "Power supply unit type. Can be integrated or field-replaceable."; } leaf redundant { type cienawstypes:yes-no-enum; config false; description "Is redundant power present for the Waveserver chassis."; } leaf dc-support { type cienawstypes:yes-no-enum; config false; description "Whether or not DC power is supported."; } } } container mac-addresses { config false; description "MAC Addresses used by this chassis."; container chassis { description "Chassis MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "The Chassis Base MAC address. All MACs used in shelf offset from this."; } leaf block-size { type mac-block-size; config false; description "Number of MACs allocated by manufacturing."; } } container local-management { description "Local management MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "Local Management MAC address."; } leaf block-size { type mac-block-size; config false; description "Local Management MAC Block Size."; } } container remote-management { description "Remote management MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "Remote Management MAC address."; } leaf block-size { type mac-block-size; config false; description "Remote Management MAC address Block Size."; } } container dcn { description "Data Communications Network (DCN) port MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "DCN MAC address."; } leaf block-size { type mac-block-size; config false; description "DCN MAC address Block Size."; } } container ilan-1 { description "Internal Local Area Network 1 (ILAN-1) port MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "ILAN-1 MAC address."; } leaf block-size { type mac-block-size; config false; description "ILAN-1 MAC address Block Size."; } } container ilan-2 { description "Internal Local Area Network 2 (ILAN-2) port MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "ILAN-2 MAC address."; } leaf block-size { type mac-block-size; config false; description "ILAN-2 MAC address Block Size."; } } container ports { description "Port MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "Port Base MAC address."; } leaf block-size { type mac-block-size; config false; description "Port Base MAC address Block Size."; } } container reserved { description "Reserved MAC address information."; leaf base { type cienawstypes:mac-string; config false; description "Reserved MAC address."; } leaf block-size { type mac-block-size; config false; description "Reserved MAC address Block Size."; } } } list power-supply-units { key "psu-number"; description "Power Supply Unit Status."; leaf psu-number { type uint8; description "Unique index number for the Power Supply Unit list entry."; } leaf name { type cienawstypes:string-maxl-16; config false; description "Name of the power supply unit. In the format of PSU-<slot #>. Contains the slot number of the power supply unit."; } container state { description "Power Supply Unit state information."; leaf admin-state { type cienawstypes:enabled-disabled-enum; description "Whether admin state of the Power Supply Unit is enabled or disabled. Disabled state masks the alarms only."; } leaf operational-state { type chassis-operation-state; config false; description "Operational state of the Power Supply Unit."; } } container properties { config false; description "All the operational data fields of this Power Supply Unit."; leaf type { type enumeration { enum "AC" { description "Power supply unit uses AC power."; } enum "DC" { description "Power supply unit uses DC power."; } enum "unequipped" { description "Power supply unit is unequipped."; } } config false; description "The Power Supply Unit type."; } } container device-id { config false; description "Device identification information of this Power Supply Unit."; uses device-id-group; } } list cooling-fan-units { key "cfu-number"; description "Cooling Fan Unit Status."; leaf cfu-number { type uint8; description "Unique index number for the Cooling Fan Unit list entry."; } leaf name { type cienawstypes:string-maxl-16; config false; description "Name of the cooling fan unit. In the format of CFU-<slot #>. Contains the slot number of the cooling fan unit."; } container state { description "Cooling Fan Unit state information."; leaf admin-state { type cienawstypes:enabled-disabled-enum; description "Whether Admin State of the cooling fan unit is enabled or disabled. Disabled state masks the alarms only."; } leaf operational-state { type chassis-operation-state; config false; description "Operational state of the Cooling Fan unit."; } } container properties { config false; description "All the operational data fields of this Cooling Fan Unit."; leaf automatic-control { type cienawstypes:enabled-disabled-enum; config false; description "Whether Automatic Control of the cooling fan unit is enabled or disabled."; } } container device-id { config false; description "Device Identification information of this Cooling Fan Unit."; uses device-id-group; } } list management-port { key "index"; description "A list to manage chassis ports."; leaf index { type uint16; description "Index value of the management port."; } container id { config false; description "Identification information of this management port."; leaf name { type cienawstypes:string-maxl-16; config false; description "Name of the Port. The names are predefined."; } } container state { description "Management port state information."; leaf admin-state { type cienawstypes:enabled-disabled-enum; description "Whether Admin State is enabled or disabled for this management port."; } leaf operational-state { type cienawstypes:up-down-enum; config false; description "Operational state of this management port."; } } container properties { description "All the operational data of this management port."; leaf type { type enumeration { enum "ethernet" { description "Ethernet management port."; } enum "serial" { description "Serial management port."; } } config false; description "Management port type. If the port is DCN, ilan-1, or ilan-2, the port type will be Ethernet. If the port is Console, the port type will be Serial."; } leaf mode { type enumeration { enum "management" { description "Management port is configured as a local management interface. This is the default mode."; } enum "wayside-channel" { description "Management port is configured as a wayside communications channel."; } } description "Management port mode. Specifies whether the port is configured as a local management interface or wayside communications channel (carry through)."; } leaf speed { type enumeration { enum "Unknown" { description "Unknown port speed."; } enum "10M" { description "10 Mbps Ethernet."; } enum "100M" { description "100 Mbps Ethernet."; } enum "1G" { description "1 Gbps Ethernet."; } enum "10G" { description "10 Gbps Ethernet."; } } config false; description "Management port speed."; } leaf duplex { type enumeration { enum "Unknown" { description "Unknown port duplex."; } enum "full" { description "Port is full-duplex."; } enum "half" { description "Port is half-duplex."; } } config false; description "Management port duplex."; } leaf mac-address { type cienawstypes:mac-string; config false; description "MAC Address of the management port."; } leaf max-frame-size { type uint32; config false; description "Max Frame Size of the management port."; } } } container access-panel { description "Access Panel"; container state { description "Access Panel state information."; leaf admin-state { type cienawstypes:enabled-disabled-enum; description "Whether admin state of the Access Panel is enabled or disabled."; } leaf operational-state { type chassis-operation-state; config false; description "Operational state of the Access Panel."; } } container properties { config false; description "All the operational data fields of the Access Panel."; leaf type { type enumeration { enum "type-1" { description "Access Panel Type 1."; } enum "unequipped" { description "Access Panel is unequipped."; } } config false; description "The Access Panel type."; } } container device-id { config false; description "Device identification information of the Access Panel."; uses device-id-group; } } container wcs { description "Waveserver Control Subsystem. This is the control module for the Waveserver Ai chassis."; container state { description "WCS control module state information."; leaf admin-state { type cienawstypes:enabled-disabled-enum; description "Whether admin state of the WCS is enabled or disabled."; } leaf operational-state { type chassis-operation-state; config false; description "Operational state of the WCS."; } } container properties { config false; description "All the operational data fields of the WCS."; leaf type { type enumeration { enum "type-1" { description "WCS Type 1."; } enum "unequipped" { description "WCS is unequipped."; } } config false; description "The WCS module type."; } } container device-id { config false; description "Device identification information of the WCS."; uses device-id-group; } } container inventory { config false; description "The inventory view of all of the components in the chassis."; list component { key "index"; config false; description "Inventory component details."; leaf index { type uint16; description "Index value of the inventory component."; } leaf name { type cienawstypes:string-maxl-16; config false; description "Name of the inventory component (e.g., Chassis, DCN, WCS, AP, PSU-<n>, CFU-<n>, etc.)."; } uses device-id-group; } } list slot { key "slot-id"; description "Chassis slot power management."; leaf slot-id { type uint8 { range "1..3"; } mandatory true; description "Chassis slot number, Key value for the chassis slot list."; } leaf power-state { type cienawstypes:power-state; config false; description "Slot power state."; } leaf actual-power-state { type cienawstypes:on-off-enum; config false; description "The actual power state (on or off) of the specified slot."; } } } rpc waveserver-chassis-restart { description "Initiates a chassis warm restart. This restarts the WCS and all modules."; } rpc waveserver-chassis-restart-cold { description "Initiates a chassis cold restart. This restarts the WCS and all modules."; } rpc waveserver-wcs-restart { description "Initiates a WCS warm restart."; output { leaf return-code { type uint32; description "return code: 0 is success; non-zero is failure"; } leaf return-string { type cienawstypes:string-maxl-254; description "Return code description"; } } } rpc waveserver-wcs-restart-cold { description "Initiates a WCS cold restart."; output { leaf return-code { type uint32; description "return code: 0 is success; non-zero is failure"; } leaf return-string { type cienawstypes:string-maxl-254; description "Return code description"; } } } }
YANG
5
meodaiduoi/onos
models/ciena/waveserverai/src/main/yang/[email protected]
[ "Apache-2.0" ]
#world { polygon-fill:#CCC; } #world[NAME='United States'] { polygon-fill:#F00; [BLUE='red'] { } } #countries .countries .two { polygon-fill:#0FF; } #countries, #world { polygon-fill:#F0F; polygon-opacity: 0.5; } #countries, #countries.foo.bar.baz {}
CartoCSS
3
nimix/carto
test/specificity/demo.mss
[ "Apache-2.0" ]
// Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:io'; /// This changes the DocSetPlatformFamily key to be "dartlang" instead of the /// name of the package (usually "flutter"). /// /// This is so that the IntelliJ plugin for Dash will be able to go directly to /// the docs for a symbol from a keystroke. Without this, flutter isn't part /// of the list of package names it searches. After this, it finds the flutter /// docs because they're declared here to be part of the "dartlang" family of /// docs. /// /// Dashing doesn't have a way to configure this, so we modify the Info.plist /// directly to make the change. void main(List<String> args) { final File infoPlist = File('flutter.docset/Contents/Info.plist'); String contents = infoPlist.readAsStringSync(); // Since I didn't want to add the XML package as a dependency just for this, // I just used a regular expression to make this simple change. final RegExp findRe = RegExp(r'(\s*<key>DocSetPlatformFamily</key>\s*<string>)[^<]+(</string>)', multiLine: true); contents = contents.replaceAllMapped(findRe, (Match match) { return '${match.group(1)}dartlang${match.group(2)}'; }); infoPlist.writeAsStringSync(contents); }
Dart
4
Mayb3Nots/flutter
dev/docs/dashing_postprocess.dart
[ "BSD-3-Clause" ]
(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.3' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 70139, 1774] NotebookOptionsPosition[ 68784, 1723] NotebookOutlinePosition[ 69219, 1742] CellTagsIndexPosition[ 69176, 1739] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Box Intersection", "Section", CellChangeTimes->{{3.6687840865469503`*^9, 3.668784092823586*^9}, { 3.6689788656325903`*^9, 3.668978871839361*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"boxIntersection", "[", RowBox[{"\[Theta]_", ",", "size_", ",", "shape_", ",", "cornerRadius_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "list", ",", "circleOrigin", ",", "lineEquations", ",", "edge", ",", " ", "rx", ",", " ", "ry", ",", "r", ",", "circleEquation", ",", "combinedEquation", ",", "x", ",", "y", ",", "R", ",", "cutRadius"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"shape", " ", "\[Equal]", " ", "True"}], ",", "\[IndentingNewLine]", RowBox[{"(*", "Circle", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Easy", ":", " ", RowBox[{ "Just", " ", "get", " ", "the", " ", "point", " ", "on", " ", "the", " ", "circle", " ", "at", " ", "the", " ", "given", " ", RowBox[{"angle", "."}]}]}], "*)"}], "\[IndentingNewLine]", "\t", RowBox[{ RowBox[{"list", "=", RowBox[{"{", RowBox[{ RowBox[{ FractionBox["size", "2"], "+", RowBox[{ FractionBox["size", "2"], " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], ",", RowBox[{ FractionBox["size", "2"], "-", RowBox[{ FractionBox["size", "2"], " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}]}], "}"}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", "\t", RowBox[{"(*", "Square", "*)"}], "\[IndentingNewLine]", "\t", RowBox[{"(*", RowBox[{ RowBox[{ "Calculate", " ", "if", " ", "the", " ", "point", " ", "ends", " ", "up", " ", "on", " ", "the", " ", "top", " ", "edge"}], ",", " ", "corner", ",", " ", RowBox[{"or", " ", "right", " ", RowBox[{"edge", "."}]}]}], "*)"}], "\[IndentingNewLine]", "\t", RowBox[{ RowBox[{"circleOrigin", "=", RowBox[{"{", RowBox[{ RowBox[{"size", "-", "cornerRadius"}], ",", RowBox[{"0", "+", "cornerRadius"}]}], "}"}]}], ";", "\[IndentingNewLine]", "\t", RowBox[{"lineEquations", "=", RowBox[{"{", RowBox[{ RowBox[{ FractionBox["size", "2"], "+", RowBox[{"r", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], ",", RowBox[{ FractionBox["size", "2"], "+", RowBox[{"r", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}]}], "}"}]}], ";", "\[IndentingNewLine]", "\t", RowBox[{"rx", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{"0", "\[Equal]", RowBox[{"lineEquations", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", "r"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", "\t", RowBox[{"ry", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{"size", "\[Equal]", RowBox[{"lineEquations", "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", " ", "r"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", "\t", RowBox[{"edge", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"r", "*", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], ")"}], "/.", "rx"}], ",", RowBox[{ RowBox[{"(", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"r", "*", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}], ")"}], "/.", "ry"}]}], "}"}]}], ";", "\[IndentingNewLine]", "\t", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"edge", "[", RowBox[{"[", "1", "]"}], "]"}], "\[LessEqual]", RowBox[{"circleOrigin", "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", "\t\t", RowBox[{"(*", RowBox[{"On", " ", "the", " ", "top", " ", "edge"}], "*)"}], "\[IndentingNewLine]", "\t\t", RowBox[{ RowBox[{"list", "=", RowBox[{"{", RowBox[{ RowBox[{"edge", "[", RowBox[{"[", "1", "]"}], "]"}], ",", "0"}], "}"}]}], ";"}], "\[IndentingNewLine]", "\t", ",", "\[IndentingNewLine]", "\t\t", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"edge", "[", RowBox[{"[", "2", "]"}], "]"}], "\[GreaterEqual]", RowBox[{"circleOrigin", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", "\[IndentingNewLine]", "\t\t\t", RowBox[{"(*", RowBox[{"On", " ", "the", " ", "right", " ", "edge"}], "*)"}], "\[IndentingNewLine]", "\t\t\t", RowBox[{ RowBox[{"list", "=", RowBox[{"{", RowBox[{"size", ",", RowBox[{"edge", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", "\t\t", ",", "\[IndentingNewLine]", "\t\t\t", RowBox[{"(*", RowBox[{"On", " ", "the", " ", "corner"}], "*)"}], "\[IndentingNewLine]", "\t\t\t", RowBox[{ RowBox[{"circleEquation", "=", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", RowBox[{"circleOrigin", "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"y", "-", RowBox[{"circleOrigin", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], "2"]}], "\[Equal]", SuperscriptBox["cornerRadius", "2"]}]}], ";", "\[IndentingNewLine]", "\t\t\t", RowBox[{"combinedEquation", "=", RowBox[{"circleEquation", "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", RowBox[{ FractionBox["size", "2"], "+", RowBox[{"R", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}]}], ",", RowBox[{"y", "\[Rule]", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"R", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}]}]}], "}"}]}]}], ";", "\[IndentingNewLine]", "\t\t\t", RowBox[{"cutRadius", "=", RowBox[{"R", "/.", RowBox[{ RowBox[{"Solve", "[", RowBox[{"combinedEquation", ",", " ", "R"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", "\t\t\t", RowBox[{"list", "=", RowBox[{"{", RowBox[{ RowBox[{ FractionBox["size", "2"], "+", RowBox[{"(", RowBox[{"cutRadius", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}], ")"}]}], ",", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"(", RowBox[{"cutRadius", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}]}], "}"}]}], ";"}]}], "\[IndentingNewLine]", "\t\t", "]"}], ";"}]}], "\[IndentingNewLine]", "\t", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "list"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.668978873200287*^9, 3.668978931301387*^9}, { 3.668979014013363*^9, 3.668979088570076*^9}, {3.668979151814089*^9, 3.668979162725677*^9}, {3.6689792288782473`*^9, 3.668979255240374*^9}, { 3.668979878679913*^9, 3.668979884321599*^9}, {3.668981368892529*^9, 3.668981383082363*^9}, {3.668981425480981*^9, 3.668981425977071*^9}, { 3.668981567979776*^9, 3.668981574403531*^9}, {3.668981766476828*^9, 3.668981770796227*^9}, {3.6690516692535067`*^9, 3.669051672859789*^9}, { 3.66905174513804*^9, 3.669051763672984*^9}, {3.669128420379649*^9, 3.669128450181138*^9}, {3.6691285299685497`*^9, 3.669128541870195*^9}, 3.669128583633012*^9, {3.669128644125248*^9, 3.669128904635936*^9}, { 3.669128981835319*^9, 3.6691290676414557`*^9}, {3.6691291282579308`*^9, 3.669129196491222*^9}, {3.669129337210763*^9, 3.669129374193585*^9}, { 3.669129423398098*^9, 3.669129493689953*^9}, {3.6691295501664677`*^9, 3.669129644218993*^9}, {3.669129677509798*^9, 3.6691296791279087`*^9}, { 3.669129978757362*^9, 3.669130329316577*^9}, {3.669130401296318*^9, 3.669130444676032*^9}, {3.66913056446974*^9, 3.669130585304761*^9}, { 3.669154870235064*^9, 3.669154872755369*^9}, {3.669154945990779*^9, 3.669154946133445*^9}, {3.669155250382236*^9, 3.669155255660866*^9}, { 3.669155322858622*^9, 3.669155339775511*^9}, {3.669217547084908*^9, 3.669217560381377*^9}, {3.669217669610757*^9, 3.669217669825598*^9}, { 3.6693810203719473`*^9, 3.669381032578022*^9}, 3.669381104072999*^9, { 3.6693814919163094`*^9, 3.669381736328225*^9}, {3.6693818311226997`*^9, 3.669381834476028*^9}, {3.669381916390077*^9, 3.669381919720378*^9}, { 3.669381981100882*^9, 3.6693819993489037`*^9}, {3.669382054587976*^9, 3.6693820643526487`*^9}, {3.669382286152211*^9, 3.669382371699061*^9}, { 3.669382643101912*^9, 3.669382662147987*^9}, {3.6693827573962603`*^9, 3.669382758810481*^9}, 3.669382879403202*^9, {3.669382969551745*^9, 3.669382992455926*^9}, {3.6693830268831778`*^9, 3.669383035556055*^9}, { 3.669383216348341*^9, 3.6693832164715014`*^9}, {3.6693834875709553`*^9, 3.669383506234864*^9}, {3.669383556928617*^9, 3.669383578056028*^9}, { 3.669383753751484*^9, 3.6693837884469624`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"circleOrigin", "=", RowBox[{"{", RowBox[{ RowBox[{"size", "-", "cornerRadius"}], ",", RowBox[{"0", "+", "cornerRadius"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lineEquations", "=", RowBox[{"{", RowBox[{ RowBox[{ FractionBox["size", "2"], "+", RowBox[{"r", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], ",", RowBox[{ FractionBox["size", "2"], "+", RowBox[{"r", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rx", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{"0", "\[Equal]", RowBox[{"lineEquations", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", "r"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ry", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{"size", "\[Equal]", RowBox[{"lineEquations", "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", " ", "r"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"edge", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"r", "*", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], ")"}], "/.", "rx"}], ",", RowBox[{ RowBox[{"(", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"r", "*", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}], ")"}], "/.", "ry"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"circleEquation", "=", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", RowBox[{"circleOrigin", "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"y", "-", RowBox[{"circleOrigin", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], "2"]}], "\[Equal]", SuperscriptBox["cornerRadius", "2"]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"combinedEquation", "=", RowBox[{"circleEquation", "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", RowBox[{ FractionBox["size", "2"], "+", RowBox[{"R", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}]}], ",", RowBox[{"y", "\[Rule]", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"R", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}]}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cutRadius", "=", RowBox[{"R", "/.", RowBox[{ RowBox[{"Solve", "[", RowBox[{"combinedEquation", ",", " ", "R"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"list", "=", RowBox[{"{", RowBox[{ RowBox[{ FractionBox["size", "2"], "+", RowBox[{"(", RowBox[{"cutRadius", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}], ")"}]}], ",", RowBox[{ FractionBox["size", "2"], "-", RowBox[{"(", RowBox[{"cutRadius", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"output", "=", RowBox[{"{", RowBox[{ RowBox[{"FullSimplify", "[", RowBox[{ RowBox[{"list", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Assumptions", "\[Rule]", "assumptions"}]}], "]"}], ",", RowBox[{"FullSimplify", "[", RowBox[{ RowBox[{"list", "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"Assumptions", "\[Rule]", "assumptions"}]}], "]"}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"size", " ", RowBox[{"(", RowBox[{"3", "+", RowBox[{"Cos", "[", RowBox[{"2", " ", "\[Theta]"}], "]"}], "+", RowBox[{"Sin", "[", RowBox[{"2", " ", "\[Theta]"}], "]"}]}], ")"}]}], "\[Rule]", "a"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", "cornerRadius", " ", RowBox[{"(", RowBox[{ RowBox[{"Cos", "[", "\[Theta]", "]"}], "+", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}], "\[Rule]", "b"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"4", " ", "cornerRadius"}], "-", "size"}], ")"}], " ", "size"}], "+", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", "cornerRadius"}], "+", "size"}], ")"}], "2"], " ", RowBox[{"Sin", "[", RowBox[{"2", " ", "\[Theta]"}], "]"}]}]}], "\[Rule]", "c"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"size", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"Cos", "[", "\[Theta]", "]"}], "-", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}], "\[Rule]", "d"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"2", " ", "cornerRadius", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"Cos", "[", "\[Theta]", "]"}], "+", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}], "\[Rule]", "e"}], "}"}]}]}]}], "Input", CellChangeTimes->{{3.669200941998684*^9, 3.6692010308198433`*^9}, { 3.669207272158313*^9, 3.669207276141226*^9}, {3.6692073604064083`*^9, 3.6692075108418293`*^9}, 3.669207563715743*^9, {3.66921152312167*^9, 3.66921154725576*^9}, {3.669211579735176*^9, 3.66921160866975*^9}, { 3.669212762947036*^9, 3.6692127671249638`*^9}, {3.669212805012656*^9, 3.669212831148304*^9}, {3.66938179075835*^9, 3.6693818191743917`*^9}, { 3.669381900200687*^9, 3.669381900556842*^9}, {3.669381972729931*^9, 3.669381972875692*^9}, {3.669382006975799*^9, 3.669382007279231*^9}, { 3.669382137704398*^9, 3.669382215915327*^9}, {3.6693822552019377`*^9, 3.669382256968286*^9}, 3.669383660004868*^9, {3.66938370405029*^9, 3.669383744559092*^9}, {3.669383791416627*^9, 3.669383944274106*^9}, 3.669384495044115*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ FractionBox["size", "2"], "+", RowBox[{ FractionBox["1", "2"], " ", "size", " ", RowBox[{"Cot", "[", "\[Theta]", "]"}]}]}], ",", RowBox[{ FractionBox["size", "2"], "-", RowBox[{ FractionBox["1", "2"], " ", "size", " ", RowBox[{"Tan", "[", "\[Theta]", "]"}]}]}]}], "}"}]], "Output", CellChangeTimes->{{3.669201017824697*^9, 3.669201031311656*^9}, 3.6692072809996147`*^9, {3.66920743369337*^9, 3.6692074477882137`*^9}, 3.6692075122098417`*^9, 3.669207565128092*^9, {3.669211333705513*^9, 3.669211356852908*^9}, {3.669211524599674*^9, 3.6692115488903437`*^9}, { 3.669211595468544*^9, 3.669211610820278*^9}, 3.6692127561063023`*^9, { 3.669212817820422*^9, 3.669212831872198*^9}, {3.6693818037214947`*^9, 3.669381819765163*^9}, 3.669381900963461*^9, 3.6693819732037992`*^9, 3.669382007561944*^9, {3.6693821404768047`*^9, 3.6693821673756647`*^9}, 3.6693822165532303`*^9, 3.669382257559293*^9, {3.669383738719993*^9, 3.669383745304182*^9}, {3.66938381100241*^9, 3.6693838836712437`*^9}, { 3.669383926734515*^9, 3.6693839450072403`*^9}, 3.669384495638433*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ FractionBox["1", "4"], " ", RowBox[{"(", RowBox[{ RowBox[{"size", " ", RowBox[{"(", RowBox[{"3", "+", RowBox[{"Cos", "[", RowBox[{"2", " ", "\[Theta]"}], "]"}], "+", RowBox[{"Sin", "[", RowBox[{"2", " ", "\[Theta]"}], "]"}]}], ")"}]}], "+", RowBox[{"2", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", "cornerRadius", " ", RowBox[{"(", RowBox[{ RowBox[{"Cos", "[", "\[Theta]", "]"}], "+", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}], "+", SqrtBox[ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"4", " ", "cornerRadius"}], "-", "size"}], ")"}], " ", "size"}], "+", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", "cornerRadius"}], "+", "size"}], ")"}], "2"], " ", RowBox[{"Sin", "[", RowBox[{"2", " ", "\[Theta]"}], "]"}]}]}]]}], ")"}]}]}], ")"}]}], ",", RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"size", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"Cos", "[", "\[Theta]", "]"}], "-", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}], "+", RowBox[{"2", " ", "cornerRadius", " ", RowBox[{"Sin", "[", "\[Theta]", "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"Cos", "[", "\[Theta]", "]"}], "+", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ")"}]}], "-", RowBox[{ RowBox[{"Sin", "[", "\[Theta]", "]"}], " ", SqrtBox[ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"4", " ", "cornerRadius"}], "-", "size"}], ")"}], " ", "size"}], "+", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", "cornerRadius"}], "+", "size"}], ")"}], "2"], " ", RowBox[{"Sin", "[", RowBox[{"2", " ", "\[Theta]"}], "]"}]}]}]]}]}], ")"}]}]}], "}"}]], "Output", CellChangeTimes->{{3.669201017824697*^9, 3.669201031311656*^9}, 3.6692072809996147`*^9, {3.66920743369337*^9, 3.6692074477882137`*^9}, 3.6692075122098417`*^9, 3.669207565128092*^9, {3.669211333705513*^9, 3.669211356852908*^9}, {3.669211524599674*^9, 3.6692115488903437`*^9}, { 3.669211595468544*^9, 3.669211610820278*^9}, 3.6692127561063023`*^9, { 3.669212817820422*^9, 3.669212831872198*^9}, {3.6693818037214947`*^9, 3.669381819765163*^9}, 3.669381900963461*^9, 3.6693819732037992`*^9, 3.669382007561944*^9, {3.6693821404768047`*^9, 3.6693821673756647`*^9}, 3.6693822165532303`*^9, 3.669382257559293*^9, {3.669383738719993*^9, 3.669383745304182*^9}, {3.66938381100241*^9, 3.6693838836712437`*^9}, { 3.669383926734515*^9, 3.6693839450072403`*^9}, 3.669384495687295*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ FractionBox["1", "4"], " ", RowBox[{"(", RowBox[{"a", "+", RowBox[{"2", " ", RowBox[{"(", RowBox[{"b", "+", SqrtBox["c"]}], ")"}], " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], ")"}]}], ",", RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{"d", "+", "e", "-", RowBox[{ SqrtBox["c"], " ", RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}], ")"}]}]}], "}"}]], "Output",\ CellChangeTimes->{{3.669201017824697*^9, 3.669201031311656*^9}, 3.6692072809996147`*^9, {3.66920743369337*^9, 3.6692074477882137`*^9}, 3.6692075122098417`*^9, 3.669207565128092*^9, {3.669211333705513*^9, 3.669211356852908*^9}, {3.669211524599674*^9, 3.6692115488903437`*^9}, { 3.669211595468544*^9, 3.669211610820278*^9}, 3.6692127561063023`*^9, { 3.669212817820422*^9, 3.669212831872198*^9}, {3.6693818037214947`*^9, 3.669381819765163*^9}, 3.669381900963461*^9, 3.6693819732037992`*^9, 3.669382007561944*^9, {3.6693821404768047`*^9, 3.6693821673756647`*^9}, 3.6693822165532303`*^9, 3.669382257559293*^9, {3.669383738719993*^9, 3.669383745304182*^9}, {3.66938381100241*^9, 3.6693838836712437`*^9}, { 3.669383926734515*^9, 3.6693839450072403`*^9}, 3.669384495696933*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Middle Point", "Section", CellChangeTimes->{{3.6687840865469503`*^9, 3.668784092823586*^9}, { 3.6689788656325903`*^9, 3.668978871839361*^9}, {3.668979895353861*^9, 3.668979897249305*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"middlePoint", "[", RowBox[{"size_", ",", " ", "radius_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ FractionBox["size", "2.0"], ",", RowBox[{ FractionBox["size", "2.0"], "+", RowBox[{"size", " ", "*", " ", "radius"}]}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.668979900964797*^9, 3.668979988277701*^9}, { 3.668981194378195*^9, 3.6689812213782873`*^9}, {3.668981439008462*^9, 3.668981449359962*^9}, {3.668981578171337*^9, 3.668981580091103*^9}, { 3.668981619625874*^9, 3.668981619953641*^9}, {3.6692175740210648`*^9, 3.6692175793480177`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Short Point", "Section", CellChangeTimes->{{3.6687840865469503`*^9, 3.668784092823586*^9}, { 3.6689788656325903`*^9, 3.668978871839361*^9}, {3.668979895353861*^9, 3.668979897249305*^9}, {3.668979995358038*^9, 3.6689799960931883`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"shortPoint", "[", RowBox[{"size_", ",", " ", "radius_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ FractionBox["size", "2.0"], "-", RowBox[{"size", " ", "*", " ", "radius"}]}], ",", FractionBox["size", "2.0"]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.668979900964797*^9, 3.668980021612512*^9}, { 3.668981204225061*^9, 3.6689812140245857`*^9}, {3.668981459952424*^9, 3.6689814703836727`*^9}, 3.668981585546999*^9, 3.669217583227869*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Long Arm End Point", "Section", CellChangeTimes->{{3.6687840865469503`*^9, 3.668784092823586*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"longArmEndPoint", "[", RowBox[{ "\[Theta]_", ",", "size_", ",", "r_", ",", "boxIntersectionEndPoint_", ",", "middleEndPoint_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "lineEquation", ",", " ", "circleEquation", ",", "circleX", ",", "circleY", ",", "lineX", ",", "lineY", ",", "x", ",", "y"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ "The", " ", "line", " ", "between", " ", "the", " ", "middle", " ", "and", " ", "long", " ", "end", " ", RowBox[{"points", "."}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lineEquation", " ", "=", " ", RowBox[{ RowBox[{"y", "-", RowBox[{"middleEndPoint", "[", RowBox[{"[", "2", "]"}], "]"}]}], "\[Equal]", RowBox[{ FractionBox[ RowBox[{ RowBox[{"boxIntersectionEndPoint", "[", RowBox[{"[", "2", "]"}], "]"}], "-", RowBox[{"middleEndPoint", "[", RowBox[{"[", "2", "]"}], "]"}]}], RowBox[{ RowBox[{"boxIntersectionEndPoint", "[", RowBox[{"[", "1", "]"}], "]"}], "-", RowBox[{"middleEndPoint", "[", RowBox[{"[", "1", "]"}], "]"}]}]], RowBox[{"(", RowBox[{"x", "-", RowBox[{"middleEndPoint", "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"The", " ", "circle", " ", "where", " ", "the", " ", "mid"}], "-", RowBox[{"point", " ", "needs", " ", "to", " ", RowBox[{"lie", "."}]}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"circleEquation", "=", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", FractionBox["size", "2.0"]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"y", "-", FractionBox["size", "2.0"]}], ")"}], "2"]}], "\[Equal]", SuperscriptBox["r", "2"]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ "Calculate", " ", "the", " ", "intersection", " ", "of", " ", "the", " ", "circle", " ", "and", " ", RowBox[{"line", "."}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"circleX", "=", RowBox[{ RowBox[{"NSolve", "[", RowBox[{"circleEquation", ",", "x"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\<CX: \>\"", ",", " ", "circleX"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"circleY", "=", RowBox[{ RowBox[{"NSolve", "[", RowBox[{"circleEquation", ",", "y"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\<CY: \>\"", ",", " ", "circleY"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"lineY", "=", RowBox[{"NSolve", "[", RowBox[{ RowBox[{"lineEquation", "/.", "circleX"}], ",", "y"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\<LY: \>\"", ",", " ", RowBox[{"lineY", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"lineX", "=", RowBox[{"NSolve", "[", RowBox[{ RowBox[{"lineEquation", "/.", "circleY"}], ",", "x"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\<LX: \>\"", ",", " ", RowBox[{"lineX", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\<LA: \>\"", " ", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"x", "/.", RowBox[{"lineX", "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"y", "/.", RowBox[{"lineY", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"x", "/.", RowBox[{"lineX", "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"y", "/.", RowBox[{"lineY", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.668986410451621*^9, 3.668986638409775*^9}, 3.669049631084413*^9, {3.669049665527081*^9, 3.669049668789687*^9}, { 3.669049709244472*^9, 3.669049725323958*^9}, {3.669049783666501*^9, 3.669049928548972*^9}, {3.669049980452215*^9, 3.669049993010676*^9}, { 3.669050219191321*^9, 3.66905023381397*^9}, {3.6690502851333733`*^9, 3.669050289508277*^9}, {3.669050365266548*^9, 3.669050384416748*^9}, { 3.6690504464878883`*^9, 3.669050550828871*^9}, {3.66905058599471*^9, 3.669050747484044*^9}, {3.6690507789153233`*^9, 3.669050824302191*^9}, { 3.669050871752586*^9, 3.6690508969510183`*^9}, {3.669051087801444*^9, 3.6690510894424753`*^9}, {3.6690511467514668`*^9, 3.669051181005471*^9}, { 3.669051252186956*^9, 3.669051289601481*^9}, {3.669051348608202*^9, 3.6690514151730547`*^9}, {3.669051446685767*^9, 3.669051446900054*^9}, { 3.669051886149723*^9, 3.669051898404945*^9}, {3.6691275657606564`*^9, 3.6691276627176332`*^9}, {3.669127804697257*^9, 3.66912780772228*^9}, { 3.6691279985733557`*^9, 3.669127998695696*^9}, {3.669128915627779*^9, 3.6691289659614983`*^9}, {3.6692176259643993`*^9, 3.669217627762878*^9}, { 3.6692176974565563`*^9, 3.669217720822768*^9}, {3.669217845716566*^9, 3.669217859506751*^9}, {3.66921792147503*^9, 3.669217982564871*^9}, { 3.669218022506954*^9, 3.669218069672648*^9}, {3.669218154554953*^9, 3.669218168865075*^9}, {3.66936756944128*^9, 3.6693675695985527`*^9}, { 3.6693898184411*^9, 3.669389863554205*^9}, {3.669390593601429*^9, 3.669390641905398*^9}, {3.669390689753783*^9, 3.669390692599061*^9}, { 3.669390968469123*^9, 3.669390972259391*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{ "x", ",", "y", ",", "x1", ",", "y1", ",", "x2", ",", "y2", ",", "lineEquation", ",", "circleEquation", ",", "size", ",", "r", ",", "circleX", ",", "circleY", ",", "lineY", ",", "lineX"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"lineEquation", " ", "=", " ", RowBox[{ RowBox[{"y", "-", "y1"}], "\[Equal]", RowBox[{ FractionBox[ RowBox[{"y2", "-", "y1"}], RowBox[{"x2", "-", "x1"}]], RowBox[{"(", RowBox[{"x", "-", "x1"}], ")"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"The", " ", "circle", " ", "where", " ", "the", " ", "mid"}], "-", RowBox[{"point", " ", "needs", " ", "to", " ", RowBox[{"lie", "."}]}]}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"circleEquation", "=", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"x", "-", FractionBox["size", "2.0"]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"y", "-", FractionBox["size", "2.0"]}], ")"}], "2"]}], "\[Equal]", SuperscriptBox["r", "2"]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ "Calculate", " ", "the", " ", "intersection", " ", "of", " ", "the", " ", "circle", " ", "and", " ", RowBox[{"line", "."}]}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"circleX", "=", RowBox[{ RowBox[{"NSolve", "[", RowBox[{"circleEquation", ",", "x"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"circleY", "=", RowBox[{ RowBox[{"NSolve", "[", RowBox[{"circleEquation", ",", "y"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lineY", "=", RowBox[{"NSolve", "[", RowBox[{ RowBox[{"lineEquation", "/.", "circleX"}], ",", "y"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lineX", "=", RowBox[{"NSolve", "[", RowBox[{ RowBox[{"lineEquation", "/.", "circleY"}], ",", "x"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"assumptions", "=", RowBox[{"{", RowBox[{ RowBox[{"size", ">", "0"}], ",", RowBox[{"0", "<", "\[Theta]", "<", FractionBox["\[Pi]", "2"]}], ",", RowBox[{"x1", ">", "x2", ">", "0"}], ",", RowBox[{"y1", ">", "y2", ">", "0"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Note", ":", " ", RowBox[{ "The", " ", "order", " ", "of", " ", "the", " ", "solutions", " ", "to", " ", "lineX", " ", "is", " ", "different", " ", "when", " ", "computed", " ", "in", " ", "this", " ", RowBox[{"case", "."}]}]}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"{", RowBox[{ RowBox[{"FullSimplify", "[", RowBox[{ RowBox[{"x", "/.", RowBox[{"lineX", "[", RowBox[{"[", "2", "]"}], "]"}]}], ",", RowBox[{"Assumptions", "\[Rule]", "assumptions"}]}], "]"}], ",", RowBox[{"FullSimplify", "[", RowBox[{ RowBox[{"y", "/.", RowBox[{"lineY", "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"Assumptions", "\[Rule]", "assumptions"}]}], "]"}]}], "}"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"1.`", " ", "size", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "size", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", "size", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", "size", " ", "x1", " ", "y1"}], "-", RowBox[{"1.`", " ", "size", " ", "x2", " ", "y1"}]}], "\[Rule]", "a1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"2.`", " ", "x2", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"1.`", " ", "size", " ", "x1", " ", "y2"}], "+", RowBox[{"1.`", " ", "size", " ", "x2", " ", "y2"}], "-", RowBox[{"2.`", " ", "x1", " ", "y1", " ", "y2"}], "-", RowBox[{"2.`", " ", "x2", " ", "y1", " ", "y2"}], "+", RowBox[{"2.`", " ", "x1", " ", SuperscriptBox["y2", "2"]}]}], "\[Rule]", "a2"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", "16.`"}], " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}], ")"}]}], "\[Rule]", "b"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ SuperscriptBox["r", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "1.`"}], " ", SuperscriptBox["x1", "2"]}], "+", RowBox[{"2.`", " ", "x1", " ", "x2"}], "-", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}]}], ")"}]}], "\[Rule]", "c1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ SuperscriptBox["size", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"0.5`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"1.`", " ", "x1", " ", "x2"}], "+", RowBox[{"0.5`", " ", SuperscriptBox["x2", "2"]}]}], ")"}]}], "\[Rule]", "c2"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x2", "2"], " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x1", "2"], " ", SuperscriptBox["y2", "2"]}]}], "\[Rule]", "d1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y1"}], "-", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"], " ", "y1"}], "-", RowBox[{"1.`", " ", SuperscriptBox["x1", "2"], " ", "y2"}], "+", RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y2"}]}], ")"}]}], "\[Rule]", "d2"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"c1", "+", "c2", "+", "d1", "+", "d2"}], "\[Rule]", "cd"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x1", " ", RowBox[{"(", RowBox[{ RowBox[{"4.`", " ", "y1"}], "-", RowBox[{"4.`", " ", "y2"}]}], ")"}], " ", "y2"}], "+", RowBox[{"x2", " ", "y1", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "4.`"}], " ", "y1"}], "+", RowBox[{"4.`", " ", "y2"}]}], ")"}]}]}], "\[Rule]", "e1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2.`"}], " ", SuperscriptBox["x1", "2"]}], "+", RowBox[{"x2", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2.`"}], " ", "x2"}], "+", RowBox[{"2.`", " ", "y1"}], "-", RowBox[{"2.`", " ", "y2"}]}], ")"}]}], "+", RowBox[{"x1", " ", RowBox[{"(", RowBox[{ RowBox[{"4.`", " ", "x2"}], "-", RowBox[{"2.`", " ", "y1"}], "+", RowBox[{"2.`", " ", "y2"}]}], ")"}]}]}], ")"}]}], "\[Rule]", "e2"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}], "\[Rule]", "f"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"0.5`", " ", "size", " ", "x1", " ", "y1"}], "-", RowBox[{"0.5`", " ", "size", " ", "x2", " ", "y1"}], "-", RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y1"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"], " ", "y1"}], "+", RowBox[{"0.5`", " ", "size", " ", SuperscriptBox["y1", "2"]}]}], "\[Rule]", "g1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"-", "0.5`"}], " ", "size", " ", "x1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x1", "2"], " ", "y2"}], "+", RowBox[{"0.5`", " ", "size", " ", "x2", " ", "y2"}], "-", RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y2"}], "-", RowBox[{"1.`", " ", "size", " ", "y1", " ", "y2"}], "+", RowBox[{"0.5`", " ", "size", " ", SuperscriptBox["y2", "2"]}]}], "\[Rule]", "g2"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"-", "4.`"}], " ", SuperscriptBox["x2", "2"], " ", "y1"}], "-", RowBox[{"4.`", " ", SuperscriptBox["x1", "2"], " ", "y2"}], "+", RowBox[{"x1", " ", "x2", " ", RowBox[{"(", RowBox[{ RowBox[{"4.`", " ", "y1"}], "+", RowBox[{"4.`", " ", "y2"}]}], ")"}]}]}], "\[Rule]", "h1"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2.`"}], " ", "x1", " ", "y1"}], "+", RowBox[{"2.`", " ", "x2", " ", "y1"}], "-", RowBox[{"2.`", " ", SuperscriptBox["y1", "2"]}], "+", RowBox[{"2.`", " ", "x1", " ", "y2"}], "-", RowBox[{"2.`", " ", "x2", " ", "y2"}], "+", RowBox[{"4.`", " ", "y1", " ", "y2"}], "-", RowBox[{"2.`", " ", SuperscriptBox["y2", "2"]}]}], ")"}]}], "\[Rule]", "h2"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["r", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "1.`"}], " ", SuperscriptBox["y1", "2"]}], "+", RowBox[{"2.`", " ", "y1", " ", "y2"}], "-", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}], ")"}]}], "+", RowBox[{ SuperscriptBox["size", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"0.5`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"1.`", " ", "y1", " ", "y2"}], "+", RowBox[{"0.5`", " ", SuperscriptBox["y2", "2"]}]}], ")"}]}]}], "\[Rule]", "i"}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"output", "=", RowBox[{"output", "/.", RowBox[{"{", RowBox[{ RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{"x1", " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", "y1"}], "-", RowBox[{"1.`", " ", "y2"}]}], ")"}], " ", "y2"}], "+", RowBox[{"x2", " ", "y1", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "1.`"}], " ", "y1"}], "+", RowBox[{"1.`", " ", "y2"}]}], ")"}]}]}], ")"}]}], "\[Rule]", "j"}], "}"}], "\[IndentingNewLine]"}]}]}], "Input", CellChangeTimes->{{3.669155807233238*^9, 3.6691558624320707`*^9}, { 3.669155894384286*^9, 3.6691559905553007`*^9}, {3.669156058660211*^9, 3.669156059699109*^9}, {3.6691561062267942`*^9, 3.669156243907876*^9}, { 3.66915628490164*^9, 3.669156288741082*^9}, {3.669156392657938*^9, 3.669156474298252*^9}, {3.669156568023459*^9, 3.6691566440448217`*^9}, { 3.669207549508724*^9, 3.669207611810328*^9}, {3.669207643216196*^9, 3.669207689843212*^9}, {3.6692077425130177`*^9, 3.6692077668556013`*^9}, { 3.66921132630267*^9, 3.669211326784378*^9}, 3.669211649068715*^9, { 3.6692129221955233`*^9, 3.669213102036734*^9}, {3.66921313354743*^9, 3.669213180529299*^9}, {3.669213232783195*^9, 3.669213287867218*^9}, { 3.6692133650156527`*^9, 3.669213408517527*^9}, {3.6693675050730143`*^9, 3.669367560541665*^9}, {3.6693676635662813`*^9, 3.669367664005534*^9}, { 3.6693853890170393`*^9, 3.6693857126163483`*^9}, {3.669385745683465*^9, 3.669385797231923*^9}, 3.6693859234478197`*^9, {3.669390650153276*^9, 3.6693907093066187`*^9}, {3.669390779329657*^9, 3.669390810063807*^9}, { 3.6693908459075317`*^9, 3.669390849833791*^9}, {3.669390895498714*^9, 3.669390895711788*^9}, {3.66939093354725*^9, 3.669390984937748*^9}, { 3.669391089410397*^9, 3.669391119211157*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ FractionBox["1", RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}]], RowBox[{"0.5`", " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", "size", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "size", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", "size", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", "size", " ", "x1", " ", "y1"}], "-", RowBox[{"1.`", " ", "size", " ", "x2", " ", "y1"}], "+", RowBox[{"2.`", " ", "x2", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"1.`", " ", "size", " ", "x1", " ", "y2"}], "+", RowBox[{"1.`", " ", "size", " ", "x2", " ", "y2"}], "-", RowBox[{"2.`", " ", "x1", " ", "y1", " ", "y2"}], "-", RowBox[{"2.`", " ", "x2", " ", "y1", " ", "y2"}], "+", RowBox[{"2.`", " ", "x1", " ", SuperscriptBox["y2", "2"]}], "+", RowBox[{"0.5`", " ", RowBox[{"\[Sqrt]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "16.`"}], " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{ SuperscriptBox["r", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "1.`"}], " ", SuperscriptBox["x1", "2"]}], "+", RowBox[{"2.`", " ", "x1", " ", "x2"}], "-", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}]}], ")"}]}], "+", RowBox[{ SuperscriptBox["size", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"0.5`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"1.`", " ", "x1", " ", "x2"}], "+", RowBox[{"0.5`", " ", SuperscriptBox["x2", "2"]}]}], ")"}]}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"], " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x1", "2"], " ", SuperscriptBox["y2", "2"]}], "+", RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y1"}], "-", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"], " ", "y1"}], "-", RowBox[{"1.`", " ", SuperscriptBox["x1", "2"], " ", "y2"}], "+", RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y2"}]}], ")"}]}]}], ")"}]}], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"x1", " ", RowBox[{"(", RowBox[{ RowBox[{"4.`", " ", "y1"}], "-", RowBox[{"4.`", " ", "y2"}]}], ")"}], " ", "y2"}], "+", RowBox[{"x2", " ", "y1", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "4.`"}], " ", "y1"}], "+", RowBox[{"4.`", " ", "y2"}]}], ")"}]}], "+", RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2.`"}], " ", SuperscriptBox["x1", "2"]}], "+", RowBox[{"x2", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2.`"}], " ", "x2"}], "+", RowBox[{"2.`", " ", "y1"}], "-", RowBox[{"2.`", " ", "y2"}]}], ")"}]}], "+", RowBox[{"x1", " ", RowBox[{"(", RowBox[{ RowBox[{"4.`", " ", "x2"}], "-", RowBox[{"2.`", " ", "y1"}], "+", RowBox[{"2.`", " ", "y2"}]}], ")"}]}]}], ")"}]}]}], ")"}], "2"]}], ")"}]}]}]}], ")"}]}]}], ",", RowBox[{ FractionBox["1", RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}]], RowBox[{"1.`", " ", RowBox[{"(", RowBox[{ RowBox[{"0.5`", " ", "size", " ", "x1", " ", "y1"}], "-", RowBox[{"0.5`", " ", "size", " ", "x2", " ", "y1"}], "-", RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y1"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"], " ", "y1"}], "+", RowBox[{"0.5`", " ", "size", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"0.5`", " ", "size", " ", "x1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x1", "2"], " ", "y2"}], "+", RowBox[{"0.5`", " ", "size", " ", "x2", " ", "y2"}], "-", RowBox[{"1.`", " ", "x1", " ", "x2", " ", "y2"}], "-", RowBox[{"1.`", " ", "size", " ", "y1", " ", "y2"}], "+", RowBox[{"0.5`", " ", "size", " ", SuperscriptBox["y2", "2"]}], "-", RowBox[{"0.25`", " ", RowBox[{"\[Sqrt]", RowBox[{"(", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "4.`"}], " ", SuperscriptBox["x2", "2"], " ", "y1"}], "-", RowBox[{"4.`", " ", SuperscriptBox["x1", "2"], " ", "y2"}], "+", RowBox[{"x1", " ", "x2", " ", RowBox[{"(", RowBox[{ RowBox[{"4.`", " ", "y1"}], "+", RowBox[{"4.`", " ", "y2"}]}], ")"}]}], "+", RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2.`"}], " ", "x1", " ", "y1"}], "+", RowBox[{"2.`", " ", "x2", " ", "y1"}], "-", RowBox[{"2.`", " ", SuperscriptBox["y1", "2"]}], "+", RowBox[{"2.`", " ", "x1", " ", "y2"}], "-", RowBox[{"2.`", " ", "x2", " ", "y2"}], "+", RowBox[{"4.`", " ", "y1", " ", "y2"}], "-", RowBox[{"2.`", " ", SuperscriptBox["y2", "2"]}]}], ")"}]}]}], ")"}], "2"], "-", RowBox[{"16.`", " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x2", "2"]}], "+", RowBox[{"1.`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", SuperscriptBox["x2", "2"], " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"2.`", " ", "x1", " ", "x2", " ", "y1", " ", "y2"}], "+", RowBox[{"1.`", " ", SuperscriptBox["x1", "2"], " ", SuperscriptBox["y2", "2"]}], "+", RowBox[{ SuperscriptBox["r", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "1.`"}], " ", SuperscriptBox["y1", "2"]}], "+", RowBox[{"2.`", " ", "y1", " ", "y2"}], "-", RowBox[{"1.`", " ", SuperscriptBox["y2", "2"]}]}], ")"}]}], "+", RowBox[{ SuperscriptBox["size", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"0.5`", " ", SuperscriptBox["y1", "2"]}], "-", RowBox[{"1.`", " ", "y1", " ", "y2"}], "+", RowBox[{"0.5`", " ", SuperscriptBox["y2", "2"]}]}], ")"}]}], "+", RowBox[{"size", " ", RowBox[{"(", RowBox[{ RowBox[{"x1", " ", RowBox[{"(", RowBox[{ RowBox[{"1.`", " ", "y1"}], "-", RowBox[{"1.`", " ", "y2"}]}], ")"}], " ", "y2"}], "+", RowBox[{"x2", " ", "y1", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "1.`"}], " ", "y1"}], "+", RowBox[{"1.`", " ", "y2"}]}], ")"}]}]}], ")"}]}]}], ")"}]}]}], ")"}]}]}]}], ")"}]}]}]}], "}"}]], "Output", CellChangeTimes->{{3.6692130133887043`*^9, 3.669213030549788*^9}, { 3.669213070346944*^9, 3.669213103069009*^9}, {3.669213155043453*^9, 3.669213180912328*^9}, 3.669213245106917*^9, 3.6692132882468653`*^9, { 3.669213379708415*^9, 3.669213409469804*^9}, {3.6693675151141357`*^9, 3.6693675611503763`*^9}, 3.669367665470572*^9, 3.669380625154613*^9, { 3.669385406000794*^9, 3.669385427243184*^9}, 3.669385459739181*^9, 3.6693854898918133`*^9, {3.669385580605283*^9, 3.669385597554311*^9}, 3.6693856290951347`*^9, 3.669385668288451*^9, 3.66938571376982*^9, { 3.669385750103031*^9, 3.669385798276217*^9}, 3.669385924639303*^9, 3.669390658135775*^9, 3.6693907101199217`*^9, {3.669390788147209*^9, 3.669390851062057*^9}, 3.669390897435902*^9, {3.66939095495998*^9, 3.6693909854170427`*^9}, 3.669391127420965*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ FractionBox[ RowBox[{"0.5`", " ", RowBox[{"(", RowBox[{"a1", "+", "a2", "+", RowBox[{"0.5`", " ", SqrtBox[ RowBox[{ RowBox[{"b", " ", "cd"}], "+", SuperscriptBox[ RowBox[{"(", RowBox[{"e1", "+", "e2"}], ")"}], "2"]}]]}]}], ")"}]}], "f"], ",", FractionBox[ RowBox[{"1.`", " ", RowBox[{"(", RowBox[{"g1", "+", "g2", "-", RowBox[{"0.25`", " ", SqrtBox[ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"h1", "+", "h2"}], ")"}], "2"], "+", RowBox[{"b", " ", RowBox[{"(", RowBox[{"d1", "+", "i", "+", "j"}], ")"}]}]}]]}]}], ")"}]}], "f"]}], "}"}]], "Output", CellChangeTimes->{{3.6692130133887043`*^9, 3.669213030549788*^9}, { 3.669213070346944*^9, 3.669213103069009*^9}, {3.669213155043453*^9, 3.669213180912328*^9}, 3.669213245106917*^9, 3.6692132882468653`*^9, { 3.669213379708415*^9, 3.669213409469804*^9}, {3.6693675151141357`*^9, 3.6693675611503763`*^9}, 3.669367665470572*^9, 3.669380625154613*^9, { 3.669385406000794*^9, 3.669385427243184*^9}, 3.669385459739181*^9, 3.6693854898918133`*^9, {3.669385580605283*^9, 3.669385597554311*^9}, 3.6693856290951347`*^9, 3.669385668288451*^9, 3.66938571376982*^9, { 3.669385750103031*^9, 3.669385798276217*^9}, 3.669385924639303*^9, 3.669390658135775*^9, 3.6693907101199217`*^9, {3.669390788147209*^9, 3.669390851062057*^9}, 3.669390897435902*^9, {3.66939095495998*^9, 3.6693909854170427`*^9}, 3.669391127434103*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Testing", "Section", CellChangeTimes->{{3.668784099518281*^9, 3.6687841035000563`*^9}, { 3.668978483647934*^9, 3.668978484766172*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"angle", "=", FractionBox[ RowBox[{"\[Theta]", " ", "\[Pi]"}], "180"]}], ";", "\[IndentingNewLine]", RowBox[{"Graphics", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{"Thick", ",", "Black", ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"circle", ",", "\[IndentingNewLine]", RowBox[{"Circle", "[", RowBox[{ RowBox[{"{", RowBox[{ FractionBox["size", "2.0"], ",", FractionBox["size", "2.0"]}], "}"}], ",", FractionBox["size", "2.0"]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Rectangle", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"size", ",", "size"}], "}"}], ",", RowBox[{"RoundingRadius", "\[Rule]", RowBox[{"cornerRadius", "*", "size"}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"PointSize", "[", "Medium", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Point", "[", RowBox[{"{", RowBox[{ FractionBox["size", "2.0"], ",", FractionBox["size", "2.0"]}], "}"}], "]"}], ",", "\[IndentingNewLine]", "Red", ",", RowBox[{"Point", "[", RowBox[{"boxIntersection", "[", RowBox[{"angle", ",", "size", ",", "circle", ",", RowBox[{"size", "*", "cornerRadius"}]}], "]"}], "]"}], ",", "\[IndentingNewLine]", "Green", ",", RowBox[{"Point", "[", RowBox[{"middlePoint", "[", RowBox[{"size", ",", ".135"}], "]"}], "]"}], ",", "\[IndentingNewLine]", "Blue", ",", RowBox[{"Point", "[", RowBox[{"shortPoint", "[", RowBox[{"size", ",", ".185"}], "]"}], "]"}], ",", "\[IndentingNewLine]", "Orange", ",", RowBox[{"Point", "[", RowBox[{"longArmEndPoint", "[", RowBox[{"angle", ",", "size", ",", RowBox[{"size", ".33"}], ",", RowBox[{"boxIntersection", "[", RowBox[{"angle", ",", "size", ",", "circle", ",", RowBox[{"size", "*", "cornerRadius"}]}], "]"}], ",", RowBox[{"middlePoint", "[", RowBox[{"size", ",", ".135"}], "]"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", "\[IndentingNewLine]", RowBox[{"Axes", "\[Rule]", "True"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Theta]", ",", "36"}], "}"}], ",", "0", ",", "90", ",", "0.1"}], "}"}], ",", RowBox[{"{", RowBox[{"size", ",", "1", ",", "100", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"circle", ",", RowBox[{"{", RowBox[{"True", ",", "False"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"cornerRadius", ",", "0", ",", "0.5", ",", "0.01"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.668978493005045*^9, 3.6689785140544147`*^9}, { 3.668978638037891*^9, 3.668978739771497*^9}, {3.668978776189971*^9, 3.668978808120085*^9}, {3.668978838653038*^9, 3.668978851552354*^9}, { 3.668980261188403*^9, 3.6689805567528057`*^9}, {3.668980622919113*^9, 3.6689806237182283`*^9}, {3.668980661021688*^9, 3.668980676740429*^9}, { 3.668980835063217*^9, 3.668980878773748*^9}, {3.668981012033307*^9, 3.6689810293434134`*^9}, {3.668981067183284*^9, 3.668981070862005*^9}, { 3.668981407330833*^9, 3.668981418849765*^9}, {3.6689815250870447`*^9, 3.66898153906894*^9}, {3.668981643292698*^9, 3.668981643896928*^9}, { 3.6689817288385887`*^9, 3.668981737398348*^9}, {3.668981934807455*^9, 3.668981942453822*^9}, {3.66898235396135*^9, 3.668982377783668*^9}, { 3.6689828156483088`*^9, 3.668982894316877*^9}, {3.6689835367916517`*^9, 3.668983560567614*^9}, {3.668983629571663*^9, 3.668983629883675*^9}, { 3.668983680194729*^9, 3.668983681113668*^9}, {3.669051203581826*^9, 3.669051226947545*^9}, {3.6690513087215567`*^9, 3.669051320408239*^9}, { 3.669051511499028*^9, 3.66905151563365*^9}, {3.669051585183895*^9, 3.669051679971842*^9}, {3.669127368134206*^9, 3.669127371894623*^9}, 3.669127514977446*^9, {3.6691279816642714`*^9, 3.669127981820259*^9}, { 3.669128491211647*^9, 3.6691284951368217`*^9}, {3.669128550455394*^9, 3.669128576690481*^9}, {3.669129744481388*^9, 3.669129784700738*^9}, { 3.669130514157839*^9, 3.6691305184771557`*^9}, {3.669155524999628*^9, 3.669155549645872*^9}, {3.669217646714238*^9, 3.6692176501543217`*^9}, 3.669380657921254*^9}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`circle$$ = True, $CellContext`cornerRadius$$ = 0, $CellContext`size$$ = 1, $CellContext`\[Theta]$$ = 30.3, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`\[Theta]$$], 36}, 0, 90, 0.1}, { Hold[$CellContext`size$$], 1, 100, 1}, { Hold[$CellContext`circle$$], {True, False}}, { Hold[$CellContext`cornerRadius$$], 0, 0.5, 0.01}}, Typeset`size$$ = { 259.2, {128., 129.22911619897957`}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`\[Theta]$1095832$$ = 0, $CellContext`size$1095833$$ = 0, $CellContext`circle$1095834$$ = False, $CellContext`cornerRadius$1095835$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`circle$$ = True, $CellContext`cornerRadius$$ = 0, $CellContext`size$$ = 1, $CellContext`\[Theta]$$ = 36}, "ControllerVariables" :> { Hold[$CellContext`\[Theta]$$, $CellContext`\[Theta]$1095832$$, 0], Hold[$CellContext`size$$, $CellContext`size$1095833$$, 0], Hold[$CellContext`circle$$, $CellContext`circle$1095834$$, False], Hold[$CellContext`cornerRadius$$, $CellContext`cornerRadius$1095835$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`angle = $CellContext`\[Theta]$$ Pi/180; Graphics[{Thick, Black, If[$CellContext`circle$$, Circle[{$CellContext`size$$/2., $CellContext`size$$/ 2.}, $CellContext`size$$/2.], Rectangle[{0, 0}, {$CellContext`size$$, $CellContext`size$$}, RoundingRadius -> $CellContext`cornerRadius$$ \ $CellContext`size$$]], PointSize[Medium], Point[{$CellContext`size$$/2., $CellContext`size$$/2.}], Red, Point[ $CellContext`boxIntersection[$CellContext`angle, \ $CellContext`size$$, $CellContext`circle$$, $CellContext`size$$ \ $CellContext`cornerRadius$$]], Green, Point[ $CellContext`middlePoint[$CellContext`size$$, 0.135]], Blue, Point[ $CellContext`shortPoint[$CellContext`size$$, 0.185]], Orange, Point[ $CellContext`longArmEndPoint[$CellContext`angle, \ $CellContext`size$$, $CellContext`size$$ 0.33, $CellContext`boxIntersection[$CellContext`angle, \ $CellContext`size$$, $CellContext`circle$$, $CellContext`size$$ \ $CellContext`cornerRadius$$], $CellContext`middlePoint[$CellContext`size$$, 0.135]]]}, PlotRange -> All, Axes -> True]), "Specifications" :> {{{$CellContext`\[Theta]$$, 36}, 0, 90, 0.1}, {$CellContext`size$$, 1, 100, 1}, {$CellContext`circle$$, { True, False}}, {$CellContext`cornerRadius$$, 0, 0.5, 0.01}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{296., {190., 193.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{{3.669217635313622*^9, 3.66921765111585*^9}, { 3.669217704046073*^9, 3.6692177252100487`*^9}, {3.669217854508278*^9, 3.669217868743628*^9}, 3.669217988604734*^9, 3.6692180578628883`*^9, 3.669367601726317*^9, 3.6693806587043333`*^9, 3.669381841128574*^9, { 3.669381906084931*^9, 3.669381924490876*^9}, 3.669381984992523*^9, 3.669389870961418*^9, 3.669390720464587*^9, 3.669391153649596*^9}] }, Open ]], Cell[BoxData[""], "Input", CellChangeTimes->{3.669127376802286*^9}] }, Open ]] }, WindowSize->{1874, 802}, WindowMargins->{{Automatic, 16}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, CellContext->Notebook, FrontEndVersion->"10.3 for Mac OS X x86 (32-bit, 64-bit Kernel) (December 10, \ 2015)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 154, 2, 64, "Section"], Cell[737, 26, 10629, 230, 734, "Input"], Cell[CellGroupData[{ Cell[11391, 260, 6797, 202, 360, "Input"], Cell[18191, 464, 1185, 23, 47, "Output"], Cell[19379, 489, 3273, 86, 84, "Output"], Cell[22655, 577, 1330, 30, 47, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[24034, 613, 199, 3, 64, "Section"], Cell[24236, 618, 783, 19, 106, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[25056, 642, 246, 3, 64, "Section"], Cell[25305, 647, 680, 17, 106, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[26022, 669, 105, 1, 64, "Section"], Cell[26130, 672, 6254, 143, 388, "Input"], Cell[CellGroupData[{ Cell[32409, 819, 14476, 405, 672, "Input"], Cell[46888, 1226, 10849, 255, 204, "Output"], Cell[57740, 1483, 1649, 39, 62, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[59438, 1528, 143, 2, 64, "Section"], Cell[CellGroupData[{ Cell[59606, 1534, 4906, 99, 521, "Input"], Cell[64515, 1635, 4170, 81, 578, "Output"] }, Open ]], Cell[68700, 1719, 68, 1, 28, "Input"] }, Open ]] } ] *) (* End of internal cache information *)
Mathematica
5
ochirovstanislav/M13Checkbox
Other/Math.nb
[ "MIT" ]
//rotate map(wave(500),0,1,0,360), 0,0,1 //rotate map(wave(500),0,1,0,360), 0,1,0 // tevel tunnel //DECAY: 0.01 //do 2 times //push //rotate map(rand(0,1),0,1,0,360), 0,0,1 ////rotate map(wave(0,1),0,1,0,360), 0,1,0 //particle 0.01, 0,0.001,0.001 //box 0.1 //end //pop //end push // emit in all directions DECAY: 0.002 rotate map(rand(0,1),0,1,0,360), 0,0,1 rotate map(rand(0,1),0,1,0,360), 0,1,0 //color hsv(255,255,map(wave(500),0,1,0,255)) //if TIME % 1000 > 500 //h: 50 //end //if TIME % 1000 <= 500 //h: 150 //end //color hsv(h,255,255) //color hsv(TIME%255,255,255) // color change inside perticle block wont work // * you can change it manually, then it will work as expected // * you can only use HEALTH as parameter binded to a single particle //particle 0.02 ////color hsv(map(rand(0,1),0,1,0,255),255,255) //box 0.1 //end //pop // emittors with difrenet colors - needs to be inside block, wont work outsite of block //rotate map(rand(0,1),0,1,0,360), 0,0,1 //rotate map(rand(0,1),0,1,0,360), 0,1,0 //particle 0.03 //color blue //box 0.1*HEALTH //end //rotate map(rand(0,1),0,1,0,360), 0,0,1 //rotate map(rand(0,1),0,1,0,360), 0,1,0 //particle 0.03 //color green //box 0.1 //end //rotate map(rand(0,1),0,1,0,360), 0,0,1 //rotate map(rand(0,1),0,1,0,360), 0,1,0 //particle 0.03 //color red //box 0.1 //end //pop // getting smaller //particle 0.01 //color green //box 0.1*HEALTH //end //pop // it's the same function for all //particle 0.01 //color green //box 1*noise(HEALTH, 2) //end //pop // random works fine particle 0.01 color green box rand(0.1,0.2)*HEALTH end pop
Cycript
4
marcinbiegun/creativecoding-sketches
Cyril/data/code_retro/8.cy
[ "MIT" ]
SELECT (0.5, '92233720368547758.07', NULL), '', '1.00', untuple(('256', NULL)), NULL FROM (SELECT untuple(((NULL, untuple((('0.0000000100', (65536, NULL, (65535, 9223372036854775807), '25.7', (0.00009999999747378752, '10.25', 1048577), 65536)), '0.0000001024', '65537', NULL))), untuple((9223372036854775807, -inf, 0.5)), NULL, -9223372036854775808)), 257, 7, ('0.0001048575', (1024, NULL, (7, 3), (untuple(tuple(-NULL)), NULL, '0.0001048577', NULL), 0)), 0, (0, 0.9998999834060669, '65537'), untuple(tuple('10.25'))); SELECT NULL FROM (SELECT untuple((NULL, dummy)));
SQL
0
pdv-ru/ClickHouse
tests/queries/0_stateless/01803_untuple_subquery.sql
[ "Apache-2.0" ]
import {Component} from '@angular/core'; import {DomSanitizer, SafeHtml, SafeResourceUrl} from '@angular/platform-browser'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'trusted-types'; html = `<span>Hello from bound HTML</span><iframe id="bound-html-iframe"></iframe>`; iframeHtml = `<h1>Hello from iframe</h1>`; replace = `<span>Hello from second outerHTML</span>`; safeHtml: SafeHtml; safeResourceUrl: SafeResourceUrl; constructor(sanitizer: DomSanitizer) { this.safeHtml = sanitizer.bypassSecurityTrustHtml( `<span>Hello from bound SafeHtml</span><iframe id="bound-safehtml-iframe"></iframe>`); this.safeResourceUrl = sanitizer.bypassSecurityTrustResourceUrl( `data:text/html,<body><h1>Hello from object</h1></body>`); } }
TypeScript
4
John-Cassidy/angular
integration/trusted-types/src/app/app.component.ts
[ "MIT" ]
--- id: 5900f4701000cf542c50ff82 title: 'Problem 259: Reachable Numbers' challengeType: 5 forumTopicId: 301907 dashedName: problem-259-reachable-numbers --- # --description-- A positive integer will be called reachable if it can result from an arithmetic expression obeying the following rules: - Uses the digits 1 through 9, in that order and exactly once each. - Any successive digits can be concatenated (for example, using the digits 2, 3 and 4 we obtain the number 234). - Only the four usual binary arithmetic operations (addition, subtraction, multiplication and division) are allowed. - Each operation can be used any number of times, or not at all. - Unary minus is not allowed. - Any number of (possibly nested) parentheses may be used to define the order of operations. For example, 42 is reachable, since $\frac{1}{23} \times ((4 \times 5) - 6) \times (78 - 9) = 42$. What is the sum of all positive reachable integers? # --hints-- `reachableNumbers()` should return `20101196798`. ```js assert.strictEqual(reachableNumbers(), 20101196798); ``` # --seed-- ## --seed-contents-- ```js function reachableNumbers() { return true; } reachableNumbers(); ``` # --solutions-- ```js // solution required ```
Markdown
3
fcastillo-serempre/freeCodeCamp
curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-259-reachable-numbers.md
[ "BSD-3-Clause" ]
#include <iostream> #include <fstream> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <opencv2/dnn/dnn.hpp> using namespace cv; using namespace cv::dnn; String keys = "{ help h | | Print help message. }" "{ inputImage i | | Path to an input image. Skip this argument to capture frames from a camera. }" "{ modelPath mp | | Path to a binary .onnx file contains trained CRNN text recognition model. " "Download links are provided in doc/tutorials/dnn/dnn_text_spotting/dnn_text_spotting.markdown}" "{ RGBInput rgb |0| 0: imread with flags=IMREAD_GRAYSCALE; 1: imread with flags=IMREAD_COLOR. }" "{ evaluate e |false| false: predict with input images; true: evaluate on benchmarks. }" "{ evalDataPath edp | | Path to benchmarks for evaluation. " "Download links are provided in doc/tutorials/dnn/dnn_text_spotting/dnn_text_spotting.markdown}" "{ vocabularyPath vp | alphabet_36.txt | Path to recognition vocabulary. " "Download links are provided in doc/tutorials/dnn/dnn_text_spotting/dnn_text_spotting.markdown}"; String convertForEval(String &input); int main(int argc, char** argv) { // Parse arguments CommandLineParser parser(argc, argv, keys); parser.about("Use this script to run the PyTorch implementation of " "An End-to-End Trainable Neural Network for Image-based SequenceRecognition and Its Application to Scene Text Recognition " "(https://arxiv.org/abs/1507.05717)"); if (argc == 1 || parser.has("help")) { parser.printMessage(); return 0; } String modelPath = parser.get<String>("modelPath"); String vocPath = parser.get<String>("vocabularyPath"); int imreadRGB = parser.get<int>("RGBInput"); if (!parser.check()) { parser.printErrors(); return 1; } // Load the network CV_Assert(!modelPath.empty()); TextRecognitionModel recognizer(modelPath); // Load vocabulary CV_Assert(!vocPath.empty()); std::ifstream vocFile; vocFile.open(samples::findFile(vocPath)); CV_Assert(vocFile.is_open()); String vocLine; std::vector<String> vocabulary; while (std::getline(vocFile, vocLine)) { vocabulary.push_back(vocLine); } recognizer.setVocabulary(vocabulary); recognizer.setDecodeType("CTC-greedy"); // Set parameters double scale = 1.0 / 127.5; Scalar mean = Scalar(127.5, 127.5, 127.5); Size inputSize = Size(100, 32); recognizer.setInputParams(scale, inputSize, mean); if (parser.get<bool>("evaluate")) { // For evaluation String evalDataPath = parser.get<String>("evalDataPath"); CV_Assert(!evalDataPath.empty()); String gtPath = evalDataPath + "/test_gts.txt"; std::ifstream evalGts; evalGts.open(gtPath); CV_Assert(evalGts.is_open()); String gtLine; int cntRight=0, cntAll=0; TickMeter timer; timer.reset(); while (std::getline(evalGts, gtLine)) { size_t splitLoc = gtLine.find_first_of(' '); String imgPath = evalDataPath + '/' + gtLine.substr(0, splitLoc); String gt = gtLine.substr(splitLoc+1); // Inference Mat frame = imread(samples::findFile(imgPath), imreadRGB); CV_Assert(!frame.empty()); timer.start(); std::string recognitionResult = recognizer.recognize(frame); timer.stop(); if (gt == convertForEval(recognitionResult)) cntRight++; cntAll++; } std::cout << "Accuracy(%): " << (double)(cntRight) / (double)(cntAll) << std::endl; std::cout << "Average Inference Time(ms): " << timer.getTimeMilli() / (double)(cntAll) << std::endl; } else { // Create a window static const std::string winName = "Input Cropped Image"; // Open an image file CV_Assert(parser.has("inputImage")); Mat frame = imread(samples::findFile(parser.get<String>("inputImage")), imreadRGB); CV_Assert(!frame.empty()); // Recognition std::string recognitionResult = recognizer.recognize(frame); imshow(winName, frame); std::cout << "Predition: '" << recognitionResult << "'" << std::endl; waitKey(); } return 0; } // Convert the predictions to lower case, and remove other characters. // Only for Evaluation String convertForEval(String & input) { String output; for (uint i = 0; i < input.length(); i++){ char ch = input[i]; if ((int)ch >= 97 && (int)ch <= 122) { output.push_back(ch); } else if ((int)ch >= 65 && (int)ch <= 90) { output.push_back((char)(ch + 32)); } else { continue; } } return output; }
C++
5
lefatoum2/opencv
samples/dnn/scene_text_recognition.cpp
[ "Apache-2.0" ]
// Copyright 2010-2012 RethinkDB, all rights reserved. #ifndef RPC_SEMILATTICE_WATCHABLE_HPP_ #define RPC_SEMILATTICE_WATCHABLE_HPP_ #include <functional> template <class T> class semilattice_watchable_t : public watchable_t<T> { public: semilattice_watchable_t() { } explicit semilattice_watchable_t(const std::shared_ptr<semilattice_read_view_t<T> > &_view) : view(_view) { } semilattice_watchable_t *clone() const { return new semilattice_watchable_t(view); } void apply_read(const std::function<void(const T*)> &read) { // Inefficient but generic implementation that works with any view. const T current_value = view->get(); ASSERT_NO_CORO_WAITING; read(&current_value); } T get() { return view->get(); } publisher_t<std::function<void()> > *get_publisher() { return view->get_publisher(); } rwi_lock_assertion_t *get_rwi_lock_assertion() { return &rwi_lock_assertion; } private: std::shared_ptr<semilattice_read_view_t<T> > view; rwi_lock_assertion_t rwi_lock_assertion; DISABLE_COPYING(semilattice_watchable_t); }; template<class T> cross_thread_watchable_variable_t<T> cross_thread_watchable_from_semilattice(std::shared_ptr<semilattice_read_view_t<T> > view, threadnum_t dest_thread) { return cross_thread_watchable_variable_t<T>(new semilattice_watchable_t<T>(view), dest_thread); } #endif // RPC_SEMILATTICE_WATCHABLE_HPP_
C++
4
zadcha/rethinkdb
src/rpc/semilattice/watchable.hpp
[ "Apache-2.0" ]
MSTRINGIFY( /*#define float3 float4 float dot3(float3 a, float3 b) { return a.x*b.x + a.y*b.y + a.z*b.z; }*/ float3 projectOnAxis( float3 v, float3 a ) { return (a*dot(v, a)); } __kernel void ApplyForcesKernel( const uint numNodes, const float solverdt, const float epsilon, __global int * g_vertexClothIdentifier, __global float4 * g_vertexNormal, __global float * g_vertexArea, __global float * g_vertexInverseMass, __global float * g_clothLiftFactor, __global float * g_clothDragFactor, __global float4 * g_clothWindVelocity, __global float4 * g_clothAcceleration, __global float * g_clothMediumDensity, __global float4 * g_vertexForceAccumulator, __global float4 * g_vertexVelocity) { unsigned int nodeID = get_global_id(0); if( nodeID < numNodes ) { int clothId = g_vertexClothIdentifier[nodeID]; float nodeIM = g_vertexInverseMass[nodeID]; if( nodeIM > 0.0f ) { float3 nodeV = g_vertexVelocity[nodeID].xyz; float3 normal = g_vertexNormal[nodeID].xyz; float area = g_vertexArea[nodeID]; float3 nodeF = g_vertexForceAccumulator[nodeID].xyz; // Read per-cloth values float3 clothAcceleration = g_clothAcceleration[clothId].xyz; float3 clothWindVelocity = g_clothWindVelocity[clothId].xyz; float liftFactor = g_clothLiftFactor[clothId]; float dragFactor = g_clothDragFactor[clothId]; float mediumDensity = g_clothMediumDensity[clothId]; // Apply the acceleration to the cloth rather than do this via a force nodeV += (clothAcceleration*solverdt); g_vertexVelocity[nodeID] = (float4)(nodeV, 0.f); float3 relativeWindVelocity = nodeV - clothWindVelocity; float relativeSpeedSquared = dot(relativeWindVelocity, relativeWindVelocity); if( relativeSpeedSquared > epsilon ) { // Correct direction of normal relative to wind direction and get dot product normal = normal * (dot(normal, relativeWindVelocity) < 0 ? -1.f : 1.f); float dvNormal = dot(normal, relativeWindVelocity); if( dvNormal > 0 ) { float3 force = (float3)(0.f, 0.f, 0.f); float c0 = area * dvNormal * relativeSpeedSquared / 2.f; float c1 = c0 * mediumDensity; force += normal * (-c1 * liftFactor); force += normalize(relativeWindVelocity)*(-c1 * dragFactor); float dtim = solverdt * nodeIM; float3 forceDTIM = force * dtim; float3 nodeFPlusForce = nodeF + force; // m_nodesf[i] -= ProjectOnAxis(m_nodesv[i], force.normalized())/dtim; float3 nodeFMinus = nodeF - (projectOnAxis(nodeV, normalize(force))/dtim); nodeF = nodeFPlusForce; if( dot(forceDTIM, forceDTIM) > dot(nodeV, nodeV) ) nodeF = nodeFMinus; g_vertexForceAccumulator[nodeID] = (float4)(nodeF, 0.0f); } } } } } );
OpenCL
4
albertobarri/idk
tests/third_party/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ApplyForces.cl
[ "MIT" ]
#include "caffe2/quantization/server/batch_permutation_dnnlowp_op.h" namespace caffe2 { template <typename T> bool BatchPermutationDNNLowPOp<T>::RunOnDevice() { using namespace dnnlowp; this->ParseDNNLowPOperatorArguments_(); // Choose quantization params in_qparams_[INPUT] = GetInputTensorQuantizationParamsOf(this, INPUT, qfactory_.get()); const auto& X = InputTensorCPU_(INPUT); const auto& indices = Input(INDICES); auto* Y = OutputTensorCPU_(OUTPUT); CAFFE_ENFORCE(indices.ndim() == 1, "indices must be 1-d"); CAFFE_ENFORCE( X.dim32(0) == indices.dim32(0), "X.dim32(0) must be equal to indices.dim32(0)", "(", X.dim32(0), " vs. ", indices.dim32(0), ")"); CAFFE_ENFORCE_GT(X.dim32(0), 0); Y->ResizeLike(X); const T* X_data = X.template data<T>(); const int* indices_data = indices.template data<int>(); T* Y_data = Y->template mutable_data<T>(); int N = X.dim32(0); int K = X.numel() / N; #ifdef _OPENMP #pragma omp parallel for #endif for (int i = 0; i < N; ++i) { int origIdx = i * K; int permuteIdx = indices_data[i] * K; std::memcpy(Y_data + origIdx, X_data + permuteIdx, K * sizeof(T)); } // Even if there is a pre-chosen quantization parameters for the output, // it is ignored because batch permutation output quantization should be same // as the input. PropagateOutputTensorQuantizationParams(this, 0, in_qparams_[INPUT]); return true; } REGISTER_CPU_OPERATOR_WITH_ENGINE( BatchPermutation, DNNLOWP, BatchPermutationDNNLowPOp<uint8_t>); REGISTER_CPU_OPERATOR_WITH_ENGINE( Int8BatchPermutation, DNNLOWP, BatchPermutationDNNLowPOp<uint8_t>); OPERATOR_SCHEMA(Int8BatchPermutation).NumInputs(2).NumOutputs(1); } // namespace caffe2
C++
4
Hacky-DH/pytorch
caffe2/quantization/server/batch_permutation_dnnlowp_op.cc
[ "Intel" ]
module example003() { difference() { union() { cube([30, 30, 30], center = true); cube([40, 15, 15], center = true); cube([15, 40, 15], center = true); cube([15, 15, 40], center = true); } union() { cube([50, 10, 10], center = true); cube([10, 50, 10], center = true); cube([10, 10, 50], center = true); } } } example003();
OpenSCAD
3
samiwa/test
examples/example003.scad
[ "MIT" ]
# This file is a part of Julia. License is MIT: https://julialang.org/license module TestSchur using Test, LinearAlgebra, Random using LinearAlgebra: BlasComplex, BlasFloat, BlasReal, QRPivoted n = 10 # Split n into 2 parts for tests needing two matrices n1 = div(n, 2) n2 = 2*n1 Random.seed!(1234321) areal = randn(n,n)/2 aimg = randn(n,n)/2 @testset for eltya in (Float32, Float64, ComplexF32, ComplexF64, Int) a = eltya == Int ? rand(1:7, n, n) : convert(Matrix{eltya}, eltya <: Complex ? complex.(areal, aimg) : areal) asym = a' + a # symmetric indefinite apd = a' * a # symmetric positive-definite for (a, asym, apd) in ((a, asym, apd), (view(a, 1:n, 1:n), view(asym, 1:n, 1:n), view(apd, 1:n, 1:n))) ε = εa = eps(abs(float(one(eltya)))) d,v = eigen(a) f = schur(a) @test f.vectors*f.Schur*f.vectors' ≈ a @test sort(real(f.values)) ≈ sort(real(d)) @test sort(imag(f.values)) ≈ sort(imag(d)) @test istriu(f.Schur) || eltype(a)<:Real @test convert(Array, f) ≈ a @test_throws ErrorException f.A sch, vecs, vals = schur(UpperTriangular(triu(a))) @test vecs*sch*vecs' ≈ triu(a) sch, vecs, vals = schur(UnitUpperTriangular(triu(a))) @test vecs*sch*vecs' ≈ UnitUpperTriangular(triu(a)) sch, vecs, vals = schur(LowerTriangular(tril(a))) @test vecs*sch*vecs' ≈ tril(a) sch, vecs, vals = schur(UnitLowerTriangular(tril(a))) @test vecs*sch*vecs' ≈ UnitLowerTriangular(tril(a)) sch, vecs, vals = schur(Hermitian(asym)) @test vecs*sch*vecs' ≈ asym sch, vecs, vals = schur(Symmetric(a + transpose(a))) @test vecs*sch*vecs' ≈ a + transpose(a) sch, vecs, vals = schur(Tridiagonal(a + transpose(a))) @test vecs*sch*vecs' ≈ Tridiagonal(a + transpose(a)) sch, vecs, vals = schur(Bidiagonal(a, :U)) @test vecs*sch*vecs' ≈ Bidiagonal(a, :U) sch, vecs, vals = schur(Bidiagonal(a, :L)) @test vecs*sch*vecs' ≈ Bidiagonal(a, :L) tstring = sprint((t, s) -> show(t, "text/plain", s), f.T) zstring = sprint((t, s) -> show(t, "text/plain", s), f.Z) vstring = sprint((t, s) -> show(t, "text/plain", s), f.values) fstring = sprint((t, s) -> show(t, "text/plain", s), f) @test fstring == "$(summary(f))\nT factor:\n$tstring\nZ factor:\n$(zstring)\neigenvalues:\n$vstring" @testset "Reorder Schur" begin # use asym for real schur to enforce tridiag structure # avoiding partly selection of conj. eigenvalues ordschura = eltya <: Complex ? a : asym S = schur(ordschura) select = bitrand(n) O = ordschur(S, select) sum(select) != 0 && @test S.values[findall(select)] ≈ O.values[1:sum(select)] @test O.vectors*O.Schur*O.vectors' ≈ ordschura @test_throws ErrorException f.A Snew = LinearAlgebra.Schur(S.T, S.Z, S.values) SchurNew = ordschur!(copy(Snew), select) @test O.vectors ≈ SchurNew.vectors @test O.Schur ≈ SchurNew.Schur end if isa(a, Array) a1_sf = a[1:n1, 1:n1] a2_sf = a[n1+1:n2, n1+1:n2] else a1_sf = view(a, 1:n1, 1:n1) a2_sf = view(a, n1+1:n2, n1+1:n2) end @testset "Generalized Schur" begin f = schur(a1_sf, a2_sf) @test f.Q*f.S*f.Z' ≈ a1_sf @test f.Q*f.T*f.Z' ≈ a2_sf @test istriu(f.S) || eltype(a)<:Real @test istriu(f.T) || eltype(a)<:Real @test_throws ErrorException f.A sstring = sprint((t, s) -> show(t, "text/plain", s), f.S) tstring = sprint((t, s) -> show(t, "text/plain", s), f.T) qstring = sprint((t, s) -> show(t, "text/plain", s), f.Q) zstring = sprint((t, s) -> show(t, "text/plain", s), f.Z) αstring = sprint((t, s) -> show(t, "text/plain", s), f.α) βstring = sprint((t, s) -> show(t, "text/plain", s), f.β) fstring = sprint((t, s) -> show(t, "text/plain", s), f) @test fstring == "$(summary(f))\nS factor:\n$sstring\nT factor:\n$(tstring)\nQ factor:\n$(qstring)\nZ factor:\n$(zstring)\nα:\n$αstring\nβ:\n$βstring" end @testset "Reorder Generalized Schur" begin NS = schur(a1_sf, a2_sf) # Currently just testing with selecting gen eig values < 1 select = abs2.(NS.values) .< 1 m = sum(select) S = ordschur(NS, select) # Make sure that the new factorization still factors matrix @test S.Q*S.S*S.Z' ≈ a1_sf @test S.Q*S.T*S.Z' ≈ a2_sf # Make sure that we have sorted it correctly @test NS.values[findall(select)] ≈ S.values[1:m] Snew = LinearAlgebra.GeneralizedSchur(NS.S, NS.T, NS.alpha, NS.beta, NS.Q, NS.Z) SchurNew = ordschur!(copy(Snew), select) @test S.Q ≈ SchurNew.Q @test S.S ≈ SchurNew.S @test S.T ≈ SchurNew.T @test S.Z ≈ SchurNew.Z @test S.alpha ≈ SchurNew.alpha @test S.beta ≈ SchurNew.beta sS,sT,sQ,sZ = schur(a1_sf,a2_sf) @test NS.Q ≈ sQ @test NS.T ≈ sT @test NS.S ≈ sS @test NS.Z ≈ sZ end end @testset "0x0 matrix" for A in (zeros(eltya, 0, 0), view(rand(eltya, 2, 2), 1:0, 1:0)) T, Z, λ = LinearAlgebra.schur(A) @test T == A @test Z == A @test λ == zeros(0) end if eltya <: Real @testset "quasitriangular to triangular" begin S = schur(a) SC = Schur{Complex}(S) @test eltype(SC) == complex(eltype(S)) @test istriu(SC.T) @test SC.Z*SC.Z' ≈ I @test SC.Z*SC.T*SC.Z' ≈ a @test sort(SC.values,by=LinearAlgebra.eigsortby) ≈ sort(S.values,by=LinearAlgebra.eigsortby) @test Schur{Complex}(SC) === SC === Schur{eltype(SC)}(SC) @test Schur{eltype(S)}(S) === S if eltype(S) === Float32 S64 = Schur{Float64}(S) @test eltype(S64) == Float64 @test S64.Z == S.Z @test S64.T == S.T @test S64.values == S.values end end end @testset "0x0 $eltya matrices" begin A = zeros(eltya, 0, 0) B = zeros(eltya, 0, 0) S = LinearAlgebra.schur(A, B) @test S.S == A @test S.T == A @test S.Q == A @test S.Z == A @test S.alpha == zeros(0) @test S.beta == zeros(0) end end @testset "Generalized Schur convergence" begin # Check for convergence issues, #40279 problematic_pencils = [ ( ComplexF64[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0; 3.7796350217469814 -3.3125635598133054 0.0 0.0 0.0 0.0 0.0 0.0 6.418270043493963 -6.625127119626611 0.0 0.0 0.0 0.0 0.0 -1.0; -3.312563559813306 3.779635021746982 0.0 0.0 0.0 0.0 0.0 0.0 -6.625127119626612 6.418270043493964 -1.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 3.7796350217469814 0.0 0.0 -3.3125635598133054 0.0 0.0 0.0 -1.0 6.418270043493963 0.0 0.0 -6.625127119626611 0.0 0.0; 0.0 0.0 0.0 3.779635021746982 -3.312563559813306 0.0 0.0 0.0 0.0 0.0 0.0 6.418270043493964 -6.625127119626612 0.0 -1.0 0.0; 0.0 0.0 0.0 -3.3125635598133054 3.7796350217469814 0.0 0.0 0.0 0.0 0.0 0.0 -6.625127119626611 6.418270043493963 -1.0 0.0 0.0; 0.0 0.0 -3.312563559813306 0.0 0.0 3.779635021746982 0.0 0.0 0.0 0.0 -6.625127119626612 0.0 -1.0 6.418270043493964 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 3.7796350217469814 -3.3125635598133054 0.0 0.0 0.0 -1.0 0.0 0.0 6.418270043493963 -6.625127119626611; 0.0 0.0 0.0 0.0 0.0 0.0 -3.312563559813306 3.779635021746982 -1.0 0.0 0.0 0.0 0.0 0.0 -6.625127119626612 6.418270043493964], ComplexF64[1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -3.7796350217469814 3.312563559813306 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3125635598133054 -3.779635021746982 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -3.7796350217469814 0.0 0.0 3.312563559813306 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -3.779635021746982 3.3125635598133054 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.312563559813306 -3.7796350217469814 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3125635598133054 0.0 0.0 -3.779635021746982 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -3.7796350217469814 3.312563559813306; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3125635598133054 -3.779635021746982] ), ( ComplexF64[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0; 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -2.62 -1.0 0.0 0.0 0.0 0.0 -1.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 -2.62 0.0 0.0 0.0 0.0 0.0; 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0 0.0; 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62 0.0; 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 0.0 0.0 0.0 0.0 0.0 -2.62], ComplexF64[1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0] ), ( ComplexF64[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0; 0.33748484079831426 -0.10323794456968927 0.0 0.0 0.0 0.0 0.0 0.0 -2.5940303184033713 -0.20647588913937853 0.0 0.0 0.0 0.0 0.0 -1.0; -0.10323794456968927 0.3374848407983142 0.0 0.0 0.0 0.0 0.0 0.0 -0.20647588913937853 -2.5940303184033713 -1.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.33748484079831426 0.0 0.0 -0.10323794456968927 0.0 0.0 0.0 -1.0 -2.5940303184033713 0.0 0.0 -0.20647588913937853 0.0 0.0; 0.0 0.0 0.0 0.3374848407983142 -0.10323794456968927 0.0 0.0 0.0 0.0 0.0 0.0 -2.5940303184033713 -0.20647588913937853 0.0 -1.0 0.0; 0.0 0.0 0.0 -0.10323794456968927 0.33748484079831426 0.0 0.0 0.0 0.0 0.0 0.0 -0.20647588913937853 -2.5940303184033713 -1.0 0.0 0.0; 0.0 0.0 -0.10323794456968927 0.0 0.0 0.3374848407983142 0.0 0.0 0.0 0.0 -0.20647588913937853 0.0 -1.0 -2.5940303184033713 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.33748484079831426 -0.10323794456968927 0.0 0.0 0.0 -1.0 0.0 0.0 -2.5940303184033713 -0.20647588913937853; 0.0 0.0 0.0 0.0 0.0 0.0 -0.10323794456968927 0.3374848407983142 -1.0 0.0 0.0 0.0 0.0 0.0 -0.20647588913937853 -2.5940303184033713], ComplexF64[1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.33748484079831426 0.10323794456968927 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10323794456968927 -0.3374848407983142 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.33748484079831426 0.0 0.0 0.10323794456968927 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.3374848407983142 0.10323794456968927 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10323794456968927 -0.33748484079831426 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10323794456968927 0.0 0.0 -0.3374848407983142 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.33748484079831426 0.10323794456968927; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.10323794456968927 -0.3374848407983142] ), ( ComplexF64[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0; 1.7391668762048442 -1.309613611600033 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.150333752409688 -2.619227223200066 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 0.0; -1.3096136116000332 1.739166876204844 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -2.6192272232000664 2.150333752409688 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 1.739166876204844 0.0 0.0 -1.3096136116000332 0.0 0.0 0.0 0.0 0.0 -1.0 2.150333752409688 0.0 0.0 -2.6192272232000664 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 1.739166876204844 0.0 0.0 0.0 0.0 -1.3096136116000332 0.0 -1.0 0.0 0.0 2.150333752409688 0.0 0.0 0.0 0.0 -2.6192272232000664 0.0; 0.0 0.0 0.0 0.0 1.7391668762048442 0.0 0.0 0.0 0.0 -1.309613611600033 0.0 0.0 0.0 0.0 2.150333752409688 -1.0 0.0 0.0 0.0 -2.619227223200066; 0.0 0.0 -1.309613611600033 0.0 0.0 1.7391668762048442 0.0 0.0 0.0 0.0 0.0 0.0 -2.619227223200066 0.0 -1.0 2.150333752409688 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 1.739166876204844 -1.3096136116000332 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.150333752409688 -2.6192272232000664 0.0 -1.0; 0.0 0.0 0.0 0.0 0.0 0.0 -1.309613611600033 1.7391668762048442 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -2.619227223200066 2.150333752409688 -1.0 0.0; 0.0 0.0 0.0 -1.309613611600033 0.0 0.0 0.0 0.0 1.7391668762048442 0.0 0.0 0.0 0.0 -2.619227223200066 0.0 0.0 0.0 -1.0 2.150333752409688 0.0; 0.0 0.0 0.0 0.0 -1.3096136116000332 0.0 0.0 0.0 0.0 1.739166876204844 0.0 0.0 0.0 0.0 -2.6192272232000664 0.0 -1.0 0.0 0.0 2.150333752409688], ComplexF64[1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.7391668762048442 1.3096136116000332 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.309613611600033 -1.739166876204844 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.739166876204844 0.0 0.0 1.309613611600033 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.739166876204844 0.0 0.0 0.0 0.0 1.309613611600033 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.7391668762048442 0.0 0.0 0.0 0.0 1.3096136116000332; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.3096136116000332 0.0 0.0 -1.7391668762048442 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.739166876204844 1.309613611600033 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.3096136116000332 -1.7391668762048442 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.3096136116000332 0.0 0.0 0.0 0.0 -1.7391668762048442 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.309613611600033 0.0 0.0 0.0 0.0 -1.739166876204844] ), ( ComplexF64[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0; 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230788 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007; 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230788 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230788 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769246 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230784 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230788 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230788 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230788 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769246 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230784 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230788 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.90076923076925 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0000000000000007 -12.019230769230788; -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 -6.009615384615393 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384622 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769244 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615393 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384622 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769244 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.490384615384624 -1.0000000000000007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -12.019230769230784 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 11.900769230769248], ComplexF64[1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615393 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615393 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384622 0.0 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615392 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384622 0.0 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624 0.0; 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.009615384615394 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -6.490384615384624] )] for (A, B) in problematic_pencils f = schur(A, B) @test f.Q*f.S*f.Z' ≈ A @test f.Q*f.T*f.Z' ≈ B end end @testset "adjoint and transpose for schur (#40941)" begin A = rand(3, 3) B = schur(A', A) C = B.left*B.S*B.right' D = schur(transpose(A), A) E = D.left*D.S*D.right' @test A' ≈ C ≈ E end end # module TestSchur
Julia
5
jonas-schulze/julia
stdlib/LinearAlgebra/test/schur.jl
[ "MIT" ]
.class public stack_var7 .super java/lang/Object .method public <init>()V aload_0 invokenonvirtual java/lang/Object/<init>()V return .end method .method public f()I .limit stack 8 .limit locals 5 ;; 1->var1 ;; 2->var2 ;; 4->var3 ;; 8->var4 iconst_1 istore_1 iconst_2 istore_2 iconst_4 istore_3 bipush 8 istore 4 ;; push local var4 / var3 / var2 / var1 iload 4 iload_3 iload_2 iload 1 ;; push var2 / var1 in on head dup2_x2 ;; add one to local var 1 iinc 1 1 pop pop pop pop ;; sub isub ;; incremented copy on stack ireturn .end method
Jasmin
3
mauguignard/cbmc
jbmc/regression/jbmc/stack_var7/stack_var7.j
[ "BSD-4-Clause" ]
# Copyright (c) 2018-2021, Carnegie Mellon University # See LICENSE for details nz := x->When(x=0,0,1); ps := x -> PrintMat(MapMat(x,nz)); crdiag := rr -> List([1..DimensionsMat(rr)[1]/2], i->rr[2*i-1][2*i-1] + E(4)*rr[2*i][2*i-1]); submat := (m, rbegin, colbegin, size) -> List(m{[rbegin..rbegin+size-1]}, x->x{[colbegin..colbegin+size-1]}); N := 8; m := 4; n := N/m; BIGNT := PRDFT4; RIGHTNT := PRDFT4; LEFTNT := BIGNT; # DTT -> K^N_m (dirsum SkewDTT(m)) (DST3(n) tensor I(m)) B^N_m ck := MatSPL(K(N,m)); cm := ck^-1; rk := RCMatCyc(ck); rm := RCMatCyc(cm); big := MatSPL(BIGNT(2*N)); lhs := Tensor(I(n), LEFTNT(2*m)); rhs := Tensor(RIGHTNT(n), I(2*m)); quo := MatSPL(lhs)^-1 * rm * big; #pquo := quo ^ MatSPL(L(2*N, n)); squo := MapMat(pquo, nz); rb := quo * MatSPL(rhs)^-1; # N=2, m=2, n=4 #prb := (MatSPL(L(16,2)*Tensor(M(8,4),I(2)))*rb*MatSPL(L(16,8))); #TensorProductMat(IdentityMat(2*m), MatSPL(IPRDFT2(n,-1)*Diag(2,2,1,1))); #PRDFT3(n))^-1); #IPRDFT2(n,-1)*Diag(2,2,1,1))); #pquo := quo ^ MatSPL(L(2*N, 2*n)); #blocks := List([1..m], x -> pquo{[1+2*n*(x-1) .. 2*n*x]}{[1+2*n*(x-1) .. 2*n*x]}); #brfinv := MatSPL(PRDFT3(2*n))^-1; #rdiag := List(blocks, b -> b * brfinv); #cdiag := List(rdiag, crdiag); #diag := MatSPL(L(2*N, m)) * quo * MatSPL(L(2*N, 2*n)) * TensorProductMat(IdentityMat(m), brfinv);
GAP
3
sr7cb/spiral-software
namespaces/spiral/sym/unproj.gi
[ "BSD-2-Clause-FreeBSD" ]
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ /** * This is a renderer of React that doesn't have a render target output. * It is useful to demonstrate the internals of the reconciler in isolation * and for testing semantics of reconciliation separate from the host * environment. */ import type {ReactModel} from 'react-server/src/ReactFlightServer'; import {saveModule} from 'react-noop-renderer/flight-modules'; import ReactFlightServer from 'react-server/flight'; type Destination = Array<string>; const ReactNoopFlightServer = ReactFlightServer({ scheduleWork(callback: () => void) { callback(); }, beginWriting(destination: Destination): void {}, writeChunk(destination: Destination, chunk: string): void { destination.push(chunk); }, completeWriting(destination: Destination): void {}, close(destination: Destination): void {}, closeWithError(destination: Destination, error: mixed): void {}, flushBuffered(destination: Destination): void {}, stringToChunk(content: string): string { return content; }, stringToPrecomputedChunk(content: string): string { return content; }, isModuleReference(reference: Object): boolean { return reference.$$typeof === Symbol.for('react.module.reference'); }, getModuleKey(reference: Object): Object { return reference; }, resolveModuleMetaData( config: void, reference: {$$typeof: Symbol, value: any}, ) { return saveModule(reference.value); }, }); type Options = { onError?: (error: mixed) => void, }; function render(model: ReactModel, options?: Options): Destination { const destination: Destination = []; const bundlerConfig = undefined; const request = ReactNoopFlightServer.createRequest( model, bundlerConfig, options ? options.onError : undefined, ); ReactNoopFlightServer.startWork(request); ReactNoopFlightServer.startFlowing(request, destination); return destination; } export {render};
JavaScript
4
GBKstc/react-analysis
packages/react-noop-renderer/src/ReactNoopFlightServer.js
[ "MIT" ]
;Even better (more terse) S x="",$P(x,"-",10)="-" W x
M
2
LaudateCorpus1/RosettaCodeData
Task/Repeat-a-string/MUMPS/repeat-a-string-2.mumps
[ "Info-ZIP" ]
--- title: "Displaying tables as grid graphics" author: "Baptiste Auguie" date: '`r Sys.Date()`' vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{tableGrob: displaying tables as grid graphics} output: knitr:::html_vignette: toc: yes --- ```{r setup, echo=FALSE, results='hide'} library(knitr) opts_chunk$set(message=FALSE, fig.width=4, fig.height=2) ``` Tabular data is usually formatted outside the graphics device, e.g via LaTeX, or html tables. However, in some cases it may be convenient to display *small* tables alongside graphics. A couple of packages offer this possibility with base graphics (`plotrix` for instance); the `gridExtra` provides the pair of `tableGrob/grid.table` functions for this purpose. *Note:* This vignette uses the development version of `gridExtra`, some features may not be yet available in the released version. ## Basic usage ```{r basic} library(gridExtra) library(grid) d <- head(iris[,1:3]) grid.table(d) ``` ## Spacing The spacing of each row/column is automatic, and will adjust to bigger cell contents. Plotmath notation may be used, with the `parse=TRUE` argument. Note that this is applied to individual strings of text, and reverts to standard text if parsing fails (this is useful when mixing multiline text with plotmath in different cells). ```{r annotations, fig.height=3} d[2,3] <- "this is very wwwwwide" d[1,2] <- "this\nis\ntall" colnames(d) <- c("alpha*integral(xdx,a,infinity)", "this text\nis high", 'alpha/beta') tt <- ttheme_default(colhead=list(fg_params = list(parse=TRUE))) grid.table(d, theme=tt) ``` ## Aesthetic formatting The formatting is controlled by *themes*, which are nested lists of graphical parameters. See `ttheme_default` and `ttheme_minimal` for two built-in examples. Changing a few parameters at a time amounts to modifying the list with the new values. ```{r theme, fig.width=8} tt1 <- ttheme_default() tt2 <- ttheme_minimal() tt3 <- ttheme_minimal( core=list(bg_params = list(fill = blues9[1:4], col=NA), fg_params=list(fontface=3)), colhead=list(fg_params=list(col="navyblue", fontface=4L)), rowhead=list(fg_params=list(col="orange", fontface=3L))) grid.arrange( tableGrob(iris[1:4, 1:2], theme=tt1), tableGrob(iris[1:4, 1:2], theme=tt2), tableGrob(iris[1:4, 1:2], theme=tt3), nrow=1) ``` If the formatting values are fewer than the number of cells, they are recycled along columns, ```{r recycling} t1 <- ttheme_default(core=list( fg_params=list(fontface=c(rep("plain", 4), "bold.italic")), bg_params = list(fill=c(rep(c("grey95", "grey90"), length.out=4), "#6BAED6"), alpha = rep(c(1,0.5), each=5)) )) grid.table(iris[1:5, 1:3], theme = t1) ``` ## Text justification The text labels can be justified; the default is "centre" for the core and header, and "right" for the row names. These settings can be adjusted by passing the relevant parameters of `textGrob` via the theme nested lists, ```{r justify, fig.width=8} tt1 <- ttheme_default() tt2 <- ttheme_default(core=list(fg_params=list(hjust=1, x=0.9)), rowhead=list(fg_params=list(hjust=1, x=0.95))) tt3 <- ttheme_default(core=list(fg_params=list(hjust=0, x=0.1)), rowhead=list(fg_params=list(hjust=0, x=0))) grid.arrange( tableGrob(mtcars[1:4, 1:2], theme=tt1), tableGrob(mtcars[1:4, 1:2], theme=tt2), tableGrob(mtcars[1:4, 1:2], theme=tt3), nrow=1) ``` ## Further gtable processing and integration Being based on `gtable`, the table can be further processed. In particular, we may edit the cell sizes to align with other content on the page. ```{r sizes, fig.width=8} g <- g2 <- tableGrob(iris[1:4, 1:3], cols = NULL, rows=NULL) g2$widths <- unit(rep(1/ncol(g2), ncol(g2)), "npc") grid.arrange(rectGrob(), rectGrob(), nrow=1) grid.arrange(g, g2, nrow=1, newpage = FALSE) ``` The alignment of several tables can be achieved with the `combine` function (adapted from `gtable:::join`), ```{r align, fig.width=6, fig.height=3} d1 <- PlantGrowth[1:3,1, drop=FALSE] d2 <- PlantGrowth[1:2,1:2] g1 <- tableGrob(d1) g2 <- tableGrob(d2) haligned <- combine(g1,g2, along=1) valigned <- combine(g1,g2, along=2) grid.newpage() grid.arrange(haligned, valigned, ncol=2) ``` ### Borders and separators Other grobs such as separating lines and rectangles (borders, boxes) may be added. In this case, keep in mind that row, column and cell numbering includes the column of row labels and the row of column labels *if they are present.* Let us illustrate this by adding some borders (using `rectGrob`) to a simple table without row numbers. We'll add two actually, to give a nice effect of a heavy line under the row of column headers. ```{r numberingDemo1} library(gtable) g <- tableGrob(iris[1:4, 1:3], rows = NULL) g <- gtable_add_grob(g, grobs = rectGrob(gp = gpar(fill = NA, lwd = 2)), t = 2, b = nrow(g), l = 1, r = ncol(g)) g <- gtable_add_grob(g, grobs = rectGrob(gp = gpar(fill = NA, lwd = 2)), t = 1, l = 1, r = ncol(g)) grid.draw(g) ``` Note that when using `rectGrob` the top, bottom, left and right arguments (`t, b, l, r`) are the rows and columns which will be *inside* the rectangle. If we repeat the above code almost exactly, but don't suppress the column of row labels, we see that column 1 is now the column of row labels (and it doesn't look that good either, but that's not our point). ```{r numberingDemo2} g <- tableGrob(iris[1:4, 1:3]) g <- gtable_add_grob(g, grobs = rectGrob(gp = gpar(fill = NA, lwd = 2)), t = 2, b = nrow(g), l = 1, r = ncol(g)) g <- gtable_add_grob(g, grobs = rectGrob(gp = gpar(fill = NA, lwd = 2)), t = 1, l = 1, r = ncol(g)) grid.draw(g) ``` When adding line segments to separate rows and columns using `segmentsGrob`, the row and column numbering scheme is the same (it includes any row or column labels). When working with line segments, you should keep in mind the default coordinate values for `segmentsGrob`. They are x0 = 0, y0 = 0, x1 = 1, y1 = 1, all in npc, relative to the cell(s) you are modifying, with the lower left corner being 0,0. For clarity, we show all the arguments in these examples. With this in mind, to add a line across the bottom of a single cell, use: ```{r segments1 } g <- tableGrob(iris[1:4, 1:3]) g <- gtable_add_grob(g, grobs = segmentsGrob( # line across the bottom x0 = unit(0,"npc"), y0 = unit(0,"npc"), x1 = unit(1,"npc"), y1 = unit(0,"npc"), gp = gpar(lwd = 2.0)), t = 3, b = 3, l = 3, r = 3) grid.draw(g) ``` and to add a line to the left side: ```{r segments2 } g <- tableGrob(iris[1:4, 1:3]) g <- gtable_add_grob(g, grobs = segmentsGrob( # line across the bottom x0 = unit(0,"npc"), y0 = unit(0,"npc"), x1 = unit(0,"npc"), y1 = unit(1,"npc"), gp = gpar(lwd = 2.0)), t = 3, b = 3, l = 3, r = 3) grid.draw(g) ``` Perhaps you'd like to cross out a cell. This can be done with two diagonal lines combined via a `grobTree`: ```{r segments3} g <- tableGrob(iris[1:4, 1:3]) g <- gtable_add_grob(g, grobs = grobTree( segmentsGrob( # diagonal line ul -> lr x0 = unit(0,"npc"), y0 = unit(1,"npc"), x1 = unit(1,"npc"), y1 = unit(0,"npc"), gp = gpar(lwd = 2.0)), segmentsGrob( # diagonal line ll -> ur x0 = unit(0,"npc"), y0 = unit(0,"npc"), x1 = unit(1,"npc"), y1 = unit(1,"npc"), gp = gpar(lwd = 2.0))), t = 3, b = 3, l = 3, r = 3) grid.draw(g) ``` If you have many cells to decorate you can use `replicate` to create create the segments. Just keep the `tableGrob` numbering scheme in mind. ```{r separators, fig.width=8} g <- tableGrob(head(iris), theme = ttheme_minimal()) separators <- replicate(ncol(g) - 2, segmentsGrob(x1 = unit(0, "npc"), gp=gpar(lty=2)), simplify=FALSE) ## add vertical lines on the left side of columns (after 2nd) g <- gtable::gtable_add_grob(g, grobs = separators, t = 2, b = nrow(g), l = seq_len(ncol(g)-2)+2) grid.draw(g) ``` ### Accessing existing grobs in the table We may also access and modify the original content of individual cells, e.g. to highlight a value. ```{r highlight} g <- tableGrob(iris[1:4, 1:3]) find_cell <- function(table, row, col, name="core-fg"){ l <- table$layout which(l$t==row & l$l==col & l$name==name) } ind <- find_cell(g, 3, 2, "core-fg") ind2 <- find_cell(g, 2, 3, "core-bg") g$grobs[ind][[1]][["gp"]] <- gpar(fontsize=15, fontface="bold") g$grobs[ind2][[1]][["gp"]] <- gpar(fill="darkolivegreen1", col = "darkolivegreen4", lwd=5) grid.draw(g) ``` ## Faster tables: an alternative grid function The `tableGrob` function can be very slow; unfortunately this is the price to pay for its versatility and easier implementation. We use individual `textGrob` and `rectGrob` elements for each cell, instead of relying on the vectorised implementation of these functions. The reason is practical: it is much easier to place, measure, and customise individual grobs, than modify the graphical parameters and positions of a single vectorised grob. An alternative function is presented below, using this vectorised approach, but lacking many of the customisations of `tableGrob`. ```{r ftable, fig.width=6} grid.ftable <- function(d, padding = unit(4, "mm"), ...) { nc <- ncol(d) nr <- nrow(d) ## character table with added row and column names extended_matrix <- cbind(c("", rownames(d)), rbind(colnames(d), as.matrix(d))) ## string width and height w <- apply(extended_matrix, 2, strwidth, "inch") h <- apply(extended_matrix, 2, strheight, "inch") widths <- apply(w, 2, max) heights <- apply(h, 1, max) padding <- convertUnit(padding, unitTo = "in", valueOnly = TRUE) x <- cumsum(widths + padding) - 0.5 * padding y <- cumsum(heights + padding) - padding rg <- rectGrob(x = unit(x - widths/2, "in"), y = unit(1, "npc") - unit(rep(y, each = nc + 1), "in"), width = unit(widths + padding, "in"), height = unit(heights + padding, "in")) tg <- textGrob(c(t(extended_matrix)), x = unit(x - widths/2, "in"), y = unit(1, "npc") - unit(rep(y, each = nc + 1), "in"), just = "center") g <- gTree(children = gList(rg, tg), ..., x = x, y = y, widths = widths, heights = heights) grid.draw(g) invisible(g) } grid.newpage() grid.ftable(head(iris, 4), gp = gpar(fill = rep(c("grey90", "grey95"), each = 6))) ``` ## Session Info ```{r info, echo=FALSE} print(sessionInfo()) ```
RMarkdown
5
Chicago-R-User-Group/2017-n3-Meetup-RStudio
packrat/lib/x86_64-pc-linux-gnu/3.2.5/gridExtra/doc/tableGrob.rmd
[ "MIT" ]
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> <html> <head> <title> Test XSLT </title> <script src="../../resources/testharness.js"></script> <script src="../../resources/testharnessreport.js"></script> <script> // The page is expected to have 'oversized-images' threshold // set to 2.0 in report only mode, i.e. images with // actual_size / display_size ratio > 2.0 should generate // violation reports. async_test(t => { new ReportingObserver(t.step_func_done((reports, _) => { assert_equals(reports.length, 1); const report = reports[0]; assert_equals(report.type, 'document-policy-violation'); assert_equals(report.body.featureId, 'oversized-images'); assert_equals(report.body.disposition, 'report'); }), {types: ['document-policy-violation']}).observe(); }); </script> </head> <body bgcolor="#ffffff"> <img src="resources/green-256x256.jpg" width="100"></img> </body> </html> </xsl:template> </xsl:stylesheet>
XSLT
4
zealoussnow/chromium
third_party/blink/web_tests/http/tests/document-policy/resources/document-policy-report-only-in-xsl.xslt
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
# Literate programming - .litcoffee extension CoffeeScript supports literate programming - either use .litcoffee or .coffee.md as extension and it'll magically filter out the code from between the documentation. ## The Ching class Here's an _extremely_ simple base class - we'll just export it and later on it'll be extended to Ka. export class Ching message = "nothing much" constructor: (@message) -> ## The Ka class It's just dummy stuff, but you can see the potential here export class Ka extends Ching NAME = "FatalError" constructor: (@message) -> super message
Literate CoffeeScript
4
annamooseity/dependency-cruiser
test/main/fixtures/cruise-reporterless/coffee/sub/kaching.litcoffee
[ "MIT" ]