text:
using System.IO;
using System.Collections.Generic;
using LitJson;
using UnityEngine;

namespace UnitySpineImporter{
	public class SpineDatatCreationException:System.Exception{
		public SpineDatatCreationException(string message):base(message)
		{
		}
	}

	public class SpineData{

		public List<SpineBone> bones;
		public List<SpineSlot> slots;

		public SpineSkins skins;

		public Dictionary<string, SpineAnimation> animations;

		public Dictionary<string, SpineBone> boneByName;
		public Dictionary<string, SpineSlot> slotByName;
		public Dictionary<string, int>       slotOrder;
		public Dictionary<string, string>    bonePathByName;
		public Dictionary<string, string>    slotPathByName;

		public string defaultSkinName;
		public string[] skinNames;
		public string[] defaultPoseSlots;
		public Dictionary<string,string> slotDefaultAttachments;

		public static SpineData deserializeFromFile(string spineDataFilePath){
			SpineData data = null;
			if (!File.Exists(spineDataFilePath))
				throw new SpineDatatCreationException("provided file does not exists");
			try{
				data = LitJson.JsonMapper.ToObject<SpineData>(File.ReadAllText(spineDataFilePath));
			} catch (LitJson.JsonException e){
				throw new SpineDatatCreationException("problem with parse json data \n"+e.Message);
			}
			setCachedData(data);
			fixeAttachmentNamesIfOmited(data);
			return data;
		}

		static void fixeAttachmentNamesIfOmited (SpineData data)
		{
			foreach(KeyValuePair<string, SpineSkinSlots>kvp in data.skins){
				string skinName = kvp.Key;
				foreach(KeyValuePair<string, SpineSkinSlotAttachments>kvp2 in  data.skins[skinName]){
					string slotName = kvp2.Key;
					foreach(KeyValuePair<string, SpineSkinAttachment> kvp3 in data.skins[skinName][slotName]){
						string attachmentName = kvp3.Key;
						SpineSkinAttachment attachment = kvp3.Value;
						if (string.IsNullOrEmpty(attachment.name))
							attachment.name = attachmentName; // we set actualAttachment(sprite name) here in case if it empty it equal to attachment name
					}
				}
			}
		}

		static void setCachedData (SpineData data)
		{
			data.slotByName = new Dictionary<string, SpineSlot>();

			data.boneByName = new Dictionary<string, SpineBone>();
			for (int i = 0; i < data.bones.Count; i++) {
				data.boneByName.Add(data.bones[i].name, data.bones[i]);
			}

			data.bonePathByName = new Dictionary<string, string>();

			foreach (SpineBone bone in data.bones){
				string path = "";
				SpineBone b = bone;
				do {
					path=b.name+"/"+path;
					if (!string.IsNullOrEmpty( b.parent))
						b = data.boneByName[b.parent];
					else
						b = null;
				} while (b!=null);

				if (path.Length >0)
					path = path.Remove(path.Length - 1);

				data.bonePathByName.Add(bone.name, path);
			}

			data.slotOrder =  new Dictionary<string, int>();

			data.slotPathByName = new Dictionary<string, string>();
			data.slotDefaultAttachments = new Dictionary<string, string>();
			for (int i = 0; i < data.slots.Count; i++) {
				string slotName = data.slots[i].name;
				string defaultAttachment = data.slots[i].attachment;
				data.slotOrder.Add(slotName, i);
				string boneName = data.slots[i].bone;
				string bonePath = data.bonePathByName[boneName];
				string slotPath = bonePath+"/" + SpineUtil.getSlotGOName(slotName);
				data.slotPathByName.Add(slotName, slotPath);
				data.slotDefaultAttachments.Add(slotName, defaultAttachment);
			}
		}

	}
}

redpajama_set_name: RedPajamaGithub


text:
import { runTest, testPath } from "../../../support";
import {
  dateDiff3Units,
  dayDate,
  hourDate,
  millisecondDate,
  minuteDate,
  monthDate,
  quarterDate,
  secondDate,
  weekDate,
  yearDate,
} from "./data";

runTest(testPath(__filename), {
  $dateDiff: [
    [{ ...dateDiff3Units, unit: "year" }, 3, { obj: yearDate }],
    [{ ...dateDiff3Units, unit: "quarter" }, 3, { obj: quarterDate }],
    [{ ...dateDiff3Units, unit: "month" }, 3, { obj: monthDate }],
    [{ ...dateDiff3Units, unit: "week" }, 3, { obj: weekDate }],
    [{ ...dateDiff3Units, unit: "day" }, 3, { obj: dayDate }],
    [{ ...dateDiff3Units, unit: "hour" }, 3, { obj: hourDate }],
    [{ ...dateDiff3Units, unit: "minute" }, 3, { obj: minuteDate }],
    [{ ...dateDiff3Units, unit: "second" }, 3, { obj: secondDate }],
    [{ ...dateDiff3Units, unit: "millisecond" }, 3, { obj: millisecondDate }],
  ],
});


text:
<?php

namespace RingCentral\SDK\Pubnub;

use Symfony\Component\EventDispatcher\Event;

class PubnubEvent extends Event
{

    protected $data = array();

    public function __construct($data = array())
    {
        $this->data = $data;
    }

    public function getData()
    {
        return $this->data;
    }

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css" />

Packages

All

dcll.iParser.iParser


text:
.class Landroid/media/AudioService$SoundPoolListenerThread;
.super Ljava/lang/Thread;
.source "AudioService.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/media/AudioService;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "SoundPoolListenerThread"
.end annotation

# instance fields
.field final synthetic this$0:Landroid/media/AudioService;

# direct methods
.method public constructor <init>(Landroid/media/AudioService;)V
    .locals 1

    .prologue
    .line 2406
    iput-object p1, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    .line 2407
    const-string v0, "SoundPoolListenerThread"

    invoke-direct {p0, v0}, Ljava/lang/Thread;-><init>(Ljava/lang/String;)V

    .line 2408
    return-void
.end method

# virtual methods
.method public run()V
    .locals 5

    .prologue
    .line 2413
    invoke-static {}, Landroid/os/Looper;->prepare()V

    .line 2414
    iget-object v0, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v1

    # setter for: Landroid/media/AudioService;->mSoundPoolLooper:Landroid/os/Looper;
    invoke-static {v0, v1}, Landroid/media/AudioService;->access$1702(Landroid/media/AudioService;Landroid/os/Looper;)Landroid/os/Looper;

    .line 2416
    iget-object v0, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    # getter for: Landroid/media/AudioService;->mSoundEffectsLock:Ljava/lang/Object;
    invoke-static {v0}, Landroid/media/AudioService;->access$1800(Landroid/media/AudioService;)Ljava/lang/Object;

    move-result-object v1

    monitor-enter v1

    .line 2417
    :try_start_0
    iget-object v0, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    # getter for: Landroid/media/AudioService;->mSoundPool:Landroid/media/SoundPool;
    invoke-static {v0}, Landroid/media/AudioService;->access$1900(Landroid/media/AudioService;)Landroid/media/SoundPool;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2418
    iget-object v0, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    new-instance v2, Landroid/media/AudioService$SoundPoolCallback;

    iget-object v3, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    const/4 v4, 0x0

    invoke-direct {v2, v3, v4}, Landroid/media/AudioService$SoundPoolCallback;-><init>(Landroid/media/AudioService;Landroid/media/AudioService$1;)V

    # setter for: Landroid/media/AudioService;->mSoundPoolCallBack:Landroid/media/AudioService$SoundPoolCallback;
    invoke-static {v0, v2}, Landroid/media/AudioService;->access$2002(Landroid/media/AudioService;Landroid/media/AudioService$SoundPoolCallback;)Landroid/media/AudioService$SoundPoolCallback;

    .line 2419
    iget-object v0, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    # getter for: Landroid/media/AudioService;->mSoundPool:Landroid/media/SoundPool;
    invoke-static {v0}, Landroid/media/AudioService;->access$1900(Landroid/media/AudioService;)Landroid/media/SoundPool;

    move-result-object v0

    iget-object v2, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    # getter for: Landroid/media/AudioService;->mSoundPoolCallBack:Landroid/media/AudioService$SoundPoolCallback;
    invoke-static {v2}, Landroid/media/AudioService;->access$2000(Landroid/media/AudioService;)Landroid/media/AudioService$SoundPoolCallback;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/media/SoundPool;->setOnLoadCompleteListener(Landroid/media/SoundPool$OnLoadCompleteListener;)V

    .line 2421
    :cond_0
    iget-object v0, p0, Landroid/media/AudioService$SoundPoolListenerThread;->this$0:Landroid/media/AudioService;

    # getter for: Landroid/media/AudioService;->mSoundEffectsLock:Ljava/lang/Object;
    invoke-static {v0}, Landroid/media/AudioService;->access$1800(Landroid/media/AudioService;)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->notify()V

    .line 2422
    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 2423
    invoke-static {}, Landroid/os/Looper;->loop()V

    .line 2424
    return-void

    .line 2422
    :catchall_0
    move-exception v0

    :try_start_1
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v0
.end method


text:
/*
* CODE GENERATED AUTOMATICALLY WITH github.com/dave/ktest/_codegen
* THIS FILE MUST NOT BE EDITED BY HAND
 */

package require

import (
	sync "sync"
	time "time"

	assert "github.com/dave/ktest/assert"
)

// Condition uses a Comparison to assert a complex condition.
func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) {
	if !assert.Condition(t, comp, msgAndArgs...) {
		t.FailNow()
	}
}

// Contains asserts that the specified string, list(array, slice...) or map contains the
// specified substring or element.
//
//    assert.Contains(t, "Hello World", "World", "But 'Hello World' does contain 'World'")
//    assert.Contains(t, ["Hello", "World"], "World", "But ["Hello", "World"] does contain 'World'")
//    assert.Contains(t, {"Hello": "World"}, "Hello", "But {'Hello': 'World'} does contain 'Hello'")
//
// Returns whether the assertion was successful (true) or not (false).
func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
	if !assert.Contains(t, s, contains, msgAndArgs...) {
		t.FailNow()
	}
}

// Empty asserts that the specified object is empty.  I.e. nil, "", false, 0 or either
// a slice or a channel with len == 0.
//
//  assert.Empty(t, obj)
//
// Returns whether the assertion was successful (true) or not (false).
func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) {
	if !assert.Empty(t, object, msgAndArgs...) {
		t.FailNow()
	}
}

// Equal asserts that two objects are equal.
//
//    assert.Equal(t, 123, 123, "123 and 123 should be equal")
//
// Returns whether the assertion was successful (true) or not (false).
func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
	if !assert.Equal(t, expected, actual, msgAndArgs...) {
		t.FailNow()
	}
}

// EqualError asserts that a function returned an error (i.e. not `nil`)
// and that it is equal to the provided error.
//
//   actualObj, err := SomeFunction()
//   if assert.Error(t, err, "An error was expected") {
// 	   assert.Equal(t, err, expectedError)
//   }
//
// Returns whether the assertion was successful (true) or not (false).
func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) {
	if !assert.EqualError(t, theError, errString, msgAndArgs...) {
		t.FailNow()
	}
}

// EqualValues asserts that two objects are equal or convertable to the same types
// and equal.
//
//    assert.EqualValues(t, uint32(123), int32(123), "123 and 123 should be equal")
//
// Returns whether the assertion was successful (true) or not (false).
func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
	if !assert.EqualValues(t, expected, actual, msgAndArgs...) {
		t.FailNow()
	}
}

// Error asserts that a function returned an error (i.e. not `nil`).
//
//   actualObj, err := SomeFunction()
//   if assert.Error(t, err, "An error was expected") {
// 	   assert.Equal(t, err, expectedError)
//   }
//
// Returns whether the assertion was successful (true) or not (false).
func Error(t TestingT, err error, msgAndArgs ...interface{}) {
	if !assert.Error(t, err, msgAndArgs...) {
		t.FailNow()
	}
}

// Exactly asserts that two objects are equal is value and type.
//
//    assert.Exactly(t, int32(123), int64(123), "123 and 123 should NOT be equal")
//
// Returns whether the assertion was successful (true) or not (false).
func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
	if !assert.Exactly(t, expected, actual, msgAndArgs...) {
		t.FailNow()
	}
}

// Fail reports a failure through
func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) {
	if !assert.Fail(t, failureMessage, msgAndArgs...) {
		t.FailNow()
	}
}

// FailNow fails test
func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) {
	if !assert.FailNow(t, failureMessage, msgAndArgs...) {
		t.FailNow()
	}
}

// False asserts that the specified value is false.
//
//    assert.False(t, myBool, "myBool should be false")
//
// Returns whether the assertion was successful (true) or not (false).
func False(t TestingT, value bool, msgAndArgs ...interface{}) {
	if !assert.False(t, value, msgAndArgs...) {
		t.FailNow()
	}
}

// HasError works with the kerr package to test for a specific error on the error stack
func HasError(t TestingT, theError error, expectedId string, msgAndArgs ...interface{}) {
	if !assert.HasError(t, theError, expectedId, msgAndArgs...) {
		t.FailNow()
	}
}

// HasError works with the kerr package to test for a specific error on the error stack, but the error is expected to come from an external package so tooling shouldn't expect to find the error thrown.
func HasErrorExternal(t TestingT, theError error, expectedId string, msgAndArgs ...interface{}) {
	if !assert.HasErrorExternal(t, theError, expectedId, msgAndArgs...) {
		t.FailNow()
	}
}

// Implements asserts that an object is implemented by the specified interface.
//
//    assert.Implements(t, (*MyInterface)(nil), new(MyObject), "MyObject")
func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
	if !assert.Implements(t, interfaceObject, object, msgAndArgs...) {
		t.FailNow()
	}
}

// InDelta asserts that the two numerals are within delta of each other.
//
// 	 assert.InDelta(t, math.Pi, (22 / 7.0), 0.01)
//
// Returns whether the assertion was successful (true) or not (false).
func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
	if !assert.InDelta(t, expected, actual, delta, msgAndArgs...) {
		t.FailNow()
	}
}

// InDeltaSlice is the same as InDelta, except it compares two slices.
func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
	if !assert.InDeltaSlice(t, expected, actual, delta, msgAndArgs...) {
		t.FailNow()
	}
}

// InEpsilon asserts that expected and actual have a relative error less than epsilon
//
// Returns whether the assertion was successful (true) or not (false).
func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
	if !assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) {
		t.FailNow()
	}
}

// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
	if !assert.InEpsilonSlice(t, expected, actual, epsilon, msgAndArgs...) {
		t.FailNow()
	}
}

// IsError works with the kerr package to test for a specific error
func IsError(t TestingT, theError error, expectedId string, msgAndArgs ...interface{}) {
	if !assert.IsError(t, theError, expectedId, msgAndArgs...) {
		t.FailNow()
	}
}

// IsError works with the kerr package to test for a specific error, but the error is expected to come from an external package so tooling shouldn't expect to find the error thrown.
func IsErrorExternal(t TestingT, theError error, expectedId string, msgAndArgs ...interface{}) {
	if !assert.IsErrorExternal(t, theError, expectedId, msgAndArgs...) {
		t.FailNow()
	}
}

// IsType asserts that the specified objects are of the same type.
func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
	if !assert.IsType(t, expectedType, object, msgAndArgs...) {
		t.FailNow()
	}
}

// JSONEq asserts that two JSON strings are equivalent.
//
//  assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
//
// Returns whether the assertion was successful (true) or not (false).
func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) {
	if !assert.JSONEq(t, expected, actual, msgAndArgs...) {
		t.FailNow()
	}
}

// Len asserts that the specified object has specific length.
// Len also fails if the object has a type that len() not accept.
//
//    assert.Len(t, mySlice, 3, "The size of slice is not 3")
//
// Returns whether the assertion was successful (true) or not (false).
func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) {
	if !assert.Len(t, object, length, msgAndArgs...) {
		t.FailNow()
	}
}

// Nil asserts that the specified object is nil.
//
//    assert.Nil(t, err, "err should be nothing")
//
// Returns whether the assertion was successful (true) or not (false).
func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
	if !assert.Nil(t, object, msgAndArgs...) {
		t.FailNow()
	}
}

// NoError asserts that a function returned no error (i.e. `nil`).
//
//   actualObj, err := SomeFunction()
//   if assert.NoError(t, err) {
// 	   assert.Equal(t, actualObj, expectedObj)
//   }
//
// Returns whether the assertion was successful (true) or not (false).
func NoError(t TestingT, err error, msgAndArgs ...interface{}) {
	if !assert.NoError(t, err, msgAndArgs...) {
		t.FailNow()
	}
}

// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
// specified substring or element.
//
//    assert.NotContains(t, "Hello World", "Earth", "But 'Hello World' does NOT contain 'Earth'")
//    assert.NotContains(t, ["Hello", "World"], "Earth", "But ['Hello', 'World'] does NOT contain 'Earth'")
//    assert.NotContains(t, {"Hello": "World"}, "Earth", "But {'Hello': 'World'} does NOT contain 'Earth'")
//
// Returns whether the assertion was successful (true) or not (false).
func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
	if !assert.NotContains(t, s, contains, msgAndArgs...) {
		t.FailNow()
	}
}

// NotEmpty asserts that the specified object is NOT empty.  I.e. not nil, "", false, 0 or either
// a slice or a channel with len == 0.
//
//  if assert.NotEmpty(t, obj) {
//    assert.Equal(t, "two", obj[1])
//  }
//
// Returns whether the assertion was successful (true) or not (false).
func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) {
	if !assert.NotEmpty(t, object, msgAndArgs...) {
		t.FailNow()
	}
}

// NotEqual asserts that the specified values are NOT equal.
//
//    assert.NotEqual(t, obj1, obj2, "two objects shouldn't be equal")
//
// Returns whether the assertion was successful (true) or not (false).
func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
	if !assert.NotEqual(t, expected, actual, msgAndArgs...) {
		t.FailNow()
	}
}

// NotNil asserts that the specified object is not nil.
//
//    assert.NotNil(t, err, "err should be something")
//
// Returns whether the assertion was successful (true) or not (false).
func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
	if !assert.NotNil(t, object, msgAndArgs...) {
		t.FailNow()
	}
}

// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
//
//   assert.NotPanics(t, func(){
//     RemainCalm()
//   }, "Calling RemainCalm() should NOT panic")
//
// Returns whether the assertion was successful (true) or not (false).
func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
	if !assert.NotPanics(t, f, msgAndArgs...) {
		t.FailNow()
	}
}

// NotRegexp asserts that a specified regexp does not match a string.
//
//  assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting")
//  assert.NotRegexp(t, "^start", "it's not starting")
//
// Returns whether the assertion was successful (true) or not (false).
func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
	if !assert.NotRegexp(t, rx, str, msgAndArgs...) {
		t.FailNow()
	}
}

// NotZero asserts that i is not the zero value for its type and returns the truth.
func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) {
	if !assert.NotZero(t, i, msgAndArgs...) {
		t.FailNow()
	}
}

// Panics asserts that the code inside the specified PanicTestFunc panics.
//
//   assert.Panics(t, func(){
//     GoCrazy()
//   }, "Calling GoCrazy() should panic")
//
// Returns whether the assertion was successful (true) or not (false).
func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
	if !assert.Panics(t, f, msgAndArgs...) {
		t.FailNow()
	}
}

// Regexp asserts that a specified regexp matches a string.
//
//  assert.Regexp(t, regexp.MustCompile("start"), "it's starting")
//  assert.Regexp(t, "start...$", "it's not starting")
//
// Returns whether the assertion was successful (true) or not (false).
func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
	if !assert.Regexp(t, rx, str, msgAndArgs...) {
		t.FailNow()
	}
}

// True asserts that the specified value is true.
//
//    assert.True(t, myBool, "myBool should be true")
//
// Returns whether the assertion was successful (true) or not (false).
func True(t TestingT, value bool, msgAndArgs ...interface{}) {
	if !assert.True(t, value, msgAndArgs...) {
		t.FailNow()
	}
}

//
func WaitFor(t TestingT, c chan struct{}, shouldBeOpen bool, msgAndArgs ...interface{}) {
	if !assert.WaitFor(t, c, shouldBeOpen, msgAndArgs...) {
		t.FailNow()
	}
}

//
func WaitForError(t TestingT, c chan error, errorId string, msgAndArgs ...interface{}) {
	if !assert.WaitForError(t, c, errorId, msgAndArgs...) {
		t.FailNow()
	}
}

//
func WaitForGroup(t TestingT, wg *sync.WaitGroup, msgAndArgs ...interface{}) {
	if !assert.WaitForGroup(t, wg, msgAndArgs...) {
		t.FailNow()
	}
}

// WithinDuration asserts that the two times are within duration delta of each other.
//
//   assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second, "The difference should not be more than 10s")
//
// Returns whether the assertion was successful (true) or not (false).
func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) {
	if !assert.WithinDuration(t, expected, actual, delta, msgAndArgs...) {
		t.FailNow()
	}
}

// Zero asserts that i is the zero value for its type and returns the truth.
func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) {
	if !assert.Zero(t, i, msgAndArgs...) {
		t.FailNow()
	}
}


text:
cask "netnewswire-beta" do
  version "6.0.3b1"
  sha256 "3760a5e7a0a796059a37b412222c0eaec5ac41da766c419de1981757f09e5fff"

  url "https://github.com/brentsimmons/NetNewsWire/releases/download/mac-#{version}/NetNewsWire#{version}.zip",
      verified: "github.com/brentsimmons/NetNewsWire/"
  name "NetNewsWire"
  desc "Free and open-source RSS reader"
  homepage "https://ranchero.com/netnewswire/"

  livecheck do
    url :url
    strategy :git
    regex(/^mac-(\d+(?:\.\d+)*b\d+)$/i)
  end

  auto_updates true
  conflicts_with cask: "netnewswire"
  depends_on macos: ">= :catalina"

  app "NetNewsWire.app"

  zap trash: [
    "~/Library/Application Scripts/com.ranchero.NetNewsWire-Evergreen.Subscribe-to-Feed",
    "~/Library/Application Support/NetNewsWire",
    "~/Library/Caches/com.ranchero.NetNewsWire-Evergreen",
    "~/Library/Containers/com.ranchero.NetNewsWire-Evergreen.Subscribe-to-Feed",
    "~/Library/Preferences/com.ranchero.NetNewsWire-Evergreen.plist",
    "~/Library/Saved Application State/com.ranchero.NetNewsWire-Evergreen.savedState",
    "~/Library/WebKit/com.ranchero.NetNewsWire-Evergreen",
  ]
end


text:
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>

<form name="myform" action="?m=collection&c=node&a=copy&nodeid=<?php if(isset($nodeid)) echo $nodeid?>" method="post" id="myform">

			<?php echo L('had_collected_from_the_roll')?>:

			<?php if(isset($data['name'])) echo $data['name']?>

			<?php echo L('the_new_gathering')?>:

			<input type="text" name="name" id="name"  class="input-text" value="" />

    <input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="dialog">

</form>


text:
require 'spec_helper'

describe Wikitext::Parser, 'parsing
 blocks' do
  before do
    @parser = Wikitext::Parser.new
  end

  it 'should recognize paired
 and
 tags' do
    @parser.parse('======foo======').should == "
foo
\n"
  end

  it 'should strip leading and trailing whitespace from the title' do
    @parser.parse('====== foo ======').should == "
foo
\n"
    @parser.parse('======  foo  ======').should == "
foo
\n"
    @parser.parse('======   foo   ======').should == "
foo
\n"
  end

  it 'should accept titles with missing closing tags' do
    @parser.parse('====== foo').should == "
foo
\n"
  end

  it 'should allow header tags to appear within titles' do
    @parser.parse('====== foo = bar ======').should == "
foo = bar
\n"
    @parser.parse('====== foo == bar ======').should == "
foo == bar
\n"
    @parser.parse('====== foo === bar ======').should == "
foo === bar
\n"
    @parser.parse('====== foo ==== bar ======').should == "
foo ==== bar
\n"
    @parser.parse('====== foo ===== bar ======').should == "
foo ===== bar
\n"
    @parser.parse('====== foo ====== bar ======').should == "
foo ====== bar
\n"
  end

  it 'should show excess characters in closing tags' do
    # in this case only one excess char, then the H6_END matches
    @parser.parse('====== foo =======').should == "
foo =
\n"
  end

  it 'should be nestable inside blockquote blocks' do
    @parser.parse('> ====== foo ======').should == "
\n
foo
\n
\n"
  end

  it 'should have no special meaning inside <nowiki> spans' do
    @parser.parse("<nowiki>\n====== foo ======</nowiki>").should == "
\n====== foo ======
\n"
  end
end


text:
'use strict';

import test from 'ava';
import Shoe from '../../../src/helpers/shoe';
import {assert} from 'chai';

test.beforeEach(t => {
  t.context.shoe = new Shoe([{sign: 0, type: 0}]);
});

test('#getNextCard: should pull from cards', t => {
  t.context.shoe.getNextCard();
  assert.equal(0, t.context.shoe.cards.length);
});

test('#getNextCard: should get random card from cards', t => {
  let card = t.context.shoe.getNextCard();
  assert.isObject(card);
});


text:
package algnhsa

import (
	"context"
	"net/http"
	"net/http/httptest"

	"github.com/aws/aws-lambda-go/events"
	"github.com/aws/aws-lambda-go/lambda"
)

func handleEvent(ctx context.Context, event events.APIGatewayProxyRequest, handler http.Handler, binaryContentTypes map[string]bool) (events.APIGatewayProxyResponse, error) {
	r, err := newHTTPRequest(ctx, event)
	if err != nil {
		return events.APIGatewayProxyResponse{}, err
	}
	w := httptest.NewRecorder()
	handler.ServeHTTP(w, r)
	return newAPIGatewayResponse(w, binaryContentTypes)
}

// ListenAndServe starts the AWS Lambda runtime (aws-lambda-go lambda.Start) with a given handler.
// It accepts a slice of content types that should be treated as binary types by the API Gateway.
// The "*/* value makes algnhsa treat any content type as binary.
func ListenAndServe(handler http.Handler, binaryContentTypes []string) {
	if handler == nil {
		handler = http.DefaultServeMux
	}
	types := map[string]bool{}
	for _, contentType := range binaryContentTypes {
		types[contentType] = true
	}
	lambda.Start(func(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
		return handleEvent(ctx, event, handler, types)
	})
}


text:
#pragma once
#include <aws/qldb-session/QLDBSession_EXPORTS.h>
#include <aws/qldb-session/QLDBSessionRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/qldb-session/model/StartSessionRequest.h>
#include <aws/qldb-session/model/StartTransactionRequest.h>
#include <aws/qldb-session/model/EndSessionRequest.h>
#include <aws/qldb-session/model/CommitTransactionRequest.h>
#include <aws/qldb-session/model/AbortTransactionRequest.h>
#include <aws/qldb-session/model/ExecuteStatementRequest.h>
#include <aws/qldb-session/model/FetchPageRequest.h>
#include <utility>

namespace Aws
{
namespace QLDBSession
{
namespace Model
{

  /**
   */
  class AWS_QLDBSESSION_API SendCommandRequest : public QLDBSessionRequest
  {
  public:
    SendCommandRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "SendCommand"; }

    Aws::String SerializePayload() const override;

    Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline const Aws::String& GetSessionToken() const{ return m_sessionToken; }

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline bool SessionTokenHasBeenSet() const { return m_sessionTokenHasBeenSet; }

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = std::move(value); }

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); }

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline SendCommandRequest& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;}

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline SendCommandRequest& WithSessionToken(Aws::String&& value) { SetSessionToken(std::move(value)); return *this;}

    /**
     *
Specifies the session token for the current command. A session token is
     * constant throughout the life of the session.

To obtain a session token,
     * run the StartSession command. This SessionToken is
     * required for every subsequent command that is issued during the current
     * session.

     */
    inline SendCommandRequest& WithSessionToken(const char* value) { SetSessionToken(value); return *this;}

    /**
     *
Command to start a new session. A session token is obtained as part of the
     * response.

     */
    inline const StartSessionRequest& GetStartSession() const{ return m_startSession; }

    /**
     *
Command to start a new session. A session token is obtained as part of the
     * response.

     */
    inline bool StartSessionHasBeenSet() const { return m_startSessionHasBeenSet; }

    /**
     *
Command to start a new session. A session token is obtained as part of the
     * response.

     */
    inline void SetStartSession(const StartSessionRequest& value) { m_startSessionHasBeenSet = true; m_startSession = value; }

    /**
     *
Command to start a new session. A session token is obtained as part of the
     * response.

     */
    inline void SetStartSession(StartSessionRequest&& value) { m_startSessionHasBeenSet = true; m_startSession = std::move(value); }

    /**
     *
Command to start a new session. A session token is obtained as part of the
     * response.

     */
    inline SendCommandRequest& WithStartSession(const StartSessionRequest& value) { SetStartSession(value); return *this;}

    /**
     *
Command to start a new session. A session token is obtained as part of the
     * response.

     */
    inline SendCommandRequest& WithStartSession(StartSessionRequest&& value) { SetStartSession(std::move(value)); return *this;}

    /**
     *
Command to start a new transaction.

     */
    inline const StartTransactionRequest& GetStartTransaction() const{ return m_startTransaction; }

    /**
     *
Command to start a new transaction.

     */
    inline bool StartTransactionHasBeenSet() const { return m_startTransactionHasBeenSet; }

    /**
     *
Command to start a new transaction.

     */
    inline void SetStartTransaction(const StartTransactionRequest& value) { m_startTransactionHasBeenSet = true; m_startTransaction = value; }

    /**
     *
Command to start a new transaction.

     */
    inline void SetStartTransaction(StartTransactionRequest&& value) { m_startTransactionHasBeenSet = true; m_startTransaction = std::move(value); }

    /**
     *
Command to start a new transaction.

     */
    inline SendCommandRequest& WithStartTransaction(const StartTransactionRequest& value) { SetStartTransaction(value); return *this;}

    /**
     *
Command to start a new transaction.

     */
    inline SendCommandRequest& WithStartTransaction(StartTransactionRequest&& value) { SetStartTransaction(std::move(value)); return *this;}

    /**
     *
Command to end the current session.

     */
    inline const EndSessionRequest& GetEndSession() const{ return m_endSession; }

    /**
     *
Command to end the current session.

     */
    inline bool EndSessionHasBeenSet() const { return m_endSessionHasBeenSet; }

    /**
     *
Command to end the current session.

     */
    inline void SetEndSession(const EndSessionRequest& value) { m_endSessionHasBeenSet = true; m_endSession = value; }

    /**
     *
Command to end the current session.

     */
    inline void SetEndSession(EndSessionRequest&& value) { m_endSessionHasBeenSet = true; m_endSession = std::move(value); }

    /**
     *
Command to end the current session.

     */
    inline SendCommandRequest& WithEndSession(const EndSessionRequest& value) { SetEndSession(value); return *this;}

    /**
     *
Command to end the current session.

     */
    inline SendCommandRequest& WithEndSession(EndSessionRequest&& value) { SetEndSession(std::move(value)); return *this;}

    /**
     *
Command to commit the specified transaction.

     */
    inline const CommitTransactionRequest& GetCommitTransaction() const{ return m_commitTransaction; }

    /**
     *
Command to commit the specified transaction.

     */
    inline bool CommitTransactionHasBeenSet() const { return m_commitTransactionHasBeenSet; }

    /**
     *
Command to commit the specified transaction.

     */
    inline void SetCommitTransaction(const CommitTransactionRequest& value) { m_commitTransactionHasBeenSet = true; m_commitTransaction = value; }

    /**
     *
Command to commit the specified transaction.

     */
    inline void SetCommitTransaction(CommitTransactionRequest&& value) { m_commitTransactionHasBeenSet = true; m_commitTransaction = std::move(value); }

    /**
     *
Command to commit the specified transaction.

     */
    inline SendCommandRequest& WithCommitTransaction(const CommitTransactionRequest& value) { SetCommitTransaction(value); return *this;}

    /**
     *
Command to commit the specified transaction.

     */
    inline SendCommandRequest& WithCommitTransaction(CommitTransactionRequest&& value) { SetCommitTransaction(std::move(value)); return *this;}

    /**
     *
Command to abort the current transaction.

     */
    inline const AbortTransactionRequest& GetAbortTransaction() const{ return m_abortTransaction; }

    /**
     *
Command to abort the current transaction.

     */
    inline bool AbortTransactionHasBeenSet() const { return m_abortTransactionHasBeenSet; }

    /**
     *
Command to abort the current transaction.

     */
    inline void SetAbortTransaction(const AbortTransactionRequest& value) { m_abortTransactionHasBeenSet = true; m_abortTransaction = value; }

    /**
     *
Command to abort the current transaction.

     */
    inline void SetAbortTransaction(AbortTransactionRequest&& value) { m_abortTransactionHasBeenSet = true; m_abortTransaction = std::move(value); }

    /**
     *
Command to abort the current transaction.

     */
    inline SendCommandRequest& WithAbortTransaction(const AbortTransactionRequest& value) { SetAbortTransaction(value); return *this;}

    /**
     *
Command to abort the current transaction.

     */
    inline SendCommandRequest& WithAbortTransaction(AbortTransactionRequest&& value) { SetAbortTransaction(std::move(value)); return *this;}

    /**
     *
Command to execute a statement in the specified transaction.

     */
    inline const ExecuteStatementRequest& GetExecuteStatement() const{ return m_executeStatement; }

    /**
     *
Command to execute a statement in the specified transaction.

     */
    inline bool ExecuteStatementHasBeenSet() const { return m_executeStatementHasBeenSet; }

    /**
     *
Command to execute a statement in the specified transaction.

     */
    inline void SetExecuteStatement(const ExecuteStatementRequest& value) { m_executeStatementHasBeenSet = true; m_executeStatement = value; }

    /**
     *
Command to execute a statement in the specified transaction.

     */
    inline void SetExecuteStatement(ExecuteStatementRequest&& value) { m_executeStatementHasBeenSet = true; m_executeStatement = std::move(value); }

    /**
     *
Command to execute a statement in the specified transaction.

     */
    inline SendCommandRequest& WithExecuteStatement(const ExecuteStatementRequest& value) { SetExecuteStatement(value); return *this;}

    /**
     *
Command to execute a statement in the specified transaction.

     */
    inline SendCommandRequest& WithExecuteStatement(ExecuteStatementRequest&& value) { SetExecuteStatement(std::move(value)); return *this;}

    /**
     *
Command to fetch a page.

     */
    inline const FetchPageRequest& GetFetchPage() const{ return m_fetchPage; }

    /**
     *
Command to fetch a page.

     */
    inline bool FetchPageHasBeenSet() const { return m_fetchPageHasBeenSet; }

    /**
     *
Command to fetch a page.

     */
    inline void SetFetchPage(const FetchPageRequest& value) { m_fetchPageHasBeenSet = true; m_fetchPage = value; }

    /**
     *
Command to fetch a page.

     */
    inline void SetFetchPage(FetchPageRequest&& value) { m_fetchPageHasBeenSet = true; m_fetchPage = std::move(value); }

    /**
     *
Command to fetch a page.

     */
    inline SendCommandRequest& WithFetchPage(const FetchPageRequest& value) { SetFetchPage(value); return *this;}

    /**
     *
Command to fetch a page.

     */
    inline SendCommandRequest& WithFetchPage(FetchPageRequest&& value) { SetFetchPage(std::move(value)); return *this;}

  private:

    Aws::String m_sessionToken;
    bool m_sessionTokenHasBeenSet = false;

    StartSessionRequest m_startSession;
    bool m_startSessionHasBeenSet = false;

    StartTransactionRequest m_startTransaction;
    bool m_startTransactionHasBeenSet = false;

    EndSessionRequest m_endSession;
    bool m_endSessionHasBeenSet = false;

    CommitTransactionRequest m_commitTransaction;
    bool m_commitTransactionHasBeenSet = false;

    AbortTransactionRequest m_abortTransaction;
    bool m_abortTransactionHasBeenSet = false;

    ExecuteStatementRequest m_executeStatement;
    bool m_executeStatementHasBeenSet = false;

    FetchPageRequest m_fetchPage;
    bool m_fetchPageHasBeenSet = false;
  };

} // namespace Model
} // namespace QLDBSession
} // namespace Aws


text:
const Api = require("./Api")
const response = require("./response")
const path = require("./path")
const mediaType = require("./mediaType/")

module.exports = {
  api: Object.assign(router => new Api(router), response, path, mediaType)
}


text:
  <link rel="stylesheet" type="text/css" href="https://www.firebase.com/resources/tutorial/css/example.css">

  <canvas id="drawing-canvas" width="480" height="420"></canvas>


text:
pub struct Skeleton {
  pub bones: Vec<Bone>
}

#[derive(Debug, PartialEq, Clone)]
pub struct Bone {
  pub name: String,
  pub parent_index: Option<usize>,

  pub position: [f32; 3],
  pub orientation: [f32; 4],
  pub scale_shear: [f32; 9]
}