<typename Stream, class Tuple> struct TuplePrinter<Stream, Tuple, 1> {
  static void print(Stream &stream, const Tuple &t) {
    stream << std::get<0>(t);
  }
};
template <typename Stream, typename... Args,
          std::enable_if_t<sizeof...(Args) != 0, int> = 0>
void print(Stream &stream, const std::tuple<Args...> &t) {
  TuplePrinter<Stream, decltype(t), sizeof...(Args)>::print(stream, t);
}

#if 0
struct LowerGPUAlternativesOp
    : public OpRewritePattern<polygeist::AlternativesOp>,
      public GpuRuntimeCallBuilders {
  using OpRewritePattern<polygeist::AlternativesOp>::OpRewritePattern;
  const char *PATTERN = "lower-gpu-alternatives";

  LogicalResult matchAndRewrite(polygeist::AlternativesOp gao,
                                PatternRewriter &rewriter) const override {

    if (gao->getAttrOfType<StringAttr>("alternatives.type").getValue() !=
        "gpu_kernel")
      return failure();

    Location loc = gao->getLoc();
    std::string locStr =
        gao->getAttrOfType<StringAttr>("polygeist.altop.id").data();

    auto descs = gao->getAttrOfType<ArrayAttr>("alternatives.descs");

    // TODO each region in the alternatives op should containt only a single
    // block - write a verifier for that

    typedef std::tuple<Region *, int, int, int, int, int, int, int, int, int,
                       int, int, int>
        kernelInfoTy;
    std::vector<kernelInfoTy> infos;

    auto printInfos = [&](auto &strm, std::vector<kernelInfoTy> infos) {
      int i = 0;
      for (auto tup : infos) {
        strm << "polygeistKernelInfo: " << locStr << "," << i << "," << descs[i]
             << ",";
        auto _tup = pop_front(tup);
        print(strm, _tup);
        strm << "\n";
        i++;
      }
    };

    auto gatherInfos = [&]() {
      typedef std::tuple<int, int, int, int, int, int> kernelLLVMInfoTy;
      auto gatherLLVMInfos = [&](Operation *gpuFunc) -> kernelLLVMInfoTy {
        int ops = 0, floatOps = 0, intOps = 0, loads = 0, stores = 0,
            branches = 0;

        // TODO This should use the GPU data layout and not the Host one
        DataLayout DLI(gao->getParentOfType<ModuleOp>());
        gpuFunc->walk([&](Operation *op) {
          ops++;
          if (isa<LLVM::BrOp>(op)) {
            branches++;
          } else if (isa<LLVM::FAddOp>(op) || isa<LLVM::FMulOp>(op) ||
                     isa<LLVM::FDivOp>(op) || isa<LLVM::FSubOp>(op) ||
                     isa<LLVM::FRemOp>(op)) {
            int width =
                dyn_cast<FloatType>(op->getOperand(0).getType()).getWidth();
            // TODO these are pretty random atm
            if (width == 16) {
              floatOps++;
            } else if (width == 32) {
              floatOps += 2;
            } else if (width == 64) {
              floatOps += 4;
            }
          } else if (isa<LLVM::AddOp>(op) || isa<LLVM::SubOp>(op) ||
                     isa<LLVM::MulOp>(op) || isa<LLVM::UDivOp>(op) ||
                     isa<LLVM::SDivOp>(op)) {
            intOps++;
          } else if (auto load = dyn_cast<LLVM::LoadOp>(op)) {
            int bytes = DLI.getTypeSize(load.getRes().getType());
            loads += bytes;
          } else if (auto store = dyn_cast<LLVM::StoreOp>(op)) {
            int bytes = DLI.getTypeSize(store->getOperand(0).getType());


.a.gc()-u.a.gc();if(r<0){dhn(o,true,(Bdn(),s5e));dhn(o,false,f5e)}else if(r>0){dhn(o,false,(Bdn(),s5e));dhn(o,true,f5e)}Lin(e.g,new VC(n,t));jJ(n.g,e,t)}function vGn(){vGn=O;var n;sle=Vfn(fT(Ght,1),V1n,28,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);fle=$nn(Ght,V1n,28,37,15,1);hle=Vfn(fT(Ght,1),V1n,28,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]);lle=$nn(Xht,j0n,28,37,14,1);for(n=2;n<=36;n++){fle[n]=c0(t.Math.pow(n,sle[n]));lle[n]=pSn(JZn,fle[n])}}function pGn(n){var e;if((!n.a&&(n.a=new gV(U7e,n,6,6)),n.a).i!=1){throw dm(new jM(See+(!n.a&&(n.a=new gV(U7e,n,6,6)),n.a).i))}e=new Vk;!!Afn(bG(Yin((!n.b&&(n.b=new g_(B7e,n,4,7)),n.b),0),84))&&eon(e,MYn(n,Afn(bG(Yin((!n.b&&(n.b=new g_(B7e,n,4,7)),n.b),0),84)),false));!!Afn(bG(Yin((!n.c&&(n.c=new g_(B7e,n,5,8)),n.c),0),84))&&eon(e,MYn(n,Afn(bG(Yin((!n.c&&(n.c=new g_(B7e,n,5,8)),n.c),0),84)),true));return e}function mGn(n,e){var t,r,i,a,c;e.d?i=n.a.c==(p0(),Cqe)?Qgn(e.b):Jgn(e.b):i=n.a.c==(p0(),Pqe)?Qgn(e.b):Jgn(e.b);a=false;for(r=new Gz(ox(i.a.Kc(),new d));dDn(r);){t=bG(K9(r),18);c=lM(n.a.f[n.a.g[e.b.p].p]);if(!c&&!j9(t)&&t.c.i.c==t.d.i.c){continue}if(lM(n.a.n[n.a.g[e.b.p].p])||lM(n.a.n[n.a.g[e.b.p].p])){continue}a=true;if(fS(n.b,n.a.g[jTn(t,e.b).p])){e.c=true;e.a=t;return e}}e.c=a;e.a=null;return e}function kGn(n,e,t){var r,i,a,c,u,o,s;r=t.gc();if(r==0){ret


SwiftUINavigation/favicon.ico"><link rel="mask-icon" href="/SwiftUINavigation/favicon.svg" color="#333333"><title>Documentation</title><link href="/SwiftUINavigation/css/index.3a335429.css" rel="stylesheet">

This page requires JavaScript.

Please turn on JavaScript in your browser and refresh the page to view its content.

<!doctype html><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><link rel="icon" href="/SwiftUINavigation/favicon.ico"><link rel="mask-icon" href="/SwiftUINavigation/favicon.svg" color="#333333"><title>Documentation</title><link href="/SwiftUINavigation/css/index.3a335429.css" rel="stylesheet">

This page requires J


return address             */
    call0   XT_RTOS_CP_STATE            /* get address of CP save area     */
    mov     a0, a14                     /* restore return address          */
    beqz    a15, .Ldone                 /* if none then nothing to do      */
    s16i    a2, a15, XT_CP_CS_ST        /* save mask of CPs being stored   */
    movi    a13, _xt_coproc_sa_offset   /* array of CP save offsets        */
    l32i    a15, a15, XT_CP_ASA         /* a15 = base of aligned save area */

#if XCHAL_CP0_SA_SIZE
    bbci.l  a2, 0, 2f                   /* CP 0 not enabled                */
    l32i    a14, a13, 0                 /* a14 = _xt_coproc_sa_offset[0]   */
    add     a3, a14, a15                /* a3 = save area for CP 0         */
    xchal_cp0_store a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
2:
#endif

#if XCHAL_CP1_SA_SIZE
    bbci.l  a2, 1, 2f                   /* CP 1 not enabled                */
    l32i    a14, a13, 4                 /* a14 = _xt_coproc_sa_offset[1]   */
    add     a3, a14, a15                /* a3 = save area for CP 1         */
    xchal_cp1_store a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
2:
#endif

#if XCHAL_CP2_SA_SIZE
    bbci.l  a2, 2, 2f
    l32i    a14, a13, 8
    add     a3, a14, a15
    xchal_cp2_store a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
2:
#endif

#if XCHAL_CP3_SA_SIZE
    bbci.l  a2, 3, 2f
    l32i    a14, a13, 12
    add     a3, a14, a15
    xchal_cp3_store a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
2:
#endif

#if XCHAL_CP4_SA_SIZE
    bbci.l  a2, 4, 2f
    l32i    a14, a13, 16
    add     a3, a14, a15
    xchal_cp4_store a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
2:
#endif

#if XCHAL_CP5_SA_SIZE
    bbci.l  a2, 5, 2f
    l32i    a14, a13, 20
    add     a3, a14, a15
    xchal_cp5_store a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
2:
#endif

#if XCHAL_CP6_SA_SIZE
    bbci.l  a2, 6, 2f
    l32i    a14, a13, 24
    add     a3, a14, a15
    xchal_cp6_store a3, a4, a5, a6, a7 continue=0 ofs=-1 select=XTHAL_SAS_TIE|XTHAL_SAS_NOCC|XTHAL_SAS_CALE alloc=XTHAL_SAS_ALL
2:
#endif

#if XCHAL_CP7_SA_SIZE
    bbci.l  a2, 7, 2f
    l32i    a14, a13, 28
    add     a3, a14, a15
    xchal_cp7_store a3, a4, a5, a6, a7 continue=0 ofs=-1


    above: (
        [t1, top]: [string, any],
        [t2, bottom]: [string, any],
        offset = 100
    ) =>
        // (getY top - getY bottom - offset) ^ 2
        squared(
            sub(sub(top.center.contents[1], bottom.center.contents[1]), varOf(offset))
        ),

    /**
     * Encourage shape `s1` to have the same center position as shape `s2`. Only works for shapes with property `center`.
     */
    sameCenter: ([t1, s1]: [string, any], [t2, s2]: [string, any]) =>
        ops.vdistsq(fns.center(s1), fns.center(s2)),

    /**
     * Try to repel shapes `s1` and `s2` with some weight.
     */
    repel: ([t1, s1]: [string, any], [t2, s2]: [string, any], weight = 10.0) => {
        // HACK: `repel` typically needs to have a weight multiplied since its magnitude is small
        // TODO: find this out programmatically
        const repelWeight = 10e6;

        let res;

        // Repel a line `s1` from another shape `s2` with a center.
        if (isLinelike(t1)) {
            const line = s1;
            const c2 = fns.center(s2);
            const lineSamplePts = sampleSeg(linePts(line));
            const allForces = addN(
                lineSamplePts.map((p) => repelPt(constOfIf(weight), c2, p))
            );
            res = mul(constOfIf(weight), allForces);
        } else {
            // Repel any two shapes with a center.
            // 1 / (d^2(cx, cy) + eps)
            res = inverse(ops.vdistsq(fns.center(s1), fns.center(s2)));
        }

        return mul(res, constOf(repelWeight));
    },

    /**
     * Try to center the arrow `arr` between the shapes `s2` and `s3` (they can also be any shapes with a center).
     */
    centerArrow: (
        [t1, arr]: [string, any],
        [t2, text1]: [string, any],
        [t3, text2]: [string, any]
    ): VarAD => {
        const spacing = varOf(1.1); // arbitrary

        if (isLinelike(t1) && isRectlike(t2) && isRectlike(t3)) {
            // HACK: Arbitrarily pick the height of the text
            // [spacing * getNum text1 "h", negate $ 2 * spacing * getNum text2 "h"]
            return centerArrow2(arr, fns.center(text1), fns.center(text2), [
                mul(spacing, text1.h.contents),
                neg(mul(text2.h.contents, spacing)),
            ]);
        } else throw new Error(`${[t1, t2, t3]} not supported for centerArrow`);
    },

    /**
     * Encourage shape `bottom` to be below shape `top`. Only works for shapes with property `center`.
     */
    below: (
        [t1, bottom]: [string, any],
        [t2, top]: [string, any],
        offset = 100
    ) =>
        // TODO: can this be made more efficient (code-wise) by calling "above" and swapping arguments?
        squared(
            sub(
                sub(top.center.contents[1], bottom.center.contents[1]),
                constOfIf(offset)
            )
        ),

    centerLabelAbove: (
        [t1, s1]: [string, any],
        [t2, s2]: [string, any],
        w: number
    ): VarAD => {
        if (isLinelike(t1) && isRectlike(t2)) {
            const [arr, text] = [s1, s2];
            const mx = div(
                add(arr.start.contents[0], arr.end.contents[0]),
                constOf(2.0)


state: ButtonState,
        serial: Serial,
        time: u32,
    ) {
        handle.button(button, state, serial, time);
        handle.set_grab(
            serial,
            ClickGrab {
                start_data: GrabStartData {
                    focus: handle.current_focus().cloned(),
                    button,
                    location: handle.current_location(),
                },
            },
        );
    }
    fn axis(&mut self, handle: &mut PointerInnerHandle<'_>, details: AxisFrame) {
        handle.axis(details);
    }
    fn start_data(&self) -> &GrabStartData {
        unreachable!()
    }
}

// A click grab, basic grab started when an user clicks a surface
// to maintain it focused until the user releases the click.
//
// In case the user maintains several simultaneous clicks, release
// the grab once all are released.
struct ClickGrab {
    start_data: GrabStartData,
}

impl PointerGrab for ClickGrab {
    fn motion(
        &mut self,
        handle: &mut PointerInnerHandle<'_>,
        location: (f64, f64),
        _focus: Option<(WlSurface, (f64, f64))>,
        serial: Serial,
        time: u32,
    ) {
        handle.motion(location, self.start_data.focus.clone(), serial, time);
    }
    fn button(
        &mut self,
        handle: &mut PointerInnerHandle<'_>,
        button: u32,
        state: ButtonState,
        serial: Serial,
        time: u32,
    ) {
        handle.button(button, state, serial, time);
        if handle.current_pressed().is_empty() {
            // no more buttons are pressed, release the grab
            handle.unset_grab(serial, time);
        }
    }
    fn axis(&mut self, handle: &mut PointerInnerHandle<'_>, details: AxisFrame) {
        handle.axis(details);
    }
    fn start_data(&self) -> &GrabStartData {
        &self.start_data
    }
}
pub mod app;
pub mod common;
pub mod config;
pub mod option;
pub mod proxy;
pub mod session;
pub mod util;

pub type Runner = std::pin::Pin<Box<dyn std::future::Future<Output = ()>>>;
<gh_stars>0
use super::*;
use std::path::{Path, PathBuf};

cpp_class!(pub unsafe struct SBFileSpec as "SBFileSpec");

unsafe impl Send for SBFileSpec {}

impl SBFileSpec {
    pub fn filename(&self) -> &Path {
        let ptr = cpp!(unsafe [self as "SBFileSpec*"] -> *const c_char as "const char*" {
            return self->GetFilename();
        });
        assert!(!ptr.is_null());
        unsafe { CStr::from_ptr(ptr).to_str().unwrap().as_ref() }
    }
    pub fn directory(&self) -> &Path {
        let ptr = cpp!(unsafe [self as "SBFileSpec*"] -> *const c_char as "const char*" {
            return self->GetDirectory();
        });
        assert!(!ptr.is_null());
        unsafe { CStr::from_ptr(ptr).to_str().unwrap().as_ref() }
    }
    pub fn path(&self) -> PathBuf {
        get_cstring(|ptr, size| {
            cpp!(unsafe [self as "SBFileSpec*", ptr as "char*", size as "size_t"] -> u32 as "uint32_t" {
                return self->GetPath(ptr, size);
            }) as usize
        })
        .into_string()
        .unwrap()


45] = {'Quartermaster Hicks',198,198,10,10,0,{[12]={{25.37,74.0}}},nil,12,nil,nil,12,"A","Master Weaponsmith",4224},
[1646] = {'Baros Alexston',1003,1003,30,30,0,{[1519]={{57.74,47.86}}},nil,1519,{389,393,396,399},{373,392,395,399},12,"A","City Architect",3},
[1649] = {'UNUSED Jordan Croft',1,1,1,1,0,nil,nil,0,nil,nil,35,"AH","Reuse Me",0},
[1650] = {'Terry Palin',222,222,11,11,0,{[12]={{82.95,63.31}}},nil,12,nil,nil,12,"A","Lumberjack",128},
[1651] = {'Lee Brown',156,156,8,8,0,{[12]={{47.61,62.32}}},nil,12,nil,nil,12,"A","Fishing Trainer",81},
[1652] = {'Deathguard Burgess',1302,1302,24,24,0,{[85]={{60.93,52.01}}},nil,85,{374},{374},68,"H",nil,3},
[1653] = {'Bloodsail Elder Magus',1110,1156,41,42,0,{[33]={{30.71,89.45},{29.28,88.57},{30.57,89.69},{29.27,89.03},{33.63,88.11},{32.9,88.32},{33.6,88.12},{31.8,54.2},{29.4,88.79},{31.98,54.43},{31.51,54.26},{31.94,54.41},{31.79,54.58},{32.0,54.28},{32.07,54.62},{31.89,53.88},{32.75,56.35},{32.76,56.52},{32.02,55.93},{31.99,56.08},{32.03,55.85}}},nil,33,nil,nil,119,nil,nil,0},
[1654] = {'Gregor Agamand',198,198,10,10,0,{[85]={{46.74,29.31}}},{[85]={{{46.74,29.31},{46.29,29.11},{46.0,29.04},{45.85,29.03},{45.62,28.99},{45.33,29.11},{45.14,29.4},{44.93,29.78},{44.84,30.05},{44.79,30.34},{44.79,30.61},{44.83,30.87},{44.87,31.14},{44.98,31.43},{45.0,31.6},{45.0,31.83},{44.63,32.53},{45.0,31.83},{45.0,31.6},{44.98,31.43},{44.87,31.14},{44.83,30.87},{44.79,30.61},{44.79,30.34},{44.84,30.05},{44.93,29.78},{45.14,29.4},{45.33,29.11},{45.62,28.99},{45.85,29.03},{46.0,29.04},{46.29,29.11},{46.74,29.31}}}},85,nil,nil,21,nil,nil,0},
[1655] = {'Nissa Agamand',198,198,10,10,0,{[85]={{49.74,36.34}}},{[85]={{{49.74,36.34},{49.65,36.18},{49.48,36.1},{49.45,35.97},{49.45,35.88},{49.51,35.64},{49.55,35.62},{49.61,35.68},{49.63,35.81},{49.59,36.03},{49.42,36.06},{49.35,36.03},{49.64,36.15},{49.79


”，皮日休称赞它“言出天地外，思出鬼神表”，赵翼称赞它“神识超迈，不可羁勒”，方植之称赞它“发想超旷，落笔天纵，章法承接，变化无端”。 c:43

### 旷达

何如尊酒 日往烟萝    花覆茅檐 疏雨相过    倒酒既尽 杖藜行歌    孰不有古 南山峨峨 c:90

《旷达》与其说描绘了一种艺术风格，不如说表明了一种人生态度。 c:38

《旷达》则主要接受庄子“人之生也，与忧俱生”的思想，主张用及时行乐来排解这种生之痛苦，带有比较浓厚的消极情调。 c:62

另一方面由于禁锢人们思想的传统经学和谶纬的崩溃，“人对自己生命意义的重新发现、思索、把握和追求”（李泽厚《美的历程》），这种情绪迅速弥漫开来，成为很长一个时期内诗人吟咏的重要题材。 c:34

### 流动

超超神明 返返冥无    往来千载 是之谓乎 c:16

流动与板滞相对立，是指一种气脉流转的艺术风格。 c:54

流动首先在于全篇的气脉，而不在个别的字句；诗人首先应该著眼于整体，而不能拘限于局部 c:49

王夫之《姜斋诗话》说：“谓之脉者，如人身之有十二脉，发于指端，达于颠顶，藏于肌肉之中；督任冲带，互相为宅，萦绕周回，微动而流转不穷，合为一人之生理。” c:28

再如白居易的《长恨歌》，这样一首洋洋八百馀言的长篇叙事诗，作者写来既波澜曲折，又“一气舒卷” c:19

### 附录

近而不浮，远而不尽，然后可以言韵外之致耳。 c:17

### 注释

故人入我梦，明我长相忆 c:15

李白诗《访戴天山道士不遇》：“犬吠水声中，桃花带雨浓。树深时见鹿，溪午不闻钟。野竹分青霭，飞泉挂碧峰。无人知所去，愁倚两三松。” c:22

杜甫诗《江村》：“清江一曲抱村流，长夏江村事事幽。自去自来梁上燕，相亲相近


ogo-wrapper{
    justify-self: start;
  }

  .rh-header-logo {
    max-width: 100px;
  }

  .rh-universal-login {
    justify-self: end;
    height: 100%;
    padding: var(--pf-global--spacer--md) var(--pf-global--spacer--sm);

    &:hover{
      background-color: #424242;
    }

    li a {
      font-size: var(--pf-global--FontSize--sm);
      color: #FFF;

      &:active, &:hover, &:focus {
        color: #FFF;
      }
    }

    li.logged-in {
      .icon {
        margin-right: var(--pf-global--spacer--sm);
      }
      .logged-in-name ~ .icon {
        margin-right: 0;
      }
      .dropdwn-trigger:focus {
        outline: 0;
      }
    }

    .dropdwn-menu {
      color: #333;
      position: absolute;
      background-color: #E6E6E6;
      list-style: none;
      -webkit-box-shadow: 2px 2px 3px 0 rgba(0,0,0,0.35);
      -moz-box-shadow: 2px 2px 3px 0 rgba(0,0,0,0.35);
      box-shadow: 2px 2px 3px 0 rgba(0,0,0,0.35);
      display: none;
      padding: 0 var(--pf-global--spacer--xs);
      z-index: 99;
      margin-left: -8px;
      margin-top: var(--pf-global--spacer--sm);
      @media screen and (max-width: 768px) {
        position: relative;
        width: auto !important;
        margin-left: 0;
        margin-top: 0;
      }
      li {
        padding-left: 0;
        padding-right: var(--pf-global--spacer--xl);
        margin: var(--pf-global--spacer--sm);
        &:not(:last-child) {
          border-bottom: 1px solid #D5D5D5;
          padding-bottom: var(--pf-global--spacer--xs);
        }
        a, a:focus, a:hover, a:active {
          font-size: var(--pf-global--FontSize--sm);
          color: black;
        }
      }
    }

    .icon {
      margin-right: var(--pf-global--spacer--sm);
      .fa-user {
        width: 14px;
      }
    }

    .logged-in-name + .icon {
      margin-left: var(--pf-global--spacer--sm);
      @media screen and (max-width: 768px) {
        display: none;
      }
    }
  }

  // Red Hat Developer Header
  .rhd-header {
    margin: 0 auto;
    padding: 11px 0;
    color: #656565;
    @media screen and (min-width: $pf-global--breakpoint--md) {
      flex: 1 1 auto;
      display: grid;
      grid-template-columns: auto auto;
      grid-template-rows: auto auto;
      align-items: center;
      justify-items: center;
    }
    @media screen and (min-width: $pf-global--breakpoint--lg) {
      padding: 20px 0;
    }
    &.front-nav {
      @media screen and (min-width: $pf-global--breakpoint--lg) {
        border-bottom: 1px solid #242424;
        padding: 20px 0;
      }
    }
    .rhd-nav-fixed {
      grid-row: 1;
      grid-column: 2;
      align-items: right;
      display: none;
      @media screen and (min-width: $pf-global--breakpoint--md) {
        display: block;
      }

      .search-bar {
        @media screen and (min-width: $pf-global--breakpoint--sm) {
          margin-bottom: 0;
        }
        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus,
        textarea:-webkit-autofill,


 start cipher
  var cipher = s.cipherState.cipher;
  cipher.start({iv: iv});

  // TLS 1.1+ write IV into output
  if(record.version.minor >= tls.Versions.TLS_1_1.minor) {
    cipher.output.putBytes(iv);
  }

  // do encryption (default padding is appropriate)
  cipher.update(record.fragment);
  if(cipher.finish(encrypt_aes_cbc_sha1_padding)) {
    // set record fragment to encrypted output
    record.fragment = cipher.output;
    record.length = record.fragment.length();
    rval = true;
  }

  return rval;
}

/**
 * Handles padding for aes_cbc_sha1 in encrypt mode.
 *
 * @param blockSize the block size.
 * @param input the input buffer.
 * @param decrypt true in decrypt mode, false in encrypt mode.
 *
 * @return true on success, false on failure.
 */
function encrypt_aes_cbc_sha1_padding(blockSize, input, decrypt) {
  /* The encrypted data length (TLSCiphertext.length) is one more than the sum
   of SecurityParameters.block_length, TLSCompressed.length,
   SecurityParameters.mac_length, and padding_length.

   The padding may be any length up to 255 bytes long, as long as it results in
   the TLSCiphertext.length being an integral multiple of the block length.
   Lengths longer than necessary might be desirable to frustrate attacks on a
   protocol based on analysis of the lengths of exchanged messages. Each uint8
   in the padding data vector must be filled with the padding length value.

   The padding length should be such that the total size of the
   GenericBlockCipher structure is a multiple of the cipher's block length.
   Legal values range from zero to 255, inclusive. This length specifies the
   length of the padding field exclusive of the padding_length field itself.

   This is slightly different from PKCS#7 because the padding value is 1
   less than the actual number of padding bytes if you include the
   padding_length uint8 itself as a padding byte. */
  if(!decrypt) {
    // get the number of padding bytes required to reach the blockSize and
    // subtract 1 for the padding value (to make room for the padding_length
    // uint8)
    var padding = blockSize - (input.length() % blockSize);
    input.fillWithByte(padding - 1, padding);
  }
  return true;
}

/**
 * Handles padding for aes_cbc_sha1 in decrypt mode.
 *
 * @param blockSize the block size.
 * @param output the output buffer.
 * @param decrypt true in decrypt mode, false in encrypt mode.
 *
 * @return true on success, false on failure.
 */
function decrypt_aes_cbc_sha1_padding(blockSize, output, decrypt) {
  var rval = true;
  if(decrypt) {
    /* The last byte in the output specifies the number of padding bytes not
      including itself. Each of the padding bytes has the same value as that
      last byte (known as the padding_length). Here we check all padding
      bytes to ensure they have the value of padding_length even if one of
      them is bad in order to ward-off timing attacks. */
    var len = output.length();
    var paddingLength = output.last();
    for(var i = len - 1 - paddingLength; i < len - 1; ++i) {
      rval = rval && (output.at(i) == paddingLength);
    }
    if(rval) {
      // trim off padding bytes and last padding length byte
      output.truncate(paddingLength + 1);
    }
  }
  return rval;
}

/**
 * Decrypts a TLSCipherText record into a TLSCompressed record using
 * AES in CBC mode.
 *
 * @p


(dest, mDecoder.mDic + dicPos, outSizeCur);
                    dest += outSizeCur;
                    outSize -= outSizeCur;
                    destLen += outSizeCur;

                    if (res != 0)
                        return res;

                    if (outSizeCur == 0 || outSize == 0)
                        return SZ_OK;
                }
            }

            #endregion

            #region Public Static Methods

            /*
            finishMode:
              It has meaning only if the decoding reaches output limit (*destLen).
              LZMA_FINISH_ANY - use smallest number of input bytes
              LZMA_FINISH_END - read EndOfStream marker after decoding

            Returns:
              SZ_OK
                status:
                  LZMA_STATUS_FINISHED_WITH_MARK
                  LZMA_STATUS_NOT_FINISHED
              SZ_ERROR_DATA - Data error
              SZ_ERROR_MEM  - Memory allocation error
              SZ_ERROR_UNSUPPORTED - Unsupported properties
              SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
            */

            public static SRes Lzma2De


int AppCompatTextHelper_android_drawableRight=4;
    /**
     *
This symbol is the offset where the {@link android.R.attr#drawableStart}
     * attribute's value can be found in the {@link #AppCompatTextHelper} array.
     *
     *
May be a reference to another resource, in the form
     * "@[+][package:]type/name" or a theme
     * attribute in the form
     * "?[package:]type/name".
     *
May be a color value, in the form of "#rgb",
     * "#argb", "#rrggbb", or
     * "#aarrggbb".
     *
     * @attr name android:drawableStart
     */
    public static final int AppCompatTextHelper_android_drawableStart=5;
    /**
     *
This symbol is the offset where the {@link android.R.attr#drawableEnd}
     * attribute's value can be found in the {@link #AppCompatTextHelper} array.
     *
     *
May be a reference to another resource, in the form
     * "@[+][package:]type/name" or a theme
     * attribute in the form
     * "?[package:]type/name".
     *
May be a color value, in the form of "#rgb",
     * "#argb", "#rrggbb", or
     * "#aarrggbb".
     *
     * @attr name android:drawableEnd
     */
    public static final int AppCompatTextHelper_android_drawableEnd=6;
    /**
     * Attributes that can be used with a AppCompatTextView.
     *
Includes the following attributes:

     *

     * <colgroup align="left" />
     * <colgroup align="left" />
     *
Attribute	Description

     *
{@link #AppCompatTextView_android_textAppearance android:textAppearance}

     *
{@link #AppCompatTextView_autoSizeMaxTextSize b4a.example:autoSizeMaxTextSize}	The maximum text size constraint to be used when auto-sizing text.

     *
{@link #AppCompatTextView_autoSizeMinTextSize b4a.example:autoSizeMinTextSize}	The minimum text size constraint to be used when auto-sizing text.

     *
{@link #AppCompatTextView_autoSizePresetSizes b4a.example:autoSizePresetSizes}	Resource array of dimensions to be used in conjunction with
     * autoSizeTextType set to uniform.

     *
{@link #AppCompatTextView_autoSizeStepGranularity b4a.example:autoSizeStepGranularity}	Specify the auto-size step size if autoSizeTextType is set to
     * uniform.

     *
{@link #AppCompatTextView_autoSizeTextType b4a.example:autoSizeTextType}	Specify the type of


ddChild(new Selector<Blackboard>());

        branch = branch.GetChild(0);
        branch.AddChild(new Selector<Blackboard>());

        branch = branch.GetChild(0);
        branch.AddChild(new Selector<Blackboard>());

        branch = branch.GetChild(0);
        branch.AddChild(new Sequence<Blackboard>());

        branch = branch.GetChild(0);
        branch.AddChild(eventAcceptor);

        taskEntry.Update(0); // 先启动

        // 测试事件是否直接到达末端 -- 这个似乎只能debug看调用栈
        string message = "message";
        taskEntry.OnEvent(message);
        Assert.AreEqual(message, eventAcceptor.eventObj);

        taskEntry.Update(1); // debug查看心跳调用栈
    }

    private class EventAcceptor : LeafTask<Blackboard>
    {
        internal object? eventObj;

        protected override int Execute() {
            if (RunFrames >= 10) {
                return TaskStatus.SUCCESS;
            }
            return TaskStatus.RUNNING;
        }

        protected override void OnEventImpl(object eventObj) {
            this.eventObj = eventObj;
        }
    }
}


', strBorrower.Length);
                    return 1;
                }
            }

            return (changed ? 1 : 0);
        REMOVE_RETURN:
            return RemovePrefix() ? 1 : (changed ? 1 : 0);
        }

        // 根据当前账户的权限，过滤册记录中的 borrower 元素内容
        // return:
        //      -1  出错
        //      0   itemdom 没有发生改变
        //      1   itemdom 发生了改变
        public int FilterBorrower(
            SessionInfo sessioninfo,
            XmlDocument itemdom,
            string style,
            out string strError)
        {
            strError = "";

            string strBorrower = DomUtil.GetElementText(itemdom.DocumentElement,
"borrower");
            if (string.IsNullOrEmpty(strBorrower))
                return 0;

            var error_in_field = StringUtil.IsInList("error_in_field", style);

            /*
            // 检查一个册记录的馆藏地点是否符合当前用户管辖的馆代码列表要求
            // return:
            //      -1  检查过程出错
            //      0   符合要求
            //      1   不符合要求
            int nRet = CheckItemLibraryCode(itemdom,
                        sessioninfo.ExpandLibraryCodeList,  // sessioninfo.LibraryCodeList,
                        out string strLibraryCode,
                        out strError);
            if (nRet == -1)
            {
                if (error_in_field)
                {
                    DomUtil.SetElementText(itemdom.DocumentElement,
    "borrower", $"error:{strError}");
                    return 1;
                }
                return -1;
            }
            */

            if (true/*nRet == 1*/)
            {
                // 还需要检查 strBorrower 这个读者是否在当前账户的管辖范围内？如果是，那么可能是这个读者借了其他图书馆的图书，当前账户也要了解这一点，那么不应该脱敏这个证条码号
                // return:
                //      -1  出错
                //      0   不在控制下
                //      1   在控制下
                int nRet = IsPatronInControl(null, sessioninfo, strBorrower, out strError);
                if (nRet == -1 && error_in_field)
                {
                    DomUtil.SetElementText(itemdom.DocumentElement,
"borrower", $"error:{strError}");
                    return 1;
                }
                if (nRet != 1)
                {
                    // 把借阅人的证条码号覆盖
                    if (string.IsNullOrEmpty(strBorrower) == false)
                        DomUtil.SetElementText(itemdom.DocumentElement,
                            "borrower", new string('*', strBorrower.Length));
                    // strXml = itemdom.DocumentElement.OuterXml;
                    return 1;
                }
            }

            return 0;
        }

        // 检查一个读者记录是否在当前账户的控制范围内
        // return:
        //      -1  出错
        //      0   不在控制下
        //      1   在控制下
        public int IsPatronInControl(
            RmsChannel channel,
            SessionInfo sessioninfo,
            string strReaderBarcode,
            out string strError)
        {
            strError = "";

            if (string.IsNullOrEmpty(strReaderBarcode))
            {
                strError = "IsPatronInControl() 调用参数错误，strReaderBarcode 值不应为空";
                return -1;
            }

            if (channel == null)


ppPreferences: AppPreferences,
    private val accountRepository: AccountRepository,
    private val appExecutorService: ExecutorService,
    val loadNodes: LoadNodesUseCase,
) : BaseViewModel(application) {

    private val _newRelease = MutableStateFlow(Release.Empty)
    val newRelease = _newRelease.asStateFlow()

    val unreadNotifications = accountRepository.unreadNotifications
        .stateIn(
            scope = viewModelScope,
            started = SharingStarted.WhileSubscribed(),
            initialValue = 0
        )

    init {
        autoCheckForUpdates()
        listenCanCheckIn()
        listenAutoCheckIn()
        initWebViewProxy()
    }

    private fun autoCheckForUpdates() {
        viewModelScope.launch {
            val release = checkForUpdates.invoke()
            _newRelease.emit(release)
        }
    }

    private fun listenCanCheckIn() {
        viewModelScope.launch {
            accountRepository.hasCheckingInTips
                .combine(
                    accountRepository.autoCheckIn,
                    transform = { hasCheckingInTips, autoCheckIn -> hasCheckingInTips && autoCheckIn })
                .distinctUntilChanged()
                .collectLatest {
                    if (it) {
                        checkInInternal()
                    }
                }
        }
    }

    private suspend fun checkInInternal() {
        val result = checkIn()
        if (result.success) {
            result.message?.let { updateSnackbarMessage(it) }
        } else {
            updateSnackbarMessage(
                result.message ?: context.getString(R.string.daily_mission_failure)
            )
        }
    }

    private val autoCheckInWorkName = "autoCheckInWork"

    private fun listenAutoCheckIn() {
        viewModelScope.launch {
            accountRepository.isLoggedIn.combine(
                accountRepository.autoCheckIn,
                transform = { isLoggedIn, autoCheckIn -> isLoggedIn && autoCheckIn })
                .distinctUntilChanged()
                .collectLatest { shouldCheckIn ->
                    if (shouldCheckIn) {
                        //登录成功并且开启自动签到，会尝试自动签到；
                        checkInInternal()
                        //PeriodicWork 在设定的 repeatInterval 内肯定能执行一次，但是不保证具体是什么时候执行；
                        //将周期设置为每12小时，可以确保每一天之内，肯定能执行一次；
                        //在浏览主页的时候，会自动签到；
                        //使用Work仅为了处理某一天没有打开APP的情况，也能自动签到；
                        val checkInWorkRequest =
                            PeriodicWorkRequestBuilder<CheckInWorker>(
                                Duration.ofHours(12),
                                Duration.ofHours(1),
                            ).build()
                        WorkManager.getInstance(context).enqueueUniquePeriodicWork(
                            autoCheckInWorkName,
                            ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
                            checkInWorkRequest
                        )
                    } else {
                        WorkManager.getInstance(context).cancelUniqueWork(autoCheckInWorkName)
                    }
                }
        }
    }

    private fun initWebViewProxy() {
        viewModelScope.launch {
            appPreferences.proxyInfo.collectLatest {
                if (it != ProxyInfo.Default) {
                    WebViewProxy.updateProxy(it, appExecutorService)
                }
            }
        }
    }

    fun resetNewRelease() {
        viewModelScope.launch {
            _newRelease.emit(Release.Empty)
        }
    }

    fun ignoreRelease(release: Release) {
        viewModelScope.launch {
            appPreferences.ignoredReleaseName(release.tagName)
        }
    }

    fun loadNodes() {
        viewModelScope.launch {
            loadNodes.execute()
        }


 (formerly \"Group Folders\") allows administrators to create and manage shared folders that are accessible \n\t\t\tto selected teams within Nextcloud.\n\n\t\t\tAdmins can configure folders from the Team Folders section in the admin settings, where they can grant access to one \n\t\t\tor more teams, set custom permissions (such as read, write, and sharing rights), and assign storage quotas to each \n\t\t\tfolder.\n\n\t\t\tAs of Hub 10/Nextcloud 31, admins must be members of a team to assign it a Team Folder. The app supports advanced \n\t\t\tfeatures such as quota management, granular access control, and integration with Nextcloud’s trash and versioning \n\t\t\tsystems." : "團隊資料夾（原稱「群組資料夾」）允許管理員建立並管理共享資料夾，這些資料夾僅限於 Nextcloud 內選定的團隊成員存取。\n\n\t\t\t管理員可在管理設定中的「團隊資料夾」區段進行資料夾設定，在此處可授予一個或多個團隊存取權限、設定自訂權限（例如讀取、寫入及分享權限），並為每個資料夾指派儲存配額。\n\n\t\t\t自 Hub 10/Nextcloud 31 版本起，管理員必須成為團隊成員才能為其指派團隊資料夾。此應用程式支援進階功能，例如配額管理、詳細的存取控制，以及與 Nextcloud 垃圾桶與版本控制系統的整合。",
    "Unset" : "取消設定",
    "Denied (Inherited permission)" : "拒絕（繼承權限）",
    "Allowed (Inherited permission)" : "允許（繼承權限）",
    "Denied" : "拒絕",
    "Allowed" : "允許",
    "Access denied" : "拒絕存取",
    "Access allowed" : "允許存取",
    "Inherit permission" : "繼承權限",
    "Deny" : "否",
    "Allow" : "允許",
    "Group" : "群組",
    "Team" : "團隊",
    "Team folder" : "團隊資料夾",
    "Read" : "讀取",
    "Write" : "寫入",
    "Create" : "建立",
    "Delete" : "刪除",
    "Share" : "分享",
    "You" : "您",
    "Remove access rule" : "移除存取規則",
    "Add advanced permission rule" : "加入進階權限規則",
    "Select a user or group" : "選擇一個使用者或群組",
    "Open Team folder" : "開啟團隊資料夾",
    "Permission denied. User does not have sufficient permissions." : "沒有權限。使用者權限不足。",
    "Unexpected status from server" : "來自伺服器的意外狀態",
    "List of Team folders." : "團隊資料夾清單",
    "No Team folders yet" : "尚無團隊資料夾",
    "Team folders will show up here" : "團隊資料夾將會在此顯示",
    "Add group" : "新增群組",
    "Default" : "預設",
    "Unlimited" : "無限制",
    "Are you sure you want to del


OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion

namespace SnowBank.Linq
{

	public class QueryStatistics<TData>
	{
		public QueryStatistics()
		{ }

		public QueryStatistics(TData? value)
		{
			this.Value = value;
		}

		public TData? Value { get; protected set; }

		public void Update(TData? newValue)
		{
			this.Value = newValue;
		}
	}

	public sealed class KeyValueSizeStatistics
	{

		/// Total number of pairs of keys and values that have flowed through this point
		public long Count { get; private set; }

		/// Total size of all keys and values combined
		public long Size => checked(this.KeySize + this.ValueSize);

		/// Total size of all keys combined
		public long KeySize { get; private set; }

		/// Total size of all values combined
		public long ValueSize { get; private set; }

		public void Add(int keySize, int valueSize)
		{
			this.Count++;
			this.KeySize = checked(keySize + this.KeySize);
			this.ValueSize = checked(valueSize + this.ValueSize);
		}

	}

	public sealed class DataSizeStatistics
	{

		/// Total number of items that have flowed through this point
		public long Count { get; private set; }

		/// Total size of all items that have flowed through this point
		public long Size { get; private set; }

		public void Add(int size)
		{
			this.Count++;
			this.Size = checked(size + this.Size);
		}

	}

}


d".format(m, s, ms / 10)
    }
}

@NeedsTest("untested")
fun getDayStart(time: Time): Long {
    val cal = time.calendar()
    if (cal[Calendar.HOUR_OF_DAY] < 4) {
        cal.roll(Calendar.DAY_OF_YEAR, -1)
    }
    cal[Calendar.HOUR_OF_DAY] = 4
    cal[Calendar.MINUTE] = 0
    cal[Calendar.SECOND] = 0
    cal[Calendar.MILLISECOND] = 0
    return cal.timeInMillis
}
/*
 *  Copyright (c) 2025 David Allison <davidallisongithub@gmail.com>
 *
 *  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; either version 3 of the License, or (at your option) any later
 *  version.
 *
 *  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/>.
 */

package com.ichi2.anki.common.annotations

/**
 * Use when code should be converted to use context parameters (Kotlin 2.2.0)
 *
 * Context parameters are not yet supported by AnkiDroid
 * https://github.com/JLLeitschuh/ktlint-gradle/issues/912
 *
 * @param toExtend the name of the class to extend
 */
@Target(
    AnnotationTarget.CLASS,
    AnnotationTarget.FUNCTION,
    AnnotationTarget.VALUE_PARAMETER,
    AnnotationTarget.EXPRESSION,
    AnnotationTarget.FIELD,
    AnnotationTarget.PROPERTY,
)
@Repeatable
@Retention(AnnotationRetention.SOURCE)
@MustBeDocumented
annotation class UseContextParameter(
    val toExtend: String,
)
/*
 *  Copyright (c) 2020 Arthur Milchior <arthur@milchior.fr>
 *
 *  This file is free software: you may copy, redistribute and/or modify it
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation, either version 3 of the License, or (at your
 *  option) any later version.
 *
 *  This file 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/>.
 *
 *  This file incorporates work covered by the following copyright and
 *  permission notice:
 *
 *    Copyright (c) 2002 JSON.org
 *
 *    Permission is hereby granted, free of charge, to any person obtaining a copy
 *    of this software and associated documentation files (the "Software"), to deal
 *    in the Software without restriction, including without limitation the rights
 *    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *    copies of the Software, and to permit persons to whom the Software is
 *    furnished to do so, subject to the following conditions:
 *
 *    The above copyright notice and this permission notice shall be included in all
 *    copies or substantial portions of the Software.
 *
 *    The Software shall be used for Good, not Evil.
 *
 *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *    LIABILITY, WHETHER IN A


efault values */
	sensor_value[index] = 0;
	units[index][0] = '\0';
	min_measured_value[index] = INT32_MAX;
	max_measured_value[index] = -INT32_MAX;
	min_range_value[index] = 0;
	max_range_value[index] = 0;

	(void)memset(res[index], 0,
		     sizeof(res[index][0]) * ARRAY_SIZE(res[index]));
	init_res_instance(res_inst[index], ARRAY_SIZE(res_inst[index]));

	/* initialize instance resource data */
	INIT_OBJ_RES(SENSOR_VALUE_RID, res[index], i,
		     res_inst[index], j, 1, false, true,
		     &sensor_value[index], sizeof(*sensor_value),
		     NULL, NULL, NULL, sensor_value_write_cb, NULL);
	INIT_OBJ_RES_DATA_LEN(SENSOR_UNITS_RID, res[index], i, res_inst[index], j,
			  units[index], UNIT_STR_MAX_SIZE, 0);
	INIT_OBJ_RES_DATA(MIN_MEASURED_VALUE_RID, res[index], i,
			  res_inst[index], j, &min_measured_value[index],
			  sizeof(*min_measured_value));
	INIT_OBJ_RES_DATA(MAX_MEASURED_VALUE_RID, res[index], i,
			  res_inst[index], j, &max_measured_value[index],
			  sizeof(*max_measured_value));
	INIT_OBJ_RES_DATA(MIN_RANGE_VALUE_RID, res[index], i,
			  res_inst[index], j, &min_range_value[index],
			  sizeof(*min_range_value));
	INIT_OBJ_RES_DATA(MAX_RANGE_VALUE_RID, res[index], i,
			  res_inst[index], j, &max_range_value[index],
			  sizeof(*max_range_value));
	INIT_OBJ_RES_EXECUTE(RESET_MIN_MAX_MEASURED_VALUES_RID,
			     res[index], i, reset_min_max_measured_values_cb);
#if defined(CONFIG_LWM2M_IPSO_TEMP_SENSOR_VERSION_1_1)
	INIT_OBJ_RES_OPTDATA(APPLICATION_TYPE_RID, res[index], i,
			     res_inst[index], j);
	INIT_OBJ_RES_OPTDATA(TIMESTAMP_RID, res[index], i, res_inst[index], j);
	INIT_OBJ_RES_OPTDATA(FRACTIONAL_TIMESTAMP_RID, res[index], i,
			     res_inst[index], j);
	INIT_OBJ_RES_OPTDATA(MEASUREMENT_QUALITY_INDICATOR_RID, res[index],
			     i, res_inst[index], j);
	INIT_OBJ_RES_OPTDATA(MEASUREMENT_QUALITY_LEVEL_RID, res[index], i,
			     res_inst[index], j);
#endif

	inst[index].resources = res[index];
	inst[index].resource_count = i;
	LOG_DBG("Create IPSO Temperature Sensor instance: %d", obj_inst_id);
	return &inst[index];
}

static int ipso_temp_sensor_init(void)
{
	temp_sensor.obj_id = IPSO_OBJECT_TEMP_SENSOR_ID;
	temp_sensor.version_major = TEMP_VERSION_MAJOR;
	temp_sensor.version_minor = TEMP_VERSION_MINOR;
	temp_sensor.is_core = false;
	temp_sensor.fields = fields;
	temp_sensor.field_count = ARRAY_SIZE(fields);
	temp_sensor.max_instance_count = MAX_INSTANCE_COUNT;
	temp_sensor.create_cb = temp_sensor_create;
	lwm2m_register_obj(&temp_sensor);

	return 0;
}

LWM2M_OBJ_INIT(ipso_temp_sensor_init);


更新的闪卡
     * @param selectedGrade 用户选择的评分
     * @return 更新后的闪卡
     */
    fun applyGrade(card: FlashCard, selectedGrade: Grade): FlashCard {
        return card.copy(
            stability = selectedGrade.stability,
            difficulty = selectedGrade.difficulty,
            interval = selectedGrade.interval,
            dueDate = FSRSTimeUtils.addMillisToNow(selectedGrade.durationMillis),
            reviewCount = card.reviewCount + 1,
            lastReview = LocalDateTime.now(),
            phase = when (selectedGrade.choice) {
                Rating.Again -> CardPhase.ReLearning.value
                else -> CardPhase.Review.value
            }
        )
    }

    /**
     * 检查闪卡是否到期需要复习
     *
     * @param card 要检查的闪卡
     * @param currentTime 当前时间，默认为系统当前时间
     * @return 是否到期
     */
    fun isDue(card: FlashCard, currentTime: LocalDateTime = LocalDateTime.now()): Boolean {
        return currentTime.isAfter(card.dueDate) || currentTime.isEqual(card.dueDate)
    }

    /**
     * 获取到期的闪卡列表
     *
     * @param cards 所有闪卡列表
     * @param currentTime 当前时间
     * @return 到期的闪卡列表
     */
    fun getDueCards(cards: List<FlashCard>, currentTime: LocalDateTime = LocalDateTime.now()): List<FlashCard> {
        return cards.filter { isDue(it, currentTime) }
    }

    /**
     * 批量处理多张闪卡的评分选项
     *
     * @param cards 闪卡列表
     * @return 每张卡片对应的评分选项映射
     */
    fun batchCalculateGrades(cards: List<FlashCard>): Map<FlashCard, List<Grade>> {
        return cards.associateWith { getGradeOptions(it) }
    }

    /**
     * 获取学习统计信息
     *
     * @param cards 所有闪卡列表
     * @return 学习统计数据
     */
    fun getLearningStat(cards: List<FlashCard>): LearningStat {
        val currentTime = LocalDateTime.now()
        val dueCards = getDueCards(cards, currentTime)
        val newCards = cards.filter { it.phase == CardPhase.Added.value }
        val reviewCards = cards.filter { it.phase == CardPhase.Review.value }
        val relearningCards = cards.filter { it.phase == CardPhase.ReLearning.value }

        return LearningStat(
            totalCards = cards.size,
            dueCards = dueCards.size,
            newCards = newCards.size,
            reviewCards = reviewCards.size,
            relearningCards = relearningCards.size,
            averageDifficulty = cards.map { it.difficulty }.average().takeIf { !it.isNaN() } ?: 0.0,
            averageStability = cards.map { it.stability }.average().takeIf { !it.isNaN() } ?: 0.0
        )
    }
}

/**
 * 学习统计数据类
 *
 * @property totalCards 总卡片数
 * @property dueCards 到期卡片数
 * @property newCards 新卡片数
 * @property reviewCards 复习阶段卡片数
 * @property relearningCards 重新学习阶段卡片数
 * @property averageDifficulty 平均难度
 * @property averageStability 平均稳定性
 */
data class LearningStat(
    val totalCards: Int,
    val dueCards: Int,
    val newCards: Int,
    val reviewCards: Int,
    val relearningCards: Int,
    val averageDifficulty: Double,
    val averageStability: Double
)
/*
 * Copyright (c) 2023-2025 tang shimin
 *
 * This file is part of MuJing, which is licensed under GPL v3.
 *
 * This file contains vector graphics generated from Material Symbols icons
 * from Google Fonts (https://fonts.google.com/icons)
 * Original icons Copyright by Google LLC
 * Original icons licensed under Apache License 2.0
 *
 * The original Apache License 2.0 text:
 *
 * Licensed under the Ap


资等，确保店铺正常运营。选址和租赁：选择合适的地段和店铺，考虑到人流量、交通便利、租金等因素。装修和设备：根据店铺的定位和经营范围，进行装修和设备的选择和购买。

内部装修：包括店铺内部装修、货架定制、所有设备与经营用具、招牌制作等。商品及服务内容：商品及服务构成、政策、商品订购、重点商品及服务确定。商品采购：理清进货渠道，并具体实施。

**商业计划书**：制定商业计划书，明确经营目标、产品或服务、市场定位、销售策略、财务预算等内容，以便为自己的创业之路制定一个清晰的路线图。

准备工作首先，新手需要进行准备工作，包括选择平台、注册账号、准备资金、准备货源等。拍摄商品照片其次，新手需要拍摄商品照片，照片质量要好，能够展示商品的特点和优势。

关于多多无货源开店培训和拼多多无货源开店培训的介绍到此就结束了，不知道你从中找到你需要的信息了吗 ？如果你还想了解更多这方面的信息，记得收藏关注本站。

上一个：动物医院英文短语怎么写的啊（动物医院


olang-migrate/migrate

- 4. cilium/cilium - https://github.com/cilium/cilium

- 5. RezaSi/go-interview-practice - https://github.com/RezaSi/go-interview-practice

- 6. IceWhaleTech/CasaOS - https://github.com/IceWhaleTech/CasaOS

- 7. ArvinLovegood/go-stock - https://github.com/ArvinLovegood/go-stock

- 8. hashicorp/consul - https://github.com/hashicorp/consul

- 9. go-playground/validator - https://github.com/go-playground/validator

- 10. containers/podman - https://github.com/containers/podman

- 11. moby/buildkit - https://github.com/moby/buildkit

- 12. containerd/containerd - https://github.com/containerd/containerd

- 13. go-gorm/gorm - https://github.com/go-gorm/gorm

- 14. distribution/distribution - https://github.com/distribution/distribution

- 15. prometheus/prometheus - https://github.com/prometheus/prometheus

- 16. spf13/cobra - https://github.com/spf13/cobra

- 17. hashicorp/vault - https://github.com/hashicorp/vault

- 18. docker/compose - https://github.com/docker/compose

- 19. samber/lo - https://github.com/samber/lo

- 20. lxc/incus - https://github.com/lxc/incus

- 21. milvus-io/milvus - https://github.com/milvus-io/milvus

- 22. gitleaks/gitleaks - https://github.com/gitleaks/gitleaks

----

- 编辑：Tony Bai
- [编辑主页](https://tonybai.com)：https://tonybai.com
- [GopherDaily主页](https://gopherdaily.tonybai.com)：gopherdaily.tonybai.com
- [GopherDaily项目](https://github.com/bigwhite/gopherdaily)：github.com/bigwhite/gopherdaily
- [订阅GopherDaily](https://gopherdaily.tonybai.com/subscribe)
- [取消订阅GopherDaily](https://gopherdaily.tonybai.com/unsubscribe)
- [另一个邮件列表](https://gopher-daily.com): https://gopher-daily.com

Copyright 2019-2024 GopherDaily
# 从简单到强大：再次探索Caddy服务器的魅力 | Gopher Daily (20241106)ʕ◔ϖ◔ʔ

>每日一谚：Write Go code as Gophers write code

## Go技术生态

- 1. 从简单到强大：再次探索Caddy服务器的魅力 - https://tonybai.com/2024/11/07/exploring-caddy/

- 2. 为什么Clean Architecture在Go中挣扎 - https://dev.to/lucasdeataides/why-clean-architecture-struggles-in-golang-and-what-works-better-m4g

- 3. Writing a shell in Go - https://changelog.com/gotime/336

- 4. 使用Go和Python进行行为驱动测试 （


-renew at the end of the applicable plan period, and you will be charged monthly thereafter at the standard monthly fee until you cancel. \u003Cstrong\u003EWhile you may cancel your subscription at any time, cancellation will not go into effect until the end of your Commitment Plan.\u003C\u002Fstrong\u003E Thereafter, our standard cancellation policy applies. Offer available to new and rejoining members only. Offer available \u003Ca href=\\\"https:\u002F\u002Fwww.weightwatchers.com\u002Fus\u002Fparticipating-locations\\\" target=\\\"_blank\\\" class=\\\"link-69\\\" style=\\\"color:#3c34e5;\\\"\u003Ein participating areas only\u003C\u002Fa\u003E.\",\"startDate\":\"11\u002F5\u002F2024, 12:000:00 AM\",\"endDate\":\"11\u002F6\u002F2024, 11:59:59 PM\"},\"offer6\":{\"banner_1\":{\"offerCopy\":\"Ends tomorrow: 6 months free! \"},\"banner_2\":{\"offerCopy\":\"ENDS TOMORROW: get 6 months free! \"},\"startingPrice\":\"Starting at $22\u002Fmonth\",\"offerTerms\":\"\u003Cstrong\u003EOffer Terms:\u003C\u002Fstrong\u003E Offer ends 11\u002F8\u002F24 (11:59pm EST). Get a waiver of our Starter Fee and get 12 months for the price of 6 months when you purchase a 12-Month Commitment Plan. Plans auto-renew at the end of the applicable plan period, and you will be charged monthly thereafter at the standard monthly fee until you cancel. \u003Cstrong\u003EWhile you may cancel your subscription at any time, cancellation will not go into effect until the end of your Commitment Plan.\u003C\u002Fstrong\u003E Thereafter, our standard cancellation policy applies. Offer available to new and rejoining members only. Offer available \u003Ca href=\\\"https:\u002F\u002Fwww.weightwatchers.com\u002Fus\u002Fparticipating-locations\\\" target=\\\"_blank\\\" class=\\\"link-69\\\" style=\\\"color:#3c34e5;\\\"\u003Ein participating areas only\u003C\u002Fa\u003E.\",\"startDate\":\"11\u002F7\u002F2024, 12:000:00 AM\",\"endDate\":\"11\u002F7\u002F2024, 11:59:59 PM\"},\"offer7\":{\"banner_1\":{\"offerCopy\":\"Ends today: 6 months free! \"},\"banner_2\":{\"offerCopy\":\"ENDS TODAY: get 6 months free! \"},\"startingPrice\":\"Starting at $22\u002Fmonth\",\"offerTerms\":\"\u003Cstrong\u003EOffer Terms:\u003C\u002Fstrong\u003E Offer ends 11\u002F8\u002F24 (11:59pm EST). Get a waiver of our Starter Fee and get 12 months for the price of 6 months when you purchase a 12-Month Commitment Plan. Plans auto-renew at the end of the applicable plan period, and you will be charged monthly thereafter at the standard monthly fee until you cancel. \u003Cstrong\u003EWhile you may cancel your subscription at any time, cancellation will not go into effect until the end of your Commitment Plan.\u003C\u002Fstrong\u003E Thereafter, our standard cancellation policy applies. Offer available to new and rejoining members only. Offer available \u003Ca href=\\\"https:\u002F\u002Fwww.weightwatchers.com\u002Fus\u002Fparticipating-locations\\\" target=\\\"_blank\\\" class=\\\"link-69\\\" style=\\\"color:#3c34e5;\\\"\u003Ein participating areas only\u003C\u002Fa\u003E.\",\"startDate\":\"11\u002F8\u002F2024, 12:000:00 AM\",\"endDate\":\"11\u002F8\u002F2024, 11:59:59 PM\"}},\"\u002Fus\u002Fprogram


/*
 * Loaders.h
 * ---------
 * Purpose: Common functions for module loaders
 * Notes  : (currently none)
 * Authors: OpenMPT Devs
 * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
 */

#pragma once

#include "openmpt/all/BuildSettings.hpp"

#include "../common/misc_util.h"
#include "../common/FileReader.h"
#include "Sndfile.h"
#include "SampleIO.h"
#include "openmpt/fileformat_base/magic.hpp"

OPENMPT_NAMESPACE_BEGIN

// Read 'howMany' order items from an array.
// 'stopIndex' is treated as '---', 'ignoreIndex' is treated as '+++'. If the format doesn't support such indices, just pass uint16_max.
template<typename T, size_t arraySize>
bool ReadOrderFromArray(ModSequence &order, const T(&orders)[arraySize], size_t howMany = arraySize, uint16 stopIndex = uint16_max, uint16 ignoreIndex = uint16_max)
{
	static_assert(mpt::is_binary_safe<T>::value);
	LimitMax(howMany, arraySize);
	LimitMax(howMany, MAX_ORDERS);
	ORDERINDEX readEntries = static_cast<ORDERINDEX>(howMany);

	order.resize(readEntries);
	for(int i = 0; i < readEntries; i++)
	{
		PATTERNINDEX pat = static_cast<PATTERNINDEX>(orders[i]);
		if(pat == stopIndex) pat = PATTERNINDEX_INVALID;
		else if(pat == ignoreIndex) pat = PATTERNINDEX_SKIP;
		order.at(i) = pat;
	}
	return true;
}

// Read 'howMany' order items as integers with defined endianness from a file.
// 'stopIndex' is treated as '---', 'ignoreIndex' is treated as '+++'. If the format doesn't support such indices, just pass uint16_max.
template<typename T>
bool ReadOrderFromFile(ModSequence &order, FileReader &file, size_t howMany, uint16 stopIndex = uint16_max, uint16 ignoreIndex = uint16_max)
{
	static_assert(mpt::is_binary_safe<T>::value);
	if(!file.CanRead(howMany * sizeof(T)))
		return false;
	LimitMax(howMany, MAX_ORDERS);
	ORDERINDEX readEntries = static_cast<ORDERINDEX>(howMany);

	order.resize(readEntries);
	T patF;
	for(auto &pat : order)
	{
		file.ReadStruct(patF);
		pat = static_cast<PATTERNINDEX>(patF);
		if(pat == stopIndex) pat = PATTERNINDEX_INVALID;
		else if(pat == ignoreIndex) pat = PATTERNINDEX_SKIP;
	}
	return true;
}

OPENMPT_NAMESPACE_END


6776 174.309 41.3757 172.554 41.3777ZM172.554 28.7407C171.364 28.7407 170.2 29.0937 169.211 29.7549C168.221 30.4161 167.45 31.3559 166.994 32.4555C166.539 33.5551 166.42 34.765 166.652 35.9323C166.884 37.0996 167.457 38.1718 168.299 39.0134C169.14 39.855 170.213 40.4281 171.38 40.6603C172.547 40.8925 173.757 40.7733 174.857 40.3178C175.956 39.8624 176.896 39.0911 177.557 38.1015C178.219 37.1119 178.572 35.9485 178.572 34.7583C178.57 33.1629 177.935 31.6333 176.807 30.5052C175.679 29.3771 174.149 28.7425 172.554 28.7407Z" fill="#3F3D56"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="311.711" height="236" fill="white"/>
</clipPath>
</defs>
</svg>
""";

String searchLight = """
    <svg width="312" height="257" viewBox="0 0 312 257" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M84.82 256V246.662H83.658V253.956L78.282 246.662H77.092V256H78.254V248.552L83.7 256H84.82ZM89.9161 256.168C91.9741 256.168 93.2621 254.572 93.2621 252.612C93.2621 250.652 91.9741 249.07 89.9161 249.07C87.8581 249.07 86.5701 250.652 86.5701 252.612C86.5701 254.572 87.8581 256.168 89.9161 256.168ZM89.9161 255.23C88.4741 255.23 87.6621 253.998 87.6621 252.612C87.6621 251.24 88.4741 250.008 89.9161 250.008C91.3581 250.008 92.1561 251.24 92.1561 252.612C92.1561 253.998 91.3581 255.23 89.9161 255.23ZM101.649 256.168C104.169 256.168 105.093 254.782 105.093 253.424C105.093 249.938 99.5632 251.142 99.5632 249.042C99.5632 248.16 100.361 247.558 101.481 247.558C102.503 247.558 103.483 247.908 104.183 248.678L104.883 247.824C104.099 246.998 102.993 246.522 101.565 246.522C99.7312 246.522 98.3592 247.572 98.3592 249.112C98.3592 252.444 103.889 251.114 103.889 253.522C103.889 254.236 103.357 255.132 101.691 255.132C100.375 255.132 99.3672 254.488 98.7512 253.802L98.0652 254.684C98.8352 255.552 100.025 256.168 101.649 256.168ZM109.838 256.168C110.944 256.168 111.854 255.804 112.526 255.132L112.022 254.446C111.49 254.992 110.706 255.3 109.936 255.3C108.48 255.3 107.584 254.236 107.5 252.962H112.974V252.696C112.974 250.666 111.77 249.07 109.726 249.07C107.794 249.07 106.394 250.652 106.394 252.612C106.394 254.726 107.836 256.168 109.838 256.168ZM111.938 252.192H107.5C107.556 251.156 108.27 249.938 109.712 249.938C111.252 249.938 111.924 251.184 111.938 252.192ZM119.953 256V2


Width != width || eglHeight != height) {
                log.e("OpenGL surface has wrong size (expected: ${width}x${height}, found: ${eglWindow.getWidth()}x${eglWindow.getHeight()}).")
                // Throw a clear error in this very specific scenario so we can catch it in tests.
                if (codec.name == "c2.android.avc.encoder" && eglWidth == 1 && eglHeight == 1) {
                    error("c2.android.avc.encoder was unable to create the input surface (1x1).")
                }
            }

            Codec(codec, Surface(eglContext, eglWindow))
        }

        override fun get(type: TrackType) = when (type) {
            TrackType.AUDIO -> lazyAudio
            TrackType.VIDEO -> lazyVideo
        }
    }

    val ownsEncoderStart = object : TrackMap<Boolean> {
        override fun has(type: TrackType) = true
        override fun get(type: TrackType) = current[type] == 0
    }

    val ownsEncoderStop = object : TrackMap<Boolean> {
        override fun has(type: TrackType) = true
        override fun get(type: TrackType) = current[type] == sources[type].lastIndex
    }

    fun release() {
        encoders.forEach {
            it.surface?.release()
        }
    }
}package com.otaliastudios.transcoder.internal.utils

import com.otaliastudios.transcoder.common.TrackType

interface TrackMap<T> : Iterable<T> {

    operator fun get(type: TrackType): T
    val video get() = get(TrackType.VIDEO)
    val audio get() = get(TrackType.AUDIO)

    fun has(type: TrackType): Boolean
    val hasVideo get() = has(TrackType.VIDEO)
    val hasAudio get() = has(TrackType.AUDIO)

    fun getOrNull(type: TrackType) = if (has(type)) get(type) else null
    fun videoOrNull() = getOrNull(TrackType.VIDEO)
    fun audioOrNull() = getOrNull(TrackType.AUDIO)

    val size get() = listOfNotNull(videoOrNull(), audioOrNull()).size

    override fun iterator() = listOfNotNull(videoOrNull(), audioOrNull()).iterator()
}

interface MutableTrackMap<T> : TrackMap<T> {
    operator fun set(type: TrackType, value: T?)

    fun reset(video: T?, audio: T?) {
        set(TrackType.VIDEO, video)
        set(TrackType.AUDIO, audio)
    }

    override var audio: T
        get() = super.audio
        set(value) = set(TrackType.AUDIO, value)

    override var video: T
        get() = super.video
        set(value) = set(TrackType.VIDEO, value)
}

fun <T> trackMapOf(default: T?) = trackMapOf(default, default)

fun <T> trackMapOf(video: T?, audio: T?): TrackMap<T> = DefaultTrackMap(video, audio)

fun <T> mutableTrackMapOf(default: T?) = mutableTrackMapOf(default, default)

fun <T> mutableTrackMapOf(video: T? = null, audio: T? = null): MutableTrackMap<T> = DefaultTrackMap(video, audio)

private class DefaultTrackMap<T>(video: T?, audio: T?) : MutableTrackMap<T> {
    private val map = mutableMapOf(TrackType.VIDEO to video, TrackType.AUDIO to audio)
    override fun get(type: TrackType): T = requireNotNull(map[type])
    override fun has(type: TrackType) = map[type] != null
    override fun set(type: TrackType, value: T?) {
        map[type] = value
    }
}

package com.otaliastudios.transcoder.internal.codec

import android.media.MediaCodec.*
import android.media.MediaFormat
import android.view.Surface
import com.otaliastudios.transcoder.common.TrackType
import com.otaliastudios.transcoder.common.trackType
import


�发](https://github.com/botuniverse/onebot-11/blob/master/message/segment.md#%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91-)
 *
 * @author ForteScarlet
 */
@Serializable
@SerialName(OneBotForward.TYPE)
public class OneBotForward private constructor(
    override val data: Data
) : OneBotMessageSegment {

    /**
     * Get the [Data.id].
     */
    public val id: ID
        get() = data.id

    public companion object Factory {
        public const val TYPE: String = "forward"

        /**
         * Create [OneBotForward].
         *
         * @param id 合并转发 ID, see [Data.id]
         */
        @JvmStatic
        public fun create(id: ID): OneBotForward =
            OneBotForward(Data(id))
    }

    /**
     * Data of [OneBotForward]
     *
     * @property id 合并转发 ID，需通过
     * [get_forward_msg API](https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_forward_msg-%E8%8E%B7%E5%8F%96%E5%90%88%E5%B9%B6%E8%BD%AC%E5%8F%91%E6%B6%88%E6%81%AF)
     * 获取具体内容
     */
    @Serializable
    public data class Data(val id: ID)
}
/*
 * Copyright (c) 2024. ForteScarlet.
 *
 * This file is part of simbot-component-onebot.
 *
 * simbot-component-onebot is free software: you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 *
 * simbot-component-onebot 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with simbot-component-onebot.
 * If not, see <https://www.gnu.org/licenses/>.
 */

package love.forte.simbot.component.onebot.v11.common.api

import kotlinx.serialization.Serializable
import love.forte.simbot.component.onebot.common.annotations.ApiResultConstructor
import love.forte.simbot.component.onebot.common.annotations.SourceEventConstructor

/**
 * 用于心跳事件中 `status` 属性和
 * `get_status` API 中响应数据的状态结果。
 *
 * [`get_status`-获取运行状态](https://github.com/botuniverse/onebot-11/blob/master/api/public.md#get_status-获取运行状态)
 *
 * status 在定义中存在 “OneBot 实现自行添加的其它内容” 的扩展字段。
 * 这些内容可以考虑从事件的原始字符串或API响应的原始字符串中自行解析，
 * 它的不确定性导致其难以直接通过 Kotlin Serialization 对其进行定义。
 *
 * @property online 当前 QQ 在线，`null` 表示无法查询到在线状态
 * @property good 状态符合预期，意味着各模块正常运行、功能正常，且 QQ 在线
 *
 * @author ForteScarlet
 */
@Serializable
public data class StatusResult
@ApiResultConstructor
@SourceEventConstructor
internal constructor(
    public val online: Boolean? = null,
    public val good: Boolean = false,
)
/*
 * Copyright (c) 2024. ForteScarlet.
 *
 * This file is part of simbot-component-onebot.
 *
 * simbot-component-onebot is free software: you can


ul> <note>
  /// If you're transferring between Amazon Web Services storage services, you
  /// don't need a DataSync agent.
  /// </note>
  ///
  /// May throw [InvalidRequestException].
  /// May throw [InternalException].
  ///
  /// Parameter [activationKey] :
  /// Specifies your DataSync agent's activation key. If you don't have an
  /// activation key, see Activate
  /// your agent.
  ///
  /// Parameter [agentName] :
  /// Specifies a name for your agent. You can see this name in the DataSync
  /// console.
  ///
  /// Parameter [securityGroupArns] :
  /// Specifies the Amazon Resource Name (ARN) of the security group that
  /// protects your task's network
  /// interfaces when using
  /// a virtual private cloud (VPC) endpoint. You can only specify one ARN.
  ///
  /// Parameter [subnetArns] :
  /// Specifies the ARN of the subnet where you want to run your DataSync task
  /// when using a VPC endpoint. This is the subnet where DataSync creates and
  /// manages the network
  /// interfaces for your transfer. You can only specify one ARN.
  ///
  /// Parameter [tags] :
  /// Specifies labels that help you categorize, filter, and search for your
  /// Amazon Web Services resources. We recommend creating at least one tag for
  /// your agent.
  ///
  /// Parameter [vpcEndpointId] :
  /// Specifies the ID of the VPC endpoint that you want your agent to connect
  /// to. For example, a VPC endpoint ID looks like
  /// vpce-01234d5aff67890e1.
  /// <important>
  /// The VPC endpoint you use must include the DataSync service name (for
  /// example, com.amazonaws.us-east-2.datasync).
  /// </important>
  Future<CreateAgentResponse> createAgent({
    required String activationKey,
    String? agentName,
    List<String>? securityGroupArns,
    List<String>? subnetArns,
    List<TagListEntry>? tags,
    String? vpcEndpointId,
  }) async {
    final headers = <String, String>{
      'Content-Type': 'application/x-amz-json-1.1',
      'X-Amz-Target': 'FmrsService.CreateAgent'
    };
    final jsonResponse = await _protocol.send(
      method: 'POST',
      requestUri: '/',
      exceptionFnMap: _exceptionFns,
      // TODO queryParams
      headers: headers,
      payload: {
        'ActivationKey': activationKey,
        if (agentName != null) 'AgentName': agentName,
        if (securityGroupArns != null) 'SecurityGroupArns': securityGroupArns,
        if (subnetArns != null) 'SubnetArns': subnetArns,
        if (tags != null) 'Tags': tags,
        if (vpcEndpointId != null) 'VpcEndpointId': vpcEndpointId,
      },
    );

    return CreateAgentResponse.fromJson(jsonResponse.body);
  }

  /// Creates a transfer location for a Microsoft Azure Blob Storage
  /// container. DataSync can use this location as a transfer source or
  /// destination.
  ///
  /// Before you begin, make sure you know <a
  /// href="https://docs.aws.amazon.com/datasync/latest/userguide/creating-azure-blob-l


teJointState(float deltaState)
        {
            Quaternion rot = Quaternion.AngleAxis(-deltaState * Mathf.Rad2Deg, UnityJoint.axis);
            transform.rotation = transform.rotation * rot;
        }

        #endregion

        protected override void ImportJointData(Joint joint)
        {
            UnityJoint.axis = (joint.axis != null) ? GetAxis(joint.axis) : GetDefaultAxis();

            if (joint.dynamics != null)
                ((HingeJoint)UnityJoint).spring = GetJointSpring(joint.dynamics);

            if (joint.limit != null)
                GetComponent<HingeJointLimitsManager>().InitializeLimits(joint.limit, (HingeJoint)UnityJoint);
        }

        protected override Joint ExportSpecificJointData(Joint joint)
        {
            joint.axis = GetAxisData(UnityJoint.axis);
            joint.dynamics = new Joint.Dynamics(((HingeJoint)UnityJoint).spring.damper, ((HingeJoint)UnityJoint).spring.spring);

            joint.limit = ExportLimitData();

            return joint;
        }

        public override bool AreLimitsCorrect()
        {
            HingeJointLimitsManager limits = GetComponent<HingeJointLimitsManager>();
            return limits != null && limits.LargeAngleLimitMin < limits.LargeAngleLimitMax;
        }

        protected override Joint.Limit ExportLimitData()
        {
            HingeJointLimitsManager hingeJointLimits = GetComponent<HingeJointLimitsManager>();
            return new Joint.Limit(
                Math.Round(hingeJointLimits.LargeAngleLimitMin * Mathf.Deg2Rad, RoundDigits),
                Math.Round(hingeJointLimits.LargeAngleLimitMax * Mathf.Deg2Rad, RoundDigits),
                EffortLimit,
                VelocityLimit);
        }
    }
}


 	FunctionExample ex;

    	ex = new FunctionExample();
    	ex.addInput(PARAM_MODEL, "box.prt");
    	ex.addInput(PARAM_NAME, "d*1");
    	Map<String, Object> rec;
    	List<Map<String, Object>> params = new ArrayList<Map<String, Object>>();
    	// record 1
    	rec = new OrderedMap<String, Object>();
    	params.add(rec);
    	rec.put(OUTPUT_NAME, "d21");
		rec.put(OUTPUT_VALUE, 32.5);
		rec.put(OUTPUT_ENCODED, false);
		rec.put(OUTPUT_DWG_DIM, false);
		rec.put(OUTPUT_DIM_TYPE, DimDetailData.TYPE_LINEAR);
		rec.put(OUTPUT_TEXT, new String[] {"{0:@D}\n"});
    	// record 2
    	rec = new OrderedMap<String, Object>();
    	params.add(rec);
    	rec.put(OUTPUT_NAME, "d31");
		rec.put(OUTPUT_VALUE, 5.0);
		rec.put(OUTPUT_ENCODED, false);
		rec.put(OUTPUT_DWG_DIM, false);
		rec.put(OUTPUT_DIM_TYPE, DimDetailData.TYPE_LINEAR);
		rec.put(OUTPUT_TEXT, new String[] {"{0:@D}\n"});
		ex.addOutput(OUTPUT_DIMLIST, params);
    	template.addExample(ex);

    	ex = new FunctionExample();
    	ex.addInput(PARAM_MODEL, "box.drw");
    	ex.addInput(PARAM_NAME, "d*1");
    	params = new ArrayList<Map<String, Object>>();
    	// record 1
    	rec = new OrderedMap<String, Object>();
    	params.add(rec);
    	rec.put(OUTPUT_NAME, "d1");
		rec.put(OUTPUT_VALUE, 32.5);
		rec.put(OUTPUT_ENCODED, false);
		rec.put(OUTPUT_DWG_DIM, false);
		rec.put(OUTPUT_SHEET, 1);
		rec.put(OUTPUT_VIEW_NAME, "main_view");
		rec.put(OUTPUT_DIM_TYPE, DimDetailData.TYPE_LINEAR);
		rec.put(OUTPUT_TEXT, new String[] {"{0:@D}\n"});
        rec.put(OUTPUT_LOCATION, JLJsonFileHelp.writePoint(100.0, 50.0, 0.0));
        rec.put(OUTPUT_TOLERANCE_TYPE, DimToleranceData.TYPE_PLUS_MINUS);
        rec.put(OUTPUT_TOL_PLUS, 0.75);
        rec.put(OUTPUT_TOL_MINUS, 1.0);
    	// record 2
    	rec = new OrderedMap<String, Object>();
    	params.add(rec);
    	rec.put(OUTPUT_NAME, "d11");
		rec.put(OUTPUT_VALUE, 5.0);
		rec.put(OUTPUT_ENCODED, false);
		rec.put(OUTPUT_DWG_DIM, false);
		rec.put(OUTPUT_SHEET, 1);
		rec.put(OUTPUT_VIEW_NAME, "main_view");
		rec.put(OUTPUT_DIM_TYPE, DimDetailData.TYPE_LINEAR);
		rec.put(OUTPUT_TEXT, new String[] {"{0:@D}\n"});
        rec.put(OUTPUT_LOCATION, JLJsonFileHelp.writePoint(5.0, 7.5, 0.0));
		ex.addOutput(OUTPUT_DIMLIST, params);
    	template.addExample(ex);

    	ex = new FunctionExample();
    	ex.addInput(PARAM_NAMES, new String[] {"d1","RADIUS","ANGLE"});
    	params = new ArrayList<Map<String, Object>>();
    	// record 1
    	rec = new OrderedMap<String, Object>();
    	params.add(rec);
    	rec.put(OUTPUT_NAME, "ANGLE");
    	rec.put(OUTPUT_VALUE, "MzAgASQCCg==");
    	rec.put(OUTPUT_ENCODED, true);
		rec.put(OUTPUT_DWG_DIM, false);
		rec.put(OUTPUT_SHEET, 2);
		rec.put(OUTPUT_VIEW_NAME, "hole_view");
		rec.put(OUTPUT_DIM_TYPE, DimDetailData.TYPE_ANGULAR);
		rec.put(OUTPUT_TEXT, new String[] {"{0:@D}\


Id,
      onSoundLevelChange: (level) {
        minSoundLevel = min(minSoundLevel, level);
        maxSoundLevel = max(maxSoundLevel, level);
        print('Sound level $level: $minSoundLevel - $maxSoundLevel');
      },
      cancelOnError: true,
      listenMode: ListenMode.confirmation,
      onDevice: _onDevice,
    );
  } catch (e) {
    print('Error in speech recognition: $e');
  }
}
// YouTube channel - https://www.youtube.com/@dimitarklaturov
// video - https://www.youtube.com/watch?v=wg4s9hE8N4k
// Join the Klaturov army - https://www.youtube.com/@dimitarklaturov/join
// Support my work - https://github.com/sponsors/bulgariamitko
// Website - https://bulgariamitko.github.io/flutterflowtutorials/
// You can book me as FF mentor - https://calendly.com/bulgaria_mitko
// GitHub repo - https://github.com/bulgariamitko/flutterflowtutorials
// Discord channel - https://discord.gg/G69hSUqEeU

import 'package:cross_file/cross_file.dart';
import 'package:camera/camera.dart';
import 'package:path_provider/path_provider.dart';
import 'dart:io';
import 'package:video_player/video_player.dart';
import 'package:flutter/foundation.dart'
    show kIsWeb, defaultTargetPlatform, TargetPlatform;
import 'package:path/path.dart' as p;

class CameraApp extends StatefulWidget {
  const CameraApp({
    super.key,
    this.width,
    this.height,
    required this.saveVideoAction,
  });

  final double? width;
  final double? height;
  final Future Function(FFUploadedFile videoData) saveVideoAction;

  @override
  State<CameraApp> createState() => _CameraAppState();
}

class _CameraAppState extends State<CameraApp> {
  List<CameraDescription>? _cameras;
  CameraController? _controller;
  Future<void>? _initializeControllerFuture;
  bool _isRecording = false;
  File? _videoFile;
  bool? _currentCameraIsFront;
  bool _isSwitchingCamera = false;

  @override
  void initState() {
    super.initState();
    _initializeCamera();
  }

  @override
  void didUpdateWidget(covariant CameraApp oldWidget) {
    super.didUpdateWidget(oldWidget);
    _handleRecordingState();
    _handlePlayerState();
    _handleCameraSwitch();
  }

  void _handleRecordingState() {
    if (FFAppState().cameraAS.startRecording && !_isRecording) {
      _startRecording();
    } else if (!FFAppState().cameraAS.startRecording && _isRecording) {
      _stopRecording();
    }
  }

  void _handlePlayerState() {
    if (FFAppState().cameraAS.player == false) {
      setState(() {
        _videoFile = null;
      });
    }
  }

  void _handleCameraSwitch() {
    final shouldBeFrontCamera = FFAppState().cameraAS.frontCamera;
    if (_currentCameraIsFront != shouldBeFrontCamera && !_isSwitchingCamera) {
      _switchCamera();
    }
  }

  Future<void> _initializeCamera() async {
    try {
      _cameras = await availableCameras();
      if (_cameras!.isNotEmpty) {
        await _switchCamera();
      }
    } catch (e) {
      print("Error initializing camera: $e");
    }
  }

  Future<void> _switchCamera() async {
    if (_cameras == null || _cameras!.isEmpty) return;

    set


策略时应该考虑哪些因素？|
|烹饪技巧|如何制作咖喱鸡？|
|旅游攻略|你有没有什么关于前往日本旅行的建议和技巧？|
|股票投资|你认为现在投资股票是否明智？如果是，你会选择哪些股票？|
|环保技术|有什么新型环保技术可以帮助我们减少碳排放？|
|语言学习|怎样才能更有效地学习外语？|
|体育赛事分析|谁将会成为下一个足球世界杯冠军？|
| 医学研究                | 如何设计一项具有高信度和高效度的医学实验？                                                                                |
| 人工智能应用           | 在自然语言处理领域，如何使用生成模型来生成更加流畅、准确的文本？                                                                                |
| 市场营销                | 如何通过社交媒体宣传来提高产品的销售量？                                                                                |
| 新闻报道                | 如何利用多个来源的信息来判断一个事件的真实性？                                                                                |
| 计算机网络            | 在构建企业级网络架构时，有哪些常见的安全漏洞需要避免？                                                                                |
| 电影评价                | 如何使用情感分析来评价电影的质量？                                                                                |
| 环境保护                | 如何在工业生产中减少废水和废气的排放？


win = am.window{}

ib1 = am.image_buffer(1)
v1 = ib1.buffer:view"ubyte"
tx1 = am.texture2d(ib1)
fb1 = am.framebuffer(tx1)

fb1:clear()
fb1:read_back()
assert(v1[1] == 0)
assert(v1[2] == 0)
assert(v1[3] == 0)
assert(v1[4] == 255)
fb1.clear_color = vec4(128, 64, 32, 16) / 255
fb1:clear()
fb1:read_back()
assert(v1[1] == 128)
assert(v1[2] == 64)
assert(v1[3] == 32)
assert(v1[4] == 16)

fb1.clear_color = vec4(0, 0, 0, 1)

fb1:clear()
fb1:render(am.rect(-2, -2, 2, 2, vec4(0, 1, 0, 1)))
fb1:read_back()
assert(v1[1] == 0)
assert(v1[2] == 255)
assert(v1[3] == 0)
assert(v1[4] == 255)

fb1:clear()
fb1:render(am.rect(-2, -2, 2, 2, vec4(255, 255, 0, 128) / 255))
fb1:read_back()
assert(v1[1] == 128)
assert(v1[2] == 128)
assert(v1[3] == 0)
assert(v1[4] == 64 + 255 - 128)

fb1:cle


using System.Text.Json.Nodes;
using VersOne.Epub.Test.Integration.CustomSerialization.Context;

namespace VersOne.Epub.Test.Integration.CustomSerialization.TypeSerializers
{
    internal class EpubLocalByteContentFileTypeSerializer : CustomTypeSerializer<EpubLocalByteContentFile>
    {
        public EpubLocalByteContentFileTypeSerializer()
        {
            AddCustomPropertySerializer(nameof(EpubLocalByteContentFile.Content), "$content", SerializeContent, DeserializeContent);
        }

        p


is  part  of  the  Cadence  LEF/DEF  Open   Source
// Distribution,  Product Version 5.8.
//
// 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.
//
// For updates, support, or to become part of the LEF/DEF Community,
// check www.openeda.org for details.
//
//  $Author: icftcm $
//  $Revision: #8 $
//  $Date: 2016/10/13 $
//  $State:  $
// *****************************************************************************
// *****************************************************************************

#include <string.h>
#include <stdlib.h>
#include "lex.h"
#include "defiIOTiming.hpp"
#include "defiDebug.hpp"

BEGIN_LEFDEF_PARSER_NAMESPACE

//////////////////////////////////////////////
//////////////////////////////////////////////
//
//   defiIOTiming
//
//////////////////////////////////////////////
//////////////////////////////////////////////

defiIOTiming::defiIOTiming(defrData *data)
 : defData(data)
{
  Init();
}

void defiIOTiming::Init() {
  inst_ = 0;
  instLength_ = 0;
  pin_ = 0;
  pinLength_ = 0;
  from_ = 0;
  fromLength_ = 0;
  to_ = 0;
  toLength_ = 0;
  driveCell_ = 0;
  driveCellLength_ = 0;
  hasVariableRise_ = 0;
  hasVariableFall_ = 0;
  hasSlewRise_ = 0;
  hasSlewFall_ = 0;
  hasCapacitance_ = 0;
  hasDriveCell_ = 0;
  hasFrom_ = 0;
  if (pin_) free(pin_);
  pin_ = 0;
  pinLength_ = 0;

  hasTo_ = 0;
  hasParallel_ = 0;
  variableFallMin_ = 0.0;
  variableRiseMin_ = 0.0;
  variableFallMax_ = 0.0;
  variableRiseMax_ = 0.0;
  slewFallMin_ = 0.0;
  slewRiseMin_ = 0.0;
  slewFallMax_ = 0.0;
  slewRiseMax_ = 0.0;
  capacitance_ = 0.0;
  parallel_ = 0.0;
}

defiIOTiming::~defiIOTiming() {
  Destroy();
}

void defiIOTiming::Destroy() {

  if (inst_) free(inst_);
  inst_ = 0;
  instLength_ = 0;

  if (pin_) free(pin_);
  pin_ = 0;
  pinLength_ = 0;

  if (from_) free(from_);
  from_ = 0;
  fromLength_ = 0;

  if (to_) free(to_);
  to_ = 0;
  toLength_ = 0;

  if (driveCell_) free(driveCell_);
  driveCell_ = 0;
  driveCellLength_ = 0;

  clear();
}

void defiIOTiming::clear() {
  hasVariableRise_ = 0;
  hasVariableFall_ = 0;
  hasSlewRise_ = 0;
  hasSlewFall_ = 0;
  hasCapacita


 java.security.acl.Group;

/**
 * This class is used to represent a subnet mask (a group of hosts matching the same
 * IP mask).
 *
 * @see java.security.acl.Group
 */

class NetMaskImpl extends PrincipalImpl implements Group, Serializable {
    private static final long serialVersionUID = -7332541893877932896L;

    protected byte[] subnet = null;
    protected int prefix = -1;
    /**
     * Constructs an empty group.
     * @exception UnknownHostException Not implemented
     */
    public NetMaskImpl () throws UnknownHostException {
    }

    private byte[] extractSubNet(byte[] b) {
        int addrLength = b.length;
        byte[] subnet = null;
        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(),
                "extractSubNet", "BINARY ARRAY :");
            StringBuffer buff = new StringBuffer();
            for(int i =0; i < addrLength; i++) {
                buff.append((b[i] &0xFF) +":");
            }
            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(),
                "extractSubNet", buff.toString());
        }

        // 8 is a byte size. Common to any InetAddress (V4 or V6).
        int fullyCoveredByte = prefix / 8;
        if(fullyCoveredByte == addrLength) {
            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
                   "The mask is the complete address, strange..." + addrLength);
            }
            subnet = b;
            return subnet;
        }
        if(fullyCoveredByte > addrLength) {
            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
                SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
                   "The number of covered byte is longer than the address. BUG");
            }
            throw new IllegalArgumentException("The number of covered byte is longer than the address.");
        }
        int partialyCoveredIndex = fullyCoveredByte;
        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
               "Partially covered index : " + partialyCoveredIndex);
        }
        byte toDeal = b[partialyCoveredIndex];
        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
               "Partially covered byte : " + toDeal);
        }

        // 8 is a byte size. Common to any InetAddress (V4 or V6).
        int nbbits = prefix % 8;
        int subnetSize = 0;

        if(nbbits == 0)
        subnetSize = partialyCoveredIndex;
        else
        subnetSize = partialyCoveredIndex + 1;

        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
               "Remains : " + nbbits);
        }

        byte mask = 0;
        for(int i = 0; i < nbbits; i++) {
            mask |= (1 << (7 - i));
        }
        if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
            SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet",
               "Mask value : " + (mask & 0


 }\mathop{{x}}\nolimits^{{ \mu }} \text{d} x=\frac{{\mathop{{x}}\nolimits^{{ \mu +1}}}}{{ \mu +1}}+C,{ \left( { \mu  \neq -1} \right) }}\\
&{{}_{ }^{ } \int _{ }^{ }\frac{{1}}{{x}} \text{d} x= \text{ln} { \left| {x} \right| }+C}\\
& {{}_{ }^{ } \int _{ }^{ }\frac{{1}}{{1+\mathop{{x}}\nolimits^{{2}}}} \text{d} x= \text{arctan} x+C}\\
&{{}_{ }^{ } \int _{ }^{ }\frac{{1}}{{\sqrt{{1-\mathop{{x}}\nolimits^{{2}}}}}} \text{d} x= \text{arcsin} x+C}

\end{aligned}
$$

## 2 三角函数

$$
\begin{aligned}
&{{}_{ }^{ } \int _{ }^{ } \text{cos}x  \text{d} x= \text{sin} x+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{sin} x \text{d} x=- \text{cos} x+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{tan} x \text{d} x=- \text{ln} { \left| { \text{cos} x} \right| }+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{cot} x \text{d} x= \text{ln} { \left| { \text{sin} x} \right| }+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{sec} x \text{d} x= \text{ln} { \left| { \text{sec} x+ \text{tan} x} \right| }+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{csc} x \text{d} x= \text{ln} { \left| { \text{csc} x- \text{cot} x} \right| }+C}\\

& {{}_{ }^{ } \int _{ }^{ }\frac{{1}}{{\mathop{{ \text{cos} }}\nolimits^{{2}}x}} \text{d} x={}_{ }^{ } \int _{ }^{ }\mathop{{ \text{sec} }}\nolimits^{{2}}x \text{d} x= \text{tan} x+C}\\

& {{}_{ }^{ } \int _{ }^{ }\frac{{1}}{{\mathop{{ \text{sin} }}\nolimits^{{2}}x}} \text{d} x={}_{ }^{ } \int _{ }^{ }\mathop{{ \text{csc} }}\nolimits^{{2}}x \text{d} x=- \text{cot} x+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{sec} x \text{tan} x \text{d} x= \text{sec} x+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{csc} x \text{cot} x \text{d} x=- \text{csc} x+C}\\

\end{aligned}

$$

## 3 指数函数

$$

\begin{aligned}

& {{}_{ }^{ } \int _{ }^{ }\mathop{{e}}\nolimits^{{x}} \text{d} x=\mathop{{e}}\nolimits^{{x}}+C}\\

& {{}_{ }^{ } \int _{ }^{ }\mathop{{a}}\nolimits^{{x}} \text{d} x=\frac{{\mathop{{a}}\nolimits^{{x}}}}{{ \text{ln} a}}+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{sh} x \text{d} x= \text{ch} x+C}\\

& {{}_{ }^{ } \int _{ }^{ } \text{ch} xdx= \text{sh


n:        FILL_WINDOW
tl1_f1n:        FILL_WINDOW
tl1_f2n:        FILL_WINDOW
tl1_f3n:        FILL_WINDOW
tl1_f4n:        FILL_WINDOW
tl1_f5n:        FILL_WINDOW
tl1_f6n:        FILL_WINDOW
tl1_f7n:        FILL_WINDOW
tl1_f0o:        FILL_WINDOW
tl1_f1o:        FILL_WINDOW
tl1_f2o:        FILL_WINDOW
tl1_f3o:        FILL_WINDOW
tl1_f4o:        FILL_WINDOW
tl1_f5o:        FILL_WINDOW
tl1_f6o:        FILL_WINDOW
tl1_f7o:        FILL_WINDOW
tl1_resv100:	BTRAPS(0x100) BTRAPS(0x108)
tl1_resv110:	BTRAPS(0x110) BTRAPS(0x118)
tl1_resv120:	BTRAPS(0x120) BTRAPS(0x128)
tl1_resv130:	BTRAPS(0x130) BTRAPS(0x138)
tl1_resv140:	BTRAPS(0x140) BTRAPS(0x148)
tl1_resv150:	BTRAPS(0x150) BTRAPS(0x158)
tl1_resv160:	BTRAPS(0x160) BTRAPS(0x168)
tl1_resv170:	BTRAPS(0x170) BTRAPS(0x178)
tl1_resv180:	BTRAPS(0x180) BTRAPS(0x188)
tl1_resv190:	BTRAPS(0x190) BTRAPS(0x198)
tl1_resv1a0:	BTRAPS(0x1a0) BTRAPS(0x1a8)
tl1_resv1b0:	BTRAPS(0x1b0) BTRAPS(0x1b8)
tl1_resv1c0:	BTRAPS(0x1c0) BTRAPS(0x1c8)
tl1_resv1d0:	BTRAPS(0x1d0) BTRAPS(0x1d8)
tl1_resv1e0:	BTRAPS(0x1e0) BTRAPS(0x1e8)
tl1_resv1f0:	BTRAPS(0x1f0) BTRAPS(0x1f8)

	.section ".data"
	.align 8
	.globl tlb_handler_stack_top, tlb_handler_stack_pointer

	! Stack for the tlb MMU trap handlers
tlb_handler_stack_bottom:
	.skip 8192
tlb_handler_stack_top:
	.skip 8

	! MMU trap handler stack pointer
tlb_handler_stack_pointer:
	.xword tlb_handler_stack_top

        .section ".text", "ax"

spill_32bit:
        srl     %sp, 0, %sp
        stw     %l0, [%sp + 0x00]
        stw     %l1, [%sp + 0x04]
        stw     %l2, [%sp + 0x08]
        stw     %l3, [%sp + 0x0c]
        stw     %l4, [%sp + 0x10]
        stw     %l5, [%sp + 0x14]
        stw     %l6, [%sp + 0x18]
        stw     %l7, [%sp + 0x1c]
        stw     %i0, [%sp + 0x20]
        stw     %i1, [%sp + 0x24]
        stw     %i2, [%sp + 0x28]
        stw     %i3, [%sp + 0x2c]
        stw     %i4, [%sp + 0x30]
        stw


1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "dfMaxAngleStepSizeDegrees",(char *) "options", NULL
  };
  OGRGeometryShadow *result = 0 ;

  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Geometry_GetLinearGeometry",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetLinearGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_double(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetLinearGeometry" "', argument " "2"" of type '" "double""'");
    }
    arg2 = static_cast< double >(val2);
  }
  if (obj2) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj2)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }

      int size = PySequence_Size(obj2);
      for (int i = 0; i < size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj2,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg3 = CSLAddString( arg3, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetLinearGeometry(arg1,arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_Runtime


GRESSION_MSG_MASTER_INITIALIZE);
	if (MemoryStatsManager::IsOpened())
		MemoryStatsManager::AddLog("Task " + GetTaskName() + " .MasterInitialize Begin");

	// Crash test
	if (shared_nCrashTestMethod == MASTER_INITIALIZE)
	{
		switch (shared_nCrashTestType)
		{
		case TestType::USER_INTERRUPTION:
			TaskProgression::ForceInterruptionRequested();
			break;
		case TestType::IO_FAILURE_OPEN:
			SystemFile::SetAlwaysErrorOnOpen(true);
			break;
		case TestType::IO_FAILURE_WRITE:
			SystemFile::SetAlwaysErrorOnFlush(true);
			break;
		case TestType::IO_FAILURE_READ:
			SystemFile::SetAlwaysErrorOnRead(true);
			break;
		}
	}

	// Appel de la methode utilisateur
	bOk = MasterInitialize();

	// On renvoie false systematiquement si il y a interruption utilisateur
	bOk = bOk and not TaskProgression::IsInterruptionRequested();

	// Reinitialisation du crash test
	SystemFile::SetAlwaysErrorOnOpen(false);
	SystemFile::SetAlwaysErrorOnFlush(false);
	SystemFile::SetAlwaysErrorOnRead(false);

	// Fin de l'autorisation d'ecriture des shared parameters
	SetSharedVariablesRO(&oaSharedParameters);
	if (MemoryStatsManager::IsOpened())
		MemoryStatsManager::AddLog("Task " + GetTaskName() + " .MasterInitialize End");
	TaskProgression::EndTask();
	if (GetDriver()->GetTracerProtocol()->GetActiveMode())
		GetDriver()->GetTracerProtocol()->AddTrace("Out MasterInitialize", bOk);
	method = Method::NONE;
	tMasterInitialize.Stop();

	if (bVerbose and not bOk and not TaskProgression::IsInterruptionRequested())
		AddError("An error occurred in task initialisation");

	return bOk;
}

boolean PLParallelTask::CallMasterFinalize(boolean bProcessOk)
{
	boolean bOk;

	// Crash test
	if (shared_nCrashTestMethod == MASTER_FINALIZE)
	{
		switch (shared_nCrashTestType)
		{
		case TestType::USER_INTERRUPTION:
			TaskProgression::ForceInterruptionRequested();
			break;
		case TestType::IO_FAILURE_OPEN:
			SystemFile::SetAlwaysErrorOnOpen(true);
			break;
		case TestType::IO_FAILURE_WRITE:
			SystemFile::SetAlwaysErrorOnFlush(true);
			break;
		case TestType::IO_FAILURE_READ:
			SystemFile::SetAlwaysErrorOnRead(true);
			break;
		}
	}

	if (GetDriver()->GetTracerProtocol()->GetActiveMode())
		GetDriver()->GetTracerProtocol()->AddTrace("In MasterFinalize", bProcessOk);
	tMasterFinalize.Start();
	require(method == Method::NONE);
	method = MASTER_FINALIZE;
	TaskProgression::BeginTask();
	TaskProgression::DisplayMainLabel(GetTaskLabel());
	TaskProgression::DisplayLabel(PROGRESSION_MSG_MASTER_FINALIZE);
	if (MemoryStatsManager::IsOpened())
		MemoryStatsManager::AddLog("Task " + GetTaskName() + " .MasterFinalize Begin");
	SetSharedVariablesRW(&oaSharedParameters);
	bOk = MasterFinalize(bProcessOk);

	// On renvoie false systematiquement si il y a interruption utilisateur
	bOk = bOk and not TaskProgression::IsInterruptionRequested();

	// Reinitialisation du crash test
	SystemFile::SetAlwaysErrorOnOpen(false);
	SystemFile::SetAlwaysErrorOnFlush(false);
	SystemFile::SetAlwaysErrorOnRead(false);

	SetSharedVariablesRO(&oaSharedParameters);
	if (MemoryStatsManager::IsOpened())
		MemoryStatsManager::AddLog("Task " + GetTaskName() + " .MasterFinalize End");
	TaskProgression::End


e  val methodInverseEOTF = "${prefix}INVERSE_EOTF"

    override val code: String
        get() = """
        #define $m1  0.1593017578125
        #define $m2  78.84375
        #define $c1  0.8359375
        #define $c2  18.8515625
        #define $c3  18.6875

         // EOTF的逆函数
        float $methodInverseEOTF(float x)
        {
              float Ym = pow(x, $m1);
              return pow(($c1 + $c2 * Ym) / (1.0 + $c3 * Ym), $m2);
        }

        float $methodGamma(float x){
             return $methodInverseEOTF(x);
        }

        vec3 $methodGamma(vec3 color){
         return vec3(
            $methodGamma(color.x),
            $methodGamma(color.y),
            $methodGamma(color.z));
        }

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

package com.github.guepardoapps.kulid

import kotlin.experimental.and
import kotlin.random.Random

class ULID {
    companion object {
        /**
         * The default entropy size
         */
        private const val DEFAULT_ENTROPY_SIZE = 10

        /**
         * Maximum allowed timestamp value.
         */
        const val TIMESTAMP_MAX = 0x0000ffffffffffffL

        /**
         * Minimum allowed timestamp value.
         */
        const val TIMESTAMP_MIN = 0x0L

        /**
         * ULID string length.
         */
        private const val ULID_LENGTH = 26

        /**
         * Base32 characters mapping
         */
        private val charMapping = charArrayOf(
                0x30.toChar(), 0x31.toChar(), 0x32.toChar(), 0x33.toChar(), 0x34.toChar(), 0x35.toChar(),
                0x36.toChar(), 0x37.toChar(), 0x38.toChar(), 0x39.toChar(), 0x41.toChar(), 0x42.toChar(),
                0x43.toChar(), 0x44.toChar(), 0x45.toChar(), 0x46.toChar(), 0x47.toChar(), 0x48.toChar(),
                0x4a.toChar(), 0x4b.toChar(), 0x4d.toChar(),


import torch.nn.functional as F
from torch import nn
from torch.utils.data import DataLoader
import tqdm

def test_img(net_g, datatest, args):
    net_g.eval()
    test_loss = 0
    sample_num = 0
    correct = 0  # number of correct predictions
    data_loader = DataLoader(datatest, batch_size=args.bs, shuffle=False)

    with tqdm.tqdm(total=len(data_loader)) as pbar:
        for idx, (data, target) in enumerate(data_loader):
            data, target = data.to(args.device), target.to(args.device)
            log_probs = net_g(data)

            # update test loss,sample number
            criterion = nn.CrossEntropyLoss()
            loss = criterion(log_probs, target)
            test_loss += loss.item()
            # test_loss += F.cross_entropy(log_probs, target, reduction='sum').item()
            sample_num += target.size(0)

            # get the index of the max log-probability
            _, y_pred = log_probs.max(1)
            # count number of correct predictions
            correct += y_pred.eq(target.view_as(y_pred)).long().cpu().sum()

            pbar.set_postfix_str('Tested:{}, Batch Loss: {:.4f}'.format(
                sample_num, loss.item()))
            pbar.update()

    test_loss /= sample_num     # average loss per sample
    accuracy = correct / sample_num

    return accuracy, test_loss


len);
        tofree.push(ptr);
        Module.stringToUTF8(strArr[i], ptr, len);
        Module.setValue(ptrArr + i * 4, ptr, "i32");
    }
    Module.onExecuteFinished = function() {
        for(var i = 0; i < tofree.length; i++) {
            Module._free(tofree[i]);
        }
        Module.onExecuteFinished = null;
        if(cb) {
            setTimeout(function() {
                cb();
            }, 0);
        }
    }
    Module._execute(strArr.length, ptrArr);
}
var searchData=
[
  ['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83',1,'turbojpeg.h']]],
  ['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
  ['tjbufsizeyuv2',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194',1,'turbojpeg.h']]],
  ['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
  ['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b',1,'turbojpeg.h']]],
  ['tjcompressfromyuvplanes',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
  ['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]],
  ['tjdecodeyuvplanes',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
  ['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
  ['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
  ['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]],
  ['tjdecompresstoyuvplanes',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
  ['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga