尽可能多的元素排列，记录行数n。然后，如果最后一行元素较少，尝试将前面的行减少一些元素，使得最后一行的元素数量接近前面的行。
//
// 这可能需要两次遍历：第一次确定行数和每行元素数，第二次调整每行元素数以均匀分布。
//
// 这似乎比较复杂，但可能可行。
//
// 例如，第一次遍历：
//
// - 使用原有逻辑，确定每行元素数，得到行数n。
//
// - 如果最后一行元素数比前面的行少很多，例如n=2行，第一行8个，第二行1个，则进入调整阶段。
//
// 在调整阶段：
//
// - 计算平均每行元素数：9 / 2 = 4.5，向上取整为5，向下取整为4。
//
// - 检查是否可以将某些元素从第一行移动到第二行，使得两行分别为5和4。
//
// - 需要确保移动后的每行总宽度不超过容器宽度。
//
// 这可能涉及到重新计算每行的总宽度，并调整元素数量。
//
// 但如何确保调整后的每行总宽度不超过容器宽度？例如，假设第一行原来有8个元素，现在减少到5个，总宽度可能更小，因此肯定不超过容器宽度。而第二行从1个增加到4个，总宽度需要不超过容器宽度。
//
// 如果原始逻辑中第一行放8个元素是因为它们的总宽度刚好不超过容器宽度，那么减少到5个元素，总宽度当然也不超过，所以可以安全调整。
//
// 因此，可能的调整步骤：
//
// 1. 使用原有逻辑确定行数和每行元素数，得到行列表rows。
//
// 2. 计算所有行的元素数的方差，如果方差较大（如最后一行元素数远少于其他行），则进行优化。
//
// 3. 尝试重新分配元素，使得每行元素数更接近平均值。
//
// 4. 确保重新分配后的每行总宽度不超过容器宽度。
//
// 这可能需要多次调整，但可能有效。
//
// 回到代码，用户现有的代码在ArrangeOverride中是按顺序处理，当元素无法放入当前行时换行。要实现均匀分布，可能需要改变这种逻辑，预先计算每行的元素数。
//
// 因此，可能需要在MeasureOverride阶段收集所有子元素的宽度，并计算每行的元素数，然后在ArrangeOverride中按照这些元素数进行排列。
//
// 例如，在MeasureOverride中：
//
// List<double> childWidths = new List<double>();
//
// foreach (var child in Children) {
//
// child.Measure(constraint);
//
// childWidths.Add(child.DesiredSize.Width);
//
// }
//
// 然后，根据childWidths和constraint.Width，计算每行的元素数，使得行数最少，且每行元素数尽可能接近。
//
// 这可能需要一个算法来确定每行的元素数。例如：
//
// List<int> rows = new List<int>();
//
// int current = 0;
//
// int totalChildren = Children.Count;
//
// double availableWidth = constraint.Width;
//
// while (current < totalChildren) {
//
//


com.amap.api.maps.AMap.MultiPositionInfoWindowAdapter::getOverturnInfoWindowClick', {"var1": var1, "__this__": this});

    // handle native call

    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = android_view_View()..refId = __result__;
      return __return__;
    }
  }

}

extension com_amap_api_maps_AMap_MultiPositionInfoWindowAdapter_Batch on List<com_amap_api_maps_AMap_MultiPositionInfoWindowAdapter> {
  //region methods

  Future<List<android_view_View>> getInfoWindowClick_batch(List<com_amap_api_maps_model_Marker> var1) async {
    if (false) {
      return Future.error('all args must have same length!');
    }

    // invoke native method
    final resultBatch = await MethodChannel('me.yohom/amap_map_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_map_fluttify'))).invokeMethod('com.amap.api.maps.AMap.MultiPositionInfoWindowAdapter::getInfoWindowClick_batch', [for (int __i__ = 0; __i__ < length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);

    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => android_view_View()..refId = __result__).toList();
      return typedResult;
    }
  }

  Future<List<android_view_View>> getOverturnInfoWindow_batch(List<com_amap_api_maps_model_Marker> var1) async {
    if (false) {
      return Future.error('all args must have same length!');
    }

    // invoke native method
    final resultBatch = await MethodChannel('me.yohom/amap_map_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_map_fluttify'))).invokeMethod('com.amap.api.maps.AMap.MultiPositionInfoWindowAdapter::getOverturnInfoWindow_batch', [for (int __i__ = 0; __i__ < length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);

    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => android_view_View()..refId = __result__).toList();
      return typedResult;
    }
  }

  Future<List<android_view_View>> getOverturnInfoWindowClick_batch(List<com_amap_api_maps_model_Marker> var1) async {
    if (false) {
      return Future.error('all args must have same length!');
    }

    // invoke native method
    final resultBatch = await MethodChannel('me.yohom/amap_map_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_map_fluttify'))).invokeMethod('com.amap.api.maps.AMap.MultiPositionInfoWindowAdapter::getOverturnInfoWindowClick_batch', [for (int __i__ = 0; __i__ < length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);

    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String


 e.g. `hsla(200, 20%, 50%, 0.5)`
     * * Color name
     *   * Options are listed in SkParseColor.cpp
     *   * Similar to CSS Color Module Level 3 keywords, but case-sensitive.
     *     * e.g. `blueviolet` or `red`
     *
     * > [!NOTE] Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or
     * `RGB`.
     */
    fun setBackgroundColor(color: String)

    /**
     * > [!NOTE] The area cutout of the view's border still captures clicks.
     */
    fun setBorderRadius(radius: Double)

    fun setBounds(bounds: Rectangle)

    fun setVisible(visible: Boolean)

    /**
     * A `View[]` property representing the child views of this view.
     *
     */
    val children: js.array.ReadonlyArray<View>

    @web.events.JsEvent("bounds-changed")
    open val boundsChangedEvent: node.events.EventInstance<js.array.Tuple>
}
// Generated by Karakum - do not modify it manually!

package electron.core

@Suppress("INTERFACE_WITH_SUPERCLASS")
external interface IpcMain : node.events.EventEmitter {
// Docs: https://electronjs.org/docs/api/ipc-main
    /**
     * Alias for `ipcMain.on`.
     */
    fun addListener(
        channel: String,
        listener: Function<Unit>, // (event: IpcMainEvent, ...args: any[]) => void
    ) // this

    /**
     * Adds a handler for an `invoke`able IPC. This handler will be called whenever a
     * renderer calls `ipcRenderer.invoke(channel, ...args)`.
     *
     * If `listener` returns a Promise, the eventual result of the promise will be
     * returned as a reply to the remote caller. Otherwise, the return value of the
     * listener will be used as the value of the reply.
     *
     * The `event` that is passed as the first argument to the handler is the same as
     * that passed to a regular event listener. It includes information about which
     * WebContents is the source of the invoke request.
     *
     * Errors thrown through `handle` in the main process are not transparent as they
     * are serialized and only the `message` property from the original error is
     * provided to the renderer process. Please refer to #24427 for details.
     */
    fun handle(
        channel: String,
        listener: Function<Any? /* (Promise<any>) | (any) */>, // (event: IpcMainInvokeEvent, ...args: any[]) => (Promise<any>) | (any)
    )

    /**
     * Handles a single `invoke`able IPC message, then removes the listener. See
     * `ipcMain.handle(channel, listener)`.
     */
    fun handleOnce(
        channel: String,
        listener: Function<Any? /* (Promise<any>) | (any) */>, // (event: IpcMainInvokeEvent, ...args: any[]) => (Promise<any>) | (any)
    )

    /**
     * Removes the specified `listener` from the listener array for the specified
     * `channel`.
     */
    fun off(channel: String, listener: Function<Unit> /* (event: IpcMainEvent, ...args: any[]) => void */) // this

    /**
     * Listens to `channel`, when a new message arrives `listener` would be called with
     * `listener(event, args...)`.
     */
    fun on(channel: String, listener: Function<Unit> /* (event: IpcMainEvent, ...args: any[]) => void */) // this

    /**
     * Adds a one time `listener` function for the event. This `listener` is invoked
     * only the next time a message is sent to `channel`, after which it is removed.
     */
    fun once(channel: String, listener: Function<Unit> /* (event: IpcMainEvent, ...args: any[]) => void */) // this

    /**
     * Removes all listeners from the specified `channel`. Removes all listeners from
     * all channels if no channel is specified.


]=$175; //@line 4340 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      var $178=$oldp; //@line 4341 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      $newp=$178; //@line 4341 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      __label__ = 20; break; //@line 4342 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
    case 20:
      __label__ = 21; break;
    case 21:
      __label__ = 22; break;
    case 22:
      __label__ = 24; break; //@line 4343 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
    case 23:
      _abort(); //@line 4345 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      throw "Reached an unreachable!" //@line 4345 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
    case 24:
      var $184=$newp; //@line 4357 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      var $185=(($184)|0)!=0; //@line 4357 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      if ($185) { __label__ = 25; break; } else { __label__ = 28; break; } //@line 4357 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
    case 25:
      var $187=$extra; //@line 4358 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      var $188=(($187)|0)!=0; //@line 4358 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      if ($188) { __label__ = 26; break; } else { __label__ = 27; break; } //@line 4358 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
    case 26:
      var $190=$extra; //@line 4359 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      _free($190); //@line 4359 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      __label__ = 27; break; //@line 4360 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
    case 27:
      var $192=$newp; //@line 4361 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      var $193=$192; //@line 4361 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      var $194=(($193+8)|0); //@line 4361 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      $1=$194; //@line 4361 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      __label__ = 34; break; //@line 4361 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
    case 28:
      var $196=$4; //@line 4364 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"
      var $197=_malloc($196); //@line 4364 "/home/alan.kligman/project/emscripten/system/lib/dlmalloc.c"


   case TypeId::kMmx32:
        case TypeId::kMmx64: {
          // MM registers are returned through XMM (SystemV) or GPQ (Win64).
          RegType regType = RegType::kX86_Mm;
          uint32_t regIndex = valueIndex;
          if (Environment::is64Bit(arch)) {
            regType = cc.strategy() == CallConvStrategy::kDefault ? RegType::kX86_Xmm : RegType::kX86_Gpq;
            regIndex = cc.strategy() == CallConvStrategy::kDefault ? valueIndex : gpReturnIndexes[valueIndex];

            if (regIndex == BaseReg::kIdBad)
              return DebugUtils::errored(kErrorInvalidState);
          }

          func._rets[valueIndex].initReg(regType, regIndex, typeId);
          break;
        }

        default: {
          func._rets[valueIndex].initReg(vecTypeIdToRegType(typeId), valueIndex, typeId);
          break;
        }
      }
    }
  }

  switch (cc.strategy()) {
    case CallConvStrategy::kDefault:
    default: {
      uint32_t gpzPos = 0;
      uint32_t vecPos = 0;

      for (uint32_t argIndex = 0; argIndex < argCount; argIndex++) {
        unpackValues(func, func._args[argIndex]);

        for (uint32_t valueIndex = 0; valueIndex < Globals::kMaxValuePack; valueIndex++) {
          FuncValue& arg = func._args[argIndex][valueIndex];

          // Terminate if there are no more arguments in the pack.
          if (!arg)
            break;

          TypeId typeId = arg.typeId();

          if (TypeUtils::isInt(typeId)) {
            uint32_t regId = BaseReg::kIdBad;

            if (gpzPos < CallConv::kMaxRegArgsPerGroup)
              regId = cc._passedOrder[RegGroup::kGp].id[gpzPos];

            if (regId != BaseReg::kIdBad) {
              RegType regType = typeId <= TypeId::kUInt32 ? RegType::kX86_Gpd : RegType::kX86_Gpq;
              arg.assignRegData(regType, regId);
              func.addUsedRegs(RegGroup::kGp, Support::bitMask(regId));
              gpzPos++;
            }
            else {
              uint32_t size = Support::max<uint32_t>(TypeUtils::sizeOf(typeId), registerSize);
              arg.assignStackOffset(int32_t(stackOffset));
              stackOffset += size;
            }
            continue;
          }

          if (TypeUtils::isFloat(typeId) || TypeUtils::isVec(typeId)) {
            uint32_t regId = BaseReg::kIdBad;

            if (vecPos < CallConv::kMaxRegArgsPerGroup)
              regId = cc._passedOrder[RegGroup::kVec].id[vecPos];

            if (TypeUtils::isFloat(typeId)) {
              // If this is a float, but `kFlagPassFloatsByVec` is false, we have to use stack instead. This should
              // be only used by 32-bit calling conventions.
              if (!cc.hasFlag(CallConvFlags::kPassFloatsByVec))
                regId = BaseReg::kIdBad;
            }
            else {
              // Pass vector registers via stack if this is a variable arguments function. This should be only used
              // by 32-bit calling conventions.
              if (signature.hasVarArgs() && cc.hasFlag(CallConvFlags::kPassVecByStackIfVA))
                regId = BaseReg::kIdBad;
            }

            if (regId != BaseReg::kIdBad) {
              arg.initTypeId(typeId


 impotência, veja o caso de Adolf Hitler. Todos dizem que foi um dos homens mais poderosos; mas poderoso durante quanto tempo? Ele disse que criaria um império, um reich, de mil anos. Durou doze e acabou na destruição total, total. Ele mesmo, nos instantes finais, disse que o povo alemão não soube merecê-lo, então o povo mereceria a derrota, ser totalmente destruído. E de fato foi.

Agora comparem isso com a autoridade de Moisés. É claro que nem todos os judeus seguem aquilo. Uns **\[0:20\]** seguem mais, outros menos. Mas isso faz parte da natureza do judaísmo. O judaísmo tem tantos mandamentos que não dá para todo mundo cumprir tudo. Então é uma espécie de divisão de trabalho, tipo: "eu não como carne de porco, você não come camarão; depois a gente troca." Isto funciona, o judaísmo funciona. A lei foi dada não individualmente, \[mas\] para a comunidade, que arca com aquela responsabilidade. No conjunto, na média, você pode dizer que os judeus continuam obedecendo a Moisés, mesmo os que não são totalmente crentes. Vejam que mesmo no caso do judeu ateu, as referências de temporalidade que ele tem são o calendário judaico, as festividades judaicas e os símbolos judaicos. Mesmo ateu, ele não sai disso.

No meu livro *O Jardim das Aflições* eu até propus um estudo (que jamais foi feito, e que eu também não vou fazer porque não tenho tempo) dizendo que assim como existe uma ciência da religião comparada, tem de existir uma ciência do ateísmo comparado, porque as várias modalidades de ateísmo são diferentes conforme a religião da qual se origina o ateu, ou seja, aquilo a que o ateu se opõe não é a mesma coisa \[para todos os ateus\]. Se ele é de origem católica, ou ortodoxa, ou protestante, ou judaica, ou hinduísta, o ateísmo dele vai ser diferente, e esse é um elemento que cria enormes confusões no mundo contemporâneo. Vejam, por exemplo, uma coisa característica: o ateísmo de origem protestante é eminentemente evolucionista e naturalista; mas o ateísmo de origem judaica não liga tanto para isso, é um ateísmo revolucionário, é o ateísmo de Karl Marx, de Trotski e outros. Isto quer dizer que o ateu de origem protestante está se opondo eminentemente a certa versão da estrutura do cosmos físico, ao passo que o ateu de origem judaica está reclamando precisamente contra a vontade divina: Deus tem um plano e ele tem outro. Ou seja, a maneira de as pessoas se oporem a Deus é completamente diferente.

Eu insisto que esse estudo do "ateísmo comparado" é extremamente importante, e que requer, evidentemente, uma pessoa preparada no campo da religião comparada (o que já é um tremendo abacaxi) e ao mesmo tempo preparada na história dos movimentos revolucionários ateísticos. Se algum de vocês tiver o interesse em fazer esse estudo em longo prazo (vai levar uns 10 anos), é a sugestão de um tema absolutamente maravilhoso. Isso dará a vocês uma idéia do que é o poder profético. O poder profético é aquele que dura enormemente para além do prazo de vida do próprio portador dessa autoridade. Moisés está morto há quanto tempo? E os caras continuam obedecendo. Isto também é da natureza do poder profético, do poder espiritual, do poder intelectual


    const grandParent = GrandParentModel.create({ child: parent });

    const result = getParentWithTypeName(child, "GrandParentModel");
    expect(result).toEqual(grandParent);
  });

  it("works with intermediate array", () => {
    const ChildModel = types.model("ChildModel", {});
    const ParentModel = types.model("ParentModel", {
      children: types.optional(types.array(ChildModel), [])
    });

    const child = ChildModel.create();
    const parent = ParentModel.create();
    // The parent is being modified outside of an action so it needs to be unprotected
    unprotect(parent);
    parent.children.push(child);

    const result = getParentWithTypeName(child, "ParentModel");
    expect(result).toEqual(parent);
  });

  it("returns undefined with a parentless child", () => {
    const ChildModel = types.model("ChildModel", {});

    const child = ChildModel.create();

    const result = getParentWithTypeName(child, "ParentModel");
    expect(result).toBeUndefined();
  });

  it("returns undefined with an unmatched parent", () => {
    const ChildModel = types.model("ChildModel", {});
    const ParentModel = types.model("ParentModel", {
      child: ChildModel
    });

    const child = ChildModel.create();
    ParentModel.create({ child });

    const result = getParentWithTypeName(child, "OtherModel");
    expect(result).toBeUndefined();
  });

});
export class OwnPet {
    BreedId: string;
    BreedName: string;
    BreedOrigin: string;
    BreedGroup: string;

    constructor(breedId: string, breedName: string,breedOrigin:string,breedGroup:string) {
        this.BreedId = breedId;
        this.BreedName = breedName;
        this.BreedOrigin=breedOrigin;
        this.BreedGroup=breedGroup
    }
}

export class Query {
  bbox:  [number, number, number, number]
  start: string
  end:   string
  type:  "raw" | "ndwi" | "ndvi"
}

export function defaultQuery(): Query {
  return {
    bbox:  [-5, 53, 2, 57],
    start: "2016-04-01",
    end:   "2016-04-03",
    type:  "raw"
  }
}
import { Error } from 'mongoose';

import { Response, Request } from 'express';
import { User, UserDocument} from '../models/User';

/**
 * Adds a new food to the current user's inventory
 * @route POST /api/inventory
 */
export const postFood = (req: Request, res: Response) => {
    // req.body.accessToken should hold the accessToken to specify the user
    if (req.body === undefined || req.body === null || req.body.accessToken === undefined) {
        res.status(400).json({ message: 'No accessToken provided', user: {} });
        return;
    }

    const accessToken = req.body.accessToken;

    if (req.body.data === undefined) {
        res.status(400).json({ message: 'No food data provided', user: {} });
        return;
    }

    // Query the users in the db based on the auth0AccessToken
    User.findOne({ auth0AccessToken: accessToken }, (err:Error, user:UserDocument) => {
        // If there was an error report code 400 to the client
        if (err) {
            res.status(400).json({ message: err.message, user });
            return;
        }
        if (user === null) {
            res.status(200).json({ message: 'Could not find user in db', user });
            return;
        }
        // In the future we should implement some sort of check if the exact item is already in the user inventory
        //  and just increment the count of that item, but this would be O(N) for every addition unless some sort of
        //  clever hashing was utilized.
        try {
            const newItem = JSON.parse(req.body.data);
            user.inventory.push(newItem);
            user.recip


'''
EJERCICIO 02
Escribir un programa para gestionar un listín telefónico con los nombres y los teléfonos de los
clientes de una empresa. El programa incorporar funciones crear el fichero con el listín si no
existe, para consultar el teléfono de un cliente, añadir el teléfono de un nuevo cliente y eliminar
el teléfono de un cliente. El listín debe estar guardado en el fichero de texto listin.txt donde el
nombre del cliente y su teléfono deben aparecer separados por comas y cada cliente en una
línea distinta.'''

def add_data(nombre:str, telefono:str):
    with open("results/listin.txt", "a") as f:
        f.write(f"{nombre},{telefono}\n")

def delete_data(nombre:str):
    with open("results/listin.txt", "r") as f:
        lines = f.readlines()
    with open("results/listin.txt", "w") as f:
        for line in lines:
            if nombre not in line:
                f.write(line)

def read_data(nombre:str):
    with open("results/listin.txt", "r") as f:
        lines = f.readlines()
        for line in lines:
            if nombre in line:
                print(line)

add_data("Juan", "123456789")
add_data("Pepe", "987654321")
add_data("Ana", "456789123")
delete_data("Pepe")
read_data("Juan")


�
├── requirements.txt            # 종속성 설치 파일
├── main.py                     # 크롤링 서버 파일
└── README.md                   # 프로젝트 설명 파일

```

# 실행
1. 리포지토리 복제
```bash
git clone https://github.com/Songysp/PlanUP_frontend

```

2. 패키지 설치
  * node.js, react-native-cli, android stuid 필요
```bash
npm install
```
  * 백엔드 종속성 설치
```bash
# 백엔드 루트 폴더에서 아래 코드 실행
pip install -r requirements.txt
```

3. 앱 실행

  * 백엔드 서버 실행
```bash
npm start
```
  * FastAPI 크롤링 서버 실행
```bash
python main.py
```
  * 프론트 엔드
```bash
npx react-native run-android
```

# 플레이 스토어

### [스토어 링크](https://play.google.com/store/apps/details?id=com.PlanUP&pli=1)
![플레이스토어](https://github.com/user-attachments/assets/77b51f29-cd09-49e8-a971-87710aa3204f)

### 기술 스택

* **프론트엔드**
  * JavaScript
  * React-Native
  * AndroidStudio
* **백엔드**
  * Node.js
  * Python
  * FastAPI
* **데이터베이스**
  * MongoDB
* **배포**
  * Docker
  * CloudType
* **협업툴**
  * Figma
  * GitHub

# 협업 방식
1. **Figma 활용**
    * 기획안을 스토리보드로 작성
    * 화면 구성을 참고하여 개발

2. **GIT**
    * GIT-FLOW 전략을 차용
    <img src="https://techblog.woowahan.com/wp-c


CallInterface.saveFileName);
					String filename = file.getName();
					String dirName = file.getParent();

					logger.debug("saveFile to server:");
					logger.debug("   dirName: " + dirName);
					logger.debug("   filename: " + filename);

					// is this a whitelisted directory?
					if (!appConfig.isWhitelistDirectory(dirName)) {
						Utils.throwRuntimeException("Directory " + dirName
								+ " is not specified as a whitelist target directory in application.properties.");
					}

					if (!file.getParentFile().exists()) {
						Utils.throwRuntimeException("Directory " + dirName + " does not exist.");
					}

					// export report to file
					logger.info("   export report to file: " + urlCallInterface.saveFileName);
					logger.debug("   repFormat: " + urlCallInterface.repFormat);
					try {

						// and export again with the original exporter ...
						logger.debug("   export " + urlCallInterface.repFormat + " to file: "
								+ urlCallInterface.saveFileName);

						// special handling for html exports
						// 30.09.2018 D. Aust
						// conversion exception
						// special handling for csv =>
						// https://gitq.com/daust/JasperReportsIntegration/topics/35/unable-to-generate-csv-file-pdf-and-xlsx-work-fine/3
						if (urlCallInterface.repFormat.equals("html") || urlCallInterface.repFormat.equals("html2")) {
							JasperExportManager.exportReportToHtmlFile(jasperPrint, urlCallInterface.saveFileName);
						} else if (urlCallInterface.repFormat.equals("csv")
								|| urlCallInterface.repFormat.equals("rtf")) {
							exporter.setExporterOutput(new SimpleWriterExporterOutput(file));
							exporter.exportReport();
						} else {
							SimpleOutputStreamExporterOutput exporterOutput = new SimpleOutputStreamExporterOutput(
									file);
							exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
							exporter.setExporterOutput(exporterOutput);
							exporter.exportReport();
						}
					} catch (JRException e) {
						Utils.throwRuntimeException(e.getMessage());
					}
				} else {
					Utils.throwRuntimeException("saveFile is not enabled in application.properties.");
				}
			}

			logger.info("*** servlet /report END");
			logger.traceExit();

			// Catch all exceptions during report processing
		} catch (Exception e) {

			// for more advanced error handling (encompassing all servlets, see:
			// https://www.journaldev.com/1973/servlet-exception-and-error-handling-example-tutorial

			// output not yet closed, can still write to it
			if (out != null) {
				// output html file
				// set content type
				response.setContentType(contentType + "; charset=" + urlCallInterface.repEncoding);
				response.setLocale(new Locale(urlCallInterface.repLocale));
				// found this to be mandatory with IE 6.0
				response.setHeader("content-type", "text/html" + "; charset=" + urlCallInterface.repEncoding);
				response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
				// response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

				String errorHTMLFilename = "/private/tmp/jri/conf/error.html"; // will be parameterized later ...
				String errorHTMLFileContent = "";

				if (new File(errorHTMLFilename).exists()) {
					errorHTMLFileContent = FileIO.fileToString(errorHTMLFilename);
				} else {
					// errorHTMLFileContent=this.getResourceAsStream("error.html");
					try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream("de/oc/integration/jasper/webapp/error.html")) {
						errorHTMLFileContent = FileIO.inputStreamToString(inputStream);
					} catch (IOException e2) {
						e2.printStackTrace();
					}
				}

				// printDebugToScreen? or suppress


255, 0.2)", GradientType=0), progid:DXImageTransform.Microsoft.Alpha(Opacity=20)'}.e-treegrid .e-selectionbackground{background:#00f}.e-treegridPane .e-treegrid .e-selectionbackground{background:-moz-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(0,0,255,.2)),color-stop(100%,rgba(0,0,255,.2)));background:-webkit-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:-o-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:-ms-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:linear-gradient(to bottom,rgba(0,0,255,.2),rgba(0,0,255,.2));color:#0f0;filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr="rgba(0, 0, 255, 0.2)", endColorstr="rgba(0, 0, 255, 0.2)", GradientType=0), progid:DXImageTransform.Microsoft.Alpha(Opacity=20)'}.e-treegrid .e-selectingcell{color:#fff}.e-treegrid .e-selectingcell{background:#00f}.e-treegridPane .e-treegrid .e-selectingcell{background:-moz-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(0,0,255,.2)),color-stop(100%,rgba(0,0,255,.2)));background:-webkit-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:-o-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:-ms-linear-gradient(top,rgba(0,0,255,.2),rgba(0,0,255,.2));background:linear-gradient(to bottom,rgba(0,0,255,.2),rgba(0,0,255,.2));color:#0f0}.e-treegrid .e-detailsinfoiconhide:before,.e-treegrid .e-detailsinfoiconshow:before{color:#00f !important}.e-treegrid .e-selectionbackground .e-detailsinfoiconshow:before{color:#fff !important}.e-treegrid .e-detailscellwrapper,.e-detailscellwrapperfly{background:#000;color:#0f0 !important}.e-dragtooltipbackground{background-color:#000;color:#0f0}.e-treegrid .e-tabletd{border-color:#808080}.e-treegrid .e-treegridtoolbar{background-color:#000 !important;border-color:#808080 !important}.e-treegrid .e-headercell{border-right-color:#808080 !important;border-bottom-color:#808080 !important}.e-treegrid .e-filterbarcell{border-color:#808080 !important}.e-treegrid .e-grid-icon{background:#000}.e-treegrid .e-gridheader{color:#fff;border-color:#808080}.e-treegrid .e-gridheader{background:#000}.e-treegrid .e-headercontent{border-right-color:#808080}.e-treegrid .e-ejinputtext,.e-addedColumn .e-ejinputtext,.e-treegridrenamedialog .e-ejinputtext{border-color:#808080;outline:none;vertical-align:baseline}.e-treegrid .e-ejinputtext,.e-addedColumn .e-ejinputtext,.e-treegridrenamedialog .e-ejinputtext{color:#0f0;background-color:#000}.e-addedColumn .e-ejinputtext:hover,.e-treegrid .e-ejinput


	'Babies',
	'Baby Showers',
	'Backstreet Boys',
	'Bad Dogs',
	'Bagpipes',
	'Baked Beans',
	'Baked Potatoes',
	'Baking Cookies',
	'Bald Eagles',
	'Ballerinas',
	'Bangkok',
	'Bankruptcy',
	'Barbara Walters',
	'Barbed Wire',
	'Barfing',
	'Barney',
	'Bart Simpson',
	'Bates Motel',
	'Batman',
	'Bats',
	'Beach Parties',
	'Beanie Babies',
	'Beauty And The Beast',
	'Beer',
	'Beer Bellies',
	'Beethoven',
	'Beets',
	'Being In Love',
	'Bell-Bottoms',
	'Ben Stiller',
	'Berlin',
	'Big Bang Theory',
	'Big Macs',
	'Bigfoot',
	'Bill Clinton',
	'Bill Gates',
	'Bill Murray',
	'Billboards',
	'Bingo',
	'Bird Watching',
	'Black Holes',
	'Black Velvet',
	'Blizzard',
	'Blood',
	'Board Games',
	'Body Odor',
	'Body Piercing',
	'Body Surfing',
	'Bonbons',
	'Bongos',
	'Bottled Water',
	'Boxing',
	'Boy Scouts',
	'Boyfriends',
	'Brad Pitt',
	'Brain Surgeons',
	'Brains',
	'Britney Spears',
	'Broadway',
	'Bruce Willis',
	'Bubble Gum',
	'Bubbles',
	'Bullwinkle',
	'Bumper Stickers',
	'Bungee Jumping',
	'Buying A House',
	'Cabbage',
	'Cactus',
	'California',
	'Camping Trip',
	'Canada',
	'Canadians',
	'Captain Kirk',
	'Car Bombs',
	'Car Horns',
	'Carl Sagan',
	'Carnival Workers',
	'Cary Grant',
	'Casablanca',
	'Casinos',
	'Castles',
	'Caves',
	'Celine Dion',
	'Cell Phones',
	'Cesar Chavez',
	'Chain Letters',
	'Chains',
	'Challenger Explosion',
	'Chameleons',
	'Charging Rhinos',
	'Cheesecake',
	'Cher',
	'Chicago',
	'Chicken Pox',
	'Chickens',
	'Chimpanzees',
	'China',
	'Chinatown',
	'Choir Boys',
	'Chorus Girls',
	'Cigarette Burns',
	'Cigarettes',
	'Cinco de Mayo',
	'Cindy Crawford',
	'Clark Gable',
	'Claude Monet',
	'Cleaning The Bathroom',
	'Cleopatra',
	'Clint Eastwood',
	'Clowns',
	'Cocaine',
	'Cockroaches',
	'Coconuts',
	'Cold Pizza',
	'Communists',
	'Commuting',
	'Computer Hackers',
	'Computers',
	'Confucius',
	'Conspiracy Theories',
	'Construction Workers',
	'Corn On The Cob',
	'Corvettes',
	'Count Dracula',
	'Country Music',
	'Cow-Pies',
	'Crazy Horse',
	'Creamed Corn',
	'Crystal Balls',
	'Cuba',
	'Cults',
	"Custer's Last Stand",
	'Dandruff',
	'Danielle Steel',
	'Danny DeVito',
	'Dark Alleys',
	'Darth Vader',
	'Dating',
	'David Letterman',
	'Daytime TV',
	'Death Valley',
	'Deer Hunting',
	'Demi Moore',
	'Democrats',
	'Denzel Washingto


using System.Collections.Immutable;

namespace Grauenwolf.TravellerTools.Shared;

public class Milieu
{
    public static ImmutableArray<Milieu> MilieuList = ImmutableArray.Create(
        new Milieu("-2422 – The Interstellar Wars", "IW", -2422),
        new Milieu("0 – Early Imperium", "M0", 0),
        new Milieu("990 – Solomani Rim War", "M990", 990),
        new Milieu("1105 – The Golden Age", "M1105", 1105),
        new Milieu("1120 – The Rebellion", "M1120", 1120),
        new Milieu("1201 – The New Era", "M1201", 1201),
        new Milieu("1248 – The New, New Era", "M1248", 1248),
        new Milieu("1900 – The Far Far Future", "M1900", 1900));


，并采用反射方法处理边缘效应。

### MSE
```{r}
h = seq(0.01, 1, length.out = 100)
fhat = sapply(h, function(x) {res = mykde(y, h = x,
                              reflect = TRUE, y.range = c(-3,3)); res$fhat})
fhat.mse = apply(fhat, 2, function(x) (x-1/6)^2)
fhat.mse.min = apply(fhat.mse, 1, function(x) which.min(x))
```

以$y_{123}, y_{523}$为例，做出$E(\hat f(x)-f(x))^2$关于$h$的图象
```{r}
par(mfrow = c(1,2))
plot(h, fhat.mse[123, ], ylab = "MSE", xlab = "h")
plot(h, fhat.mse[523, ], ylab = "MSE", xlab = "h")
```

从图象可以看出MSE的变化趋势，当然对于不同的点其变化趋势不同，对于每个点我们选择使得MSE最小的那个$h$,这样选出来的$h$如下（只显示了前20个x对应的$h$）
```{r}
h[fhat.mse.min[1:20]]
```

### MISE
```{r}
fhat.mise = colSums(fhat.mse)/ncol(fhat.mse)
plot(h, fhat.mise, ylab = "MISE", xlab = "h")
```

从图象看起来，MISE是随着$h$的增大而降低的（在给定的$h$的范围内），这与上课老师讲的最优$h$在$O(h^{-1/5})$处取得似乎存在矛盾。但注意到当$f(x)=1/6$时
$$
Bias=\frac {h^2}2f''(x)\int_{-A}^Az^2K(z)dz+o(h^2) = o(h^2)
$$
则MSE主要依赖方差项，
$$
Var(\hat f(x))\approx\frac 1{nh} \int_{-A}^AK^2(z)dz \cdot f(x)
$$
对于方差项，$h$越大，则方差越小，从而MSE（MISE）随着h的增大而降低，如果从这个角度看，图象中表现出的MISE随着$h$的增大而降低是合理的。

## 渐近分布
取$h=0.1$，采用高斯核函数进行核密度估计，考虑
$$
\sqrt{nh}(\hat f(x)-f(x))
$$
的渐进分布
```{r}
n = 10000
set.seed(12345)
y = runif(n, -3, 3)
hh = 0.1
res = mykde(y, kernel = "gaussian", h = hh, reflect = TRUE, y.range = c(-3,3))
fhat = res$fhat
plot(density(sqrt(n*hh)*(fhat-mean(fhat))), main = "limiting distribution")
# normal
x = seq(-5, 5, length.out = 1000)
sigmahat = 1.2
p = 1/sqrt(2*pi*sigmahat^2)*exp(-x^2/(sigmahat*2))
lines(x, p, co


talk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,n,a,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,a,e.C_NUMBER_MODE,n]}]}}),_o)),Cs.registerLanguage("sml",(uo||(uo=1,po=function(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),po)),Cs.registerLanguage("sqf",(Eo||(Eo=1,go=function(e){const t={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},a={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:"define undef ifdef ifndef else endif include if",contains:[{begin:/\\\n/,relevance:0},e.inherit(t,{className:"string"}),{begin:/<[^\n>]*>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{name:"SQF",case_insensitive:!0,keywords:{keyword:["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],built_in:["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagaz


2AesCrypt(word32 *key, int keyLen, word32 *iv, int ivLen,
        byte* out, const byte* in, word32 sz,
        int dir, int algo, int cryptoalgo)
    {
        return Pic32Crypto(in, sz, (word32*)out, sz, dir, algo, cryptoalgo,
            key, keyLen, iv, ivLen);
    }
#endif /* !NO_AES */

#ifndef NO_DES3
    int wc_Pic32DesCrypt(word32 *key, int keyLen, word32 *iv, int ivLen,
        byte* out, const byte* in, word32 sz,
        int dir, int algo, int cryptoalgo)
    {
        return Pic32Crypto(in, sz, (word32*)out, sz, dir, algo, cryptoalgo,
            key, keyLen, iv, ivLen);
    }
#endif /* !NO_DES3 */
#endif /* WOLFSSL_PIC32MZ_CRYPT */

#endif /* WOLFSSL_MICROCHIP_PIC32MZ */


 "change"
                        || info.Action == "move")
                    {
                        control.OldRecord = info.NewRecord;
#if NO
                        control.SetData(info.NewRecord,
                            info.NewRecPath,
                            info.NewTimestamp,
                            out strError);
#endif
                        nRet = SetEditData(control,
                            info.NewRecord,
                            info.NewRecPath,
                            info.NewTimestamp,
                            out strError);
                        if (nRet == -1)
                        {
                            // MessageBox.Show(ForegroundWindow.Instance, strError);
                            strWarning += " " + strError;
                        }

                        // bookitem.ItemDisplayState = ItemDisplayState.Normal;

                    }

#if NO
                    // 对于保存后变得不再属于本种的，要在listview中消除
                    if (String.IsNullOrEmpty(control.RecPath) == false)
                    {
                        string strTempItemDbName = Global.GetDbName(control.RecPath);
                        string strTempBiblioDbName = "";

                        strTempBiblioDbName = Program.MainForm.GetBiblioDbNameFromItemDbName("item", strTempItemDbName);
                        if (string.IsNullOrEmpty(strTempBiblioDbName) == true)
                        {
                            strWarning += " " + this.ItemType + "类型的数据库名 '" + strTempItemDbName + "' 没有找到对应的书目库名";
                            //// MessageBox.Show(ForegroundWindow.Instance, this.ItemType + "类型的数据库名 '" + strTempItemDbName + "' 没有找到对应的书目库名");
                            return true;
                        }
                        string strTempBiblioRecPath = strTempBiblioDbName + "/" + bookitem.Parent;

                        if (strTempBiblioRecPath != this.BiblioRecPath)
                        {
                            this.Items.PhysicalDeleteItem(bookitem);
                            continue;
                        }
                    }
#endif

                    // control.ErrorInfo = "";
                    if (SetEditErrorInfo(control, "") == true)
                        bHeightChanged = true;

                    control.Changed = false;
                    control.CreateState = ItemDisplayState.Normal;

                    continue;
                }

                // 报错处理
                // control.ErrorInfo = info.ErrorInfo;
                if (SetEditErrorInfo(control, info.ErrorInfo) == true)
                    bHeightChanged = true;
                strWarning += strLocationSummary + "在提交保存过程中发生错误 -- " + info.ErrorInfo + "\r\n";
            }

#if NO
            // 最后把没有报错的，那些成功删除事项，都从内存和视觉上抹除
            for (int i = 0; i < this.Items.Count; i++)
            {
                BookItemBase bookitem = this.Items[i];
                if (bookitem.ItemDisplayState == ItemDisplayState.Deleted)
                {
                    if (bookitem.ErrorInfo == "")
                    {
                        this.Items.PhysicalDeleteItem(bookitem);
                        i--;    // 2007/4/12
                    }
                }
            }
#endif
            if (bHeightChanged == true)
                AdjustFlowLayoutHeight();

            //
            if (String.IsNullOrEmpty(strWarning) == false)
            {
                strWarning += "\r\n请注意修改后重新提交保存";
                //// MessageBox.Show(ForegroundWindow.Instance, strWarning);
                return true;
            }

            return false;
        }

        // return:
        //      错误信息字符串是否确实被


f (keepFocus == flag && keepFocus == hasFocus) {
      return;
    }

    _state._keepFocus = flag;

    if (keepFocus) {
      gridFocusNode.requestFocus();
    }

    if (keepFocus) {
      // RequestFocus is fired and notifies listeners with hasFocus true.
      // requestFocus delays up to one frame.
      notifyListenersOnPostFrame(notify, setKeepFocus.hashCode);
    } else {
      notifyListeners(notify, setKeepFocus.hashCode);
    }
  }

  @override
  void nextFocusOfColumnFilter(
    PlutoColumn column, {
    bool reversed = false,
  }) {
    if (!column.enableFilterMenuItem) {
      return;
    }

    final columnIndexes = reversed
        ? columnIndexesByShowFrozen.reversed.toList(growable: false)
        : columnIndexesByShowFrozen.toList(growable: false);

    final length = columnIndexes.length;

    bool found = false;

    for (int i = 0; i < length - 1; i += 1) {
      var current = refColumns[columnIndexes[i]];

      if (!found && current.key == column.key) {
        found = true;
      }

      if (!found) {
        continue;
      }

      var toMoveIndex = columnIndexes[i + 1];

      var toMove = refColumns[toMoveIndex];

      if (toMove.enableFilterMenuItem) {
        toMove.filterFocusNode?.requestFocus();

        moveScrollByColumn(
          reversed ? PlutoMoveDirection.left : PlutoMoveDirection.right,
          reversed ? length - 1 - i : i,
        );

        return;
      }
    }
  }
}
import 'package:flutter/material.dart';
import 'package:pluto_grid/pluto_grid.dart';

abstract class IScrollState {
  /// Controller to control the scrolling of the grid.
  PlutoGridScrollController get scroll;

  bool get isHorizontalOverScrolled;

  double get correctHorizontalOffset;

  Offset get directionalScrollEdgeOffset;

  Offset toDirectionalOffset(Offset offset);

  /// [direction] Scroll direction
  /// [offset] Scroll position
  void scrollByDirection(PlutoMoveDirection direction, double offset);

  /// Whether the cell can be scrolled when moving.
  bool canHorizontalCellScrollByDirection(
    PlutoMoveDirection direction,
    PlutoColumn columnToMove,
  );

  /// Scroll to [rowIdx] position.
  void moveScrollByRow(PlutoMoveDirection direction, int? rowIdx);

  /// Scroll to [columnIdx] position.
  void moveScrollByColumn(PlutoMoveDirection direction, int? columnIdx);

  bool needMovingScroll(Offset offset, PlutoMoveDirection move);

  void updateCorrectScrollOffset();

  void updateScrollViewport();

  void resetScrollToZero();
}

mixin ScrollState implements IPlutoGridState {
  @override
  bool get isHorizontalOverScrolled =>
      scroll.bodyRowsHorizontal!.offset > scroll.maxScrollHorizontal ||
      scroll.bodyRowsHorizontal!.offset < 0;

  @override
  double get correctHorizontalOffset {
    if (isHorizontalOverScrolled) {
      return scroll.horizontalOffset < 0 ? 0 : scroll.maxScrollHorizontal;
    }

    return scroll.horizontalOffset;
  }

  @override
  Offset get directionalScrollEdgeOffset =>
      isLTR ? Offset.zero : Offset(gridGlobalOffset!.dx, 0);

  @override
  Offset toDirectionalOffset(Offset offset) {
    if (isLTR) {
      return offset;
    }

    return Offset(
      (maxWidth! + gridGlobalOffset!.dx) - offset.dx,
      offset.dy,
    );
  }

  @override
  void scrollByDirection(PlutoMoveDirection direction, double offset) {
    if (direction.vertical) {
      scroll.vertical!.jumpTo(offset);
    } else {
      scroll.horizontal!.jumpTo(offset);
    }
  }

  @override
  bool canHorizontalCellScrollByDirection(
    PlutoMoveDirection direction,
    PlutoColumn columnToMove,
  ) {
    // 고정 컬


                                if (isMaxZ)
                                    mesh.polys[tgt + k] = pmesh.polys[src + k];
                                break;
                            case 2: // Portal x+
                                if (isMaxX)
                                    mesh.polys[tgt + k] = pmesh.polys[src + k];
                                break;
                            case 3: // Portal z-
                                if (isMinZ)
                                    mesh.polys[tgt + k] = pmesh.polys[src + k];
                                break;
                            }
                        }
                    }
                }
            }
        }

        // Calculate adjacency.
        buildMeshAdjacency(mesh.polys, mesh.npolys, mesh.nverts, mesh.nvp);
        if (mesh.nverts > MAX_MESH_VERTS_POLY) {
            throw new RuntimeException("rcBuildPolyMesh: The resulting mesh has too many vertices " + mesh.nverts
                    + " (max " + MAX_MESH_VERTS_POLY + "). Data can be corrupted.");
        }
        if (mesh.npolys > MAX_MESH_VERTS_POLY) {
            throw new RuntimeException("rcBuildPolyMesh: The resulting mesh has too many polygons " + mesh.npolys
                    + " (max " + MAX_MESH_VERTS_POLY + "). Data can be corrupted.");
        }

        ctx.stopTimer("MERGE_POLYMESH");

        return mesh;
    }

    public static PolyMesh copyPolyMesh(Telemetry ctx, PolyMesh src) {
        PolyMesh dst = new PolyMesh();

        dst.nverts = src.nverts;
        dst.npolys = src.npolys;
        dst.maxpolys = src.npolys;
        dst.nvp = src.nvp;
        RecastVectors.copy(dst.bmin, src.bmin, 0);
        RecastVectors.copy(dst.bmax, src.bmax, 0);
        dst.cs = src.cs;
        dst.ch = src.ch;
        dst.borderSize = src.borderSize;
        dst.maxEdgeError = src.maxEdgeError;

        dst.verts = new int[src.nverts * 3];
        System.arraycopy(src.verts, 0, dst.verts, 0, dst.verts.length);
        dst.polys = new int[src.npolys * 2 * src.nvp];
        System.arraycopy(src.polys, 0, dst.polys, 0, dst.polys.length);
        dst.regs = new int[src.npolys];
        System.arraycopy(src.regs, 0, dst.regs, 0, dst.regs.length);
        dst.areas = new int[src.npolys];
        System.arraycopy(src.areas, 0, dst.areas, 0, dst.areas.length);
        dst.flags = new int[src.npolys];
        System.arraycopy(src.flags, 0, dst.flags, 0, dst.flags.length);
        return dst;
    }
}
/*
recast4j copyright (c) 2021 Piotr Piastucki piotr@jtilia.org

This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
 claim that you wrote the original software. If you use this software
 in a product, an acknowledgment in the product documentation would be
 appreciated


emu-gann emu-gprose:last-child,
emu-gann emu-nt:last-child {
  margin-right: 0;
}

emu-geq {
  margin-left: 0.5ex;
  font-weight: bold;
}

emu-oneof {
  font-weight: bold;
  margin-left: 0.5ex;
}

emu-nt {
  display: inline;
  font-style: italic;
  white-space: nowrap;
  text-indent: 0;
}

emu-nt a,
emu-nt a:visited {
  color: var(--nt-link-foreground-color);
}

emu-rhs emu-nt {
  margin-right: 0.5ex;
}

emu-t {
  display: inline-block;
  font-family:
    'IBM Plex Mono',
    monospace;
  font-weight: bold;
  white-space: nowrap;
  text-indent: 0;
}

emu-production emu-t {
  margin-right: 0.5ex;
}

emu-rhs {
  display: block;
  padding-left: 75px;
  text-indent: -25px;
}

emu-production:not([collapsed]) emu-rhs {
  border: 0.2ex dashed transparent;
}

emu-production:not([collapsed]) emu-rhs:hover {
  border-color: var(--production-rhs-border-color);
  background-color: var(--production-rhs-background-color);
}

emu-mods {
  font-size: 0.85em;
  vertical-align: sub;
  font-style: normal;
  font-weight: normal;
}

emu-params,
emu-opt {
  margin-right: 1ex;
  font-family:
    'IBM Plex Mono',
    monospace;
}

emu-params,
emu-constraints {
  color: var(--params-foreground-color);
}

emu-opt {
  color: var(--opt-foreground-color);
}

emu-gprose {
  font-size: 0.9em;
  font-family:
    'IBM Plex Sans',
    sans-serif;
}

emu-production emu-gprose {
  margin-right: 1ex;
}

h1.shortname {
  color: var(--title-foreground-color);
  font-size: 1.5em;
  margin: 0;
}

h1.version {
  color: var(--title-foreground-color);
  font-size: 1.5em;
}

h1.title {
  color: var(--title-foreground-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  position: relative;
}

h1 .secnum {
  text-decoration: none;
  margin-right: 5px;
}

h1 span.title {
  order: 2;
}

h1 {
  font-size: 2.67em;
  margin-bottom: 0;
  line-height: 1em;
}
h2 {
  font-size: 2em;
}
h3 {
  font-size: 1.56em;
}
h4 {
  font-size: 1.25em;
}
h5 {
  font-size: 1.11em;
}
h6 {
  font-size: 1em;
}

pre code.hljs {
  background: transparent;
}

emu-clause[id],
emu-annex[id],
emu-intro[id] {
  scroll-margin-top: 2ex;
}

emu-intro h1,
em


tActionParticipantMute for reference.
type ChannelAdminLogEventActionParticipantMute struct {
	// The participant that was muted
	Participant GroupCallParticipant
}

// ChannelAdminLogEventActionParticipantMuteTypeID is TL type id of ChannelAdminLogEventActionParticipantMute.
const ChannelAdminLogEventActionParticipantMuteTypeID = 0xf92424d2

// construct implements constructor of ChannelAdminLogEventActionClass.
func (c ChannelAdminLogEventActionParticipantMute) construct() ChannelAdminLogEventActionClass {
	return &c
}

// Ensuring interfaces in compile-time for ChannelAdminLogEventActionParticipantMute.
var (
	_ bin.Encoder     = &ChannelAdminLogEventActionParticipantMute{}
	_ bin.Decoder     = &ChannelAdminLogEventActionParticipantMute{}
	_ bin.BareEncoder = &ChannelAdminLogEventActionParticipantMute{}
	_ bin.BareDecoder = &ChannelAdminLogEventActionParticipantMute{}

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantMute{}
)

func (c *ChannelAdminLogEventActionParticipantMute) Zero() bool {
	if c == nil {
		return true
	}
	if !(c.Participant.Zero()) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func (c *ChannelAdminLogEventActionParticipantMute) String() string {
	if c == nil {
		return "ChannelAdminLogEventActionParticipantMute(nil)"
	}
	type Alias ChannelAdminLogEventActionParticipantMute
	return fmt.Sprintf("ChannelAdminLogEventActionParticipantMute%+v", Alias(*c))
}

// FillFrom fills ChannelAdminLogEventActionParticipantMute from given interface.
func (c *ChannelAdminLogEventActionParticipantMute) FillFrom(from interface {
	GetParticipant() (value GroupCallParticipant)
}) {
	c.Participant = from.GetParticipant()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*ChannelAdminLogEventActionParticipantMute) TypeID() uint32 {
	return ChannelAdminLogEventActionParticipantMuteTypeID
}

// TypeName returns name of type in TL schema.
func (*ChannelAdminLogEventActionParticipantMute) TypeName() string {
	return "channelAdminLogEventActionParticipantMute"
}

// TypeInfo returns info about TL type.
func (c *ChannelAdminLogEventActionParticipantMute) TypeInfo() tdp.Type {
	typ := tdp.Type{
		Name: "channelAdminLogEventActionParticipantMute",
		ID:   ChannelAdminLogEventActionParticipantMuteTypeID,
	}
	if c == nil {
		typ.Null = true
		return typ
	}
	typ.Fields = []tdp.Field{
		{
			Name:       "Participant",
			SchemaName: "participant",
		},
	}
	return typ
}

// Encode implements bin.Encoder.
func (c *ChannelAdminLogEventActionParticipantMute) Encode(b *bin.Buffer) error {
	if c == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantMute#f92424d2 as nil")
	}
	b.PutID(ChannelAdminLogEventActionParticipantMuteTypeID)
	return c.EncodeBare(b)
}

// EncodeBare implements bin.BareEncoder.
func (c *ChannelAdminLogEventActionParticipantMute) EncodeBare(b *bin.Buffer) error {
	if c == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantMute#f92424d2 as nil")
	}
	if err := c.Participant.Encode(b); err != nil {
		return fmt.Errorf("unable to encode channelAdminLog


ublic GoodsattachmentinfoCollection(Goodsattachmentinfo[] value)
        {
            this.AddRange(value);
        }

        public int Add(Goodsattachmentinfo value)
        {
            return base.List.Add(value);
        }

        public void AddRange(Goodsattachmentinfo[] value)
        {
            for (int i = 0; i < value.Length; i++)
            {
                this.Add(value[i]);
            }
        }

        public void AddRange(GoodsattachmentinfoCollection value)
        {
            for (int i = 0; i < value.Count; i++)
            {
                this.Add((Goodsattachmentinfo)value.List[i]);
            }
        }

        public bool Contains(Goodsattachmentinfo value)
        {
            return base.List.Contains(value);
        }

        public void CopyTo(Goodsattachmentinfo[] array, int index)
        {
            base.List.CopyTo(array, index);
        }

        public int IndexOf(Goodsattachmentinfo value)
        {
            return base.List.IndexOf(value);
        }

        public void Insert(int index, Goodsattachmentinfo value)
        {
            base.List.Insert(index, value);
        }

        public void Remove(Goodsattachmentinfo value)
        {
            base.List.Remove(value);
        }

        public new GoodsattachmentinfoCollection.GoodsattachmentinfoCollectionEnumerator GetEnumerator()
        {
            return new GoodsattachmentinfoCollection.GoodsattachmentinfoCollectionEnumerator(this);
        }
    }
}


#!/usr/bin/env python3

import sys

import numpy as np
import rospy
import utm
from geometry_msgs.msg import PoseStamped
from sensor_msgs.msg import NavSatFix
from nav_msgs.msg import Odometry

class GlobalPositionNode:
    """Implements global position as an offset from home position."""

    def __init__(self):
        self.node_name = 'global_position_node'
        rospy.init_node(self.node_name, argv=sys.argv)

        origin_latitude = rospy.get_param('~origin_latitude')
        origin_longitude = rospy.get_param('~origin_longitude')
        origin_altitude = rospy.get_param('~origin_altitude')
        origin_altitude_offset = rospy.get_param('~origin_altitude_offset')

        east, north, _, _ = utm.from_latlon(origin_latitude, origin_longitude)
        up = origin_altitude + origin_altitude_offset

        self.origin = np.array([east, north, up])
        self.orientation = None
        self.east = None
        self.north = None
        self.up = None

        self.position_pub = rospy.Publisher('global_position/pose', PoseStamped,
                                            queue_size=1)

        self.global_position_sub = rospy.Subscriber('mavros/global_position/global',
                                                    NavSatFix,
                                                    callback=self.global_position_callback,
                                                    queue_size=1)
        self.orientation_sub = rospy.Subscriber('mavros/global_position/local', Odometry,
                                                callback=self.orientation_callback,
                                                queue_size=1)

    def global_position_callback(self, nav_msg):
        rospy.loginfo_once('Got global position message')
        self.east, self.north, _, _ = utm.from_latlon(nav_msg.latitude, nav_msg.longitude)
        self.up = nav_msg.altitude

    def orientation_callback(self, odom_msg):
        rospy.loginfo_once('Got orientation')
        self.orientation = odom_msg.pose.pose.orientation

    def publish_position(self):

        if self.east is None or self.north is None or self.up is None or self.orientation is None:
            rospy.logwarn_throttle(3, 'Waiting for `mavros/global_position/{global,local}`.')
            return

        # Compute global position as offset from origin
        position = np.array([self.east, self.north, self.up])
        global_position = position - self.origin

        # Construct global pose from MAVROS messages
        pose = PoseStamped()
        pose.header.frame_id = 'world'
        pose.header.stamp = rospy.Time.now()
        pose.pose.position.x = global_position[0]
        pose.pose.position.y = global_position[1]
        pose.pose.position.z = global_position[2]
        pose.pose.orientation = self.orientation
        self.position_pub.publish(pose)

def main():
    global_position_node = GlobalPositionNode()
    rate = rospy.Rate(10.)
    try:
        while not rospy.is_shutdown():
            global_position_node.publish_position()
            rate.sleep()
    except rospy.ROSInterruptException:
        pass

if __name__ == '__main__':
    main()


using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using net.rs64.ParserUtility;
using Unity.Collections;
using static net.rs64.PSDParser.ChannelImageDataParser;
using static net.rs64.PSDParser.LayerRecordParser;

namespace net.rs64.PSDParser
{
    public static class LayerInformationParser
    {
        [Serializable]
        public class LayerInfo
        {
            public BinaryAddress LayersInfoSection;
            public int LayerCount;
            public int LayerCountAbsValue;

            public List<LayerRecord> LayerRecords;
            public List<ChannelImageData> ChannelImageData;

        }
        public static LayerInfo PaseLayerInfo(bool isPSB, BinarySectionStream stream)
        {
            var layerInfo = new LayerInfo();
            var layersInfoSectionLength = isPSB is false ? stream.ReadUInt32() : stream.ReadUInt64();
            layerInfo.LayersInfoSection = stream.PeekToAddress((long)layersInfoSectionLength);

            if (layerInfo.LayersInfoSection.Length == 0) { return layerInfo; }

            ParseLayerRecordAndChannelImage(isPSB, layerInfo, stream.Read


em');
  const encryptedPath = path.join(identityDir, 'identity.pem.encrypted');

  if (fs.existsSync(encryptedPath)) {
    throw new Error(
      `Identity '${identityName}' is encrypted. This tool does not support encrypted identities directly.\n\nPlease export the key to a temporary unencrypted file:\n\ndfx identity export ${identityName} > temp-key.pem\n\nThen use a different method for providing the identity.`,
    );
  }

  if (!fs.existsSync(pemPath)) {
    throw new Error(`Could not find identity.pem in ${identityDir}`);
  }

  const pemContent = fs.readFileSync(pemPath, 'utf-8');
  return identityFromPemContent(pemContent);
}

/**
 * Gets the name of the currently active DFX identity.
 * This is a simple utility wrapper around the dfx CLI.
 * @returns The name of the current identity.
 */
export function getCurrentIdentityName() {
  return execSync('dfx identity whoami').toString().trim();
}
/* Implement tabbed code blocks for mdBook. */
/* Credit to Rob Moss who provided this code
 * to another mdbook project.  The original
 * commit is available here https://github.com/robmoss/git-is-my-lab-book/pull/13
 */

(function () {
  "use strict";

  // The CSS selector used to identify groups of tabbed code blocks.
  const blocks_selector = "div.tabbed-blocks";

  // The CSS class used to identify the active tab.
  const class_active = "active";

  // NOTE: the order in which we define the names is important, because we
  // iterate over the names in the *insertion order*.
  const tab_names = new Map();
  tab_names.set("language-python", "Python");
  tab_names.set("language-py", "Python");
  tab_names.set("language-R", "R");
  tab_names.set("language-cpp", "C++");
  tab_names.set("language-sh", "Shell");
  tab_names.set("language-shell", "Shell");
  tab_names.set("language-shell-python", "Python");
  tab_names.set("language-shell-rust", "Rust");
  tab_names.set("language-md", "Markdown");
  tab_names.set("language-text", "Text");
  tab_names.set("language-diff", "Diff");
  tab_names.set("language-rust", "Rust");
  tab_names.set("language-js", "JavaScript");
  tab_names.set("language-json", "Json");
  tab_names.set("language-yaml", "Yaml");

  // The tab name to use when none of the above names apply.
  const default_tab_name = "Unknown";

  function addTabsToGroup(group) {
    // Create the container for the tab buttons.
    const tab_bar = document.createElement("ul");
    tab_bar.className = "tab-bar";
    group.prepend(tab_bar);

    // Add a tab for each code block, and hide all but the first block.
    const pre_elements = group.querySelectorAll("pre");
    pre_elements.forEach((pre_elt, ix) => {
      const tab_elt = addTabForCodeBlock(tab_bar, pre_elements, pre_elt);
      if (ix > 0) {
        pre_elt.style.display = "none";
      } else {
        tab_elt.classList.add(class_active);
      }
    });
  }

  function addTabForCodeBlock(tab_bar, pre_elts, pre_elt) {
    // Find the code element, from which we can identify the language.
    const code_elt = pre_elt.querySelector("code");
    // Identify the code block language.
    const tab_text = document.createTextNode(getTabTextForCode(code_elt));

    // Create the button for this tab.
    const tab_elt = document.createElement("li");
    tab_elt.ap


) {
        // 获取所有设置项
        List<SettingItem> settingsList = dbManager.getAllSettings();

        // 创建滚动视图作为根布局
        ScrollView scrollView = new ScrollView(context);
        scrollView.setLayoutParams(new ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT
        ));
        // 创建主线性布局
        LinearLayout mainLayout = new LinearLayout(context);
        mainLayout.setLayoutParams(new ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT
        ));
        mainLayout.setOrientation(LinearLayout.VERTICAL);
        scrollView.addView(mainLayout);

        // 获取布局填充器
        LayoutInflater inflater = LayoutInflater.from(context);

        // 为每个设置项创建视图并添加到主布局
        for (SettingItem setting : settingsList) {
            View settingItemView = inflater.inflate(
                    AppContainer.getInstance().getModuleRes().getLayout(R.layout.module_item_setting),
                    mainLayout,
                    false
            );

            // 初始化视图组件
            TextView functionName = settingItemView.findViewById(R.id.setting_function_name);
            TextView description = settingItemView.findViewById(R.id.setting_description);
            @SuppressLint("UseSwitchCompatOrMaterialCode")
            Switch switchButton = settingItemView.findViewById(R.id.setting_switch);
            EditText extraData = settingItemView.findViewById(R.id.setting_extra_data);
            // 设置初始值
            functionName.setText(setting.getFunctionName());
            description.setText(setting.getDescription());
            switchButton.setChecked(setting.isSwitchOn());
            if (setting.getFunctionId() == WS_SERVER) {
                if (BluedHook.wsServerManager != null) {
                    switchButton.setChecked(BluedHook.wsServerManager.isServerRunning());
                }
            }
            if (setting.getExtraDataHint().isEmpty()) {
                extraData.setVisibility(View.GONE);
            } else {
                extraData.setText(setting.getExtraData());
                extraData.setHint(setting.getExtraDataHint());
                // 根据开关状态设置额外数据的可见性
                extraData.setVisibility(setting.isSwitchOn() ? View.VISIBLE : View.GONE);
            }
            // 设置开关监听器
            switchButton.setOnCheckedChangeListener((buttonView, isChecked) -> {
                dbManager.updateSettingSwitchState(setting.getFunctionId(), isChecked);
                setting.setSwitchOn(isChecked);
                if (!setting.getExtraDataHint().isEmpty())
                    extraData.setVisibility(isChecked ? View.VISIBLE : View.GONE);
                switchListener.onSwitchChanged(setting.getFunctionId(), isChecked);
                if (setting.getFunctionId() == WS_SERVER) {
                    if (BluedHook.wsServerManager != null) {
                        if (isChecked) {
                            BluedHook.wsServerManager.startServer(Integer.parseInt(setting.getExtraData()));
                        } else {
                            BluedHook.wsServerManager.stopServer();
                        }
                    }
                } else if (setting.getFunctionId() == REC_HEW_HORN) {
                    if (!setting.isSwitchOn()) {
                        PlayingOnLiveBaseModeFragmentHook.getInstance(AppContainer.getInstance().getBluedContext(), AppContainer.getInstance


n_thread_mut() {
            Some(ref mut main) => drain_or_fill_static_buffer(CMD_CODER, &mut self.coder, &mut self.demuxer, &mut self.muxer, output, output_offset,
                                                              &mut Some(main.m8.get_base_alloc())),
            None => drain_or_fill_static_buffer(CMD_CODER, &mut self.coder, &mut self.demuxer, &mut self.muxer, output, output_offset,
                                                &mut None), // FIXME: should we just return success if we are on the worker
        }
    }
}
impl <AllocU8:Allocator<u8>,
      LinearInputBytes:StreamDemuxer<AllocU8>,
      LinearOutputBytes:StreamMuxer<AllocU8>+Default,
      Cdf16:CDF16,
      AllocCDF16:Allocator<Cdf16>,
      ArithmeticCoder:ArithmeticEncoderOrDecoder+NewWithAllocator<AllocU8>,
      Specialization:EncoderOrDecoderSpecialization,
      > CrossCommandState<ArithmeticCoder,
                          Specialization,
                          LinearInputBytes,
                          LinearOutputBytes,
                          Cdf16,
                          AllocU8,
                          AllocCDF16> {
    pub fn new(mut m8: AllocU8,
               mut mcdf16:AllocCDF16,
               //cmd_coder: ArithmeticCoder,
               //lit_coder: ArithmeticCoder,
               cmd_coder: ArithmeticCoder,
               lit_coder: ArithmeticCoder,
               spc: Specialization,
               linear_input_bytes: LinearInputBytes,
               ring_buffer_size: usize,
               dynamic_context_mixing: u8,
               prior_depth:u8,
               literal_adaptation_rate: Option<[Speed;4]>,
               do_context_map:bool,
               force_stride: StrideSelection) -> Self {
        let ring_buffer = m8.alloc_cell(1 << ring_buffer_size);
        let lit_low_priors = mcdf16.alloc_cell(LiteralNibblePriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let lit_high_priors = mcdf16.alloc_cell(LiteralNibblePriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let lit_len_priors = mcdf16.alloc_cell(LiteralCommandPriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let copy_priors = mcdf16.alloc_cell(CopyCommandPriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let dict_priors = mcdf16.alloc_cell(DictCommandPriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let cc_priors = mcdf16.alloc_cell(CrossCommandPriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let pred_priors = mcdf16.alloc_cell(PredictionModePriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let btype_priors = mcdf16.alloc_cell(BlockTypePriors::<Cdf16, AllocCDF16>::NUM_ALL_PRIORS);
        let literal_context_map = m8.alloc_cell(MAX_LITERAL_CONTEXT_MAP_SIZE);
        let distance_context_map = m8.alloc_cell(4 * NUM_BLOCK_TYPES);
        CrossCommandState::<ArithmeticCoder,
                            Specialization,
                            LinearInputBytes,
                            LinearOutputBytes,
                            Cdf16,
                            AllocU8,
                            AllocCDF16> {
            //cmd_coder: cmd_coder,
            coder: cmd_coder,
            //lit_coder: lit_coder,
            specialization: spc,
            thread_ctx: ThreadContext::MainThread(MainThreadContext::<Cdf16, AllocU8, AllocCDF16, ArithmeticCoder>{
                recoder:


CHAR manufacturerID[32];
 *   CK_UTF8CHAR model[16];
 *   CK_CHAR serialNumber[16];
 *   CK_FLAGS flags;
 *   CK_ULONG ulMaxSessionCount;
 *   CK_ULONG ulSessionCount;
 *   CK_ULONG ulMaxRwSessionCount;
 *   CK_ULONG ulRwSessionCount;
 *   CK_ULONG ulMaxPinLen;
 *   CK_ULONG ulMinPinLen;
 *   CK_ULONG ulTotalPublicMemory;
 *   CK_ULONG ulFreePublicMemory;
 *   CK_ULONG ulTotalPrivateMemory;
 *   CK_ULONG ulFreePrivateMemory;
 *   CK_VERSION hardwareVersion;
 *   CK_VERSION firmwareVersion;
 *   CK_CHAR utcTime[16];
 * } CK_TOKEN_INFO;
 *
 *

 *
 * @author Karl Scheibelhofer <Karl.Scheibelhofer@iaik.at>
 * @author Martin Schlaeffer <schlaeff@sbox.tugraz.at>
 */
public class CK_TOKEN_INFO {

    /* label, manufacturerID, and model have been changed from
     * CK_CHAR to CK_UTF8CHAR for v2.11. */
    /**
     * must be blank padded and only the first 32 chars will be used

     * PKCS#11:
     *

     *   CK_UTF8CHAR label[32];
     *

     */
    public char[] label;           /* blank padded */

    /**
     * must be blank padded and only the first 32 chars will be used

     * PKCS#11:
     *

     *   CK_UTF8CHAR manufacturerID[32];
     *

     */
    public char[] manufacturerID;  /* blank padded */

    /**
     * must be blank padded and only the first 16 chars will be used

     * PKCS#11:
     *

     *   CK_UTF8CHAR model[16];
     *

     */
    public char[] model;           /* blank padded */

    /**
     * must be blank padded and only the first 16 chars will be used

     * PKCS#11:
     *

     *   CK_CHAR serialNumber[16];
     *

     */
    public char[] serialNumber;    /* blank padded */

    /**
     * PKCS#11:
     *

     *   CK_FLAGS flags;
     *

     */
    public long flags;               /* see below */

    /* ulMaxSessionCount, ulSessionCount, ulMaxRwSessionCount,
     * ulRwSessionCount, ulMaxPinLen, and ulMinPinLen have all been
     * changed from CK_USHORT to CK_ULONG for v2.0 */
    /**
     * PKCS#11:
     *

     *   CK_ULONG ulMaxSessionCount;
     *

     */
    public long ulMaxSessionCount;     /* max open sessions */

    /**
     * PKCS#11:
     *

     *   CK_ULONG ulSessionCount;
     *

     */
    public long ulSessionCount;        /* sess. now open */

    /**
     * PKCS#11:
     *

     *   CK_ULONG ulMaxRwSessionCount;
     *

     */
    public long ulMaxRwSessionCount;   /* max R/W sessions */

    /**
     * PKCS#11:
     *

     *   CK_ULONG ulRwSessionCount;
     *

     */
    public long ulRwSessionCount;      /* R/W sess. now open */

    /**
     * PKCS#11:
     *

     *   CK_ULONG ulMaxPinL


_IMU.at(time1_cam));
    state->_clones_IMU.erase(time1_cam);
  }

  // Finally return
  last_zupt_state_timestamp = timestamp;
  last_zupt_count++;
  return true;
}/*
 * OpenVINS: An Open Platform for Visual-Inertial Research
 * Copyright (C) 2018-2023 Patrick Geneva
 * Copyright (C) 2018-2023 Guoquan Huang
 * Copyright (C) 2018-2023 OpenVINS Contributors
 * Copyright (C) 2018-2019 Kevin Eckenhoff
 *
 * 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 <https://www.gnu.org/licenses/>.
 */

#include "Simulator.h"

#include "cam/CamBase.h"
#include "cam/CamEqui.h"
#include "cam/CamRadtan.h"
#include "sim/BsplineSE3.h"
#include "state/State.h"
#include "utils/colors.h"
#include "utils/dataset_reader.h"

using namespace ov_core;
using namespace ov_msckf;

Simulator::Simulator(VioManagerOptions &params_) {

  //===============================================================
  //===============================================================

  // Nice startup message
  PRINT_DEBUG("=======================================\n");
  PRINT_DEBUG("VISUAL-INERTIAL SIMULATOR STARTING\n");
  PRINT_DEBUG("=======================================\n");

  // Store a copy of our params
  // NOTE: We need to explicitly create a copy of our shared pointers to the camera objects
  // NOTE: Otherwise if we perturb it would also change our "true" parameters
  this->params = params_;
  params.camera_intrinsics.clear();
  for (auto const &tmp : params_.camera_intrinsics) {
    auto tmp_cast = std::dynamic_pointer_cast<ov_core::CamEqui>(tmp.second);
    if (tmp_cast != nullptr) {
      params.camera_intrinsics.insert({tmp.first, std::make_shared<ov_core::CamEqui>(tmp.second->w(), tmp.second->h())});
      params.camera_intrinsics.at(tmp.first)->set_value(params_.camera_intrinsics.at(tmp.first)->get_value());
    } else {
      params.camera_intrinsics.insert({tmp.first, std::make_shared<ov_core::CamRadtan>(tmp.second->w(), tmp.second->h())});
      params.camera_intrinsics.at(tmp.first)->set_value(params_.camera_intrinsics.at(tmp.first)->get_value());
    }
  }

  // Load the groundtruth trajectory and its spline
  DatasetReader::load_simulated_trajectory(params.sim_traj_path, traj_data);
  spline = std::make_shared<ov_core::BsplineSE3>();
  spline->feed_trajectory(traj_data);

  // Set all our timestamps as starting from the minimum spline time
  timestamp = spline->get_start_time();
  timestamp_last_imu = spline->get_start_time();
  timestamp_last_cam = spline->get_start_time();

  // Get the pose at the current timestep
  Eigen::Matrix3d R_GtoI_init;
  Eigen::Vector3d p_I


o modelo do documento fiscal, conforme a Tabela 4.1.3
            /// </summary>
            [SpedCampos(5, "COD_MOD", "C", 2, 0, true, 2)]
            public int CodMod { get; set; }

            /// <summary>
            ///    Código   da   situação   do   documento conforme tabela 4.1.2
            /// </summary>
            [SpedCampos(6, "COD_SIT", "N", 2, 0, true, 2)]
            public int CodSit { get; set; }

            /// <summary>
            ///    Série do documento fiscal
            /// </summary>
            [SpedCampos(7, "SER", "C", 3, 0, false, 2)]
            public int Ser { get; set; }

            /// <summary>
            ///    Número do documento fiscal
            /// </summary>
            [SpedCampos(8, "NUM_DOC", "N", 9, 0, true, 2)]
            public int NumDoc { get; set; }

            /// <summary>
            ///    Chave da Nota Fiscal Eletrônica
            /// </summary>
            [SpedCampos(9, "CHV_NFE", "N", 44, 0, false, 2)]
            public int ChvNfe { get; set; }

            /// <summary>
            ///    Data da emissão do documento fiscal
            /// </summary>
            [SpedCampos(10, "DT_DOC", "N", 8, 0, true, 2)]
            public int DtDoc { get; set; }

            /// <summary>
            ///    Código do município onde o serviço foi prestado, conforme a tabela IBGE.
            /// </summary>
            [SpedCampos(11, "COD_MUN_SERV", "C", 7, 0, true, 2)]
            public int CodMunServ { get; set; }

            /// <summary>
            ///    Valor contábil (valor total do documento)
            /// </summary>
            [SpedCampos(12, "VL_CONT", "N", 2, 0, true, 2)]
            public int VlCont { get; set; }

            /// <summary>
            ///   Valor do material fornecido por terceiros na prestação do serviço
            /// </summary>
            [SpedCampos(13, "VL_MAT_TERC", "N", 0, 2, true, 2)]
            public int VlMatTerc { get; set; }

            /// <summary>
            ///    Valor da subempreitada
            /// </summary>
            [SpedCampos(14, "VL_SUB", "N", 0, 2, true, 2)]
            public int VlSub { get; set; }

            /// <summary>
            ///    Valor das operações  isentas  ou  não-tributadas pelo ISS
            /// </summary>
            [SpedCampos(15, "VL_ISNT_ISS", "N", 0, 2, true, 2)]
            public int VlIsntIss { get; set; }

            /// <summary>
            ///    Valor da dedução da base de cálculo
            /// </summary>
            [SpedCampos(16, "VL_DED_BC", "N", 0, 2, true, 2)]
            public int VlDedBc { get; set; }

            /// <summary>
            ///    Valor da base de cálculo do ISS
            /// </summary>
            [SpedCampos(17, "VL_BC_ISS", "N", 0, 2, true, 2)]
            public int VlBcIss { get; set; }

            /// <summary>
            ///    Valor da base de cálculo de retenção do ISS
            /// </summary>
            [SpedCampos(18, "VL_BC_ISS_RT", "N", 0, 2, true, 2)]
            public int


===l&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},8424:(e,t,n)=>{"use strict";let i=n(609),r=n(5930),s=(n(1393),n(3300));const o=n(8298);class a{constructor(e,t,n){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let a=r;this.result=new o(this._processor,s,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let d=new i(a,s,this._opts,t);if(d.isMap()){let[e,t]=d.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else d.clearAnnotation(),this.result.css=d.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=s;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=a,a.default=a},1051:(e,t,n)=>{"use strict";let{isClean:i,my:r}=n(2990),s=n(6069),o=n(9845),a=n(5930);function l(e,t){let n=new e.constructor;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;if("proxyCache"===i)continue;let r=e[i],s=typeof r;"parent"===i&&"object"===s?t&&(n[i]=t):"source"===i?n[i]=r:Array.isArray(r)?n[i]=r.map((e=>l(e,n))):("object"===s&&null!==r&&(r=l(r)),n[i]=r)}return n}class d{constructor(e={}){this.raws={},this[i]=!1,this[r]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){del


 eastings start at 166e3
    // due to 500km false origin)
    final col =
        _columnLetters[(lonZone - 1) % 3].indexOf(gridSquare.column) + 1;
    final e100kNum = col * 100000; // e100k in metres

    // get northing specified by n100k
    final row = _rowLetters[(lonZone - 1) % 2].indexOf(gridSquare.row);
    final n100kNum = row * 100000; // n100k in metres

    // latitude of (bottom of) band, 10 bands above the equator, 8°latitude each
    final latBand = (_latBands.indexOf(gridSquare.band) - 10) * 8;

    // get southern-most northing of bottom of band, using floor() to extend to
    // include entirety of bottom-most 100km square - note in northern
    // hemisphere, centre of zone will be furthest south; in southern hemisphere
    // extremity of zone will be furthest south, so use 3°E / 0°E
    final position = Utm.fromGeographic(
      Geographic(
        lat: latBand.toDouble(),
        lon: isNorth ? 3.0 : 0.0,
      ),
      datum: datum,
      roundResults: false,
    );
    final nBand = (position.northing / 100000.0).floor() * 100000;

    // 100km grid square row letters repeat every 2,000km north; add enough
    // 2,000km blocks to get into required band
    var n2M = 0; // northing of 2,000km block
    while (n2M + n100kNum + northing < nBand) {
      n2M += 2000000;
    }

    return Utm(
      gridSquare.lonZone,
      hemisphere,
      (e100kNum + easting).toDouble(),
      (n2M + n100kNum + northing).toDouble(),
      datum: datum,
    );
  }

  /// The MGRS grid reference string representation with components separated by
  /// whitespace by default.
  ///
  /// {@template geobase.geodesy.mgrs.distinquishFromUTM}
  ///
  /// To distinguish from civilian UTM coordinate representations, no space is
  /// included within the zone/band grid zone designator.
  ///
  /// {@endtemplate}
  ///
  /// {@template geobase.geodesy.mgrs.militaryStyle}
  ///
  /// Components are separated by spaces by default. For a military-style
  /// unseparated string set [militaryStyle] to true.
  ///
  /// {@endtemplate}
  ///
  /// {@template geobase.geodesy.mgrs.zoneLeadingZero}
  ///
  /// If [zeroPadZone] is true, then all zone numbers (1..60) are formatted with
  /// two digits, e.g. `31` or `04`. By default only significant digits are
  /// formatted, e.g. `31` or `4`.
  ///
  /// {@endtemplate}
  ///
  /// Note that MGRS grid references get truncated, not rounded (unlike UTM
  /// coordinates); grid references indicate a bounding square, rather than a
  /// point, with the size of the square indicated by the precision - a
  /// precision of 10 indicates a 1-metre square, a precision of 4 indicates
  /// a 1,000-metre square (hence 31U DQ 48 11 indicates a 1km square with SW
  /// corner at 31 N 448000 5411000, which would include the 1m square
  /// 31U DQ 48251 11932).
  ///
  /// Examples:
  ///
  /// ```dart
  ///   // a sample MGRS reference `31U DQ 48251 11932`
  ///   final mgrsRef = Mgrs(31, 'U', 'D', 'Q', 48251, 11932);
  ///
  ///   // 10 digits, the precision level 1 m
  ///   print(mgrsRef.toText()); // '


l-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23ffffff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")}.accent-gray-dark .custom-control-input:focus:not(:checked)~.custom-control-label::before,.accent-gray-dark .custom-file-input:focus~.custom-file-label,.accent-gray-dark .custom-select:focus,.accent-gray-dark .form-control:focus:not(.is-invalid):not(.is-warning):not(.is-valid){border-color:#6d7a86}.accent-gray-dark .page-item .page-link{color:#343a40}.accent-gray-dark .page-item.active .page-link,.accent-gray-dark .page-item.active a{background-color:#343a40;border-color:#343a40;color:#fff}.accent-gray-dark .page-item.disabled .page-link,.accent-gray-dark .page-item.disabled a{background-color:#fff;border-color:#dee2e6;color:#6c757d}.accent-gray-dark [class*=sidebar-dark-] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link){color:#c2c7d0}.accent-gray-dark [class*=sidebar-dark-] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):hover{color:#fff}.accent-gray-dark [class*=sidebar-light-] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link){color:#343a40}.accent-gray-dark [class*=sidebar-light-] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):hover{color:#212529}[class*=accent-] a.btn-primary{color:#fff}[class*=accent-] a.btn-secondary{color:#fff}[class*=accent-] a.btn-success{color:#fff}[class*=accent-] a.btn-info{color:#fff}[class*=accent-] a.btn-warning{color:#1f2d3d}[class*=accent-] a.btn-danger{color:#fff}[class*=accent-] a.btn-light{color:#1f2d3d}[class*=accent-] a.btn-dark{color:#fff}
/*# sourceMappingURL=adminlte.core.min.css.map */---
---
@import "reset";

/*----------------------------------------------------------------------------*/
/*  # ROOT ELEMENT: VARIABLES - COLORS                                        */
/*----------------------------------------------------------------------------*/
:root {
  --color_white-0: rgba(255, 255, 255, 1);  /* ci white                       */
  --color_black-0: rgba(0, 0, 0, 1);        /* ci black                       */
  --color_black-1: rgba(34, 34, 34, 1);     /* typo black                     */
  --color_black-2: rgba(68, 68, 68, 1);     /* typo black                     */
  --color_blue-0: rgba(0, 73, 128, 1);      /* ci blue                        */
  --color_blue-1: rgba(0, 52, 92, 1);       /* offset blue                    */
  --color_blue-2: rgba(72, 120, 168, 1);    /* offset blue                    */
  --color_blue-5: rgba(31, 87, 164, 1);     /* typo blue                      */
  --color_grey-0: rgba(242, 242, 242


/*
 * Copyright 2008, The Android Open Source Project
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef TouchEvent_h
#define TouchEvent_h

#if ENABLE(TOUCH_EVENTS)

#include "MouseRelatedEvent.h"
#include "TouchList.h"

namespace WebCore {

class TouchEvent : public MouseRelatedEvent {
public:
    virtual ~TouchEvent();

    static PassRefPtr<TouchEvent> create()
    {
        return adoptRef(new TouchEvent);
    }
    static PassRefPtr<TouchEvent> create(TouchList* touches,
            TouchList* targetTouches, TouchList* changedTouches,
            const AtomicString& type, PassRefPtr<AbstractView> view,
            int screenX, int screenY, int pageX, int pageY,
            bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
    {
        return adoptRef(new TouchEvent(touches, targetTouches, changedTouches,
                type, view, screenX, screenY, pageX, pageY,
                ctrlKey, altKey, shiftKey, metaKey));
    }

    void initTouchEvent(TouchList* touches, TouchList* targetTouches,
            TouchList* changedTouches, const AtomicString& type,
            PassRefPtr<AbstractView> view, int screenX, int screenY,
            int clientX, int clientY,
            bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);

    TouchList* touches() const { return m_touches.get(); }
    TouchList* targetTouches() const { return m_targetTouches.get(); }
    TouchList* changedTouches() const { return m_changedTouches.get(); }

#if PLATFORM(ANDROID)
    virtual bool hitTouchHandler() const { return m_hitTouchHandler; }
    virtual void setHitTouchHandler() { m_hitTouchHandler = true; }
#endif

private:
    TouchEvent();
    TouchEvent(TouchList* touches, TouchList* targetTouches,
            TouchList* changedTouches, const AtomicString& type,
            PassRefPtr<AbstractView>, int screenX, int screenY, int pageX,
            int pageY,
            bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);

    virtual bool isTouchEvent() const { return true; }

#if PLATFORM(ANDROID)
    bool m_hitTouchHandler;
#endif

    RefPtr<TouchList> m_touches;
    RefPtr<TouchList> m_targetTouches;
    RefPtr<TouchList> m_changedTouches;
};

} // namespace WebCore

#endif // ENABLE(TOUCH_EVENTS)

#endif // TouchEvent_h


line--badged clr-i-outline-path-3--badged"/><path fill="currentColor" d="M27.46 17.23a6.36 6.36 0 00-4.4 11l-1.94 2.37.9 3.61 3.66-4.46a6.26 6.26 0 003.55 0l3.66 4.46.9-3.61-1.94-2.37a6.36 6.36 0 00-4.4-11Zm0 10.68a4.31 4.31 0 114.37-4.31 4.35 4.35 0 01-4.37 4.31Z" class="clr-i-outline--badged clr-i-outline-path-4--badged"/><path fill="currentColor" d="M32 13.22v3.34a8.41 8.41 0 012 1.81v-6a7.45 7.45 0 01-2 .85Z" class="clr-i-outline--badged clr-i-outline-path-5--badged"/><path fill="currentColor" d="M4 28V8h18.78a7.49 7.49 0 01-.28-2H4a2 2 0 00-2 2v20a2 2 0 002 2h15l.57-.7.93-1.14-.09-.16Z" class="clr-i-outline--badged clr-i-outline-path-6--badged"/><circle cx="30" cy="6" r="5" fill="currentColor" class="clr-i-outline--badged clr-i-outline-path-7--badged clr-i-badge"/><path fill="currentColor" d="M0 0h36v36H0z"/></svg>';
  static const String license_solid =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 36 36"><path fill="currentColor" d="M19 30H4a2 2 0 01-2-2V8a2 2 0 012-2h28a2 2 0 012 2v10.37a8.34 8.34 0 00-13.49 9.79l-.93 1.14ZM7 12v1.6h17V12Zm0 5.6h11V16H7Zm0 7h10V23H7Z" class="clr-i-solid clr-i-solid-path-1"/><path fill="currentColor" d="M33.83 23.59a6.37 6.37 0 10-10.77 4.59l-1.94 2.37.9 3.61 3.66-4.46a6.26 6.26 0 003.55 0l3.66 4.46.9-3.61-1.94-2.37a6.34 6.34 0 001.98-4.59Zm-10.74 0a4.37 4.37 0 114.37 4.31 4.35 4.35 0 01-4.36-4.31Z" class="clr-i-solid clr-i-solid-path-2"/><path fill="currentColor" d="M0 0h36v36H0z"/></svg>';
  static const String license_solid_alerted =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 36 36"><path fill="currentColor" d="M33.83 23.59a6.37 6.37 0 10-10.77 4.59l-1.94 2.37.9 3.61 3.66-4.46a6.26 6.26 0 003.55 0l3.66 4.46.9-3.61-1.94-2.37a6.34 6.34 0 001.98-4.59Zm-10.74 0a4.37 4.37 0 114.37 4.31 4.35 4.35 0 01-4.36-4.31Z" class="clr-i-solid--


<byte>(_world, i - _worldWidth);
                var topRightNeighbors = new Vector<byte>(_world, i - _worldWidth + 1);
                var leftNeighbors = new Vector<byte>(_world, i - 1);
                var rightNeighbors = new Vector<byte>(_world, i + 1);
                var bottomLeftNeighbors = new Vector<byte>(_world, i + _worldWidth - 1);
                var bottomNeighbors = new Vector<byte>(_world, i + _worldWidth);
                var bottomRightNeighbors = new Vector<byte>(_world, i + _worldWidth + 1);

                var totalNeighbors =
                    topLeftNeighbors + topNeighbors + topRightNeighbors +
                    leftNeighbors + rightNeighbors +
                    bottomLeftNeighbors + bottomNeighbors + bottomRightNeighbors;

                totalNeighbors.Store(neighborsPtr + i);
            }
        }
    }

    private unsafe void ApplyRule()
    {
        fixed (byte* worldPtr = _world)
        {
            for (var i = _worldWidth + 1; i < _worldWidth * (_worldHeight - 1); i += BatchSize + 2)
            {
                var neighbors = new Vector<byte>(_neighbors, i);
                var whenBorn = MaskNeighborsVectorWithNeighborCountVectors(neighbors, _bornNeighborCountVectors);
                var whenSurvive = MaskNeighborsVectorWithNeighborCountVectors(neighbors, _surviveNeighborCountVectors);

                var currentCells = new Vector<byte>(_world, i);
                var aliveCells = Vector.Equals(currentCells, Vector<byte>.One);
                var aliveAndNeighbours = Vector.BitwiseAnd(aliveCells, whenSurvive);

                var shouldBeAlive = Vector.BitwiseOr(aliveAndNeighbours, whenBorn);
                shouldBeAlive = Vector.BitwiseAnd(shouldBeAlive, Vector<byte>.One);
                shouldBeAlive.Store(worldPtr + i);
            }
        }
    }

    private v


16v-32c0-8.84-7.16-16-16-16z"],language:[640,512,[],"f1ab","M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z"],laptop:[640,512,[],"f109","M624 416H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33.02-17.47-32.77-32H16c-8.8 0-16 7.2-16 16v16c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-16c0-8.8-7.2-16-16-16zM576 48c0-26.4-21.6-48-48-48H112C85.6 0 64 21.6 64 48v336h512V48zm-64 272H128V64h384v256z"],"laptop-code":[640,512,[],"f5fc","M255.03 261.65c6.25 6.25 16.38 6.25 22.63 0l11.31-11.31c6.25-6.25 6.25-16.38 0-22.63L253.25 192l35.71-35.72c6.25-6.25 6.25-


    /**
     * An offer to provide this item—for example, an offer to sell a product,
     * rent the DVD of a movie, perform a service, or give away tickets to an event.
     */
    // offers?: OfferFactory.IOffer[];
    /**
     * 残り収容人数
     */
    remainingAttendeeCapacity?: number;
    /**
     * 開始日時(in ISO 8601 date format)
     */
    startDate?: Date;
    /**
     * イベントで上演される作品
     */
    workPerformed?: CreativeWorkFactory.ICreativeWork;
}

// tslint:disable-next-line:no-single-line-block-comment
/* istanbul ignore next */
export function create(params: {
    typeOf: EventType;
    id?: string;
    identifier: string;
    name: IMultilingualString;
    description?: IMultilingualString;
    doorTime?: Date;
    duration?: string;
    endDate?: Date;
    eventStatus: EventStatusType;
    location?: PlaceFactory.IPlace;
    maximumAttendeeCapacity?: number;
    // offers?: OfferFactory.IOffer[];
    remainingAttendeeCapacity?: number;
    startDate?: Date;
    workPerformed?: CreativeWorkFactory.ICreativeWork;
}): IEvent {
    return {
        id: params.id,
        identifier: params.identifier,
        name: (params.name === undefined) ? { ja: '', en: '' } : params.name,
        description: params.description,
        doorTime: params.doorTime,
        duration: (params.duration === undefined) ? undefined : params.duration.toString(),
        endDate: params.endDate,
        eventStatus: params.eventStatus,
        location: params.location,
        startDate: params.startDate,
        workPerformed: params.workPerformed,
        maximumAttendeeCapacity: params.maximumAttendeeCapacity,
        // offers: params.offers,
        remainingAttendeeCapacity: params.remainingAttendeeCapacity,
        typeOf: params.typeOf
    };
}
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-temperature',
  templateUrl: './temperature.component.html',
  styleUrls: ['./temperature.component.scss']
})
export class TemperatureComponent {

  wemosSnippet: string = `
    #include "DHT.h"
    #include ‹ESP8266WiFi.h›
    #include ‹NTPtimeESP.h›

    NTPtime NTPhr("hr.pool.ntp.org");   //Choose server pool as required
    strDateTime dateTime;

    const char* ssid = "**********"; //SECRET_SSID; //Enter SSID
    const char* password = "**********" ; //SECRET_PASS; //Enter Password
    char host[] = "***.***.*.*"; //IPv4 address
    const int port = **** ;   //port on which server listens

    #define DHTTYPE DHT11
    #define dht_dpin D4
    DHT dht(dht_dpin, DHTTYPE);
    WiFiClient client;    //use for TCP connections

    void setup() {
        Serial.begin(9600);
        dht.begin();

        WiFi.begin(ssid, password);   // Connect to WiFi

        while(WiFi.waitForConnectResult() != WL_CONNECTED) //while(WiFi.status() != WL_CONNECTED)
        {
          delay(100);
          if(millis()>25000){
            break;
          }
        }

        if(WiFi.status() != WL_CONNECTED)
      {
        while(millis()<40000)
        {
          delay(10);
        }
        digitalWrite(12, HIGH);
        delay(500);
        ESP.deepSleep(54000e4);   //379932e4
      }

      while(!(dateTime = NTPhr.getNTPtime(1.0, 1)).valid)
      {
        delay(100);
      }

      while(millis()<30000)
      {
        delay(10);
      }


2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64z"],
    "comments": [640, 512, [128490, 61670], "f086", "M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM208 352c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.8 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z"],
    "paste": [512, 512, ["file-clipboard"], "f0ea", "M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l