ceTypeQuery3" | "TraceTypeQuery4" | "TraceTypeQuery5" | "TraceTypeQuery6" | "TraceTypeQuery7" | "TraceTypeQuery8" | "TraceTypeQuery9" | "TraceTypeQuery10" | "TraceTypeQuery11" | "TraceTypeQuery12" | "TraceTypeQuery13" | "TraceTypeQuery14" | "TraceTypeQuery15" | "TraceTypeQuery16" | "TraceTypeQuery17" | "TraceTypeQuery18" | "TraceTypeQuery19" | "TraceTypeQuery20" | "TraceTypeQuery21" | "TraceTypeQuery22" | "TraceTypeQuery23" | "TraceTypeQuery24" | "TraceTypeQuery25" | "TraceTypeQuery26" | "TraceTypeQuery27" | "TraceTypeQuery28" | "TraceTypeQuery29" | "TraceTypeQuery30" | "TraceTypeQuery31" | "TraceTypeQuery32" | "TraceTypeQuery_MAX" | "ETraceTypeQuery_MAX" */, bTraceComplex: Boolean, ActorsToIgnore: Array<Actor>, DrawDebugType: String /* "None" | "ForOneFrame" | "ForDuration" | "Persistent" | "EDrawDebugTrace_MAX" */, OutHits: Array<HitResult> = definedExternally, bIgnoreSelf: Boolean = definedExternally, TraceColor: LinearColor = definedExternally, TraceHitColor: LinearColor = definedExternally, DrawTime: Number = definedExternally): `T$385`
        fun MultiSphereTraceByProfile(WorldContextObject: UObject, Start: Vector, End: Vector, Radius: Number, ProfileName: String, bTraceComplex: Boolean, ActorsToIgnore: Array<Actor>, DrawDebugType: String /* "None" | "ForOneFrame" | "ForDuration" | "Persistent" | "EDrawDebugTrace_MAX" */, OutHits: Array<HitResult> = definedExternally, bIgnoreSelf: Boolean = definedExternally, TraceColor: LinearColor = definedExternally, TraceHitColor: LinearColor = definedExternally, DrawTime: Number = definedExternally): `T$386`
        fun MultiSphereTraceForObjects(WorldContextObject: UObject, Start: Vector, End: Vector, Radius: Number, ObjectTypes: Array<String /* "ObjectTypeQuery1" | "ObjectTypeQuery2" | "ObjectTypeQuery3" | "ObjectTypeQuery4" | "ObjectTypeQuery5" | "ObjectTypeQuery6" | "ObjectTypeQuery7" | "ObjectTypeQuery8" | "ObjectTypeQuery9" | "ObjectTypeQuery10" | "ObjectTypeQuery11" | "ObjectTypeQuery12" | "ObjectTypeQuery13" | "ObjectTypeQuery14" | "ObjectTypeQuery15" | "ObjectTypeQuery16" | "ObjectTypeQuery17" | "ObjectTypeQuery18" | "ObjectTypeQuery19" | "ObjectTypeQuery20" | "ObjectTypeQuery21" | "ObjectTypeQuery22" | "ObjectTypeQuery23" | "ObjectTypeQuery24" | "ObjectTypeQuery25" | "ObjectTypeQuery26" | "ObjectTypeQuery27" | "ObjectTypeQuery28" | "ObjectTypeQuery29" | "ObjectTypeQuery30" | "ObjectTypeQuery31" | "ObjectTypeQuery32" | "ObjectTypeQuery_MAX" | "EObjectTypeQuery_MAX" */>, bTraceComplex: Boolean, ActorsToIgnore: Array<Actor>, DrawDebugType: String /* "None" | "ForOneFrame" | "ForDuration" | "Persistent" | "EDrawDebugTrace_MAX" */, OutHits: Array<HitResult> = definedExternally, bIgnoreSelf: Boolean = definedExternally, TraceColor: LinearColor = definedExternally, TraceHitColor: LinearColor = definedExternally, DrawTime: Number = definedExternally): `T$387`
        fun SphereTraceByChannel(WorldContextObject: UObject, Start: Vector, End: Vector, Radius: Number, TraceChannel: String /* "TraceTypeQuery1" | "TraceTypeQuery2" | "TraceTypeQuery3" | "TraceTypeQuery4" | "TraceTypeQuery5" | "TraceTypeQuery6" | "TraceTypeQuery7" | "TraceTypeQuery8" | "TraceTypeQuery9" | "TraceTypeQuery10" | "TraceTypeQuery11" | "TraceTypeQuery12" | "TraceTypeQuery13" | "TraceTypeQuery14" | "TraceTypeQuery15" | "


    verifyMatrix(o, 0.38767, 0.41834, 0.57519, 0.63393, 1.19710, 1.70942);
  });

  test('Matrix.invertAndConcat', () {
    final m = Matrix(0.269, 0.283, 0.313, 0.479, 0.659, 0.701);
    final n = Matrix(0.569, 0.521, 0.829, 0.983, 0.241, 0.677);
    m.invertAndConcat(n);
    verifyMatrix(m, 0.94220, -0.71091, 1.11502, 2.51674, -1.16153, -0.61874);
  });

  test('Matrix.copyFromAndInvert', () {
    final m = Matrix(0.269, 0.283, 0.313, 0.479, 0.659, 0.701);
    final n = Matrix.fromIdentity();
    n.copyFromAndInvert(m);
    verifyMatrix(n, 11.89412, -7.02721, -7.77215, 6.67958, -2.38995, -0.05145);
  });
}

void verifyMatrix(Matrix m, num a, num b, num c, num d, num tx, num ty) {
  expect(m.a, closeTo(a, 0.00001));
  expect(m.b, closeTo(b, 0.00001));
  expect(m.c, closeTo(c, 0.00001));
  expect(m.d, closeTo(d, 0.00001));
  expect(m.tx, closeTo(tx, 0.00001));
  expect(m.ty, closeTo(ty, 0.00001));
}
part of '../animation.dart';

class _AnimatableLink {
  Animatable? animatable;
  _AnimatableLink? nextAnimatableLink;
}

/// The [Juggler] controls the progress of your application by
/// propagating the time passed between two render frames.
///
/// The RenderLoop and Stage class provide juggler instances which are
/// driven by the browsers animation frames. You can also create your
/// own Juggler instance and control the time by yourself.
/// Because [Juggler] implements the [Animatable] interface it can be
/// added to other Juggler instances too.
///
/// See also: [Tween], [Transition], [DelayedCall]
///
/// Examples:
///
///     var tween = new Tween(sprite, 1.0, Transition.easeIn);
///     tween.animate.x.to(1.0);
///     stage.juggler.add(tween);
///
///     // create a "gameJuggler" who controls all my animations.
///     var gameJuggler = new Juggler();
///     // start all animations controlled by "gameJuggler".
///     stage.juggler.add(gameJuggler);
///     // stop all animations controlled by "gameJuggler".
///     stage.juggler.remove(gameJuggler);

class Juggler implements Animatable {
  final _AnimatableLink _firstAnimatableLink;
  late _AnimatableLink _lastAnimatableLink;

  num _elapsedTime = 0.0;
  final _elapsedTimeChangedEvent = StreamController<num>.broadcast();

  Juggler() : _firstAnimatableLink = _AnimatableLink() {
    _lastAnimatableLink = _firstAnimatableLink;
  }

  //----------------------------------------------------------------------------
  //----------------------------------------------------------------------------

  /// Check whether this Juggler has active animatables or not.

  bool get hasAnimatables {
    _AnimatableLink? link = _firstAnimatableLink;
    while (identical(link, _lastAnimatableLink) == false) {
      if (link?.animatable != null) return true;
      link = link?.nextAnimatableLink;
    }
    return false;
  }

  /// The elapsed time since the juggler has started.

  num get elapsedTime => _elapsedTime;

  /// A stream of [elapsedTime] changes.
  ///
  /// The stream sends the changes of [elapsedTime] and is executed before all
  /// other animatables are processed.
  ///
  ///     await for (var elapsedTime in juggler.onElapsedTimeChange) {
  ///        print(elapsedTime);
  ///     }

  Stream<num> get onElapsedTimeChange => _elapsedTimeChangedEv


);
}
void padprint(const char str[], int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(str);
}
void padprint(char c, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(c);
}
void padprint(unsigned char b, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(b, base);
}
void padprint(int n, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(n, base);
}
void padprint(unsigned int n, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(n, base);
}
void padprint(long n, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(n, base);
}
void padprint(unsigned long n, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(n, base);
}
void padprint(long long n, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(n, base);
}
void padprint(unsigned long long n, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(n, base);
}
void padprint(double n, int digits, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.print(n, digits);
}

void padprintln(const String &s, int16_t padx) {
    if (s.isEmpty()) {
        tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
        tft.println(s);
        return;
    }

    String buff;
    size_t start = 0;
    int _maxCharsInLine = (tftWidth - (padx + 1) * BORDER_PAD_X) / (FP * LW);

    // automatically split into multiple lines
    while (!(buff = s.substring(start, start + _maxCharsInLine)).isEmpty()) {
        tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
        tft.println(buff);
        start += buff.length();
    }
}
void padprintln(const char str[], int16_t padx) {
    if (strcmp(str, "") == 0) {
        tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
        tft.println(str);
        return;
    }

    String buff;
    size_t start = 0;
    int _maxCharsInLine = (tftWidth - (padx + 1) * BORDER_PAD_X) / (FP * LW);

    // automatically split into multiple lines
    while (!(buff = String(str).substring(start, start + _maxCharsInLine)).isEmpty()) {
        tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
        tft.println(buff);
        start += buff.length();
    }
}
void padprintln(char c, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.println(c);
}
void padprintln(unsigned char b, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY());
    tft.println(b, base);
}
void padprintln(int n, int base, int16_t padx) {
    tft.setCursor(padx * BORDER_PAD_X, tft.getCursorY


), pstride_x_(pstride_x),
      pdilate_y_(pdilate_y), pdilate_x_(pdilate_x){
    Shape<srcdim> imshape = ShapeCheck<srcdim, SrcExp>::Check(img_);
    CHECK(imshape[srcdim - 1] >= psize_x && imshape[srcdim - 2] >= psize_y)
      << "UnpackPatchToCol:image shape smaller than patch size";
    this->i_channel_ = imshape[srcdim - 3];
    this->i_height_  = imshape[srcdim - 2];
    this->i_width_   = imshape[srcdim - 1];
    // calculate number of batches
    const index_t num = imshape.ProdShape(0, srcdim - 3);
    const index_t o_height = (i_height_ -
        (pdilate_y == 1 ? psize_y : psize_y * pdilate_y - 1)) / pstride_y + 1;
    const index_t o_width  = (i_width_  -
        (pdilate_x == 1 ? psize_x : psize_x * pdilate_x - 1)) / pstride_x + 1;
    this->shape_[1] = o_height * o_width * num;
    this->shape_[0] = psize_y * psize_x * i_channel_;
  }
};

/*!
 * \brief  unpack local (overlap) patches of image to column of mat, can be used to implement convolution
 *  after getting unpacked mat, we can use: output = dot(weight, mat) to get covolved results, the relations:
 *
 *  weight; shape[0]: out_channel, shape[1]: ichannel * psize_y * psize_x
 *  output; shape[0]: out_channel, shape[1]: out_height * out_width * num_of_images
 *  out_height = (in_height - psize_y) / pstride + 1, this means we pad inperfect patch with 0
 *  out_width  = (in_width - psize_x) / pstride + 1
 *
 * \return mat target matrix; shape[0]: in_channel*psize_y*psize_x  shape[1]: out_height*out_width * num_of_images
 * \param img source image; shape[-3]: in_channels, shape[-2]: in_height, shape[-1]: in_width, can be 3D or 4D tensor(multiple images)
 * \param psize_y height of each patch
 * \param psize_x width of each patch
 * \param pstride stride of each patch
 * \param pdilate dilate of each patch
 * \tparam SrcExp source expression
 * \tparam DType the type of elements
 * \tparam etype type of expression
 */
template<typename SrcExp, typename DType, int etype>
inline UnpackPatchToColXExp<SrcExp, DType, ExpInfo<SrcExp>::kDim>
unpack_patch2col(const Exp<SrcExp, DType, etype> &img,
                 index_t psize_y, index_t psize_x, index_t pstride, index_t pdilate) {
  TypeCheckPass<ExpInfo<SrcExp>::kDim >= 3>
      ::Error_Expression_Does_Not_Meet_Dimension_Req();
  return UnpackPatchToColXExp<SrcExp, DType, ExpInfo<SrcExp>::kDim>
      (img.self(), psize_y, psize_x, pstride, pstride, pdilate, pdilate);
}

/*!
 *if you want to specify stride_x and stride_y
 */
template<typename SrcExp, typename DType, int etype>
inline UnpackPatchToColXExp<SrcExp, DType, ExpInfo<SrcExp>::kDim>
unpack_patch2col(const Exp<SrcExp, DType, etype> &img


uence, Spawn, Vec2, _with_0, name, x, y)) -- 169
		end -- 157
	end) -- 155
	spine = _with_0 -- 32
end -- 32
Director.entry:addChild(spine) -- 171
return Director.entry:addChild((function() -- 175
	local _with_0 = Node() -- 175
	_with_0:schedule(function() -- 176
		local width, height -- 177
		do -- 177
			local _obj_0 = App.visualSize -- 177
			width, height = _obj_0.width, _obj_0.height -- 177
		end -- 177
		SetNextWindowPos(Vec2(width - 250, 10), "FirstUseEver") -- 178
		SetNextWindowSize(Vec2(240, 140), "FirstUseEver") -- 179
		return Begin("Assembling", { -- 180
			"NoResize", -- 180
			"NoSavedSettings" -- 180
		}, function() -- 180
			TextWrapped("Assembling troops example. Tap it for a hit test.") -- 181
			local _ -- 182
			_, spine.showDebug = Checkbox("BoundingBox", spine.showDebug) -- 182
		end) -- 182
	end) -- 176
	return _with_0 -- 175
end)()) -- 182


,e);if(C()){break _;}be=$z;k=l*be;B8(f,k,k,k);g=a.k;h=1;$p=5;case 5:$z=b.zf(g,c,d,e,h);if(C()){break _;}h=$z;q=(h&15)<<4;bd=h&240;bf=q/256.0;bg=((q+16|0)-0.01)/256.0;bh=bd/256.0;bi=(bd+16.0-0.01)/256.0;if(!i){s=bf;t=bi;u=bg;v=bh;}else if(i==2){s=bg;t=bh;u=bf;v=bi;bd=bf;bj=bh;bf=bg;bh=bi;bg=bd;bi=bj;}else if(i!=3){s=bg;t=bh;u=bf;v=bi;}else{s=bf;t=bi;u=bg;v=bh;bd=bf;bj=bh;bf=bg;bh=bi;bg=bd;bi=bj;}bj
=w+b.d_;bk=w+b.ee;bl=z+b.d0;bm=bb+b.d$;bn=bb+b.ef;I(f,bk,bl,bn,u,bi);I(f,bk,bl,bm,bf,t);I(f,bj,bl,bm,s,bh);I(f,bj,bl,bn,bg,v);h=B9h.data[i];if(j)h=B9h.data[B9i.data[i]];a:{j=4;switch(i){case 0:j=5;break a;case 1:j=3;break a;case 3:j=2;break a;case 2:break;default:}}if(h!=2){if(a.b0){g=a.k;q=e-1|0;$p=6;continue _;}g=a.k;q=e-1|0;r=2;$p=7;continue _;}if(h!=3){if(a.b0){g=a.k;q=e+1|0;$p=8;continue _;}g=a.k;q=e+1|0;r=3;$p=9;continue _;}if(h!=4){if(a.b0){g=a.k;q=c-1|0;$p=10;continue _;}g=a.k;q=c-1|0;r=4;$p=11;continue _;}if
(h==5){a.eI=0;return 1;}if(a.b0){g=a.k;h=c+1|0;$p=12;continue _;}g=a.k;h=c+1|0;q=5;$p=13;continue _;case 6:$z=b.Wu(g,c,d,q);if(C()){break _;}bo=$z;if(b.d$>0.0)bo=o;k=m*bo;B8(f,k,k,k);a.eI=j!=2?0:1;g=a.k;q=2;$p=14;continue _;case 7:$z=b.qS(g,c,d,q,r);if(C()){break _;}q=$z;if(q){g=a.k;q=e-1|0;$p=6;continue _;}if(h!=3){if(a.b0){g=a.k;q=e+1|0;$p=8;continue _;}g=a.k;q=e+1|0;r=3;$p=9;continue _;}if(h!=4){if(a.b0){g=a.k;q=c-1|0;$p=10;continue _;}g=a.k;q=c-1|0;r=4;$p=11;continue _;}if(h==5){a.eI=0;retur


 fun sendEphemeralMessageIfUserHaventGotDailyRewardToday(
        loritta: LorittaBot,
        context: UnleashedContext,
        userId: UserId
    ) {
        // TODO: Do not hardcode the timezone
        val now = LocalDateTime.now(ZoneId.of("America/Sao_Paulo"))
            .withHour(0)
            .withMinute(0)
            .withSecond(0)
            .withNano(0)

        val todayDailyReward = loritta.pudding.sonhos.getUserLastDailyRewardReceived(
            userId,
            now.toKotlinLocalDateTime().toInstant(TimeZone.of("America/Sao_Paulo"))
        )

        if (todayDailyReward != null)
            return

        context.reply(true) {
            styled(
                context.i18nContext.get(I18nKeysData.Commands.WantingMoreSonhosDaily(loritta.commandMentions.daily)),
                Emotes.Gift
            )
        }
    }

    fun getSonhosEmojiOfQuantity(quantity: Long) = when {
        quantity >= 1_000_000_000 -> Emotes.Sonhos6
        quantity >= 10_000_000 -> Emotes.Sonhos5
        quantity >= 1_000_000 -> Emotes.Sonhos4
        quantity >= 100_000 -> Emotes.Sonhos3
        quantity >= 10_000 -> Emotes.Sonhos2
        else -> Emotes.Sonhos1
    }

    suspend fun isEconomyDisabled(loritta: LorittaBot): Boolean {
        return loritta.transaction {
            EconomyState.selectAll().where {
                EconomyState.id eq DISABLED_ECONOMY_ID
            }.count() == 1L
        }
    }

    suspend fun checkIfEconomyIsDisabled(context: DiscordCommandContext) = checkIfEconomyIsDisabled(CommandContextCompat.LegacyDiscordCommandContextCompat(context))

    suspend fun checkIfEconomyIsDisabled(context: UnleashedContext): Boolean {
        if (isEconomyDisabled(context.loritta)) {
            context.reply(context.wasInitiallyDeferredEphemerally ?: true) {
                styled(
                    context.i18nContext.get(I18nKeysData.Commands.EconomyIsDisabled),
                    Emotes.LoriSob
                )
            }
            return true
        }
        return false
    }

    suspend fun checkIfEconomyIsDisabled(context: CommandContextCompat): Boolean {
        if (isEconomyDisabled(context.loritta)) {
            context.reply(true) {
                styled(
                    context.i18nContext.get(I18nKeysData.Commands.EconomyIsDisabled),
                    Emotes.LoriSob
                )
            }
            return true
        }
        return false
    }

    fun getSpecialTotalCoinFlipReward(guild: Guild?, currentTax: Double): SpecialTotalCoinFlipReward {
        // No need to change
        if (currentTax == 1.0)
            return SpecialTotalCoinFlipReward.NoChange(currentTax)

        if (guild?.idLong == Constants.PORTUGUESE_SUPPORT_GUILD_ID) {
            val today = LocalDate.now(Constants.LORITTA_TIMEZONE)
            return if (today.dayOfWeek == DayOfWeek.SATURDAY || today.dayOfWeek == DayOfWeek.SUNDAY) {
                // No tax during weekends poggies!!!
                SpecialTotalCoinFlipReward.LorittaCommunity(1.0, true)
            } else {
                // 2.5% any other day
                SpecialTotalCoinFlipReward.LorittaCommunity(0.975, false)
            }
        }

        if (guild?.idLong == 1204104683380285520L) {
            val today = LocalDate.now(Constants.LORITTA_TIMEZONE)
            return if (today.dayOfWeek == DayOfWeek.FRIDAY || today.dayOfWeek == DayOfWeek.SATURDAY) {
                // No tax during weekends poggies!!!


{Vec3,Quaternion};

pub type V3 = Vec3<f32>;
pub type Q = Quaternion<f32>;

#[cfg(test)]
mod test;
<gh_stars>0
mod utils;

fn main() {
    let path = ".";
    println!("\x1b[0;44m === Generating symplink... === \x1b[0m\n");
    let count = utils::generate_symlink_all(path);
    println!("\n\x1b[0;42m DONE! \x1b[0m");
    println!("Total symlinks created: {}", count);
}
<gh_stars>1000+
// check-fail

#![feature(core_intrinsics, intrinsics)]

fn a() {
    let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::transmute;
    //~^ ERROR cannot coerce
}

fn b() {
    let _ = std::mem::transmute as unsafe extern "rust-intrinsic" fn(isize) -> usize;
    //~^ ERROR casting
}

fn c() {
    let _ = [
        std::intrinsics::likely,
        std::intrinsics::unlikely,
        //~^ ERROR cannot coerce
    ];
}

fn main() {}
use crate::error::msg::SemError;
use crate::semck::{self, AllowSelf, TypeParamContext};
use crate::sym::NestedSymTable;
use crate::ty::SourceType;
use crate::vm::{Fct, FctParent, FileId, GlobalId, NamespaceId, VM};
use dora_parser::ast;

pub fn check<'a>(vm: &VM) {
    for global in vm.globals.iter() {
        let (global_id, file_id, ast, namespace_id) = {
            let global = global.read();
            (
                global.id,
                global.file_id,
                global.ast.clone(),
                global.namespace_id,
            )
        };

        let symtable = NestedSymTable::new(vm, namespace_id);

        let mut checker = GlobalDefCheck {
            vm,
            file_id,
            ast: &ast,
            namespace_id,
            global_id,
            symtable,
        };

        checker.check();
    }
}

struct GlobalDefCheck<'a> {
    vm: &'a VM,
    file_id: FileId,
    namespace_id: NamespaceId,
    global_id: GlobalId,
    ast: &'a ast::Global,
    symtable: NestedSymTable<'a>,
}

impl<'a> GlobalDefCheck<'a> {
    fn check(&mut self) {
        let ty = semck::read_type(
            self.vm,
            &self.symtable,
            self.file_id,
            &self.ast.data_type,
            TypeParamContext::None,
            AllowSelf::No,
        )
        .unwrap_or(SourceType::Error);

        let glob = self.vm.globals.idx(self.global_id);
        let mut glob = glob.write();
        glob.ty = ty;

        if let Some(ref initializer) = self.ast.initializer {
            let fct = Fct::new(
                self.vm,
                self.file_id,
                self.namespace_id,
                initializer,
                FctParent::None,
            );

            let fct_id = self.vm.add_fct(fct);
            glob.initializer = Some(fct_id);
        } else {
            let msg = SemError::LetMissingInitialization;
            self.vm.diag.lock().report(self.file_id, self.ast.pos, msg);
        }
    }
}

#[cfg(test)]
mod tests {
    use crate::error::msg::SemError;
    use crate::semck::tests::*;

    #[test]
    fn check_initializer(


 {
    title: CheckoutShippingRateTitle;
    handle: CheckoutShippingRateHandle;
};

type CheckoutAvailableShippingRates = {
    ready?: boolean;
    shippingRates?: CheckoutShippingRate[];
};

export type Checkout = {
    id?: CheckoutId;
    webUrl?: CheckoutWebUrl;
    availableShippingRates?: CheckoutAvailableShippingRates;
}

export type FieldCheckout = 'id' | 'webUrl';

// type CreateCheckoutLineItem = {};
// type CreateCheckout = {
//     line_items?: CreateCheckoutLineItem;
// };import tl = require('azure-pipelines-task-lib/task');
import { EnvironmentConfigurations } from './EnvironmentConfigurations';
import { AbstractAzureApi } from './AbstractAzureApi'
import { BuildAzureApi } from './BuildAzureApi'
import { ReleaseAzureApi } from './ReleaseAzureApi'
import { HostTypeError } from './HostTypeError';
import { PipelineData } from './PipelineData';

export class AzureApiFactory {
    public static readonly BUILD: string = "build";
    public static readonly RELEASE: string = "release";

    public async create(data: PipelineData): Promise<AbstractAzureApi>{
     let type: string = data.getHostType();
     tl.debug("host type: " + type);
        if (type.toLowerCase() === AzureApiFactory.BUILD){
            return new BuildAzureApi(data.getTeamUri(), data.getAccessKey());
        }
        if (type.toLowerCase() === AzureApiFactory.RELEASE){
            return new ReleaseAzureApi(data.getTeamUri(), data.getAccessKey());
       }
       throw(new HostTypeError(`ERROR: CANNOT RUN TASK FOR HOST TYPE ${type}`));
    }
}
import { useLayoutEffect } from 'react';

/**
 * Hook that locks scrolling on the main document.
 * Useful for preventing the standard scrolling in context of
 * a modal dialog.
 */
export function useLockBodyScroll() {
  useLayoutEffect(() => {
    document.body.style.overflow = 'hidden';
    return () => {
      document.body.style.overflow = 'visible';
    };
  }, []);
}
import { createSlice, PayloadAction } from "@reduxjs/toolkit";

export enum CheckState {
  initiated,
  succeed,
  failed,
}

export const usernameMinLength = 3;

export const initialState: {
  username: string;
  status?: CheckState;
} = {
  username: "",
  status: CheckState.initiated,
};

export const loginSlice = createSlice({
  name: "user",
  initialState,
  reducers: {
    login: (state, { payload }: PayloadAction<string>) => {
      if (payload.length > usernameMinLength) {
        return { status: CheckState.succeed, username: payload };
      }
      return state;
    },
    logout: () => ({
      username: "",
      status: CheckState.failed,
    }),
  },
});

export const { reducer, actions } = loginSlice;
import {auth} from './authReducer';

const INITIALIZING_SUCCESS = 'INITIALIZING_SUCCESS';

type InitialStateType = {
    initialized:boolean,
}
const initialState: InitialStateType = {
    initialized: false,
}
const appReducer = (state = initialState, action:any):InitialStateType  => {
    switch (action.type) {
        case INITIALIZING_SUCCESS:
            return {
                ...state,
                initialized: true
            };
        default:
            return state;
    }
};

type InitializedSuccessActionType = {
    type: typeof INITIALIZING_SUCCESS
}

const initializedSuccess = ():InitializedSuccessActionType => ({type: INITIALIZING_SUCCESS});

export const initializeApp = () => (dispatch:any)


u8be6\u7ec6\u8c03\u67e5\uff0c\u4ee5\u5f85\u5176\u6240\u5c5e\u56fd\u5bb6\u4e0e\u6211\u5efa\u7acb\u5916\u4ea4\u5173\u7cfb\u540e\u5904\u7406\u4ed6\u4eec\u7684\u95ee\u9898\u65f6\u4e4b\u4f9d\u636e\u3002", "type": "paragraph"}, {"text": "\uff08\u56db\uff09\u540c\u610f\u5357\u4eac\u5e02\u59d4\u7533\u9677\u7535\u5bf9\u5f20\u56fd\u5174\u3001\u9976\u5f15\u4e4b\u7684\u5404\u9879\u529e\u6cd5\u3002", "type": "paragraph"}, {"text": "\u00a0\u4e2d  \u592e\u9149\u6c5f", "type": "paragraph"}, {"text": "\u9644\u4e00\uff1a", "type": "paragraph"}, {"text": "\u4e0a\u6d77\u5e02\u59d4\u5173\u4e8e\u56fd\u9645\u65b0\u95fb\u7535\u95ee\u9898\u7684\u8bf7\u793a", "type": "subtitle"}, {"text": "\uff08\u4e00\u4e5d\u56db\u4e5d\u5e74\u516b\u6708\u4e8c\u5341\u56db\u65e5\uff09", "type": "subtitle"}, {"text": "\u5173\u4e8e\u56fd\u9645\u65b0\u95fb\u7535\u95ee\u9898\uff0c\u6309\u4e00\u4e5d\u4e09\u516b\u5e74\u300a\u5f00\u7f57\u516c\u7ea6\u300b\uff0c\u65b0\u95fb\u7535\u4e3e\u529e\u4e0e\u5426\uff0c\u4e43\u5404\u56fd\u4e4b\u81ea\u7531\u3002\u5c06\u6765\u5982\u4e3e\u529e\u6b64\u4e1a\u52a1\uff0c\u5219\u7535\u8d39\u5728\u6b27\u6d32\u7cfb\u7edf\u4e3a\u79c1\u4eba\u7535\u4e4b\u4e00\u534a\uff0c\u5728\u5176\u4ed6\u5404\u5730\uff0c\u5219\u6709\u4e24\u56fd\u95f4\u53cc\u8fb9\u534f\u5b9a\uff0c\u4e0d\u5f97\u8d85\u8fc7\u4e00\u534a\u3002\u4e2d\u56fd\u8fc7\u53bb\u4e0e\u5404\u56fd\u8ba2\u6709\u4e0d\u540c\u4


; i += columns {

		// print a line with the actual values
		fmt.Printf("%*s//", indent, "")
		for j := 0; j < columns; j += 1 {
			// log_x, idx := indexFunc(i + j)
			fmt.Printf(" %4d", i+j)
		}
		fmt.Printf("\n")

		// print a line with the actual log_2(x) values
		fmt.Printf("%*s//", indent, "")
		for j := 0; j < columns; j += 1 {
			log_x, _ := indexFunc(i + j)
			fmt.Printf(" %4.1f", log_x)
			// fmt.Printf(" %3.0f", i+j)
		}
		fmt.Printf("\n")
		// fmt.Printf("%*s// log_2(%d .. %d)\n", indent, "", int(i), int(i+columns-1))

		// print a line with the corresponding decimal value
		// fmt.Printf("%*s ", indent, "")
		fmt.Printf("%*s ", indent, "")
		for j := 0; j < columns; j += 1 {
			_, idx := indexFunc(i + j)
			fmt.Printf(" %3d,", idx)
		}
		fmt.Printf("\n")
		fmt.Printf("\n")
	}
	fmt.Printf("    }\n")
}

// Generate go code for an array mapping the indexes of a bucketized statistic
// array to the corresponding BucketInfo.
//
// indexFunc() is either our tweaked version of log2(x) or logRoot2(x) for the
// table with float64 being the actual value and int being the bucket index its
// mapped to.
func genBucketTable(name string, indexFunc func(int) (float64, uint),
	nBucket uint, bucketsPerBit uint) {

	var (
		indent int = 8
	)

	if bucketsPerBit != 1 && bucketsPerBit != 2 {
		panic(fmt.Sprintf("genBucketTable(): bucketsPerBit must be 1 or 2: bucketsPerBit %d", bucketsPerBit))
	}

	// create the same array that genIdxTable creates, but extend it to
	// 9 bits so we can walk the value of 255 upto the next index change
	var idxTable [512]uint
	for i := 0; i < 256; i += 1 {
		_, idxTable[i] = indexFunc(i)
	}
	for i := 256; i < 512; i += 1 {
		idxTable[i] = idxTable[i>>1] + 1
	}

	fmt.Printf("var %s = [%d]BucketInfo {\n", name, nBucket)
	fmt.Printf("%*s/*0*/ { RangeLow: 0, RangeHigh: 0, NominalVal: 0, MeanVal: 0 },\n",
		indent, "")

	// compute and print BucketInfo for the other buckets
	var rangeHigh uint64 = 0
	for i := uint(1); i < nBucket; i += 1 {

		// start right after the previous entry
		rangeLow := rangeHigh + 1

		// calculate the nominal value of this bucket; use exponent (i - 1)
		// because bucket 0 is used for 0 and that causes subsequent
		// indexes to be offset for all the log base 2 buckets, but with
		// log base sqrt(2) buckets the indexes eventually converge
		var nominal uint64
		if bucketsPerBit == 1 {
			nominal = uint64(1) << (i - 1)
		} else {
			nominal = powRoot2(i)
		}

		// the value for rangeHigh is one less then the value that maps
		// to a new index
		var (
			idxOffset     uint   = 0
			scaledNominal uint64 = nominal
		)
		for scaledNominal >= 256 {
			scaledNominal >>= 1
			idxOffset += bucketsPerBit
		}
		if idxTable[scaledNominal] != i-idxOffset {


              // regData
      0xE01F1FDF,                           // regMask
    }}
  },
  {
    DeemphasisRegister,
    {
      AMD_FAMILY_10,                      // CpuFamily
      AMD_F10_C3                               // CpuRevision
    },
    {AMD_PF_ALL},                           // platformFeatures
    {{
      DEEMPHASIS_LEVEL__11,
      HTPHY_LINKTYPE_SL1_HT3,               //
      0xD5,                                 // Address
      0xC01F0DC0,                           // regData
      0xE01F1FDF,                           // regMask
    }}
  },
  {
    DeemphasisRegister,
    {
      AMD_FAMILY_10,                      // CpuFamily
      AMD_F10_C3                               // CpuRevision
    },
    {AMD_PF_ALL},                           // platformFeatures
    {{
      DEEMPHASIS_LEVEL__11_8,
      HTPHY_LINKTYPE_SL0_HT3,               //
      0xC5,                                 // Address
      0xE01F06C7,                           // regData
      0xE01F1FDF,                           // regMask
    }}
  },
  {
    DeemphasisRegister,
    {
      AMD_FAMILY_10,                      // CpuFamily
      AMD_F10_C3                               // CpuRevision
    },
    {AMD_PF_ALL},                           // platformFeatures
    {{
      DEEMPHASIS_LEVEL__11_8,
      HTPHY_LINKTYPE_SL1_HT3,               //
      0xD5,                                 // Address
      0xE01F06C7,                           // regData
      0xE01F1FDF,                           // regMask
    }}
  },
};

CONST REGISTER_TABLE ROMDATA F10RevCHtPhyRegisterTable = {
  PrimaryCores,
  (sizeof (F10RevCHtPhyRegisters) / sizeof (TABLE_ENTRY_FIELDS)),
  F10RevCHtPhyRegisters
};


},
	{1135, "", ""},
	{1136, "EDC8136I", "File is not a STREAM."},
	{1137, "EDC8137I", "STREAMS ioctl() timeout."},
	{1138, "EDC8138I", "No STREAMS resources."},
	{1139, "EDC8139I", "The message identified by set_id and msg_id is not in the message catalog."},
	{1140, "EDC8140I", "Bad message."},
	{1141, "EDC8141I", "Identifier removed."},
	{1142, "", ""},
	{1143, "", ""},
	{1144, "EDC8144I", "The link has been severed."},
	{1145, "", ""},
	{1146, "", ""},
	{1147, "", ""},
	{1148, "EDC8148I", "Protocol error."},
	{1149, "EDC8149I", "Multihop not allowed."},
	{1150, "", ""},
	{1151, "", ""},
	{1152, "EDC8152I", "The asynchronous I/O request has been canceled."},
	{1159, "EDC8159I", "Function call was interrupted before any data was received."},
	{1160, "EDC8160I", "Socket reuse is not supported."},
	{1161, "EDC8161I", "The file system cannot currently be moved."},
}

// Signal table
var signalList = [...]struct {
	num  Signal
	name string
	desc string
}{
	{1, "SIGHUP", "hangup"},
	{2, "SIGINT", "interrupt"},
	{3, "SIGABT", "aborted"},
	{4, "SIGILL", "illegal instruction"},
	{5, "SIGPOLL", "pollable event"},
	{6, "SIGURG", "urgent I/O condition"},
	{7, "SIGSTOP", "stop process"},
	{8, "SIGFPE", "floating point exception"},
	{9, "SIGKILL", "killed"},
	{10, "SIGBUS", "bus error"},
	{11, "SIGSEGV", "segmentation fault"},
	{12, "SIGSYS", "bad argument to routine"},
	{13, "SIGPIPE", "broken pipe"},
	{14, "SIGALRM", "alarm clock"},
	{15, "SIGTERM", "terminated"},
	{16, "SIGUSR1", "user defined signal 1"},
	{17, "SIGUSR2", "user defined signal 2"},
	{18, "SIGABND", "abend"},
	{19, "SIGCONT", "continued"},
	{20, "SIGCHLD", "child exited"},
	{21, "SIGTTIN", "stopped (tty input)"},
	{22, "SIGTTOU", "stopped (tty output)"},
	{23, "SIGIO", "I/O possible"},
	{24, "SIGQUIT", "quit"},
	{25, "SIGTSTP", "stopped"},
	{26, "SIGTRAP", "trace/breakpoint trap"},
	{27, "SIGIOER", "I/O error"},
	{28, "SIGWINCH", "window changed"},
	{29, "SIGXCPU", "CPU time limit exceeded"},
	{30, "SIGXFSZ", "file size limit exceeded"},
	{31, "SIGVTALRM", "virtual timer expired"},
	{32, "SIGPROF", "profiling timer expired"},
	{33, "SIGDANGER", "danger"},
	{34, "SIGTHSTOP", "stop thread"},
	{35, "SIGTHCONT", "continue thread"},
	{37, "SIGTRACE", "trace"},
	{38, "", "DCE"},
	{39, "SIGDUMP", "dump"},
}
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package cpu

import (
	"runtime"
)

// byteOrder is a subset of encoding/binary.


> PetFlags { get; set; }
        public System.Nullable<byte> ShapeshiftForm { get; set; }
        public System.Nullable<int> AttackPower { get; set; }
        public System.Nullable<int> AttackPowerModPos { get; set; }
        public System.Nullable<int> AttackPowerModNeg { get; set; }
        public System.Nullable<float> AttackPowerMultiplier { get; set; }
        public System.Nullable<int> RangedAttackPower { get; set; }
        public System.Nullable<int> RangedAttackPowerModPos { get; set; }
        public System.Nullable<int> RangedAttackPowerModNeg { get; set; }
        public System.Nullable<float> RangedAttackPowerMultiplier { get; set; }
        public System.Nullable<int> SetAttackSpeedAura { get; set; }
        public System.Nullable<float> Lifesteal { get; set; }
        public System.Nullable<float> MinRangedDamage { get; set; }
        public System.Nullable<float> MaxRangedDamage { get; set; }
        public System.Nullable<float> MaxHealthModifier { get; set; }
        public System.Nullable<float> HoverHeight { get; set; }
        public System.Nullable<int> MinItemLevelCutoff { get; set; }
        public System.Nullable<int> MinItemLevel { get; set; }
        public System.Nullable<int> MaxItemLevel { get; set; }
        public System.Nullable<int> WildBattlePetLevel { get; set; }
        public


_parser_patch("dram_para", "dram_tpr2", &addr[12], 1);
	script_parser_patch("dram_para", "dram_tpr3", &addr[13], 1);
	script_parser_patch("dram_para", "dram_tpr4", &addr[14], 1);
	script_parser_patch("dram_para", "dram_tpr5", &addr[15], 1);
	script_parser_patch("dram_para", "dram_tpr6", &addr[16], 1);
	script_parser_patch("dram_para", "dram_tpr7", &addr[17], 1);
	script_parser_patch("dram_para", "dram_tpr8", &addr[18], 1);
	script_parser_patch("dram_para", "dram_tpr9", &addr[19], 1);
	script_parser_patch("dram_para", "dram_tpr10", &addr[20], 1);
	script_parser_patch("dram_para", "dram_tpr11", &addr[21], 1);
	script_parser_patch("dram_para", "dram_tpr12", &addr[22], 1);
	script_parser_patch("dram_para", "dram_tpr13", &addr[23], 1);
	puts("dram_para_set end\n");

	return 0;
}

#ifdef CONFIG_GENERIC_MMC

extern int sunxi_mmc_init(int sdc_no);

int board_mmc_init(bd_t *bis)
{
	sunxi_mmc_init(bis->bi_card_num);

	return 0;
}

void board_mmc_pre_init(int card_num)
{
    bd_t *bd;

	bd = gd->bd;
	gd->bd->bi_card_num = card_num;
	mmc_initialize(bd);
    //gd->bd->bi_card_num = card_num;
}

int board_mmc_get_num(void)
{
    return gd->boot_card_num;
}

void board_mmc_set_num(int num)
{
    gd->boot_card_num = num;
}

//int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) {
//
//	*env_addr = sunxi_partition_get_offset_byname(CONFIG_SUNXI_ENV_PARTITION);
//	return 0;
//}
#endif

#ifdef CONFIG_DISPLAY_BOARDINFO
int checkboard(void)
{
	tick_printf("Board: SUN6I\n");
	return 0;
}
#endif

int cpu0_set_detected_paras(void)
{
	return 0;
}

extern int geth_initialize(bd_t *bis);
#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
       int rc = 0;
#ifdef CONFIG_SUNXI_GETH
       rc = geth_initialize(bis);
#endif
       return rc;
}
#endif


nts
            end_theta = self.theta1 + (i + 1) * self.theta_arc / num_segments

            t = (4 / 3) * tan(0.25 * (end_theta - start_theta))
            if not isfinite(t):
                return

            sin_start_theta = sin(start_theta)
            cos_start_theta = cos(start_theta)
            sin_end_theta = sin(end_theta)
            cos_end_theta = cos(end_theta)

            point1 = complex(
                cos_start_theta - t * sin_start_theta,
                sin_start_theta + t * cos_start_theta,
            )
            point1 += self.center_point
            target_point = complex(cos_end_theta, sin_end_theta)
            target_point += self.center_point
            point2 = target_point
            point2 += complex(t * sin_end_theta, -t * cos_end_theta)

            point1 = _map_point(point_transform, point1)
            point2 = _map_point(point_transform, point2)
            target_point = _map_point(point_transform, target_point)

            yield point1, point2, target_point

    def draw(self, pen):
        for point1, point2, target_point in self._decompose_to_cubic_curves():
            pen.curveTo(
                (point1.real, point1.imag),
                (point2.real, point2.imag),
                (target_point.real, target_point.imag),
            )


using andywiecko.BurstCollections;
using System;

namespace andywiecko.PBD2D.Core
{
    public readonly struct IdPair<T> : IEquatable<IdPair<T>>
    {
        public readonly Id<T> Id1, Id2;
        public IdPair(Id<T> id1, Id<T> id2) => (Id1, Id2) = (id1, id2);
        public readonly void Deconstruct(out Id<T> id1, out Id<T> id2) => (id1, id2) = (Id1, Id2);
        public static implicit operator IdPair<T>((Id<T> id1, Id<T> id2) tuple) => new(tuple.id1, tuple.id2);
        public override string ToString() => $"({Id1}, {Id2})";
        public bool Equals(IdPair<T> other) => Id1 == other.Id1 && Id2 == other


ptionPrecedence precedence);
        InterceptionFilter INTERCEPTION_API interception_get_filter(InterceptionContext context, InterceptionDevice device);
        void INTERCEPTION_API interception_set_filter(InterceptionContext context, InterceptionPredicate predicate, InterceptionFilter filter);
        InterceptionDevice INTERCEPTION_API interception_wait(InterceptionContext context);
        InterceptionDevice INTERCEPTION_API interception_wait_with_timeout(InterceptionContext context, unsigned long milliseconds);
        int INTERCEPTION_API interception_send(InterceptionContext context, InterceptionDevice device, const InterceptionStroke *stroke, unsigned int nstroke);
        int INTERCEPTION_API interception_receive(InterceptionContext context, InterceptionDevice device, InterceptionStroke *stroke, unsigned int nstroke);
        unsigned int INTERCEPTION_API interception_get_hardware_id(InterceptionContext context, InterceptionDevice device, void *hardware_id_buffer, unsigned int buffer_size);
        int INTERCEPTION_API interception_is_invalid(InterceptionDevice device);
        int INTERCEPTION_API interception_is_keyboard(InterceptionDevice device);
        int INTERCEPTION_API interception_is_mouse(InterceptionDevice device);
        */
    }
}


vetica, Arial, Verdana,

@font-family-sans-serif: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans","wenquanyi micro hei","Hiragino Sans GB", "Hiragino Sans GB W3", "FontAwesome", sans-serif;

@font-family-serif: Georgia, "Times New Roman", Times, SimSun, "FontAwesome", serif; //FangSong, STFangSong

@font-family-monospace: Monaco, Menlo, Consolas, "Courier New", "FontAwesome", monospace;

@font-family-kai: Georgia, "Times New Roman", Times, Kai, "Kaiti SC", KaiTi, BiauKai, "FontAwesome", serif;

// Font  size
// -----------------------------------------------------------------------------

@global-font-size:				1.6rem; //16px
@global-line-height:			1.6;
@font-size-base:          @global-font-size;

@line-height-base:        @global-line-height;
@line-height-computed:    floor(@font-size-base * @line-height-base); // 2

@font-size-xxs:           @global-font-size - 0.6; // 10px - 1rem
@font-size-xs:            @global-font-size - 0.4; // 12px
@font-size-sm:            @global-font-size - 0.2; // 14px
//@font-size-default:     @global-font-size;       // 16px
@font-size-lg:            @global-font-size + 0.2; // 18px
@font-size-xl:            @global-font-size + 0.8; // 24px
@font-size-xxl:           @global-font-size * 2;   // 32px
@font-size-xxxl:          @global-font-size * 2 + 1; // 42px

// Global spacing
// =============================================================================

@global-spacing:                1.6rem;

@global-spacing-xs:             0.5rem;
@global-spacing-sm:             1rem;
@global-spacing-lg:             2.4rem;
@global-spacing-xl:             3.2rem;

// Margin
// -----------------------------------------------------------------------------

@global-margin:									  @global-spacing;

@global-margin-xs:							  @global-spacing-xs;
@global-margin-sm:							  @global-spacing-sm;

@global-margin-lg:							  @global-spacing-lg;
@global-margin-xl:							  @global-spacing-xl;

// Border radius
// -----------------------------------------------------------------------------

@global-radius:         0;
@radius-normal:         2px;
@radius-lg:             5px;
@radius-sm:             1px;

@global-rounded:         1000px;
@global-square:           0;

// Responsive variables
// =============================================================================

// Breakpoint
// -----------------------------------------------------------------------------

@breakpoint-small:            640px;  // 0 - 640px
@breakpoint-medium:           1024px; // 641 - 1024px
@breakpoint-large:            1280px; // 1025 - 1280px
@breakpoint-xl:               1440px; // 1281 - 1440px
@breakpoint-xxl:              1920px; // 1441 -1920px

@breakpoint-small-max:        @breakpoint-small;
@breakpoint-md:               @breakpoint-small-max; // legacy var, DO NOT USE IT

@breakpoint-medium-min:       (@breakpoint-small + 1);
@breakpoint-medium-max:       @breakpoint-medium;

@breakpoint-large-min:        (@breakpoint-medium + 1);
@breakpoint-large-max:        @breakpoint-large;

@breakpoint-xl-min:           (@breakpoint-large + 1);
@breakpoint-xl-max:           @breakpoint-xl;

@breakpoint-xxl-min:          (@breakpoint-xl + 1);
@breakpoint-xxl-max:


.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */---
---

/*!
 * Bootstrap v3.3.6 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */

// Core variables and mixins
@import "vendor/bootstrap/variables";
@import "vendor/bootstrap/mixins";

// Reset and dependencies
@import "vendor/bootstrap/normalize";
@import "vendor/bootstrap/print";

// Core CSS
@import "vendor/bootstrap/scaffolding";
@import "vendor/bootstrap/type";
@import "vendor/bootstrap/code";
@import "vendor/bootstrap/grid";
@import "vendor/bootstrap/tables";
@import "vendor/bootstrap/forms";
@import "vendor/bootstrap/buttons";

// Components
@import "vendor/bootstrap/component-animations";
@import "vendor/bootstrap/dropdowns";
@import "vendor/bootstrap/button-groups";
@import "vendor/bootstrap/input-groups";
@import "vendor/bootstrap/navs";
@import "vendor/bootstrap/navbar";
@import "vendor/bootstrap/breadcrumbs";
@import "vendor/bootstrap/pagination";
@import "vendor/bootstrap/pager";
@import "vendor/bootstrap/labels";
@import "vendor/bootstrap/badges";
@import "vendor/bootstrap/jumbotron";
@import "vendor/bootstrap/thumbnails";
@import "vendor/bootstrap/alerts";
@import "vendor/bootstrap/media";
@import "vendor/bootstrap/list-group";
@import "vendor/bootstrap/panels";
@import "vendor/bootstrap/responsive-embed";
@import "vendor/bootstrap/wells";
@import "vendor/bootstrap/close";

// Utility classes
@import "vendor/bootstrap/utilities";
@import "vendor/bootstrap/responsive-utilities";
// https://github.com/twbs/bootstrap-sass/blob/3.3-stable/assets/stylesheets/bootstrap/mixins/_gradients.scss#L17-L27

// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
  background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent);  // Safari 5.1-6, Chrome 10+
  background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent);  // Opera 12
  background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
  background-repeat: repeat-x;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
}
.select2-selection--multiple {
  background-color: white;

  border: 1px solid $border-color;
  border-radius: $border-radius;

  cursor: text;

  outline: 0;

  &:focus {
    border: 1px solid $focus-border-color;
  }

  .select2-selection__rendered {
    list-style: none;
    margin: 0;
    padding: 0 5px;
  }

  .select2-selection__clear {
    display: none;
  }

  .select2


是否符合土地复垦标准以及土地复垦方案的要求，核实复垦后的土地类型、面积和质量等情况，并将初步验收结果公告，听取相关权利人的意见。相关权利人对土地复垦完成情况提出异议的，国土资源主管部门应当会同有关部门进一步核查，并将核查情况向相关权利人反馈；情况属实的，应当向土地复垦义务人提出整改意见。

第二十九条 负责组织验收的国土资源主管部门应当会同有关部门在接到土地复垦验收申请之日起60个工作日内完成验收，经验收合格的，向土地复垦义务人出具验收合格确认书；经验收不合格的，向土地复垦义务人出具书面整改意见，列明需要整改的事项，由土地复垦义务人整改完成后重新申请验收。

第三十条 政府投资的土地复垦项目竣工后，负责组织实施土地复垦项目的国土资源主管部门应当依照本条例第二十八条第二款的规定进行初步验收。初步验收完成后，负责组织实施土地复垦项目的国土资源主管部门应当按照国务院国土资源主管部门的规定向上级人民政府国土资源主管部门申请最终验收。上级人民政府国土资源主管部门应当会同有关部门及时组织验收。

土地权利人自行复垦或者社会投资进行复垦的土地复垦项目竣工后，由负责组织实施土地复垦项目的国土资源主管部门会同有关部门进行验收。

第三十一条 复垦为农用地的，负责组织验收的国土资源主管部门应当会同有关部门在验收合格后的5年内对土地复垦效果进行跟踪评价，并提出改善土地质量的建议和措施。

## 第五章 土地复垦激励措施

第三十二条 土地复垦义务人在规定的期限内将生产建设活动损毁的耕地、林地、牧草地等农用地复垦恢复原状的，依照国家有关税收法律法规的规定退还已经缴纳的耕地占用税。

第三十三条 社会投资复垦的历史遗留损毁土地或者自然灾害损


ojektet støtter

Indvan

rbro/ soner  mødre, misbrugere og

op om

drere

Kong  på

ældre, samt børn og

Inklusionspolitikke

og

Dansk

ens

frivilli unge med henblik på

ns mål om, at flere

flygtni Etnisk

En ny chance  Engha g

at forbedre deres liv

skal opleve at høre

105 nge

Samvirke

til alle

ve

basis og netværk.

60

7 2012

20000

54.000 Nej Nej

20.000 til i København,

Søg
es

Tilsv.

Antal

Tidl.

Tidl. §

Målgr AnsøgerNav

Aktiv

borge Frivill §18

18

Ansøgt

3åri tilbud i

Indstillet

Nr uppen n

Projekttitel

Bydel itet

Hovedformål

re

ige

årstal beløb

beløb

g?

kommune beløb

Begrundelse

Formålet rettet mod
indvander grupper af
kvinder og piger har
ikke forståelse for
hvilken rolle motion
spiller i menneskets
liv. det Har ikke
tradition for motion
og fysisk træning.
Derfor er det meget
vigtigt at give dem et
skub.
Motion kan forbedre
helbred&#


, LEFT, emptySet(), DOWN),
      ClientKeyEvent(42, 0xFFFF.toChar(), VK.SHIFT, LEFT, emptySet(), UP),
    )

    handleEventsAndTest(initial, expected)
  }

  @Test
  @Ignore
  fun macSafariBrazilian3() = runTest {
    // a composition of SHIFT + ' (to get ^), release everything and then type d

    val initial = """
      keydown: 3441023 Shift ShiftLeft false 16 undefined
      compositionstart: 3441315 undefined undefined false undefined
      compositionupdate: 3441315 undefined undefined false undefined ^
      input: 3441317 undefined undefined false undefined ^
      keydown: 3441247.0000000005 Dead Quote false 229 undefined
      keyup: 3441335 " Quote false 222 undefined
      keyup: 3441471 Shift ShiftLeft false 16 undefined
      input: 3441822 undefined undefined false undefined null
      input: 3441824 undefined undefined false undefined ^
      compositionend: 3441825.0000000005 undefined undefined false undefined ^
      keydown: 3441751 ^d KeyD false 68 undefined
      input: 3441834.0000000005 undefined undefined false undefined d
      keyup: 3441831 d KeyD false 68 undefined
    """.trimIndent().lines().map(String::toEvent)

    assertEquals(13, initial.size)

    val expected = listOf(
      ClientKeyPressEvent(42, '^', emptySet()),
      ClientKeyPressEvent(42, 'd', emptySet()),
      ClientKeyEvent(42, 0xFFFF.toChar(), VK.SHIFT, LEFT, emptySet(), DOWN),
      ClientKeyEvent(42, 0xFFFF.toChar(), VK.SHIFT, LEFT, emptySet(), UP),
    )

    handleEventsAndTest(initial, expected)
  }

  @Test
  fun macChromiumBrazilian3() = runTest {
    // a composition of SHIFT + ' (to get ^), release everything and then type d

    val initial = """
      keydown: 3141562.5999999996 Shift ShiftLeft false 16 undefined
      keydown: 3141810.5600000005 Dead Quote false 229 undefined
      compositionstart: 3141813.92 undefined undefined false undefined
      compositionupdate: 3141814.1 undefined undefined false undefined ^
      input: 3141815.045 undefined undefined false undefined ^
      keyup: 3141898.57 Dead Quote false 222 undefined
      keyup: 3141986.58 Shift ShiftLeft false 16 undefined
      keydown: 3142298.585 d KeyD false 229 undefined
      compositionupdate: 3142302.875 undefined undefined false undefined ^d
      input: 3142303.8950000005 undefined undefined false undefined ^d
      compositionend: 3142303.9450000003 undefined undefined false undefined ^d
      keyup: 3142394.5850000004 d KeyD false 68 undefined
    """.trimIndent().lines().map(String::toEvent)

    assertEquals(12, initial.size)

    val expected = listOf(
      ClientKeyPressEvent(42, '^', emptySet()),
      ClientKeyPressEvent(42, 'd', emptySet()),
      ClientKeyEvent(42, 0xFFFF.toChar(), VK.SHIFT, LEFT, emptySet(), DOWN),
      ClientKeyEvent(42, 0xFFFF.toChar(), VK.SHIFT, LEFT, emptySet(), UP),
    )

    handleEventsAndTest(initial, expected)
  }

  private companion object {

    private suspend fun handleEventsAndTest(
      initial: List<Event>,
      expected: List<ClientEvent>,
    ) {
      val actual = mutableListOf<ClientEvent>()

      val handler = ImeInputMethodEventHandler(42, actual::add, clearInputField = {})
      initial.forEach(handler::handleEvent)

      delay(1000)

      assertEqualsWithoutTimeStamp(expected, actual)
    }

    // https://youtrack.jetbrains.com/issue/KT-22228#focus=Comments-27-3964713.0-0
    fun runTest(block: suspend () -> Unit): dynamic = GlobalScope.promise { block() }
  }
}
/*
 * Copyright (c) 2019-2023, JetBrains s.r.o. and/or its affiliates. All ri


is library does not by itself cause the resulting executable to
;   be covered by the GNU General Public License. This exception does
;   not however invalidate any other reasons why the executable file
;   might be covered by the GNU General Public License.
;-------------------------------------------------------------------------

	.module fabsf

;--------------------------------------------------------
; exported symbols
;--------------------------------------------------------
	.globl _fabsf

;--------------------------------------------------------
; local aliases
;--------------------------------------------------------

	.define res2  "___SDCC_m6502_ret2"
	.define res3  "___SDCC_m6502_ret3"

;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CODE
;------------------------------------------------------------

_fabsf:
	lda	*_fabsf_PARM_1+3
	and	#0x7f
	sta	res3
	lda	*_fabsf_PARM_1+2
	sta	res2
	ldx	*(_fabsf_PARM_1 + 1)
	lda	*(_fabsf_PARM_1 + 0)
	rts


/// The admin user.
    user: GhUserRecord,
    /// The permissions of the admin user.
    permissions: Vec<String>,
}

/// This is the context that goes to the template itself. This should always be
/// in the `auth` field of a template context.
#[derive(Debug, Serialize)]
pub struct AdminOnlyContext {
    /// The user.
    user: TemplateContextUser,
}

impl AdminOnly {
    /// Produces a serializable context that can be passed to a template.
    pub fn to_context(&self) -> AdminOnlyContext {
        AdminOnlyContext {
            user: TemplateContextUser {
                id: self.user.id,
                login: self.user.login.clone(),
                html_url: self.user.html_url.clone(),
                avatar_url: self.user.avatar_url.clone(),
                permissions: self.permissions.clone(),
            },
        }
    }
}

#[derive(Debug, Error)]
pub enum AdminOnlyError {
    #[error("The user is not an admin")]
    NotAdmin,

    #[error("No user is logged in")]
    NotLoggedIn,

    #[error("Could not get a connection from the pool with error {0}")]
    DbPoolError(#[from] diesel::r2d2::PoolError),

    #[error("Could not parse uid from cookie with error {0}")]
    UserIdDecodeError(#[from] ParseIntError),

    #[error("Could not query the database with error {0}")]
    DbQueryError(#[from] ModelError),
}

#[rocket::async_trait]
impl<'a, 'r> FromRequest<'a, 'r> for AdminOnly {
    type Error = AdminOnlyError;

    async fn from_request(req: &'a Request<'r>) -> Outcome<Self, Self::Error> {
        match auth_from_request(req) {
            Ok(Some((user, permissions))) => {
                if permissions.contains(&"admin".to_string()) {
                    Outcome::Success(AdminOnly { user, permissions })
                } else {
                    Outcome::Failure((
                        Status::Forbidden,
                        AdminOnlyError::NotAdmin,
                    ))
                }
            }
            Ok(None) => Outcome::Failure((
                Status::Forbidden,
                AdminOnlyError::NotLoggedIn,
            )),
            Err(e) => match e {
                AuthFromRequestError::DbPoolError(e) => Outcome::Failure((
                    Status::InternalServerError,
                    AdminOnlyError::DbPoolError(e),
                )),
                AuthFromRequestError::UserIdDecodeError(e) => Outcome::Failure(
                    (Status::BadRequest, AdminOnlyError::UserIdDecodeError(e)),
                ),
                AuthFromRequestError::DbQueryError(e) => Outcome::Failure((
                    Status::BadRequest,
                    AdminOnlyError::DbQueryError(e),
                )),
            },
        }
    }
}

use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct UnderlyingPaymentStreamFinalPricePaymentDate {
	/// UnderlyingPaymentStreamFinalPricePaymentDateUnadjusted
	#[serde(skip_serializing_if = "Option::is_none")]
	#[serde(rename = "42949")]
	pub underlying_payment_stream_final_price_payment_date_unadjusted: Option<fix_common::LocalMktDate>,
	/// UnderlyingPaymentStre


ssistant.",
			}, compose.WithCheckPointID(checkPointID))
			assert.Error(t, err)

			info, existed := compose.ExtractInterruptInfo(err)
			assert.True(t, existed)
			assert.Equal(t, "what's your name?", info.State.(*compose2.State).
				IntermediateResult[ns.Key][qa.QuestionsKey].([]map[string]any)[0][qa.QuestionKey].(string))

			qaCount++
			answer := "my name is eino"
			stateModifier := func(ctx context.Context, path compose.NodePath, state any) error {
				state.(*compose2.State).ResumeData[ns.Key] = answer
				return nil
			}
			_, err = wf.Runner.Invoke(ctx, map[string]any{}, compose.WithCheckPointID(checkPointID), compose.WithStateModifier(stateModifier))
			assert.Error(t, err)
			info, existed = compose.ExtractInterruptInfo(err)
			assert.True(t, existed)

			qaCount++
			answer = "my age is 1 years old"
			stateModifier = func(ctx context.Context, path compose.NodePath, state any) error {
				state.(*compose2.State).ResumeData[ns.Key] = answer
				return nil
			}
			out, err := wf.Runner.Invoke(ctx, map[string]any{}, compose.WithCheckPointID(checkPointID), compose.WithStateModifier(stateModifier))
			assert.NoError(t, err)
			assert.Equal(t, map[string]any{
				qa.UserResponseKey: answer,
				"name":             "eino",
				"age":              int64(1),
			}, out)
		})
	})
}
/*
 * Copyright 2025 coze-dev Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package adaptor

import (
	"context"
	"io"
	"net"
	"net/http"
	"net/http/httptest"
	"os"
	"strings"
	"testing"
	"time"

	"github.com/coze-dev/coze-studio/backend/domain/workflow/config"

	"github.com/bytedance/mockey"
	"github.com/cloudwego/eino/schema"
	"github.com/stretchr/testify/assert"
	"go.uber.org/mock/gomock"

	crossmodel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
	"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
	workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
	crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
	"github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock"
	crossknowledge "github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge"
	"github.com/coze-dev/coze-studio/backend/crossdomain/contract/knowledge/knowledgemock"
	crossmodelmgr "github.com/coze-dev/coze-studio/backend/crossdomain/contract/modelmgr"
	mockmodel "github.com/coze-dev/coze-studio/backend/crossdomain/contract/modelmgr/modelmock"


(--gray-18);
    }
    to {
      background-color: var(--gray-2);
    }
  }
  #mw-panel .portal:not(#p-navigation) .body {
    background-image: linear-gradient(to top, transparent, var(--gray-c));
    background-size: auto 1px;
  }
}

  /*** Navigation menu logo ***/
  #p-logo a {
    background-position: center -155px !important;
    display: table-cell !important;
    vertical-align: middle !important;
  }
  #p-logo a::before, #p-logo a::after {
    display: block !important;
    background: inherit !important;
    content: "" !important;
  }
  #p-logo a::before {
    background-position: center 0 !important;
    filter: brightness(90.5%) !important;
    height: 108px !important;
  }
  #p-logo a::after {
    background-position: center -108px !important;
    filter: invert(90.5%) !important;
    height: 47px !important;
  }
  a.image img[src*="Wikipedia-logo-v2.svg"] {
    background-color: inherit !important;
  }
  a.image img[src*="Wikipedia_wordmark.svg"] {
    filter: invert(1) brightness(90%);
  }
  /* Article assessment colors */
  .assess-fa-text, .assess-fl-text {
    color: var(--assess-1) !important;
  }
  .assess-a-text, .assess-al-text {
    color: var(--assess-2) !important;
  }
  .assess-ga-text {
    color: var(--assess-3) !important;
  }
  .assess-b-text, .assess-bl-text {
    color: var(--assess-4) !important;
  }
  .assess-c-text, .assess-cl-text {
    color: var(--assess-5) !important;
  }
  .assess-start-text {
    color: var(--assess-6) !important;
  }
  .assess-stub-text, .assess-sl-text {
    color: var(--assess-7) !important;
  }
  .assess-list-text {
    color: var(--assess-8) !important;
  }
  .assess-bplus-text {
    color: var(--assess-9) !important;
  }
  .assess-dab-text, .assess-setindex-text {
    color: var(--assess-10) !important;
  }
  .assess-cur-text {
    color: var(--assess-11) !important;
  }
  .assess-future-text {
    color: var(--assess-12) !important;
  }
  /* https://en.wikipedia.org/wiki/YAML fixes */
  td[style*="background: #FFFF66;"] {
    background: var(--yellow-2) !important;
  }
  td[style*="background: #ffd6ff;"] {
    background: var(--pink-3) !important;
  }
  a.image img[src*="System-installer.svg"], a.image img[src*="Graduation_cap"],
  a.image img[src*="Crystal_kcontrol"],
  a.image img[src*="Wikipedia_New_page_reviewer.svg"],
  a.image img[src*="Scale_of_justice_2.svg"],
  a.image img[src*="Crystal_kthememgr.svg"],
  a.image img[src*="Question_book-new.svg"] {
    background: inherit !important;
  }
  /* https://en.wikipedia.org/wiki/YAML


   Console.WriteLine(DateTime.Now + " End of multi thread test. Domain: " + Cat.Domain);
        }

        private static void Work()
        {
            Interlocked.Increment(ref nThreads);
            //Console.WriteLine(nThreads + " started.");
            int count = 0;
            var start = DateTime.Now;
            while (DateTime.Now - start < TimeSpan.FromMinutes(DURATION_MINUTES))
            {
                ITransaction root = Cat.NewTransaction("Multi-thread Root", "");
                ITransaction child = Cat.NewTransaction("Multi-thread child", "");
                Cat.LogEvent("Child event", "");
                child.Status = CatConstants.SUCCESS;
                child.Complete();
                root.Status = CatConstants.SUCCESS;
                root.Complete();
                count++;
                //if (count % (TOTAL_MESSAGES_PER_SECOND / N_THREADS) == 0)
                //{
                //    Thread.Sleep(1000);
                //}
            }
            Interlocked.Add(ref sum, count);
        }
    }
}


ik",sans-serif;font-weight:500}.promo-bonus__title{font-size:22px}@media (min-width: 320px){.promo-bonus__title{font-size:calc(22px + 24 * ((100vw - 320px) / 880))}}@media (min-width: 1200px){.promo-bonus__title{font-size:46px}}@media (min-width: 768px){.promo-bonus__title{margin:0 0 15px}}@media (max-width: 767px){.promo-bonus__title br{display:none}}.promo-bonus__text{margin:0 0 25px}.promo-bonus__text{font-size:14px}@media (min-width: 320px){.promo-bonus__text{font-size:calc(14px + 4 * ((100vw - 320px) / 880))}}@media (min-width: 1200px){.promo-bonus__text{font-size:18px}}@media (min-width: 768px){.promo-bonus__text{margin:0}}.promo-bonus__btn-wrp{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;margin:0 -10px;-ms-flex-order:1;order:1}@media (min-width: 768px){.promo-bonus__btn-wrp{-ms-flex-order:initial;order:initial}}.promo-bonus__btn-wrp--center{margin:25px 0 0;-ms-flex-pack:center;justify-content:center}@media (min-width: 768px){.promo-bonus__btn-wrp--mobile{display:none}}.promo-bonus__btn-wrp--desktop{display:none}@media (min-width: 768px){.promo-bonus__btn-wrp--desktop{display:-ms-flexbox;display:flex}}.promo-bonus__btn{margin:0 10px}.promo-bonus__btn:last-child{margin-top:5px}.promo-bonus__link{color:#fff;line-height:1;text-transform:uppercase;border-bottom:1px solid transparent;transition:0.25s all ease}.promo-bonus__link:hover,.promo-bonus__link:focus{color:#fff;border-bottom-color:#fff}.promo-bonus__table{-ms-flex-negative:0;flex-shrink:0;background:rgba(35,37,52,0.6);padding:10px;border-radius:6px}@media (min-width: 768px){.promo-bonus__table{min-width:250px;margin:0 0 0 5%}}.promo-bonus__row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #3b3c5c;margin:0;font-weight:500}.promo-bonus__row{font-size:14px}@media (min-width: 320px){.promo-bonus__row{font-size:calc(14px + 4 * ((100vw - 320px) / 880))}}@media (min-width: 1200px){.promo-bonus__row{font-size:18px}}.promo-bonus__row:last-child{border-bottom:none}.promo-bonus__name{padding:10px;color:#b9b9c1}@media (min-width: 768px){.promo-bonus__name{padding:10px 20px}}.promo-bonus__value{color:#fff;padding:10px}@media (min-width: 768px){.promo-bonus__value{padding:10px 20px}}.payments__banner{background:url("/resources/images/pages/payments/payments.jpg") no-repeat center/cover;min-height:250px;padding:20px 15px;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-


_type = "event queue"
	} else if a.Is(AccountFlagBids) {
		account_type = "bids"
	} else if a.Is(AccountFlagAsks) {
		account_type = "asks"
	}
	return fmt.Sprintf("%s %s", status, account_type)
}

type Side uint32

const (
	SideBid = iota
	SideAsk
)

type Market interface {
	GetAsks() solana.PublicKey
	GetBids() solana.PublicKey

	GetBaseMint() solana.PublicKey
	GetBaseLotSize() uint64

	GetQuoteMint() solana.PublicKey
	GetQuoteLotSize() uint64

	GetEventQueue() solana.PublicKey
	GetRequestQueue() solana.PublicKey
}

type MarketV1 struct {
	StartPadding       [5]byte `json:"-"`
	AccountFlags       AccountFlag
	OwnAddress         solana.PublicKey
	VaultSignerNonce   bin.Uint64
	BaseMint           solana.PublicKey
	QuoteMint          solana.PublicKey
	BaseVault          solana.PublicKey
	BaseDepositsTotal  bin.Uint64
	BaseFeesAccrued    bin.Uint64
	QuoteVault         solana.PublicKey
	QuoteDepositsTotal bin.Uint64
	QuoteFeesAccrued   bin.Uint64
	QuoteDustThreshold bin.Uint64
	RequestQueue       solana.PublicKey
	EventQueue         solana.PublicKey
	Bids               solana.PublicKey
	Asks               solana.PublicKey
	BaseLotSize        bin.Uint64
	QuoteLotSize       bin.Uint64
	FeeRateBPS         bin.Uint64
	EndPadding         [7]byte `json:"-"`
}

func (m *MarketV1) GetAsks() solana.PublicKey {
	return m.Asks
}

func (m *MarketV1) GetBids() solana.PublicKey {
	return m.Bids
}

func (m *MarketV1) GetBaseMint() solana.PublicKey {
	return m.BaseMint
}

func (m *MarketV1) GetBaseLotSize() uint64 {
	return uint64(m.BaseLotSize)
}

func (m *MarketV1) GetQuoteMint() solana.PublicKey {
	return m.QuoteMint
}

func (m *MarketV1) GetQuoteLotSize() uint64 {
	return uint64(m.QuoteLotSize)
}

func (m *MarketV1) GetEventQueue() solana.PublicKey {
	return m.EventQueue
}

func (m *MarketV1) GetRequestQueue() solana.PublicKey {
	return m.RequestQueue
}

func (m *MarketV1) Decode(in []byte) error {
	decoder := bin.NewDecoder(in)
	err := decoder.Decode(&m)
	if err != nil {
		return fmt.Errorf("unpack: %w", err)
	}
	return nil
}

type MarketV2 struct {
	// V1
	SerumPadding       [5]byte `json:"-"`
	AccountFlags       AccountFlag
	OwnAddress         solana.PublicKey
	VaultSignerNonce   bin.Uint64
	BaseMint           solana.PublicKey
	QuoteMint          solana.PublicKey
	BaseVault          solana.PublicKey
	BaseDepositsTotal  bin.Uint64
	BaseFeesAccrued    bin.Uint64
	QuoteVault         solana.PublicKey
	QuoteDepositsTotal bin.Uint64
	QuoteFeesAccrued   bin.Uint64
	QuoteDustThreshold bin.Uint64
	RequestQueue       solana.PublicKey
	EventQueue         solana.PublicKey
	Bids               solana.PublicKey
	Asks               solana.PublicKey
	BaseLotS


_Message", L["warn1"], "Important")
		self:ScheduleEvent("BigWigs_Message", 40, L["warn2"], "Urgent")
		self:TriggerEvent("BigWigs_StartBar", self, L["bar1text"], 45, "Interface\\Icons\\Spell_Arcane_Blink")
	elseif (sync == "ShazzrahDeadenMagic" and self.db.profile.selfbuff) then
		self:TriggerEvent("BigWigs_Message", L["warn3"], "Important")
	end
end


ets/yt_logo_dark.png'),
      ),
      actions: [
        IconButton(
          icon: const Icon(Icons.cast),
          onPressed: () {},
        ),
        IconButton(
          icon: const Icon(Icons.notifications_outlined),
          onPressed: () {},
        ),
        IconButton(
          icon: const Icon(Icons.search),
          onPressed: () {},
        ),
        IconButton(
          iconSize: 40.0,
          icon: CircleAvatar(
            foregroundImage: NetworkImage(currentUser.profileImageUrl),
          ),
          onPressed: () {},
        ),
      ],
    );
  }
}
export 'package:flutter_app_cap7/screens/details_screen.dart';
export 'package:flutter_app_cap7/screens/home_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app_cap7/widgets/casting_cards.dart';

import '../models/models.dart';

class DetailsScreen extends StatelessWidget {
  const DetailsScreen({super.key});

  @override
  Widget build(BuildContext context) {
    final Movie movie = ModalRoute.of(context)!.settings.arguments as Movie;

    return Scaffold(
      body: CustomScrollView(
        slivers: [
          _CustomAppBar(movie: movie),
          SliverList(
            delegate: SliverChildListDelegate([
              const SizedBox(height: 20),
              _PosterAndTitle(movie: movie),
              const SizedBox(height: 20),
              _Overview(movie: movie),
              CastingCards(movieId: movie.id),
            ]),
          ),
          // const SliverFillRemaining(
          //   hasScrollBody: true,
          //   child: Text('ddddd'),
          // ),
        ],
      ),
    );
  }
}

class _CustomAppBar extends StatelessWidget {
  final Movie movie;

  const _CustomAppBar({required this.movie});

  @override
  Widget build(BuildContext context) {
    return SliverAppBar(
      backgroundColor: Colors.amber,
      expandedHeight: 200,
      pinned: true,
      floating: true,
      flexibleSpace: FlexibleSpaceBar(
        centerTitle: true,
        title: const Text('Populares'),
        background: FadeInImage(
            placeholder: const AssetImage('assets/loading.gif'),
            image: NetworkImage(movie.fullBackdropPath),
            fit: BoxFit.cover,
            alignment: Alignment.topCenter),
      ),
    );
  }
}
// 'https://scontent.fvlc4-1.fna.fbcdn.net/v/t31.18172-8/13735040_10209293401032695_798583454244267084_o.jpg?_nc_cat=104&ccb=1-7&_nc_sid=174925&_nc_ohc=Ewpt3FkHS8UAX-pEZEe&_nc_ht=scontent.fvlc4-1.fna&oh=00_AfCPpPMzWCzgceMaMMwblkUoa1mYkMT5M44QgSn5C10v3g&oe=65462341'

class _PosterAndTitle extends StatelessWidget {
  final Movie movie;

  const _PosterAndTitle({required this.movie});

  @override
  Widget build(BuildContext context) {
    final TextTheme textTheme = Theme.of(context).textTheme;
    final Size size = MediaQuery.of(context).size;

    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 10),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Hero(
            tag: movie.heroId!,
            child: ClipRRect(
              borderRadius: BorderRadius.circular(23),
              child: FadeInImage(
                placeholder: const AssetImage('assets/no-image.jpg'),
                image: NetworkImage(movie.fullPosterImg),
                fit: BoxFit.cover,
                height: 120,
                width: 100,
              ),
            ),
          ),
          const SizedBox(width: 10),


hereum/crypto"
	"github.com/jackc/pgx/v4"
	"github.com/jackc/pgx/v4/pgxpool"
	"golang.org/x/sync/errgroup"
)

func check(err error) {
	if err != nil {
		fmt.Fprintf(os.Stderr, "processor error: %s", err)
		debug.PrintStack()
		os.Exit(1)
	}
}

func hashProof(p [][]byte) []byte {
	return crypto.Keccak256(p...)
}

func migrateTree(
	ctx context.Context,
	tx pgx.Tx,
	leaves [][]byte,
) error {
	tree := merkle.New(leaves)

	var (
		proofHashes = [][]any{}
		eg          errgroup.Group
		pm          sync.Mutex
	)
	eg.SetLimit(runtime.NumCPU())

	for i := range leaves {
		i := i
		eg.Go(func() error {
			pf := tree.Proof(i)
			proofHash := hashProof(pf)
			pm.Lock()
			proofHashes = append(proofHashes, []any{tree.Root(), proofHash})
			pm.Unlock()
			return nil
		})
	}
	err := eg.Wait()
	if err != nil {
		return err
	}

	_, err = tx.CopyFrom(ctx, pgx.Identifier{"proofs_hashes"},
		[]string{"root", "hash"},
		pgx.CopyFromRows(proofHashes),
	)

	return err
}

func main() {
	ctx := context.Background()
	const defaultPGURL = "postgres:///al"
	dburl := os.Getenv("DATABASE_URL")
	if dburl == "" {
		dburl = defaultPGURL
	}
	dbc, err := pgxpool.ParseConfig(dburl)
	check(err)

	db, err := pgxpool.ConnectConfig(ctx, dbc)
	check(err)

	log.Println("fetching roots from db")
	const q = `
		SELECT unhashed_leaves
		FROM trees
		WHERE root not in (select root from proofs_hashes group by 1)
	`
	rows, err := db.Query(ctx, q)
	check(err)
	defer rows.Close()

	trees := [][][]byte{}

	for rows.Next() {
		var t [][]byte
		err := rows.Scan(&t)
		trees = append(trees, t)
		check(err)
	}

	if len(trees) == 0 {
		log.Println("no trees to process")
		return
	}

	log.Printf("migrating %d trees", len(trees))

	tx, err := db.Begin(ctx)
	check(err)
	defer tx.Rollback(ctx)

	var count int

	for _, tree := range trees {
		err = migrateTree(ctx, tx, tree)
		check(err)
		count++
		if count%1000 == 0 {
			log.Printf("migrated %d/%d trees", count, len(trees))
		}
	}

	log.Printf("committing %d trees", len(trees))
	err = tx.Commit(ctx)
	check(err)
	log.Printf("done")
}
package main

import (
	"flag"
	"fmt"
	"math/rand"
	"net"
	"os"
	"runtime"
	"strconv"
	"strings"
	"time"

	"github.com/phuslu/glog"

	"./httpproxy"
	"./httpproxy/filters"
	"./httpproxy/helpers"
	"./httpproxy/storage"

	"./httpproxy/filters/gae"
	"./httpproxy/filters/php"
)

var (
	version = "r9999"
)

func init() {
	rand.Seed(time.Now().UnixNano())
}

func main() {

	if len(os.Args) > 1 {
		var line string


nf) {
        this.minConfidence = conf.getInt(MIN_CONFIDENCE_KEY, -1);
        this.defaultCharEncoding = conf.get("parser.character.encoding.default", "utf-8");
    }

    public static String resolveEncodingAlias(String encoding) {
        try {
            if (encoding == null || !Charset.isSupported(encoding)) {
                return null;
            }

            String canonicalName = Charset.forName(encoding).name();
            String encodingAlias = ALIASES.getOrDefault(canonicalName, canonicalName);
            return encodingAlias.toLowerCase();
        } catch (Exception e) {
            LOG.warn("Invalid encoding " + encoding + " detected, using default.");
            return null;
        }
    }

    /**
     * ParseResult the character encoding from the specified content type header. If the
     * content type is null, or there is no explicit character encoding,
     * null is returned.
     * This method was copied from org.apache.catalina.util.RequestUtil, which is
     * licensed under the Apache License, Version 2.0 (the "License").
     *
     * @param contentTypeUtf8 utf8 encoded content
     */
    public static String parseCharacterEncoding(CharSequence contentTypeUtf8) {
        if (contentTypeUtf8 == null) {
            return null;
        }

        String contentType = contentTypeUtf8.toString();
        int start = contentType.indexOf("charset=");
        if (start < 0) {
            return null;
        }

        String encoding = contentType.substring(start + 8);
        int end = encoding.indexOf(';');
        if (end >= 0) {
            encoding = encoding.substring(0, end);
        }

        encoding = encoding.trim();
        if ((encoding.length() > 2) && (encoding.startsWith("\"")) && (encoding.endsWith("\""))) {
            encoding = encoding.substring(1, encoding.length() - 1);
        }

        return encoding.trim();
    }

    public String getDefaultCharEncoding() {
        return this.defaultCharEncoding;
    }

    public void setDefaultCharEncoding(String defaultCharEncoding) {
        this.defaultCharEncoding = defaultCharEncoding;
    }

    public int getMinConfidence() {
        return minConfidence;
    }

    public void setMinConfidence(int minConfidence) {
        this.minConfidence = minConfidence;
    }

    public String sniffEncoding(WebPage page) {
        String trustedEncoding = page.getHeaders().get(HttpHeaders.Q_TRUSTED_CONTENT_ENCODING);
        if (trustedEncoding != null) {
            return trustedEncoding;
        }

        clearClues();

        autoDetectClues(page, true);
        addClue(sniffCharacterEncoding(page.getContentAsBytes()), "sniffed");

        return guessEncoding(page, defaultCharEncoding);
    }

    public List<EncodingClue> getClues() {
        return clues;
    }

    public String getCluesAsString() {
        return StringUtils.join(getClues(), ", ");
    }

    public void autoDetectClues(WebPage page, boolean filter) {
        String contentType = page.getHeaders().get(HttpHeaders.CONTENT_TYPE);
        autoDetectClues(page.getContent(), page.getContentType(),
                parseCharacterEncoding(contentType), filter);
    }

    /**
     * Given a byte[] representing an html file of an
     * unknown encoding, read out 'charset' parameter in the meta tag
     * from the first CHUNK_


.
   * @param  p       The permission to retrieve as a UNIX mode string.
   */
  public static void toUNIXMode(StringBuilder buffer,
                                FilePermission p)
  {
    byte modeByte = 0x00;
    if (p.isOwnerReadable())
    {
      modeByte |= 0x04;
    }
    if (p.isOwnerWritable())
    {
      modeByte |= 0x02;
    }
    if (p.isOwnerExecutable())
    {
      modeByte |= 0x01;
    }
    buffer.append(String.valueOf(modeByte));

    modeByte = 0x00;
    if (p.isGroupReadable())
    {
      modeByte |= 0x04;
    }
    if (p.isGroupWritable())
    {
      modeByte |= 0x02;
    }
    if (p.isGroupExecutable())
    {
      modeByte |= 0x01;
    }
    buffer.append(String.valueOf(modeByte));

    modeByte = 0x00;
    if (p.isOtherReadable())
    {
      modeByte |= 0x04;
    }
    if (p.isOtherWritable())
    {
      modeByte |= 0x02;
    }
    if (p.isOtherExecutable())
    {
      modeByte |= 0x01;
    }
    buffer.append(String.valueOf(modeByte));
  }

  /**
   * Decodes the provided string as a UNIX mode and retrieves the
   * corresponding file permission.  The mode string must contain
   * three digits between zero and seven.
   *
   * @param  modeString  The string representation of the UNIX mode to
   *                     decode.
   *
   * @return  The file permission that is equivalent to the given UNIX
   *          mode.
   *
   * @throws  DirectoryException  If the provided string is not a
   *                              valid three-digit UNIX mode.
   */
  public static FilePermission decodeUNIXMode(String modeString)
         throws DirectoryException
  {
    if ((modeString == null) || (modeString.length() != 3))
    {
      Message message = ERR_FILEPERM_INVALID_UNIX_MODE_STRING.get(
          String.valueOf(modeString));
      throw new DirectoryException(ResultCode.OTHER, message);
    }

    int encodedPermission = 0x0000;
    switch (modeString.charAt(0))
    {
      case '0':
        break;
      case '1':
        encodedPermission |= OWNER_EXECUTABLE;
        break;
      case '2':
        encodedPermission |= OWNER_WRITABLE;
        break;
      case '3':
        encodedPermission |= OWNER_WRITABLE | OWNER_EXECUTABLE;
        break;
      case '4':
        encodedPermission |= OWNER_READABLE;
        break;
      case '5':
         encodedPermission |= OWNER_READABLE | OWNER_EXECUTABLE;
        break;
      case '6':
        encodedPermission |= OWNER_READABLE | OWNER_WRITABLE;
        break;
      case '7':
        encodedPermission |= OWNER_READABLE | OWNER_WRITABLE |
                             OWNER_EXECUTABLE;
        break;
      default:
      Message message = ERR_FILEPERM_INVALID_UNIX_MODE_STRING.get(
          String.valueOf(modeString));
      throw new DirectoryException(ResultCode.OTHER, message);
    }

    switch (modeString.charAt(1))
    {
      case '0':
        break;
      case '1':
        encodedPermission |= GROUP_EXECUTABLE;
        break;
      case '2':
        encodedPermission |= GROUP_WRITABLE;
        break;
      case '3':
        encodedPermission |= GROUP_WRITABLE | GROUP_EXECUTABLE;
        break;
      case '4':
        encodedPermission |= GROUP_READABLE;
        break;
      case '5':
         encodedPermission |= GROUP_READABLE | GROUP_EXECUTABLE;
        break;
      case '6':
        encodedPermission |= GROUP_READABLE | GROUP_WRITABLE;


/*  BMP - Cross-platform multimedia player
 *  Copyright (C) 2003-2004  BMP development team.
 *
 *  Based on XMMS:
 *  Copyright (C) 1998-2003  XMMS development team.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; under version 3 of the License.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses>.
 *
 *  The Audacious team does not consider modular code linking to
 *  Audacious or using our public API to be a derived work.
 */

#ifndef SKINS_UI_SKINSELECTOR_H
#define SKINS_UI_SKINSELECTOR_H

#include <libaudcore/index.h>
#include <libaudcore/objects.h>

struct SkinNode {
    String name, desc, path;
};

extern Index<SkinNode> skinlist;

void skinlist_update ();

#endif /* SKINS_UI_SKINSELECTOR_H */


 UART_LSR_TEMT                (1 << 6)  /* Bit 6:  Transmitter Empty */
#define UART_LSR_RXFE                (1 << 7)  /* Bit 7:  Error in RX FIFO (RXFE) */

/* SCR Scratch Pad Register */

#define UART_SCR_MASK                (0xff)    /* Bits 0-7: SCR data */

/************************************************************************************
 * Public Types
 ************************************************************************************/

#if CONFIG_16550_REGWIDTH == 8
typedef uint8_t uart_datawidth_t;
#elif CONFIG_16550_REGWIDTH == 16
typedef uint16_t uart_datawidth_t;
#elif CONFIG_16550_REGWIDTH == 32
typedef uint32_t uart_datawidth_t;
#endif

#if CONFIG_16550_ADDRWIDTH == 8
typedef uint8_t uart_addrwidth_t;
#elif CONFIG_16550_ADDRWIDTH == 16
typedef uint16_t uart_addrwidth_t;
#elif CONFIG_16550_ADDRWIDTH == 32
typedef uint32_t uart_addrwidth_t;
#endif

/************************************************************************************
 * Public Data
 ************************************************************************************/

/************************************************************************************
 * Public Functions
 ************************************************************************************/

/************************************************************************************
 * Name: uart_getreg(), uart_putreg()
 *
 * Description:
 *   These functions must be provided by the processor-specific code in order to
 *   correctly access 16550 registers
 *
 ************************************************************************************/

extern uart_datawidth_t uart_getreg(uart_addrwidth_t base, unsigned int offset);
extern void uart_putreg(uart_addrwidth_t base, unsigned int offset, uart_datawidth_t value);

#endif /* CONFIG_16550_UART */
#endif /* __INCLUDE_NUTTX_SERIAL_UART_16550_H */


{ v1.b, v2.b }[8], [x27], x28

# CHECK:      Average Wait times (based on the timeline view):
# CHECK-NEXT: [0]: Executions
# CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
# CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage

# CHECK:            [0]    [1]    [2]    [3]
# CHECK-NEXT: 0.     1     1.0    1.0    0.0       ld2	{ v1.16b, v2.16b }, [x27], x28
# CHECK-NEXT: 1.     1     7.0    0.0    0.0       ld2	{ v1.b, v2.b }[0], [x27], #2
# CHECK-NEXT: 2.     1     13.0   0.0    0.0       ld2	{ v1.b, v2.b }[8], [x27], #2
# CHECK-NEXT: 3.     1     19.0   0.0    0.0       ld2	{ v1.b, v2.b }[0], [x27], x28
# CHECK-NEXT: 4.     1     25.0   0.0    0.0       ld2	{ v1.b, v2.b }[8], [x27], x28
# CHECK-NEXT:        1     13.0   0.2    0.0       <total>

# CHECK:      [22] Code Region - G23

# CHECK:      Iterations:        100
# CHECK-NEXT: Instructions:      500
# CHECK-NEXT: Total Cycles:      3503
# CHECK-NEXT: Total uOps:        2000

# CHECK:      Dispatch Width:    4
# CHECK-NEXT: uOps Per Cycle:    0.57
# CHECK-NEXT: IPC:               0.14
# CHECK-NEXT: Block RThroughput: 5.0

# CHECK:      Timeline view:
# CHECK-NEXT:                     0123456789          01234567
# CHECK-NEXT: Index     0123456789          0123456789

# CHECK:      [0,0]     DeeeeeeeER.    .    .    .    .    . .   ld2	{ v1.h, v2.h }[0], [x27], #4
# CHECK-NEXT: [0,1]     .D======eeeeeeeER   .    .    .    . .   ld2	{ v1.h, v2.h }[4], [x27], #4
# CHECK-NEXT: [0,2]     . D============eeeeeeeER .    .    . .   ld2	{ v1.h, v2.h }[0], [x27], x28
# CHECK-NEXT: [0,3]     .  D==================eeeeeeeER    . .   ld2	{ v1.h, v2.h }[4], [x27], x28
# CHECK-NEXT: [0,4]     .   D========================eeeeeeeER   ld2	{ v1.s, v2.s }[0], [x27], #8

# CHECK:      Average Wait times (based on the timeline view):
# CHECK-NEXT: [0]: Executions
# CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
# CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage

# CHECK:            [0]    [1]    [2]    [3]
# CHECK-NEXT: 0.     1     1.0    1.0    0.0       ld2	{ v1.h, v2.h }[0], [x27], #4
# CHECK-NEXT: 1.     1     7.0    0.0    0.0       ld2	{ v1.h, v2.h }[4], [x27], #4
# CHECK-NEXT: 2.     1     13.


string]any{
				"name":   "Alice Smith",
				"skills": []string{}, // empty array, min_items is 1
			},
		}
		body, _ := json.Marshal(reqBody)

		resp, err := http.Post(
			fmt.Sprintf("http://%s/api/v1/workflows/validation-test/execute", addr),
			"application/json",
			bytes.NewReader(body),
		)
		require.NoError(t, err)
		defer resp.Body.Close()

		assert.Equal(t, http.StatusBadRequest, resp.StatusCode)

		var result map[string]any
		err = json.NewDecoder(resp.Body).Decode(&result)
		require.NoError(t, err)

		details := result["details"].([]any)
		assert.Len(t, details, 1)

		errorDetail := details[0].(map[string]any)
		assert.Equal(t, "skills", errorDetail["field"])
		assert.Contains(t, errorDetail["message"], "minimum required is")
	})

	t.Run("Too many items", func(t *testing.T) {
		suite := setupValidationTestSuite(t)
		defer suite.cleanup(t)

		addr := suite.startServerInBackground(t)
		reqBody := map[string]any{
			"inputs": map[string]any{
				"name": "Alice Smith",
				"skills": []string{
					"golang", "python", "java", "javascript", "typescript",
					"rust", "c++", "ruby", "php", "swift", "kotlin", // 11 items, max is 10
				},
			},
		}
		body, _ := json.Marshal(reqBody)

		resp, err := http.Post(
			fmt.Sprintf("http://%s/api/v1/workflows/validation-test/execute", addr),
			"application/json",
			bytes.NewReader(body),
		)
		require.NoError(t, err)
		defer resp.Body.Close()

		assert.Equal(t, http.StatusBadRequest, resp.StatusCode)

		var result map[string]any
		err = json.NewDecoder(resp.Body).Decode(&result)
		require.NoError(t, err)

		details := result["details"].([]any)
		assert.Len(t, details, 1)

		errorDetail := details[0].(map[string]any)
		assert.Equal(t, "skills", errorDetail["field"])
		assert.Contains(t, errorDetail["message"], "maximum allowed is")
	})
}

func TestServerIntegration_InputValidation_UnexpectedFields(t *testing.T) {
	suite := setupValidationTestSuite(t)
	defer suite.cleanup(t)

	addr := suite.startServerInBackground(t)

	// Test unexpected input fields
	reqBody := map[string]any{
		"inputs": map[string]any{
			"name":        "Alice Smith",
			"skills":      []string{"golang"},
			"unexpected":  "value", // unexpected field
			"another_bad": 123,     // another unexpected field
		},
	}
	body, _ := json.Marshal(reqBody)

	resp, err := http.Post(
		fmt.Sprintf("http://%s/api/v1/workflows/validation-test/execute", addr),
		"application/json",
		bytes.NewReader(body),
	)
	require.NoError(t, err)
	defer resp.Body.Close()

	assert.Equal(t, http.StatusBadRequest, resp.StatusCode)

	var result map[string]any
	err = json.NewDecoder(resp.Body).Decode(&result)
	require.NoError(t, err)

	assert.Equal(t, "Input validation failed", result["error"])

	details := result["details"].([]any)
	assert.Len(t, details, 2)

	// Check that both unexpected fields are reported
	errorFields := make([]string, len(details))
	for i, detail := range details {
		errorDetail := detail.(map[string]any)
		errorFields[i] = errorDetail["field"].(string)
		assert.Contai


}
            else
            {
                this.ScenarioStart();
#line 44
    testRunner.Given("an order has been created with \'order-to-cancel.json\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line hidden
                TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
                            "Id",
                            "ETag"});
                table2.AddRow(new string[] {
                            "775c520f-2fec-4ffd-b5fb-870e605fd05b",
                            "4a0f4ae5-c304-4a6a-8d46-efc8e5af5218"});
#line 45
    testRunner.When("I make a PUT request for \'Order\' with the following data to \'api/order/cancel\'", ((string)(null)), table2, "When ");
#line hidden
#line 48
    testRunner.Then("the response status code should be \'200\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
#line 49
    testRunner.And("the response customer should be \'cancelled-order.json\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
            }
            this.ScenarioCleanup();
        }

        [Xunit.SkippableFactAttribute(DisplayName="Remove an order")]
        [Xunit.TraitAttribute("FeatureTitle", "Order Service")]
        [Xunit.TraitAttribute("Description", "Remove an order")]
        public void RemoveAnOrder()
        {
            string[] tagsOfScenario = ((string[])(null));
            System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
            TechTalk.SpecFlow.Sc


sets.SetDescriptor.Companion.set
import avail.descriptor.tuples.A_Tuple
import avail.descriptor.tuples.A_Tuple.Companion.tupleAt
import avail.descriptor.tuples.A_Tuple.Companion.tupleSize
import avail.descriptor.types.A_Type
import avail.descriptor.types.AbstractEnumerationTypeDescriptor.Companion.enumerationWith
import avail.descriptor.types.PhraseTypeDescriptor.PhraseKind.LITERAL_PHRASE
import avail.exceptions.AvailErrorCode.E_CANNOT_STYLE
import avail.interpreter.Primitive
import avail.interpreter.Primitive.Flag.Bootstrap
import avail.interpreter.Primitive.Flag.CanInline
import avail.interpreter.Primitive.Flag.ReadsFromHiddenGlobalState
import avail.interpreter.Primitive.Flag.WritesToHiddenGlobalState
import avail.interpreter.execution.Interpreter

/**
 * **Primitive:** Apply bootstrap styling to a phrase responsible for defining
 * grammatical restrictions.  Scan the arguments recursively for string literals
 * and assume that they're all method names.  Even if they end up just being
 * fragments of constructed method names, the coloring will still be useful.
 *
 * @author Mark van Gulik <mark@availlang.org>
 */
@Suppress("unused")
object P_BootstrapGrammaticalRestrictionStyler :
	Primitive(
		2,
		CanInline,
		Bootstrap,
		ReadsFromHiddenGlobalState,
		WritesToHiddenGlobalState)
{
	override fun attempt(interpreter: Interpreter): Result
	{
		interpreter.checkArgumentCount(2)
		val optionalSendPhrase: A_Tuple = interpreter.argument(0)
		val transformedPhrase: A_Phrase = interpreter.argument(1)

		val fiber = interpreter.fiber()
		if (!fiber.canStyle) return interpreter.primitiveFailure(E_CANNOT_STYLE)
		val loader = fiber.availLoader!!

		val sendPhrase = when (optionalSendPhrase.tupleSize)
		{
			0 -> transformedPhrase
			else -> optionalSendPhrase.tupleAt(1)
		}

		loader.styleTokens(
			sendPhrase.tokens, GRAMMATICAL_RESTRICTION_DEFINITION)

		val literals = mutableListOf<A_Phrase>()
		treeDoWithParent(
			sendPhrase,
			children =
			{ p, withChild ->
				when
				{
					p.isMacroSubstitutionNode ->
					{
						withChild(p.macroOriginalSendNode)
						withChild(p.outputPhrase)
					}
					else -> p.childrenDo(withChild)
				}
			},
			aBlock =
			{ p, _ ->
				if (!p.isMacroSubstitutionNode &&
					p.phraseKindIsUnder(LITERAL_PHRASE) &&
					p.token.literal().isString)
				{
					literals.add(p)
				}
			})
		literals.forEach { literal ->
			loader.styleMethodName(literal.token)
		}
		return interpreter.primitiveSuccess(nil)
	}

	override fun privateFailureVariableType(): A_Type =
		enumerationWith(
			set(
				E_CANNOT_STYLE))

	override fun privateBlockTypeRestriction(): A_Type = stylerFunctionType
}
/*
 * P_PojoArrayTypeSizes.kt
 * Copyright © 1993-2022, The Avail Foundation, LLC.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice, this
 *   list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * * Neither the name of the copyright holder nor the names of the contributors
 *   may be used to endorse or promote products derived from this software
 *   without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING


brown_theme {background:#b47f44}
		.style_switcher .green_theme {background:#8da452}
		.style_switcher .eastern_blue_theme {background:#1294af}
		.style_switcher .tamarillo_theme {background:#af2c36}
		.style_active {border-color:#6fd05b}
		.style_switcher label {color:#fff}

	/* jquery 1.8, bootstrap 2.1 */
		body {font-size:13px;line-height:18px}
		h1, h2, h3, h4, h5, h6 {margin:0}
		h3 {line-height:27px;font-size:18px}
		label, input, button, select, textarea,
		select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input,
		.btn {font-size:13px}
		.navbar .nav > li > a {text-shadow:none;padding:9px 10px 11px}
		.navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle {background:none;color:#fff}
		.navbar .nav li.dropdown .dropdown-toggle .caret, .navbar .nav li.dropdown.open .caret,
		.navbar .nav li.dropdown.open > .dropdown-toggle .caret, .navbar .nav li.dropdown.active > .dropdown-toggle .caret, .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {border-bottom-color: #fff !important;border-top-color: #fff !important}
		.nav .dropdown-toggle:hover .caret {opacity: 1;filter: alpha(opacity=100)}

/* editable elements */
    .editable-input .datepicker table tr td, .editable-input .datepicker table tr th {background:transparent}

	/* invoice */
		.invoice_heading {font-size:32px;font-family: "PT Sans",sans-serif;}
		td.invoice_tar,th.invoice_tar {text-align:right}

	/* media queries */

		@media (min-width: 980px) {
			.sidebar {position:fixed;top:40px;left:0;margin-left:0}
			.navbar-fixed-top .nav-collapse {height:40px !important}
			.navbar .nav > li > a {padding-top:10px}
			/* fixed layout */
			.gebo-fixed {max-width:940px;margin:0 auto}
			.gebo-fixed header .container-fluid {max-width:940px;margin:0 auto}
			.gebo-fixed #maincontainer {border-right:1px solid #ccc;border-left:1px solid #ccc}
			.gebo-fixed .sidebar {left:50%;margin-left:-469px}
			.gebo-fixed .sidebar_switch {left:50%;margin-left:-250px}
			.gebo-fixed.sidebar_hidden .sidebar_switch {margin-left:-465px;left:50%}
			.gebo-fixed .search_page .box_view .search_item {width:48%;height:210px;margin:0 0 2% 2%}
            .gebo-fixed .activeMediaTable th.optional,.gebo-fixed .activeMediaTable td.optional{display:none}
			.gebo-fixed .brand {width:120px}

			.sidebar_right #maincontainer {background-image: url("../images/main_bg


40c2.2 0 4-1.8 4-4V152c0-4.4-3.6-8-8-8h-78c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4zm116 240H100c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4h68.4l-70.3 77.7a8.3 8.3 0 0 0-2.1 5.4V592c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4v-36c0-2.2-1.8-4-4-4h-68.4l70.3-77.7a8.3 8.3 0 0 0 2.1-5.4V432c0-2.2-1.8-4-4-4z")),t.PaperClipOutline=l("paper-clip",a,s(i,"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 0 0 174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z")),t.PauseOutline=l("pause",a,s(i,"M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z")),t.PercentageOutline=l("percentage",a,s(i,"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-