*/
  fun bump(version: VersionType? = null) =
    version
      .let { it ?: if (pre != null) VersionType.PRE else VersionType.PATCH }
      .let {
        when (it.adjustForUnreleased()) {
          VersionType.MAJOR -> copy(major = major + 1, minor = 0, patch = 0)
          VersionType.MINOR -> copy(minor = minor + 1, patch = 0)
          VersionType.PATCH -> copy(patch = patch + 1)
          VersionType.PRE -> copy(pre = pre?.bump())
        }
      }

  /**
   * Adjusts the [VersionType] to be at most a minor- if the current version is unreleased.
   *
   * Unreleased versions follow a convention of major = minor. So any major change needs to be
   * adjusted to be a minor change- otherwise you risk releasing the project out of development.
   */
  private fun VersionType.adjustForUnreleased(): VersionType =
    takeUnless { major == 0 } ?: coerceAtLeast(VersionType.MINOR)
}
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.ai.client.generativeai.common.util

import android.util.Log
import com.google.ai.client.generativeai.common.SerializationException
import kotlin.reflect.KClass
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder

/**
 * Serializer for enums that defaults to the first ordinal on unknown types.
 *
 * Convention is that the first enum be named `UNKNOWN`, but any name is valid.
 *
 * When an unknown enum value is found, the enum itself will be logged to stderr with a message
 * about opening an issue on GitHub regarding the new enum value.
 */
class FirstOrdinalSerializer<T : Enum<T>>(private val enumClass: KClass<T>) : KSerializer<T> {
  override val descriptor: SerialDescriptor = buildClassSerialDescriptor("FirstOrdinalSerializer")

  override fun deserialize(decoder: Decoder): T {
    val name = decoder.decodeString()
    val values = enumClass.enumValues()

    return values.firstOrNull { it.serialName == name }
      ?: values.first().also { printWarning(name) }
  }

  private fun printWarning(name: String) {
    Log.e(
      "FirstOrdinalSerializer",
      """
        |Unknown enum value found: $name"
        |This usually means the backend was updated, and the SDK needs to be updated to match it.
        |Check if there's a new version for the SDK, otherwise please open an issue on our
        |GitHub to bring it to our attention:
        |https://github.com/google/google-ai-android
       """
        .trimMargin(),
    )
  }

  override fun serialize(encoder: Encoder, value: T) {
    encoder.encodeString(value.serialName)
  }
}

/**
 * Provides the name to be used in serialization for this enum value.
 *
 * By default an enum is serialized to its [name][Enum.name], and can be overwritten by providing a
 * [SerialName] annotation.
 */
val <T : Enum<T>> T.serialName: String
  get() = declaringJavaClass.getField(name).getAnnotation<SerialName>()?.value ?: name

/**
 * Variant of [kotlin.enumValues] that provides support for [KClass] i


tion:

All source modules required by this noise module have been passed to the SetSourceModule() method.

Before an application can call this method, it must first connect all required source modules via the SetSourceModule() method. If these source modules are not connected to this noise module, this method raises a debug assertion.

To determine the number of source modules required by this noise module, call the GetSourceModuleCount() method.

Implements noise::module::Module.

          void noise::module::Blend::SetControlModule
          (
          const Module &
           controlModule
           )
           [inline]

Sets the control module.

Parameters:

	controlModule 	The control module.

The control module determines the weight of the blending operation. Negative values weigh the blend towards the output value from the source module with an index value of 0. Positive values weigh the blend towards the output value from the source module with an index value of 1.

This method assigns the control module an index value of 2. Passing the control module to this method produces the same results as passing the control module to the SetSourceModule() method while assigning that noise module an index value of 2.

This control module must exist throughout the lifetime of this noise module unless another control module replaces that control module.

The documentation for this class was generated from the following files:

blend.h
blend.cpp

      © 2003-2005 Jason B


//
//     Generated by class-dump 3.5 (64 bit).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

#import "PSListController.h"

#import "UITextFieldDelegate.h"

@class NSString, VoiceOverBluetoothDevice;

__attribute__((visibility("hidden")))
@interface VoiceOverBluetoothPairController : PSListController <UITextFieldDelegate>
{
    VoiceOverBluetoothDevice *_device;
    NSString *_promptFormat;
    _Bool _dismissed;
}

- (id)specifiers;
- (void)emptySetter:(id)arg1 specifier:(id)arg2;
- (_Bool)textFieldShouldReturn:(id)arg1;
- (id)tableView:(id)arg1 cellForRowAtIndexPath:(id)arg2;
- (void)textDidChange:(id)arg1;
- (void)keyboardWillShow:(id)arg1;
- (void)doneButtonClicked:(id)arg1;
- (void)cancelButtonClicked:(id)arg1;
- (void)updatePrompt:(id)arg1;
- (void)dealloc;
- (void)viewWillAppear:(_Bool)arg1;
- (void)loadView;
- (id)init;

// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;

@end


rariF40 = new Ferrari('F40', 300);
  for (let v = 0; v < 10; v++) {
    ferrariF40.acelerar();
  }
  console.log(ferrariF40);
})();
import { of } from 'rxjs/internal/observable/of';
import { School } from '../models/school.model';

import { SchoolService } from './school.service';

describe('SchoolService', () => {
  let service: SchoolService;
  let httpClientSpy: { post: jasmine.Spy, get: jasmine.Spy};

  beforeEach(() => {
    httpClientSpy = jasmine.createSpyObj('HttpClient', ['post', 'get']);
    service = new SchoolService(httpClientSpy as any);
  });

  it('should be create a School (HttpClient called once)', () => {
    const expectedSchool: School = {
      Id: 1,
      Name: 'xpto',
      Description: 'xpto'
    };

    httpClientSpy.post.and.returnValue(of(expectedSchool));

    service.create(expectedSchool).subscribe(
      c => expect(c).toEqual(expectedSchool, 'expected School'),
      fail
    );

    expect(httpClientSpy.post.calls.count()).toBe(1, 'one call');
  });

  it('should return expected schools (HttpClient called once)', () => {
    const expectedSchools: School[] =
      [
        { Id: 1, Name: 'xpto1', Description: 'xpto1' },
        { Id: 2, Name: 'xpto2', Description: 'xpto2' }
      ];

    httpClientSpy.get.and.returnValue(of(expectedSchools));

    service.readAll().subscribe(
      schools => expect(schools).toEqual(expectedSchools, 'expected schools'),
      fail
    );
    expect(httpClientSpy.get.calls.count()).toBe(1, 'one call');
  });

  it('should be created', () => {
    expect(service).toBeTruthy();
  });
});
import * as ts from "typescript";
import * as Lint from "tslint";

/**
 * Utility class meant to be extended by more specialized JSX element walkers.
 * Provides various utility functions for getting information about a JSX element,
 * such as its tag name and attributes.
 */
export class JsxWalker extends Lint.RuleWalker {
  // ARIA roles commonly used for interactive elements (form fields, buttons, menu items, etc.)
  // when semantic HTML elements aren't used.
  private interactiveAriaRoles = ['button', 'checkbox', 'gridcell', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'slider', 'tab', 'textbox', 'treeitem'];

  protected isJsxElement(node: ts.Node): node is ts.JsxElement {
    return node.kind === ts.SyntaxKind.JsxElement;
  }

  protected isJsxSelfClosingElement(node: ts.Node): node is ts.JsxSelfClosingElement {
    return node.kind === ts.SyntaxKind.JsxSelfClosingElement;
  }

  protected isJsxOpeningElement(node: ts.Node): node is ts.JsxOpeningElement {
    return node.kind === ts.SyntaxKind.JsxOpeningElement;
  }

  /* Checks if the provided value definitely matches any interactive ARIA roles */
  protected isInteractiveRole(role: ts.StringLiteral | ts.Expression) {
    if (role && role.kind === ts.SyntaxKind.StringLiteral) {
      return this.interactiveAriaRoles.indexOf((role as ts.StringLiteral).text) > -1;
    }
    return false;
  }

  /* Returns a map of lowercase attribute names to attributes for the given node.
     Note that this ignores any JSX spread attributes. */
  protected getAttributeMap(


       'Frustré',
        'Visage fou',
        'Vaporisation',
        'Pousser avec la colère'
    ],
    '😡': [
        'Visage en mouvement',
        'fuck',
        ':pouting_face:',
        'Visage en colère',
        'Visage Grumpy',
        'Visage fou',
        'Visage rouge',
        ':red:'
    ],
    '😠': [
        'Visage en colère',
        ':angry_face:',
        'En colère',
        'Visage Grumpy'
    ],
    '🤬': [
        'Taillade',
        'fuck',
        ':swearing:',
        '@#$%&!',
        'Visage avec symboles en bouche',
        'Malédiction',
        'Coussin',
        'Grawlix',
        'Visage avec symboles à la bouche',
        'Visage sérieux avec symboles recouvrant la bouche',
        ':red:'
    ],
    '🥲': [
        'Visage souriant avec larme',
        ':smiling_face_with_tear:'
    ],
    '😮💨': [
        'Exaltation de la face',
        ':face_exhaling:',
        'Cuire'
    ],
    '😵💫': [
        'Visage avec les yeux en spirale',
        ':face_with_spiral_eyes:',
        'Dizzy Face'
    ],
    '😶🌫': [
        'Visage dans les nuages',
        'fumée',
        ':face_in_clouds:',
        'Brain Fog',
        'Oublié',
        'Dommage'
    ],
    '🥸': [
        'Visage déguisé',
        ':disguised_face:'
    ],
    '🫠': [
        'Fondu du visage',
        ':melting_face:'
    ],
    '🫢': [
        'Visage aux yeux ouverts et à la bouche',
        ':face_with_open_eyes_and_hand_over_mouth:'
    ],
    '🫣': [
        'Visage à l\'œil étincelant',
        ':face_with_peeking_eye:'
    ],
    '🫡': [
        'Visage de salut',
        ':saluting_face:',
        'Militaire',
        'Armée',
        'FRAF',
        'Navy'
    ],
    '🫥': [
        'Face de ligne en pointillé',
        ':dotted_line_face:',
        ':transparent:'
    ],
    '🫤': [
        'Visage avec bouche diagonale',
        ':face_with_diagonal_mouth:'
    ],
    '🥹': [
        'Larmes du dos maintenues',
        ':face_holding_back_tears:'
    ],
    '🫨': [
        'Shaking Face',
        ':shaking_face:'
    ],
    '🙂↔': [
        'Head Shaking Horizontally',
        ':head_shaking_horizontally:'
    ],
    '🙂↕': [
        'Head Shaking Vertically',
        ':head_shaking_vertically:'
    ],
    '😈': [
        'Visage souriant avec des cornes',
        ':smiling_face_with_horns:',
        'Diable',
        'Cornes du Diable',
        'Diable heureux',
        'Diable violet',
        'Diable rouge',
        ':purple:'
    ],
    '👿': [
        'Face en colère avec des cornes',
        ':angry_face_with_horns:',
        'Diable',
        'Cornes du Diable',
        'Diable violet',


0c\u53ea\u8981\u6211\u4eec\u80fd\u514b\u670d\u9ebb\u75f9\u5927\u610f\u7684\u60c5\u7eea\uff0c\u52a0\u5f3a\u6709\u5173\u90e8\u95e8\u4e4b\u95f4\u7684\u914d\u5408\u534f\u4f5c\uff0c\u79ef\u6781\u6539\u8fdb\u5de5\u4f5c\u4f5c\u98ce\u548c\u5de5\u4f5c\u65b9\u6cd5\uff0c\u5c31\u4e00\u5b9a\u80fd\u4fdd\u8bc1\u6536\u8d2d\u8d44\u91d1\u7684\u4f9b\u5e94\uff0c\u4fdd\u8bc1\u519c\u4ea7\u54c1\u6536\u8d2d\u7684\u80dc\u5229\u5b8c\u6210\u3002", "type": "paragraph"}]}
  </script>

    [返回索引页面]

   作好农产品收购的资金供应工作

   日期：1955-10-6 作者：《人民日报》社论

   《人民日报》社论

   全国的中稻和棉花已经上市，大秋作物也即将收割，采购粮食、油料和经济作物的旺季已经开始了。迅速作好收购农产品的资金供应工作，是顺利地完成农产品收购任务的重要保证。

   今年由于农业生产合作社的迅速发展，粮食“三定”政策的贯彻，棉花预购工作的推广，加上全国大丰收，农民出售粮食和农产品的积极性大为提高，这是今年农产品收购条件极为有利的情况。同时今年国家银行所准备的收购资金比任何一年都充裕，商业部门调拨到各地的工业品也比去年多得多，收购的资金和物资都得到了可靠的保证。因此，作好今年农产品的收购工作是不困难的。当


#ifndef _IPHONE_SDK_H_
#define _IPHONE_SDK_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <time.h>

#define INP_BUTTON_UP				(0)
#define INP_BUTTON_LEFT				(2)
#define INP_BUTTON_DOWN				(4)
#define INP_BUTTON_RIGHT			(6)
#define INP_BUTTON_START			(8)
#define INP_BUTTON_SELECT			(9)
#define INP_BUTTON_L				(10)
#define INP_BUTTON_R				(11)
#define INP_BUTTON_HARDLEFT			(12)
#define INP_BUTTON_HARDRIGHT		(13)
#define INP_BUTTON_HARDDOWN			(14)
#define INP_BUTTON_HARDUP			(15)
#define INP_BUTTON_L2				(22)
#define INP_BUTTON_R2				(23)
#define INP_BUTTON_STICK_PUSH		(27)
#define INP_BUTTON_MENU				(31)

#define SOUND_THREAD_SOUND_ON			1
#define SOUND_THREAD_SOUND_OFF		2
#define SOUND_THREAD_PAUSE				3
#define gp2x_flipscreen()

void gp_drawString (int x,int y,int len,char *buffer,unsigned short color,void *framebuffer);
void gp_clearFramebuffer16(unsigned short *framebuffer, unsigned short pal);
void gp_setCpuspeed(unsigned int cpuspeed);
void gp_initGraphics(unsigned short bpp, int flip, int applyMmuHack);
void gp_setFramebuffer(int flip, int sync);
void gp2x_video_setpalette(void);
void gp_initSound(int rate, int bits, int stereo, int Hz, int frag);
void gp_stopSound(void);
void gp_Reset(void);
void gp2x_enableIRQ(void);
void gp2x_disableIRQ(void);
void gp2x_sound_volume(int l, int r);
unsigned long gp2x_timer_read(void);
unsigned int gp_getButton(unsigned char which1);
void gp2x_video_RGB_setscaling(int W, int H);
void gp2x_sound_play_bank(int bank);
void gp2x_sound_sync(void);
void BlitBufferToScreen(void *bufferFrom, void *bufferTo);
void set_gamma(int g100);
void updateScreen();
void gp_deinitGraphics(void);

extern unsigned short *framebuffer16[];
extern unsigned char *framebuffer8[];
extern void *GizPrimaryFrameBuffer;
extern volatile unsigned short  gp2x_palette[512][2];

extern unsigned short* screenbuffer;
extern unsigned short BaseAddress[320*240];
extern int __emulation_run;
extern int __emulation_saving;

#ifdef __cplusplus
}
#endif

#endif


            resPing(src)
            addMember(src, recieveLibSendData.name, recieveLibSendData.avaterUrl, recieveLibSendData.position)
            break;
          case `res_ping`:
            // Ping応答を受信
            addMember(src, recieveLibSendData.name, recieveLibSendData.avaterUrl, recieveLibSendData.position)
            break;
          case `change_name`:
            // 名前変更を受信
            setName(src, data.name)
            break;
          case 'move_to':
            // 移動を受信
            setPosition(src, recieveLibSendData.position)
            setDistance(src, recieveLibSendData.position)
            break;
        }
      }
    } else {
      option.onData && option.onData(src, data)
    }
  }

  const getDistance = (posA?: ExMemberPosition, posB?: ExMemberPosition): number | undefined => {
    if(posA && posB) {
      return Math.sqrt((posA.x - posB.x) * (posA.x - posB.x) + (posA.y - posB.y) * (posA.y - posB.y))
    }
    return undefined
  }

  // メンバー
  const addMember = (peerId: string, name: string, avatarUrl: string, position: ExMemberPosition) => {
    setName(peerId, name)
    setAvatarUrl(peerId, avatarUrl)
    setPosition(peerId, position)
    setDistance(peerId, position)
    setId(peerId)
  }

  const removeMember = (peerId:string) => {
    removePosition(peerId)
    removeName(peerId)
    removeAvatarUrl(peerId)
    removeId(peerId)
    removeStream(peerId)
  }

  // Name
  const setName = (peerId: string, name: string) => {
    const add = {}
    add[peerId] = name
    const newMemberNames = Object.assign({}, __memberNames, add)
    __memberNames = newMemberNames
    option.onNameChange && option.onNameChange(peerId, name)
  }

  const removeName = (peerId: string) => {
    const newMemberNames = Object.assign({}, __memberNames)
    delete newMemberNames[peerId]
    __memberNames = newMemberNames
    /** Family 側は onPeerLeave で削除 */
  }

  const setAvatarUrl = (peerId: string, avatarUrl: string) => {
    const add = {}
    add[peerId] = avatarUrl
    const newMemberAvatarUrls = Object.assign({}, __memberAvatarUrls, add)
    __memberAvatarUrls = newMemberAvatarUrls
    option.onAvatarUrlChange && option.onAvatarUrlChange(peerId, avatarUrl)
  }

  const removeAvatarUrl  = (peerId: string) => {
    const newMemberAvatarUrls = Object.assign({}, __memberAvatarUrls)
    delete newMemberAvatarUrls[peerId]
    __memberAvatarUrls = newMemberAvatarUrls
    /** Family 側は onPeerLeave で削除 */
  }

  // 座標
  const setPosition = (peerId: string, position: ExMemberPosition) => {
    const add = {}
    add[peerId] = position
    const newMemberPositions = Object.assign({}, __memberPositions, add)
    __memberPositions = newMemberPositions
    option.onPositionChange && option.onPositionChange(peerId, position)
  }

  const removePosition = (peerId: string) => {
    const newMemberPositions = Object.assign({}, __memberPositions)
    delete newMemberPositions[peerId]
    __memberPositions = newMemberPositions
    /** Family 側は onPeerLeave


a Muerte",
[25815] = "Sangre de Mirada Pétrea",
[25816] = "Monster - Sword, Legion (2H as 1H)",
[25817] = "Vial sagrado",
[25818] = "Monster - Shield, Legion",
[25819] = "Coraza del belisario",
[25820] = "Cinta metálica de Simm'oz",
[25821] = "Leotardos de asalto sin fin",
[25822] = "Guerrera de vigía",
[25823] = "Hacha de guerra de bruto",
[25824] = "Sortija de clarividente",
[25825] = "Tizona de lacayo",
[25826] = "Sortija de sabio",
[25827] = "Mantón cubierto de barro",
[25828] = "Guarda de liquen petrificado",
[25829] = "Dije de la Alianza",
[25830] = "Yelmo de cuero de Gladiador",
[25831] = "Guerrera de cuero de Gladiador",
[25832] = "Bufas de cuero de Gladiador",
[25833] = "Musleras de cuero de Gladiador",
[25834] = "Guantes de cuero de Gladiador",
[25835] = "Cachava de expedicionario",
[25836] = "Cayada de valedor",
[25837] = "Pelambre de Quijahierro",
[25838] = "Camisote de celador",
[25839] = "Monster - Staff, Basic Blue",
[25840] = "Extracto del más allá",
[25841] = "Vasija draenei",
[25842] = "Huesos sin sosiego",
[25843] = "Vara de hierro vil",
[25844] = "Vara de adamantita",
[25845] = "Vara de eternio",
[25846] = "Diseño: vara de adamantita",
[25847] = "Diseño: vara de eternio",
[25850] = "Artefacto Tuurem",
[25852] = "Pluma de la cola de Torgos",
[25853] = "Paquete de bombas incendiarias",
[25854] = "Amito de seda de Gladiador",
[25855] = "Capucha de seda de Gladiador",
[25856] = "Vestiduras de seda de Gladiador",
[25857] = "Manoplas de seda de Gladiador",
[25858] = "Calzas de seda de Gladiador",
[25859] = "Monster - Axe (No Visual)",
[25860] = "Monster - Sword (No Visual)",
[25861] = "Hacha arrojadiza rudimentaria",
[25862] = "Baya de la marisma",
[25863] = "Raíz de olemba",
[25864] = "Fronda de Telaari",
[25865] = "Espinazo de dragón",
[25866] = "Lista de hierbas de la Abuela",
[25867] = "Diamante de tormenta de tierra",
[25868] = "Diamante de fuego celeste",
[25869] = "Receta: transmutar diamante de tormenta de tierra",
[25870] = "Receta: transmutar diamante de fuego celeste",
[25871] = "Arma arrojadiza estándar",
[25872] = "Daga arrojadiza equilibrada",
[25873] = "Cuchillo arrojadizo cortante",
[25874] = "Cuchillo arrojadizo grande",
[25875] = "Hacha arrojadiza mortal",
[25876] = "Hacha arrojadiza reluciente",
[25877] = "Daga arrojadiza del maestro",
[25878] = "Cuchillo


T> From<SendError<T>> for Error {
    fn from(e: SendError<T>) -> Self {
        Error {
            error: format!("{}", e),
        }
    }
}

impl Into<Fail> for Error {
    fn into(self) -> Fail {
        Fail::Error(self.error)
    }
}

impl From<strum::ParseError> for Error {
    fn from(e: strum::ParseError) -> Self {
        Self{
            error: e.to_string()
        }
    }
}

impl From<RenderError> for Error {
    fn from(e: RenderError) -> Self {
        Self {
            error: e.to_string()
        }
    }
}

impl From<regex::Error> for Error {
    fn from(e: regex::Error) -> Self {
        Self {
            error: e.to_string()
        }
    }
}<gh_stars>0
use crate::models::{NewSentence, Sentence, Todo};
use crate::schema::books::{id, table as books};
use crate::{
    create_todo_entry, establish_connection, schema, sentences, string_to_signed_int, Book, NewTodo,
};
use diesel::{ExpressionMethods, PgConnection, QueryDsl, RunQueryDsl};

pub fn handle_book_todo(todo: Todo) -> Result<(), anyhow::Error> {
    let conn = establish_connection();
    conn.build_transaction().serializable().run(|| {
        let book = get_book(&conn, todo.other)?;
        let new_sentences = split_book_to_sentences(book);
        let sentences = insert_sentences(&conn, &new_sentences)?;
        let todos: Vec<NewTodo> = sentences
            .iter()
            .map(|s| NewTodo {
                domain: "sentences".to_owned(),
                other: s.id,
            })
            .collect();
        create_todo_entry(&conn, &todos)?;
        Ok(())
    })
}

fn insert_sentences(
    conn: &PgConnection,
    sentences: &[NewSentence],
) -> Result<Vec<Sentence>, diesel::result::Error> {
    diesel::insert_into(sentences::table)
        .values(sentences)
        .on_conflict_do_nothing()
        .get_results(conn)
}

fn get_book(conn: &PgConnection, pk: i32) -> Result<Book, anyhow::Error> {
    let book: Book = books
        .filter(id.eq(pk))
        .select(schema::books::all_columns)
        .first(conn)?;

    Ok(book)
}

pub fn split_book_to_sentences(book: Book) -> Vec<NewSentence> {
    book.body
        .split(|x| x == '.' || x == '!' || x == '?' || x == ';')
        .filter(|x| !x.is_empty())
        .map(|x| x.trim())
        .map(|x| x.to_string())
        .map(|sentence| {
            sentence
                .replace('-', "")
                .replace(':', "")
                .replace(',', "")
                .to_lowercase()
        })
        .map(|t| NewSentence {
            sentence: t.clone(),
            sentence_hash: string_to_signed_int(&t),
        })
        .collect()
}

#[cfg(test)]
mod tests {
    use crate::book_todo_handler::split_book_to_sentences;
    use crate::models::Book;
    use crate::string_to_signed_int;

    #[test]
    fn it_splits_books_to_sentences() {
        let book = Book {
            title: "title".to_owned(),
            body: "Multiple words.. \n\tTwo sentences! Now,:- three; Four.".to_owned(),
            id: 5,
        };
        let actual = split_book_to_sentences(book);
        let actual_sentences:


;
      for (int x = left; x < right; x++) {
        _bits[offset + (x ~/ 32)] |= 1 << (x & 0x1f);
      }
    }
  }

  /// A fast method to retrieve one row of data from the matrix as a BitArray.
  ///
  /// @param y The row to retrieve
  /// @param row An optional caller-allocated BitArray, will be allocated if null or too small
  /// @return The resulting BitArray - this reference should always be used even when passing
  ///         your own row
  BitArray getRow(int y, BitArray? row) {
    if (row == null || row.size < _width) {
      row = BitArray(_width);
    } else {
      row.clear();
    }
    final offset = y * _rowSize;
    for (int x = 0; x < _rowSize; x++) {
      row.setBulk(x * 32, _bits[offset + x]);
    }
    return row;
  }

  /// @param y row to set
  /// @param row [BitArray] to copy from
  void setRow(int y, BitArray row) {
    List.copyRange(_bits, y * _rowSize, row.getBitArray(), 0, _rowSize);
  }

  /// Modifies this `BitMatrix` to represent the same but rotated the given degrees (0, 90, 180, 270)
  void rotate(int degrees) {
    switch (degrees % 360) {
      case 0:
        return;
      case 90:
        rotate90();
        return;
      case 180:
        rotate180();
        return;
      case 270:
        rotate90();
        rotate180();
        return;
    }
    throw ArgumentsException(
      'degrees must be a multiple of 0, 90, 180, or 270',
    );
  }

  /// Modifies this `BitMatrix` to represent the same but rotated 180 degrees
  void rotate180() {
    BitArray topRow = BitArray(_width);
    BitArray bottomRow = BitArray(_width);
    final maxHeight = (_height + 1) ~/ 2;
    for (int i = 0; i < maxHeight; i++) {
      topRow = getRow(i, topRow);
      final bottomRowIndex = _height - 1 - i;
      bottomRow = getRow(bottomRowIndex, bottomRow);
      topRow.reverse();
      bottomRow.reverse();
      setRow(i, bottomRow);
      setRow(bottomRowIndex, topRow);
    }
  }

  /// Modifies this `BitMatrix` to represent the same but rotated 90 degrees counterclockwise
  void rotate90() {
    final newWidth = _height;
    final newHeight = _width;
    final newRowSize = (newWidth + 31) ~/ 32;
    final newBits = Uint32List(newRowSize * newHeight);

    for (int y = 0; y < _height; y++) {
      for (int x = 0; x < _width; x++) {
        final offset = y * _rowSize + (x ~/ 32);
        if (((_bits[offset] >>> (x & 0x1f)) & 1) != 0) {
          final newOffset = (newHeight - 1 - x) * newRowSize + (y ~/ 32);
          newBits[newOffset] |= 1 << (y & 0x1f);
        }
      }
    }
    _width = newWidth;
    _height = newHeight;
    _rowSize = newRowSize;
    _bits = newBits;
  }

  /// This is useful in detecting the enclosing rectangle of a 'pure' barcode.
  ///
  /// @return {@code left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white
  List<int>? getEnclosingRectangle() {
    int left = _width;
    int top = _height;
    int right = -1;
    int bottom = -1;

    for (int y = 0; y < _height; y++) {
      for (int x32 = 0; x32 < _rowSize; x32++) {
        final theBits = _bits[y * _rowSize + x32];
        if (theB


    setUpdateExpression(obj:object, item:object): any {
        let updateExpressionSTR = "set";
        let expressionAttributeNamesOBJ = {};
        let expressionAttributeValuesOBJ = {};

        let firstProperty = true;
        for (let property in item) {
            if (item[property] !== undefined && property !== 'id') {
                // update Expression STR
                if (firstProperty) { firstProperty = false; }
                else {updateExpressionSTR = updateExpressionSTR+",";}
                updateExpressionSTR = updateExpressionSTR + " " + `#${property}` + ` = :${property}`;
                // expression Attribute Names OBJ
                expressionAttributeNamesOBJ[`#${property}`] = property;
                // expression Attribute Values OBJ
                expressionAttributeValuesOBJ[`:${property}`] = item[property];
            }
        }

        obj['UpdateExpression'] = updateExpressionSTR;
        obj['ExpressionAttributeNames'] = expressionAttributeNamesOBJ;
        obj['ExpressionAttributeValues'] = expressionAttributeValuesOBJ;
        obj['ReturnValues'] = "UPDATED_NEW";
    }
}import baseAssignValue from './.internal/baseAssignValue';
import createAggregator from './.internal/createAggregator';

/**
 * @ignore
 */
const internal = createAggregator((result, value, key) => {
  baseAssignValue(result, key, value);
});

/**
 * Creates an object composed of keys generated from the results of running
 * each element of `collection` thru `iteratee`. The corresponding value of
 * each key is the last element responsible for generating the key. The
 * iteratee is invoked with one argument: (value).
 *
 * @since 5.6.0
 * @category Collection
 * @param collection The collection to iterate over.
 * @param iteratee The iteratee to transform keys.
 * @returns Returns the composed aggregate object.
 * @see [[groupBy]],[[partition]]
 * @example
 *
 * ```js
 * const array = [
 *   { 'dir': 'left', 'code': 97 },
 *   { 'dir': 'right', 'code': 100 }
 * ]
 *
 * keyBy(array, ({ code }) => String.fromCharCode(code))
 * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
 * ```
 */
export function keyBy<T>(collection: ArrayLike<T>, iteratee?: (obj: T) => any): Record<string, T>;
export function keyBy(collection: any, iteratee?: any): any {
  return internal(collection, iteratee);
}

export default keyBy;
import { findFirstGreaterThan } from '.';

it('二分查找-查找第一个大于等于给定值的元素', () => {
  // 空数组
  let arr = [];
  expect(findFirstGreaterThan(arr, 1)).toBe(-1);

  // 只有一个元素
  arr = [1];
  expect(findFirstGreaterThan(arr, 1)).toBe(0);
  expect(findFirstGreaterThan(arr, 2)).toBe(-1);

  // 两个元素
  arr = [1, 2];
  expect(findFirstGreaterThan(arr, 0)).toBe(0);
  expect(findFirstGreaterThan(arr, 1)).toBe(0);
  expect(findFirstGreaterThan(arr, 2)).toBe(1);
  arr = [1, 1];
  expect(findFirstGreaterThan(arr, 0)).toBe(0);
  expect(findFirstGreaterThan(arr, 1)).toBe(0);

  // 多个元素
  arr = [1, 2, 2];
  expect(findFirstGreaterThan(arr, 2)).toBe(1);
  arr = [1, 2, 2, 3];
  expect(findFirstGreaterThan(arr, 2)).toBe(1);
  expect(findFirstGreaterThan(arr, 3)).toBe(3);
});
//Principios para codigo mantenible, escalable y robusto
//Alta


p(array: ByteArray): Memory
/*
 * Copyright 2018-2024 KMath contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
 */

package space.kscience.kmath.fit

import kotlinx.html.br
import kotlinx.html.h3
import space.kscience.kmath.commons.optimization.CMOptimizer
import space.kscience.kmath.distributions.NormalDistribution
import space.kscience.kmath.expressions.DifferentiableExpression
import space.kscience.kmath.expressions.autodiff
import space.kscience.kmath.expressions.symbol
import space.kscience.kmath.operations.asIterable
import space.kscience.kmath.operations.toList
import space.kscience.kmath.optimization.minimize
import space.kscience.kmath.optimization.optimizeWith
import space.kscience.kmath.optimization.result
import space.kscience.kmath.optimization.resultValue
import space.kscience.kmath.random.RandomGenerator
import space.kscience.kmath.real.DoubleVector
import space.kscience.kmath.real.map
import space.kscience.kmath.real.step
import space.kscience.kmath.stat.chiSquaredExpression
import space.kscience.kmath.structures.Float64
import space.kscience.plotly.*
import space.kscience.plotly.models.ScatterMode
import space.kscience.plotly.models.TraceValues
import kotlin.math.pow
import kotlin.math.sqrt

// Forward declaration of symbols that will be used in expressions.
private val a by symbol
private val b by symbol
private val c by symbol

/**
 * Shortcut to use buffers in plotly
 */
operator fun TraceValues.invoke(vector: DoubleVector) {
    numbers = vector.asIterable()
}

/**
 * Least squares fie with auto-differentiation. Uses `kmath-commons` and `kmath-for-real` modules.
 */
suspend fun main() {
    //A generator for a normally distributed values
    val generator = NormalDistribution(0.0, 1.0)

    //A chain/flow of random values with the given seed
    val chain = generator.sample(RandomGenerator.default(112667))

    //Create a uniformly distributed x values like numpy.arrange
    val x = 1.0..100.0 step 1.0

    //Perform an operation on each x value (much more effective, than numpy)
    val y = x.map { it ->
        val value = it.pow(2) + it + 1
        value + chain.next() * sqrt(value)
    }
    // this will also work, but less effective:
    // val y = x.pow(2)+ x + 1 + chain.nextDouble()

    // create same errors for all xs
    val yErr = y.map { sqrt(it) }//RealVector.same(x.size, sigma)

    // compute differentiable chi^2 sum for given model ax^2 + bx + c
    val chi2: DifferentiableExpression<Float64> = Double.autodiff.chiSquaredExpression(x, y, yErr) { arg ->
        //bind variables to autodiff context
        val a = bindSymbol(a)
        val b = bindSymbol(b)
        //Include default value for c if it is not provided as a parameter
        val c = bindSymbolOrNull(c) ?: one
        a * arg.pow(2) + b * arg + c
    }

    //minimize the chi^2 in given starting point. Derivatives are not required, they are already included.
    val result = chi2.optimizeWith(
        CMOptimizer,
        mapOf(a to 1.5, b to 0.9, c to 1.0),
        attributesBuilder = {
            minimize()
        }
    )

    //display a page with plot and numerical results
    val page = Plotly.page {
        plot {
            scatter {
                mode = ScatterMode.markers
                x(x)
                y(y)
                error_y {
                    array = y


lved);
    }

    #[test]
    fn test_challenge_2_fast_forward() {
        let parsed = parse_input(include_str!("../input.txt"));
        let solved_1 = solve_1(&parsed);
        let solved = solve_2_fast_forward(&parsed, solved_1);
        assert_eq!(54142584, solved);
    }

    #[test]
    fn test_challenge_2_fast_backward() {
        let parsed = parse_input(include_str!("../input.txt"));
        let solved_1 = solve_1(&parsed);
        let solved = solve_2_fast_backward(&parsed, solved_1);
        assert_eq!(54142584, solved);
    }
}
//
// Tests
//

pub use crate::{ PixelBuffer, PixelBufferError };
pub use crate::grayscale::GrayscalePixelBuffer;
pub use grapho_color::DigitalGrayscaleColor;

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

    #[test]
    fn empty_buffer() {
        let buffer = GrayscalePixelBuffer::new(2, 2, None, Some("Y"));
        assert_eq!(buffer.data.len(), 4);
        assert_eq!(buffer.data[0], 0);
        assert_eq!(buffer.width, 2);
        assert_eq!(buffer.height, 2);
        assert_eq!(buffer.stride, 2);
        assert_eq!(buffer.get_width(), 2);
        assert_eq!(buffer.get_height(), 2);
        assert_eq!(buffer.get_stride(), 2);
    }

    #[test]
    fn prefilled_buffer() {
        let data = vec![0, 255, 64, 0];
        let copy = data.clone();
        let buffer = GrayscalePixelBuffer::new_with_data(2, 2, data, None, Some("Y")).unwrap();
        assert_eq!(buffer.data.len(), 4);
        for x in 0..buffer.data.len() {
            assert_eq!(copy[x], buffer.data[x]);
        }
    }

    #[test]
    fn bg_buffer() {
        let buffer = GrayscalePixelBuffer::new_with_background(
            2, 2,
            DigitalGrayscaleColor{ v: 255 },
            None, Some("Y")
        );
        assert_eq!(buffer.data.len(), 4);
        for x in 0..4 {
            assert_eq!(buffer.data[x], 255);
        }
    }

    #[test]
    fn bg_buffer_stride() {
        let buffer = GrayscalePixelBuffer::new_with_background(
            2, 2,
            DigitalGrayscaleColor{ v: 255 },
            Some(4), Some("Y")
        );

        assert_eq!(buffer.data.len(), 8);
        for y in 0..2 {
            for x in 0..2 {
                assert_eq!(buffer.data[x + y * 4 + 0], 255, "x: {}, y: {}", x, y);
            }
            for p in 3..4 {
                assert_eq!(buffer.data[p + y * 4], 0);
            }
        }
    }

    #[test]
    fn set_pixel() {
        let mut buffer = GrayscalePixelBuffer::new(2, 2, None, Some("Y"));
        assert_eq!(buffer.data[3], 0);

        match buffer.set_pixel(1, 1, DigitalGrayscaleColor{ v: 255 }) {
            Err(_error) => assert!(false),
            _ => assert!(true)
        }

        match buffer.set_pixel(2, 0, DigitalGrayscaleColor{ v: 255 }) {
            Err(error) => assert_eq!(error, PixelBufferError::RequestOutOfBounds),
            _ => assert!(false)
        }

        assert_eq!(buffer.data[3], 255);
    }

    #[test]
    fn get_pixel()


art' as a;
f() {
  return const {...a.c};
}''');
  }
}
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:analyzer/src/error/codes.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';

import '../dart/resolution/context_collection_resolution.dart';

main() {
  defineReflectiveSuite(() {
    defineReflectiveTests(NonConstantMapValueFromDeferredLibraryTest);
  });
}

@reflectiveTest
class NonConstantMapValueFromDeferredLibraryTest
    extends PubPackageResolutionTest
    with NonConstantMapValueFromDeferredLibraryTestCases {}

mixin NonConstantMapValueFromDeferredLibraryTestCases
    on PubPackageResolutionTest {
  @failingTest
  test_const_ifElement_thenTrue_elseDeferred() async {
    // reports wrong error code
    newFile('$testPackageLibPath/lib1.dart', r'''
const int c = 1;''');
    await assertErrorsInCode(
      r'''
import 'lib1.dart' deferred as a;
const cond = true;
var v = const { if (cond) 'a': 'b' else 'c' : a.c};
''',
      [
        error(
          CompileTimeErrorCode.nonConstantMapValueFromDeferredLibrary,
          99,
          3,
        ),
      ],
    );
  }

  test_const_ifElement_thenTrue_thenDeferred() async {
    newFile('$testPackageLibPath/lib1.dart', r'''
const int c = 1;''');
    await assertErrorsInCode(
      r'''
import 'lib1.dart' deferred as a;
const cond = true;
var v = const { if (cond) 'a' : a.c};
''',
      [
        error(
          CompileTimeErrorCode.nonConstantMapValueFromDeferredLibrary,
          87,
          1,
        ),
      ],
    );
  }

  test_const_topLevel_deferred() async {
    newFile('$testPackageLibPath/lib1.dart', r'''
const int c = 1;''');
    await assertErrorsInCode(
      r'''
import 'lib1.dart' deferred as a;
var v = const {'a' : a.c};
''',
      [
        error(
          CompileTimeErrorCode.nonConstantMapValueFromDeferredLibrary,
          57,
          1,
        ),
      ],
    );
  }

  test_const_topLevel_deferred_nested() async {
    newFile('$testPackageLibPath/lib1.dart', r'''
const int c = 1;''');
    await assertErrorsInCode(
      r'''
import 'lib1.dart' deferred as a;
var v = const {'a' : a.c + 1};
''',
      [
        error(
          CompileTimeErrorCode.nonConstantMapValueFromDeferredLibrary,
          57,
          1,
        ),
      ],
    );
  }
}
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:analyzer/src/error/codes.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';

import '../dart/resolution/context_collection_resolution.dart';

main() {
  defineReflectiveSuite(() {
    defineReflectiveTests(NotNullAwareNullSpreadTest);
  });
}


   Transmitter trans = device.getTransmitter();
            trans.close();
            if (! expectingTransmitters) {
                out("no exception on getting Transmitter");
                succeeded = false;
            }
        } catch (MidiUnavailableException e) {
            if (expectingTransmitters) {
                out("Exception on getting Transmitter: " + e);
                succeeded = false;
            }
        }
        return succeeded;
    }

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

import javax.sound.midi.MidiDevice;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.Sequencer;
import javax.sound.midi.Synthesizer;

/**
 * @test
 * @key sound
 * @bug 4914667
 * @summary Closing and reopening MIDI IN device on Linux throws
 *          MidiUnavailableException
 */
public class Reopen {

    private static boolean isTestExecuted;
    private static boolean isTestPassed;

    /*
     * run manually:
     * java Reopen 100 in      for 100 iterations on the MIDI IN device
     * java Reopen 16 out      for 16 iterations on the MIDI OUT device
     */
    public static void main(String[] args) throws Exception {
        if (args.length == 0) {
            doAllTests();
        } else if (args.length == 2) {
            int numIterations = Integer.parseInt(args[0]);
            if (args[1].equals("in")) {
                doTest(numIterations, true);
            } else {
                doTest(numIterations, false);
            }
        } else {
            out("usage: java Reopen <iterations> in|out");
        }
    }

    private static void doAllTests() throws Exception {
        out("#4914667: Closing and reopening MIDI IN device on Linux throws MidiUnavailableException");
        boolean success = true;
        try {
            success &= doTest(20, true); // MIDI IN
            success &= doTest(20, false); // MIDI OUT
            isTestExecuted = true;
        } catch (Exception e) {
            out(e);
            isTestExecuted = false;
        }
        isTestPassed = success;
        if (isTestExecuted) {
            if (isTestPassed) {
                out("Test PASSED.");
            } else {
                throw new Exception("Test FAILED.");
            }
        } else {
            out("Test NOT FAILED");
        }
    }

    private static boolean doTest(int numIterations, boolean input) throws Exception {
        MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo();
        MidiDevice outDevice = null;
        MidiDevice inDevice = null;
        for (int i = 0; i < infos.length; i++) {
            MidiDevice device = MidiSystem.getMidiDevice(infos[i]);
            if (! (device instanceof Sequencer) &&
                ! (device instanceof Synthesizer)) {
                if (device.getMaxRece


 * @date 2020/9/8
 */
fun Paint.applyConfig(
    imageInfo: ImageInfo,
    config: WaterMark?,
    isScale: Boolean = true
): Paint {
    val size = config?.textSize ?: 14f
    textSize = if (isScale) size else size * imageInfo.scaleX
    color = config?.textColor ?: Color.RED
    alpha = config?.alpha ?: 128
    style = config?.textStyle?.obtainSysStyle() ?: Paint.Style.FILL
    typeface =
        Typeface.create(typeface, config?.textTypeface?.obtainSysTypeface() ?: Typeface.NORMAL)
    isAntiAlias = true
    isDither = true
    textAlign = Paint.Align.CENTER
    // todo setShadowLayer(textSize / 2, 0f, 0f, color)
    return this
}

fun TextPaint.applyConfig(
    imageInfo: ImageInfo,
    config: WaterMark?,
    isScale: Boolean = true
): TextPaint {
    return (this as Paint).applyConfig(imageInfo, config, isScale) as TextPaint
}
package me.rosuh.easywatermark.data.repo

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.withContext
import me.rosuh.easywatermark.data.db.dao.TemplateDao
import me.rosuh.easywatermark.data.model.entity.Template
import javax.inject.Inject

class TemplateRepository @Inject constructor(
    private val templateDao: TemplateDao?
) {

    fun checkIfIsDaoNull(): Boolean {
        return templateDao == null
    }

    fun getAllTemplate(): Flow<List<Template>> {
        return templateDao?.getAllTemplate() ?: flow {
            emit(listOf())
        }
    }

    suspend fun insertTemplate(template: Template) = withContext(Dispatchers.IO) {
        templateDao?.insertTemplate(template)
    }

    suspend fun deleteTemplate(template: Template) = withContext(Dispatchers.IO) {
        templateDao?.deleteTemplate(template)
    }

    suspend fun updateTemplate(template: Template) = withContext(Dispatchers.IO) {
        templateDao?.updateTemplate(template)
    }
}package me.rosuh.easywatermark.data.model

import android.graphics.Paint
import android.widget.TextView

sealed class TextPaintStyle : SerializableSealClass<Int> {

    abstract fun applyStyle(tv: TextView?)

    abstract fun obtainSysStyle(): Paint.Style

    object Fill : TextPaintStyle() {
        override fun applyStyle(tv: TextView?) {
            tv?.paint?.style = Paint.Style.FILL
        }

        override fun obtainSysStyle(): Paint.Style {
            return Paint.Style.FILL
        }

        override fun serializeKey(): Int {
            return 0
        }
    }

    object Stroke : TextPaintStyle() {
        override fun applyStyle(tv: TextView?) {
            tv?.paint?.style = Paint.Style.STROKE
        }

        override fun obtainSysStyle(): Paint.Style {
            return Paint.Style.STROKE
        }

        override fun serializeKey(): Int {
            return 1
        }
    }

    companion object {
        fun obtainSealedClass(key: Int): TextPaintStyle {
            return when (key) {
                0 -> Fill
                1 -> Stroke
                else -> throw IllegalArgumentException("No such key for TextPaintStyle")
            }
        }
    }
}
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework

@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
    kotlin("multiplatform")
    kotlin("native.cocoapods")
    alias(libs.plugins.androidLibrary)
    alias(libs.plugins.gradle.mavenpublish)
}

version = "0.1.2"

kotlin {

    jvmToolchain(11)
    android {
        publi


setAddress(rs.getString("address"));
				restaurant.setTelephone(rs.getString("telephone"));
				restaurant.setCity(rs.getString("city"));
				restaurant.setIdu(rs.getInt("idu"));
				restaurant.setGradesAverage(rs.getFloat("gradesAverage"));
				restaurant.setMinPrice(rs.getFloat("minPrice"));
				restaurant.setContactEmail(rs.getString("contactemail"));
				restaurant.setMaxPrice(rs.getFloat("maxPrice"));
				restaurant.setBikeFriendly(rs.getInt("bikeFriendly"));
				restaurant.setAvailable(rs.getInt("available"));
				restaurant.setDeliveryTime(rs.getInt("deliveryTime"));
				restaurant.setDeliveryPrice(rs.getFloat("deliveryPrice"));
				restaurant.setImage(rs.getString("image"));
				restaurants.add(restaurant);

				logger.info("fetching restaurants: "+restaurant.getId());
			}

		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return restaurants;
	}

	@Override
	public long add(Restaurant restaurant) {
		long id=-1;
		long lastid=-1;
		if (conn != null){

			Statement stmt;

			try {
				stmt = conn.createStatement();
				ResultSet rs = stmt.executeQuery("SELECT * FROM sqlite_sequence WHERE name ='restaurants'");
				if (!rs.next()) return -1;
				lastid=rs.getInt("seq");

			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

			try {
				stmt = conn.createStatement();
				stmt.executeUpdate("INSERT INTO restaurants (name,description,address,telephone,idu,gradesAverage,city,minPrice,contactemail,maxPrice,bikeFriendly,available, deliveryTime, deliveryPrice, image) VALUES('"
									+restaurant.getName()+"','"+restaurant.getDescription()+"','" +restaurant.getAddress()+"','" + restaurant.getTelephone() + "',"
									+ restaurant.getIdu() + "," + restaurant.getGradesAverage()+",'"+ restaurant.getCity() +"',"+ restaurant.getMinPrice() +",'" + restaurant.getContactEmail() + "',"
									+ restaurant.getMaxPrice() + "," + restaurant.getBikeFriendly() +"," + restaurant.getAvailable()+"," + restaurant.getDeliveryTime()+"," + restaurant.getDeliveryPrice()+",'" + restaurant.getImage() + "')");

			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

			try {
				stmt = conn.createStatement();
				ResultSet rs = stmt.executeQuery("SELECT * FROM sqlite_sequence WHERE name ='restaurants'");
				if (!rs.next()) return -1;
				id=rs.getInt("seq");
				if (id<=lastid) return -1;

				logger.info("CREATING restaurant("+id+"): "+restaurant.getName());
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}
		return id;
	}

	@Override
	public boolean update(Restaurant restaurant) {
		boolean done = false;
		if (conn != null){

			Statement stmt;
			try {
				stmt = conn.createStatement();
				stmt.executeUpdate("UPDATE restaurants SET name='"+restaurant.getName()
				+"', description='"+restaurant.getDescription()
				+"', address='"+restaurant.getAddress()
				+"', telephone='"+restaurant.getTelephone()
				+"', idu="+restaurant.getIdu()
				+", gradesAverage="+restaurant.getGradesAver


 ppcVar1;

        if (arg1 < 4)
        {
            if (arg1 == 1)
            {
                ppcVar1 = child2;

                if (ppcVar1 != null)
                {
                    do
                    {
                        if (ppcVar1.id == 1) break;

                        ppcVar1 = ppcVar1.child;
                    } while (ppcVar1 != null);

                    if (ppcVar1 != null)
                    {
                        ((GuardTower2)ppcVar1).state = _GUARDTOWER2_TYPE.Type1;
                        GameManager.instance.FUN_30CB0(ppcVar1, 8);
                    }
                }
            }
        }
        else
        {
            if (arg1 == 8)
                FUN_32B90((uint)arg2);
        }

        return 0;
    }
}


currency][![cat-filesystem-badge]][cat-filesystem]                                  |
| [将绘制分形工作，分派到线程池][ex-threadpool-fractal]                  | [![threadpool-badge]][threadpool] [![num-badge]][num] [![num_cpus-badge]][num_cpus] [![image-badge]][image]       | [![cat-concurrency-badge]][cat-concurrency][![cat-science-badge]][cat-science][![cat-rendering-badge]][cat-rendering] |
| [并行，改变数组的元素][ex-rayon-iter-mut]                              | [![rayon-badge]][rayon]                                                                                | [![cat-concurrency-badge]][cat-concurrency]                                                                           |
| [如果集合的任何或所有元素，与给定物匹配，则并行测试][ex-rayon-any-all] | [![rayon-badge]][rayon]                                                                                | [![cat-concurrency-badge]][cat-concurrency]                                                                           |
| [并行，使用给定物搜索项][ex-rayon-parallel-search]                     | [![rayon-badge]][rayon]                                                                                | [![cat-concurrency-badge]][cat-concurrency]                                                                           |
| [并行，排序 vector][ex-rayon-parallel-sort]                            | [![rayon-badge]][rayon] [![rand-badge]][rand]                                                                     | [![cat-concurrency-badge]][cat-concurrency]                                                                           |
| [并行，缩小地图][ex-rayon-map-reduce]                                  | [![rayon-badge]][rayon]                                                                                | [![cat-concurrency-badge]][cat-concurrency]                                                                           |
| [并行，生成 JPG 缩略图][ex-rayon-thumbnails]                           | [![rayon-badge]][rayon] [![glob-badge]][glob] [![image-badge]][image]                                             | [![cat-concurrency-badge]][cat-concurrency][![cat-filesystem-badge]][cat-filesystem]                                  |

[ex-crossbeam-spawn]: concurrency/threads.zh.html#spawn-a-short-lived-thread
[ex-global-mut-state]: concurrency/threads.zh.html#maintain-global-mutable-state
[ex-threadpool-walk]: concurrency/threads.zh.html#calculate-sha1-sum-of-iso-files-concurrently
[ex-threadpool-fractal]: concurrency/threads.zh.html#draw-fractal-dispatching-work-to-a-thread-pool
[ex-rayon-iter-mut]: concurrency/parallel.zh.html#mutate-the-elements-of-an-array-in-parallel
[ex-rayon-any-all]: concurrency/parallel.zh.html#test-in-parallel-if-any-or-all-elements-of-a-collection-match-a-given-predicate
[ex-rayon-parallel-search]: concurrency/parallel.zh.html#search-items-using-given-predicate-in-parallel
[ex-rayon-parallel-sort]: concurrency/parallel.zh.html#sort-a-vector-in-parallel
[ex-rayon-map-reduce]: concurrency/parallel.zh.html#map-reduce-in-parallel
[ex-rayon-th


5 |
| Mud Slap | ![ground](../assets/types/ground.png "Ground"){: width="48"} | ![special](../assets/move_category/special.png "Special"){: width="36"} | 20 | 100 | 10 |
| Icy Wind | ![ice](../assets/types/ice.png "Ice"){: width="48"} | ![special](../assets/move_category/special.png "Special"){: width="36"} | 55 | 95 | 15 |
| Rollout | ![rock](../assets/types/rock.png "Rock"){: width="48"} | ![physical](../assets/move_category/physical.png "Physical"){: width="36"} | 30 | 90 | 20 |
| Helping Hand | ![normal](../assets/types/normal.png "Normal"){: width="48"} | ![status](../assets/move_category/status.png "Status"){: width="36"} | — | — | 20 |
| Last Resort | ![normal](../assets/types/normal.png "Normal"){: width="48"} | ![physical](../assets/move_category/physical.png "Physical"){: width="36"} | 140 | 100 | 5 |
| Sucker Punch | ![dark](../assets/types/dark.png "Dark"){: width="48"} | ![physical](../assets/move_category/physical.png "Physical"){: width="36"} | 70 | 100 | 5 |
| Zen Headbutt | ![psychic](../assets/types/psychic.png "Psychic"){: width="48"} | ![physical](../assets/move_category/physical.png "Physical"){: width="36"} | 80 | 90 | 15 |

# #335 Zangoose (Cat Ferret Pokémon)

| Official Artwork | Shiny Artwork |
|------------------|---------------|
| ![Official Artwork](../assets/sprites/zangoose/official.png "Zangoose") | ![Shiny Artwork](../assets/sprites/zangoose/official_shiny.png "Zangoose") |

It has feuded with SEVIPER for many generations. Its sharp claws are its biggest weapons.

---

## Media

### Default Sprites

| Front | Shiny | Back | Shiny |
|-------|-------|------|-------|
| ![Zangoose](../assets/sprites/zangoose/front.gif "Zangoose: It has feuded with SEVIPER for many generations. Its sharp claws are its biggest weapons.") | ![Zangoose](../assets/sprites/zangoose/front_shiny.png "Zangoose: It has feuded with SEVIPER for many generations. Its sharp claws are its biggest weapons.") | ![Zangoose](../assets/sprites/zangoose/back.png "Zangoose: It has feuded with SEVIPER for many generations. Its sharp claws are its biggest weapons.") | ![Zangoose](../assets/sprites/zangoose/back_shiny.png "Zangoose: It has feuded with SEVIPER for many generations. Its sharp claws are its biggest weapons.") |

### Cries

Latest (Gen VI+):

<audio controls>
<source src='../../assets/cries/zangoose/latest.ogg' type='audio/ogg'>
  Your browser does not support the audio element


work.jpg"
      },
      "link": "https://droidkaigi.jp/fm/episode/5",
      "publishedAt": "2020-12-21T03:00:00Z",
      "status": "submitted"
    },
    {
      "id": "f725b41c-4375-43b5-8237-393370441c00",
      "externalId": {
        "value": "6",
        "serviceName": "droidkaigi_fm"
      },
      "title": "6. JFrog JCenter/Bintrayのサービス終了に寄せて",
      "summary": "hidey、ymnd、e10dokupの3人でJFrogのJCenter/Bintray等のサービス終了とそれに合わせたライブラリ使用者側、開発者側の対応について話しました。",
      "duration": 1608,
      "durationLabel": "26:48",
      "speakers": [
        {
          "name": "hidey",
          "iconUrl": "https://droidkaigi.jp/fm/images/actors/hidey.jpg"
        },
        {
          "name": "e10dokup",
          "iconUrl": "https://droidkaigi.jp/fm/images/actors/e10dokup.png"
        },
        {
          "name": "ymnd",
          "iconUrl": "https://droidkaigi.jp/fm/images/actors/ymnd.jpg"
        }
      ],
      "thumbnail": {
        "smallUrl": "https://droidkaigi.jp/fm/images/artwork.jpg",
        "standardUrl": "https://droidkaigi.jp/fm/images/artwork.jpg",
        "largeUrl": "https://droidkaigi.jp/fm/images/artwork.jpg"
      },
      "link": "https://droidkaigi.jp/fm/episode/6",
      "publishedAt": "2020-12-21T03:00:00Z",
      "status": "submitted"
    },
    {
      "id": "1bac71a9-d201-4739-b61b-0c502425c904",
      "externalId": {
        "value": "2",
        "serviceName": "droidkaigi_fm"
      },
      "title": "2. Android 11 Talks",
      "summary": "#1の続編です。引き続きKeithYokoma、ymnd、e10dokupの3名で、Android 11 Talksで取り上げられた内容についてお話しました。",
      "duration": 1937,
      "durationLabel": "32:17",
      "speakers": [
        {
          "name": "KeithYokoma",
          "iconUrl": "https://droidkaigi.jp/fm/images/actors/keithyokoma.jpg"
        },
        {
          "name": "e10dokup",
          "iconUrl": "https://droidkaigi.jp/fm/images/actors/e10dokup.png"
        },
        {
          "name": "ymnd",
          "iconUrl": "https://droidkaigi.jp/fm/images/actors/ymnd.jpg"
        }
      ],
      "thumbnail": {
        "smallUrl": "https://droidkaigi.jp/fm/images/artwork.jpg",
        "standardUrl": "https://droidkaigi.jp/fm/images/artwork.jpg",
        "largeUrl": "https://droidkaigi.jp/fm/images/artwork.jpg"
      },
      "link": "https://droidkaigi.jp/fm/episode/2",
      "publishedAt": "2020-07-08T15:00:00Z",
      "status": "submitted"
    }
  ],


    pub size: u32,
    pub padding: u32,
}
unsafe impl ByteValued for WriteOut {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct StatfsOut {
    pub st: Kstatfs,
}
unsafe impl ByteValued for StatfsOut {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FsyncIn {
    pub fh: u64,
    pub fsync_flags: u32,
    pub padding: u32,
}
unsafe impl ByteValued for FsyncIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SetxattrIn {
    pub size: u32,
    pub flags: u32,
}
unsafe impl ByteValued for SetxattrIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct GetxattrIn {
    pub size: u32,
    pub padding: u32,
}
unsafe impl ByteValued for GetxattrIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct GetxattrOut {
    pub size: u32,
    pub padding: u32,
}
unsafe impl ByteValued for GetxattrOut {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct LkIn {
    pub fh: u64,
    pub owner: u64,
    pub lk: FileLock,
    pub lk_flags: u32,
    pub padding: u32,
}
unsafe impl ByteValued for LkIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct LkOut {
    pub lk: FileLock,
}
unsafe impl ByteValued for LkOut {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct AccessIn {
    pub mask: u32,
    pub padding: u32,
}
unsafe impl ByteValued for AccessIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct InitIn {
    pub major: u32,
    pub minor: u32,
    pub max_readahead: u32,
    pub flags: u32,
}
unsafe impl ByteValued for InitIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct InitOut {
    pub major: u32,
    pub minor: u32,
    pub max_readahead: u32,
    pub flags: u32,
    pub max_background: u16,
    pub congestion_threshold: u16,
    pub max_write: u32,
    pub time_gran: u32,
    pub max_pages: u16,
    pub padding: u16,
    pub unused: [u32; 8],
}
unsafe impl ByteValued for InitOut {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct InterruptIn {
    pub unique: u64,
}
unsafe impl ByteValued for InterruptIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BmapIn {
    pub block: u64,
    pub blocksize: u32,
    pub padding: u32,
}
unsafe impl ByteValued for BmapIn {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BmapOut {
    pub block: u64,
}
unsafe impl ByteValued for BmapOut {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IoctlIn {
    pub fh: u64,
    pub flags: u32,
    pub cmd: u32,
    pub arg: u64,
    pub in_


]{" + b5.q + "}}";
          }
        } else {
          if (b5.q) {
            res += "{\\vphantom{X}}";
            res += "_{\\smash[t]{" + b5.q + "}}";
          }

          if (b5.d) {
            res += "{\\vphantom{X}}";
            res += "^{" + b5.d + "}";
          }
        }

        break;

      case 'rm':
        res = "\\mathrm{" + buf.p1 + "}";
        break;

      case 'text':
        if (buf.p1.match(/[\^_]/)) {
          buf.p1 = buf.p1.replace(" ", "~").replace("-", "\\text{-}");
          res = "\\mathrm{" + buf.p1 + "}";
        } else {
          res = "\\text{" + buf.p1 + "}";
        }

        break;

      case 'roman numeral':
        res = "\\mathrm{" + buf.p1 + "}";
        break;

      case 'state of aggregation':
        res = "\\mskip2mu " + texify._goInner(buf.p1);
        break;

      case 'state of aggregation subscript':
        res = "\\mskip1mu " + texify._goInner(buf.p1);
        break;

      case 'bond':
        res = texify._getBond(buf.kind_);

        if (!res) {
          throw ["MhchemErrorBond", "mhchem Error. Unknown bond type (" + buf.kind_ + ")"];
        }

        break;

      case 'frac':
        var c = "\\frac{" + buf.p1 + "}{" + buf.p2 + "}";
        res = "\\mathchoice{\\textstyle" + c + "}{" + c + "}{" + c + "}{" + c + "}";
        break;

      case 'pu-frac':
        var d = "\\frac{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        res = "\\mathchoice{\\textstyle" + d + "}{" + d + "}{" + d + "}{" + d + "}";
        break;

      case 'tex-math':
        res = buf.p1 + " ";
        break;

      case 'frac-ce':
        res = "\\frac{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        break;

      case 'overset':
        res = "\\overset{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        break;

      case 'underset':
        res = "\\underset{" + texify._goInner(buf.p1) + "}{" + texify._goInner(buf.p2) + "}";
        break;

      case 'underbrace':
        res = "\\underbrace{" + texify._goInner(buf.p1) + "}_{" + texify._goInner(buf.p2) + "}";
        break;

      case 'color':
        res = "{\\color{" + buf.color1 + "}{" + texify._goInner(buf.color2) + "}}";
        break;

      case 'color0':
        res = "\\color{" + buf.color + "}";
        break;

      case 'arrow':
        var b6 = {
          rd: texify._goInner(buf.rd),
          rq: texify._goInner(buf.rq)
        };

        var arrow = "\\x" + texify._getArrow(buf.r);

        if (b6.rq) {
          arrow += "[{" + b6.rq + "}]";
        }

        if (b6.rd) {
          arrow += "{" + b6.rd + "}";
        } else {
          arrow += "{}";
        }

        res = arrow;
        break;

      case 'operator':
        res = texify._getOperator(buf.kind_);
        break;

      case '1st-level escape':
        res = buf.p1 + " "; // &, \\\\, \\hlin

        break;

      case 'space':
        res = " ";
        break;


import platform

def windows_only(func):
    if platform.system() != 'Windows':
        return lambda *args, **kwargs: None
    return func

@windows_only
def hide_file(path):
    """
    Set the hidden attribute on a file or directory.

    From http://stackoverflow.com/questions/19622133/

    `path` must be text.
    """
    import ctypes
    __import__('ctypes.wintypes')
    SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW
    SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD
    SetFileAttributes.restype = ctypes.wintypes.BOOL

    FILE_ATTRIBUTE_HIDDEN = 0x02

    ret = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN)
    if not ret:
        raise ctypes.WinError()


; Eversong Woods|R|BloodElf|C|Paladin|
T Help Ranger Valanna!|QID|9145|M|69.39,15.19|Z|1942; Ghostlands|N|To Ranger Valanna.\n[color=FF0000]NOTE: [/color]Head back towards Suncrown Village. If you stick to the edge of the mountain and follow it east towards the lake, you can circumvent the Village.|
A Dealing with Zeb'Sora|QID|9143|M|69.39,15.19|Z|1942; Ghostlands|N|From Ranger Valanna.|
A Forgotten Rituals|QID|9157|M|72.30,19.10|Z|1942; Ghostlands|N|From Geranis Whitemorn on the small island in the lake.|
C Forgotten Rituals|QID|9157|M|70.04,20.69|Z|1942; Ghostlands|L|22674 8|N|Dive into the lake, locate and loot the Glistening Mud. They are all around the island.|
T Forgotten Rituals|QID|9157|M|72.30,19.10|Z|1942; Ghostlands|N|To Geranis Whitemorn.|
A Vanquishing Aquantion|QID|9174|M|72.30,19.10|Z|1942; Ghostlands|N|From Geranis Whitemorn.|PRE|9157|
K Aquantion|ACTIVE|9174|M|71.34,14.87|Z|1942; Ghostlands|QO|1|N|Swim towards the Altar of Tidal Mastery and click on it to summon Aquantion. Kill him once he spawns.|
T Vanquishing Aquantion|QID|9174|M|72.30,19.10|Z|1942; Ghostlands|N|To Geranis Whitemorn.|
C Dealing with Zeb'Sora|QID|9143|M|76.02,12.85|Z|1942; Ghostlands|L|22639 6|N|Kill any troll you see in Zeb'Sora to get their ears.|
R Farstrider Enclave|AVAILABLE|9158^9215^9274|M|73.83,32.11|Z|1942; Ghostlands|N|Follow the shoreline south to the big building.|
A Bearers of the Plague|QID|9158|M|72.49,32.14|Z|1942; Ghostlands|N|From Farstrider Sedina at the Farstrider Enclave.|
r Housekeeping|AVAILABLE|9158^9215^9274|M|72.12,32.04|Z|1942; Ghostlands|N|You can repair and empty your bags at Narina.|IZ|3496; Farstrider Enclave|
A Bring Me Kel'gash's Head!|QID|9215|M|72.22,31.18|Z|1942; Ghostlands|ELITE|N|[color=00FFFF]Group of 2 suggested or level up to solo[/color]\nFrom the Wanted Poster.\n[color=FF0000]NOTE: [/color]This quest can be almost impossible to solo. Pick it up in case you find help along the way.|RANK|3|
A Spirits of the Drowned|QID|9274|M|72.21,29.76|Z|1942; Ghostlands|N|From Ranger Krenn'an.|
K Spirits of the Drowned|ACTIVE|9274|M|71.04,24.00|Z|1942; Ghostlands|QO|1;2|N|Kill any ghost you see floating around in the lake.|S|
T Dealing with Zeb'Sora|QID|9143|M|69.39,15.19|Z|1942; Ghostlands|N|Return to Ranger Valanna.|
A Report to Captain Helios|QID|9146|M|69.39,15.19|Z|1942; Ghostlands|N|From Ranger Valanna.|PRE|9143|
K Spirits of the Drowned|ACTIVE|9274|M|71.04,


[1]);
	btScalar lz = btScalar(2.) * (half_extents[2] + margin[2]);

	inertia.setValue(mass / (btScalar(12.0)) * (ly * ly + lz * lz),
								   mass / (btScalar(12.0)) * (lx * lx + lz * lz),
								   mass / (btScalar(12.0)) * (lx * lx + ly * ly));
}
/* Copyright (c) 2011 Khaled Mamou (kmamou at gmail dot com)
 All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 3. The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif

#include "btConvexHullComputer.h"
#include "vhacdVolume.h"
#include <algorithm>
#include <float.h>
#include <math.h>
#include <queue>
#include <string.h>

#ifdef _MSC_VER
#pragma warning(disable:4458 4100)
#endif

namespace VHACD {
/********************************************************/
/* AABB-triangle overlap test code                      */
/* by Tomas Akenine-M�ller                              */
/* Function: int32_t triBoxOverlap(float boxcenter[3],      */
/*          float boxhalfsize[3],float triverts[3][3]); */
/* History:                                             */
/*   2001-03-05: released the code in its first version */
/*   2001-06-18: changed the order of the tests, faster */
/*                                                      */
/* Acknowledgement: Many thanks to Pierre Terdiman for  */
/* suggestions and discussions on how to optimize code. */
/* Thanks to David Hunt for finding a ">="-bug!         */
/********************************************************/

#define X 0
#define Y 1
#define Z 2
#define FINDMINMAX(x0, x1, x2, min, max) \
    min = max = x0;                      \
    if (x1 < min)                        \
        min = x1;                        \
    if (x1 > max)                        \
        max = x1;                        \
    if (x2 < min)                        \
        min = x2;                        \
    if (x2 > max)                        \
        max = x2;

#define AXISTEST_X01(a, b, fa, fb)                   \
    p0 = a * v0[Y] - b * v0[Z];                      \
    p2 = a * v2[Y] - b * v2[Z];                      \
    if (p0 < p2) {                                   \
        min = p0;                                    \
        max = p2;                                    \
    }                                                \
    else {                                           \
        min = p2;                                    \
        max = p0;                                    \
    }                                                \
    rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \
    if (min > rad || max


al	_mcount
	.align	2
	.p2align 3,,7
	.global	InitSyntaxCtx
	.type	InitSyntaxCtx, %function
InitSyntaxCtx:
	stp	x29, x30, [sp, -32]!
	add	x29, sp, 0
	str	x19, [sp, 16]
	mov	w19, w0
	mov	x0, x30
	bl	_mcount
	ldr	x0, .LC289
	ldr	x1, [x0, w19, sxtw 3]
	cbz	x1, .L602
	ldr	w0, [x1, 672]
	cmp	w0, 20
	bls	.L603
.L584:
	ldr	x19, [sp, 16]
	ldp	x29, x30, [sp], 32
	ret
	.p2align 3
.L603:
	ldr	x2, .LC292
	ldrb	w0, [x2,w0,uxtw]
	adr	x2, .Lrtx588
	add	x0, x2, w0, sxtb #2
	br	x0
.Lrtx588:
	.section	.rodata
	.align	0
	.align	2
.L588:
	.byte	(.L587 - .Lrtx588) / 4
	.byte	(.L589 - .Lrtx588) / 4
	.byte	(.L590 - .Lrtx588) / 4
	.byte	(.L591 - .Lrtx588) / 4
	.byte	(.L584 - .Lrtx588) / 4
	.byte	(.L592 - .Lrtx588) / 4
	.byte	(.L593 - .Lrtx588) / 4
	.byte	(.L584 - .Lrtx588) / 4
	.byte	(.L594 - .Lrtx588) / 4
	.byte	(.L595 - .Lrtx588) / 4
	.byte	(.L596 - .Lrtx588) / 4
	.byte	(.L596 - .Lrtx588) / 4
	.byte	(.L596 - .Lrtx588) / 4
	.byte	(.L597 - .Lrtx588) / 4
	.byte	(.L584 - .Lrtx588) / 4
	.byte	(.L598 - .Lrtx588) / 4
	.byte	(.L599 - .Lrtx588) / 4
	.byte	(.L600 - .Lrtx588) / 4
	.byte	(.L584 - .Lrtx588) / 4
	.byte	(.L584 - .Lrtx588) / 4
	.byte	(.L601 - .Lrtx588) / 4
	.text
	.p2align 3
.L601:
	add	x0, x1, 294912
	add	x1, x1, 680
	add	x0, x0, 2584
	bl	USERDEC_Init
	b	.L584
	.p2align 3
.L600:
	add	x0, x1, 294912
	add	x1, x1, 680
	add	x0, x0, 2584
	bl	VP9DEC_Init
	b	.L584
	.p2align 3
.L599:
	add	x0, x1, 294912
	add	x1, x1, 680
	add	x0, x0, 2584
	bl	HEVCDEC_Init
	b	.L584
	.p2align 3
.L598:
	add	x0, x1, 294912
	add	x1, x1, 680
	add	x0, x0, 2584
	bl	MVC_DEC_Init


a = random_array((5,4,2,3,7), density=0.6, random_state=rng, dtype=int)
    arr_b = random_array((4,6,3,2), density=0.6, random_state=rng, dtype=int)

    axes = ([2,0,1], [1,3]) # lists have different lengths
    with pytest.raises(ValueError, match="axes lists/tuples must be of the"
                       " same length"):
        arr_a.tensordot(arr_b, axes=axes)

@pytest.mark.parametrize(('actual_shape', 'broadcast_shape'),
                         [((1,3,5,4), (2,3,5,4)), ((2,1,5,4), (6,2,3,5,4)),
                          ((1,1,7,8,9), (4,5,6,7,8,9)), ((1,3), (4,5,3)),
                          ((7,8,1), (7,8,5)), ((3,1), (3,4)), ((1,), (5,)),
                          ((1,1,1), (4,5,6)), ((1,3,1,5,4), (8,2,3,9,5,4)),])
def test_broadcast_to(actual_shape, broadcast_shape):
    rng = np.random.default_rng(23409823)

    arr = random_array(actual_shape, density=0.6, random_state=rng, dtype=int)
    res = arr._broadcast_to(broadcast_shape)
    exp = np.broadcast_to(arr.toarray(), broadcast_shape)
    assert_equal(res.toarray(), exp)

@pytest.mark.parametrize(('shape'), [(4,5,6,7,8), (6,4),
                                     (5,9,3,2), (9,5,2,3,4),])
def test_block_diag(shape):
    rng = np.random.default_rng(23409823)
    sp_x = random_array(shape, density=0.6, random_state=rng, dtype=int)
    den_x = sp_x.toarray()

    # converting n-d numpy array to an array of slices of 2-D matrices,
    # to pass as argument into scipy.linalg.block_diag
    num_slices = int(np.prod(den_x.shape[:-2]))
    reshaped_array = den_x.reshape((num_slices,) + den_x.shape[-2:])
    matrices = [reshaped_array[i, :, :] for i in range(num_slices)]
    exp = block_diag(*matrices)

    res = _block_diag(sp_x)

    assert_equal(res.toarray(), exp)

@pytest.mark.parametrize(('shape'), [(4,5,6,7,8), (6,4),
                                     (5,9,3,2), (9,5,2,3,4),])
def test_extract_block_diag(shape):
    rng = np.random.default_rng(23409823)
    sp_x = random_array(shape, density=0.6, random_state=rng, dtype=int)
    res = _extract_block_diag(_block_diag(sp_x), shape)

    assert_equal(res.toarray(), sp_x.toarray())


 `json:"-"`

	// NullFields is a list of field names (e.g. "Asset") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (s *CreateAssetResponse) MarshalJSON() ([]byte, error) {
	type NoMethod CreateAssetResponse
	raw := NoMethod(*s)
	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}

// CreateAssignedTargetingOptionsRequest: A request listing which
// assigned targeting options of a given targeting type should be
// created and added.
type CreateAssignedTargetingOptionsRequest struct {
	// AssignedTargetingOptions: Required. The assigned targeting options to
	// create and add.
	AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`

	// TargetingType: Required. Identifies the type of this assigned
	// targeting option.
	//
	// Possible values:
	//   "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not
	// specified or is unknown in this version.
	//   "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of
	// related websites or apps).
	//   "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for
	// example, education or puzzle games).
	//   "TARGETING_TYPE_APP" - Target a specific app (for example, Angry
	// Birds).
	//   "TARGETING_TYPE_URL" - Target a specific url (for example,
	// quora.com).
	//   "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time
	// period on a specific day.
	//   "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range
	// (for example, 18-24).
	//   "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the
	// specified regions on a regional location list.
	//   "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the
	// specified points of interest on a proximity location list.
	//   "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for
	// example, female or male).
	//   "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player
	// size for video ads.
	//   "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded
	// content for video ads.
	//   "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific
	// parental status (for example, parent or not a parent).
	//   "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio
	// ads in a specific content instream position (for example, pre-roll,
	// mid-roll, or post-roll).
	//   "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a
	// specific content outstream position.
	//   "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type
	// (for example, tablet or connected TV).
	//   "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or
	// groups of audiences. Singleton field, at most one can exist on a
	// single Lineitem at a time.
	//   "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for
	// example, Chrome).
	//   "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific
	// household income range (for example, top 10%).
	//   "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a


.theme-dark:not(.show-yaml) code.language-yaml.is-loaded::before {
  background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='icon' fill='hsl(20, 1.4%, 59.4%)' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 32 32' style='enable-background:new 0 0 32 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:none;%7D%0A%3C/style%3E%3Cpolygon points='16,22 6,12 7.4,10.6 16,19.2 24.6,10.6 26,12 '/%3E%3Crect id='_x3C_Transparent_Rectangle_x3E_' class='st0' width='32' height='32'/%3E%3C/svg%3E%0A");
}
body.theme-dark:not(.show-yaml) code.language-yaml.is-loaded:hover::before {
  display: none;
}
div:not(.el-embed-image) + .el-embed-image {
  margin-top: 1rem;
}
.el-embed-image {
  margin-top: 0.5rem;
}
.contextual-typography .markdown-preview-section > .el-embed-image > p {
  margin-block-start: 0;
  margin-block-end: 0;
}
.img-grid .markdown-preview-section .el-embed-image img:not([width]),
.img-grid .markdown-preview-section video {
  width: 100%;
}
.img-grid .markdown-preview-section > .el-embed-image > p {
  display: grid;
  grid-column-gap: 0.5rem;
  grid-row-gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.img-grid .markdown-preview-section > .el-embed-image > p > br {
  display: none;
}
.img-grid .markdown-preview-section > .el-embed-image > p > img {
  object-fit: cover;
  align-self: stretch;
}
.img-grid .markdown-preview-section > .el-embed-image > p > .internal-embed img {
  object-fit: cover;
  height: 100%;
}
.img-grid .img-grid-ratio .markdown-preview-section > .el-embed-image > p > .internal-embed img,
.img-grid.img-grid-ratio .markdown-preview-section > .el-embed-image > p > .internal-embed img {
  object-fit: contain;
  height: 100%;
  align-self: center;
}
@media (max-width: 400pt) {
  .el-embed-image {
    margin-top: 0.25rem;
  }
  .img-grid .markdown-preview-section > .el-embed-image > p {
    grid-column-gap: 0.25rem;
  }
}
:root {
  --cards-min-width:180px;
  --cards-max-width:1fr;
  --cards-mobile-width:120px;
  --cards-image-height:400px;
  --cards-padding:1.2em;
  --cards-image-fit:contain;
  --cards-background:transparent;
  --cards-border-width:1px;
}
@media (max-width: 400pt) {
  :root {
    --cards-min-width:var(--cards-mobile-width);
  }
}
.cards.table-100 table.dataview tbody,
.table-100 .cards table.dataview tbody {
  padding: 0.25rem 0.75rem;
}
.cards .el-pre + .


ex_buf__

__thread jmp_buf ex_buf__

Definition ffmpegkit_exception.m:23

exit_program

void exit_program(int ret)

Definition fftools_cmdutils.c:145

swr_opts

__thread AVDictionary * swr_opts

Definition fftools_cmdutils.c:109

match_group_separator

static int match_group_separator(const OptionGroupDef *groups, int nb_groups, const char *opt)

Definition fftools_cmdutils.c:642

show_help_children

void show_help_children(const AVClass *class, int flags)

Definition fftools_cmdutils.c:219

codec_opts

__thread AVDictionary * codec_opts

Definition fftools_cmdutils.c:110

<div class="ttc" id


Shape___00_01Element___00_01f96bbeb63e6d4ce4a2551279de3a9f0e.html#a0adc056cc8ab3d39f8a023085e9ad8c2">   86   using Index = typename Layout::Index;

   87   using LongIndex = typename Layout::LongIndex;

   88

   89   using TensorRef = TensorRef<Element, Layout>;

   90   using TensorCoord = typename Layout::TensorCoord;

<a name="l000


] = mapper
        mapper.extraType()?.let { mappers[mapper.extraType()!!] = mapper }
    }

    fun getNodesOfVersion(
        versionSeparationInfo: VersionSeparationInfo, accessCheck: Boolean = true
    ): MutableMap<String, String> {
        val mapper = mappers[versionSeparationInfo.type]
        check(mapper != null) { "mapper[${versionSeparationInfo.type}] not found" }
        return mapper.getNodesOfVersion(versionSeparationInfo, accessCheck)
    }

    fun separateRepoColdData(versionSeparationInfo: VersionSeparationInfo) {
        val mapper = mappers[versionSeparationInfo.type]
        check(mapper != null) { "mapper[${versionSeparationInfo.type}] not found" }
        mapper.separateRepoSpecialData(versionSeparationInfo)
    }

    fun removeRepoColdData(versionSeparationInfo: VersionSeparationInfo) {
        val mapper = mappers[versionSeparationInfo.type]
        check(mapper != null) { "mapper[${versionSeparationInfo.type}] not found" }
        mapper.removeRepoSpecialData(versionSeparationInfo)
    }

    fun getRestoreNodesOfVersion(versionSeparationInfo: VersionSeparationInfo): MutableMap<String, String> {
        val mapper = mappers[versionSeparationInfo.type]
        check(mapper != null) { "mapper[${versionSeparationInfo.type}] not found" }
        return mapper.getRestoreNodesOfVersion(versionSeparationInfo)
    }

    fun restoreRepoColdData(versionSeparationInfo: VersionSeparationInfo) {
        val mapper = mappers[versionSeparationInfo.type]
        check(mapper != null) { "mapper[${versionSeparationInfo.type}] not found" }
        mapper.restoreRepoSpecialData(versionSeparationInfo)
    }

    fun removeRestoredRepoColdData(versionSeparationInfo: VersionSeparationInfo) {
        val mapper = mappers[versionSeparationInfo.type]
        check(mapper != null) { "mapper[${versionSeparationInfo.type}] not found" }
        mapper.removeRestoredRepoSpecialData(versionSeparationInfo)
    }

    fun getRecoveryPackageVersionData(recoveryInfo: RecoveryNodeInfo): RecoveryVersionInfo {
        val type = RepositoryType.ofValueOrDefault(recoveryInfo.repoType)
        val mapper = mappers[type]
        check(mapper != null) { "mapper[${type}] not found" }
        return mapper.getRecoveryPackageVersionData(recoveryInfo)
    }
}
/*
 * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
 *
 * Copyright (C) 2022 Tencent.  All rights reserved.
 *
 * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
 *
 * A copy of the MIT License is included in this file.
 *
 *
 * Terms of the MIT License:
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS I


是使用[贪婪方法](https://www.geeksforgeeks.org/greedy-algorithms/)。按照以下步骤解决此问题:

*   初始化一个具有尺寸 **N × M** 的[矩阵](https://www.geeksforgeeks.org/multidimensional-arrays-c-cpp/)。
*   按照以下方式开始填充矩阵的每个单元格 **(i，j)** :
    *   对于每个单元格 **(i，j)** ，选择**行【I】**、**列【j】**的最小值，并将其放在单元格 **(i，j)** 处。就这样吧。
    *   从**行【I】**和**列**中减去**min**。
*   完成上述步骤后，打印形成的[矩阵](https://www.geeksforgeeks.org/multidimensional-arrays-c-cpp/)。

下面是上述方法的实现:

## C++

```
// C++ program for the above approach
#include <bits/stdc++.h>
using namespace std;

// Function to generate a matrix with
// sum of each row equal to sum of r[]
// and sum of each column equal to sum of c[]
vector<vector<int> > restoreGem(
    vector<int>& r, vector<int>& c)
{
    // Initialize a matrix
    vector<vector<int> > dp(r.size(),
                            vector<int>(c.size(), 0));

    // Traverse each cell (i, j) of the matrix
    for (int i = 0; i < r.size(); i++) {
        for (int j = 0; j < c.size(); j++) {

            // Assign the minimum of the
            // row or column value
            int m = min(r[i], c[j]);
            dp[i][j] = m;

            // Subtract the minimum from
            // both row and column sum
            r[i] -= m;
            c[j] -= m;
        }
    }

    return dp;
}

void printMatrix(vector<vector<int> > ans,
                 int N, int M)
{

    // Print the matrix obtained
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < M; j++) {
            cout << ans[i][j] << " ";
        }
        cout << endl;
    }
}

// Driver Code
int main()
{
    vector<int> rowSum = { 5, 7, 10 };
    vector<int> colSum = { 8, 6, 8 };

    vector<vector<int> > ans
        = restoreGem(rowSum, colSum);

    printMatrix(ans, rowSum.size(),
                colSum.size());
}
```

## Java 语言(一种计算机语言，尤用于创建网站)

```
// Java program for the above approach
import java.io.*;
class GFG
{

// Function to generate a matrix with
// sum of each row equal to sum of r[]
// and sum of each column equal to sum of c[]
static int[][] restoreGem(int[] r, int[] c)
{

    // Initialize a matrix
    int[][] dp = new int[r.length][c.length];

    // Traverse each cell (i, j) of the matrix
    for (int i = 0; i < r.length; i++)
    {
        for (int j = 0; j < c.length; j++)
        {

            // Assign the minimum of the
            // row or column value
            int m = Math.min(r[i], c[j]);
            dp[i][j] = m;

            // Subtract the minimum from
            // both row and column sum


B2LAXXX12345123451901230111N}{4:\n" + ":16R:GENL\n"
                        + ":20C::CORP//VQ8000V1LOI51000\n"
                        + ":20C::SEME//VQ8000V1LOI51000\n"
                        + ":23G:NEWM\n"
                        + ":22F::CAEV//ACTV\n"
                        + ":22F::CAMV//MAND\n"
                        + ":25D::PROC//COMP\n"
                        + ":16S:GENL\n"
                        +

                        // B1 not present in USECU (B)
                        ":16R:USECU\n"
                        + ":35B:ISIN INE411H01032\n"
                        + ":16R:ACCTINFO\n"
                        + ":97C::SAFE//GENR\n"
                        + ":16S:ACCTINFO\n"
                        + ":16S:USECU\n"
                        + ":16R:CAOPTN\n"
                        + ":13A::CAON//001\n"
                        + ":22F::CAOP//CASH\n"
                        + ":17B::DFLT//Y\n"
                        + ":16R:SECMOVE\n"
                        + ":22H::CRDB//CRED\n"
                        + ":35B:ISIN XXXXXXXX91B9\n"
                        +

                        // colliding FIA sequence in SECMOVE
                        ":16R:FIA\n"
                        + ":92A::PRFC//N0,1\n"
                        + ":16S:FIA\n"
                        + ":98A::PAYD//20250329\n"
                        + ":16S:SECMOVE\n"
                        + ":16S:CAOPTN\n"
                        + "-}");
        MT564.SequenceB seqB = mt.getSequenceB();
        assertNotNull(seqB);
        assertEquals(6, seqB.size());
        assertTrue(mt.getSequenceB1().isEmpty());

        // if we call this with a parent sequence, such as B it works
        // however if we pass the whole block 4, it fails because it returns the colliding FIA from SECMOVE
        assertTrue(MT564.getSequenceB1(mt.getSequenceB()).isEmpty());
    }

    @Test
    public void test_NPE() {
        try {
            final MT564 m = new MT564("invalid message");
            m.getSequenceA();
        } catch (NullPointerException e) {
            fail(e.getMessage());
        }
    }

    @Test
    public void testMT670_SequenceC() {
        MT670 m = new MT670()
                .append(MT670.SequenceA2.newInstance(Field95P.tag("SSIR")))
                .append(MT670.SequenceB.newInstance(MT670.SequenceB2.newInstance(Field22F.tag("PMTH"))));
        assertTrue(m.getSequenceC().isEmpty());
    }

    @Test
    public void testMT360() {
        MT360 m = new MT360()
                .append(MT360.SequenceA.newInstance(Field23A.tag("FIXEDFIXED")))
                .append(MT360.SequenceB.newInstance())
                .append(MT360.SequenceE.newInstance());
        assertTrue(m.getSequenceC().isEmpty());
        assertTrue(m.getSequenceF().isEmpty());
    }

    @Test
    public void testMT101_NewSequenceA() {
        MT101 m = new MT101().append(MT101.SequenceA.newInstance(Field98A.emptyTag()));
        SequenceA A = m.getSequenceA();
        assertNotNull(A);
        assertFalse(A.isEmpty());
    }

    @Test
    public void testMT101_NewSequenceB() {


个时候售后的重要性就凸显了。前面还说了，安全设备基本上都是附加功能，你可能不会像网络设备那样一放上去基本上就不需要动了。安全设备有很多的例如攻击规则等需要进行不断的优化和应急事件的处理，这时候你就会发现一个良好的售后就彰显其作用了。虽说授人以鱼不如授人以渔，但是你有考虑过甲方的感受吗？用户体验，什么叫用户体验，我想要你来的时候你马上就能出现！所以现在有些乙方认为变态的招标规则例如需要本地交社保的人员清单对于甲方来说是一个很好的选择。

以上三点都是从宏观的角度来阐述如何选择信息安全产品，对于细分到各个安全类别的产品可能略有不同，例如相应的行业专有特性这些基本上有些细微的变化，但是大方向可以参考以上三点。

细分的选择可以参考如下意见：

1、划分阶梯：其实我们有些朗朗上口的调子：启明的IDS、绿盟的漏扫、天融信的防火墙等等，但是真的一定要选IDS的时候选启明么？漏扫就选绿盟？防火墙就选天融信？非也非也，启明的IDS会比绿盟和天融信的强很多吗？至少我觉得没那么屌，你首先要做的是划分你所选产品的阶梯阵营，三个厂家一个阶梯，在同一阶梯里面选哪个其实都没什么所谓，但是千万记住是同一阶梯里面的，不要跨阶梯。

2、行业积累。我们会发现某些细分厂商在某个行业有这比较扎实的积累，比如说联软准入在金融业的积累、绿盟华为DDoS在运营商的储备、imperva在Waf上面的耕耘。这些积累会凸显在其运营的产品当中，也必然会更加符合其行业需求。选择这些只是说相对来说好一点而已。

3、参考宏观三点

千言万语融汇成一句话就是“选择一个在业内有名气的厂家并且能够提供的质量保证的售后的信息安全产品”。

以上为本人拙见，欢迎大家讨论，也欢迎黄色鸡汤的反驳。哈哈哈哈哈哈哈哈哈哈哈哈哈…………………………

另推荐关联文章“冷漠”大牛的关于安全服务和安全产品的吐槽

原文链接


	}
	if cfg.L1ChainID.Sign() < 1 {
		return ErrL1ChainIDNotPositive
	}
	if cfg.L2ChainID.Sign() < 1 {
		return ErrL2ChainIDNotPositive
	}
	return nil
}

func (c *Config) L1Signer() types.Signer {
	return types.NewLondonSigner(c.L1ChainID)
}

// IsRegolith returns true if the Regolith hardfork is active at or past the given timestamp.
func (c *Config) IsRegolith(timestamp uint64) bool {
	return c.RegolithTime != nil && timestamp >= *c.RegolithTime
}

// Description outputs a banner describing the important parts of rollup configuration in a human-readable form.
// Optionally provide a mapping of L2 chain IDs to network names to label the L2 chain with if not unknown.
// The config should be config.Check()-ed before creating a description.
func (c *Config) Description(l2Chains map[string]string) string {
	// Find and report the network the user is running
	var banner string
	networkL2 := ""
	if l2Chains != nil {
		networkL2 = l2Chains[c.L2ChainID.String()]
	}
	if networkL2 == "" {
		networkL2 = "unknown L2"
	}
	networkL1 := params.NetworkNames[c.L1ChainID.String()]
	if networkL1 == "" {
		networkL1 = "unknown L1"
	}
	banner += fmt.Sprintf("L2 Chain ID: %v (%s)\n", c.L2ChainID, networkL2)
	banner += fmt.Sprintf("L1 Chain ID: %v (%s)\n", c.L1ChainID, networkL1)
	// Report the genesis configuration
	banner += "Bedrock starting point:\n"
	banner += fmt.Sprintf("  L2 starting time: %d ~ %s\n", c.Genesis.L2Time, fmtTime(c.Genesis.L2Time))
	banner += fmt.Sprintf("  L2 block: %s %d\n", c.Genesis.L2.Hash, c.Genesis.L2.Number)
	banner += fmt.Sprintf("  L1 block: %s %d\n", c.Genesis.L1.Hash, c.Genesis.L1.Number)
	// Report the upgrade configuration
	banner += "Post-Bedrock Network Upgrades (timestamp based):\n"
	banner += fmt.Sprintf("  - Regolith: %s\n", fmtForkTimeOrUnset(c.RegolithTime))
	return banner
}

// Description outputs a banner describing the important parts of rollup configuration in a log format.
// Optionally provide a mapping of L2 chain IDs to network names to label the L2 chain with if not unknown.
// The config should be config.Check()-ed before creating a description.
func (c *Config) LogDescription(log log.Logger, l2Chains map[string]string) {
	// Find and report the network the user is running
	networkL2 := ""
	if l2Chains != nil {
		networkL2 = l2Chains[c.L2ChainID.String()]
	}
	if networkL2 == "" {
		networkL2 = "unknown L2"
	}
	networkL1 := params.NetworkNames[c.L1ChainID.String()]
	if networkL1 == "" {
		networkL1 = "unknown L1"
	}
	log.Info("Rollup Config", "l2_chain_id", c.L2ChainID, "l2_network", networkL2, "l1_chain_id", c.L1ChainID,
		"l1_network", networkL1, "l2_start_time", c.Genesis.L2Time, "l2_block_hash", c.Genesis.L2.Hash.String(),
		"l2_block_number", c.Genesis.L2.Number, "l1_block_hash", c.Genesis.L1.Hash.String(),
		"l1_block_number", c.


r.search) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
      }
      if (flag == 0) { alert("Not found"); }
    }
   else if (this.searchVar == 'Band') {
      let flag = 0;
      switch (this.filterVar) {
        case 'IS':
          for (let emp of this.c2) {
            if (emp.band == str.search) {
              flag = 1;
              this.c1.push(emp);
            }

          } break;
        case 'IS NOT':
          for (let emp of this.c2) {
            if (emp.band != str.search) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
      }
      if (flag == 0) { alert("Not found"); }
    }
    else if (this.searchVar == 'Date Of Joining') {
      let flag = 0;
      switch (this.filterVar) {
        case '=':
          for (let emp of this.c2) {
            if (emp.dateJoining == str.search) {
              flag = 1;
              this.c1.push(emp);
            }

          } break;
        case '<':
          for (let emp of this.c2) {
            if (emp.dateJoining < str.search) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
          case '>':
          for (let emp of this.c2) {
            if (emp.dateJoining > str.search) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
        case '<=':
          for (let emp of this.c2) {
            if (emp.dateJoining <= str.search) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
        case '>=':
          for (let emp of this.c2) {
            if (emp.dateJoining >= str.search) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
        case '<>':
          for (let emp of this.c2) {
            if (emp.dateJoining != str.search) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
          case 'BETWEEN':
          for (let emp of this.c2) {
            if (emp.dateJoining > str.search && emp.dateJoining < str.toDate ) {
              flag = 1;
              this.c1.push(emp);
            }
          } break;
      }
      if (flag == 0) { alert("Not found"); }
    }

console.log(str);
    this.add.searchEmployee=this.c1;
  }

  resetData() {
    this.c1 = this.add.getEmployee();
  }

  ngOnInit() {
  }

}

import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Game } from './game.model';

@Component({
  selector: 'display-games',
  template: `
    Search by Genre
    <input type="text" (change)="filterByGenre($event.target.value)">

{{game.name}}

      <game *ngIf="showGameDetails"></game>

  `
})

export class DisplayGamesComponent {
  @Input() displayedGames: Game[];
  @Output() displayGamesEvent = new EventEmitter();
  public showGameDetails: boolean = false;
  public genreToFilter: string;

  clickGameInfo(clickedGame: Game){
    this.displayGamesEvent.emit(clickedGame);
  }


errmsg,errcode = proxy.apply()
        if not applied then
          success = applied
          ngx.log(ngx.WARN,format("configRoutedMode: Failed to apply changes ([%s]: %s)",errcode,errmsg))
        end
      end
    else
      logErrors("configRoutedMode",errors)
    end
  end

  ngx.log(ngx.WARN,format("configRoutedMode: Returning %s)",tostring(success)))

  if not success then
    M.configBridgedMode()
  end

  return success
end

function M.configure(mode,dhcp)
  local isBridgedMode = M.isBridgedMode()
  if mode == "bridge


#res + 1] = pandoc.Superscript(intercalate(author_marks, {pandoc.Str ','}))
      return res
    end
  end
end
M.author_inline_generator = author_inline_generator

-- taken from https://github.com/pandoc/lua-filters/blob/1660794b991c3553968beb993f5aabb99b317584/author-info-blocks/author-info-blocks.lua
--- Generate a list of inlines containing all authors.
local function create_authors_inlines(authors, mark)
  local inlines_generator = author_inline_generator(mark)
  local inlines = List:new(authors):map(inlines_generator)
  local and_str = List:new{pandoc.Space(), pandoc.Str'and', pandoc.Space()}

  local last_author = inlines[#inlines]
  inlines[#inlines] = nil
  local result = intercalate(inlines, {pandoc.Str ',', pandoc.Space()})
  if #authors > 1 then
    if #authors == 2 then
      result:extend(and_str)
    els


7,r7,r0
	ori	r10,r7,1	/* stream=1 */

	lis	r8,0x8000	/* GO=1 */
	clrldi	r8,r8,32

.machine push
.machine "power4"
	dcbt	r0,r6,0b01000
	dcbt	r0,r7,0b01010
	dcbtst	r0,r9,0b01000
	dcbtst	r0,r10,0b01010
	eieio
	dcbt	r0,r8,0b01010	/* GO */
.machine pop

	beq	cr1,.Lunwind_stack_nonvmx_copy

	/*
	 * If source and destination are not relatively aligned we use a
	 * slower permute loop.
	 */
	xor	r6,r4,r3
	rldicl.	r6,r6,0,(64-4)
	bne	.Lvmx_unaligned_copy

	/* Get the destination 16B aligned */
	neg	r6,r3
	mtocrf	0x01,r6
	clrldi	r6,r6,(64-4)

	bf	cr7*4+3,1f
	lbz	r0,0(r4)
	addi	r4,r4,1
	stb	r0,0(r3)
	addi	r3,r3,1

1:	bf	cr7*4+2,2f
	lhz	r0,0(r4)
	addi	r4,r4,2
	sth	r0,0(r3)
	addi	r3,r3,2

2:	bf	cr7*4+1,3f
	lwz	r0,0(r4)
	addi	r4,r4,4
	stw	r0,0(r3)
	addi	r3,r3,4

3:	bf	cr7*4+0,4f
	ld	r0,0(r4)
	addi	r4,r4,8
	std	r0,0(r3)
	addi	r3,r3,8

4:	sub	r5,r5,r6

	/* Get the desination 128B aligned */
	neg	r6,r3
	srdi	r7,r6,4
	mtocrf	0x01,r7
	clrldi	r6,r6,(64-7)

	li	r9,16
	li	r10,32
	li	r11,48

	bf	cr7*4+3,5f
	lvx	vr1,r0,r4
	addi	r4,r4,16
	stvx	vr1,r0,r3
	addi	r3,r3,16

5:	bf	cr7*4+2,6f
	lvx	vr1,r0,r4
	lvx	vr0,r4,r9
	addi	r4,r4,32
	stvx	vr1,r0,r3
	stvx	vr0,r3,r9
	addi	r3,r3,32

6:	bf	cr7*4+1,7f
	lvx	vr3,r0,r4
	lvx	vr2,r4,r9
	lvx	vr1,r4,r10
	lvx	vr0,r4,r11
	addi	r4,r4,64
	stvx	vr3,r0,r3
	stvx	vr2,r3,r9
	stvx	vr1,r3,r10
	stvx	vr0,r3,r11
	addi	r3,r3,64

7:	sub	r5,r5,r6
	srdi	r6,r5,7

	std	r14,STK_REG(R14)(r1)
	std	r15,STK_REG(R15)(r1)
	std	r16,STK_REG(R