uct{})
	go func() {
		if !mm.Request(context.Background(), 100, memoryPriorityHigh) {
			t.Error("unable to get memory")
		}
		close(memoryCompleted15)
	}()
	<-mm.blocking // wait until the goroutine is in the fifo.
	mm.Return(100)
	// Second set of low priority requests should have gone through.
	<-memoryCompleted13
	mm.Return(30)
	<-memoryCompleted15
	mm.Return(100)
	if mm.available != mm.base {
		t.Error("test did not reset properly")
	}
}

// TestMemoryManager checks that the memory management is working correctly.
func TestMemoryManagerConcurrent(t *testing.T) {
	if testing.Short() {
		t.SkipNow()
	}

	// Mimic the default parameters.
	stopChan := make(chan struct{})
	mm := newMemoryManager(100, 25, stopChan)

	// Spin up a bunch of threads to all request and release memory at the same
	// time.
	doMemory := func() {
		for {
			// Check if the thread has been killed.
			select {
			case <-stopChan:
				return
			default:
			}

			// Randomly request some amount of memory. Sometimes there will be
			// overdrafts.
			memNeeded := uint64(fastrand.Intn(110) + 1)
			// Randomly set the priority of this memory.
			priority := false
			if fastrand.Intn(2) == 0 {
				priority = true
			}

			// Perform the request.
			if !mm.Request(context.Background(), memNeeded, priority) {
				select {
				case <-stopChan:
					return
				default:
					t.Error("request failed even though the mm hasn't been shut down")
				}
				return
			}

			// Sit on the memory for some random (low) number of microseconds.
			sleepTime := time.Microsecond * time.Duration(fastrand.Intn(1e3))
			time.Sleep(sleepTime)

			// Randomly decide whether to return all of the memory at once.
			if fastrand.Intn(2) == 0 {
				mm.Return(memNeeded)
				continue
			}
			// Return random smaller amounts of memory.
			for memNeeded > 0 {
				returnAmt := uint64(fastrand.Intn(int(memNeeded))) + 1
				memNeeded -= returnAmt
				mm.Return(uint64(returnAmt))
			}
		}
	}

	// Spin up 20 threads to compete for memory.
	var wg sync.WaitGroup
	for i := 0; i < 20; i++ {
		wg.Add(1)
		go func() {
			doMemory()
			wg.Done()
		}()
	}

	// Sleep for 10 seconds to let the threads do their thing.
	time.Sleep(time.Second * 10)

	// Close out the memory and wait for all the threads to die.
	close(stopChan)
	wg.Wait()
}

// TestMemoryManagerStatus probes the response from callStatus
func TestMemoryManagerStatus(t *testing.T) {
	if testing.Short() {
		t.SkipNow()
	}
	t.Parallel()

	// Create memory manager
	memoryDefault := repairMemoryDefault
	memoryPriorityDefault := memoryDefault / 4
	stopChan := make(chan struct{})
	mm := newMemoryManager(memoryDefault, memoryPriorityDefault, stopChan)

	// Check status
	ms := mm.callStatus()
	expectedStatus := modules.MemoryManagerStatus{
		Available: memoryDefault - memoryPriorityDefault,
		Base:      memoryDefault - memoryPriorityDefault,
		Requested: 0,

		PriorityAvailable: memoryDefault,
		PriorityBase:      memoryDefault,
		PriorityRequested: 0,
		PriorityReserve:   memoryPriorityDefault,
	}
	if !reflect.DeepEqual(ms, expectedStatus) {
		t.Log("Expected:", expectedStatus)
		t.Log("Status:", ms)
		t.Fatal("MemoryStatus not as expected")
	}

	// Request memory
	normalRequest := uint64(100)
	requested := mm.Request(context


",
[38666] = "Латные саронитовые наручи",
[38667] = "Рукавицы властности Кровопорча",
[38668] = "Ремень разносчика чумы",
[38669] = "Чеканные саронитовые ножные латы",
[38670] = "Наголенники бойни",
[38671] = "Перстень-печатка Валанара",
[38672] = "Перстень-печатка Келесета",
[38673] = "Змеевидное колье",
[38674] = "Оберег Собирателя душ",
[38675] = "Печатка Темного братства",
[38676] = "Ус Хар'коа",
[38677] = "Хар'коанская реликвия",
[38678] = "Колье нежизни",
[38679] = "Свиток чар для наручей - здоровье",
[38680] = "Змеевидное колье",
[38681] = "Субстанция ледяной земли",
[38682] = "Материал для свитка брони",
[38684] = "Рог Фрейи",
[38686] = "Прогнившие внутренности поганища",
[38687] = "Вязкая слюна вурдалака",
[38688] = "Пунш \"Зов джунглей\" Громовара",
[38689] = "Сетка для ловли кур",
[38695] = "Настой бога белых медведей",
[38696] = "Фимиам мучителя",
[38697] = "Глоток пунша \"Зов джунглей\"",
[38698] = "Горькая плазма",
[38699] = "Заколдованное колье",
[38700] = "Артефакт Рунока",
[38701] = "Чаша мозгов и кишок",
[38703] = "Останки Острокола",
[38705] = "Яйцо руха",
[38706] = "Мозги и кишки",
[38707] = "Рунический клинок души",
[38708] = "Руна \"Омега\"",
[38709] = "Руна \"Омега\"",
[38710] = "Наручи проводника",
[38711] = "Перчатки сухохода",
[38712] = "Сдавливающая голову корона",
[38713] = "Наплеч предвидения",
[38714] = "Шнурованный ремень землепроходца",
[38715] = "Исполосованные сандалии",
[38716] = "Эфирный капюшон",
[38717] = "Пыльные штаны шахтера",
[38718] = "Тонкотканые наплечные пластины",
[38719] = "Одеяние устранителя",
[38726] = "Перчатки подстрекателя",
[38727] = "Ремень предсказателя",
[38728] = "Килт мирного протеста",
[38729] = "Сандалии быстрого бегства",
[38730] = "Наплечные пластины звонаря",
[38731] =


 اس سے پہلے کہ بیچنے والا تجارت کو منسوخ کر دے (the payment window varies depending on the payment method of the trade)۔ اس وقت کے دوران آپ کو اپنی ادائیگی مکمل کرنی ہوگی اور میں نے ادائیگی کی ہے کہ بٹن کو دبانا ہوگا۔ بیچنے والے کو مطلع کیا جاتا ہے کہ آپ نے ادائیگی کر دی ہے اور Monero کو اس وقت تک بانڈ میں رکھا جائے گا جب تک کہ بیچنے والا اپنے اکاؤنٹ میں ادائیگی کو دیکھ کر آپ کے لیے تجارت کو حتمی شکل نہیں دے دیتا۔ اگر آپ نے خریداری کے لیے ادائیگی کی، لیکن ادائیگی کے وقت کی مدت ختم ہونے سے پہلے ادائیگی مکمل ہونے کا نشان نہیں لگایا، تو براہ کرم تجارت کے ذریعے بیچنے والے سے رابطہ کریں۔ آپ اپنے $appName صارف پروفائل میں $dashboard سے بیچنے والے اور اپنے دوسرے موجودہ تجارتی رابطوں سے رابطہ کر سکتے ہیں۔ بیچنے والے کو ایک پیغام بھیجیں اور مہربانی سے اس صورت حال کی وضاحت کریں کہ آپ ٹائم ونڈو کے اندر ادائیگی کیوں مکمل نہیں کر سکے۔ اگر بیچنے والا اس درخواست کا جواب نہیں دیتا ہے تو براہ کرم $supportRequestForm استعمال کرتے ہوئے $appName سپورٹ سے رابطہ کریں اور اپنی تجارتی شناخت کا ذکر کریں۔';
  }

  @override
  String get faq250Sbanswer8722Sb248722Sbdashboard => 'ڈیش بورڈ';

  @override
  String get faq250Sbanswer8722Sb248722Sbsupport8722Sbrequest8722Sbform => 'سپورٹ درخواست فارم';

  @override
  String faq250Sbanswer8722Sb2457Sbagoradesk(Object dashboard, Object appN


 */

package org.matrix.android.sdk.internal.session.widgets.helper

import org.matrix.android.sdk.api.session.content.ContentUrlResolver
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.events.model.toModel
import org.matrix.android.sdk.api.session.room.sender.SenderInfo
import org.matrix.android.sdk.api.session.widgets.model.Widget
import org.matrix.android.sdk.api.session.widgets.model.WidgetContent
import org.matrix.android.sdk.api.session.widgets.model.WidgetType
import org.matrix.android.sdk.api.util.toMatrixItem
import org.matrix.android.sdk.internal.database.RealmSessionProvider
import org.matrix.android.sdk.internal.di.UserId
import org.matrix.android.sdk.internal.session.displayname.DisplayNameResolver
import org.matrix.android.sdk.internal.session.room.membership.RoomMemberHelper
import org.matrix.android.sdk.internal.session.user.UserDataSource
import java.net.URLEncoder
import javax.inject.Inject

internal class WidgetFactory @Inject constructor(
        private val userDataSource: UserDataSource,
        private val realmSessionProvider: RealmSessionProvider,
        private val displayNameResolver: DisplayNameResolver,
        private val urlResolver: ContentUrlResolver,
        @UserId private val userId: String
) {

    fun create(widgetEvent: Event): Widget? {
        val widgetContent = widgetEvent.content.toModel<WidgetContent>()
        if (widgetContent?.url == null) return null
        val widgetId = widgetEvent.stateKey ?: return null
        val type = widgetContent.type ?: return null
        val senderInfo = if (widgetEvent.senderId == null || widgetEvent.roomId == null) {
            null
        } else {
            realmSessionProvider.withRealm {
                val roomMemberHelper = RoomMemberHelper(it, widgetEvent.roomId)
                val roomMemberSummaryEntity = roomMemberHelper.getLastRoomMember(widgetEvent.senderId)
                SenderInfo(
                        userId = widgetEvent.senderId,
                        displayName = roomMemberSummaryEntity?.displayName,
                        isUniqueDisplayName = roomMemberHelper.isUniqueDisplayName(roomMemberSummaryEntity?.displayName),
                        avatarUrl = roomMemberSummaryEntity?.avatarUrl
                )
            }
        }
        val isAddedByMe = widgetEvent.senderId == userId
        return Widget(
                widgetContent = widgetContent,
                event = widgetEvent,
                widgetId = widgetId,
                senderInfo = senderInfo,
                isAddedByMe = isAddedByMe,
                type = WidgetType.fromString(type)
        )
    }

    // Ref: https://github.com/matrix-org/matrix-widget-api/blob/master/src/templating/url-template.ts#L29-L33
    fun computeURL(widget: Widget, isLightTheme: Boolean): String? {
        var computedUrl = widget.widgetContent.url ?: return null
        val myUser = userDataSource.getUserOrDefault(userId)

        val keyValue = widget.widgetContent.data.mapKeys { "\$${it.key}" }.toMutableMap()

        keyValue[WIDGET_PATTERN_MATRIX_USER_ID] = userId
        keyValue[WIDGET_PATTERN_MATRIX_DISPLAY_NAME] = displayNameResolver.getBestName(myUser.toMatrixItem())
        keyValue[WIDGET_PATTERN_MATRIX_AVATAR_URL] = urlResolver.resolveFullSize(myUser.avatarUrl) ?: ""
        keyValue[WIDGET_PATTERN_MATRIX_WIDGET_ID] = widget.widgetId
        keyValue[WIDGET_PATTERN_MATRIX_ROOM_ID] = widget.event.roomId ?: ""
        keyValue[WIDGET_PATTERN_THEME] = getTheme(isLightTheme)

        for ((key, value) in keyValue) {
            computedUrl = computedUrl.replace(key


an't use round() in WebGL1\n  return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a;\n}\n\nfloat troikaGlyphUvToDistance(vec2 uv) {\n  return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv));\n}\n\nfloat troikaGetAADist() {\n  \n  #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300\n  return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5;\n  #else\n  return vTroikaGlyphDimensions.x / 64.0;\n  #endif\n}\n\nfloat troikaGetFragDistValue() {\n  vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize);\n  float distance = troikaGlyphUvToDistance(clampedGlyphUV);\n \n  // Extrapolate distance when outside bounds:\n  distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : \n    length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n\n  \n\n  return distance;\n}\n\nfloat troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) {\n  #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL)\n  float alpha = step(-distanceOffset, -distance);\n  #else\n\n  float alpha = smoothstep(\n    distanceOffset + aaDist,\n    distanceOffset - aaDist,\n    distance\n  );\n  #endif\n\n  return alpha;\n}\n",fragmentColorTransform:"\nfloat aaDist = troikaGetAADist();\nfloat fragDistance = troikaGetFragDistValue();\nfloat edgeAlpha = uTroikaSDFDebug ?\n  troikaGlyphUvToSdfValue(vTroikaGlyphUV) :\n  troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius));\n\n#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL)\nvec4 fillRGBA = gl_FragColor;\nfillRGBA.a *= uTroikaFillOpacity;\nvec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity);\nif (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb;\ngl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep(\n  -uTroikaStrokeWidth - aaDist,\n  -uTroikaStrokeWidth + aaDist,\n  fragDistance\n));\ngl_FragColor.a *= edgeAlpha;\n#endif\n\nif (edgeAlpha == 0.0) {\n  discard;\n}\n",customRewriter({vertexShader:e,fragmentShader:t}){let r=/\buniform\s+vec3\s+diffuse\b/;return r.test(t)&&(t=t.replace(r,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),r.test(e)||(e=e.replace(m,"uniform vec3 diffuse;\n$&\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\n"))),{vertexShader:e,fragmentShader:t}}});return t.transparent=!0,t.forceSinglePass=!0,Object.defineProperties(t,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),t}const se=new n.MeshBasic


tryCache.GeometryCacheComponent.GetDuration
	 */
	struct UGeometryCacheComponent_GetDuration_Params
	{
	public:
		float                                                      ReturnValue;                                             // 0x0000(0x0004)  (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	};

	/**
	 * Function GeometryCache.GeometryCacheComponent.GetAnimationTime
	 */
	struct UGeometryCacheComponent_GetAnimationTime_Params
	{
	public:
		float                                                      ReturnValue;                                             // 0x0000(0x0004)  (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	};

	/**
	 * Function GeometryCache.GeometryCacheTrack_FlipbookAnimation.AddMeshSample
	 */
	struct UGeometryCacheTrack_FlipbookAnimation_AddMeshSample_Params
	{
	public:
		struct FGeometryCacheMeshData                              MeshData;                                                // 0x0000(0x00B0)  (ConstParm, Parm, OutParm, ReferenceParm, NativeAccessSpecifierPublic)
		float                                                      SampleTime;                                              // 0x00B0(0x0004)  (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
	};

	/**
	 * Function GeometryCache.GeometryCacheTrack_TransformAnimation.SetMesh
	 */
	struct UGeometryCacheTrack_TransformAnimation_SetMesh_Params
	{
	public:
		struct FGeometryCacheMeshData                              NewMeshData;                                             // 0x0000(0x00B0)  (ConstParm, Parm, OutParm, ReferenceParm, NativeAccessSpecifierPublic)
	};

	/**
	 * Function GeometryCache.GeometryCacheTrack_TransformGroupAnimation.SetMesh
	 */
	struct UGeometryCacheTrack_TransformGroupAnimation_SetMesh_Params
	{
	public:
		struct FGeometryCacheMeshData                              NewMeshData;                                             // 0x0000(0x00B0)  (ConstParm, Parm, OutParm, ReferenceParm, NativeAccessSpecifierPublic)
	};

}

#ifdef _MSC_VER
	#pragma pack(pop)
#endif


 y field in your dataProvider.
     */
    yField: string;
}
import { initialState } from "@Redux/InitialState";
import { IAction } from "@Redux/Interfaces/IAction";
import { IPage, IStore, } from "@Redux/Interfaces/IStore";
import { ActionTypes } from "@Redux/ActionTypes";

export function pageReducer(state: IStore = initialState, action: IAction) {
    const payload = action.payload;
    if (!payload)
        return state;

    const pageId = payload.pageId;

    if (action.type === ActionTypes.SET_ACTIVE_PAGE) {
        if (pageId !== state.activePageId)
            return {
                ...state,
                activePageId: pageId
            };
    }

    return state;
}
import Lexeme from './Lexeme';
import Terminal, { TerminalType } from './Terminal';

export default abstract class Lexer {
  static TERMINALS: Terminal[] = [
    new Terminal(TerminalType.If, /^if$/),
    new Terminal(TerminalType.While, /^while$/),
    new Terminal(TerminalType.Operator, /^[\+|\-|\*|\/]$/),
    new Terminal(TerminalType.BoolOperator, /^[=|<|>]$/),
    new Terminal(TerminalType.Assign, /^\->$/),
    new Terminal(TerminalType.Int, /^\d+$/),
    new Terminal(TerminalType.Identifier, /^[A-Z]+[A-Z0-9]*$/i),
    new Terminal(TerminalType.Space, /^\s+$/),
    new Terminal(TerminalType.ParenthesisL, /^\($/),
    new Terminal(TerminalType.ParenthesisR, /^\)$/),
    new Terminal(TerminalType.CurlyL, /^\{$/),
    new Terminal(TerminalType.CurlyR, /^\}$/),
    new Terminal(TerminalType.Semicolon, /^;$/),
    new Terminal(TerminalType.NewLine, /^\r?\n$/),
    new Terminal(TerminalType.Comma, /^\,$/),
  ];

  static extractLexemes(raw: string): Lexeme[] {
    let lexemes: Lexeme[] = [];

    while (raw.charAt(0) != '$') {
      const lexeme = this.extractNextLexeme(raw);
      lexemes.push(lexeme);
      raw = raw.substr(lexeme.value.length);
    }

    return lexemes;
  }

  static extractNextLexeme(text: string): Lexeme {
    let buffer = text.charAt(0);

    if (!this.matchesAnyTerminal(buffer))
      throw Error('Unexpected symbol: "' + buffer + '" ' + buffer.length);

    while (this.matchesAnyTerminal(buffer) && buffer.length != text.length) {
      buffer += text.charAt(buffer.length);
    }

    buffer = buffer.substr(0, buffer.length - 1);

    for (const term of this.TERMINALS) {
      if (term.matches(buffer)) {
        return new Lexeme(term, buffer);
      }
    }

    throw Error('No terminal');
  }

  static matchesAnyTerminal(text: string): boolean {
    for (const terminal of this.TERMINALS) {
      if (terminal.matches(text)) return true;
    }

    return false;
  }
}
import createDynamicEasing, { DynamicEasingNames } from "./createDynamicEasing";
import Keyframe from "./Keyframe";

export type IAnimatedProperties<T extends {}> = {
  [P in keyof T]: T[P] | IPercentageKeyframes<T[P]>;
};

export interface IPercentageKeyframes<TValue> {
  [key: string]: TValue | IKeyframeControls<TValue>;
  from: TValue | IKeyframeControls<TValue>;
  to: TValue | IKeyframeControls<TValue>;
}

export interface IKeyframeControls<TValue> {
  value: TValue;
  controlsIn?: TValue[];
  controlsOut?: TValue[];
  easeIn?: DynamicEasingNames;
  easeOut?: DynamicEasingNames;
}

export default class KeyframesGenerator {
  private transformValue: (value: any) => any = (value) => value;

  setTransformValue(transformValue: (value: any) => any) {
    this


 THAI CHARACTER KO KAI (SA_AL) ÷ [0.3]
× 0023 × 0308 × 0E01 ÷	#  × [0.3] NUMBER SIGN (AL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [28.0] THAI CHARACTER KO KAI (SA_AL) ÷ [0.3]
× 0023 × 0308 × 0020 ÷ 0E01 ÷	#  × [0.3] NUMBER SIGN (AL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] THAI CHARACTER KO KAI (SA_AL) ÷ [0.3]
× 0023 × 3041 ÷	#  × [0.3] NUMBER SIGN (AL) × [21.03] HIRAGANA LETTER SMALL A (CJ_NS) ÷ [0.3]
× 0023 × 0020 ÷ 3041 ÷	#  × [0.3] NUMBER SIGN (AL) × [7.01] SPACE (SP) ÷ [18.0] HIRAGANA LETTER SMALL A (CJ_NS) ÷ [0.3]
× 0023 × 0308 × 3041 ÷	#  × [0.3] NUMBER SIGN (AL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [21.03] HIRAGANA LETTER SMALL A (CJ_NS) ÷ [0.3]
× 0023 × 0308 × 0020 ÷ 3041 ÷	#  × [0.3] NUMBER SIGN (AL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] HIRAGANA LETTER SMALL A (CJ_NS) ÷ [0.3]
× 2014 ÷ 0023 ÷	#  × [0.3] EM DASH (B2) ÷ [999.0] NUMBER SIGN (AL) ÷ [0.3]
× 2014 × 0020 ÷ 0023 ÷	#  × [0.3] EM DASH (B2) × [7.01] SPACE (SP) ÷ [18.0] NUMBER SIGN (AL) ÷ [0.3]
× 2014 × 0308 ÷ 0023 ÷	#  × [0.3] EM DASH (B2) × [9.0] COMBINING DIAERESIS (CM1_CM) ÷ [999.0] NUMBER SIGN (AL) ÷ [0.3]
× 2014 × 0308 × 0020 ÷ 0023 ÷	#  × [0.3] EM DASH (B2) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] NUMBER SIGN (AL) ÷ [0.3]
× 2014 × 2014 ÷	#  × [0.3] EM DASH (B2) × [17.0] EM DASH (B2) ÷ [0.3]
× 2014 × 0020 × 2014 ÷	#  × [0.3] EM DASH (B2) × [7.01] SPACE (SP) × [17.0] EM DASH (B2) ÷ [0.3]
× 2014 × 0308 × 2014 ÷	#  × [0.3] EM DASH (B2) × [9.0] COMBINING DIAERESIS (CM1_CM) × [17.0] EM DASH (B2) ÷ [0.3]
× 2014 × 0308 × 0020 × 2014 ÷	#  × [0.3] EM DASH (B2) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) × [17.0] EM DASH (B2) ÷ [0.3]
× 2014 × 0009 ÷	#  × [0.3] EM DASH (


f("failed to get respone msg for batch")
	}
	if rsp.Count != 2 {
		t.Fatalf("failed to get respone msg for batch count %d", rsp.Count)
	}
	if rsp.Blocks[0].GetHash() != genHash {
		t.Fatalf("failed to get respone msg for batch hash %s", rsp.Blocks[0].GetHash())
	}

	_ = subscriber.UnsubscribeAll()
	povSync.Stop()
}

func TestPovSync_BulkPullRsp1(t *testing.T) {
	teardownTestCase, md := setupPovSyncTestCase(t)
	defer teardownTestCase(t)

	povSync := NewPovSyncer(md.eb, md.ledger, md.chain)
	if povSync == nil {
		t.Fatal("NewPovSyncer is nil")
	}

	povSync.Start()

	peerID1 := TestPeerID1
	povSync.onAddP2PStream(peerID1)

	blk1, td1 := mock.GeneratePovBlock(nil, 0)

	blk2, td2 := mock.GeneratePovBlock(blk1, 0)

	blk3, td3 := mock.GeneratePovBlock(blk2, 0)

	blk4, td4 := mock.GeneratePovBlock(blk3, 0)

	genBlk := md.chain.GenesisBlock()

	peer1Status := new(protos.PovStatus)
	peer1Status.GenesisHash = genBlk.GetHash()
	peer1Status.CurrentHash = blk4.GetHash()
	peer1Status.CurrentHeight = blk4.GetHeight()
	peer1Status.CurrentTD = td4.Chain.Bytes()
	povSync.onPovStatus(peer1Status, peerID1)

	wg := sync.WaitGroup{}
	wg.Add(1)
	var req *protos.PovBulkPullReq
	subscriber := event.NewActorSubscriber(event.Spawn(func(c actor.Context) {
		switch msg := c.Message().(type) {
		case *p2p.EventSendMsgToSingleMsg:
			if msg.Type == p2p.PovBulkPullReq {
				req = msg.Message.(*protos.PovBulkPullReq)
				wg.Done()
			}
		}
	}), md.eb)
	_ = subscriber.Subscribe(topic.EventSendMsgToSingle)

	povSync.onPeriodicSyncTimer()
	wg.Wait()

	if req == nil {
		t.Fatalf("failed to get PovBulkPullReq 1 msg")
	}
	if req.PullType != protos.PovPullTypeForward {
		t.Fatalf("failed to get PovBulkPullReq 1 PullType")
	}
	if req.Reason != protos.PovReasonSync {
		t.Fatalf("failed to get PovBulkPullReq 1 Reason")
	}
	if len(req.Locators) == 0 {
		t.Fatalf("failed to get PovBulkPullReq 1 Locators")
	}

	wg.Add(1)
	var syncBlocks []*types.PovBlock
	_ = subscriber.SubscribeOne(topic.EventPovRecvBlock, event.Spawn(func(c actor.Context) {
		switch msg := c.Message().(type) {
		case *topic.EventPovRecvBlockMsg:
			syncBlocks = append(syncBlocks, msg.Block)
			wg.Done()
		}
	}))

	rsp := new(protos.PovBulkPullRsp)
	rsp.Reason = protos.PovReasonSync
	rsp.Blocks = append(rsp.Blocks, blk1, blk2, blk3, blk4)
	rsp.Count = uint32(len(rsp.Blocks))
	povSync.onPovBulkPullRsp(rsp, peerID1)
	wg.Done()
	povSync.onCheckChainTimer()

	md.chain.InsertBlock(blk1, td1)
	md.chain.InsertBlock(blk2, td2


><tt>-destroyLuaState</tt>

Destroys the Lua environment in the LuaSkin object

<tt>-getValidUTF8AtIndex:</tt>

Returns an NSString for the string at the specified index with invalid UTF8 byte sequences converted to the Unicode Invalid Character code.

WARNING:

This method uses luaL_tolstring so __tostring metamethods will be used if the index does not refer to a string or a number.

<tt>-growStack:withMessage:</tt>

Increases the size of Lua's stack

<tt>-isValidUTF8AtIndex:</tt>

Determines if the string in the lua stack is valid UTF8 or not

WARNING:

This method is used internally to determine if a string should be treated as an NSString or an NSData object.  It is included as a public method because it has uses outside of this as well

WARNING:

This method uses lua_tolstring, which will convert a number on the stack to a string.  As described in the Lua documentation, this will causes problems if you're using lua_next with the same index location

<tt>-logAtLevel:withMessage:</tt>

Log the specified message with at the specified level

<tt>-logBreadcrumb:</tt>

Log the specified message with LS_LOG_BREADCRUMB level

<tt>+logBreadcrumb:</tt>

Log the specified message from any thread with LS_LOG_BREADCRUMB level

<tt>-logDebug:</tt>

Log the specified message with LS_LOG_DEBUG level

<tt>+logDebug:</tt>

Log the specified message from any thread with LS_LOG_DEBUG level

<tt>-logError:</tt>

Log the specified message with LS_LOG_ERROR level

<tt>


/IwQzsJ00RFiXVs6OB6Kbb9ous7YrEB2xMDuksTuR+DGv+mntLzK/ePQuLX/xLXVQ6B01C3m5vdlAeD1IuMl/ifoEHmVb" +
                    "uNDdQeVRgSJvmY054N9q4dthM7Ao2vkh1PTu0L1AUTLtjwCK4jyP2jajMU2YefcH7X5n8MZaA1Sj6zMDE6M+pK0qSaiJBNQdR" +
                    "im/8kMpYCHIGikNOhen+LQxsa1u2tVQvA7eXrn1uLxD/q6qgb0GhF5XRIG2EULkAczDG3ji1yjGD/znTTko0QzBaJ9GK6/20N" +
                    "jzX33n37U+op+yE+oQfXS1rMQB0xbx2nTgU6D0Uk6tiO3wvaQPiYxkUOLTPrThhbYUSt5rgN0RdinX7/OpzWesNaEUPqasyAl" +
                    "+5XYA9r9E2o1Av2lUtahOUcLeD6qKOCEgF1A7Mq2kmHzbyKbeUgN59whHmFzNJzgTNacbm6UtCQnAJFuuAIZifMgtjGNQJUkh" +
                    "j7lBybwjsXXpDUDdL6MykpOEBQqQNzFCajTDEBml0BjfjIm+tnrCLCKShYsem9+sBn2YQXVdVuEJzPavO2GVzWyQTbO5fSp8o" +
                    "hvFK9nAUHcCHFyEdMvRMqdNYF7gGLSUhzrggquvEA1RB3ZfEfWnCuEebGhdDv1cxY8DBRda0LnDNOjE0uh0JrMXPBnn7lo9Ob" +
                    "3Cf2bLx2z205CZctuni1nQuyrMxVElry6sUhFXFO+VnbnGmdu7kw9q1w+zDdAcP5duIV65cKgqKdXE1Dz0ZN6GjIIK5OGtR3O" +
                    "ty91CFeLhMXxMSKGhXm05iSJ05AGz313eb9bMwtIMO8esRJ6Zme2Sq+l4="
        )

        val ecInfo = EncryptedPrivateKeyInfo.getInstance(vec)

        val sk = PKCS8EncryptedPrivateKey(ecInfo)
        assertTrue(sk.isPBEBased)

        val dc = sk.privateKey(
            sk.pbkdf?.symmetricKey("hello".toCharArray()) ?: throw IllegalStateException("no key"),
                KeyType.DECRYPTION
        )

        val pkInfo = PrivateKeyInfo.getInstance(dc.encoding)
        val k = RSAPrivateKey.getInstance(pkInfo.parsePrivateKey())
        assertEquals(modulus, k.modulus)
    }

    @Test
    fun testScryptGeneratedFromBCAPI() {

        val vector = Base64.decode(
            """
                MIIBDDBhBgkqhkiG9w0BBQ0wVDAuBgkrBgEEAdpHBAswIQQUBXpll8qESwrB7nVJgzZNaeuZmI0CAxAAAAIBCAIBATAiBglghk
                gBZQMEAS4wFQQQxDteTxEPhVPFjDVfgHaXZQIBEASBpnmculAlqwVyTuM6Grim3LNAkXd0XCrhY9OHuINgv3uuivymyVssM6dS
                Q/BnPka0Dd8iuhSffuFnsS7x5yI2UqTdx7Bvi9fqz9gljVa7h9QIlItiOk8VKjBuN6oERyy62Y5hr2JFZbzrQDjtWNB5LCCvzY
                as34IR9vY3PtB9LbVT4EtzN0sJZ44Z9/1VksnlK+Zs5Is/d2UbRvwFnDCi2Yj/3V4NYBI=
            """.trimIndent()
        )

        val ecInfo = EncryptedPrivateKeyInfo.getInstance(vector)


ro; return 0.  */
	l.ori		r11, r0, 0	/* initial quotient */
	l.bf		9f
	 l.ori		r12, r3, 0	/* initial remainder */

	/* Given X/Y, shift Y left until Y >= X.  */
	l.ori		r6, r0, 1	/* mask = 1 */
1:	l.sflts		r4, r0		/* y has msb set */
	l.bf		2f
	 l.sfltu	r4, r12		/* y < x */
	l.add		r4, r4, r4	/* y <<= 1 */
	l.bf		1b
	 l.add		r6, r6, r6	/* mask <<= 1 */

	/* Shift Y back to the right again, subtracting from X.  */
2:	l.add		r7, r11, r6	/* tmp1 = quot + mask */
3:	l.srli		r6, r6, 1	/* mask >>= 1 */
	l.sub		r8, r12, r4	/* tmp2 = x - y */
	l.sfleu		r4, r12		/* y <= x */
	l.srli		r4, r4, 1	/* y >>= 1 */
#if defined(__or1k_cmov__)
	l.cmov		r11, r7, r11	/* if (y <= x) quot = tmp1 */
	l.cmov		r12, r8, r12	/* if (y <= x) x = tmp2 */
#else
	l.bnf		4f
	 l.nop
	l.ori		r11, r7, 0
	l.ori		r12, r8, 0
4:
#endif
	l.sfne		r6, r0		/* loop until mask == 0 */
	l.bf		3b
	 l.add		r7, r11, r6	/* delay fill from loop start */

9:	l.jr		r9
	 l.nop

	.size	__udivsi3, . - __udivsi3
	.size	__udivmodsi3_internal, . - __udivmodsi3_internal
#endif

#ifdef L__umodsi3
	.balign	4
	.global	__umodsi3
	.type	__umodsi3, @function
	.cfi_startproc
__umodsi3:
	/* Know that __udivmodsi3_internal does not clobber r13.  */
	l.ori		r13, r9, 0
	.cfi_register	9, 13
	l.jal		__udivmodsi3_internal
	 l.nop
	l.jr		r13		/* return to saved lr */
	 l.ori		r11, r12, 0	/* move remainder to rv */

	.cfi_endproc
	.size	__umodsi3, . - __umodsi3
#endif

/* For signed division we do:

     -x / y = x / -y = -(x / y)
     -x % y = -(x % y)
      x % -y = x % y

   which has the property that (x/y)*y + (x%y) = x.  */

#ifdef L__divsi3
	.balign	4
	.global	__divsi3
	.type	__divsi3, @function
	.cfi_startproc
__divsi3:
	l.xor		r6, r3, r4	/* need result negate?  */

	l.sflts		r3, r0		/* abs(x) */
#if defined(__or1k_cmov__)
	l.sub		r5, r0, r3
	l.cmov		r3, r5, r3
#else
	l.bnf		1f
	 l.sub		r5, r0, r3
	l.ori		r3, r5, 0
1:
#endif
	l.sflts		r4, r0		/* abs(y) */
#if defined(__or1k_cmov__)
	l.sub		r5, r0, r4
	l.cmov		r4, r5, r4
#else
	l.bnf		2f
	 l.sub		r5, r0, r4
	l.ori		r4, r5, 0
2:
#endif

	/* If the result will not require sign flip, tail call.  */
	l.sflts		r6, r0
	l.bnf		__udivmodsi3_internal
	 l.ori		r13,


TypeReference> typeArguments = new List<TypeReference>(1);
				if (typeref != null) typeArguments.Add(typeref);
				typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true };

			}
		} else SynErr(254);
	}

	void EnumBody(
#line  637 "VBNET.ATG"
TypeDeclaration newType) {

#line  638 "VBNET.ATG"
		FieldDeclaration f;
		while (la.kind == 1 || la.kind == 21) {
			EndOfStmt();
		}
		while (StartOf(13)) {
			EnumMemberDecl(
#line  641 "VBNET.ATG"
out f);

#line  643 "VBNET.ATG"
			AddChild(f);

			while (la.kind == 1 || la.kind == 21) {
				EndOfStmt();
			}
		}
		Expect(113);
		Expect(115);

#line  647 "VBNET.ATG"
		newType.EndLocation = t.EndLocation;
		EndOfStmt();
	}

	void InterfaceBase(
#line  1602 "VBNET.ATG"
out List<TypeReference> bases) {

#line  1604 "VBNET.ATG"
		TypeReference type;
		bases = new List<TypeReference>();

		Expect(140);
		TypeName(
#line  1608 "VBNET.ATG"
out type);

#line  1608 "VBNET.ATG"
		if (type != null) bases.Add(type);
		while (la.kind == 22) {
			lexer.NextToken();
			TypeName(
#line  1611 "VBNET.ATG"
out type);

#line  1611 "VBNET.ATG"
			if (type != null) bases.Add(type);
		}
		EndOfStmt();
	}

	void InterfaceBody(
#line  651 "VBNET.ATG"
TypeDeclaration newType) {
		while (la.kind == 1 || la.kind == 21) {
			EndOfStmt();
		}
		while (StartOf(14)) {
			InterfaceMemberDecl();
			while (la.kind == 1 || la.kind == 21) {
				EndOfStmt();
			}
		}
		Expect(113);
		Expect(142);

#line  657 "VBNET.ATG"
		newType.EndLocation = t.EndLocation;
		EndOfStmt();
	}

	void FormalParameterList(
#line  2933 "VBNET.ATG"
List<ParameterDeclarationExpression> parameter) {

#line  2934 "VBNET.ATG"
		ParameterDeclarationExpression p;
		FormalParameter(
#line  2936 "VBNET.ATG"
out p);

#line  2936 "VBNET.ATG"
		if (p != null) parameter.Add(p);
		while (la.kind == 22) {
			lexer.NextToken();
			FormalParameter(
#line  2938 "VBNET.ATG"
out p);

#line  2938 "VBNET.ATG"
			if (p != null) parameter.Add(p);
		}
	}

	void MemberModifier(
#line  3714 "VBNET.ATG"
ModifierList m) {
		switch (la.kind) {
		case 156: {
			lexer.NextToken();

#line  3715 "VBNET.ATG"
			m.Add(Modifiers.Abstract, t.Location);
			break;
		}
		case 102: {
			lexer.NextToken();

#line  3716 "VBNET.ATG"
			m.Add(Modifiers.Default, t.Location);
			break;
		}
		case 125: {
			lexer.NextToken();

#line  3717 "VBNET.ATG"
			m.Add(Modifiers.Internal, t.Location);
			bre


   VBREAK+1
        rts

.endproc

; Reset the break vector
.proc   _reset_brk

        lda     oldvec
        ldx     oldvec+1
        beq     @L9             ; Jump if vector not installed
        sta     VBREAK
        stx     VBREAK+1
        lda     #$00
        sta     oldvec          ; Clear the old vector
        stx     oldvec+1
@L9:    rts

.endproc

; Break handler, called if a break occurs

.proc   brk_handler

        sty     _brk_y
        stx     _brk_x
        pla
        sta     _brk_a
        pla
        and     #$EF            ; Clear break bit
        sta     _brk_sr
        pla                     ; PC low
        sec
        sbc     #2              ; Point to start of brk
        sta     _brk_pc
        pla                     ; PC high
        sbc     #0
        sta     _brk_pc+1

        jsr     uservec         ; Call the user's routine

        lda     _brk_pc+1
        pha
        lda     _brk_pc
        pha
        lda     _brk_sr
        pha
        ldx     _brk_x
        ldy     _brk_y
        lda     _brk_a
        rti                     ; Jump back...

.endproc


  if (offset < -128 || offset > 127)
    InterceptionFailed();
  *(u8*)from = 0xEB;
  *(u8*)(from + 1) = (u8)offset;
}

#if SANITIZER_WINDOWS64
static void WriteIndirectJumpInstruction(uptr from, uptr indirect_target) {
  // jmp [rip + <offset>] = FF 25 <offset> where <offset> is a relative
  // offset.
  // The offset is the distance from then end of the jump instruction to the
  // memory location containing the targeted address. The displacement is still
  // 32-bit in x64, so indirect_target must be located within +/- 2GB range.
  int offset = indirect_target - from - kIndirectJumpInstructionLength;
  if (!DistanceIsWithin2Gig(from + kIndirectJumpInstructionLength,
                            indirect_target)) {
    InterceptionFailed();
  }
  *(u16*)from = 0x25FF;
  *(u32*)(from + 2) = offset;
}
#endif

static void WriteBranch(
    uptr from, uptr indirect_target, uptr target) {
#if SANITIZER_WINDOWS64
  WriteIndirectJumpInstruction(from, indirect_target);
  *(u64*)indirect_target = target;
#else
  (void)indirect_target;
  WriteJumpInstruction(from, target);
#endif
}

static void WriteDirectBranch(uptr from, uptr target) {
#if SANITIZER_WINDOWS64
  // Emit an indirect jump through immediately following bytes:
  //   jmp [rip + kBranchLength]
  //   .quad <target>
  WriteBranch(from, from + kBranchLength, target);
#else
  WriteJumpInstruction(from, target);
#endif
}

struct TrampolineMemoryRegion {
  uptr content;
  uptr allocated_size;
  uptr max_size;
};

static const uptr kTrampolineScanLimitRange = 1 << 31;  // 2 gig
static const int kMaxTrampolineRegion = 1024;
static TrampolineMemoryRegion TrampolineRegions[kMaxTrampolineRegion];

static void *AllocateTrampolineRegion(uptr image_address, size_t granularity) {
#if SANITIZER_WINDOWS64
  uptr address = image_address;
  uptr scanned = 0;
  while (scanned < kTrampolineScanLimitRange) {
    MEMORY_BASIC_INFORMATION info;
    if (!::VirtualQuery((void*)address, &info, sizeof(info)))
      return nullptr;

    // Check whether a region can be allocated at |address|.
    if (info.State == MEM_FREE && info.RegionSize >= granularity) {
      void *page = ::VirtualAlloc((void*)RoundUpTo(address, granularity),
                                  granularity,
                                  MEM_RESERVE | MEM_COMMIT,
                                  PAGE_EXECUTE_READWRITE);
      return page;
    }

    // Move to the next region.
    address = (uptr)info.BaseAddress + info.RegionSize;
    scanned += info.RegionSize;
  }
  return nullptr;
#else
  return ::VirtualAlloc(nullptr,
                        granularity,
                        MEM_RESERVE | MEM_COMMIT,
                        PAGE_EXECUTE_READWRITE);
#endif
}

// Used by unittests to release mapped memory space.
void TestOnlyReleaseTrampolineRegions() {
  for (size_t bucket = 0; bucket < kMaxTrampolineRegion; ++bucket) {
    TrampolineMemoryRegion *current = &TrampolineRegions[bucket];
    if (current->content == 0)
      return;
    ::VirtualFree((void*)current->content, 0, MEM_RELE


(doIt0));

                return;
                break;
            }
        }
    }

    //In case wrong type/count of parameters was passed
    if(!already_called)
    {
        zend_error(
            E_ERROR,
            "Wrong type or count of parameters passed to "
            "wxHandleFatalExceptions()\n"
        );
    }
}
/* }}} */

/* {{{ proto bool wxInitialize()
   Initialize the library (may be called as many times as needed,
   but each call to wxInitialize() must be matched by
   wxUninitialize()). */
PHP_FUNCTION(php_wxInitialize)
{
    wxInitAllImageHandlers();
    RETVAL_BOOL(wxInitialize());
}
/* }}} */

/* {{{ proto  wxUninitialize()
   This function is for use in console (wxBase) programs only. */
PHP_FUNCTION(php_wxUninitialize)
{
    #ifdef USE_WXPHP_DEBUG
    php_printf("Invoking function wxUninitialize\n");
    php_printf("===========================================\n");
    #endif

    void* argument_native_object = NULL;

    //Variables used thru the code
    int arguments_received = ZEND_NUM_ARGS();
    zval dummy;
    ZVAL_NULL(&dummy);
    bool already_called = false;
    bool return_is_user_initialized = false;

    //Parameters for overload 0
    bool overload0_called = false;

    //Parameters for overload 1
    bool overload1_called = false;

    //Overload 0
    overload0:
    if(!already_called && arguments_received == 0)
    {
        #ifdef USE_WXPHP_DEBUG
        php_printf("Parameters received %d\n", arguments_received);
        php_printf("Parsing parameters with '' ()\n");
        #endif

        overload0_called = true;
        already_called = true;
    }

    //Overload 1
    overload1:
    if(!already_called && arguments_received == 0)
    {
        #ifdef USE_WXPHP_DEBUG
        php_printf("Parameters received %d\n", arguments_received);
        php_printf("Parsing parameters with '' ()\n");
        #endif

        overload1_called = true;
        already_called = true;
    }

    if(overload0_called)
    {
        switch(arguments_received)
        {
            case 0:
            {
                #ifdef USE_WXPHP_DEBUG
                php_printf("Executing ::wxUninitialize()\n\n");
                #endif

                wxUninitialize();

                return;
                break;
            }
        }
    }

    if(overload1_called)
    {
        switch(arguments_received)
        {
            case 0:
            {
                #ifdef USE_WXPHP_DEBUG
                php_printf("Executing ::wxUninitialize()\n\n");
                #endif

                wxUninitialize();

                return;
                break;
            }
        }
    }

    //In case wrong type/count of parameters was passed
    if(!already_called)
    {
        zend_error(
            E_ERROR,
            "Wrong type or count of parameters passed to "
            "wxUninitialize()\n"
        );
    }
}
/* }}} */

/* {{{ proto  wxWakeUpIdle()
   This function wakes up the (internal and platform dependent) idle system, i.e. */
PHP_FUNCTION(php_wxWakeUpIdle)
{
    #ifdef USE_WXPHP_DEBUG
    php_printf("Invoking function wxWakeUpIdle\n");
    php_printf("===========================================\n");
    #endif

    void* argument_native_object = NULL;

    //Variables used thru the code
    int arguments_received = ZEND_NUM_ARGS();
    zval dummy;
    ZVAL_NULL(&dummy);
    bool already_called = false;
    bool return


ies) {
                            cemetery.zombieNumber = zombiesInCemeteries[cemetery.id];
                            this.cemeteries.push(cemetery);
                        }

                        resolve(this.cemeteries);
                    });
                });
            });
        }

        return new Promise<Cemetery[]>(resolve => resolve(this.cemeteries));
    }

    getCemeteryById(id: string):Cemetery {
        for (let cemetery of this.cemeteries) {
            if (cemetery.id === id) {
                return cemetery;
            }
        }
    }

    getZombies():Promise<DeadMan[]> {
        if (this.zombies.length === 0) {
            return new Promise<DeadMan[]>(resolve => {
                this.http.get('data/zombies.json').map(res => DeadMan.convertArray(res.json())).subscribe(zombies => {
                    this.zombies = zombies;
                    resolve(this.zombies);
                });
            });
        }

        return new Promise<DeadMan[]>(resolve => resolve(this.zombies));
    }

    getZombiesByCemeteryId(cemeteryId: string):Array<DeadMan> {
        var cemeteryZombies = [];
        for (let zombie of this.zombies) {
            if (zombie.cemeteryId === cemeteryId) {
                cemeteryZombies.push(zombie);
            }
        }

        return cemeteryZombies;
    }

    getZombieById(id: string):DeadMan {
        for (let zombie of this.zombies) {
            if (zombie.id === id) {
                return zombie;
            }
        }
    }
}import { SearchResponseJson, UserJson } from './search-response.json';

export class SearchResponse {
  total!: number;
  items!: User[];

  static from(searchResponseJson: SearchResponseJson): SearchResponse {
    const response = new SearchResponse();

    response.total = searchResponseJson.total_count;
    response.items = searchResponseJson.items.map(userJson => User.from(userJson));

    return response;
  }
}

export class User {
  username!: string;
  avatarUrl!: string;
  url!: string;

  static from(userJson: UserJson): User {
    const user = new User();

    user.username = userJson.login;
    user.avatarUrl = userJson.avatar_url;
    user.url = userJson.html_url;

    return user;
  }
}
import { ResponsiveValue, SystemProps } from '@chakra-ui/vue-system'
import { mapResponsive } from '@chakra-ui/utils'

export type StackDirection = ResponsiveValue<
  'row' | 'column' | 'row-reverse' | 'column-reverse'
>

/**
 * If we ever run into SSR issues with this, check this post to find a fix for it:
 * @see https://medium.com/@emmenko/patching-lobotomized-owl-selector-for-emotion-ssr-5a582a3c424c
 */
export const selector = '& > *:not(style) ~ *:not(style)'

interface Options {
  spacing: SystemProps['margin']
  direction: StackDirection
}

export function getStackStyles(options: Options) {
  const { spacing, direction } = options

  const directionStyles = {
    column: {
      marginTop: spacing,
      marginEnd: 0,
      marginBottom: 0,
      marginStart: 0,
    },
    row: { marginTop: 0, marginEnd: 0, marginBottom: 0, marginStart: spacing },
    'column-reverse': {
      marginTop: 0,
      marginEnd: 0,
      marginBottom: spacing,
      marginStart: 0,
    },
    'row-reverse': {
      marginTop: 0,
      marginEnd: spacing,
      marginBottom: 0,
      ma


;
     }
})
#endif

#if !defined(__aarch64__) && defined(__GNUC__) && __GNUC__ == 4 &&  __GNUC_MINOR__ < 6 && !defined(__clang__)
CVT_FUNC(s16, u8, 16,
,
{
     for (size_t i = 0; i < w; i += 16)
     {
         internal::prefetch(_src + i);
         __asm__ (
             "vld1.8 {d0-d1}, [%[src1]]                             \n\t"
             "vld1.8 {d2-d3}, [%[src2]]                             \n\t"
             "vqmovun.s16 d4, q0                                    \n\t"
             "vqmovun.s16 d5, q1                                    \n\t"
             "vst1.8 {d4-d5}, [%[dst]]                              \n\t"
             : /*no output*/
             : [src1] "r" (_src + i),
               [src2] "r" (_src + i + 8),
               [dst] "r" (_dst + i + 0)
             : "d0","d1","d2","d3","d4","d5"
         );
     }
})
#else
CVT_FUNC(s16, u8, 16,
,
{
     for (size_t i = 0; i < w; i += 16)
     {
         internal::prefetch(_src + i);
         int16x8_t vline1_s16 = vld1q_s16(_src + i);
         int16x8_t vline2_s16 = vld1q_s16(_src + i + 8);

         uint8x8_t vline1_u8 = vqmovun_s16(vline1_s16);
         uint8x8_t vline2_u8 = vqmovun_s16(vline2_s16);

         vst1q_u8(_dst + i, vcombine_u8(vline1_u8, vline2_u8));
     }
})
#endif

#if !defined(__aarch64__) && defined(__GNUC__) && __GNUC__ == 4 &&  __GNUC_MINOR__ < 6 && !defined(__clang__)
CVT_FUNC(s16, s8, 16,
,
{
     for (size_t i = 0; i < w; i += 16)
     {
         internal::prefetch(_src + i);
         __asm__ (
             "vld1.8 {d0-d1}, [%[src1]]                             \n\t"
             "vld1.8 {d2-d3}, [%[src2]]                             \n\t"
             "vqmovn.s16 d4, q0                                     \n\t"
             "vqmovn.s16 d5, q1                                     \n\t"
             "vst1.8 {d4-d5}, [%[dst]]                              \n\t"
             : /*no output*/
             : [src1] "r" (_src + i),
               [src2] "r" (_src + i + 8),
               [dst] "r" (_dst + i + 0)
             : "d0","d1","d2","d3","d4","d5"
         );
     }
})
#else
CVT_FUNC(s16, s8, 16,
,
{
     for (size_t i = 0; i < w; i += 16)
     {
         internal::prefetch(_src + i);
         int16x8_t vline1_s16 = vld1q_s16(_src + i);
         int16x8_t vline2_s16 = vld1q_s16(_src + i + 8);

         int8x8_t vline1_s8 = vqmovn_s16(vline1_s16);
         int8x8_t vline2_s8


ases[i].group_size);

      /* Clamp to minimum encodable */
      if (group_cases[i].value == 0)
         expected = group_cases[i].group_size;

      ASSERT_EQ(
         __gen_from_groups(group_cases[i].encoded, group_cases[i].group_size,
                           group_cases[i].length),
         expected);
   }
}
/*
 * Copyright © 2014 Intel Corporation
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#include "ir.h"
#include "ir_visitor.h"
#include "ir_optimization.h"
#include "linker_util.h"

/**
 * Pre-linking, optimize unused built-in variables
 *
 * Uniforms, constants, system values, inputs (vertex shader only), and
 * outputs (fragment shader only) that are not used can be removed.
 */
void
optimize_dead_builtin_variables(exec_list *instructions,
                                enum ir_variable_mode other)
{
   foreach_in_list_safe(ir_instruction, inst, instructions) {
      ir_variable *var = inst->as_variable();
      if (!var || var->data.used)
         continue;

      if (var->data.mode != ir_var_uniform
          && var->data.mode != ir_var_auto
          && var->data.mode != ir_var_system_value
          && var->data.mode != other)
         continue;

      /* So that linker rules can later be enforced, we cannot elimate
       * variables that were redeclared in the shader code.
       */
      if ((var->data.mode == other || var->data.mode == ir_var_system_value)
          && var->data.how_declared != ir_var_declared_implicitly)
         continue;

      if (!is_gl_identifier(var->name))
         continue;

      /* gl_ModelViewProjectionMatrix and gl_Vertex are special because they
       * are used by ftransform.  No other built-in variable is used by a
       * built-in function.  The forward declarations of these variables in
       * the built-in function shader does not have the "state slot"
       * information, so removing these variables from the user shader will
       * cause problems later.
       *
       * Matrix uniforms with "Transpose" are not eliminated because there's
       * an optimization pass that can turn references to the regular matrix


expected a right bracket, found a newline at line 1 column 13".into(),
               }));
}
extern crate nalgebra as na;

mod bessel;
mod focal_point;
/// Producing multiple foci
pub mod multiple_foci;
mod traits;

use acoustic_field_calculator::prelude::*;

pub use bessel::BesselBeam;
pub use focal_point::FocalPoint;
pub use traits::Optimizer;

use na::{ComplexField, Dynamic, Matrix, Normed, VecStorage, U1};

type MatrixXcf = Matrix<Complex, Dynamic, Dynamic, VecStorage<Complex, Dynamic, Dynamic>>;
type MatrixXf = Matrix<Float, Dynamic, Dynamic, VecStorage<Float, Dynamic, Dynamic>>;
type VectorXcf = Matrix<Complex, Dynamic, U1, VecStorage<Complex, Dynamic, U1>>;
type VectorXf = Matrix<Float, Dynamic, U1, VecStorage<Float, Dynamic, U1>>;
<reponame>ThuriyaThwin/Wumpus
aima.core.probability.domain.BooleanDomain
<reponame>AltEctroFlame/dash-rs<filename>src/model/comment/mod.rs
pub mod level;
pub mod profile;
use bevy::prelude::*;
use bevy_ascii_terminal::{*, ui::*};

use crate::{UI_SIZE, VIEWPORT_SIZE, events::AttackEvent, combat::{HitPoints, MaxHitPoints}, player::Player};
use bevy_easings::Lerp;

pub struct UiPlugin;

#[derive(Component)]
pub struct UiTerminal;

/// Log for terminal messages to be displayed to the user.
#[derive(Default)]
pub struct PrintLog {
    /// History of logged messages
    log: Vec<String>,
}

impl PrintLog {
    pub fn push(&mut self, message: String) {
        self.log.push(message);
    }
}

impl Plugin for UiPlugin {
    fn build(&self, app: &mut App) {
        app.add_startup_system(setup)
        .add_system(handle_attacks)
        .add_system(handle_print)
        .init_resource::<PrintLog>()
        ;
    }
}

fn setup(
    mut commands: Commands,
) {
    let term_y = -(VIEWPORT_SIZE[1] as f32 / 2.0) + UI_SIZE[1] as f32 / 2.0;
    let mut term = TerminalBundle {
        transform: Transform::from_xyz(0.0, term_y, 1.0),
        ..TerminalBundle::new().with_size(UI_SIZE)
    };

    term.terminal.draw_border(BorderGlyphs::single_line());

    commands.spawn_bundle(term).insert(UiTerminal);
}

fn handle_attacks(
    _print_log: ResMut<PrintLog>,
    mut event_attacked: EventReader<AttackEvent>,
) {
    for _ev in event_attacked.iter() {
        //print_log.push(format!("{} attacked {}", ev.attacker_name, ev.defender_name));
    }
}

fn handle_print(
    mut print_log: ResMut<PrintLog>,
    mut q_term: Query<&mut Terminal, With<UiTerminal>>,
    q_player: Query<(&HitPoints, &MaxHitPoints), With<Player>>,
) {
    if print_log.is_changed() {
        let len = print_log.log.len();
        if len > 6 {
            print_log.log.drain(0..len - 6);
        }
        let mut term = q_term.single_mut();

        term.clear();
        let border = BorderGlyphs::from_string(
            "╞═╡
             │ │
             └─┘"
        );
        term.draw_border(border);
        for (i,text) in print_log.log.iter().rev().enumerate().take(6) {
            let (t, min,max) = (i as f32 / 6.0, 0.15, 1.0);


zzically. 'What progress?  You've done nothing.  There is much work to do if we hope to rid this place of Miragul's abominations and none of it will be accomplished by standing around here.'")
    else
      eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Durgin Skell says, 'Progress, hmm?  Let me see...'")
      if skeletons_complete then
        eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Ah, you found a way to put the chromatic skeletons to permanent rest.  Your ingenuity never ceases to amaze me.")
      end
      if bone_golem_complete then
        eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "From the bits of dust and bone on your armor I can tell you have successfully handled Miragul's splintering bone golem.")
      end
      if sludge_complete then
        eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Well now... I see you have destroyed the splitting sludge.  Quite an annoying pest, isn't it?")
      end
      if sharalla_complete then
        eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "So you fended off those wild animals and protected the body of Sharalla.  I can't possibly express how much that means to me.  Thank you.")
      end
      if sharalla_failed then
        eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "Your failure to protect the body of my beloved Sharalla is disconcerting.  I'm sure you tried your best, but in this case it wasn't good enough.")
      end
      if laskuth_complete then
        eq.get_entity_list():MessageClose(e.self, true, 100, MT.SayEcho, "I heard the unmistakable sound of that behemoth crashing to the ground all the way from here.  Fantastic job.  A most commendable effort!")
      end
    end
  elseif e.message:findi("lirprin sent me") and laskuth_complete then
    local qglobals = eq.get_qglobals(e.other)
    if qglobals["Fatestealer"] == "3" then
      e.self:Say(("There's no need to mince words %s. I have no quarrel with Lirprin, but unfortunately the reverse is not also true. The man is undoubtedly angry with me. He will never forgive me for courting Sharalla and does not realize that it was her choice. She loved me, and not him. His paranoia and overbearing attitude, and eventually the outright abuse of his leadership position merely pushed her away. Now that she has fallen in the valiant service of the Brotherhood there is no further need for his insecurity."):format(e.other:GetCleanName()))
      eq.set_global("rogue_epic_durgin", "1", 5, "F")
      e.other:Message(MT.Red, "You have confirmed Durgin's innocence.")

      if qglobals["rogue_chest_mira"] == nil then
        eq.set_global("rogue_chest_mira", "1", 5, "F")
        eq.spawn2(893, 0, 0, e.self:GetX(), e.self:GetY(), e.self:GetZ(), e.self:GetHeading()) -- a_chest
      end
    end
  end
end


box' class='role-test listbox-test object-test' id='object-listbox-2-test' aria-label='acc name' tabindex='0' ></obje

Attributes for element object:

Global attributes

data — Address of the resource

type — Type of embedded resource

name — Name of nested browsing context

usemap — Name of image map to use

form — Associates the element with a form element

width — Horizontal dimension

height — Vertical dimension

Error: Bad value menu for attribute role on element object.

From line 331, column 9; to line 331, column 128

>↩        <object role='menu' class='role-test menu-test object-test' id='object-menu-3-test' aria-label='acc name' tabindex='0' ></obje

Error: Element object is missing one or more of the following attributes: data, type.

From line 331, column <span class=


		{
			int length = rules.Length;
			for(int i = 0; i < length; i++)
			{
				CharacterRule rule = rules[i];
				if(rule.AreConditionsMet(ch, text, textLength, pos, selectionStartPosition))
				{
					return ExecuteAction(ch, rule.action, rule.actionIntValue);
				}
			}

			return ExecuteAction(ch, otherCharacterAction, otherCharacterActionIntValue);
		}

		private char ExecuteAction(char ch, CharacterAction action, int actionValue)
		{
			switch(action)
			{
				case CharacterAction.ALLOW: return ch;
				case CharacterAction.BLOCK: return (char)0;
				case CharacterAction.TO_LOWERCASE:
					if(char.IsLower(ch)) { return ch; }
					else { return char.ToLower(ch); }
				case CharacterAction.TO_UPPERCASE:
					if(char.IsUpper(ch)) { return ch; }
					else { return char.ToUpper(ch); }
				case CharacterAction.REPLACE: return (char)actionValue;
			}

			return ch;
		}
	}
}


Work() calling checkFunc(): " + checkFunc());

        MyInterface1 if1 = (MyInterface1) this;
        // checkFunc() is called via invokeinterface here; this call will
        // use the first itable entry
        System.out.println("In doWork() calling if1.checkFunc(): " + if1.checkFunc());

        MyInterface2 if2 = (MyInterface2) this;
        // checkFunc() is called via invokeinterface here; this call will
        // use the second itable entry
        System.out.println("In doWork() calling if2.checkFunc(): " + if2.checkFunc());
    }
}

public class RedefineAbstractClass extends JdbTest {
    public static void main(String argv[]) {
        new RedefineAbstractClass().run();
    }

    private RedefineAbstractClass() {
        super(DEBUGGEE_CLASS, SOURCE_FILE);
    }

    private static final String DEBUGGEE_CLASS = RedefineAbstractClassTarg.class.getName();
    private static final String SOURCE_FILE = "RedefineAbstractClass.java";
    private static final String ABSTRACT_CLASS = "MyAbstractClass";

    @Override
    protected void runCases() {
        setBreakpoints(1);
        setBreakpoints(2);
        jdb.command(JdbCommand.run());

        // modified version of redefineClass function
        String transformedClassFile = ClassTransformer.fromTestSource(SOURCE_FILE)
                .transform(1, ABSTRACT_CLASS, "-g");
        jdb.command(JdbCommand.redefine(ABSTRACT_CLASS, transformedClassFile));
        // end modified version of redefineClass function

        // this will continue to the second breakpoint
        jdb.command(JdbCommand.cont());

        new OutputAnalyzer(getDebuggeeOutput())
                .shouldContain("This is call 4 to checkFunc")
                .shouldContain("This is call 5 to checkFunc")
                .shouldContain("This is call 6 to checkFunc");
    }
}
/*
 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @bug 8149743
 * @summary crash when adding a breakpoint after redefining to add a private static method
 * @comment converted from test/jdk/com/sun/jdi/RedefineAddPrivateMethod.sh
 *
 * @library /test/lib
 * @compile -g RedefineAddPrivateMethod.java
 * @run main/othervm RedefineAddPrivateMethod
 */

import jdk.test.lib.process.OutputAnalyzer;
import lib.jdb.JdbCommand;
import lib.jdb.JdbTest;

class RedefineAddPrivateMethodTarg {
    static public void main(String[] args) {
        System.out.println("@1 breakpoint");
        System.out.println("@2 breakpoint");
    }

    // @1 uncomment private static void test() {}
}

public class RedefineAddPrivateMethod extends JdbTest {
    public static void main(String argv[]) {
        new RedefineAddPrivateMethod().run();
    }

    private RedefineAddPrivateMethod() {
        super(


neBytes is a byte slice representation of the SingleNewLine constant used for line breaking
// in encoding processes.
var newlineBytes = []byte(SingleNewLine)

// base64LineBreaker handles base64 encoding with the insertion of new lines after a certain number
// of characters.
//
// This struct is used to manage base64 encoding while ensuring that new lines are inserted after
// reaching a specific line length. It satisfies the io.WriteCloser interface.
//
// References:
//   - https://datatracker.ietf.org/doc/html/rfc2045 (Base64 and line length limitations)
type base64LineBreaker struct {
	line [MaxBodyLength]byte
	used int
	out  io.Writer
}

// Write writes data to the base64LineBreaker, ensuring lines do not exceed MaxBodyLength.
//
// This method writes the provided data to the base64LineBreaker. It ensures that the written
// lines do not exceed the MaxBodyLength. If the data exceeds the limit, it handles the
// continuation by splitting the data and writing new lines as necessary.
//
// Parameters:
//   - data: A byte slice containing the data to be written.
//
// Returns:
//   - numBytes: The number of bytes written.
//   - err: An error if one occurred during the write operation.
func (l *base64LineBreaker) Write(data []byte) (numBytes int, err error) {
	if l.out == nil {
		err = errors.New("no io.Writer set for base64LineBreaker")
		return numBytes, err
	}
	if l.used+len(data) < MaxBodyLength {
		copy(l.line[l.used:], data)
		l.used += len(data)
		return len(data), nil
	}

	_, err = l.out.Write(l.line[0:l.used])
	if err != nil {
		return numBytes, err
	}
	excess := MaxBodyLength - l.used
	l.used = 0

	numBytes, err = l.out.Write(data[0:excess])
	if err != nil {
		return numBytes, err
	}

	_, err = l.out.Write(newlineBytes)
	if err != nil {
		return numBytes, err
	}

	var n int
	n, err = l.Write(data[excess:]) // recurse
	numBytes += n
	return numBytes, err
}

// Close finalizes the base64LineBreaker, writing any remaining buffered data and appending a newline.
//
// This method ensures that any remaining data in the buffer is written to the output and appends
// a newline. It is used to finalize the base64LineBreaker and should be called when no more data
// is expected to be written.
//
// Returns:
//   - err: An error if one occurred during the final write operation.
func (l *base64LineBreaker) Close() (err error) {
	if l.used > 0 {
		_, err = l.out.Write(l.line[0:l.used])
		if err != nil {
			return err
		}
		_, err = l.out.Write(newlineBytes)
	}

	return err
}
// SPDX-FileCopyrightText: The go-mail Authors
//
// SPDX-License-Identifier: MIT

package mail

import (
	"io"
)

// Reader is a type that implements the io.Reader interface for a Msg.
//
// This struct represents a reader that reads from a byte slice buffer. It keeps track of the
// current read position (offset) and any initialization error. The buffer holds the data to be
// read from the message.
type Reader struct {
	buffer []byte // contents are the bytes buffer[offset : len(buffer)]
	offset int    // read at &buffer[offset], write at &buffer[len(buffer)]
	err    error  // initialization error
}

// Error returns an error if the Reader err field is not nil.
//
// This function checks the Reader's err field and returns it if it is not nil. If no error
// occurred during initialization, it returns nil.
//
// Returns:
//   - The error


iter_concurrent_limit!(n, (0..100).into_par_iter(), method, op)`
   - The `into_par_iter()` iterator must implement `rayon::iter::IndexedParallelIterator`
   - Some iterator methods require the iterator argument to also implement `std::iter::IntoIterator` for fast paths
 - Add fast paths in `iter_concurrent_limit!` if `concurrent_limit` is 1 for methods: `for_each`, `try_for_each`, `any`, `all`
   - These paths do not start additional `rayon` work items

## [0.1.0] - 2024-02-19

### Fixed
 - Remove incorrect panics docs for `iter_subdivide`

## [0.1.0-alpha4] - 2024-02-18

### Changed
 - Minor documentation improvements
 - Add fast paths avoiding chunking for various methods in `iter_concurrent_limit` if `concurrent_limit` is zero

### Fixed
 - Fixed `iter_subdivide` if supplied with an empty iterator
 - Handle `num_chunks` of zero in `iter_subdivide`

## [0.1.0-alpha3] - 2024-02-05

### Changed
 - **Breaking**: rename `chunks_concurrent_limit` to `iter_subdivide`
 - Various documentation improvements

## [0.1.0-alpha2] - 2024-02-04

### Added
 - Add `chunks_concurrent_limit_map` tests
 - Add doc example with equivalent code to macro

### Changed
 - **Breaking**: Swapped the argument order of `iterator` and `concurrent_limit` in `chunks_concurrent_limit`

## [0.1.0-alpha] - 2024-02-04

### Added
 - Initial alpha release for review

[unreleased]: https://github.com/LDeakin/rayon_iter_concurrent_limit/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/LDeakin/rayon_iter_concurrent_limit/releases/tag/v0.2.0
[0.1.0]: https://github.com/LDeakin/rayon_iter_concurrent_limit/releases/tag/v0.1.0
[0.1.0-alpha4]: https://github.com/LDeakin/rayon_iter_concurrent_limit/releases/tag/v0.1.0-alpha4
[0.1.0-alpha3]: https://github.com/LDeakin/rayon_iter_concurrent_limit/releases/tag/v0.1.0-alpha3
[0.1.0-alpha2]: https://github.com/LDeakin/rayon_iter_concurrent_limit/releases/tag/v0.1.0-alpha2
[0.1.0-alpha]: https://github.com/LDeakin/rayon_iter_concurrent_limit/releases/tag/v0.1.0-alpha
# Ski-Resort-Weather

[Link to Application]([http://ski-resort-weather.com](http://ski-resort-weather.com/public/dashboard/6f9e1bf5-a3ac-4764-b298-69a6ecd642bc))

A fully deployed dashboard in AWS that gives live weather updates for ski resorts.

## Tools and Technologies
- Airflow: Orchestration with DAGs
- Metabase: Dashboarding capabilities
- Postgres: local db for storing Airflow and Metabase metadata
- AWS EC2: Linux server that hosts Airflow and Metabase
- AWS RDS: Postgres instance for storing weather data
- Terraform: IaC Tool for deploying AWS resources
- [Openweathermap](https://openweathermap.org/): Data Source for free live weather.

## Setup

### API Credentials:

Go to https://openweathermap.org, make a free account with the [One Call API](https://openweathermap.org/api/one-call-3).

### Setup AWS infrastructure with Terraform:
1.
```
cd terraform
terraform init
terraform plan
terraform apply
```
2. Setup a Security Group for the EC2 instance that allows ssh access, and personal access over ports 3000 and 8080, and full access over port 80 for http requests.
3. Additionally, ensure there


eues the event to be published. Publishing occurs periodically when allowed
        /// by the runtime.
        /// </summary>
        /// <param name="evt">The event to enqueue.</param>
        /// <returns><c>true</c> if the event was successfully queued, <c>false</c> otherwise.</returns>
        public bool Enqueue(SubscriptionEvent evt)
        {
            Validation.ThrowIfNull(evt, nameof(evt));
            return _publishChannel.Writer.TryWrite(evt);
        }

        /// <summary>
        /// Wait until data is ready to be read from the queue.
        /// </summary>
        /// <param name="cancelToken">The cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        /// <returns>A Task<ValueTask> representing the asynchronous operation.</returns>
        public async ValueTask<bool> WaitToDequeueAsync(CancellationToken cancelToken = default)
        {
            return await _publishChannel.Reader.WaitToReadAsync(cancelToken);
        }

        /// <summary>
        /// Attempts to read an event from the queue.
        /// </summary>
        /// <param name="dequeuedEvent">The event that was found and dequeued.</param>
        /// <returns><c>true</c> if an event was read, <c>false</c> otherwise.</returns>
        public bool TryDequeue(out SubscriptionEvent dequeuedEvent)
        {
            return _publishChannel.Reader.TryRead(out dequeuedEvent);
        }
    }
}


Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Interface
org.apache.http.impl.execchain.ClientExecChain

Packages that use ClientExecChain

org.apache.http.impl.client
Default implementations for interfaces in
org.apache.http.client.

org.apache.http.impl.client.cache

This package contains a cache module that can be used for HTTP/1.1
client-side caching.

<A HREF="#org.apache.http.impl.execchai


		tie_breaker = 1.1,
				minimum_should_match = 2,
				@operator = "or",
				fields = new[]
				{
					"description",
					"myOtherField"
				},
				zero_terms_query = "all",
				auto_generate_synonyms_phrase_query = false
			}
		};

		protected override QueryContainer QueryFluent(QueryContainerDescriptor<Project> q) => q
			.MultiMatch(c => c
				.Fields(f => f.Field(p => p.Description).Field("myOtherField"))
				.Query("hello world")
				.Analyzer("standard")
				.Boost(1.1)
				.Slop(2)
				.Fuzziness(Fuzziness.Auto)
				.PrefixLength(2)
				.MaxExpansions(2)
				.Operator(Operator.Or)
				.MinimumShouldMatch(2)
				.FuzzyRewrite(MultiTermQueryRewrite.ConstantScoreBoolean)
				.TieBreaker(1.1)
				.CutoffFrequency(0.001)
				.Lenient()
				.ZeroTermsQuery(ZeroTermsQuery.All)
				.Name("named_query")
				.AutoGenerateSynonymsPhraseQuery(false)
			);
	}

	/**[float]
	 * === Multi match with boost usage
	 */
	public class MultiMatchWithBoostUsageTests : QueryDslUsageTestsBase
	{
		public MultiMatchWithBoostUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

		protected override QueryContainer QueryInitializer => new MultiMatchQuery
		{
			Fields = Field<Project>(p => p.Description, 2.2).And("myOtherField^0.3"),
			Query = "hello world",
		};

		protected override object QueryJson => new
		{
			multi_match = new
			{
				query = "hello world",
				fields = new[]
				{
					"description^2.2",
					"myOtherField^0.3"
				}
			}
		};

		protected override QueryContainer QueryFluent(QueryContainerDescriptor<Project> q) => q
			.MultiMatch(c => c
				.Fields(Field<Project>(p => p.Description, 2.2).And("myOtherField^0.3"))
				.Query("hello world")
			);
	}

	/**[float]
	 * === Multi match with no fields specified
	 *
	 * With OpenSearch it's possible to send a Multi Match query without providing any fields.
	 * When no fields are provided the Multi Match query will use the fields defined in the index setting `index.query.default_field`
	 * (which in turns defaults to `*`).
	 */
	public class MultiMatchWithNoFieldsSpecifiedUsageTests : QueryDslUsageTestsBase
	{
		public MultiMatchWithNoFieldsSpecifiedUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

		protected override QueryContainer QueryInitializer => new MultiMatchQuery
		{
			Query = "hello world",
		};

		protected override object QueryJson => new
		{
			multi_match = new
			{
				query = "hello world"
			}
		};

		protected override QueryContainer QueryFluent(QueryContainerDescriptor<Project> q) => q
			.MultiMatch(c => c
				.Query("hello world")
			);
	}
}


ialize;

#[derive(Serialize, Default)]
struct MacroStdin {
    args:   Vec<Box<ast::Expression>>,
    local:  Option<ast::Local>,
}

pub fn expr(
    name: &Name,
    loc: &ast::Location,
    args: &Vec<Box<ast::Expression>>,
) -> Result<ast::Expression, Error> {

    let cwd = path::Path::new(&loc.file)
        .parent().expect(&format!("macro cwd for {}", loc.file));

    let debug_out = super::project::target_dir()
        .join("macro")
        .join(& name.0[1..].join("_"))
        .join(format!("{}:{}", loc.file, loc.line).replace(|c: char| !c.is_ascii_alphanumeric(), "_"));

    let mp = super::project::target_dir()
        .join("macro")
        .join(& name.0[1..].join("_"))
        .join(format!("macro{}", super::make::EXE_EXT));

    if !mp.exists() {
        return Err(Error::new(
            format!("macro {} is unavailable (exe {:?})", name, mp),
            vec![(
                loc.clone(),
                "macro not available here. it may be compiled later".to_string(),
            )],
        ));
    }
    let mp = mp.canonicalize().expect(&format!("macro path for {:?}", mp));

    let input = MacroStdin { args: args.clone(), local: None };

    if let Ok(debug_out) = std::fs::File::create(&debug_out) {
        serde_json::ser::to_writer(debug_out, &input).unwrap();
    }

    let mut cmd = Command::new(&mp)
        .current_dir(cwd)
        .stdin(Stdio::piped())
        .stdout(Stdio::piped())
        .spawn()
        .expect(&format!("failed to execute macro {}\n {:?} < {:?}", name, mp, debug_out));

    let stdin = std::mem::replace(&mut cmd.stdin, None).unwrap();
    serde_json::ser::to_writer(stdin, &input).unwrap();

    if !cmd.wait().unwrap().success() {
        eprintln!("failed to execute macro {}\n {:?} < {:?}", name,  mp, debug_out);
        std::process::exit(9);
    }

    let mut n = String::new();
    cmd.stdout.as_mut().unwrap().read_to_string(&mut n).unwrap();

    let (path, source) = ast::generated_source(&format!("{}", loc), n);

    let mut pp = match parser::ZZParser::parse(parser::Rule::expr, source) {
        Ok(v) => v,
        Err(e) => {
            return Err(Error::new(
                format!("syntax error in proc macro return: {}", e),
                vec![(loc.clone(), "in this macro invocation".to_string())],
            ));
        }
    };

    let pp = match pp.next() {
        None => {
            return Ok(ast::Expression::LiteralString {
                loc: ast::Location::builtin(),
                v: "".into(),
            })
        }
        Some(v) => v,
    };

    let expr = parser::parse_expr(&path, pp);
    Ok(expr)
}

pub fn stm(
    name: &Name,
    loc: &ast::Location,
    args: &Vec<Box<ast::Expression>>,
) -> Result<Vec<Box<ast::Statement>>, Error> {

    let cwd = path::Path::new(&loc.file)
        .parent().expect(&format!("macro cwd for {}", loc.file));

    let debug_out = super::project::target_dir()
        .join("macro")
        .join(& name.0[1..].join("_"))
        .join(format!("{}:{}", loc.file, loc.line).replace(|c: char| !c.is_ascii_alphanumeric(


----------
@
@  void Xoodoo_Permute_12rounds( void *state )
@
.global Xoodoo_Permute_12rounds
.type	Xoodoo_Permute_12rounds, %function;
Xoodoo_Permute_12rounds:
    push    {r0,r4-r11,lr}
    ldmia   r0, {r2-r12,lr}
    mRound  r6, r7, r8, r9,    r9, r6, r7, r8,    r10, r11, r12, lr,   32,      32, _rc12x1
    mRound  r9, r6, r7, r8,    r8, r9, r6, r7,    r12, lr, r10, r11,    1, _e1+_w1, _rc11x2
    mRound  r8, r9, r6, r7,    r7, r8, r9, r6,    r10, r11, r12, lr,    1, _e1+_w1, _rc10x3
    mRound  r7, r8, r9, r6,    r6, r7, r8, r9,    r12, lr, r10, r11,    1, _e1+_w1, _rc9x4
    mRound  r6, r7, r8, r9,    r9, r6, r7, r8,    r10, r11, r12, lr,    1, _e1+_w1, _rc8x5
    mRound  r9, r6, r7, r8,    r8, r9, r6, r7,    r12, lr, r10, r11,    1, _e1+_w1, _rc7x6
    mRound  r8, r9, r6, r7,    r7, r8, r9, r6,    r10, r11, r12, lr,    1, _e1+_w1, _rc6x7
    mRound  r7, r8, r9, r6,    r6, r7, r8, r9,    r12, lr, r10, r11,    1, _e1+_w1, _rc5x8
    mRound  r6, r7, r8, r9,    r9, r6, r7, r8,    r10, r11, r12, lr,    1, _e1+_w1, _rc4x9
    mRound  r9, r6, r7, r8,    r8, r9, r6, r7,    r12, lr, r10, r11,    1, _e1+_w1, _rc3x10
    mRound  r8, r9, r6, r7,    r7, r8, r9, r6,    r10, r11, r12, lr,    1, _e1+_w1, _rc2x11
    mRound  r7, r8, r9, r6,    r6, r7, r8, r9,    r12, lr, r10, r11,    1, _e1+_w1, _rc1x12
    ror     r2, r2, #32-(12*_r0)%32
    ror     r3, r3, #32-(12*_r0)%32
    ror     r4, r4, #32-(12*_r0)%32
    ror     r5, r5, #32-(12*_r0)%32
    ror     r6, r6, #32-(12*_r0+1)%32
    ror     r7, r7, #32-(12*_r0+1)%32
    ror     r8, r8, #32-(12*_r0+1)%32
    ror     r9, r9, #32-(12*_r0+1)%32
    ror     r10, r10, #32-(12*_r0+_e1+_w1)%32
    ror     r11, r11, #32-(12*_r0+_e1+_w1)%32
    ror     r12, r12, #32-(


MaxQueryReportRows)
	require.True(t, ghqrr.ReportClipped)

	slreq.Data = []json.RawMessage{json.RawMessage(`{
  "snapshot": [` + results(1, host1Global.UUID) + `
  ],
  "action": "snapshot",
  "name": "pack/Global/` + osqueryInfoQuery.Name + `",
  "hostIdentifier": "` + *host1Global.OsqueryHostID + `",
  "calendarTime": "Fri Oct  6 18:13:04 2023 UTC",
  "unixTime": 1696615984,
  "epoch": 0,
  "counter": 0,
  "numerics": false,
  "decorations": {
    "host_uuid": "187c4d56-8e45-1a9d-8513-ac17efd2f0fd",
    "hostname": "` + host1Global.Hostname + `"
  }
}`)}

	s.DoJSON("POST", "/api/osquery/log", slreq, http.StatusOK, &slres)
	require.NoError(t, slres.Err)
	s.DoJSON("GET", fmt.Sprintf("/api/latest/fleet/queries/%d/report", osqueryInfoQuery.ID), getQueryReportRequest{}, http.StatusOK, &gqrr)
	require.Len(t, gqrr.Results, fleet.DefaultMaxQueryReportRows)
	require.True(t, gqrr.ReportClipped)

	appConfigSpec := map[string]map[string]int{
		"server_settings": {"query_report_cap": fleet.DefaultMaxQueryReportRows + 1},
	}
	s.Do("PATCH", "/api/latest/fleet/config", appConfigSpec, http.StatusOK)

	s.DoJSON("GET", fmt.Sprintf("/api/latest/fleet/queries/%d/report", osqueryInfoQuery.ID), getQueryReportRequest{}, http.StatusOK, &gqrr)
	require.Len(t, gqrr.Results, fleet.DefaultMaxQueryReportRows)
	require.False(t, gqrr.ReportClipped)

	slreq.Data = []json.RawMessage{
		json.RawMessage(`{
  "snapshot": [` + results(1002, host1Global.UUID) + `
  ],
  "action": "snapshot",
  "name": "pack/Global/` + osqueryInfoQuery.Name + `",
  "hostIdentifier": "` + *host1Global.OsqueryHostID + `",
  "calendarTime": "Fri Oct  6 18:13:04 2023 UTC",
  "unixTime": 1696615984,
  "epoch": 0,
  "counter": 0,
  "numerics": false,
  "decorations": {
    "host_uuid": "187c4d56-8e45-1a9d-8513-ac17efd2f0fd",
    "hostname": "` + host1Global.Hostname + `"
  }
}`),
	}

	s.DoJSON("POST", "/api/osquery/log", slreq, http.StatusOK, &slres)
	require.NoError(t, slres.Err)

	s.DoJSON("GET", fmt.Sprintf("/api/latest/fleet/queries/%d/report", osqueryInfoQuery.ID), getQueryReportRequest{}, http.StatusOK, &gqrr)
	require.Len(t, gqrr.Results, fleet.DefaultMaxQueryReportRows+1)
	require.True(t, gqrr.ReportClipped)

	// TODO: Set global discard flag and verify that all data is gone.
}

// Creates a set of results for use in tests for Query Results.
func results(num int, hostID string) string {
	b := strings.Builder{}
	for i := 0; i < num; i++ {
		b.WriteString(`    {
      "build_distro": "centos7",
      "build_platform": "linux",
      "config_hash": "eed0d8296e5f90b790a23814a9db7a127b13498d",
      "config_valid":


tent};
   |                                     ^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^

warning: unused imports: `ConversationStorageConfig` and `StorageType`
  --> src/financial_advisor/nlp/conversation_manager_storage.rs:11:37
   |
11 | use crate::financial_advisor::nlp::{ConversationStorageConfig, StorageType};
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^

warning: unused import: `tempfile::tempdir`
  --> src/financial_advisor/nlp/conversation_manager_storage.rs:12:5
   |
12 | use tempfile::tempdir;
   |     ^^^^^^^^^^^^^^^^^

warning: unused import: `tokio::sync::mpsc`
  --> src/financial_advisor/streaming_handler.rs:11:5
   |
11 | use tokio::sync::mpsc;
   |     ^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `chrono::Utc`
   --> src/financial_advisor/streaming_handler.rs:375:9
    |
375 |     use chrono::Utc;
    |         ^^^^^^^^^^^

warning: unused import: `aws_sdk_bedrockruntime::config::Config`
   --> src/financial_advisor/nlp/bedrock.rs:478:9
    |
478 |     use aws_sdk_bedrockruntime::config::Config;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `tokio::runtime::Runtime`
   --> src/financial_advisor/nlp/hybrid.rs:279:9
    |
279 |     use tokio::runtime::Runtime;
    |         ^^^^^^^^^^^^^^^^^^^^^^^

warning: unused imports: `InvokeModelError` and `InvokeModelOutput`
   --> src/financial_advisor/nlp/embeddings.rs:619:63
    |
619 |         use aws_sdk_bedrockruntime::operation::invoke_model::{InvokeModelError, InvokeModelOutput};
    |                                                               ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^

warning: unused import: `aws_smithy_runtime_api::client::result::SdkError`
   --> src/financial_advisor/nlp/embeddings.rs:620:13
    |
620 |         use aws_smithy_runtime_api::client::result::SdkError;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `aws_smithy_types::body::SdkBody`
   --> src/financial_advisor/nlp/embeddings.rs:621:13
    |
621 |         use aws_smithy_types::body::SdkBody;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `aws_smithy_types::byte_stream::ByteStream`
   --> src/financial_advisor/nlp/embeddings.rs:622:13
    |
622 |         use aws_smithy_types::byte_stream::ByteStream;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `std::io::Cursor`
   --> src/financial_advisor/nlp/embeddings.rs:623:13
    |
623 |         use std::io::Cursor;
    |             ^^^^^^^^^^^^^^^

warning: unused import: `super::*`
   --> src/financial_advisor/nlp/embeddings.rs:645:9
    |
645 |     use super::*;
    |         ^^^^^^^^

warning: unused import: `InvokeModelOutput`
   --> src


ex == null) {
          _backingLeapTex = EditorResources.Load<Texture2D>(leapLogoResourceName);
        }
        return _backingLeapTex;
      }
    }

    private static GUISkin s_backingWindowSkin;
    public static GUISkin windowSkin {
      get {
        if (s_backingWindowSkin == null) {
          s_backingWindowSkin = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Scene);
        }
        return s_backingWindowSkin;
      }
    }

    #endregion

    #region Window State

    public static bool isWindowOpen {
      get {
        return _currentWindow != null;
      }
    }

    private int _tabIndex = 0;
    private static string[] _tabs = new string[] {
      "Project Checks", "Rig Upgrader", "Preferences"
    };
    public static void ShowTab(int tabIndex) {
      if (_currentWindow != null) {
        _currentWindow._tabIndex = tabIndex;
      }
    }
    public static int GetTabCount() { return _tabs.Length; }

    private Vector2 _scrollPosition = Vector2.zero;

    #endregion

    #region OnGUI

    private void OnGUI() {
      var origSkin = GUI.skin;
      try {
        GUI.skin = windowSkin;

        drawGUI();
      }
      finally {
        GUI.skin = origSkin;
      }
    }

    private void drawGUI() {
      var boxStyle = windowSkin.box;
      GUILayout.BeginVertical();

      // Logo.
      var logoStyle = windowSkin.box;
      logoStyle.fixedHeight = 150;
      logoStyle.stretchWidth = true;
      logoStyle.alignment = TextAnchor.MiddleCenter;
      logoStyle.margin = new RectOffset(0, 0, top: 20, bottom: 20);
      GUILayout.Box(new GUIContent(leapTex), logoStyle, GUILayout.ExpandWidth(true),
        GUILayout.MaxHeight(150f));

      // Window tabs.
      _tabIndex = GUILayout.Toolbar(_tabIndex, _tabs);
      _scrollPosition = GUILayout.BeginScrollView(_scrollPosition,
        GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
      switch (_tabIndex) {
        case 0:
          LeapProjectChecks.DrawProjectChecksGUI();
          break;
        case 1:
          LeapRigUpgrader.DrawUpgraderGUI();
          break;
        case 2:
          float prevLabelWidth = EditorGUIUtility.labelWidth;
          EditorGUIUtility.labelWidth = 200;
          LeapPreferences.DrawPreferencesGUI();
          EditorGUIUtility.labelWidth = prevLabelWidth;
          break;
        default:
          _tabIndex = 0;
          break;
      }
      GUILayout.EndScrollView();

      GUILayout.EndVertical();
    }

    #endregion

  }

}


The argument
path

is the path to the serial port that the XBee is connected to (e.g. /dev/ttyUSB0).

The
baudrate

is the baud rate that the local XBee is configured to run at. The following are avaliable:

1200
2400
4800
9600
19200
38400
57600
115200 - this is potentially unstable (read the XBee manual to find out why...)

Using
xbee_setuplog()

is exactly the same, but instead you give an open file descriptor. All log messages will be written to this file (you can use stderr or stdout if you want!).

Using
xbee_setupAPI()

is exactly the same, but instead you provide the 'Command Sequence' character and the 'Guard Time' that your local XBee has been configured with.
libxbee will then place your XBee in API mode 2, and when you call xbee_end() it will return your XBee to its previous API mode.

Using
xbee_setuplogAPI()

is simply a combination of
xbee_setuplog()

and
xbee_setupAPI()

RETURN VALUE

If any error occures,
-1

is returned. Otherwise
0

is returned.

EXAMPLE

To setup libxbee to use /dev/ttyUSB0 at 57600 baud:

#include <xbee.h>
if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
  printf("Oh no...);
  exit(1);
}

AUTHOR

Attie Grande <attie@attie.co.uk>

SEE ALSO

libxbee(3),

xbee_newcon(3),

xbee_getpacket(3),

xbee_senddata(3)

Index

NAME

SYNOPSIS

DESCRIPTION

RETURN VALUE

EXAMPLE

AUTHOR

SEE ALSO

This document was created by
man2html,
using the manual pages.

Time: 00:08:23 GMT, March 30, 2011

<TITLE>Manpage of LIBXBEE</TITLE>

LIBXBEE

Section: Linux Programm


s) {
                reddit.subreddit(moderationSubreddit).emoji().delete("foo")
            }
        }
    }
})
package net.dean.jraw.test.integration

import com.winterbe.expekt.should
import net.dean.jraw.test.TestConfig.reddit
import net.dean.jraw.test.randomName
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import java.util.*

class InboxReferenceTest : Spek({
    val inbox = reddit.me().inbox()

    describe("iterate") {
        val whereValues = listOf("inbox", "unread", "messages", "comments", "selfreply", "mentions")
        for (where in whereValues) {
            it("should be able to iterate '$where'") {
                val p = inbox.iterate(where).build()
                val messages = p.accumulate(maxPages = 2)
                if (messages.size > 1 && messages[0].isNotEmpty() && messages[1].isNotEmpty())
                    // Make sure BarebonesPaginator is working correctly as far as dealing with multiple pages
                    messages[0][0].fullName.should.not.equal(messages[1][0].fullName)
            }
        }
    }

    describe("fetch") {
        it("should return a Message when the ID is valid") {
            val id = inbox.iterate("messages").build().next().first().id
            inbox.fetch(id).should.not.be.`null`
        }

        it("should return null when the Message with that ID doesn\'t exist") {
            inbox.fetch("fdafdafdsaffdsa").should.be.`null`
        }
    }

    describe("compose/markRead/delete") {
        it("should be able to send a message") {
            val body = "random ID: ${randomName()}"
            inbox.compose(reddit.requireAuthenticatedUser(), "test PM", body)

            // Make sure it appeared in our inbox. Messages sent to yourself are always marked as read, regardless of
            // calls to POST /api/unread_message. There's not much we can in this situation besides make sure that the
            // response doesn't contain any errors
            val message = inbox.iterate("messages").build().next().firstOrNull { it.body == body }
            message.should.not.be.`null`

            inbox.markRead(false, message!!.fullName)
            inbox.markRead(true, message.fullName)

            // Jst make sure it doesn't fail
            inbox.delete(message.fullName)
        }
    }

    describe("markAllRead") {
        it("should mark all messages as read") {
            // Again, there's no way we can really test this without involving another testing user
            inbox.markAllRead()
        }
    }

    describe("replyTo") {
        it("should reply to a PM") {
            // Send a message to ourselves
            inbox.compose(reddit.requireAuthenticatedUser(), "Test PM", Date().toString())
            // Find that message
            val message = inbox.iterate("messages").build().next().first { it.author == reddit.requireAuthenticatedUser() }

            val reply = inbox.replyTo(message.fullName, "Test PM reply at ${Date()}")
            reply.isComment.should.be.`false`
        }
    }
})
package net.dean.jraw.test.integration

import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.Types
import com.winterbe.expekt.should
import net.dean.jraw.JrawUtils
import net.dean.jraw.models.PersistedAuthData
import net.dean.jraw.oauth.JsonFileTokenStore
import net.dean.jraw.test.createMockOAuthData
import net.dean


及鼠王的强大实力。最终被鼠王轻易压制，并被卡彭偷袭受伤。
在“叙拉古人”中，他作为雇佣杀手行动，与卡彭一同试图袭击建设部官员，但被能天使等人挫败。
在“揭幕者们”中，他在港口试图阻止卢奇诺破坏武器，展示了一定的近战能力，但在与卢奇诺缠斗时被突然出现的狼之主瓦古轻易击飞。
总体而言，甘比诺拥有一定的战斗力，尤其擅长组织暴力行动和使用炸弹，但在面对拥有特殊能力或强大背景的对手时，其战斗力显得不足，常常以失败告终。
## 相关活动
-   **[喧闹法则](../stories/act5d0.md)**：作为叙拉古黑手党一个家族的“首领”，在龙门策划并执行绑架行动，与企鹅物流和龙门鼠王发生冲突，最终惨败并被卡彭背叛。
-   **[叙拉古人](../stories/act21side.md)**：与卡彭一同在沃尔西尼城作为雇佣杀手活动，试图在叙拉古家族体系中立足，遭遇拉维妮娅和企鹅物流，并与拉普兰德互动，最终被逮捕。
-   **[揭幕者们](../stories/act38side.md)**：与卡彭来到新沃尔西尼，为威尼斯载具公司工作，渴望获得市民资格。因车祸事件劫持卢奇诺，再次遭遇拉普兰德的操纵，并在冲突中被狼之主瓦古击飞。活动结束后与卡彭试图在新城市开创自己的事业。
-   **[未尽篇章](../stories/act11mini.md)**：与卡彭一同在龙门听命于拉普兰德，为她执行任务。收到来自叙拉古的生死威胁信件，在拉普兰德安排下与卡彭进行“决斗”，最终在拉普兰德的干预下幸存，但仍处于叙拉普方面的监视下。
## trivia
曾拥有“西西里二代”的头衔，对其过去的显赫地位非常在意。
他对“西西里人”的身份和荣誉有着非常执着甚至僵化的理解。
他钟爱使用炸弹作为袭击手段。
他对雨天感到讨厌。
与卡彭的


  /// [benchmarkStartTime]: The start time of the run.
  /// [testName]: The name of the test.
  RunDetails({
    required this.runId,
    required this.command,
    required this.completionTime,
    required this.benchmarkStartTime,
    required this.testName,
  });

  /// Creates a `RunDetails` instance from a map.
  ///
  /// [json]: A map containing key-value pairs corresponding to `RunDetails` fields.
  ///
  /// Returns a new `RunDetails` populated with values from the map.
  factory RunDetails.fromJson(Map<String, dynamic> json) => RunDetails(
        runId: json['run_id'] ?? 'placerholder',
        command: json['command'] ?? 'placeholder',
        completionTime: json['completion_time'] == null
            ? DateTime.now()
            : DateTime.parse(json['completion_time']),
        benchmarkStartTime: json['benchmark_start_time'] == null
            ? DateTime.now()
            : DateTime.parse(json['benchmark_start_time']),
        testName: json['test_name'] ?? 'placeholder',
      );

  /// Converts the `RunDetails` instance to a map.
  ///
  /// Returns a map containing key-value pairs corresponding to `RunDetails` fields.
  Map<String, dynamic> toJson() => {
        'run_id': runId,
        'command': command,
        'completion_time': completionTime.toIso8601String(),
        'benchmark_start_time': benchmarkStartTime.toIso8601String(),
        'test_name': testName,
      };
}
import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:get/get.dart';

import '../consts.dart';
import './platform_model.dart';

enum SvcStatus { notReady, connecting, ready }

class StateGlobal {
  int _windowId = -1;
  final RxBool _fullscreen = false.obs;
  bool _isMinimized = false;
  final RxBool isMaximized = false.obs;
  final RxBool _showTabBar = true.obs;
  final RxDouble _resizeEdgeSize = RxDouble(windowResizeEdgeSize);
  final RxDouble _windowBorderWidth = RxDouble(kWindowBorderWidth);
  final RxBool showRemoteToolBar = false.obs;
  final svcStatus = SvcStatus.notReady.obs;
  final RxInt videoConnCount = 0.obs;
  final RxBool isFocused = false.obs;
  // for mobile and web
  bool isInMainPage = true;
  bool isWebVisible = true;

  final isPortrait = false.obs;

  final updateUrl = ''.obs;

  String _inputSource = '';

  // Use for desktop -> remote toolbar -> resolution
  final Map<String, Map<int, String?>> _lastResolutionGroupValues = {};

  int get windowId => _windowId;
  RxBool get fullscreen => _fullscreen;
  bool get isMinimized => _isMinimized;
  double get tabBarHeight => fullscreen.isTrue ? 0 : kDesktopRemoteTabBarHeight;
  RxBool get showTabBar => _showTabBar;
  RxDouble get resizeEdgeSize => _resizeEdgeSize;
  RxDouble get windowBorderWidth => _windowBorderWidth;

  resetLastResolutionGroupValues(String peerId) {
    _lastResolutionGroupValues[peerId] = {};
  }

  setLastResolutionGroupValue(
      String peerId, int currentDisplay, String? value) {
    if (!_lastResolutionGroupValues.containsKey(peerId)) {
      _lastResolutionGroupValues[peerId] = {};
    }
    _lastResolutionGroupValues[peerId]![currentDisplay] =


 in pre-order: \n");
        preOrder(root);
        break;

      case IN_ORDER:
        System.out.println("\nTraversing in in-order: \n");
        inOrder(root);
        break;

      case POST_ORDER:
        System.out.println("\nTraversing in post-order: \n");
        postOrder(root);
        break;

      default:
        System.out.println("Invalid type.");
    }
  }

  // * ----- END -----
}

// * ----- Auxillary Class -----

class TreeNode {

  private int key;
  private String value;
  TreeNode left;
  TreeNode right;

  public TreeNode(int key, String value) {
    this.key = key;
    this.value = value;
    left = null;
    right = null;
  }

  public int getKey() {
    return this.key;
  }

  public String getValue() {
    return this.value;
  }

  public void setKey(int key) {
    this.key = key;
  }

  public void setValue(String value) {
    this.value = value;
  }
}
// * ----- END -----
package LeetCode.Easy.ValidPalindrome;

/*
  125. Valid Palindrome

  Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

  Note: For the purpose of this problem, we define empty string as valid palindrome.

  Example 1:
  Input: "A man, a plan, a canal: Panama"
  Output: true

  Example 2:
  Input: "race a car"
  Output: false

  Constraints:
  s consists only of printable ASCII characters.
*/

public class Solution {
  public boolean isPalindrome(String s) {
    if (s.length() <= 1) return true;

    int i = 0, j = s.length() - 1;

    while (i < j) {
      while (i < j && !Character.isLetterOrDigit(s.charAt(i))) ++i;

      while (i < j && !Character.isLetterOrDigit(s.charAt(j))) --j;

      if (i < j && Character.toLowerCase(s.charAt(i++)) != Character.toLowerCase(s.charAt(j--)))
        return false;
    }

    return true;
  }

  public static void main(String[] args) {
    Solution solution = new Solution();

    // should be true
    System.out.println(solution.isPalindrome("A man, a plan, a canal: Panama"));

    // should be false
    System.out.println(solution.isPalindrome("race a car"));
  }
}
package LeetCode.Easy.RemoveElement;

/*
  27. Remove Element

  Given an array nums and a value val, remove all instances of that value in-place and return the new length.

  Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.

  The order of elements can be changed. It doesn't matter what you leave beyond the new length.

  Clarification:

  Confused why the returned value is an integer but your answer is an array?

  Note that the input array is passed in by reference, which means a modification to the input array will be known to the caller as well.

  Internally you can think of this:

  * nums is passed in by reference. (i.e., without making a copy)
  int len = removeElement(nums, val);

  * any modification to nums in your function would be known by the caller.
  * using the length returned by your function, it prints the first len elements.
  for (int i = 0; i < len; i++) {
      print(nums[i]);
  }

  Example 1:
  Input: nums = [3,2,2,3], val = 3
  Output: 2, nums = [2,2]
  Explanation: Your function should return length = 2, with the first two elements of nums being 2.
  It doesn't matter what you leave beyond the returned length. For example if you return 2 with nums = [2,2,


coming soon)
🔁 GitHub automation: branches, commits, PRs
💬 Prompt history and context continuity
📡 Streamed output for real-time UIs
🔍 OpenTelemetry support for tracing and metrics
🧰 Compatible with any sandbox runtime
⚡ Execute arbitrary commands in sandbox environments

## 📦 Supported Sandbox Runtimes

Currently supports E2B with Daytona, Modal, Fly.io, and other providers coming soon.

## 🧪 Use Cases

Build internal debugging tools, ship AI-powered features, scaffold new ideas, automate repetitive coding tasks, and test LLM output safely in production or prototyping environments.

## 🤝 Contributing

Contributions welcome! Open an issue, start a discussion, or submit a pull request.

## 📄 License

MIT — see [LICENSE](./LICENSE) for details.

© 2025 Superagent Technologies Inc.

---

Tranlated By [Open Ai Tx](https://github.com/OpenAiTx/OpenAiTx) | Last indexed: 2025-07-18

---

### 안전한 샌드박스에서 코딩 에이전트 실행하기

Codex, Claude, Gemini CLI, SST Opencode를 앱이나 워크플로우에서 안전하게 실행할 수 있는 간단한 SDK입니다.

---

[웹사이트](https://vibekit.sh) • [문서](https://docs.vibekit.sh) • [디스코드](https://discord.com/invite/mhmJUTjW4b)

---

## 🧠 VibeKit이란?

VibeKit은 **Claude Code**, **OpenAI Codex**, **Gemini CLI**, **SST Opencode** 같은 강력한 코딩 에이전트를 안전하고 맞춤형 샌드박스에서 실행할 수 있는 SDK입니다. 실제 코드를 안전하게 생성하고 실행하며, UI로 출력 스트리밍이 가능하고, 모든 것을 클라우드에서 완전한 격리와 유연성으로 실행할 수 있습니다. 로컬 실행 기능도 곧 제공될 예정입니다.

하나의 SDK. 어떤 코딩 에이전트든. 어떤 샌드박스든.

## 🚀 빠른 시작

```bash
npx @vibe-kit/sdk init
# or after global install
vibekit init
```
## ⚡ 기능

🧠 Claude Code, OpenAI Codex, Gemini CLI, SST Opencode를 위한 드롭인 SDK
🔒 안전한 코드 실행을 위한 보안 샌드박스
🌐 클라우드 기반 실행 (로컬 지원 곧 제공 예정)
🔁 GitHub 자동화: 브랜치, 커밋, PR
💬 프롬프트 기록 및 문맥 연속성
📡 실시간 UI용 스트리밍 출력
🔍 추적 및 메트릭을 위한 OpenTelemetry 지원
🧰 모든 샌드박스 런타임과 호환
⚡ 샌드박스 환경에서 임의 명령 실행

## 📦 지원되는 샌�


ype.INTERMEDIATE)
		self.curr_step += 1

	def save_and_plot_final_if_needed(self, state: Vector):
		# Final step was already performed, so curr_step reflect the next step number to be performed (in this case, there isn't any).
		final_step = self.curr_step - 1
		self.curr_step = final_step  # Update curr_step to the final step number that was performed.

		if not self.with_visualization:
			return

		if self.last_visualized_step != final_step:  # Network State at the end of the simulation was not visualized yet.
			self._visualize_state(state, NetworkPlotType.FINAL)
		else:
			# Network State at the end of the simulation was visualized already, so no need to save it again (if with_saving is enabled),
			# but a final blocking interactive plot is still needed (if with_interactive is enabled).
			self.with_saving = False  # No need to save again, so disable saving.
			self._visualize_state(state, NetworkPlotType.FINAL)

	def close_figure_if_needed(self) -> None:
		"""
		Close the figure if it exists and reset the figure, axes, and image attributes to None for safe cleanup.
	 	"""
		if self.fig is not None:  # Only close if the figure was created, meaning visualization was enabled.
			plt.close(self.fig)
		self.fig = None
		self.ax = None
		self.im = None