r, f.ByteOrder, &descsize)
			if err != nil {
				return nil, fmt.Errorf("read descsize failed: %v", err)
			}
			err = binary.Read(r, f.ByteOrder, &noteType)
			if err != nil {
				return nil, fmt.Errorf("read type failed: %v", err)
			}
			noteName, err := readAligned4(r, namesize)
			if err != nil {
				return nil, fmt.Errorf("read name failed: %v", err)
			}
			desc, err := readAligned4(r, descsize)
			if err != nil {
				return nil, fmt.Errorf("read desc failed: %v", err)
			}
			if name == string(noteName) && typ == noteType {
				return desc, nil
			}
		}
	}
	return nil, nil
}

var elfGoNote = []byte("Go\x00\x00")
var elfGNUNote = []byte("GNU\x00")

// The Go build ID is stored in a note described by an ELF PT_NOTE prog
// header. The caller has already opened filename, to get f, and read
// at least 4 kB out, in data.
func readELF(name string, f *os.File, data []byte) (buildid string, err error) {
	// Assume the note content is in the data, already read.
	// Rewrite the ELF header to set shnum to 0, so that we can pass
	// the data to elf.NewFile and it will decode the Prog list but not
	// try to read the section headers and the string table from disk.
	// That's a waste of I/O when all we care about is the Prog list
	// and the one ELF note.
	switch elf.Class(data[elf.EI_CLASS]) {
	case elf.ELFCLASS32:
		data[48] = 0
		data[49] = 0
	case elf.ELFCLASS64:
		data[60] = 0
		data[61] = 0
	}

	const elfGoBuildIDTag = 4
	const gnuBuildIDTag = 3

	ef, err := elf.NewFile(bytes.NewReader(data))
	if err != nil {
		return "", &fs.PathError{Path: name, Op: "parse", Err: err}
	}
	var gnu string
	for _, p := range ef.Progs {
		if p.Type != elf.PT_NOTE || p.Filesz < 16 {
			continue
		}

		var note []byte
		if p.Off+p.Filesz < uint64(len(data)) {
			note = data[p.Off : p.Off+p.Filesz]
		} else {
			// For some linkers, such as the Solaris linker,
			// the buildid may not be found in data (which
			// likely contains the first 16kB of the file)
			// or even the first few megabytes of the file
			// due to differences in note segment placement;
			// in that case, extract the note data manually.
			_, err = f.Seek(int64(p.Off), io.SeekStart)
			if err != nil {
				return "", err
			}

			note = make([]byte, p.Filesz)
			_, err = io.ReadFull(f, note)
			if err != nil {
				return "", err
			}
		}

		filesz := p.Filesz
		off := p.Off
		for filesz >= 16 {
			nameSize := ef.ByteOrder.Uint32(note)
			valSize := ef.ByteOrder.Uint32(note[4:])
			tag := ef.ByteOrder.Uint32(note[8:])
			nname := note[12:16]
			if nameSize == 4 && 16+valSize <= uint32(len(note)) && tag == elfGoBuildIDTag && bytes.Equal(nname, elfGoNote) {
				return string(note[16 : 16+valSize]), nil
			}

			if nameSize == 4 && 16+valSize <= uint32(len(note)) && tag == gnuBuildIDTag && bytes.Equal(nname, elfGNUNote) {
				gnu = string(note[16 : 16+valSize])
			}

			nameSize = (nameSize + 3) &^ 3
			valSize = (valSize + 3) &^ 3
			notesz := uint64(12 + nameSize + valSize)
			if filesz <= notesz {
				break
			}
			off +=


untime.frameOffset++] = <Object?, Object?>{};
  }

  @override
  String toString() => 'PushMap ()';
}

class MapSet extends EvcOp {
  MapSet(Runtime runtime)
      : _map = runtime._readInt16(),
        _index = runtime._readInt16(),
        _value = runtime._readInt16();

  MapSet.make(this._map, this._index, this._value);

  final int _map;
  final int _index;
  final int _value;

  static const int LEN = Evc.BASE_OPLEN + Evc.I16_LEN * 3;

  @override
  void run(Runtime runtime) {
    final frame = runtime.frame;
    (frame[_map] as Map)[frame[_index]] = frame[_value];
  }

  @override
  String toString() => 'MapSet (L$_map[L$_index] = L$_value)';
}

class IndexMap extends EvcOp {
  IndexMap(Runtime runtime)
      : _map = runtime._readInt16(),
        _index = runtime._readInt16();

  IndexMap.make(this._map, this._index);

  final int _map;
  final int _index;

  static const int LEN = Evc.BASE_OPLEN + Evc.I16_LEN * 2;

  @override
  void run(Runtime runtime) {
    final frame = runtime.frame;
    frame[runtime.frameOffset++] = (frame[_map] as Map)[frame[_index]];
  }

  @override
  String toString() => 'IndexMap (L$_map[L$_index])';
}

class PushSet extends EvcOp {
  PushSet(Runtime runtime);

  PushSet.make();

  static const int LEN = Evc.BASE_OPLEN;

  @override
  void run(Runtime runtime) {
    runtime.frame[runtime.frameOffset++] = <Object?>{};
  }

  @override
  String toString() => 'PushSet ()';
}

class SetAdd extends EvcOp {
  SetAdd(Runtime runtime)
      : _set = runtime._readInt16(),
        _value = runtime._readInt16();

  SetAdd.make(this._set, this._value);

  final int _set;
  final int _value;

  static const int LEN = Evc.BASE_OPLEN + Evc.I16_LEN * 2;

  @override
  void run(Runtime runtime) {
    (runtime.frame[_set] as Set).add(runtime.frame[_value]);
  }

  @override
  String toString() => 'SetAdd (L$_set, L$_value)';
}

class PushTrue extends EvcOp {
  PushTrue(Runtime runtime);

  PushTrue.make();

  static const int LEN = Evc.BASE_OPLEN;

  @override
  void run(Runtime runtime) {
    final frame = runtime.frame;
    frame[runtime.frameOffset++] = true;
  }

  @override
  String toString() => 'PushTrue ()';
}

class LogicalNot extends EvcOp {
  LogicalNot(Runtime runtime) : _index = runtime._readInt16();

  LogicalNot.make(this._index);

  final int _index;

  static const int LEN = Evc.BASE_OPLEN + Evc.I16_LEN;

  @override
  void run(Runtime runtime) {
    final frame = runtime.frame;
    frame[runtime.frameOffset++] = !(frame[_index] as bool);
  }

  @override
  String toString() => 'LogicalNot (L$_index)';
}

class BoxBool implements EvcOp {
  BoxBool(Runtime runtime) : _reg = runtime._readInt16();

  BoxBool.make(this._reg);

  final int _reg;

  static const int LEN = Evc.BASE_OPLEN + Evc.I16_LEN;

  @override
  void run(Runtime runtime) {
    final reg = _reg;
    runtime.frame[reg] = $bool(runtime.frame[reg] as bool);
  }

  @override
  String toString() => 'BoxBool (L


 crear el .apk:

- En el archivo `eas.json` tenemos que asegurarnos qeu tenemos `developmentClient` seteado en `true` para el perfil de `build.development`.
- Corremos el comando `eas build` seleccionando `android` como plataforma y `development` como perfil.

```bash
$ eas build --platform android --profile development
```

- Este comando nos va a hacer 2 preguntas:
- **What would you like your Android application id to be?** En este caso podemos aprentar enter para usar el valor por defecto. Esto agrega el valor de `android.package` al archivo `app.json`.
- **Generate a new Android Keystore?** seleccionamos Y para establecer que Android use keys encriptadas para hacer que sea más difícil robarlas de un dispositivo.
- Una vez ejecutado el comando se inicia el proceso de compilación y se pone en una cola de proceso esperando nuestro turno para ejecutarlo.
- Podemos seguir el progreso a través de un enlace proporcionado por la CLI de EAS en el panel de control de la Expo.
- Si navegamos al link podemos ver todo el proceso de compilación y obtener información importante sobre el proceso.

![Expo build Android](../assets/react-native/android-build-details.png)

#### ¿Qué información contiene la página de detalles de compilación?

- La página de detalles de la compilación muestra el tipo de compilación, el perfil, la versión del SDK de Expo, la versión de la aplicación, el código de versión, el hash de la última confirmación y la identidad del desarrollador o del propietario de la cuenta que inició la compilación.
- En la imagen anterior, el estado actual del artefacto de compilación muestra que la compilación está en curso. Una vez completada, esta sección ofrecerá una opción para descargar la compilación.
- Los registros describen cada paso realizado durante el proceso de compilación de Android en EAS Build.
- Podemos aprender más sobre el proceso de compilación de Android leyendo la [documentación oficial](https://docs.expo.dev/build-reference/android-builds/).

#### ¿Qué es el ID de una aplicación Android?

- Conocido como package name (nombre de paquete), almacena el valor de DNS (com.owner.appname) en formato de notación inversa.
- Cada componente de esta notación debe comenzar con una letra minúscula.
- Por ejemplo, nuestra aplicación de ejemplo tiene `com.owner.project` donde `com.owner` es el dominio y `project` es el nombre de nuestra aplicación.

### Android device

#### Instalar el development build

- Una vez que finaliza el proceso de compilación, se actualiza la sección de Build artifact, indicando que la compilación se ha completado.

![EAS Android finish](../assets/react-native/android-build-artifact.png)

- Esta sección proporciona los métodos disponibles para ejecutar el development build en un dispositivo Android:
  - Expo Orbit
  - Botón de instalación
- `Expo Orbit` permite instalar sin problemas el development build en un dispositivo Android.
  - Para utilizar este método:
    - Descargar [Expo Orbit](https://expo.dev/orbit).
    - Conectar nuestro dispositivo Android a nuestra máquina local mediante USB.
    - Abrir la aplicación de l


;
}

.summary_card_booking_description_left_section h2 {
  font-size: 1rem;
  color: rgb(81, 81, 81);
  font-weight: 500;
  padding-bottom: 1vh;
  padding-top: 0;
  padding-left: 0;
  border-top: none;
  border-bottom: none;
  margin-left: 0rem;
}

.summary_card_booking_description_left_section p {
  color: rgb(131, 131, 131);
  font-weight: 300;
}

.summary_card_booking_description_right_section {
  height: 40%;
  width: 25vw;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  margin-right: 1.5rem;
}

.summary_card_booking_description_right_section p {
  color: rgb(81, 81, 81);
  font-size: 2.2rem;
  font-weight: 500;
}

/* CSS for Smaller Phones */
@media only screen and (max-width: 360px) {
  .summary_card_booking_description_right_section p {
    font-size: 1.5rem;
  }

  .summary_card_booking_description_left_section h2,
  .summary_card_booking_description_left_section p {
    font-size: 0.8rem;
  }
}

/* CSS for Regular Desktops/Small Laptops and Tablets */
@media only screen and (min-width: 1600px) {
  .summary_card_booking_description_left_section h2 {
    font-size: 2rem;
  }

  .summary_card_booking_description_left_section p {
    font-size: 1.5rem;
  }

  .summary_card_booking_description_right_section {
    width: 10vw;
    margin-right: 3.1rem;
  }

  .summary_card_booking_description_right_section p {
    font-size: 3rem;
  }

  .summary_card_image_circle {
    padding-left: 1rem;
    transform: scale(0.8);
  }
}

@media only screen and (min-width: 1600px) and (max-height: 950px) {
  .summary_card_image_circle {
    transform: scale(0.5);
  }
}

/* CSS for Big Desktops */
@media only screen and (min-width: 1800px) {
  .summary_card_booking_description_left_section h2 {
    font-size: 1.2rem;
    margin-left: 0rem;
  }

  .summary_card_booking_description_left_section p {
    font-size: 1rem;
  }

  .summary_card_booking_description_right_section {
    width: 10vw;
    margin-right: 3.1rem;
  }

  .summary_card_booking_description_right_section p {
    font-size: 2rem;
  }

  .summary_card_image_circle {
    transform: scale(1);
  }
}

/* CSS for Huge Desktops */
@media only screen and (min-width: 2200px) {
  .summary_card_booking_description_left_section h2 {
    font-size: 2rem;
    margin-left: -3.2rem;
  }

  .summary_card_booking_description_left_section p {
    font-size: 1.5rem;
    margin-left: -3.2rem;
  }

  .summary_card_booking_description_right_section {
    width: 10vw;
    margin-r


 (44849) / http://www.redhat.com/support/errata/RHSA-2011-0862.html (RHSA-2011:0862) / http://lists.fedoraproject.org/pipermail/package-announce/2011-July/062211.html (FEDORA-2011-8341) / https://bugzilla.redhat.com/show_bug.cgi?id=709114 / http://secunia.com/advisories/44888 (44888) / http://subversion.apache.org/security/CVE-2011-1921-advisory.txt / http://www.securitytracker.com/id?1025619 (1025619) / https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A18999 (oval:org.mitre.oval:def:18999) / http://lists.apple.com/archives/security-announce/2012/Feb/msg00000.html (APPLE-SA-2012-02-01-1) / http://secunia.com/advisories/45162 (45162) / https://exchange.xforce.ibmcloud.com/vulnerabilities/67804 (subversion-control-rules-info-disc(67804)) / http://secunia.com/advisories/44681 (44681) / http://www.securityfocus.com/bid/48091 (48091) / http://lists.fedoraproject.org/pipermail/package-announce/2011-June/061913.html (FEDORA-2011-8352) / http://secunia.com/advisories/44633 (44633) / http://svn.apache.org/repos/asf/subversion/tags/1.6.17/CHANGES |
| cve-2011-1783 | extension | nan | nan | published | 2011-06-06T19:00:00 | 2024-08-06T22:37:25.818Z | the mod dav svn module for the apache http server, as distributed in apache subversion 1.5.x and 1.6.x before 1.6.17, when the svnpathauthz short circuit option is enabled, allows remote attackers to cause a denial of service (infinite loop and memory consumption) in opportunistic circumstances by requesting data. | n/a:n/a (n/a) [affected] | nan | nan | http://www.debian.org/security/2011/dsa-2251 (DSA-2251) / http://www.ubuntu.com/usn/USN-1144-1 (USN-1144-1) / http://support.apple.com/kb/HT5130 / http://www.mandriva.com/security/advisories?name=MDVSA-2011:106 (MDVSA-2011:106) / http://secunia.com/advisories/44849 (44849) / http://www.redhat.com/support/errata/RHSA-2011-0862.html (RHSA-2011:0862) / http://lists.fedoraproject.org/pipermail/package-announce/2011-July/062211.html (FEDORA-2011-8341) / http://subversion.apache.org/security/CVE-2011-1783-advisory.txt / https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A18889 (oval:org.mitre.oval:def:18889) / https://bugzilla.redhat.com/show_bug.cgi?id=709112 / http://secunia.com/advisories/44888 (44888) / http://lists.apple.com/archives/security-announce/2012/Feb/msg00000.html (APPLE-SA-2012-02-01-1) / http://secunia.com/advisories/45162 (45162) / http://www.securitytracker.com/id?1025618 (1025618) / http://secunia.com/advisories/44681 (44681) / http


J(){var e={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return bo(0,5).forEach(function(t){bo(0,5).forEach(function(n){bo(0,5).forEach(function(r){return ZJ(t,n,r,e)})})}),bo(0,23).forEach(function(t){var n=t+232,r=K0(t*10+8);e[n]="#"+r+r+r}),e}function ZJ(e,t,n,r){var o=16+e*36+t*6+n,s=e>0?e*40+55:0,i=t>0?t*40+55:0,l=n>0?n*40+55:0;r[o]=JJ([s,i,l])}function K0(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t}function JJ(e){var t=[],n=X0(e),r;try{for(n.s();!(r=n.n()).done;){var o=r.value;t.push(K0(o))}}catch(s){n.e(s)}finally{n.f()}return"#"+t.join("")}function $u(e,t,n,r){var o;return t==="text"?o=t_(n,r):t==="display"?o=$J(e,n,r):t==="xterm256Foreground"?o=Wo(e,r.colors[n]):t==="xterm256Background"?o=Yo(e,r.colors[n]):t==="rgb"&&(o=_J(e,n)),o}function _J(e,t){t=t.substring(2).slice(0,-1);var n=+t.substr(0,2),r=t.substring(5).split(";"),o=r.map(function(s){return("0"+Number(s).toString(16)).substr(-2)}).join("");return Vo(e,(n===38?"color:#":"background-color:#")+o)}function $J(e,t,n){t=parseInt(t,10);var r={"-1":function(){return"<br/>"},0:function(){return e.length&&Z0(e)},1:function(){return Qt(e,"b")},3:function(){return Qt(e,"i")},4:function(){return Qt(e,"u")},8:function(){return Vo(e,"display:none")},9:function(){return Qt(e,"strike")},22:function(){return Vo(e,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return tf(e,"i")},24:function(){return tf(e,"u")},39:function(){return Wo(e,n.fg)},49:function(){return Yo(e,n.bg)},53:function(){return Vo(e,"text-decoration:overline")}},o;return r[t]?o=r[t]():4<t&&t<7?o=Qt(e,"blink"):29<t&&t<38?o=Wo(e,n.colors[t-30]):39<t&&t<48?o=Yo(e,n.colors[t-40]):89<t&&t<98?o=Wo(e,n.colors[8+(t-90)]):99<t&&t<108&&(o=Yo(e,n.colors[8+(t-100)])),o}function Z0(e){var t=e.slice(0);return e.length=0,t.reverse().map(function(n){return"</"+n+">"}).join("")}function bo(e,t){for(var n=[],r=e;r<=t;r++)n.push(r);return n}funct


 help for details.</b>"), this);
    note->setOpenExternalLinks(true);
    note->setWordWrap(true);
    note->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);

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

    grid->addWidget(d->headlineCheck,                       0, 0, 1, 1);
    grid->addWidget(d->headlineEdit,                        0, 1, 1, 2);
    grid->addWidget(d->captionCheck,                        1, 0, 1, 3);
    grid->addWidget(d->captionEdit,                         2, 0, 1, 3);
    grid->addWidget(d->syncJFIFCommentCheck,                3, 0, 1, 3);
    grid->addWidget(d->syncEXIFCommentCheck,                5, 0, 1, 3);
    grid->addWidget(new DLineWidget(Qt::Horizontal, this),  6, 0, 1, 3);
    grid->addWidget(d->writerEdit,                          7, 0, 1, 3);
    grid->addWidget(note,                                   8, 0, 1, 3);
    grid->setRowStretch(9, 10);
    grid->setColumnStretch(2, 10);
    grid->setContentsMargins(QMargins());
    grid->setSpacing(QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing));

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

    connect(d->captionCheck, SIGNAL(toggled(bool)),
            d->captionEdit, SLOT(setEnabled(bool)));

    connect(d->captionCheck, SIGNAL(toggled(bool)),
            d->syncJFIFCommentCheck, SLOT(setEnabled(bool)));

    connect(d->captionCheck, SIGNAL(toggled(bool)),
            d->syncEXIFCommentCheck, SLOT(setEnabled(bool)));

    connect(d->headlineCheck, SIGNAL(toggled(bool)),
            d->headlineEdit, SLOT(setEnabled(bool)));

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

    connect(d->captionCheck, SIGNAL(toggled(bool)),
            this, SIGNAL(signalModified()));

    connect(d->writerEdit, SIGNAL(signalModified()),
            this, SIGNAL(signalModified()));

    connect(d->headlineCheck, SIGNAL(toggled(bool)),
            this, SIGNAL(signalModified()));

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

    connect(d->captionEdit, SIGNAL(textChanged()),
            this, SIGNAL(signalModified()));

    connect(d->headlineEdit, SIGNAL(textChanged(QString)),
            this, SIGNAL(signalModified()));
}

IPTCContent::~IPTCContent()
{
    delete d;
}

bool IPTCContent::syncJFIFCommentIsChecked() const
{
    return d->syncJFIFCommentCheck->isChecked();
}

bool IPTCContent::syncEXIFCommentIsChecked() const
{
    return d->syncEXIFCommentCheck->isChecked();
}

QString IPTCContent::getIPTCCaption() const
{
    return d->captionEdit->toPlainText();
}

void IPTCContent::setCheckedSyncJFIFComment(bool c)
{
    d->syncJFIFCommentCheck->setChecked(c);
}

void IPTCContent::setCheckedSyncEXIFComment(bool c)
{
    d->syncEXIFCommentCheck->setChecked(c);
}

void IPTCContent::readMetadata(QByteArray& iptcData)
{
    blockSignals(true);
    DMetadata meta;
    meta.setIptc(iptcData);
    QString     data;
    QStringList list;

    d->captionEdit->clear();
    d->captionCheck->setChecked(false);
    data = meta.getIptcTagString("Iptc.Application2.Caption", false);
    if (!data.isNull())
    {
        d->captionEdit->setPlainText(data);
        d->captionCheck->setChecked(true);
    }
    d->captionEdit->setEnabled(d->captionChe


_x_generic_octocopter_x_geometry">
 Generic Octocopter X geometry
 Maintainer: Lorenz Meier <lorenz@px4.io>
SYS_AUTOSTART = 8001

### Quadrotor +

参数名

 Generic Quad + geometry
 Maintainer: John Doe <john@example.com>
SYS_AUTOSTART = 5001

### Quadrotor H

参数名

 BetaFPV Beta75X 2S Brushless Whoop
 Maintainer: Beat Kueng <beat-kueng@gmx.net>
SYS_AUTOSTART = 4041

### Quadrotor x

参数名

 Generic Quadcopter
 Maintainer: Lorenz Meier <lorenz@px4.io>
SYS_AUTOSTART = 4001

 S500 Generic
 Maintainer: Lorenz Meier <lorenz@px4.io>
SYS_AUTOSTART = 4014

 Holybro S500
 Maintainer: Lorenz Meier <lorenz@px4.io>
SYS_AUTOSTART = 4015

 PX4 Vision Dev Kit v1
 Maintainer: John Doe <john@example.com>
SYS_AUTOSTART = 4016

 NXP HoverGames
 Maintainer: Iain Galloway <iain.galloway@nxp.com>
SYS_AUTOSTART = 4017

<tr id="copter_quadrotor_x_


  eprintln!("A valid hue must be supplied");
                    return None;
                } else {
                    match args[i].parse::<u16>() {
                        Ok(seed) => {
                            options.set_seed(seed);
                            h = options.seed();
                        }
                        Err(e) => {
                            eprintln!("Valid Integer must be supplied\n\n{}", e);
                            return None;
                        }
                    }
                }
            }

            "-d" | "--dir" => {
                i += 1;
                if i == len {
                    eprintln!("A valid direction must be supplied");
                    return None;
                } else {
                    match args[i].as_str() {
                        "tl" => options.set_dir(Direction::TopLeft),
                        "t" => options.set_dir(Direction::Top),
                        "tr" => options.set_dir(Direction::TopRight),
                        "l" => options.set_dir(Direction::Left),
                        "r" => options.set_dir(Direction::Right),
                        "bl" => options.set_dir(Direction::BottomLeft),
                        "b" => options.set_dir(Direction::Bottom),
                        "br" => options.set_dir(Direction::BottomRight),
                        dir => {
                            eprintln!("Invalid direction {}\n\t{}", dir, HELP_STR);
                            return None;
                        }
                    }
                }
            }

            "-s" | "--shift" => {
                i += 1;
                if i == len {
                    eprintln!("A integer must be supplied");
                    return None;
                } else {
                    match args[i].parse::<i16>() {
                        Ok(shift) => options.set_shift(shift),
                        Err(e) => {
                            eprintln!("Valid Integer must be supplied\n\n{}", e);
                            return None;
                        }
                    }
                }
            }
            _ => break,
        }

        i += 1;
    }

    options.set_use_stdin(i == len);

    Some((options, i))
}
use std::fmt;
use std::f32::consts::E;

use rand::rngs::SmallRng;

use crate::config::synth::ConfigSynthFilter;

#[derive(Debug)]
pub enum Filter {
    FourPole {
        frequency: f32,
        resonance: f32,
        params: (f32, f32, f32),
        state: [f32; 8],
    },
}

impl Filter {
    pub fn new(config: &ConfigSynthFilter, rng: &mut SmallRng, sample_rate: f32) -> Self {
        match config {
            ConfigSynthFilter::FourPole { frequency, resonance } => {
                let frequency = frequency.get(rng);
                let resonance = resonance.get(rng);

                let f = 2. * frequency / sample_rate;
                let k = 3.6 * f - 1.6 * f * f - 1.;
                let p = (k + 1.) * 0.5;
                let scale = E.powf((1. - p) * 1.386249);
                let r = resonance * scale;

                Filter::FourPole {
                    frequency,
                    resonance,
                    params: (r, p, k),
                    state: [0., 0., 0., 0., 0., 0., 0., 0.],
                }
            },
        }
    }

    pub fn sample(&mut self, sample: f32) -> f32 {
        match self {
            Filter::FourPole { frequency: _, resonance: _, params, state } => {
                let (r, p, k) = params;

                let x = sample - *r * state[3];
                state[0] = x *


sgiSupported = (m_params.stas.at(i).minGi == NanoSeconds(400));
            staNetDevice->SetHtConfiguration(staHtConfiguration);
        }
        if (m_params.stas.at(i).standard >= WIFI_STANDARD_80211ac)
        {
            auto staVhtConfiguration = CreateObject<VhtConfiguration>();
            staVhtConfiguration->m_160MHzSupported =
                (m_params.stas.at(i).maxChannelWidth >= MHz_u{160});
            staNetDevice->SetVhtConfiguration(staVhtConfiguration);
        }
        if (m_params.stas.at(i).standard >= WIFI_STANDARD_80211ax)
        {
            auto staHeConfiguration = CreateObject<HeConfiguration>();
            staHeConfiguration->SetGuardInterval(
                std::max(m_params.stas.at(i).minGi, NanoSeconds(800)));
            staNetDevice->SetHeConfiguration(staHeConfiguration);
        }

        staWifiMac->GetWifiPhy(0)->SetOperatingChannel(
            WifiPhy::ChannelTuple{0, m_params.stas.at(i).maxChannelWidth, WIFI_PHY_BAND_5GHZ, 0});

        staWifiMac->GetWifiPhy(0)->SetNumberOfAntennas(m_params.stas.at(i).maxNumStreams);
        staWifiMac->GetWifiPhy(0)->SetMaxSupportedTxSpatialStreams(
            m_params.stas.at(i).maxNumStreams);
        staWifiMac->GetWifiPhy(0)->SetMaxSupportedRxSpatialStreams(
            m_params.stas.at(i).maxNumStreams);

        auto errorModel = CreateObject<ListErrorModel>();
        m_errorModels.push_back(errorModel);
        staWifiMac->GetWifiPhy(0)->SetPostReceptionErrorModel(errorModel);

        m_phyRxPerSta.push_back(0);
        m_txCtsPerSta.push_back(0);
        m_rxGroupcastPerSta.emplace_back();
        m_rxUnicastPerSta.emplace_back();
    }

    // give packet socket powers to nodes.
    PacketSocketHelper packetSocket;
    packetSocket.Install(wifiStaNodes);
    packetSocket.Install(wifiApNode);

    if (m_params.numGroupcastPackets > 0)
    {
        PacketSocketAddress groupcastSocket;
        groupcastSocket.SetSingleDevice(apDevice.Get(0)->GetIfIndex());
        groupcastSocket.SetPhysicalAddress(
            Mac48Address::GetMulticast(Ipv4Address("239.192.100.1")));
        groupcastSocket.SetProtocol(MULTICAST_PROTOCOL);

        m_groupcastClient = CreateObject<PacketSocketClient>();
        m_groupcastClient->SetAttribute("MaxPackets", UintegerValue(m_params.numGroupcastPackets));
        m_groupcastClient->SetAttribute("PacketSize", UintegerValue(m_params.packetSize));
        m_groupcastClient->SetAttribute("Interval", TimeValue(Seconds(0)));
        m_groupcastClient->SetRemote(groupcastSocket);
        wifiApNode.Get(0)->AddApplication(m_groupcastClient);
        m_groupcastClient->SetStartTime(m_params.startGroupcast);
        m_groupcastClient->SetStopTime(m_params.duration);

        for (uint8_t i = 0; i < numStas; ++i)
        {
            auto groupcastServer = CreateObject<PacketSocketServer>();
            groupcastServer->SetLocal(groupcastSocket);
            wifiStaNodes.Get(i)->AddApplication(groupcastServer);
            groupcastServer->SetStartTime(Seconds(0.0));
            groupcastServer->SetStopTime(m_params.duration);
        }
    }

    if (m_params.numUnicastPackets > 0)
    {
        uint8_t staIndex = 0;
        for (uint8_t i = 0; i < numStas; ++i)


ebePbqr)
CALL(b__MA6vph_646Ybpnyr19trgNinvynoyrYbpnyrfREv)
CALL(strncpy)
CALL(b__MA6vph_6424VPHErfbheprOhaqyrSnpgbelQ2Ri)
CALL(b__MA6vph_6416VPHYbpnyrFreivprQ2Ri)
CALL(b__MAX6vph_646Ybpnyr15trgXrljbeqInyhrRCXpCpvE10HReebePbqr)
CALL(b__MA6vph_6413OernxVgrengbe13ohvyqVafgnaprREXAF_6YbpnyrRCXpE10HReebePbqr)
CALL(b__MA6vph_6428SvygrerqOernxVgrengbeOhvyqre14perngrVafgnaprREXAF_6YbpnyrRE10HReebePbqr)
CALL(b__MAX6vph_6411YbpnyrOnfrq9trgYbpnyrR18HYbpQngnYbpnyrGlcrE10HReebePbqr)
CALL(b__MAX6vph_6411YbpnyrOnfrq11trgYbpnyrVQR18HYbpQngnYbpnyrGlcrE10HReebePbqr)
CALL(b__MA6vph_6411YbpnyrOnfrq12frgYbpnyrVQfREXAF_6YbpnyrRF3_)
CALL(b__MAX6vph_6410VPHFreivpr14pbhagSnpgbevrfRi)
CALL(b__MA6vph_646YbpnyrP1Ri)
CALL(b__MA6vph_6416VPHYbpnyrFreivprP2REXAF_13HavpbqrFgevatR)
CALL(b__MA6vph_6424VPHErfbheprOhaqyrSnpgbelP2Ri)
CALL(b__MA6vph_645Rqvgf10nqqErcynprRvv)
CALL(b__MA6vph_6412OlgrFvaxHgvy12nccraqPunatrRvCXQfvEAF_8OlgrFvaxRCAF_5RqvgfRE10HReebePbqr)
CALL(b__MA6vph_645Rqvgf12nqqHapunatrqRv)
CALL(b__MA6vph_648OlgrFvaxQ2Ri)
CALL(b__MA6vph_6410PuneFgevat15trgNccraqOhssreRvvEvE10HReebePbqr)
CALL(b__MA6vph_649OlgrfGevr10oenapuArkgRCXuvv)
CALL(b__MA6vph_649OlgrfGevr15svaqHavdhrInyhrRCXunEv)
CALL(b__MA6vph_649OlgrfGevr25svaqHavdhrInyhrSebzOenapuRCXuvnEv)
CALL(b__MA6vph_649OlgrfGevr18trgArkgOenapuOlgrfRCXuvEAF_8OlgrFvaxR)
CALL(b__MA6vph_6417FgevatGevrOhvyqreP2Ri)
CALL(b__MA6vph_647HZrzbelqnRCi)
CALL(b__MA6vph_6417FgevatGevrOhvyqreQ2Ri)
CALL(b__MA6vph_647HZrzbelanRz)
CALL(b__MA6vph_6410PuneFgevat6nccraqRpE10HReebePbqr)
CALL(b__MA6vph_6416OlgrfGevrOhvyqre10ohvyqOlgrfR22HFgevatGevrOhvyqBcgvbaE10HReebePbqr)
CALL(b__MA6vph_6417FgevatGevrOh


Robot is limited by Telegram's constraints, such as a **20MB file limit** and **limited analysis capabilities**, TeleInsight provides a more comprehensive and flexible solution.

## Installation

1. Clone the repository:
   ```sh
   git clone https://github.com/esubaalew/teleinsight.git
   ```
2. Navigate to the project directory:
   ```sh
   cd teleinsight
   ```
3. Install dependencies:
   ```sh
   npm install
   ```
4. Run the application:
   ```sh
   npm start
   ```

## Access TeleInsight

Visit [telegram.esube.com.et](https://telegram.esube.com.et) or [telegram.esube.tech](https://telegram.esube.tech) to start analyzing your Telegram chat data.

## License

TeleInsight is open-source software licensed under the [MIT License](LICENSE).

## Contribution

We welcome contributions! Feel free to submit issues or pull requests to improve the tool.

## Contact

For any inquiries, feel free to reach out via our GitHub repository.

---

**Made with ❤ by Esubalew Chekol**

*Inspired by the Telegram bot [@LiyuRobot](https://t.me/liyurobot).*
> 握手协议主要包括：**密钥协商机制**和**密钥交换算法**。基本的密钥协商机制是一样的，只是在不同的步骤交换的内容不一样。
> 握手是为了协商出一个client和server端都认可的一个**对称秘钥**，典型的秘钥协商算法有两种，RSA和ECDH，简明介绍下这两种算法会让你对这个过程更加清晰。
## 0 TLS1.1

### 协议构成
```
enum {
      hello_request(0), client_hello(1), server_hello(2),
      certificate(11), server_key_exchange (12),
      certificate_request(13), server_hello_done(14),
      certificate_verify(15), client_key_exchange(16),
      finished(20), (255)
} HandshakeType;

struct {
      HandshakeType msg_type;    /* handshake type */
      uint24 length;             /* bytes in message */
      select (HandshakeType) {
         case hello_request:       HelloRequest;
         case client_hello:        ClientHello;
         case server_hello:        ServerHello;
         case certificate:         Certificate;
         case server_key_exchange: ServerKeyExchange;
         case certificate_request: CertificateRequest;
         case server_hello_done:   ServerHelloDone;
         case certificate_verify:  CertificateVerify;
         case client_key_exchange: ClientKeyExchange;
         case finished:            Finished;
      } body;
} Handshake;

enum { null(0), (255) } CompressionMethod;
struct {
      ProtocolVersion client_version;
      Random random;
      SessionID session_id;
      CipherSuite cipher_suites<2..2^16-1>;
      CompressionMethod compression_methods<1..2^8-1>;
} ClientHello;

struct {
   ProtocolVersion server_version;
   Random random;
   SessionID session_id;
   CipherSuite cipher_suite;
   CompressionMethod compression_method;
} ServerHello;

struct {
      ASN.1Cert certificate_list<0..2^24-1>;
} Certificate;

struct {
      select (KeyExchangeAlgorithm) {
         case diffie_hellman:
            ServerDHParams params;
            Signature signed_params;
         case rsa:
            ServerRSAParams params;
            Signature signed_params;
      };
} ServerKeyExchange;

struct {
      select (SignatureAlgorithm) {
         case anonymous: struct { };
         case rsa:
            digitally-signed struct {
                  opaque md5_hash[16];
                  opaque sha_hash[20];
            };
         case dsa:
            digitally-signed struct {
                  opaque sha_hash[20];
            };
         };
      };
} Signature;

struct {
      Clien


ZpZXd1bml0ZS5jb21tb24uUHVndlNlYXNvbkRlc2NyaXB0aW9uVHlwZVIEdHlwZUIJCgdj'
    'b250ZW50');

@$core.Deprecated('Use pugvSeasonDescriptionImageDescriptor instead')
const PugvSeasonDescriptionImage$json = {
  '1': 'PugvSeasonDescriptionImage',
  '2': [
    {
      '1': 'images',
      '3': 1,
      '4': 3,
      '5': 11,
      '6': '.bilibili.app.viewunite.common.PugvSeasonDescriptionImageItem',
      '10': 'images'
    },
    {'1': 'folded', '3': 2, '4': 1, '5': 8, '10': 'folded'},
    {'1': 'fold_ratio', '3': 3, '4': 1, '5': 1, '10': 'foldRatio'},
  ],
};

/// Descriptor for `PugvSeasonDescriptionImage`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List pugvSeasonDescriptionImageDescriptor = $convert.base64Decode(
    'ChpQdWd2U2Vhc29uRGVzY3JpcHRpb25JbWFnZRJVCgZpbWFnZXMYASADKAsyPS5iaWxpYmlsaS'
    '5hcHAudmlld3VuaXRlLmNvbW1vbi5QdWd2U2Vhc29uRGVzY3JpcHRpb25JbWFnZUl0ZW1SBmlt'
    'YWdlcxIWCgZmb2xkZWQYAiABKAhSBmZvbGRlZBIdCgpmb2xkX3JhdGlvGAMgASgBUglmb2xkUm'
    'F0aW8=');

@$core.Deprecated('Use pugvSeasonDescriptionImageItemDescriptor instead')
const PugvSeasonDescriptionImageItem$json = {
  '1': 'PugvSeasonDescriptionImageItem',
  '2': [
    {'1': 'image_url', '3': 1, '4': 1, '5': 9, '10': 'imageUrl'},
    {'1': 'aspect_ratio', '3': 2, '4': 1, '5': 1, '10': 'aspectRatio'},
  ],
};

/// Descriptor for `PugvSeasonDescriptionImageItem`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List pugvSeasonDescriptionImageItemDescriptor =
    $convert.base64Decode(
        'Ch5QdWd2U2Vhc29uRGVzY3JpcHRpb25JbWFnZUl0ZW0SGwoJaW1hZ2VfdXJsGAEgASgJUghpbW'
        'FnZVVybBIhCgxhc3BlY3RfcmF0aW8YAiABKAFSC2FzcGVjdFJhdGlv');

@$core.Deprecated('Use pugvSeasonDescriptionTextDescriptor instead')
const PugvSeasonDescriptionText$json = {
  '1': 'PugvSeasonDescriptionText',
  '2': [
    {'1': 'text', '3': 1, '4': 1, '5': 9, '10': 'text'},
  ],
};

/// Descriptor for `PugvSeasonDescriptionText`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List pugvSeasonDescriptionTextDescriptor =
    $convert.base64Decode(
        'ChlQdWd2U2Vhc29uRGVzY3JpcHRpb25UZXh0EhIKBHRleHQYASABKAlSBHRleHQ=');

@$core.Deprecated('Use pugvSeasonNavDescriptor instead')
const PugvSeasonNav$json = {
  '1': 'PugvSeasonNav',
  '2': [
    {'1': 'title', '3': 1, '


ED1,
	17593: 0x6615,
	17594: 0x6B23,
	17595: 0x7098,
	17596: 0x75D5,
	17597: 0x5403,
	17598: 0x5C79,
	17599: 0x7D07,
	17600: 0x8A16,
	17601: 0x6B20,
	17602: 0x6B3D,
	17603: 0x6B46,
	17604: 0x5438,
	17605: 0x6070,
	17606: 0x6D3D,
	17607: 0x7FD5,
	17608: 0x8208,
	17609: 0x50D6,
	17610: 0x51DE,
	17611: 0x559C,
	17612: 0x566B,
	17613: 0x56CD,
	17614: 0x59EC,
	17615: 0x5B09,
	17616: 0x5E0C,
	17617: 0x6199,
	17618: 0x6198,
	17619: 0x6231,
	17620: 0x665E,
	17621: 0x66E6,
	17622: 0x7199,
	17623: 0x71B9,
	17624: 0x71BA,
	17625: 0x72A7,
	17626: 0x79A7,
	17627: 0x7A00,
	17628: 0x7FB2,
	17629: 0x8A70,
}

const numEncodeTables = 7

// encodeX are the encoding tables from Unicode to EUC-KR code,
// sorted by decreasing length.
// encode0: 20893 entries for runes in [19968, 40861).
// encode1: 11172 entries for runes in [44032, 55204).
// encode2:  1625 entries for runes in [ 8213,  9838).
// encode3:   990 entries for runes in [12288, 13278).
// encode4:   945 entries for runes in [  161,  1106).
// encode5:   268 entries for runes in [63744, 64012).
// encode6:   230 entries for runes in [65281, 65511).

const encode0Low, encode0High = 19968, 40861

var encode0 = [...]uint16{
	19968 - 19968: 0xECE9,
	19969 - 19968: 0xEFCB,
	19971 - 19968: 0xF6D2,
	19975 - 19968: 0xD8B2,
	19976 - 19968: 0xEDDB,
	19977 - 19968: 0xDFB2,
	19978 - 19968: 0xDFBE,
	19979 - 19968: 0xF9BB,
	19981 - 19968: 0xDCF4,
	19985 - 19968: 0xF5E4,
	19988 - 19968: 0xF3A6,
	19989 - 19968: 0xDDE0,
	19990 - 19968: 0xE1A6,
	19992 - 19968: 0xCEF8,
	19993 - 19968: 0xDCB0,
	19998 - 19968: 0xE3AA,
	20013 - 19968: 0xF1E9,
	20018 - 19968: 0xCDFA,
	20024 - 19968: 0xFCAF,
	20025 - 19968: 0xD3A1,
	20027 - 19968: 0xF1AB,
	20034 - 19968: 0xE7D1,
	20035 - 19968: 0xD2AC,
	20037 - 19968: 0xCEF9,
	20043 - 19968: 0xF1FD,
	20045 - 19968: 0xDEBF,
	20046 - 19968: 0xFBBA,
	20047 - 19968: 0xF9


     catalogData.setErrorMsg(errorMsg);
                }
            }
            if ((catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end) || catalogData.getStatus().equals(CatalogData.CatalogDataStatus.ready))
                    && catalogData.getTime().isBefore(instantBefore30S)) { // 超过三十秒，如果标记为end则删除
                dataMap.remove(dataKey);
                Set<String> redisKeysForChannel = catalogData.getRedisKeysForChannel();
                if (redisKeysForChannel != null && !redisKeysForChannel.isEmpty()) {
                    for (String deleteKey : redisKeysForChannel) {
                        redisTemplate.opsForHash().delete(key, deleteKey);
                    }
                }
                Set<String> redisKeysForRegion = catalogData.getRedisKeysForRegion();
                if (redisKeysForRegion != null && !redisKeysForRegion.isEmpty()) {
                    for (String deleteKey : redisKeysForRegion) {
                        redisTemplate.opsForHash().delete(key, deleteKey);
                    }
                }
                Set<String> redisKeysForGroup = catalogData.getRedisKeysForGroup();
                if (redisKeysForGroup != null && !redisKeysForGroup.isEmpty()) {
                    for (String deleteKey : redisKeysForGroup) {
                        redisTemplate.opsForHash().delete(key, deleteKey);
                    }
                }
            }
        }
    }

    public void setChannelSyncEnd(String deviceId, int sn, String errorMsg) {
        CatalogData catalogData = dataMap.get(buildMapKey(deviceId,sn));
        if (catalogData == null) {
            return;
        }
        catalogData.setStatus(CatalogData.CatalogDataStatus.end);
        catalogData.setErrorMsg(errorMsg);
        catalogData.setTime(Instant.now());
    }

    public int size(String deviceId, int sn) {
        CatalogData catalogData = dataMap.get(buildMapKey(deviceId,sn));
        if (catalogData == null) {
            return 0;
        }
        return catalogData.getRedisKeysForChannel().size() + catalogData.getErrorChannel().size();
    }

    public int sumNum(String deviceId, int sn) {
        CatalogData catalogData = dataMap.get(buildMapKey(deviceId,sn));
        if (catalogData == null) {
            return 0;
        }
        return catalogData.getTotal();
    }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.dolphinscheduler.api.service;

import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.Environment;
import org.apache.dolphinscheduler.dao.entity.User;

import java.util.Map;

/**
 * environment service
 */
public interface EnvironmentService {

    /**
     * create environment
     *
     * @param loginUser login user
     * @param name environment name
     * @param config environment config
     * @param desc environment desc
     * @param workerGroups worker groups
     */
    Long createEnvironment(User loginUser, String name, String config, String desc, String workerGroups);


const pqueue2 = new PQueuee<string>('test', 4);
    expect(pqueue2).toBeInstanceOf(PQueuee);
    expect(emptypq).toBeInstanceOf(PQueuee);
  });

  const testobj = {
    asd: {
      a: () => console.log('test'),
      b: '123',
    },
  };

  const testdata = [['test', 4], [123, 2], [testobj, 1]];
  const pqueue = new PQueuee<any>();
  testdata.forEach(innerArray => {
    const value = innerArray[0];
    const prio = innerArray[1];
    pqueue.enqueue(value, prio as number);
  });

  const pqueue2 = new PQueuee<string>('test', 4);
  const emptypq = new PQueuee();

  it('is empty', () => {
    expect(pqueue.isEmpty).toBeFalsy();
    expect(emptypq.isEmpty).toBeTruthy();
  });

  it('enqueue', () => {
    pqueue.enqueue([1234], 2);
    pqueue.enqueue('asdasd', 1);
    pqueue2.enqueue('anothertest', 1);
  });

  it('dequeue', () => {
    const next1 = pqueue.dequeue();
    const next2 = pqueue2.dequeue();
    const next3 = emptypq.dequeue();
    expect(next1).toEqual(testobj);
    expect(next2).toBe('anothertest');
    expect(next3).toBeUndefined();
  });

  it('peek', () => {
    expect(pqueue.peek).toBe('asdasd');
    expect(pqueue2.peek).toBe('test');
    expect(emptypq.peek).toBeUndefined();
  });

  it('extras', () => {
    const n1 = pqueue.dequeue();
    const n2 = pqueue.dequeue();
    expect(n1).toBe('asdasd');
    expect(n2).toBe(123);
    expect(pqueue.peek).toEqual([1234]);
  })

});import { createAction } from 'redux-actions'

import Purpose from '~/types/Purpose'

export interface SetPurposes {
  purposes: Purpose[]
}
export const SetPurposes = 'purpose/SET_PURPOSES'

/** やりたいことリストを設定する */
export const setPurposes = createAction<SetPurposes>(SetPurposes)

// ---

/** 切り替える対象の内容 */
export type ToggleSelect = string
export const ToggleSelect = 'purpose/TOGGLE_SELECT'

/** やりたいことの選択状態を切り替える */
export const toggleSelect = createAction<ToggleSelect>(ToggleSelect)
import { Factory, Component, DispatcherInterface, CQI } from '../base'

export class EchoDispatcher extends Component implements DispatcherInterface {
  async start(): Promise<void> {}
  async stop(): Promise<void> {}

  async dispatch(message: string): Promise<boolean> {
    this.cqi.logger.info(`Dispathcer received: ${message}`)
    return true
  }
}

export function register(cqi: CQI) {
  cqi.factory.dispatchers.register('echo', EchoDispatcher)
}
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
import { map } from 'rxjs/operators';
import {ICurrentWeather} from '../icurrent-weather';

//this is another interface to filter out the data from
// the API data on top of of what we get with services
interface ICurrentWeatherData{
  weather: [{
    description: string,
    icon: string,
  }],
  main: {
    temp: number,
  },
  sys: {
    country: string,
  },
  dt: number,
  name: string
}

@Injectable({
  providedIn: 'root'
})
export class WeatherService {

  constructor(private httpClient: HttpClient) { }
 //this is where we get the data
  getCurrentWeather(city: string, country:string) {
    //when we get the data, convert it to the declared version


bably by the browser changing viewport's width value for apparently no good reason
// Also Javascript doens't really understand other units
// `rem` or any other meaningful unit is supported as well

$breakpoint-xsmall: 0 !default;
$breakpoint-small: 512px !default;
$breakpoint-medium: 768px !default;
$breakpoint-large: 1024px !default;
$breakpoint-xlarge: 1216px !default;

/* BREAKPOINTS */

$breakpoints: (
  'xsmall': $breakpoint-xsmall,
  'small': $breakpoint-small,
  'medium': $breakpoint-medium,
  'large': $breakpoint-large,
  'xlarge': $breakpoint-xlarge
) !default;

@include assert-ascending( $breakpoints, '`$breakpoints` values must be defined in ascending order' );

/* EPSILON */

$breakpoint-epsilon: .1 + ( if( is-empty( $breakpoints ), 0px, map-get( $breakpoints, last( map-keys( $breakpoints ) ) ) ) * 0 ) !default; // A value of `.01` for some reasons breaks the iPad Air (iOS 9.2)

//SOURCE: http://davidtheclark.github.io/scut/characters.html

/* SPACES */

$char-space: '\0020' !default; // Space
$char-nbsp: '\00a0' !default; // Non-breaking space

/* QUOTATION MARKS */

$char-quot: '\0022' !default; // Quotation mark
$char-lsquo: '\2018' !default; // Left single curly quote
$char-rsquo: '\2019' !default; // Right single curly quote
$char-ldquo: '\201C' !default; // Left double curly quote
$char-rdquo: '\201D' !default; // Right double curly quote
$char-lsaquo: '\2039' !default; // Left single angle quote (guillemet)
$char-rsaquo: '\203A' !default; // Right single angle quote (guillemet)
$char-laquo: '\00ab' !default; // Left double angle quote (guillemet)
$char-raquo: '\00bb' !default; // Right double angle quote (guillemet)

/* OTHER PUNCTUATION */

$char-mdash: '\2014' !default; // Em dash (mutton)
$char-ndash: '\2013' !default; // En dash (nut)
$char-hyphen: '\2010' !default; // Hyphen
$char-amp: '\0026' !default; // Ampersand
$char-para: '\00b6' !default; // Paragraph symbol (pilcrow)
$char-middot: '\00b7' !default; // Middot (interpunct, interpoint)
$char-bull: '\2022' !default; // Bullet
$char-whibull: '\25E6' !default; // White bullet
$char-hellip: '\2026' !default; // Horizontal ellipsis
$char-vellip: '\22EE' !default; // Vertical ellipsis
$char-midhellip: '\22EF' !default; // Midline horizontal ellipsis

/* VARIOUS SYMBOLS */

$char-gt: '\003e' !default; // Greater than
$char-lt: '\003c' !default; // Less than
$char-times: '\00D7' !default; // Times
$char-bigtimes: '\2715' !default; // Big times
$char-checkmark: '\2713' !default; // Checkmark
$char-sect: '\00a7' !default; // Section sign (double S, hurricane, sectional symbol, the legal doughnut, signum sectionis)
$char-oslash: '\00f8' !default; // O-slash (slashed o)

/* SHAPES */

$char-utri: '\25b2' !default; // Up-pointing triangle
$char-dtri: '\25bc' !default; // Down-pointing triangle
$char-ltri: '\25c0' !default; // Left-


rue)
    const r: string[] = []
    r.push(`Filter: ${this.userFilter}`)
    const a = this.filteredUsers()
    for (const x of a) {
      const childNames = x.children.map(child => child.name)
      r.push(`${x.name}'s children: ${childNames.join(', ')}`)
    }
    return r
  }

  static test(): void {
    // do nothing
  }
}

// Person

/* istanbul ignore next */
export class Person extends ObservableObject {
  @raw dummy: string | null = null
  id: string | null = null
  name: string | null = null
  age: number = 0
  emails: string[] | null = null
  attributes: Map<string, any> = new Map<string, any>()
  get parent(): Person | null { return this._parent } /* istanbul ignore next */
  set parent(value: Person | null) { this.setParent(value) }
  private _parent: Person | null = null
  get children(): ReadonlyArray<Person> { return this._children }
  set children(value: ReadonlyArray<Person>) { this.appendChildren(value) }
  private _children: Person[] = []

  constructor(init?: Partial<Person>) {
    super()
    if (init)
      Object.assign(this, init)
  }

  /* istanbul ignore next */
  setParent(value: Person | null): void {
    if (this._parent !== value) {
      if (this._parent) { // remove from children of old parent
        const children = this._parent._children = this._parent._children.toMutable()
        const i = children.findIndex((x, i) => x === this)
        if (i >= 0)
          children.splice(i, 1)
        else
          throw new Error('invariant is broken, please restart the application')
      }
      if (value) { // add to children of a new parent
        const children = value._children = value._children.toMutable()
        children.push(this)
        this._parent = value
      }
      else
        this._parent = null
    }
  }

  appendChildren(children: ReadonlyArray<Person> | undefined): void {
    if (children)
      for (const x of children)
        x.setParent(this)
  }
}

export const TestsLoggingLevel: LoggingOptions = {
  enabled: process.env.AVA_DEBUG !== undefined,
  transaction: true,
  operation: true,
  step: true,
  monitor: true,
  read: true,
  write: true,
  change: true,
  obsolete: true,
  error: true,
  warning: true,
  gc: true,
  color: 37,
  prefix: '',
  margin1: 0,
  margin2: 0,
}
import * as prompt from 'prompt';

class ConnectFour {
  board: object;
  player: number;
  constructor() {
    this.board = {
      1: [],
      2: [],
      3: [],
      4: [],
      5: [],
      6: [],
      7: [],
    }
    this.player = 1;
  }

  private printBoard(): void {
    const returnSpot = (input: string | undefined): string => {
      return input === undefined ? ' ' : input;
    }
    console.log(
        `
        |${returnSpot(this.board[1][5])}|${returnSpot(this.board[2][5])}|${returnSpot(this.board[3][5])}|${returnSpot(this.board[4][5])}|${returnSpot(this.board[5][5])}|${returnSpot(this.board[6][5])}|${returnSpot(this.board[7][5])}|
        |${returnSpot(this.board[1][4])}|${returnSpot(this.board[2][4])}|${returnSpot(this.board[3][4])}|${returnSpot(this.board[4][4])}|${returnSpot(this.board[5][4])}|${returnSpot(this.board[6][4])}|${returnSpot(this.board[7][4])}|


AAAcni9KAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGDSURBVHjaYvz27dslBgYGXQbSwF2AAGICEm4gBgmangCxC0AAMXFycr4AMYD4GRGaXgOxK1DPA4AAAtnIAGJANb/Fo+kjEHsA1d4AcQACiAkmChS4DpIA4s9YNH0DYh+gmnMwAYAAYkKWBUqcAVJ+QPwDSfgXEAcC5Y4gqwUIIIb///9jYGBI+wLxLyD+A8SB2NQABBAjiMAGvn//Hg1yEdCmxdjkAQIIp0ZCACCAmBjIBAABRLZGgAAiWyNAAJGtESCAyNYIEEBkawQIILI1AgQQ2RoBAohsjQABRLZGgAAiWyNAAOHUCEzksdCEjhUABBCubBUIzVKgrOWLTQ1AADFhsQlUeK0AYmYgZgXiVUAxB3R1AAHEhKbJBkitB2I2JGEOIN4ElDNBVgsQQExImoyA1BYg5sLiI14g3gFUowkTAAggJqgmDZAEEPPjCUhhIN4DVKsA4gAEECPQ8yDGYSCWIbYUB2IbgAACabwDZCiTGI2XAQKI7DIHIIDITjkAAQYA5fGsYZ4feIgAAAAASUVORK5CYII=) no-repeat 0 -20px;height:8px;left:43px;position:absolute;top:-8px;width:14px}.share-sm .wx-code .code-pic{height:86px}.share-sm .wx-code p{color:#191919;font-size:14px;line-height:20px}.subject-other{border:0;margin:25px auto 0;padding-bottom:10px}.subject-other .titleR{padding-top:8px}.subject-other .pic-txt{border-bottom:1px solid #eaeaea;line-height:18px;margin:0 auto;padding:10px 0;width:318px}.subject-other .pic-txt .pic{float:left;height:80px;margin-right:12px;overflow:hidden;width:80px}.subject-other .pic-txt h4{font-size:16px}.subject-other .pic-txt p{padding-top:3px}.subject-other .pic-txt h5{padding:5px 10px 0 0}.subject-other .pic-txt h5 .dot{background:#999;float:left;height:3px;margin:7px 4px 12px 0;overflow:hidden;width:3px}.subject-other .pic-txt:last-child{border:0}.subject-index #main-container{margin:0 auto;position:relative}.subject-index #main-container .main{padding-top:13px;width:640px}.subject-index #main-container .sidebar{width:340px}.subject-index .float-btn{margin-left:505px}.subject-index .area{width:1010px}.tab-wrap{background:#f9f9f9;height:auto;width:300px}.sidebar .tab-wrap .tab-nav{height:31px;margin:15px auto 0}.sidebar .tab-wrap .tab-nav li{cursor:pointer;float:left;font-size:15px;line-


 modified`() {
      makeCollections()

      mockMvc.patch("/api/v1/collections/${colLib1.id}") {
        contentType = MediaType.APPLICATION_JSON
        content = """{"ordered":true}"""
      }

      mockMvc
        .get("/api/v1/collections/${colLib1.id}")
        .andExpect {
          status { isOk() }
          jsonPath("$.name") { value("Lib1") }
          jsonPath("$.ordered") { value(true) }
          jsonPath("$.seriesIds.length()") { value(5) }
        }

      mockMvc.patch("/api/v1/collections/${colLib2.id}") {
        contentType = MediaType.APPLICATION_JSON
        content = """{"name":"newName"}"""
      }

      mockMvc
        .get("/api/v1/collections/${colLib2.id}")
        .andExpect {
          status { isOk() }
          jsonPath("$.name") { value("newName") }
          jsonPath("$.ordered") { value(false) }
          jsonPath("$.seriesIds.length()") { value(5) }
        }

      mockMvc.patch("/api/v1/collections/${colLibBoth.id}") {
        contentType = MediaType.APPLICATION_JSON
        content = """{"seriesIds":["${seriesLibrary1.first().id}"]}"""
      }

      mockMvc
        .get("/api/v1/collections/${colLibBoth.id}")
        .andExpect {
          status { isOk() }
          jsonPath("$.name") { value("Lib1+2") }
          jsonPath("$.ordered") { value(true) }
          jsonPath("$.seriesIds.length()") { value(1) }
        }
    }
  }

  @Nested
  inner class Delete {
    @Test
    @WithMockCustomUser
    fun `given non-admin user when deleting collection then return forbidden`() {
      mockMvc
        .delete("/api/v1/collections/5")
        .andExpect {
          status { isForbidden() }
        }
    }

    @Test
    @WithMockCustomUser(roles = ["ADMIN"])
    fun `given admin user when deleting collection then return no content`() {
      makeCollections()

      mockMvc
        .delete("/api/v1/collections/${colLib1.id}")
        .andExpect {
          status { isNoContent() }
        }

      mockMvc
        .get("/api/v1/collections/${colLib1.id}")
        .andExpect {
          status { isNotFound() }
        }
    }
  }
}
package org.gotson.komga.infrastructure.jooq.tasks

import org.assertj.core.api.Assertions.assertThat
import org.gotson.komga.application.tasks.Task
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest

@SpringBootTest
class TasksDaoTest(
  @Autowired private val tasksDao: TasksDao,
) {
  @AfterEach
  fun cleanup() {
    tasksDao.deleteAll()
    assertThat(tasksDao.count()).isEqualTo(0)
  }

  @Test
  fun `given tasks saved when finding tasks then tasks are found`() {
    // given
    val task1 = Task.AnalyzeBook("book1", 0, "group1")
    val task2 = Task.ConvertBook("book2", 1, "group2")
    val task3 = Task.ScanLibrary("library1", true, 2)

    tasksDao.save(listOf(task1, task2, task3))

    // when
    val tasks = tasksDao.findAll()

    // then
    assertThat(tasks).hasSize(3)
    tasks.sortedBy { it.priority }.let {
      assertThat(it[0])
        .isInstanceOf(Task.AnalyzeBoo


8">	0x883E2D38: 0x02002021 '! ..' - move       $a0, $s0
	0x883E2D3C: 0x27A60040 '@..'' - addiu      $a2, $sp, 0x40
	0x883E2D40: 0x0C00214B 'K!..' - jal        sub_8000852C
	0x883E2D44: 0x0040A021 '!.@.' - move       $s4, $v0
	0x883E2D48: 0x1040000D '..@.' - beqz       $v0, loc_883E2D80
	0x883E2D4C: 0x00408021 '!.@.' - move       $s0, $v0
	0x883E2D50: 0x0C004421 '!D..' - jal        sub_80011084
	0x883E2D54: 0x02802021 '! ..' - move       $a0, $s4
	0x883E2D58: 0x02001821 '!...' - move       $v1, $s0

loc_883E2D5C:
		; Refs: 0x883E2D10 0x883E2D24
	0x883E2D5C: 0x8FBF0064 'd...' - lw         $ra, 0x64($sp)
	0x883E2D60: 0x8FB40060 '`...' - lw         $s4, 0x60($sp)
	0x883E2D64: 0x8FB3005C '\...' - lw         $s3, 0x5C($sp)
	0x883E2D68: 0x8FB20058 'X...' - lw         $s2, 0x58($sp)
	0x883E2D6C: 0x8FB10054 'T...' - lw         $s1, 0x54($sp)
	0x883E2D70: 0x8FB00050 'P...' - lw         $s0, 0x50($sp)
	0x883E2D74: 0x00601021 '!.`.' - move       $v0, $v1
	0x883E2D78: 0x03E00008 '....' - jr         $ra
	0x883E2D7C: 0x27BD0070 'p..'' - addiu      $sp, $sp, 0x70

loc_883E2D80:
		; Refs: 0x883E2D48
	0


	if thing.Fplayer == nil {
		// never open secret doors
		if int32(line.Fflags)&ml_SECRET != 0 {
			return 0
		}
		switch int32(line.Fspecial) {
		case 1: // MANUAL DOOR RAISE
			fallthrough
		case 32: // MANUAL BLUE
			fallthrough
		case 33: // MANUAL RED
			fallthrough
		case 34: // MANUAL YELLOW
		default:
			return 0
			break
		}
	}
	// do something
	switch int32(line.Fspecial) {
	// MANUALS
	case 1: // Vertical Door
		fallthrough
	case 26: // Blue Door/Locked
		fallthrough
	case 27: // Yellow Door /Locked
		fallthrough
	case 28: // Red Door /Locked
		fallthrough
	case 31: // Manual door open
		fallthrough
	case 32: // Blue locked door open
		fallthrough
	case 33: // Red locked door open
		fallthrough
	case 34: // Yellow locked door open
		fallthrough
	case 117: // Blazing door raise
		fallthrough
	case 118: // Blazing door open
		ev_VerticalDoor(line, thing)
		break
		//UNUSED - Door Slide Open&Close
		// case 124:
		// EV_SlidingDoor (line, thing);
		// break;
		// SWITCHES
		fallthrough
	case 7:
		// Build Stairs
		if ev_BuildStairs(line, int32(build8)) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 9:
		// Change Donut
		if ev_DoDonut(line) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 11:
		// Exit level
		p_ChangeSwitchTexture(line, 0)
		g_ExitLevel()
	case 14:
		// Raise Floor 32 and change texture
		if ev_DoPlat(line, int32(raiseAndChange), 32) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 15:
		// Raise Floor 24 and change texture
		if ev_DoPlat(line, int32(raiseAndChange), 24) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 18:
		// Raise Floor to next highest floor
		if ev_DoFloor(line, int32(raiseFloorToNearest)) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 20:
		// Raise Plat next highest floor and change texture
		if ev_DoPlat(line, int32(raiseToNearestAndChange), 0) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 21:
		// PlatDownWaitUpStay
		if ev_DoPlat(line, int32(downWaitUpStay), 0) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 23:
		// Lower Floor to Lowest
		if ev_DoFloor(line, int32(lowerFloorToLowest)) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 29:
		// Raise Door
		if ev_DoDoor(line, int32(vld_normal)) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 41:
		// Lower Ceiling to Floor
		if ev_DoCeiling(line, int32(lowerToFloor)) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 71:
		// Turbo Lower Floor
		if ev_DoFloor(line, int32(turboLower)) != 0 {
			p_ChangeSwitchTexture(line, 0)
		}
	case 49:
		// Ceiling Crush And Raise
		if ev_DoCeiling(line, int32(cr


, 8
/* 801E8E04 001E4A64  90 07 00 00 */	stw r0, 0(r7)
/* 801E8E08 001E4A68  88 E3 00 1F */	lbz r7, 0x1f(r3)
/* 801E8E0C 001E4A6C  38 07 00 01 */	addi r0, r7, 1
/* 801E8E10 001E4A70  98 03 00 1F */	stb r0, 0x1f(r3)
lbl_801E8E14:
/* 801E8E14 001E4A74  89 03 00 1F */	lbz r8, 0x1f(r3)
/* 801E8E18 001E4A78  81 6D A3 D8 */	lwz r11, render_context_ptr-_SDA_BASE_(r13)
/* 801E8E1C 001E4A7C  1C E8 00 24 */	mulli r7, r8, 0x24
/* 801E8E20 001E4A80  80 0B 16 38 */	lwz r0, 0x1638(r11)
/* 801E8E24 001E4A84  7C E0 3A 14 */	add r7, r0, r7
/* 801E8E28 001E4A88  80 07 07 F4 */	lwz r0, 0x7f4(r7)
/* 801E8E2C 001E4A8C  2C 00 00 07 */	cmpwi r0, 7
/* 801E8E30 001E4A90  41 82 00 0C */	beq lbl_801E8E3C
/* 801E8E34 001E4A94  38 00 00 00 */	li r0, 0
/* 801E8E38 001E4A98  90 07 07 F4 */	stw r0, 0x7f4(r7)
lbl_801E8E3C:
/* 801E8E3C 001E4A9C  81 2B 16 38 */	lwz r9, 0x1638(r11)
/* 801E8E40 001E4AA0  38 00 00 01 */	li r0, 1
/* 801E8E44 001E4AA4  7C 07 40 30 */	slw r7, r0, r8
/* 801E8E48 001E4AA8  39 40 00 00 */	li r10, 0
/* 801E8E4C 001E4AAC  81 09 00 40 */	lwz r8, 0x40(r9)
/* 801E8E50 001E4AB0  28 06 00 FF */	cmplwi r6, 0xff
/* 801E8E54 001E4AB4  7D 07 3B 78 */	or r7, r8, r7
/* 801E8E58 001E4AB8  90 E9 00 40 */	stw r7, 0x40(r9)
/* 801E8E5C 001E4ABC  81 0B 16 38 */	lwz r8, 0x1638(r11)
/* 801E8E60 001E4AC0  80 E8 00 00 */	lwz r7, 0(r8)
/* 801E8E64 001E4AC4  60 E7 00 08 */	ori r7, r7, 8
/* 801E8E68 001E4AC8  90 E8 00 00 */	stw r7, 0(r8)
/* 801E8E6C 001E4ACC  81 6D A3 D8 */	lwz r11, render_context_ptr-_SDA_BASE_(r13)
/* 801E8E70 001E4AD0  88 E3 00 1F */	lbz r7, 0x1f(r3)
/* 801E8E74 001E4AD4  81 2B 16 38 */	lwz r9, 0x1638(r11)
/* 801E8E78 001E4AD8  54 E8 18 38 */	slw


_nanos = num
                    .checked_mul(1000 * 60 * 60 * 24 * 365 * MULTIPLIER)
                    .and_then(|n| total_nanos.checked_add(n))
                    .ok_or(Error::InvalidTimeDuration)?;
                Unit::Years
            }
            'w' => {
                total_nanos = num
                    .checked_mul(1000 * 60 * 60 * 24 * 7 * MULTIPLIER)
                    .and_then(|n| total_nanos.checked_add(n))
                    .ok_or(Error::InvalidTimeDuration)?;
                Unit::Weeks
            }
            'd' => {
                total_nanos = num
                    .checked_mul(1000 * 60 * 60 * 24 * MULTIPLIER)
                    .and_then(|n| total_nanos.checked_add(n))
                    .ok_or(Error::InvalidTimeDuration)?;
                Unit::Days
            }
            'h' => {
                total_nanos = num
                    .checked_mul(1000 * 60 * 60 * MULTIPLIER)
                    .and_then(|n| total_nanos.checked_add(n))
                    .ok_or(Error::InvalidTimeDuration)?;
                Unit::Hours
            }
            'm' => {
                if duration_iter.next_if_eq(&'s').is_some() {
                    total_nanos = num
                        .checked_mul(1000 * 60 * 60 * MULTIPLIER)
                        .and_then(|n| total_nanos.checked_add(n))
                        .ok_or(Error::InvalidTimeDuration)?;
                    Unit::Milliseconds
                } else {
                    total_nanos = num
                        .checked_mul(1000 * 60 * MULTIPLIER)
                        .and_then(|n| total_nanos.checked_add(n))
                        .ok_or(Error::InvalidTimeDuration)?;
                    Unit::Minutes
                }
            }
            's' => {
                total_nanos = num
                    .checked_mul(1000 * MULTIPLIER)
                    .and_then(|n| total_nanos.checked_add(n))
                    .ok_or(Error::InvalidTimeDuration)?;
                Unit::Seconds
            }
            _ => return Err(Error::InvalidTimeDuration),
        };

        raw_num.clear();

        // Check for duplicates and ordering.
        if matches!(last_unit, Some(x) if x <= unit) {
            return Err(Error::InvalidTimeDuration);
        } else {
            last_unit = Some(unit);
        }
    }

    // When the whole duration string has been iterated over this "buffer"
    // should be empty, i.e. no number should be left that is not followed
    // by a unit.
    if !raw_num.is_empty() {
        return Err(Error::InvalidTimeDuration);
    }

    if total_nanos < 0 {
        return Err(Error::InvalidTimeDuration);
    }

    Ok(())
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_validate_duration() {
        // Large duration, but still in range.
        let input = "292y";
        assert!(validate_duration(input, false).is_ok());

        // Large duration, but still in range.
        let input = "9223372036s";
        assert!(validate_duration(input, false).is_ok());

        // Out of range (greater than i64::MAX when converted to ns).
        let input = "293y";
        assert!(validate_duration(input, false).is_err());

        // Out of range (greater than i64::MAX when converted to ns).
        let input = "9223372037s";
        assert!(validate_duration(input, false).is_err());

        // Normal range with multiple units and in proper order.
        let input = "2y5m30s";
        assert!(validate_duration(input, false).is_ok());

        // No


8, SPRN_TBRU
	cmpw	r8, r6
	stw	r9, VCPU_TIMING_LAST_ENTER_TBL(r4)
	bne	1b
	stw	r8, VCPU_TIMING_LAST_ENTER_TBU(r4)
#endif

	/*
	 * Don't execute any instruction which can change CR after
	 * below instruction.
	 */
	mtcr	r7

	/* Finish loading g


) 0%, rgba(0, 0, 0, 0.8) 100%);
  /* IE10+ */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
  /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#b3000000', GradientType=0);
  /* IE6-9 */
}
@media (max-width: 1018px) {
  .td-image-gradient:before {
    height: 100%;
  }
}
/*  ----------------------------------------------------------------------------
    Default Post Template
*/
.td-post-content p:empty {
  display: none;
}
.td-post-featured-image {
  position: relative;
}
.td-post-featured-image img {
  display: block;
  margin-bottom: 26px;
  width: 100%;
}
.td-post-featured-image .wp-caption-text {
  margin-bottom: 26px;
  z-index: 1;
}
.td-post-content {
  margin-top: 21px;
  padding-bottom: 16px;
  /* responsive portrait phone */
}
@media (max-width: 767px) {
  .td-post-content {
    margin-top: 16px;
  }
}
.td-post-content p {
  word-wrap: break-word;
}
.td-post-content img {
  display: block;
}
.td-post-content table {
  margin-bottom: 21px;
}
.td-post-content .td-gallery {
  clear: both;
}
.td-post-content .fb-video {
  margin-bottom: 26px;
}
.td-post-content #fb-root + p {
  margin: 0;
}
.td-post-template-default .td-post-title .td-post-comments {
  margin-left: 22px;
}
.td-post-template-default .td-post-title div.td-post-views {
  margin-right: 0;
}
@media (max-width: 1018px) {
  .td-post-template-default .td-post-header header .entry-title {
    font-size: 32px;
    line-height: 36px;
  }
}
.td-post-template-default .td-post-featured-image img {
  width: auto;
}
/*  ----------------------------------------------------------------------------
    Template 1
*/
.td-post-template-1 {
  /* Video */
}
.td-post-template-1 .td-post-header .entry-title {
  font-size: 38px;
  line-height: 44px;
}
@media (max-width: 1018px) {
  .td-post-template-1 .td-post-header header .entry-title {
    font-size: 32px;
    line-height: 36px;
  }
}
.td-post-template-1 .td-featured-image-rec {
  float: left;
  width: 300px;
  margin-right: 21px;
  /* responsive portrait phone */
  /* responsive portrait phone */
}
@media (max-width: 767px) {
  .td-post-template-1 .td-featured-image-rec {
    width: auto;
    margin-right: 15px;
  }
}
@media (max-width: 500px) {
  .td-post-template-1 .td-featured-image-rec {
    width: 100%;
    margin-right: 0;
  }
}
.td-post-template-1 .td-featured-image-rec img,
.td-post-template-1 .td-featured-image-rec .wpb_video_wrapper {
  margin-bottom: 21px;
}
.td-post-template-1 .td-pb-span8 .td-featured-image-rec {
  /* responsive


) {
    if (t == null)
        return;
    wtreeitem x;
    // Το πρώτο στοιχείο είναι null
    if (e == null)
        x = wt.add(t);
    else
        x = wt.add(e, t);
    if (t.childnode() != null)
        traversetree(t.childnode(), wt, x);
    traversetree(t.nextnode(), wt, e);
}

window w;
wtree mytree;
w.begin(40, 40, 1000, 900, "Εμφάνιση δέντρου");
mytree.create(20, 20, 950, 850, "το δέντρο μου");
// Η ρίζα του δέντρου γίνεται η ρίζα της αναπαράστασής της
mytree.rootlabel(atree);
// Διατρέχουμε το δέντρο μας για να κατασκευάσουμε την αναπαράσταση από αυτό...
traversetree(atree.childnode(), mytree, null);
w.end();
w.run();
```# Τύπος Κλήσης

Αυτό το αντικείμενο χρησιμοποιείται για να καταγράφει συναρτήσεις, οι οποίες μπορούν στη συνέχεια να εκτελεστούν. Η κλήση γίνεται χρησιμοποιώντας το όνομα της μεταβλητής ως συνάρτηση.

## Παράδειγμα

```c++
int display(int e) {
    print("DISPLAY:", e, "\n");
    e += 10;
    return e;
}

int myfunc;
myfunc = display;
int i = myfunc(100);   // display: DISPLAY:100
print("I=", i, "\n");   // display: I=110
```

Στο παραπάνω παράδειγμα, η συνάρτηση `display` παίρνει έναν ακέραιο παράμετρο `e`, εκτυπώνει "DISPLAY:" ακολουθούμενο από την τιμή του `e`, αυξάνει το `e` κατά 10 και επιστρέφει την ενημερωμένη τιμή του `e`. Η μεταβλητή `myfunc` αντιστοιχείται στη συνάρτηση `display`. Τέλος, η μεταβλητή `myfunc` καλείται με το όρισμα `100` και το αποτέλεσμα αποθηκεύεται στη μεταβλητή `i`. Το αποτέλεσμα θα είναι "DISPLAY:100" και "I=110".## Συσκευασίες Διανύσματος και Πίνακας Tamgu

### Συσκευασίες Διανύσματος
Το Tamgu παρέχει εξειδικευμένες συσκευασίες διανύσματος για διάφορους τύπους δεδομένων. Αυτές οι συσκευασίες είναι αποδοτικές όσον αφορά την κατανάλωση μνήμης και παρέχουν γρήγορη πρόσβαση στα στοιχεία. Οι διαθέσιμοι τύποι διανυσμάτων είναι οι εξής:

- **bvector**: Ένα διάνυσμα για bytes.
- **ivector**: Ένα διάνυσμα για ακέραιους αριθμούς.
-


ss C1
{
    public Vector512<short> F4;
}

public class C2
{
    public Vector128<sbyte> F6;
}

public class Runtime_114978
{
    public static IRuntime s_rt;

	[Fact]
    public static void Problem()
    {
		if (Avx512BW.VL.IsSupported)
		{
			s_rt = new Runtime();
			var vr14 = new C1();
			var vr16 = new C1();
			var vr17 = (byte)0;
			var vr18 = Vector512.CreateScalar(vr17);
			var vr19 = new C2();
			var vr20 = new C0();
			var vr21 = M10(vr14, vr18, vr19, vr20);
			s_rt.AssertEqual(Vector512<byte>.AllBitsSet, vr21);
			var vr22 = new C2();
			var vr23 = new C0();
			var vr24 = M10(vr16, vr21, vr22, vr23);
			s_rt.AssertEqual(Vector512<byte>.AllBitsSet, vr24);
		}
    }

    public static Vector512<byte> M10(C1 argThis, Vector512<byte> arg0, C2 arg1, C0 arg2)
    {
        var vr3 = arg1.F6;
        var vr6 = arg1.F6;
        var vr0 = Avx512BW.VL.CompareLessThanOrEqual(vr3, vr6);
        var vr10 = (sbyte)1;
        var vr9 = Vector128.CreateScalar(vr10);
        if (Sse41.TestZ(vr0, vr9))
        {
            s_rt.AssertEqual(Vector512<short>.Zero, argThis.F4);
        }

        return Avx512BW.CompareEqual(arg0, arg0);
    }
}

public interface IRuntime
{
    void AssertEqual<T>(Vector512<T> value1, Vector512<T> value2);
}

public class Runtime : IRuntime
{
    public void AssertEqual<T>(Vector512<T> value1, Vector512<T> value2)
        => Assert.Equal(value1, value2);
}


             SizedBox(
                          height: 50,
                        ),
                        Container(
                          height: _media.height / 6,
                          decoration: BoxDecoration(
                            gradient: SIGNUP_CARD_BACKGROUND,
                            borderRadius: BorderRadius.circular(15),
                            boxShadow: [
                              BoxShadow(
                                color: Colors.black12,
                                blurRadius: 15,
                                spreadRadius: 8,
                              ),
                            ],
                          ),
                          child: Padding(
                            padding: const EdgeInsets.all(30.0),
                            child: Column(
                              children: <Widget>[
                                showLoginCode
                                    ? Container(
                                        height: 0,
                                      )
                                    : Expanded(
                                        child: inputText(
                                            "手机号", '', _username, false),
                                      ),
                                showLoginCode
                                    ? Expanded(
                                        child: inputText(
                                            "验证码", '', _password, true))
                                    : Container(
                                        height: 0,
                                      ),
                              ],
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      Text(
                        "没有账号？",
                        style: TextStyle(color: Color(0xFF303030)),
                      ),
                      SizedBox(
                        width: 5,
                      ),
                      GestureDetector(
                        onTap: () => this.setState(() {
                          print(tosign);
                          tosign = true;
                        }),
                        child: Text("注册"),
                      ),
                    ],
                  ),
                  SizedBox(
                    height: 50,
                  )
                ],
              ),
              Positioned(
                bottom: _media.height / 6.3,
                right: 15,
                child: SignUpArrowButton(
                  icon: IconData(0xe901, fontFamily: 'Icons'),
                  iconSize: 9,
                  onTap: () async {
                    if (!showLoginCode) {
                      if (_username.text.isNotEmpty) {
                        this.setState(() {
                          isLoading = true;
                        });
                        phone=_username.text.toString();
                        await verifyPhoneNumber();
                        this.setState(() {
                          showLoginCode = true;
                          isLoading = false;
                        });
                      } else {
                        Enigma.toast("手机号不能为空");
                      }
                    } else {
                      if (_password.text.length == 6) {
                        handleSignIn();
                      } else {
                        Enigma.toast("x`验证码不能为空");
                      }
                    }
                  },
                ),
              ),
              isLoading
                  ? SpinKitCubeGrid(
                color: Colors.white,
                size: 50.0,
              )
                  : SizedBox(
                height: 0,
              )
            ],
          ),
        ),
      ),
    );
    //构建注册界面
    var sign = Scaffold(
      appBar: SignupApbar(
        title: "创建帐户",
        tap: () => this.setState(() => tosign = false),
      ),
      body: SingleChildScrollView(
        physics: BouncingScrollPhysics(),
        child: Stack(


/*============================================================================

The Medical Imaging Interaction Toolkit (MITK)

Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.

Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.

============================================================================*/

#ifndef BERRYPLATFORMPROPERTYTESTER_H
#define BERRYPLATFORMPROPERTYTESTER_H

#include <berryPropertyTester.h>

#include <ctkPlugin.h>

namespace berry {

/**
 * A property tester for testing platform properties. Can test whether or
 * not a given plugin is installed in the running environment, as well as
 * the id of the currently active product.
 *

 * For example:

 * <test property="org.blueberry.core.runtime.product" value="org.mitk.qt.Workbench"/>

 * <test property="org.blueberry.core.runtime.isPluginInstalled" args="org.blueberry.core.expressions"/>

 * <test property="org.blueberry.core.runtime.pluginState" args="org.blueberry.core.expressions" value="ACTIVE"/>
 *

 */
class PlatformPropertyTester : public PropertyTester
{
  Q_OBJECT
private:

  static const QString PROPERTY_PRODUCT; // = "product";
  static const QString PROPERTY_IS_PLUGIN_INSTALLED; // = "isPluginInstalled";
  static const QString PROPERTY_PLUGIN_STATE; // = "pluginState";

public:

  bool Test(Object::ConstPointer receiver, const QString& property,
            const QList<Object::Pointer>& args, Object::Pointer expectedValue) override;

private:

  bool PluginState(ctkPlugin::State pluginState, const QString &expectedValue);

};

}

#endif // BERRYPLATFORMPROPERTYTESTER_H


C), Action::BrXX(&WG)],
    t8: &[Action::BrXX(&RZ), Action::BrXX(&WS), Action::BrXX(&ST2)],
    t9: &[],
    t10: &[],
    t11: &[],
    t12: &[],
};

pub static XCH0: Subinstruction = Subinstruction {
    name: "XCH0",
    t1: &[Action::BrXX(&RL10BB), Action::BrXX(&WS)],
    t2: &[Action::BrXX(&RSC), Action::BrXX(&WG)],
    t3: &[Action::BrXX(&RA), Action::BrXX(&WB)],
    t4: &[],
    t5: &[Action::BrXX(&RG), Action::BrXX(&WA)],
    t6: &[],
    t7: &[Action::BrXX(&RB), Action::BrXX(&WSC), Action::BrXX(&WG)],
    t8: &[Action::BrXX(&RZ), Action::BrXX(&WS), Action::BrXX(&ST2)],
    t9: &[],
    t10: &[],
    t11: &[],
    t12: &[],
};

pub static WRITE0: Subinstruction = Subinstruction {
    name: "WRITE0",
    t1: &[Action::BrXX(&RL10BB), Action::BrXX(&WS)],
    t2: &[Action::BrXX(&RA), Action::BrXX(&WB), Action::BrXX(&WG)],
    t3: &[Action::BrXX(&WY)],
    t4: &[Action::BrXX(&RCH), Action::BrXX(&WB)],
    t5: &[Action::BrXX(&RA), Action::BrXX(&WCH)],
    t6: &[Action::BrXX(&RA), Action::BrXX(&WB)],
    t7: &[],
    t8: &[Action::BrXX(&RZ), Action::BrXX(&WS), Action::BrXX(&ST2)],
    t9: &[],
    t10: &[],
    t11: &[],
    t12: &[],
};
use crate::{mutaction::MutationBuilder, Transaction};
use connector::{filter::NodeSelector, ConnectorResult};
use prisma_models::{GraphqlId, ModelRef, PrismaArgs, PrismaListValue, RelationFieldRef};
use std::sync::Arc;

/// Updates one record and any associated list record in the database.
pub fn execute<S>(
    conn: &mut Transaction,
    node_selector: &NodeSelector,
    non_list_args: &PrismaArgs,
    list_args: &[(S, PrismaListValue)],
) -> ConnectorResult<GraphqlId>
where
    S: AsRef<str>,
{
    let model = node_selector.field.model();
    let id = conn.find_id(node_selector)?;

    if let Some(update) = MutationBuilder::update_one(Arc::clone(&model), &id, non_list_args)? {
        conn.update(update)?;
    }

    update_list_args(conn, &[id.clone()], Arc::clone(&model), list_args)?;

    Ok(id)
}

/// Updates a nested item related to the parent, including any associated
/// list values.
pub fn execute_nested<S>(
    conn: &mut Transaction,
    parent_id: &GraphqlId,
    node_selector: &Option<NodeSelector>,
    relation_field: RelationFieldRef,
    non_list_args: &PrismaArgs,
    list_args: &[(S, PrismaListValue)],
) -> ConnectorResult<GraphqlId>
where
    S: AsRef<str>,
{
    if let Some(ref node_selector) = node_selector {
        conn.find


      try {
        const result = await callback(beacon, this)
        resolve(result)
      } catch (ex) {
        reject(ex)
      } finally {
        clearInterval(timer)
      }
    })
  }
}

export function setKeepalive(cb: KeepaliveCallback, options?: Partial<Keepalive>|number): Promise<any> {
  const opts = options instanceof Object ? options : { timeout: options }
  const keepalive = new Keepalive(opts)
  return keepalive.watch(cb)
}

// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import {
  ArrayExt, IIterator, iter
} from '@phosphor/algorithm';

import {
  JSONExt
} from '@phosphor/coreutils';

import {
  ISignal, Signal
} from '@phosphor/signaling';

import {
  ServerConnection
} from '..';

import {
  Kernel
} from './kernel';

/**
 * An implementation of a kernel manager.
 */
export
class KernelManager implements Kernel.IManager {
  /**
   * Construct a new kernel manager.
   *
   * @param options - The default options for kernel.
   */
  constructor(options: KernelManager.IOptions = {}) {
    this.serverSettings = (
      options.serverSettings || ServerConnection.makeSettings()
    );

    // Initialize internal data.
    this._readyPromise = this._refreshSpecs().then(() => {
      return this._refreshRunning();
    });

    // Set up polling.
    this._runningTimer = (setInterval as any)(() => {
      this._refreshRunning();
    }, 10000);
    this._specsTimer = (setInterval as any)(() => {
      this._refreshSpecs();
    }, 61000);
  }

  /**
   * A signal emitted when the specs change.
   */
  get specsChanged(): ISignal<this, Kernel.ISpecModels> {
    return this._specsChanged;
  }

  /**
   * A signal emitted when the running kernels change.
   */
  get runningChanged(): ISignal<this, Kernel.IModel[]> {
    return this._runningChanged;
  }

  /**
   * Test whether the terminal manager is disposed.
   */
  get isDisposed(): boolean {
    return this._isDisposed;
  }

  /**
   * Dispose of the resources used by the manager.
   */
  dispose(): void {
    if (this.isDisposed) {
      return;
    }
    this._isDisposed = true;
    clearInterval(this._runningTimer);
    clearInterval(this._specsTimer);
    Signal.clearData(this);
    this._running = [];
  }

  /**
   * The server settings for the manager.
   */
  readonly serverSettings: ServerConnection.ISettings;

  /**
   * Get the most recently fetched kernel specs.
   */
  get specs(): Kernel.ISpecModels | null {
    return this._specs;
  }

  /**
   * Test whether the manager is ready.
   */
  get isReady(): boolean {
    return this._isReady;
  }

  /**
   * A promise that fulfills when the manager is ready.
   */
  get ready(): Promise<void> {
    return this._readyPromise;
  }

  /**
   * Create an iterator over the most recent running kernels.
   *
   * @returns A new iterator over the running kernels.
   */
  running(): IIterator<Kernel.IModel> {
    return iter(this._running);
  }

  /**
   * Force a refresh of the specs from the server.
   *
   * @returns A promise that resolves when the specs are fetched.
   *
   * #### Notes
   * This is intended to be called only in response to a user action,
   * since the manager maintains its internal state.
   */
  refreshSpecs(): Promise<void> {
    retu


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

package com.fleeksoft.charset.cs.utf

import com.fleeksoft.charset.Charset
import com.fleeksoft.charset.CharsetDecoder
import com.fleeksoft.charset.CharsetEncoder
import com.fleeksoft.charset.CoderResult
import com.fleeksoft.charset.internal.CoderResultInternal
import com.fleeksoft.io.ByteBuffer
import com.fleeksoft.io.CharBuffer
import com.fleeksoft.io.getInt
import com.fleeksoft.lang.Character

object UTF_32Coder {
    internal const val BOM_BIG: Int = 0xFEFF
    internal const val BOM_LITTLE: Int = -0x20000
    internal const val NONE: Int = 0
    internal const val BIG: Int = 1
    internal const val LITTLE: Int = 2

    open class Decoder(cs: Charset, private val expectedBO: Int) : CharsetDecoder(cs, 0.25f, 1.0f) {
        private var currentBO: Int

        init {
            this.currentBO = NONE
        }

        private fun getCP(src: ByteBuffer): Int {
            return if (currentBO == BIG)
                (((src.getInt() and 0xff) shl 24) or
                        ((src.getInt() and 0xff) shl 16) or
                        ((src.getInt() and 0xff) shl 8) or
                        (src.getInt() and 0xff))
            else
                ((src.getInt() and 0xff) or
                        ((src.getInt() and 0xff) shl 8) or
                        ((src.getInt() and 0xff) shl 16) or
                        ((src.getInt() and 0xff) shl 24))
        }

        override fun decodeLoop(src: ByteBuffer, dst: CharBuffer): CoderResult {
            if (src.remaining() < 4) return CoderResultInternal.UNDERFLOW
            var mark: Int = src.position()
            var cp: Int
            try {
                if (currentBO == NONE) {
                    cp = ((src.getInt() and 0xff) shl 24) or
                            ((src.getInt() and 0xff) shl 16) or
                            ((src.getInt() and 0xff) shl 8) or
                            (src.getInt() and 0xff)
                    if (cp == BOM_BIG && expectedBO != LITTLE) {
                        currentBO = BIG
                        mark += 4
                    } else if (cp == BOM_LITTLE && expectedBO != BIG) {
                        currentBO = LITTLE
                        mark += 4
                    } else {
                        if (expectedBO == NONE) currentBO = BIG
                        else currentBO = exp


CodeGroup>
<CodeGroupItem title="PNPM">

```bash:no-line-numbers
pnpm add @akrc/nashi
```

  </CodeGroupItem>

  <CodeGroupItem title="YARN">

```bash:no-line-numbers
yarn add @akrc/nashi
```

  </CodeGroupItem>
  <CodeGroupItem title="NPM">

```bash:no-line-numbers
npm install @akrc/nashi
```

  </CodeGroupItem>

</CodeGroup>

然后使用下面的代码来导入 nashi：

```ts
import nashi from '@akrc/nashi';
```

如果你没有使用打包器，你可以考虑从 [jsDelivr](https://esm.run/@akrc/nashi) 或 [esm.sh](https://esm.sh/@akrc/nashi) 这样的 CDN 来导入:

```html
<script type="module">
    import nashi from 'https://esm.sh/@akrc/nashi';
</script>
```

## IIFE

只需要在 HTML 里添加如下标签。

```html
<script src="https://unpkg.com/@akrc/nashi@latest/dist/legacy.js"></script>
```

IIFE 版本的 Nashi 支持 ES5，所以打包大小是其他版本的三倍，因此如果有条件，应尽量使用 ESM。

## CJS

首先，先用包管理器下载 Nashi：

<CodeGroup>
  <CodeGroupItem title="PNPM">

```bash:no-line-numbers
pnpm add @akrc/nashi
```

  </CodeGroupItem>

  <CodeGroupItem title="YARN">

```bash:no-line-numbers
yarn add @akrc/nashi
```

  </CodeGroupItem>
  <CodeGroupItem title="NPM">

```bash:no-line-numbers
npm install @akrc/nashi
```

  </CodeGroupItem>

</CodeGroup>

然后，把 nashi 作为 commonjs 模块导入：

```ts
const nashi = require('@akrc/nashi');
```
JFreeChart - Future State Edition (FSE)
=======================================

This is a development version of JFreeChart that has been branched from the
JFreeChart 1.0.x series.  Here are some important notes:

-  the API has been changed and will continue to change until I (and the other
   contributors) feel it is ready to be frozen - that may be in 6 months, or
   it may be in 6 years;

-  this code is going to require AT LEAST JDK 1.6.0 to compile and, depending
   on how I (and the other contributors) feel, in the future we may even
   require JDK 1.7 or even a later version;

-  Maven is used to build this edition of JFreeChart;

-  JCommon is no longer a dependency (the subset of classes from JCommon that
   are still used have been incorporated directly in the source tree);

The aim is to modernise the JFreeChart API and code and have some fun with new
stuff and NOT to be constrained by backwards compatibility.

David Gilbert (david.gilbert@object-refinery.com)
JFreeChart Project Leader

[![Build Status](https://buildhive.cloudbees.com/job/jfree/job/jfreechart-fse/badge/icon)](https://buildhive.cloudbees.com/job/jfree/job/jfreechart-fse/)

# TinySleepNet

An efficient deep learning model for sleep stage scoring based on raw, single-channel EEG. This work is an extension of our previous work, DeepSleepNet [[paper](http://ieeexplore.ieee.org/document/7961240/)][[github](https://github.com/akaraspt/deepsleepnet)].

Code for the model in the paper *TinySleepNet: An Efficient Deep Learning Model for Sleep Stage Scoring based on Raw Single-Channel EEG by Akara Supratak and Yike Guo from The Faculty of ICT, Mahidol University and Imperial College London respectively*.

This work has been accepted for publication in [2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC)](https://ieeexplore.ieee.org/document/9176741).

This work has been used as a baseline for qu


IRON_HELMET = "iron_helmet",
			IRON_CHESTPLATE = "iron_chestplate",
			IRON_LEGGINGS = "iron_leggings",
			IRON_BOOTS = "iron_boots",
			CHAINMAIL_HELMET = "chainmail_helmet",
			CHAINMAIL_CHESTPLATE = "chainmail_chestplate",
			CHAINMAIL_LEGGINGS = "chainmail_leggings",
			CHAINMAIL_BOOTS = "chainmail_boots",
			GOLDEN_HELMET = "golden_helmet",
			GOLDEN_CHESTPLATE = "golden_chestplate",
			GOLDEN_LEGGINGS = "golden_leggings",
			GOLDEN_BOOTS = "golden_boots",
			DIAMOND_HELMET = "diamond_helmet",
			DIAMOND_CHESTPLATE = "diamond_chestplate",
			DIAMOND_LEGGINGS = "diamond_leggings",
			DIAMOND_BOOTS = "diamond_boots",
			WOODEN_SWORD = "wooden_sword",
			STONE_SWORD = "stone_sword",
			IRON_SWORD = "iron_sword",
			GOLDEN_SWORD = "golden_sword",
			DIAMOND_SWORD = "diamond_sword",
			WOODEN_PICKAXE = "wooden_pickaxe",
			STONE_PICKAXE = "stone_pickaxe",
			IRON_PICKAXE = "iron_pickaxe",
			GOLDEN_PICKAXE = "golden_pickaxe",
			DIAMOND_PICKAXE = "diamond_pickaxe",
			WOODEN_AXE = "wooden_axe",
			STONE_AXE = "stone_axe",
			IRON_AXE = "iron_axe",
			GOLDEN_AXE = "golden_axe",
			DIAMOND_AXE = "diamond_axe",
			WOODEN_SHOVEL = "wooden_shovel",
			STONE_SHOVEL = "stone_shovel",
			IRON_SHOVEL = "iron_shovel",
			GOLDEN_SHOVEL = "golden_shovel",
			DIAMOND_SHOVEL = "diamond_shovel",
			WOODEN_HOE = "wooden_hoe",
			STONE_HOE = "stone_hoe",
			IRON_HOE = "iron_hoe",
			GOLDEN_HOE = "golden_hoe",
			DIAMOND_HOE = "diamond_hoe",
			CARROT_ON_A_STICK = "carrot_on_a_stick",
			FISHING_ROD = "fishing_rod",
			FLINT_AND_STEEL = "flint_and_steel",
			SHEARS = "shears",
			BOW = "bow",
			BOOK = "book",
			PUMPKIN = "pumpkin",
			SKULL = "skull",
			// 1.9
			ELYTRA = "elytra",
			SHIELD = "shield",
			// 1.13
			TRIDENT = "trident",
			TURTLE_HELMET = "turtle_helmet",
			// 1.14
			CROSSBOW = "crossbow",
			// 1.16
			NETHERITE_HELMET = "netherite_helmet",
			NETHERITE_CHESTPLATE = "netherite_chestplate",
			NETHERITE_LEGGINGS = "netherite_leggings",
			NETHERITE_BOOTS = "netherite_boots",
			NETHERITE_SWORD = "netherite_sword",
			NETHERITE_PICKAXE = "netherite_pickaxe",
			NETHERITE_AXE = "netherite_axe",
			NETHERITE_SHOVEL = "netherite_shovel",
			NETHERITE_HOE = "netherite_hoe",
			// 1.21
			MACE = "mace";
	// @formatter:on

	public static boolean isArmor(String item) {
		if (item.endsWith("_helmet") || item.endsWith("_chestplate") || item.endsWith("_leggings")
				|| item.endsWith("_boots")) {
			// @formatter:off
			return LEATHER_HELMET.equals(item)
				|| LEATHER_CHESTPLATE.equals(item)
				|| LEATHER_LEGGINGS.equals(item)
				|| LEATHER_BOOTS.equals(item)
				|| IRON_HELMET.equals(item)
				|| IRON_CHESTPLATE.equals(item)
				|| IRON_LEGGINGS.equals(item)
				|| IRON_BOOTS.equals(item)
				|| CHAINMAIL_HELMET.equals(item)
				|| CHAINMAIL_CHESTPLATE.equals(item)
				|| CHAINMAIL_LEGGINGS.equals(item)
				|| CHAINMAIL_BOOTS.equals(item)
				|| GOLDEN_HELMET.equals(item


: true,
      "revelation_order": 55,
      "revelation_place": "مكية",
      "name_complex": "Al-'An`ām",
      "name_arabic": "الأنعام",
      "name_simple": "Al-An'am",
      "verses_count": 165,
      "pages": [128, 150],
      "translated_name": {"language_name": "english", "name": "The Cattle"}
    },
    {
      "id": 7,
      "chapter_number": 7,
      "bismillah_pre": true,
      "revelation_order": 39,
      "revelation_place": "مكية",
      "name_complex": "Al-'A`rāf",
      "name_arabic": "الأعراف",
      "name_simple": "Al-A'raf",
      "verses_count": 206,
      "pages": [151, 176],
      "translated_name": {"language_name": "english", "name": "The Heights"}
    },
    {
      "id": 8,
      "chapter_number": 8,
      "bismillah_pre": true,
      "revelation_order": 88,
      "revelation_place": "مدنية",
      "name_complex": "Al-'Anfāl",
      "name_arabic": "الأنفال",
      "name_simple": "Al-Anfal",
      "verses_count": 75,
      "pages": [177, 186],
      "translated_name": {
        "language_name": "english",
        "name": "The Spoils of War"
      }
    },
    {
      "id": 9,
      "chapter_number": 9,
      "bismillah_pre": false,
      "revelation_order": 113,
      "revelation_place": "مدنية",
      "name_complex": "At-Tawbah",
      "name_arabic": "التوبة",
      "name_simple": "At-Tawbah",
      "verses_count": 129,
      "pages": [187, 207],
      "translated_name": {"language_name": "english", "name": "The Repentance"}
    },
    {
      "id": 10,
      "chapter_number": 10,
      "bismillah_pre": true,
      "revelation_order": 51,
      "revelation_place": "مكية",
      "name_complex": "Yūnus",
      "name_arabic": "يونس",
      "name_simple": "Yunus",
      "verses_count": 109,
      "pages": [208, 221],
      "translated_name": {"language_name": "english", "name": "Jonah"}
    },
    {
      "id": 11,
      "chapter_number": 11,
      "bismillah_pre": true,
      "revelation_order": 52,
      "revelation_place": "مكية",
      "name_complex": "Hūd",
      "name_arabic": "هود",
      "name_simple": "Hud",
      "verses_count": 123,
      "pages": [221, 235],
      "translated_name": {"language_name": "english", "name": "Hud"}
    },
    {
      "id": 12,
      "chapter_number": 12,
      "bismillah_pre": true,
      "revelation_order": 53,
      "revelation_place": "مكية",
      "name_complex": "Yūsuf",
      "name_arabic": "يوسف",
      "name_simple": "Yusuf",
      "verses_count": 111,
      "pages": [235, 248],
      "translated_name": {"language_name": "english", "name


0-7FFF temporary copy
		ld de,#0x0109
		call trdos

		xor a			; code 1 into bank 0
		ld de,#0x0509
		call trdos

		ld a,#2			; common 8000-BFFF into bank 2
		ld de,#0x0909
		call trdos

		ld a,#1			; code 2 into bank 1
		ld de,#0x0D09
		call trdos

		ld a,#7			; code  3 into bank 7
		ld de,#0x1109
		call trdos

		ld a,#3			; code 4 into bank 3
		ld de,#0x1509
		call trdos

		di

		jp 0x8400		; into loaded bootstrap

trdos:
		; Switch bank
		push af
		ld bc,#0x7ffd
		out (254),a
		or #0x10
		out (c),a
		ld hl,#0xC000
		ld bc,#0x4005
		call 15635
		pop af
		ret


Metadata', () {
      ParsingTest<InviteManager, InviteWithMetadata, Map<String, Object?>>(
        name: 'parseWithMetadata',
        check: checkInviteWithMetadata,
        parse: (m) => m.parseWithMetadata,
        source: sampleInviteWithMetadata,
      ).runWithManager(manager);
    });

    testEndpoint(
      '/invites/0vCdhLbwjZZTWZLD',
      name: 'fetch',
      (client) => client.invites.fetch('0vCdhLbwjZZTWZLD'),
      response: sampleInvite,
    );

    testEndpoint(
      '/invites/0vCdhLbwjZZTWZLD',
      name: 'delete',
      method: 'DELETE',
      (client) => client.invites.delete('0vCdhLbwjZZTWZLD'),
      response: sampleInvite,
    );
  });
}
import 'package:mocktail/mocktail.dart';
import 'package:firebridge/firebridge.dart';
import 'package:test/test.dart';

import '../../../mocks/client.dart';
import '../../../test_endpoint.dart';
import '../../../test_manager.dart';

final sampleGateway = {"url": "wss://gateway.discord.gg/"};

void checkGateway(GatewayConfiguration configuration) {
  expect(configuration.url,
      equals(Uri(scheme: 'wss', host: 'gateway.discord.gg', path: '/')));
}

final sampleGatewayBot = {
  "url": "wss://gateway.discord.gg/",
  "shards": 9,
  "session_start_limit": {
    "total": 1000,
    "remaining": 999,
    "reset_after": 14400000,
    "max_concurrency": 1
  }
};

void checkGatewayBot(GatewayBot gateway) {
  expect(gateway.url,
      equals(Uri(scheme: 'wss', host: 'gateway.discord.gg', path: '/')));
  expect(gateway.shards, equals(9));
  expect(gateway.sessionStartLimit.total, equals(1000));
  expect(gateway.sessionStartLimit.remaining, equals(999));
  expect(gateway.sessionStartLimit.resetAfter,
      equals(Duration(milliseconds: 14400000)));
  expect(gateway.sessionStartLimit.maxConcurrency, equals(1));
}

final sampleActivity = {
  "details": "24H RL Stream for Charity",
  "state": "Rocket League",
  "name": "Twitch",
  "type": 1,
  "url": "https://www.twitch.tv/discord",
};

void checkActivity(Activity activity) {
  expect(activity.name, equals('Twitch'));
  expect(activity.type, equals(ActivityType.streaming));
  expect(activity.url, equals(Uri.parse('https://www.twitch.tv/discord')));
  expect(activity.createdAt, isNull);
  expect(activity.timestamps, isNull);
  expect(activity.applicationId, isNull);
  expect(activity.details, equals('24H RL Stream for Charity'));
  expect(activity.state, equals('Rocket League'));
  expect(activity.party, isNull);
  expect(activity.assets, isNull);
  expect(activity.secrets, isNull);
  expect(activity.isInstance, isNull);
  expect(activity.flags, isNull);
  expect(activity.buttons, isNull);
}

final sampleActivity2 = {
  "name": "Rocket League",
  "type": 0,
  "application_id": "379286085710381999",
  "state": "In a Match",
  "details": "Ranked Duos: 2-1",
  "timestamps": {"start": 15112000660000},
  "party": {
    "id": "9dd6594e-81b3-49f6-a6b5-a679e6a060d3",
    "size": [2, 2]
  },
  "asse


color-ink-primary-red: theme('colors.primitives.red.light.50');
  --color-ink-primary-rice: theme('colors.primitives.rice.light.200');

  --color-ink-secondary-700: theme('colors.primitives.rice.light.25');
  --color-ink-secondary-blue: theme('colors.primitives.blue.light.300');
  --color-ink-secondary-green: theme('colors.primitives.green.dark.200');
  --color-ink-secondary-red: theme('colors.primitives.red.light.100');
  --color-ink-secondary-rice: theme('colors.primitives.rice.light.300');

  --color-ink-tertiary-500: theme('colors.primitives.gray.dark.200');
  --color-ink-tertiary-green: theme('colors.primitives.green.dark.300');
  --color-ink-tertiary-red: theme('colors.primitives.red.light.200');

  --color-ink-quaternary-200: theme('colors.primitives.gray.dark.500');

  --color-ink-placeholder-400: theme('colors.primitives.gray.dark.300');

  --color-ink-disabled-300: theme('colors.primitives.gray.dark.400');
  --color-ink-disabled-blue: theme('colors.primitives.blue.dark.900');

  /* Status */
  --color-status-fail: #FF6B6B;
  --color-status-success: #66C86A;

  /* Shadows & gradients */

  --shadow-card: 0px 1px 6px rgba(25, 25, 24, 0.4), 0px 4px 13px rgba(25, 25, 24, 0.5);
  --shadow-btn-shadow-gradient: 0px 0px 8px -2px #FFFFFF7A inset, 0px 3px 6px -2px #FFFFFFA3 inset, 0px 4px 6px 0px #0000000A, 0px 4px 6px 0px #0000000A;
  --shadow-btn-secondary-shadow-gradient: 0px -1px 3px -2px #00000012 inset, 0px 2px 3px -1px #FFFFFF12 inset, 0px 1px 1px -0.5px #0000000A;

  --chartiq-filter: brightness(0) saturate(1710%) invert(35%) sepia(20%) saturate(1000%) hue-rotate(360deg) brightness(235%) contrast(89%);

  --color-bg-card-blue: linear-gradient(98.89deg, #373634 18.66%, #6E6D77 46.73%, #373634 86%);
  --color-bg-card-rice: linear-gradient(98.89deg, #383633 18.66%, #615A51 46.73%, #383633 86%);
  --color-bg-card-red: linear-gradient(98.89deg, #494443 11.21%, #584D4E 46.73%, #322F2F 88.96%);
  --color-bg-card-red-2: linear-gradient(0deg, #494443, #494443), linear-gradient(98.89deg, rgba(73, 68, 67, 0.2) 5.88%, rgba(88, 77, 78, 0.2) 46.73%, rgba(50, 47, 47, 0.2) 94.73%);
  --color-bg-card-green: linear-gradient(98.89deg, #373634 18.76%, #666654 46.73%, #373634 87.62%);
  --color-bg-card-green-2: linear-gradient(0deg, #373634, #373634), linear-gradient(98.89deg, rgba(55, 54, 52, 0.05) 5.88%, rgba(102, 102, 84, 0.05) 46.73%, rgba(55, 54, 52, 0.05) 94.73%);
}

body {
  overflow-x: hidden;
  overflow-y: scroll;
  min-height: 100svh;
  scrollba