GenRefTest, BasicTest) {
  TypeParam gen;
  auto x = FnTest(gen);
  EXPECT_NEAR(x, 4, 3);
}

TYPED_TEST(BitGenRefTest, Copyable) {
  TypeParam gen;
  absl::BitGenRef gen_ref(gen);
  FnTest(gen_ref);  // Copy
}

TEST(BitGenRefTest, PassThroughEquivalence) {
  // sequence_urbg returns 64-bit results.
  absl::random_internal::sequence_urbg urbg(
      {0x0003eb76f6f7f755ull, 0xFFCEA50FDB2F953Bull, 0xC332DDEFBE6C5AA5ull,
       0x6558218568AB9702ull, 0x2AEF7DAD5B6E2F84ull, 0x1521B62829076170ull,
       0xECDD4775619F1510ull, 0x13CCA830EB61BD96ull, 0x0334FE1EAA0363CFull,
       0xB5735C904C70A239ull, 0xD59E9E0BCBAADE14ull, 0xEECC86BC60622CA7ull});

  std::vector<uint64_t> output(12);

  {
    absl::BitGenRef view(urbg);
    for (auto& v : output) {
      v = view();
    }
  }

  std::vector<uint64_t> expected(
      {0x0003eb76f6f7f755ull, 0xFFCEA50FDB2F953Bull, 0xC332DDEFBE6C5AA5ull,
       0x6558218568AB9702ull, 0x2AEF7DAD5B6E2F84ull, 0x1521B62829076170ull,
       0xECDD4775619F1510ull, 0x13CCA830EB61BD96ull, 0x0334FE1EAA0363CFull,
       0xB5735C904C70A239ull, 0xD59E9E0BCBAADE14ull, 0xEECC86BC60622CA7ull});

  EXPECT_THAT(output, testing::Eq(expected));
}

TEST(BitGenRefTest, MockingBitGenBaseOverrides) {
  ConstBitGen const_gen;
  EXPECT_EQ(FnTest(const_gen), 42);

  absl::BitGenRef gen_ref(const_gen);
  EXPECT_EQ(FnTest(gen_ref), 42);  // Copy
}
}  // namespace
ABSL_NAMESPACE_END
}  // namespace absl
// Copyright 2017 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://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.

#include "absl/random/beta_distribution.h"

#include <algorithm>
#include <cfloat>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <random>
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <vector>

#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/numeric/internal/representation.h"
#include "absl/random/internal/chi_square.h"
#include "absl/random/internal/distribution_test_util.h"
#include "absl/random/internal/pcg_engine.h"
#include "absl/random/internal/sequence_urbg.h"
#include "absl/


/*
Copyright Rene Rivera 2008-2014
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/

#ifndef MSGPACK_PREDEF_COMPILER_LLVM_H
#define MSGPACK_PREDEF_COMPILER_LLVM_H

/* Other compilers that emulate this one need to be detected first. */

#include "clang.h"

#include "../version_number.h"
#include "../make.h"

/*`
[heading `MSGPACK_COMP_LLVM`]

[@http://en.wikipedia.org/wiki/LLVM LLVM] compiler.

[table
    [[__predef_symbol__] [__predef_version__]]

    [[`__llvm__`] [__predef_detection__]]
    ]
 */

#define MSGPACK_COMP_LLVM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE

#if defined(__llvm__)
#   define MSGPACK_COMP_LLVM_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
#endif

#ifdef MSGPACK_COMP_LLVM_DETECTION
#   if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
#       define MSGPACK_COMP_LLVM_EMULATED MSGPACK_COMP_LLVM_DETECTION
#   else
#       undef MSGPACK_COMP_LLVM
#       define MSGPACK_COMP_LLVM MSGPACK_COMP_LLVM_DETECTION
#   endif
#   define MSGPACK_COMP_LLVM_AVAILABLE
#include "../detail/comp_detected.h"
#endif

#define MSGPACK_COMP_LLVM_NAME "LLVM"

#include "../detail/test.h"
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_LLVM,MSGPACK_COMP_LLVM_NAME)

#ifdef MSGPACK_COMP_LLVM_EMULATED
#include "../detail/test.h"
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_LLVM_EMULATED,MSGPACK_COMP_LLVM_NAME)
#endif

#endif


from tests.testmodels import OldStyleModel, Tournament
from tortoise.contrib import test

class TestBasic(test.TestCase):
    async def test_basic(self):
        tournament = await Tournament.create(name="Test")
        await Tournament.filter(id=tournament.id).update(name="Updated name")
        saved_event = await Tournament.filter(name="Updated name").first()
        self.assertEqual(saved_event.id, tournament.id)
        await Tournament(name="Test 2").save()
        self.assertEqual(
            await Tournament.all().values_list("id", flat=True),
            [tournament.id, tournament.id + 1],
        )
        self.assertListSortEqual(
            await Tournament.all().values("id", "name"),
            [
                {"id": tournament.id, "name": "Updated name"},
                {"id": tournament.id + 1, "name": "Test 2"},
            ],
            sorted_key="id",
        )

    async def test_basic_oldstyle(self):
        obj = await OldStyleModel.create(external_id=123)
        assert obj.pk

        assert OldStyleModel._meta.fields_map["id"].pk
        assert OldStyleModel._meta.fields_map["external_id"].index


imensions = dimensions
	return shape
end

function tram.physics.shape.Hull(points)
	local shape = {}
	shape.shape = tram.physics.shape.HULL
	shape.points = points
	return shape
end

function tram.physics.shape.Mesh(triangles)
	local shape = {}
	shape.shape = tram.physics.shape.MESH
	shape.triangles = triangles
	return shape
end

function tram.physics.shape._build(mesh)
	if mesh.shape == tram.physics.shape.SPHERE then
		__impl_physics_collision_set_sphere(shape.radius)
	elseif mesh.shape == tram.physics.shape.CYLINDER then
		__impl_physics_collision_set_cylinder(shape.radius, shape.height)
	elseif mesh.shape == tram.physics.shape.CAPSULE then
		__impl_physics_collision_set_capsule(shape.radius, shape.height)
	elseif mesh.shape == tram.physics.shape.CONE then
		__impl_physics_collision_set_cone(shape.radius, shape.height)
	elseif mesh.shape == tram.physics.shape.BOX then
		__impl_physics_collision_set_box(shape.dimensions)
	elseif mesh.shape == tram.physics.shape.HULL then
		__impl_physics_collision_set_hull()
		for point in mesh.points do
			print("adding point:", point)
			__impl_physics_collision_append_point(point)
		end
	elseif mesh.shape == tram.physics.shape.MESH then
		__impl_physics_collision_set_mesh()
		for triangle in mesh.triangles do
			print("adding triangle:", triangle[1], triangle[2], triangle[3])
			__impl_physics_collision_append_triangle(triangle[1], triangle[2], triangle[3])
		end
	end
end

-- -------------------------------  CONSTANTS ------------------------------- --

tram.physics.shape.SPHERE = 0
tram.physics.shape.CYLINDER = 1
tram.physics.shape.CAPSULE = 2
tram.physics.shape.CONE = 3
tram.physics.shape.BOX = 4
tram.physics.shape.HULL = 5
tram.physics.shape.MESH = 6

-- ========================= PHYSICS/COLLISIONMODEL.H ======================= --

tram.physics._metatable_collisionmodel = {
	__index = {
		GetName = function(self)
			return __impl_physics_collisionmodel_get_name(self.index)
		end
	}
}

function tram.physics.model.Find(name)
	local model_index = __impl_physics_collisionmodel_find(name)

	if (model_index == -1) then
		return nil
	end

	local model = {}
	model.index = model_index

	setmetatable(model, tram.render._metatable_collisionmodel)

	return model
end

-- ============================= RENDER/RENDER.H ============================ --

function tram.render.SetSunDirection(direction, layer)
	__impl_render_set_sun_direction(direction, layer)
end

function tram.render.SetSunColor(color, layer)
	__impl_render_set_sun_color(color, layer)
end

function tram.render.SetAmbientColor(color, layer)
	__impl_render_set_ambient_color(color, layer)
end

function tram.render.SetFogDistance(near, far, layer)
	__impl_render_set_fog_distance(near, far, layer)
end

function tram.render.SetFogColor(color, layer)
	__impl_render_set_fog_color(color, layer)
end

function tram.render.SetScreenClearColor(color)
	__impl_render_set_screen_clear_color(color)
end

function tram.render.SetViewFov(fov


de68 	bl	0xffd83f80
    c5dc:	080c0f2a 	stmeqda	ip, {r1, r3, r5, r8, r9, sl, fp}
    c5e0:	e3b06040 	movs	r6, #64	; 0x40
    c5e4:	ebf5de65 	bl	0xffd83f80
    c5e8:	080c0f2c 	stmeqda	ip, {r2, r3, r5, r8, r9, sl, fp}
    c5ec:	e1a01006 	mov	r1, r6
    c5f0:	e2963000 	adds	r3, r6, #0	; 0x0
    c5f4:	ebf5de61 	bl	0xffd83f80
    c5f8:	080c0f2e 	stmeqda	ip, {r1, r2, r3, r5, r8, r9, sl, fp}
    c5fc:	e1a01003 	mov	r1, r3
    c600:	e0133005 	ands	r3, r3, r5
    c604:	ebf5de5d 	bl	0xffd83f80
    c608:	080c0f30 	stmeqda	ip, {r4, r5, r8, r9, sl, fp}
    c60c:	e1b03c03 	movs	r3, r3, lsl #24
    c610:	ebf5de5a 	bl	0xffd83f80
    c614:	080c0f32 	stmeqda	ip, {r1, r4, r5, r8, r9, sl, fp}
    c618:	e1b08c23 	movs	r8, r3, lsr #24
    c61c:	ebf5de57 	bl	0xffd83f80
    c620:	080c0f34 	stmeqda	ip, {r2, r4, r5, r8, r9, sl, fp}
    c624:	e59d1418 	ldr	r1, [sp, #1048]
    c628:	e59d1418 	ldr	r1, [sp, #1048]
    c62c:	e2914001 	adds	r4, r1, #1	; 0x1
    c630:	ebf5de52 	bl	0xffd83f80
    c634:	080c0f36 	stmeqda	ip, {r1, r2, r4, r5, r8, r9, sl, fp}
    c638:	e1a00004 	mov	r0, r4
    c63c:	e58d0424 	str	r0, [sp, #1060]
    c640:	ebf5de4e 	bl	0xffd83f80
    c644:	080c0f38 	stmeqda	ip, {r3, r4, r5, r8, r9, sl, fp}
    c648:	e3b05040 	movs	r5, #64	; 0x40
    c64c:	ebf5de4b 	bl	0xffd83f80
    c650:	080c0f3a 	stmeqda	ip, {r1, r3, r4, r5, r8, r9, sl, fp}
    c654:	e1a01005 	mov	r1, r5
    c658:	e0955007 	adds	r5, r5, r7
    c65c:	ebf5de47 	bl	0xffd83f80
    c660:	080c0f3c 	stmeqda	ip, {r2, r3, r4, r5, r8, r9, sl, fp


ches.write(new)
              return true
            }
            else -> {
              when (val newEl = fn(el)) {
                null -> {
                  // remove element
                  if (branch.value.size > 1) {
                    val newLeafArray: Array<Any?> = Array(branch.value.size - 1) { i ->
                      if (i >= ind) branch.value[i + 1]
                      else branch.value[i]
                    }
                  } else {
                    val new = branches.copyOf()
                    new[branchInd] = null
                    hmt.branches.write(new)
                  }
                  return true
                }
                else -> {
                  // update element
                  val newLeafArr = branch.value.copyOf()
                  newLeafArr[ind] = newEl
                  val new = branches.copyOf()
                  new[branchInd] = Branch.Leaf(hash, newLeafArr as Array<Any?>)
                  hmt.branches.write(new)
                  return true
                }
              }
            }
          }
        } else {
          val el = fn(null) ?: return false
          val newHamt = pair(
            depth.nextDepth(),
            hash,
            Branch.Leaf(hash, arrayOf(el)),
            branch.hash,
            branch
          )
          val new = branches.copyOf()
          new[branchInd] = Branch.Branches(newHamt)
          hmt.branches.write(new)
          return true
        }
      }
      is Branch.Branches -> {
        depth = depth.nextDepth()
        hmt = branch.sub
      }
    }
  }
}

fun <A> STM.newHamt(): Hamt<A> = Hamt(newTVar(arrayOfNulls(ARR_SIZE)))

sealed class Branch<out A> {
  data class Branches<A>(val sub: Hamt<A>) : Branch<A>()
  data class Leaf<A>(val hash: Int, val value: Array<Any?>) : Branch<A>()
}

const val ARR_SIZE = 32 // 2^DEPTH_STEP
const val DEPTH_STEP = 5
const val MASK = 1.shl(DEPTH_STEP) - 1

fun Int.index(): Int = MASK.and(this)
fun Int.atDepth(d: Int): Int = shr(d)
fun Int.indexAtDepth(d: Int): Int = atDepth(d).index()
fun Int.nextDepth(): Int = this + DEPTH_STEP
@file:JvmMultifileClass
@file:JvmName("TupleNKt")

package arrow.core

import kotlin.jvm.JvmMultifileClass
import kotlin.jvm.JvmName

public data class Tuple6<out A, out B, out C, out D, out E, out F>(
  val first: A,
  val second: B,
  val third: C,
  val fourth: D,
  val fifth: E,
  val sixth: F
) {

  override fun toString(): String =
    "($first, $second, $third, $fourth, $fifth, $sixth)"

  public companion object
}

public operator fun <A : Comparable<A>, B : Comparable<B>, C : Comparable<C>, D : Comparable<D>, E : Comparable<E>, F : Comparable<F>>
Tuple6<A, B, C, D, E, F>.compareTo(other: Tuple6<A, B, C, D, E, F>): Int {
  val first = first.compareTo(other.first)
  return if (first == 0) {
    val second = second.compareTo(other.second)
    if (second == 0) {
      val third = third.compareTo(other.third)
      if (third == 0) {
        val fourth = fourth.compare


tmp+4:s_tmp+5], vcc
    buffer_atomic_add_f32_m v[v_c+13], v[v_out_os], s[s_p_out:s_p_out+3], s[s_tmp] offen offset:0
    s_or_b64 exec, exec, s[s_tmp+4:s_tmp+5]
    s_mul_i32 s[s_tmp], 30, s[s_out_stride_wo]   ; i_m:30(i_m0:0,i_m1:30)
    v_add_u32 v[v_tmp], 30, v[v_out_inb]
    v_cmp_gt_u32 vcc, s[s_dim_mr], v[v_tmp]
    s_and_saveexec_b64 s[s_tmp+4:s_tmp+5], vcc
    buffer_atomic_add_f32_m v[v_c+14], v[v_out_os], s[s_p_out:s_p_out+3], s[s_tmp] offen offset:0
    s_or_b64 exec, exec, s[s_tmp+4:s_tmp+5]
    s_mul_i32 s[s_tmp], 31, s[s_out_stride_wo]   ; i_m:31(i_m0:0,i_m1:31)
    v_add_u32 v[v_tmp], 31, v[v_out_inb]
    v_cmp_gt_u32 vcc, s[s_dim_mr], v[v_tmp]
    s_and_saveexec_b64 s[s_tmp+4:s_tmp+5], vcc
    buffer_atomic_add_f32_m v[v_c+15], v[v_out_os], s[s_p_out:s_p_out+3], s[s_tmp] offen offset:0
    s_or_b64 exec, exec, s[s_tmp+4:s_tmp+5]
    s_mov_b64 exec, -1
L_igemm_fwd_gtcx35_nhwc_bf16_bx0_ex0_bt32x256x32_wt16x64x4_ws1x1_wr1x2_ta1x4x1x1_1x8x1x32_tb1x4x8x1_1x8x1x32_vs1_gkgs_out:
    s_endpgm
.rodata
.p2align 6
.amdhsa_kernel igemm_fwd_gtcx35_nhwc_bf16_bx0_ex0_bt32x256x32_wt16x64x4_ws1x1_wr1x2_ta1x4x1x1_1x8x1x32_tb1x4x8x1_1x8x1x32_vs1_gkgs
    .amdhsa_group_segment_fixed_size 32768
    .amdhsa_user_sgpr_kernarg_segment_ptr 1
    .amdhsa_system_sgpr_workgroup_id_x 1
    .amdhsa_system_sgpr_workgroup_id_y 1
    .amdhsa_system_vgpr_workitem_id 0
    .amdhsa_next_free_vgpr 96
    .amdhsa_next_free_sgpr 54
    .amdhsa_ieee_mode 1
    .amdhsa_dx10_clamp 1
    .amdhsa_float_round_mode_32 3
    .amdhsa_float_round_mode_16_64 3
    .amdhsa_tg_split 0
    .amdhsa_accum_offset 64
.end_amdhsa_kernel

.amdgpu_metadata
---
amdhsa.version: [ 1, 0 ]
amdhsa.kernels:
  - .name: igemm_fwd_gt


 "./hero.component";
import { NO_ERRORS_SCHEMA } from "@angular/core";
import { By } from "@angular/platform-browser";

describe('Hero Component',()=>{

    //Component Fixture of type Hero Component
    let fixture:ComponentFixture<HeroComponent>;

    beforeEach(()=>{

        //Create a module with Hero component
        TestBed.configureTestingModule({
            declarations:[HeroComponent],

            // tell angular to not through an error if you encounter an unkonw attribute or unknown element
            //just ignore it
            schemas:[NO_ERRORS_SCHEMA]
        })

        //Create the instance of the Hero component
        fixture = TestBed.createComponent(HeroComponent);

        //fixture.componentInstance is the instance of the Hero component and hold all the property and methods.

    });

    it('should set Hero property of Hero Component',()=>{

        //setting an hero property in the component instance created
        fixture.componentInstance.hero = {
            id:1,name:'Super Dude',strength:3
        };

        expect(fixture.componentInstance.hero.name).toBe('Super Dude');
    });

    it('should contain the name of hero in an anchor tag',()=>{

         //setting an hero property in the component instance created
         fixture.componentInstance.hero = {
            id:1,name:'Super Dude',strength:3
        };

        //fixture.nativeElement give the dom of the fixture/component just like plain old javascript
        //console.log(fixture.nativeElement);
        //expect(fixture.nativeElement.querySelector('a').textContent).toContain('Super Dude');
        //gives out error because the bindings were not done {{}}
        //change detection did not run so we will have to run it and then assert.

        fixture.detectChanges();
        expect(fixture.nativeElement.querySelector('a').textContent).toContain('Super Dude');

        //each dom node has a wrapping debug element node
        //fixture.debugElement.query(By.css('#a')).nativeElement.textContent === fixture.nativeElement.querySelector('a').textContent
        //By is imported from "@angular/platform-browser";

        //same assert as above
        //expect(fixture.debugElement.query(By.css('a')).nativeElement.textContent).toContain('Super Dude');

        //more things can be done with debugElement as compared to nativeElement
        //for example debug element can be used to access directives like routerLink inside the a tag
        //debug element can also give output of the parent component's instance ie
        //fixture.debugElement.componentInstance

    });

});/*
给定一个字符串 s，找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。

示例 1：

输入: "babad"
输出: "bab"
注意: "aba" 也是一个有效答案。
示例 2：

输入: "cbbd"
输出: "bb"
* */
/**
 * @param {string} s
 * @return {string}
 */
var longestPalindrome = function (s: string) {
  const str = [...s];
  let result: string[] = [];
  if (str.join("") === str.reverse().join("")) {
    return str.join("");
  }
  str.forEach((v, i, a) => {
    // 123321 格式
    if (v === a[i + 1]) {
      let temp = 1;
      while (
        i - temp >= 0 &&
        i + 1 + temp <= a.length - 1 &&
        a[i + 1 + temp] === a[i - temp]
      ) {
        temp++;
      }
      temp--;
      if (result.length < 2 + 2 * temp) {
        // 这个第一个 2 改成1 竟然不会有错误
        result = a.slice(i -


0];
  }

  public getTheArab(): User {
    return this.users[4];
  }

  public getRandomUser() {
    return this.users[Math.floor(Math.random() * this.users.length)];
  }
}
import { parseTags } from "../dist/utils";

test("tags are removed correctly", () => {
  expect(
    parseTags(
      `@deprecated Persons now have first and last name\nThe person's name`,
    ).text,
  ).toBe(`The person's name`);
  expect(
    parseTags(`@deprecated Persons now have first and last name`).text,
  ).toBe(``);
  expect(parseTags(`@foo\n@bar\nBaz`).text).toBe(`Baz`);
  expect(parseTags(` @foo @bar\nBaz`).text).toBe(` @foo @bar\nBaz`);
  expect(parseTags(`@foo\n @bar\nBaz`).text).toBe(` @bar\nBaz`);
  expect(parseTags(`@foo@bar Baz`).text).toBe(`@foo@bar Baz`);
  expect(parseTags(`Blah blah @deprecated`).text).toBe(`Blah blah @deprecated`);
  expect(parseTags(`Blah blah\n@deprecated`).text).toBe(
    `Blah blah\n@deprecated`,
  );
  expect(
    parseTags(
      `@jsonField date timestamp\n@jsonField name text\n@jsonField episode enum ONE=1 TWO=2\nBaz`,
    ).text,
  ).toBe(`Baz`);
});

test("tags are extracted correctly", () => {
  expect(
    parseTags(
      `@deprecated Persons now have first and last name\nThe person's name`,
    ).tags,
  ).toEqual({ deprecated: "Persons now have first and last name" });
  expect(
    parseTags(`@deprecated Persons now have first and last name`).tags,
  ).toEqual({
    deprecated: "Persons now have first and last name",
  });
  expect(parseTags(`@foo\n@bar\nBaz`).tags).toEqual({ foo: true, bar: true });
  expect(parseTags(` @foo @bar\nBaz`).tags).toEqual({});
  expect(parseTags(`@foo\n @bar\nBaz`).tags).toEqual({ foo: true });
  expect(parseTags(`@foo@bar Baz`).tags).toEqual({});
  expect(parseTags(`Blah blah @deprecated`).tags).toEqual({});
  expect(parseTags(`Blah blah\n@deprecated`).tags).toEqual({});
  expect(
    parseTags(
      `@jsonField date timestamp\n@jsonField name text\n@jsonField episode enum ONE=1 TWO=2\nBaz`,
    ).tags,
  ).toEqual({
    jsonField: ["date timestamp", "name text", "episode enum ONE=1 TWO=2"],
  });
  expect(
    parseTags(
      `@jsonField date timestamp\r\n@jsonField name text\n@jsonField episode enum ONE=1 TWO=2\r\nBaz`,
    ).tags,
  ).toEqual({
    jsonField: ["date timestamp", "name text", "episode enum ONE=1 TWO=2"],
  });
});

/**
   * 基于原生split优化版，使空字符传结果为 "[]"
   * @param data - 原始目标
   * @param symbol - 分割
   * @returns 结果
   */
export default function split (data: string, symbol: string) {
	return data !== '' ? data.split(symbol) : []
}
export const isUUIDRegex = (text: string): boolean => {
  const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
  const containsUUIDRegex = uuidRegex.test(text);

  return containsUUIDRegex;
};
export class Product{
  idProduct: string;
  nameProduct: string;
  description: string;
  price: number;
  category: string;
  image: string;
  constructor(idProduct: string, nameProduct: string, description: string,price: number, category: string,image: string){
    this.idProduct = idProduct;
    this.


f(buffer)
	  && length != sizeof(buffer - 1)))
		return(EINVAL);

	if ((error = uiomove((caddr_t)buffer, sizeof(buffer), uio)))
		return(error);

	if (length == sizeof(buffer) && buffer[sizeof(buffer) - 1] != '\n')
		return(EINVAL);

	s = splclock();
	MC146818_GETTOD(RTC, &clkregs);
	splx(s);

	clkregs[MC_SEC]   = twodigits(buffer, 11);
	clkregs[MC_MIN]   = twodigits(buffer, 8);
	clkregs[MC_HOUR]  = twodigits(buffer, 6);
	clkregs[MC_DOM]   = twodigits(buffer, 4);
	clkregs[MC_MONTH] = twodigits(buffer, 2);
	s = twodigits(buffer, 0);
	s = (s < 70) ? s + 2000 : s + 1900;
	clkregs[MC_YEAR]  = s - GEMSTARTOFTIME;

	s = splclock();
	MC146818_PUTTOD(RTC, &clkregs);
	splx(s);

	return(0);
}


desc = 'Manually launches a language server',
  nargs = '?',
  complete = lsp_complete_configured_servers,
})

api.nvim_create_user_command('LspRestart', function(info)
  local detach_clients = {}
  for _, client in ipairs(get_clients_from_cmd_args(info.args)) do
    -- Can remove diagnostic disabling when changing to client:stop() in nvim 0.11+
    --- @diagnostic disable: missing-parameter
    client.stop()
    if vim.tbl_count(client.attached_buffers) > 0 then
      detach_clients[client.name] = { client, lsp.get_buffers_by_client_id(client.id) }
    end
  end
  local timer = assert(vim.uv.new_timer())
  timer:start(
    500,
    100,
    vim.schedule_wrap(function()
      for client_name, tuple in pairs(detach_clients) do
        if require('lspconfig.configs')[client_name] then
          local client, attached_buffers = unpack(tuple)
          if client.is_stopped() then
            for _, buf in pairs(attached_buffers) do
              require('lspconfig.configs')[client_name].launch(buf)
            end
            detach_clients


data());
        EXPECT_EQ(vs0.GetStringLength(), str.size());
        TestEqual(vs0, str);

        // do copy
        Value vs1(str, allocator);
        EXPECT_TRUE(vs1.IsString());
        EXPECT_NE(vs1.GetString(), str.data());
        EXPECT_NE(vs1.GetString(), str); // not equal due to embedded '\0'
        EXPECT_EQ(vs1.GetStringLength(), str.size());
        TestEqual(vs1, str);

        // SetString
        str = "World";
        vs0.SetNull().SetString(str, allocator);
        EXPECT_TRUE(vs0.IsString());
        EXPECT_STREQ(vs0.GetString(), str.c_str());
        EXPECT_EQ(vs0.GetStringLength(), str.size());
        TestEqual(str, vs0);
        TestUnequal(str, vs1);

        // vs1 = str; // should not compile
        vs1 = StringRef(str);
        TestEqual(str, vs1);
        TestEqual(vs0, vs1);

        // Templated function.
        EXPECT_TRUE(vs0.Is<std::string>());
        EXPECT_EQ(str, vs0.Get<std::string>());
        vs0.Set<std::string>(std::string("Apple"), allocator);
        EXPECT_EQ(std::string("Apple"), vs0.Get<std::string>());
        vs0.Set(std::string("Orange"), allocator);
        EXPECT_EQ(std::string("Orange"), vs0.Get<std::string>());
    }
#endif // RAPIDJSON_HAS_STDSTRING
}

// Issue 226: Value of string type should not point to NULL
TEST(Value, SetStringNullException) {
    Value v;
    EXPECT_THROW(v.SetString(0, 0), AssertException);
}

template <typename T, typename Allocator>
static void TestArray(T& x, Allocator& allocator) {
    const T& y = x;

    // PushBack()
    Value v;
    x.PushBack(v, allocator);
    v.SetBool(true);
    x.PushBack(v, allocator);
    v.SetBool(false);
    x.PushBack(v, allocator);
    v.SetInt(123);
    x.PushBack(v, allocator);
    //x.PushBack((const char*)"foo", allocator); // should not compile
    x.PushBack("foo", allocator);

    EXPECT_FALSE(x.Empty());
    EXPECT_EQ(5u, x.Size());
    EXPECT_FALSE(y.Empty());
    EXPECT_EQ(5u, y.Size());
    EXPECT_TRUE(x[SizeType(0)].IsNull());
    EXPECT_TRUE(x[1].IsTrue());
    EXPECT_TRUE(x[2].IsFalse());
    EXPECT_TRUE(x[3].IsInt());
    EXPECT_EQ(123, x[3].GetInt());
    EXPECT_TRUE(y[SizeType(0)].IsNull());
    EXPECT_TRUE(y[1].IsTrue());
    EXPECT_TRUE(y[2].IsFalse());
    EXPECT_TRUE(y[3].IsInt());
    EXPECT_EQ(123, y[3].GetInt());
    EXPECT_TRUE(y[4].IsString());
    EXPECT_STREQ("foo", y[4].GetString());

#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
    // PushBack(GenericValue&&, Allocator&);
    {
        Value y2(kArrayType);
        y2.PushBack(Value(true), allocator);
        y2.PushBack(std::move(Value(kArrayType).PushBack(Value(1),


27' d='M256 85.329v15.083l-57.377 38.251H176z'/%3e%3cg fill='%232E52B2'%3e%3cpath d='M256 107.951v30.712h-46.069zM160 85.331v48.913l73.372-48.913z'/%3e%3c/g%3e%3cpath fill='%23D80027' d='M0 255.997v-15.082l57.377-38.252H80z'/%3e%3cg fill='%232E52B2'%3e%3cpath d='M0 233.376v-30.713h46.069zM96 255.994v-48.912l-73.372 48.912z'/%3e%3c/g%3e%3cpath fill='%23D80027' d='M256 255.997v-15.082l-57.377-38.252H176z'/%3e%3cg fill='%232E52B2'%3e%3cpath d='M256 233.376v-30.713h-46.069zM160 255.994v-48.912l73.372 48.912z'/%3e%3ccircle cx='128' cy='170.66' r='22.627'/%3e%3c/g%3e%3cg fill='%23FFDA44'%3e%3cpath d='M128 154.663l3.97 12.222h12.854l-10.398 7.556 3.971 12.222L128 179.109l-10.398 7.554 3.972-12.222-10.398-7.556h12.853zM128 219.803l2.364 7.278h7.653l-6.19 4.498 2.364 7.278-6.191-4.498-6.191 4.498 2.364-7.278-6.19-4.498h7.652zM128 102.469l2.364 7.278h7.653l-6.19 4.498 2.364 7.278-6.191-4.498-6.191 4.498 2.364-7.278-6.19-4.498h7.652zM197.931 161.136l2.365 7.277h7.653l-6.192 4.499 2.365 7.279-6.191-4.498-6.191 4.498 2.365-7.279-6.191-4.499h7.652zM58.069 161.136l2.364 7.277h7.653l-6.191 4.499 2.364 7.279-6.19-4.498-6.191 4.498 2.365-7.279-6.192-4.499h7.653z'/%3e%3c/g%3e%3c/svg%3e")}
.flag\:NZ{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='114.347 85.333 341.333 341.333'%3e%3cpath fill='%230052B4' d='M0 85.334h512v341.337H0z'/%3e%3cg fill='%23D80027'%3e%3cpath d='M425.301 233.745l3.388 10.428h10.963l-8.87 6.444 3.388 10.427-8.869-6.444-8.871 6.444 3.388-10.427-8.87-6.444h10.963zM386.107 308.817l5.083 15.642h16.445l-13.305 9.667 5.082 15.64-13.305-9.667-13.305 9.667 5.083-15.64-13.305-9.667h16.445zM387.588 185.971l4.236 13.036h13.704l-11.088 8.054 4.235 13.034-11.087-8.056-11.088 8.056 4.235-13.034-11.087-8.


 size) {
            val name = name(i)
            var values: MutableList<String>? = result[name]
            if (values == null) {
                values = ArrayList(2)
                result[name] = values
            }
            values.add(value(i))
        }
        // 相同的key，对value作拼接处理
        return result.mapValues { it.value.joinToString(", ") }
    }

}
package com.weverses.modempro.hook.hooks.phone

import com.weverses.modempro.hook.hooks.BaseHook
import com.weverses.modempro.util.Check.getMIUIVersion
import com.weverses.modempro.util.Utils.hookMethodOfBoolean
import com.weverses.modempro.util.Check.isMTK

// Platforms Support:
// sm8450/sm8475/sm7475/sm8550
// Framework/Telephone Services Support:
// xm13 series Only
object OptimizationSupport : BaseHook() {
    override fun init() {
        hookMethodOfBoolean(
            "miui.telephony.TelephonyManagerEx",
            "isAirportOptimizationSupported",
            true,
            "phone"
        )
        hookMethodOfBoolean(
            "miui.telephony.TelephonyManagerEx",
            "isSubwayOptimizationSupported",
            true,
            "phone"
        )
        hookMethodOfBoolean(
            "miui.telephony.TelephonyManagerEx",
            "isHikingOptimizationSupported",
            true,
            "phone"
        )

        if (getMIUIVersion() < 15f) {
            hookMethodOfBoolean(
                "com.android.phone.MiuiPhoneUtils",
                "isSpecialNetworkOptimizationSupported",
                true,
                "phone"
            )
            if (isMTK()) {
                hookMethodOfBoolean(
                    "com.android.phone.MiuiPhoneUtils",
                    "isSpecialNetworkOptimizationSupportedMtk",
                    true,
                    "phone"
                )
            } else {
                hookMethodOfBoolean(
                    "com.android.phone.MiuiPhoneUtils",
                    "isSpecialNetworkOptimizationSupportedQcom",
                    true,
                    "phone"
                )
            }
        }
    }
}package com.weverses.modempro.hook.hooks.phone

import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import com.weverses.modempro.hook.hooks.BaseHook
import com.weverses.modempro.util.Utils.hookMethodOfBoolean
import com.weverses.modempro.util.Utils.hookMethodOfField
import com.weverses.modempro.util.getPackageNames
import com.weverses.modempro.util.getPackageNames.getAllAppPackageNames
import de.robv.android.xposed.XposedBridge

// Platforms Support:
// sm8450/sm8475/sm7475/sm8550
// Framework/Telephone Services Support:
// xm13 series Only
object DualdataConcurrent : BaseHook() {
    override fun init() {
        // 这样应该就是直接使其返回空了吧，也许吧
        loadClass("com.android.phone.dsda.MiuiDualDataController")
            .methodFinder()
            .filterByName("initDualDataConcurrentModeWhiteList")
            .first()
            .createHook {
                before { param ->
                    null
                }
            }
        loadClass("com.android.phone.dsda.MiuiDualDataController")
            .methodFinder()
            .filterByName("updateDualDataConcurrentModeAppWhiteList")
            .first()
            .createHook {
                before { param ->
                    null
                }
            }
        XposedBridge.log("ModemPro:


}
    return response.asCodeHint()
  }

  /**
   * We throw the [Err]or with bundled string further because we catch them on the `educational-ml-library` side.
   * This is a bad design, and we must reimplement this ([EDU-7696](https://youtrack.jetbrains.com/issue/EDU-7696)).
   */
  suspend fun getTextHint(context: TextHintContext): TextHint {
    val response = service.getTextHint(context).handleResponse().onError {
      error(it)
    }
    return response.asTextHint()
  }

  /**
   * We put strings from bundle to the [Err]ors, because we then show them to user.
   *
   * @see [com.jetbrains.edu.aiHints.core.HintsLoader.getHint]
   */
  private fun <T> Response<List<T>>.handleResponse(): Result<List<T>, String> {
    val code = code()
    if (!isSuccessful) {
      LOG.warn("Request failed. Status code: $code. Error message: ${errorBody()?.string().toString()}")
    }
    val body = body()
    return when {
      code == HTTP_OK && body != null -> Ok(body)
      code == HTTP_UNAVAILABLE_FOR_LEGAL_REASONS -> Err(EduAIHintsCoreBundle.message("hints.error.unavailable.for.legal.reasons"))
      code == HTTP_UNAVAILABLE || code == HTTP_BAD_GATEWAY -> Err(EduAIHintsCoreBundle.message("hints.error.service.unavailable"))
      body == null -> Err(EduAIHintsCoreBundle.message("hints.error.failed.to.generate"))
      else -> Err(EduAIHintsCoreBundle.message("hints.error.unknown"))
    }
  }

  companion object {
    fun getInstance(): HintsServiceConnector = service()

    fun List<CodeHint>.asCodeHint() = CodeHint(joinToString(separator = "") { it.code })

    fun List<TextHint>.asTextHint() = TextHint(joinToString(separator = "") { it.text })

    private val LOG: Logger = logger<HintsServiceConnector>()
  }
}@file:UseSerializers(TextHintKSerializer::class)

package com.jetbrains.edu.aiHints.core.feedback.data

import com.jetbrains.edu.aiHints.core.messages.EduAIHintsCoreBundle
import com.jetbrains.edu.learning.courseFormat.Course
import com.jetbrains.edu.learning.courseFormat.tasks.Task
import com.jetbrains.educational.ml.hints.hint.TextHint
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers

@Serializable
data class TextHintFeedbackInfoData(
  val hintFeedbackInfoData: HintFeedbackCommonInfoData,
  val textHint: TextHint,
) {
  override fun toString(): String = buildString {
    appendLine(hintFeedbackInfoData.toString())
    appendLine(EduAIHintsCoreBundle.message("hints.feedback.label.text.hint"))
    appendLine(textHint)
  }

  companion object {
    @JvmStatic
    fun create(
      course: Course,
      task: Task,
      studentSolution: String,
      textHint: TextHint,
    ): TextHintFeedbackInfoData = TextHintFeedbackInfoData(
      HintFeedbackCommonInfoData.create(course, task, studentSolution),
      textHint = textHint,
    )
  }
}package com.jetbrains.edu.aiHints.core.feedback.dialog

import com.intellij.openapi.project.Project
import com.intellij.platform.feedback.dialog.CommonFeedbackSystemData
import com.intellij.platform.feedback.dialog.showFeedbackSystemInfoDialog
import com.jetbrains.edu.ai.translation.ui.LikeBlock.FeedbackLikenessAnswer
import com.jetbrains.edu.aiHints.core.feedback.data.CodeHintFeedbackInfoData
import com.jetbrains.edu.aiHints.core.feedback.data.CodeHintFeedbackSystemInfoData
import com.jetbrains.edu.aiHints.core.messages.EduAI


    check( //
        "Integrate[(A + B*x)/((a + b*x)*(d + e*x)^3), x]", //
        "-(B*d - A*e)/(2*e*(b*d - a*e)*(d + e*x)^2) + (A*b - a*B)/((b*d - a*e)^2*(d + e*x)) + (b*(A*b - a*B)*Log[a + b*x])/(b*d - a*e)^3 - (b*(A*b - a*B)*Log[d + e*x])/(b*d - a*e)^3", //
        78);
  }

  // {78}
  public void test1265() {
    check( //
        "Integrate[(A + B*x)/((a + b*x)*(d + e*x)^4), x]", //
        "-(B*d - A*e)/(3*e*(b*d - a*e)*(d + e*x)^3) + (A*b - a*B)/(2*(b*d - a*e)^2*(d + e*x)^2) + (b*(A*b - a*B))/((b*d - a*e)^3*(d + e*x)) + (b^2*(A*b - a*B)*Log[a + b*x])/(b*d - a*e)^4 - (b^2*(A*b - a*B)*Log[d + e*x])/(b*d - a*e)^4", //
        78);
  }

  // {78}
  public void test1266() {
    check( //
        "Integrate[(A + B*x)/((a + b*x)*(d + e*x)^5), x]", //
        "-(B*d - A*e)/(4*e*(b*d - a*e)*(d + e*x)^4) + (A*b - a*B)/(3*(b*d - a*e)^2*(d + e*x)^3) + (b*(A*b - a*B))/(2*(b*d - a*e)^3*(d + e*x)^2) + (b^2*(A*b - a*B))/((b*d - a*e)^4*(d + e*x)) + (b^3*(A*b - a*B)*Log[a + b*x])/(b*d - a*e)^5 - (b^3*(A*b - a*B)*Log[d + e*x])/(b*d - a*e)^5", //
        78);
  }

  // {78}
  public void test1267() {
    check( //
        "Integrate[((A + B*x)*(d + e*x)^5)/(a + b*x)^2, x]", //
        "(5*e*(b*d - a*e)^3*(b*B*d + 2*A*b*e - 3*a*B*e)*x)/b^6 - ((A*b - a*B)*(b*d - a*e)^5)/(b^7*(a + b*x)) + (5*e^2*(b*d - a*e)^2*(b*B*d + A*b*e - 2*a*B*e)*(a + b*x)^2)/b^7 + (5*e^3*(b*d - a*e)*(2*b*B*d + A*b*e - 3*a*B*e)*(a + b*x)^3)/(3*b^7) + (e^4*(5*b*B*d + A*b*e - 6*a*B*e)*(a + b*x)^4)/(4*b^7) + (B*e^5*(a + b*x)^5)/(5*b^7) + ((b*d - a*e)^4*(b*B*d + 5*A*b*e - 6*a*B*e)*Log[a + b*x])/b^7", //
        78);
  }

  // {78}
  public void test1268() {
    check( //
        "Integrate[((A + B*x)*(d + e*x)^4)/(a + b*x)^2, x]", //
        "(2*e*(b*d - a*e)^2*(2*b*B*d + 3*A*b*


tm_clones():
  4007a0:	mov    $0x60106f,%eax
  4007a5:	push   %rbp
  4007a6:	sub    $0x601068,%rax
  4007ac:	cmp    $0xe,%rax
  4007b0:	mov    %rsp,%rbp
  4007b3:	jbe    4007d0 <deregister_tm_clones+0x30>
  4007b5:	mov    $0x0,%eax
  4007ba:	test   %rax,%rax
  4007bd:	je     4007d0 <deregister_tm_clones+0x30>
  4007bf:	pop    %rbp
  4007c0:	mov    $0x601068,%edi
  4007c5:	jmpq   *%rax
  4007c7:	nopw   0x0(%rax,%rax,1)
  4007d0:	pop    %rbp
  4007d1:	retq
  4007d2:	nopl   0x0(%rax)
  4007d6:	nopw   %cs:0x0(%rax,%rax,1)

00000000004007e0 <register_tm_clones>:
register_tm_clones():
  4007e0:	mov    $0x601068,%esi
  4007e5:	push   %rbp
  4007e6:	sub    $0x601068,%rsi
  4007ed:	sar    $0x3,%rsi
  4007f1:	mov    %rsp,%rbp
  4007f4:	mov    %rsi,%rax
  4007f7:	shr    $0x3f,%rax
  4007fb:	add    %rax,%rsi
  4007fe:	sar    %rsi
  400801:	je     400818 <register_tm_clones+0x38>
  400803:	mov    $0x0,%eax
  400808:	test   %rax,%rax
  40080b:	je     400818 <register_tm_clones+0x38>
  40080d:	pop    %rbp
  40080e:	mov    $0x601068,%edi
  400813:	jmpq   *%rax
  400815:	nopl   (%rax)
  400818:	pop    %rbp
  400819:	retq
  40081a:	nopw   0x0(%rax,%rax,1)

0000000000400820 <__do_global_dtors_aux>:
__do_global_dtors_aux():
  400820:	cmpb   $0x0,0x200859(%rip)        # 601080 <completed.7594>
  400827:	jne    40083a <__do_global_dtors_aux+0x1a>
  400829:	push   %rbp
  40082a:	mov    %rsp,%rbp
  40082d:	callq  4007a0 <deregister_tm_clones>
  400832:	pop    %rbp
  400833:	movb   $0x1,0x200846(%rip)        # 601080 <completed.7594>
  40083a:	repz retq
  40083c:	nopl   0x0(%rax)

0000000000400840 <frame_dummy>:
frame_dummy():
  400840:	mov    $0x600e10,%edi
  400845:	cmpq   $0x0,(%rdi)
  400849:	jne    400850 <frame_dummy+0x10>
  40084b:	jmp    4007e0 <register_tm_clones>
  40084d:	nopl   (%rax)
  400850:	mov    $0x0,%eax
  400855:	test   %rax,%rax
  400858:	je     40084b <frame_dummy+0xb>
  40085a:	push   %rbp
  40085b:	mov    %rsp,%rbp
  40085e:	callq  *%rax
  400860:	pop    %rbp
  400861:	jmpq   4007e0 <register


		TargetLabel: "XNamedError{}",
		Target:      XNamedError{},
		SourceLabel: "XNamedError{}",
		Source:      XNamedError{},
	},
	{
		Label:       "Zero",
		TargetLabel: "XNamedError{}",
		Target:      XNamedError{},
		SourceLabel: "?XNamedError{}",
		Source:      &XNamedError{},
	},
	{
		Label:       "Zero",
		TargetLabel: "XNamedError{}",
		Target:      XNamedError{},
		SourceLabel: "?XStructEmpty{}",
		Source:      &XStructEmpty{},
	},
	{
		IsCanonical: true,
		Label:       "Full",
		TargetLabel: "XNamedError{Id: \"abcdeΔΘΠΣΦ王普澤世界\", Msg: \"abcdeΔΘΠΣΦ王普澤世界\"}",
		Target: XNamedError{
			Id:  "abcdeΔΘΠΣΦ王普澤世界",
			Msg: "abcdeΔΘΠΣΦ王普澤世界",
		},
		SourceLabel: "XNamedError{Id: \"abcdeΔΘΠΣΦ王普澤世界\", Msg: \"abcdeΔΘΠΣΦ王普澤世界\"}",
		Source: XNamedError{
			Id:  "abcdeΔΘΠΣΦ王普澤世界",
			Msg: "abcdeΔΘΠΣΦ王普澤世界",
		},
	},
	{
		Label:       "Full",
		TargetLabel: "XNamedError{Id: \"abcdeΔΘΠΣΦ王普澤世界\", Msg: \"abcdeΔΘΠΣΦ王普澤世界\"}",
		Target: XNamedError{
			Id:  "abcdeΔΘΠΣΦ王普澤世界",
			Msg: "abcdeΔΘΠΣΦ王普澤世界",
		},
		SourceLabel: "error{Id: \"abcdeΔΘΠΣΦ王普澤世界\", Msg: \"abcdeΔΘΠΣΦ王普澤世界\"}",
		Source: verror.FromWire(&vdl.WireError{
			Id:  "abcdeΔΘΠΣΦ王普澤世界",
			Msg: "abcdeΔΘΠΣΦ王普澤世界",
		}),
	},
	{
		IsCanonical: true,
		Label:       "Random0",
		TargetLabel: "XNamedError{Id: \"deΔΘΠΣΦ王\", Msg: \"ΘΠΣΦ王\"}",
		Target: XNamedError{
			Id:  "deΔΘΠΣΦ王",
			Msg: "ΘΠΣΦ王",
		},
		SourceLabel: "XNamedError{Id: \"deΔΘΠΣΦ王\", Msg: \"ΘΠΣΦ王\"}",
		Source: XNamedError{
			Id:  "deΔΘΠΣΦ王",
			Msg: "ΘΠΣΦ王",
		},
	},
	{
		Label:       "Random0",
		TargetLabel: "XNamedError{Id: \"deΔΘΠΣΦ王\", Msg: \"ΘΠΣΦ王\"}",
		Target: XNamedError{
			Id:  "deΔΘΠΣΦ王",
			Msg: "ΘΠΣΦ王",
		},
		SourceLabel: "error{Id: \"deΔΘΠΣΦ王\", Msg: \"ΘΠΣΦ王\"}",
		Source: verror.FromWire(&vdl.WireError{
			Id:  "deΔΘΠΣΦ王",
			Msg: "ΘΠΣΦ王",
		}),
	},
	{
		IsCanonical: true,
		Label:       "Zero",
		TargetLabel: "XUint16(0)",
		Target:      XUint16(0),
		SourceLabel: "XUint16(0)",
		Source:      XUint16(0),
	},
	{
		Label:       "Zero",
		TargetLabel


//===-- asan_stats.h --------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is a part of AddressSanitizer, an address sanity checker.
//
// ASan-private header for statistics.
//===----------------------------------------------------------------------===//
#ifndef ASAN_STATS_H
#define ASAN_STATS_H

#include "asan_allocator.h"
#include "asan_internal.h"

namespace __asan {

// AsanStats struct is NOT thread-safe.
// Each AsanThread has its own AsanStats, which are sometimes flushed
// to the accumulated AsanStats.
struct AsanStats {
  // AsanStats must be a struct consisting of uptr fields only.
  // When merging two AsanStats structs, we treat them as arrays of uptr.
  uptr mallocs;
  uptr malloced;
  uptr malloced_redzones;
  uptr frees;
  uptr freed;
  uptr real_frees;
  uptr really_freed;
  uptr reallocs;
  uptr realloced;
  uptr mmaps;
  uptr mmaped;
  uptr munmaps;
  uptr munmaped;
  uptr malloc_large;
  uptr malloced_by_size[kNumberOfSizeClasses];

  // Ctor for global AsanStats (accumulated stats for dead threads).
  explicit AsanStats(LinkerInitialized) { }
  // Creates empty stats.
  AsanStats();

  void Print();  // Prints formatted stats to stderr.
  void Clear();
  void MergeFrom(const AsanStats *stats);
};

// Returns stats for GetCurrentThread(), or stats for fake "unknown thread"
// if GetCurrentThread() returns 0.
AsanStats &GetCurrentThreadStats();
// Flushes a given stats into accumulated stats of dead threads.
void FlushToDeadThreadStats(AsanStats *stats);

// A cross-platform equivalent of malloc_statistics_t on Mac OS.
struct AsanMallocStats {
  uptr blocks_in_use;
  uptr size_in_use;
  uptr max_size_in_use;
  uptr size_allocated;
};

void FillMallocStatistics(AsanMallocStats *malloc_stats);

}  // namespace __asan

#endif  // ASAN_STATS_H


292c-.844.375-1.895.843-3.166.843-3.882 0-6.7 2.607-6.7 6.2C0 28.994 3.006 32 6.7 32c2.824 0 4.752-1.262 5.719-3.722.506-1.085.581-3.46.581-4.778 0-.269.762-.843 1.218-1.186.421-.316.856-.644 1.156-.982a.5.5 0 00-.748-.664c-.234.265-.628.561-1.01.848C12.785 22.142 12 22.732 12 23.5c0 2.072-.182 3.701-.499 4.384C10.676 29.98 9.105 31 6.7 31A5.706 5.706 0 011 25.3c0-3.014 2.397-5.2 5.7-5.2 1.484 0 2.691-.538 3.573-.931.228-.102.441-.196.638-.273z"/><circle cx="16" cy="16.984" r=".806"/></g></svg>';
  static const String scope =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><g fill="currentColor"><path d="M17 6.5a.5.5 0 00-1 0V15H6.5a.5.5 0 000 1H16v9.469a.5.5 0 001 0V16h9.469a.5.5 0 000-1H17V6.5z"/><path d="M31.562 15h-2.613C28.461 8.63 23.37 3.539 17 3.051V.5a.5.5 0 00-1 0V3C9.17 3 3.565 8.299 3.051 15H.562a.5.5 0 000 1H3c0 7.168 5.832 13 13 13v2.5a.5.5 0 001 0v-2.551C23.701 28.435 29 22.83 29 16h2.562a.5.5 0 000-1zM16 28C9.383 28 4 22.617 4 16S9.383 4 16 4s12 5.383 12 12-5.383 12-12 12z"/></g></svg>';
  static const String search =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="33" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 33 32"><g fill="currentColor"><path d="M1.5 32h21c.827 0 1.5-.673 1.5-1.5V23c0-.01-.005-.018-.006-.028.055-.035.112-.068.166-.105l7.986 7.986a.5.5 0 10.708-.706l-7.913-7.913A6.479 6.479 0 0027 17.5a6.494 6.494 0 00-3.006-5.472c.001-.01.006-.018.006-.028V9.5c0-.017-.008-.031-.009-.047-.002-.023-.008-.043-.013-.065a.488.488 0 00-.09-.191c-.007-.009-.006-.02-.013-.029l-8-9c-.003-.003-.007-.003-.01-.006a.49.49 0 00-.223-.134c-.019-.006-.036-.008-.056-.011C15.557.012 15.53 0 15.5 0h-14C.673 0 0 .673 0 1.5v29c0 .827.673 1.5 1.5 1.5zM26 17.5c0 3.033-2.468 5.5-5.5 5.5S15 20.533 15 17.5s2.468-5.5 5.5-5.5 5.5 2.467 5


 reformat2 -I 2  \
        | csvtk cut -Ht -f 1,2,5,4,6 \
        | csvtk add-header -t -n abundance,taxid,rank,name,lineage \
        | head -n 10 \
        | csvtk pretty -t

    abundance   taxid     rank      name                           lineage
    ---------   -------   -------   ----------------------------   -------------------------------------------------------------------------------------------------------
    10.43       246787    species   Bacteroides cellulosilyticus   Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides cellulosilyticus
    7.98        28116     species   Bacteroides ovatus             Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides ovatus
    1.06        2755405   species   Bacteroides sp. CACC 737       Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides sp. CACC 737
    0.49        2650157   species   Bacteroides zhangwenhongii     Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides zhangwenhongii
    0.99        2528203   species   Bacteroides sp. A1C1           Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides sp. A1C1
    0.28        2763022   species   Bacteroides sp. M10            Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides sp. M10
    0.16        2650158   species   Bacteroides luhongzhouii       Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides luhongzhouii
    0.12        2715212   species   Bacteroides faecium            Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides faecium
    5.10        817       species   Bacteroides fragilis           Bacteria;Bacteroidota;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides fragilis        817       species   Bacteroides fragilis           Bacteria;Bacteroidetes;Bacteroidia;Bacteroidales;Bacteroidaceae;Bacteroides;Bacteroides fragilis

## Making nr blastdb for specific taxids

Attention:

- (2023-11-27) BLAST+ 2.2.15 supports limiting a group of organisms without first using a custom script to get all species-level Taxonomy IDs (taxids) for the group. [Details](https://www.ncbi.nlm.nih.gov/books/NBK569839/#_usrman_BLAST_feat_Taxonomic_filtering_fo_).

    E.g., Search of the nr BLAST database limited to Bacteria (taxID 2).

        blastp -db nr -taxids 2 -query ...

- (2019) [BLAST+ 2.8.1 is released with new databases](https://ncbiinsights.ncbi.nlm.nih.gov/2019/01/04/blast-2-8-1-with-new-databases-and-better-performance/),
which allows you to limit your search by taxonomy using information built into the BLAST databases.
So you don't need to build blastdb for specific taxids now.

Changes:

- 2018-09-13 rewritten
- 2018-12-22 providing faster method for step 3.1
- 2019-01-07 add note of new blastdb version
-


本以上的 [MMdetection](https://github.com/open-mmlab/mmdetection) 。

我们在 [mmdet model zoo](/demo/docs/zh_cn/mmdet_modelzoo.md#脸部-bounding-box-检测模型) 提供了一个预训练好的脸部 Bounding Box 预测模型，用户可以前往下载。

### 2D 脸部图片关键点识别推理

```shell
python demo/topdown_demo_with_mmdet.py \
    ${MMDET_CONFIG_FILE} ${MMDET_CHECKPOINT_FILE} \
    ${MMPOSE_CONFIG_FILE} ${MMPOSE_CHECKPOINT_FILE} \
    --input ${INPUT_PATH} [--output-root ${OUTPUT_DIR}] \
    [--show] [--device ${GPU_ID or CPU}] [--save-predictions] \
    [--draw-heatmap ${DRAW_HEATMAP}] [--radius ${KPT_RADIUS}] \
    [--kpt-thr ${KPT_SCORE_THR}] [--bbox-thr ${BBOX_SCORE_THR}]
```

用户可以在 [model zoo](https://mmpose.readthedocs.io/en/dev-1.x/model_zoo/face_2d_keypoint.html) 获取预训练好的脸部关键点识别模型。

这里我们用 [face6 model](https://download.openmmlab.com/mmpose/face/hrnetv2/hrnetv2_w18_aflw_256x256-f2bbc62b_20210125.pth) 来进行演示：

```shell
python demo/topdown_demo_with_mmdet.py \
    demo/mmdetection_cfg/yolox-s_8xb8-300e_coco-face.py \
    https://download.openmmlab.com/mmpose/mmdet_pretrained/yolo-x_8xb8-300e_coco-face_13274d7c.pth \
    configs/face_2d_keypoint/rtmpose/face6/rtmpose-m_8xb256-120e_face6-256x256.py \
    https://download.openmmlab.com/mmpose/v1/projects/rtmposev1/rtmpose-m_simcc-face6_pt-in1k_120e-256x256-72a37400_20230529.pth \
    --input tests/data/cofw/001766.jpg \
    --show --draw-heatmap
```

可视化结果如下图所示：

如果使用了 heatmap-based 模型同时设置了 `--draw-heatmap` ，预测的热图也会跟随关键点一同可视化出来。

如果想本地保存可视化结果可使用如下命令：

```shell
python demo/topdown_demo_with_mmdet.py \
    demo/mmdetection_cfg/yolox-s_8xb8-300e_coco-face.py \
    https://download.openmmlab.com/mmpose/mmdet_pretrained/yolo-x_8xb8-300e_coco-face_13274d7c.pth \
    configs/face_2d_keypoint/rtmpose/face6/rtmpose-m_8xb256-120e_face6-256x256.py \
    https://download.openmmlab.com/mmpose/v1/projects/rtmposev1/rtmpose-m_simcc-face6_pt-in1k_120e-256x256-72a37400_20230529.pth \
    --input tests/data/cofw/001766.jpg \
    --draw-heatmap --output-root vis_results
```

### 2D 脸部视频关键点识别推理

视频和图片使用了同样的接口，区别在于视频推理时 `${INPUT_PATH}` 既可以是本地视频文件的路径也可以是视频文件的 **URL** 地址。

```shell
python demo


lidation for cluster failed: %v", err)
				}
			}
		})
	}
}

func TestCreatOrUpdateClusterServices(t *testing.T) {
	f := func(component string, cr *vmv1beta1.VMCluster, wantSvcYAML string, predefinedObjects ...runtime.Object) {
		t.Helper()
		ctx := context.Background()
		fclient := k8stools.GetTestClientWithObjects(predefinedObjects)
		build.AddDefaults(fclient.Scheme())
		fclient.Scheme().Default(cr)

		var builderF func(ctx context.Context, rclient client.Client, cr, prevCR *vmv1beta1.VMCluster) (*corev1.Service, error)
		switch component {
		case "insert":
			builderF = createOrUpdateVMInsertService
		case "storage":
			builderF = createOrUpdateVMStorageService
		case "select":
			builderF = createOrUpdateVMSelectService

		default:
			t.Fatalf("BUG not expected component for test: %q", component)
		}
		svc, err := builderF(ctx, fclient, cr, nil)
		if err != nil {
			t.Fatalf("not expected error= %q", err)
		}
		var actualService corev1.Service
		if err := fclient.Get(ctx, types.NamespacedName{Namespace: svc.Namespace, Name: svc.Name}, &actualService); err != nil {
			t.Fatalf("create service not found: %q", err)
		}
		var wantService corev1.Service
		if err := yaml.Unmarshal([]byte(wantSvcYAML), &wantService); err != nil {
			t.Fatalf("BUG: expect service definition at yaml: %q", err)
		}
		assert.Equal(t, wantService, actualService)
	}

	f("storage", &vmv1beta1.VMCluster{
		ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: "default-1"},
		Spec: vmv1beta1.VMClusterSpec{
			VMStorage: &vmv1beta1.VMStorage{},
		},
	}, `
objectmeta:
    name: vmstorage-test
    namespace: default-1
    resourceversion: "1"
    labels:
        app.kubernetes.io/component: monitoring
        app.kubernetes.io/instance: test
        app.kubernetes.io/name: vmstorage
        app.kubernetes.io/part-of: vmcluster
        managed-by: vm-operator
    ownerreferences:
        - apiversion: ""
          name: test
          controller: true
          blockownerdeletion: true
    finalizers:
        - apps.victoriametrics.com/finalizer
spec:
    ports:
        - name: http
          protocol: TCP
          port: 8482
          targetport:
            intval: 8482
        - name: vminsert
          protocol: TCP
          port: 8400
          targetport:
            intval: 8400
        - name: vmselect
          protocol: TCP
          port: 8401
          targetport:
            intval: 8401
    selector:
        app.kubernetes.io/component: monitoring
        app.kubernetes.io/instance: test
        app.kubernetes.io/name: vmstorage
        managed-by: vm-operator
    clusterip: None
    type: ClusterIP
    publishnotreadyaddresses: true
`)
	// with vmbackup and additional service ports
	f("storage", &vmv1beta1.VMCluster{
		ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: "default-1"},
		Spec: vmv1beta1.VMClusterSpec{
			License: &vmv1beta1.License{
				Key: ptr.To("test-key"),
			},
			VMStorage: &vmv1beta1.VMStorage{
				ServiceSpec: &vmv1beta1.AdditionalServiceSpec{
					UseAsDefault: true,
					Spec:


5993, U+59a4, U+5a55, U+5ab2, U+5afb, U+5b56, U+5bc5, U+5bc7, U+5bf0, U+5cb1, U+5cc7, U+5d84, U+5dff, U+5e93, U+5ed3, U+5f6a, U+60bc, U+61c7, U+61ff, U+6218, U+6254, U+634d, U+6467, U+64f1-64f2, U+6582, U+65fb, U+6615, U+6687, U+66ae, U+66e0, U+66e6, U+66f0, U+6781, U+67f5, U+6837, U+68a7, U+6a1f, U+6b27, U+6b4e, U+6b73, U+6b79, U+6bcb, U+6c5d, U+6cf5, U+6dee, U+6ec4, U+6ecc, U+6f88, U+6fef, U+701d, U+703e, U+707c, U+7099, U+710a, U+725f, U+72d9, U+72e9, U+731d, U+7325, U+7463, U+7480, U+74a8, U+7523, U+7526, U+75e0, U+7613, U+7656, U+76d4, U+773a, U+775c, U+775e, U+780c, U+78e1, U+78f7, U+7960, U+7a20, U+7aaf, U+7b08, U+7b71, U+7be4, U+7cec, U+7cf0, U+7d5e, U+7d62, U+7dbe, U+7e1b, U+7ea2, U+7ec4, U+7ec6, U+7edc, U+7eed, U+7efc, U+7f16, U+7f57, U+7fb9, U+7fca, U+803d, U+816e, U+82a5, U+82b7, U+8317, U+8338, U+834a, U+83d3, U+8469, U+849e, U+854a, U+8559, U+865e, U+86e4, U+8700, U+8759, U+8760, U+8782, U+879e, U+87d1, U+880d, U+8836, U+8944, U+89c8, U+8aac, U+8b74, U+8ba2, U+8ba4, U+8bae, U+8bfb, U+8c4e, U+8cb3, U+8cb6, U+8d16, U+8d28, U+8e44, U+8f3b, U+8f3f, U+8fb9, U+8fc4, U+8fde, U+8ff9, U+9076, U+90ae, U+90b8, U+9257, U+9310, U+93df, U+94fe, U+95a5, U+95a9, U+962e, U+9690, U+9704, U+9713, U+97f6, U+9824, U+986b, U+9884, U+98e2, U+991a, U+99a5, U+99dd, U+9ab8, U+9b41, U+9bad, U+9dd7, U+c774, U+fe52, U+fe5d, U+ff02;
}
/* [G_102] */
@font-face {
  font-family: 'Chiron Hei HK WS';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('


      -- Add recommendations
      table.insert(result_lines, "")
      table.insert(result_lines, "Recommendations:")
      table.insert(result_lines, string.rep("-", width - 10))

      if startup_time > 100 then
        table.insert(result_lines, "- Your startup time is high. Consider lazy-loading more plugins.")
      else
        table.insert(result_lines, "- Your startup time is good.")
      end

      -- Check for slow plugins
      local slow_plugins = {}
      for _, event in ipairs(startup_events) do
        if event.event:match("sourcing .*/pack/[^/]+/[^/]+/[^/]+") then
          local plugin_name = event.event:match("sourcing .*/([^/]+)$")
          if plugin_name and event.time > 5 then
            table.insert(slow_plugins, {name = plugin_name, time = event.time})
          end
        end
      end

      if #slow_plugins > 0 then
        table.insert(result_lines, "- Slow loading plugins detected:")
        for _, plugin in ipairs(slow_plugins) do
          table.insert(result_lines, string.format("  * %s (%.2f ms)", plugin.name, plugin.time))
        end
        table.insert(result_lines, "  Consider lazy-loading these plugins using event triggers or commands")
      end

      table.insert(result_lines, "")
      table.insert(result_lines, "Press 'q' to close this window")

      -- Update buffer with results
      vim.api.nvim_buf_set_lines(buf, 0, -1, false, result_lines)
      vim.api.nvim_buf_set_option(buf, "modifiable", false)

      -- Clean up temp file in case window is closed another way
      vim.api.nvim_create_autocmd("BufWipeout", {
        buffer = buf,
        callback = function()
          vim.fn.delete(output_file)
        end,
        once = true,
      })
    end
  })
end

-- Profile load time for all plugins managed by lazy.nvim
function M.profile_plugins()
  -- Check if lazy.nvim is available
  local ok, lazy = pcall(require, "lazy")
  if not ok then
    vim.notify("lazy.nvim is not available", vim.log.levels.ERROR)
    return
  end

  -- Create floating window for results
  local buf, win, width = create_floating_window("Plugin Load Time Profiling")

  -- Set initial message
  vim.api.nvim_buf_set_lines(buf, 0, -1, false, {"Analyzing plugin load times... please wait"})

  -- Get plugin stats from lazy.nvim
  vim.defer_fn(function()
    -- Safely get plugin config
    local ok_config, lazy_config = pcall(require, "lazy.core.config")
    if not ok_config then
      vim.api.nvim_buf_set_lines(buf, 0, -1, false, {
        "Error: lazy.nvim core config module not available",
        "",
        "Press 'q' to close this window"
      })
      return
    end

    -- Get plugins list
    local plugins = lazy_config.plugins

    -- Safely get plugin stats
    local plugin_times = {}
    local states = {}

    -- Try to get stats from different API locations
    local ok_cache, cache_result
    ok_cache, cache_result = pcall(function()
      local cache = require("lazy.core.cache")
      if type(cache.stats) == "function" then
        return cache.stats()
      else
        return {}
      end
    end)

    if ok_cache then
      states = cache_result
    else
      -- Try alternative methods to get plugin load


Chapter = SChapter.create().apply {
        val urlElement = element.selectFirst("a")!!
        name = listOfNotNull(
            urlElement.text(),
            element.selectFirst("div.text-xs")!!.text().takeUnless { it.isBlank() },
        ).joinToString(" - ") { it.trim() }
        url = urlElement.attr("abs:href")
    }
}
package eu.kanade.tachiyomi.extension.id.komikrealm

import eu.kanade.tachiyomi.multisrc.zeistmanga.Genre
import eu.kanade.tachiyomi.multisrc.zeistmanga.Status
import eu.kanade.tachiyomi.multisrc.zeistmanga.Type
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaDto
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaIntl
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.util.asJsoup
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import uy.kohesive.injekt.injectLazy

class KomikRealm : ZeistManga(
    "KomikRealm",
    "https://www.komikrealm.my.id",
    "id",
) {
    private val json: Json by injectLazy()

    override val hasFilters = true

    override val hasLanguageFilter = false

    override val chapterCategory = ""

    override fun popularMangaRequest(page: Int): Request {
        val url = apiUrl("Project")
            .addQueryParameter("orderby", "updated")
            .addQueryParameter("max-results", "12")
            .build()

        return GET(url, headers)
    }

    override fun popularMangaParse(response: Response): MangasPage {
        val jsonString = response.body.string()
        val result = json.decodeFromString<ZeistMangaDto>(jsonString)

        val mangas = result.feed?.entry.orEmpty()
            .filter { it.category.orEmpty().any { category -> category.term == "Series" } }
            .filter { !it.category.orEmpty().any { category -> category.term == "Anime" } }
            .map { it.toSManga(baseUrl) }

        return MangasPage(mangas, false)
    }

    override fun mangaDetailsParse(response: Response): SManga {
        val document = response.asJsoup()
        val profileManga = document.select(".bigcontent")
        val infoManga = profileManga.select("ul.infonime li")

        return SManga.create().apply {
            thumbnail_url = profileManga.select("img").first()!!.attr("data-src")
            description = profileManga.select(".sinoposis").text()
            genre = profileManga.select("div.info-genre > a[rel=tag]")
                .joinToString { it.text() }

            infoManga.forEach {
                val title = it.select("b").text()
                val desc = it.select("span").text()

                when (title) {
                    "Status" -> status = parseStatus(desc)
                    "Author" -> author = desc
                    "Artist" -> artist = desc
                }
            }
        }
    }

    override fun chapterListParse(response: Response): List<SChapter> {
        val document = response.asJsoup()

        val url = getChapterFeedUrl(document)

        val req = GET(url, headers)
        val res = client.newCall(req).execute()

        val jsonStrin


0 04 */	sthu r0, 4(r6)
/* 8011DAE8 00119748  42 00 FF F0 */	bdnz lbl_8011DAD8
/* 8011DAEC 0011974C  80 9F 06 C4 */	lwz r4, 0x6c4(r31)
/* 8011DAF0 00119750  3C A3 00 06 */	addis r5, r3, 6
/* 8011DAF4 00119754  80 1F 06 C8 */	lwz r0, 0x6c8(r31)
/* 8011DAF8 00119758  90 85 DD 20 */	stw r4, -0x22e0(r5)
/* 8011DAFC 0011975C  90 05 DD 24 */	stw r0, -0x22dc(r5)
/* 8011DB00 00119760  80 1F 06 CC */	lwz r0, 0x6cc(r31)
/* 8011DB04 00119764  90 05 DD 28 */	stw r0, -0x22d8(r5)
/* 8011DB08 00119768  88 7F 06 D0 */	lbz r3, 0x6d0(r31)
/* 8011DB0C 0011976C  88 1F 06 D1 */	lbz r0, 0x6d1(r31)
/* 8011DB10 00119770  98 65 DD 2C */	stb r3, -0x22d4(r5)
/* 8011DB14 00119774  98 05 DD 2D */	stb r0, -0x22d3(r5)
/* 8011DB18 00119778  88 7F 06 D2 */	lbz r3, 0x6d2(r31)
/* 8011DB1C 0011977C  88 1F 06 D3 */	lbz r0, 0x6d3(r31)
/* 8011DB20 00119780  98 65 DD 2E */	stb r3, -0x22d2(r5)
/* 8011DB24 00119784  98 05 DD 2F */	stb r0, -0x22d1(r5)
/* 8011DB28 00119788  88 7F 06 D4 */	lbz r3, 0x6d4(r31)
/* 8011DB2C 0011978C  88 1F 06 D5 */	lbz r0, 0x6d5(r31)
/* 8011DB30 00119790  98 65 DD 30 */	stb r3, -0x22d0(r5)
/* 8011DB34 00119794  98 05 DD 31 */	stb r0, -0x22cf(r5)
/* 8011DB38 00119798  88 7F 06 D6 */	lbz r3, 0x6d6(r31)
/* 8011DB3C 0011979C  88 1F 06 D7 */	lbz r0, 0x6d7(r31)
/* 8011DB40 001197A0  98 65 DD 32 */	stb r3, -0x22ce(r5)
/* 8011DB44 001197A4  98 05 DD 33 */	stb r0, -0x22cd(r5)
/* 8011DB48 001197A8  88 1F 06 D8 */	lbz r0, 0x6d8(r31)
/* 8011DB4C 001197AC  98 05 DD 34 */	stb r0, -0x22cc(r5)
/* 8011DB50 001197B0  88 1F 06 D9 */	lbz r0, 0x6d9(r31)
/* 8011DB54 001197B4  98 05 DD 35 */	stb r0, -0x22cb(r5)
/* 8011DB58 001197B8  80 1F 06 DC */	lwz r0, 0x6dc(r31)
/* 8011DB5C 001197BC  90 05 DD 38 */	stw r0, -0x22c8(r5)
/* 8011DB60 001197C0  80 1F 06 E0 */	lwz r0, 0x6e0(r31)


 的设备定制的。
  - **媒体库** - 基于 PacketVideo OpenCORE；该库支持多种常用的音频、视频格式回放和录制，同时支持静态图像文件。编码格式包括MPEG4, H.264, MP3, AAC, AMR, JPG, PNG 。
  - **Surface Manager** - 对显示子系统的管理，并且为多个应用程序提 供了2D和3D图层的无缝融合。这部分代码
  - **Webkit,LibWebCore** - 一个最新的web浏览器引擎用，支持Android浏览器和一个可嵌入的web视图。鼎鼎大名的 Apple Safari背后的引擎就是Webkit
  - **SGL** - 底层的2D图形引擎
  - **3D libraries** - 基于OpenGL ES 1.0 APIs实现；该库可以使用硬件 3D加速（如果可用）或者使用高度优化的3D软加速。
  - **FreeType** -位图（bitmap）和矢量（vector）字体显示。
  - **SQLite** - 一个对于所有应用程序可用，功能强劲的轻型关系型数据库引擎。

### Android运行环境

该核心库提供了JAVA编程语言核心库的大多数功能。<br />每一个Android应用程序都在它自己的进程中运 行，都拥有一个独立的Dalvik虚拟 机实例。Dalvik被设计成一个设备可以同时高效地运行多个虚拟系统。 Dalvik虚拟机执行（.dex）的Dalvik可执行文件，该格式文件针对小内存使用做了 优化。同时虚拟机是基于寄存器的，所有的类都经由JAVA编译器编译，然后通过SDK中 的 "dx" 工具转化成.dex格式由虚拟机执行。

## HAL--硬件抽象层

其实Android并非讲所有的设备驱动都放在linux内核里面，而是实现在userspace空间，这么做的主要原因是GPL协议，Linux是遵循该协议来发布的，也就意味着对linux内核的任何修改，都必须发布其源代码。而现在这么做就可以避开而无需发布其源代码，毕竟它是用来赚钱的。而在linux内核中为这些userspace驱动代码开一个后门，就可以让本来userspace驱动不可以直接控制的硬件可以被访问。而只需要公布这个后门代码即可。一般情况下如果要将Android移植到其他硬件去运行，只需要实现这部分代码即可。包括：显示器驱动，声音，相机，GPS,GSM等等

## Linux内核(Linux Kernel)

Android的核心系统服务依赖于Linux 2.6 内核，如安全性，内存管理，进程管理， 网络协议栈和驱动模型。 Linux 内核也同时作为硬件和软件栈之间的抽象层。其外还对其做了部分修改，主要涉及两部分修改：

 1. Binder (IPC)：提供有效的进程间通信，虽


クラス用の typedef です。DOM オブジェクトに特別なものを求めない場合は、そのオブジェクト用のスクリプト可能化補助クラスは nsDOMGenericSH になります。特別なものが必要な場合は補助クラスの実装をスクロールしてください。

  ここでの例では nsWindowSH クラスです。

補助クラスに必要な nsIXPCScriptable 関数を実装済みの場合は次の手順に移ってください。未実装なら nsIXPCScriptable インターフェース内に記述される引数で、その新しいメンバ関数を実装してください。

やっと面白みがあるところに来ました。スクリプト可能化補助クラス全部を記述することは、まずできないので、ご自分のプログラム技術と既存コードからのコピーを併用する必要があります。ただし、ここではコピーせずに window.location 属性の実装を記述することにします。

window.location の実装

属性の設定を無効にするために必要なスクリプト可能化フラグは WANT_NEWRESOLVE と WANT_SETPROPERTY です。NewResolve() という関数が、そのオブジェクトでの属性を JS API で定義します。二つ目のフラグは .location を .location.href に変換するためのものです。nsWindowSH::NewResolve() 内のコードは次のようになります (nsDOMClassInfo.cpp)。

3553     if (flags & JSRESOLVE_ASSIGNING) {
// 設定されていれば、単に属性を定義します。
3554       if (str == sLocation_id) {
// location 属性を設定。
3555         nsCOMPtr<nsIDOMWindowInternal>
window(do_QueryInterface(native));
3556         NS_ENSURE_TRUE(window, NS_ERROR_UNEXPECTED);
3557
3558         nsCOMPtr<nsIDOMLocation> location;
3559         rv = window->GetLocation(getter_AddRefs(location));
3560         NS_ENSURE_SUCCESS(rv, rv);
// DOM を使って、window オブジェクトの Location オブジェクトを取得します。
3561
3562         jsval v;
3563
3564         rv = WrapNative(cx, obj, location, NS_GET_IID(nsIDOMLocation),
&v);
// この XPConnect 関数で Location オブジェクトの入れ物が Window
// オブジェクト上に用意されます。
3565         NS_ENSURE_SUCCESS(rv, rv);
3566
3567         if (!::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
3568                                    ::JS_GetStringLength(str), v, nsnull,
3569                                    nsnull, 0)) {
3570           return NS_ERROR_FAILURE;
3571         }
// この JS API 呼びだしで、window オブジェクトの「location」属性を定義します。
// その値は Location オブジェクトの XPConnect 容器になっています。
3572
3573         *objp = obj;
3574
3575         return NS_OK;
35


&& !MainActivity.isPopup
        ) {
            translucent = true
            window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
            try {
                val immersive = Settings.System.getInt(contentResolver, "immersive_mode")
                if (immersive == 1) {
                    translucent = false
                }
            } catch (e: Exception) {
            }
        } else if (settings!!.uiExtras && (resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE &&
                    !resources.getBoolean(R.bool.isTablet)) && !MainActivity.isPopup
        ) {
            translucent = true
            window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
            try {
                val immersive = Settings.System.getInt(contentResolver, "immersive_mode")
                if (immersive == 1) {
                    translucent = false
                }
            } catch (e: Exception) {
            }
        } else {
            translucent = false
        }
    }

    override fun onPostCreate(savedInstanceState: Bundle?) {
        super.onPostCreate(savedInstanceState)
        // Sync the toggle state after onRestoreInstanceState has occurred.
        try {
            mDrawerToggle!!.syncState()
        } catch (e: Exception) {
            // landscape mode
        }
    }

    /**
     * 退出登录
     * @param useCurrent 是否只是退出当前账号
     */
    fun logoutFromTwitter(useCurrent: Boolean = true, currentIndex: Int = 1) {
        val currentAccount = if (useCurrent)
            sharedPrefs!!.getInt(AppSettings.CURRENT_ACCOUNT, 1)
        else currentIndex
        val login1 = sharedPrefs!!.getBoolean("is_logged_in_1", false)
        val login2 = sharedPrefs!!.getBoolean("is_logged_in_2", false)

        AccountSessionManager.getInstance()
            .removeAccount(sharedPrefs!!.getString("session_id_$currentAccount", null))
        // Delete the data for the logged out account
        val e = sharedPrefs!!.edit()
        e.remove("is_logged_in_$currentAccount")
        e.remove("new_notification")
        e.remove("new_retweets")
        e.remove("new_favorites")
        e.remove("new_followers")
        e.remove("new_quotes")
        e.remove("current_position_$currentAccount")
        e.remove("last_activity_refresh_$currentAccount")
        e.remove("original_activity_refresh_$currentAccount")
        e.remove("activity_follower_count_$currentAccount")
        e.remove("activity_latest_followers_$currentAccount")
        e.remove("last_direct_message_id_$currentAccount")
        e.remove("last_bookmarked_tweet_id_$currentAccount")
        e.remove("last_favorited_tweet_id_$currentAccount")

        e.commit()
        val homeSources = HomeDataSource.getInstance(context)
        homeSources.deleteAllTweets(currentAccount)
        val mentionsSources = MentionsDataSource.getInstance(context)
        mentionsSources.deleteAllTweets(currentAccount)
        val dmSource = DMDataSource.getInstance(context)
        dmSource.deleteAllTweets(currentAccount)
        val inters = InteractionsDataSource.getInstance(context)
        inters.deleteAllInteractions(currentAccount)
        val activity = ActivityDataSource.getInstance(context)
        activity.deleteAll(currentAccount)
        val favTweets = FavoriteTweetsDataSource.getInstance(context)
        favTweets.deleteAllTweets(currentAccount)
        val bookmarkedTweets = BookmarkedTweetsDataSource.getInstance(context)
        bookmarkedTweets.deleteAllTweets(currentAccount)
        try {
            val account1List1 = sharedPrefs!!.getLong("account_" + currentAccount + "_list_1", 0L)
            val account1List2 = sharedPrefs!!.getLong("account_" + currentAccount + "_list_2", 0L)
            val list = ListDataSource.getInstance(context)
            list.deleteAllTweets(account1List1)
            list.deleteAllTweets(


ng>Property names.

Type

Optional

Variant

A constant that defines the data type of the new Property object. See the Type property for valid data types.

Value

Optional

Variant

A Variant containing the initial property value. See the Value property for details.

DDL

Optional

Variant

A Variant (Boolean subtype) that indicates whether or not the Property is a DDL object. The default is False. If DDL is True, users can't change or delete this Property object unless they have dbSecWriteDef permission.

## Return value

Property

## Remarks

You can create a user-defined **Property** object only in the **[Properties](properties-collection-dao.md)** collection of an object that is persistent.

If you omit one or more of the optional parts when you use **CreateProperty**, you can use an appropriate assignment statement to set or reset the corresponding property before you append the new object to a collection. After you append the object, you can alter some but not all of its property settings. See the **Name**, **Type**, and **Value** property topics for more details.

If name refers to an object that is already a member of the collection, a run-time error occurs when you use the **[Append](fields-append-method-dao.md)** method.

To remove a user-defined **Property** object from the collection, use the **[Delete](fields-delete-method-dao.md)** method on the **Properties** collection. You can't delete built-in properties.

> [!NOTE]
> If you omit the DDL argument, it defaults to False (non-DDL). Because no corresponding DDL property is exposed, you must delete and re-create a **Property** object you want to change from DDL to non-DDL.

---
title: Recordset2.FindLast method (DAO)
TOCTitle: FindLast Method
ms:assetid: 6a31dd00-8e05-6226-ebd8-703d2562b5c7
ms:mtpsurl: https://msdn.microsoft.com/library/Ff195400(v=office.15)
ms:contentKeyID: 48545428
ms.date: 09/18/2015
mtps_version: v=office.15
ms.localizationpriority: medium
---

# Recordset2.FindLast method (DAO)

**Applies to**: Access 2013, Office 2013

Locates the last record in a dynaset- or snapshot-type **[Recordset](recordset-object-dao.md)** object that satisfies the specified criteria and makes that record the current record (Microsoft Access workspaces only).

## Syntax

*expression* .FindLast(***Criteria***)

*expression* A variable that represents a **Recordset2** object.

## Parameters

<colgroup>
<col />
<col />
<col />
<col />


10(%rsp)    ;*synchronization entry",
				"                                                ; - org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog::add@-1 (line 144)",
				"0x00007f447590415c: mov    %rdx,%rax",
				"0x00007f447590415f: add    %rcx,%rax          ;*ladd",
				"                                                ; - org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog::add@2 (line 144)",
				"0x00007f4475904162: add    $0x10,%rsp",
				"0x00007f4475904166: pop    %rbp",
				"0x00007f4475904167: test   %eax,0x5ce1e93(%rip)      # 0x00007f447b5e6000",
				"                                                ;   {poll_return}",
				"0x00007f447590416d: retq",
				"0x00007f447590416e: hlt",
				"0x00007f447590416f: hlt",
				"0x00007f4475904170: hlt",
				"0x00007f4475904171: hlt",
				"0x00007f4475904172: hlt",
				"0x00007f4475904173: hlt",
				"0x00007f4475904174: hlt",
				"0x00007f4475904175: hlt",
				"0x00007f4475904176: hlt",
				"0x00007f4475904177: hlt",
				"0x00007f4475904178: hlt",
				"0x00007f4475904179: hlt",
				"0x00007f447590417a: hlt",
				"0x00007f447590417b: hlt",
				"0x00007f447590417c: hlt",
				"0x00007f447590417d: hlt",
				"0x00007f447590417e: hlt",
				"0x00007f447590417f: hlt",
				"[Exception Handler]",
				"[Stub Code]",
				"0x00007f4475904180: jmpq 0x00007f44758ed2a0  ;   {no_reloc}",
				"[Deopt Handler Code]",
				"0x00007f4475904185: callq 0x00007f447590418a",
				"0x00007f447590418a: subq   $0x5,(%rsp)",
				"0x00007f447590418f: jmpq 0x00007f44758c6b00  ;   {runtime_call}",
				"0x00007f4475904194: hlt",
				"0x00007f4475904195: hlt",
				"0x00007f4475904196: hlt",
				"0x00007f4475904197: hlt", });
	}

	@Test
	public void testAssemblyParseBrokenHeader()
	{
		testAssemblyParse(new String[] {
				"# {method} 'add' '(JJ)J' in 'org/adoptopenjdk/jitwatch/demo/MakeHotSpotLog'",
				"# this:     rsi:rsi   = 'org/adoptopenjdk/jitwatch",
				"/demo/MakeHotSpotLog'",
				"# parm0:    rdx:rdx   = long",
				"# parm1:    rcx:rcx   = long",
				"#           [sp+0x20]  (sp of caller)",
				"0x00007f4475904140: mov  0x8(%rsi),%r10d",
				"0x00007f4475904144: cmp    %r10,%rax",
				"0x00007f4475904147: jne  0x00007f


type."""
        return [c for c in self._curves if c.var.type == var_type]

    def get_node_ids(self):
        return self._unique_curve_ids(self.get_curves_with_variable_type(NODE_VARIABLE))

    def get_element_ids(self):
        return self._unique_curve_ids(self.get_curves_with_variable_type(ELEMENT_VARIABLE))

    def get_current_curve_mode(self):
        if not self._curves: return None
        return self._curves[0].type

    def print_show(self):
        count = 1
        for c in self._curves:
            print " Curve %3d: %s" % (count, c.get_description())
            count += 1

class Curve(object):

    def __init__(self, variable, id=None):
        self.var = variable
        self.id = id
        self.type = TYCURVE
        self.x_var = None
        self.chart_variable_name = self._get_chart_variable_name(self.var)

    def _get_chart_variable_name(self, var):
        component_suffix = str()
        if var.info.GetNumberOfComponents() > 1:
            component_names = ["Magnitude", "0", "1", "2"]
            component_suffix = " (%s)" % component_names[var.component+1]
        return "%s%s" % (var.name, component_suffix)

    def set_x_variable(self, var):
        self.type = XYCURVE
        self.x_var = var
        self.chart_xvariable_name = self._get_chart_variable_name(self.x_var)

    def get_description(self):
        if self.var.type == GLOBAL_VARIABLE:
            return "%s -vs- TIME" % self.var.decorated_name
        elif not self.x_var:
            return "%s at %s %3d -vs- TIME" % (self.var.decorated_name,
                                              self.var.type_name,
                                              self.id)
        else:
            return "%s at %s %3d -vs- %s at %s %3d" % (self.x_var.decorated_name,
                                                       self.x_var.type_name,
                                                       self.id,
                                                       self.var.decorated_name,
                                                       self.var.type_name,
                                                       self.id)

    def get_series_label(self):
        if self.var.type == GLOBAL_VARIABLE:
            return self.var.decorated_name
        else:
            return "%s %s %s" % (self.var.decorated_name,
                                 self.var.type_name,
                                 self.id)

def _get_field_type_for_variable(var):
    if var.type == NODE_VARIABLE: return "POINT"
    if var.type == ELEMENT_VARIABLE: return "CELL"


nts);

          aIndex[iIndex++] = iBottomCapStart + i;
          aIndex[iIndex++] = iTopCapStart + ((i + 1) % numSegments);
          aIndex[iIndex++] = iBottomCapStart + ((i + 1) % numSegments);

          aIndex[iIndex++] = iBottomCapStart + i;
          aIndex[iIndex++] = iTopCapStart + i;
          aIndex[iIndex++] = iTopCapStart + ((i + 1) % numSegments);

          aIndex[iIndex++] = iTop;
          aIndex[iIndex++] = iTopCapStart + ((i + 1) % numSegments);
          aIndex[iIndex++] = iTopCapStart + i;

          angle += angleIncrement;
        }

        mesh.vertices = aVert;
        mesh.SetIndices(aIndex, MeshTopology.Triangles, 0);

        if (s_cylinderSolidColorMeshPool.ContainsKey(numSegments))
          s_cylinderSolidColorMeshPool.Remove(numSegments);

        s_cylinderSolidColorMeshPool.Add(numSegments, mesh);
      }

      return mesh;
    }

    public static Mesh CylinderFlatShaded(int numSegments)
    {
      if (numSegments <= 1)
        return null;

      if (s_cylinderFlatShadedMeshPool == null)
        s_cylinderFlatShadedMeshPool = new Dictionary<int, Mesh>();

      Mesh mesh;
      if (!s_cylinderFlatShadedMeshPool.TryGetValue(numSegments, out mesh) || mesh == null)
      {
        mesh = new Mesh();

        Vector3[] aVert = new Vector3[numSegments * 6 + 2];
        Vector3[] aNormal = new Vector3[aVert.Length];
        int[] aIndex = new int[numSegments * 12];

        Vector3 bottom = new Vector3(0.0f, -0.5f, 0.0f);
        Vector3 top = new Vector3(0.0f, 0.5f, 0.0f);

        int iBottomCapStart = 0;
        int iTopCapStart = numSegments;
        int iSideStart = numSegments * 2;
        int iBottom = numSegments * 6;
        int iTop = numSegments * 6 + 1;

        aVert[iBottom] = bottom;
        aVert[iTop] = top;

        aNormal[iBottom] = new Vector3(0.0f, -1.0f, 0.0f);
        aNormal[iTop] = new Vector3(0.0f, 1.0f, 0.0f);

        int iIndex = 0;
        float angleIncrement = 2.0f * Mathf.PI / numSegments;
        float angle = 0.0f;
        for (int i = 0; i < numSegments; ++i)
        {
          // caps
          Vector3 offset = Mathf.Cos(angle) * Vector3.right + Mathf.Sin(angle) * Vector3.forward;
          aVert[iBottomCapStart + i] = bottom + offset;
          aVert[iTopCapStart + i] = top + offset;

          aNormal[iBottomCapStart + i] = new Vector3(0.0f, -1.0f, 0.0f);
          aNormal[iTopCapStart + i] = new Vector3(0.0f, 1.0f, 0.0f);

          aIndex[iIndex++] = iBottom;
          aIndex[iIndex++] = iBottomCapStart + i;
          aIndex[iIndex++] = iBottomCapStart + ((i + 1) % numSegments);

          aIndex[iIndex++] = iTop;
          aIndex[iIndex++] = iTopCapStart + ((i + 1) % numSegments);
          aIndex[iIndex++] = iTopCapStart + i;

          angle += angleIncrement;

          // sides
          Vector3 offsetNext = Mathf.Cos(angle) * Vector3.right + Mathf.Sin(angle) * Vector3.forward;
          aVert[iSideStart + i * 4    ]


功能，启发卷积神经网络。LeNet-5，CNN之父，Yann LeCun，1997年提出，首次多层级联卷积结构，手写数字有效识别。2012年，Hinton学生Alex，8层卷积神经网络，ILSVRC 2012比赛冠军。AlexNet 成功应用ReLU激活函数、Dropout、最大覆盖池化、LRN层、GPU加速，启发后续技术创新，卷积神经网络研究进入快车道。

AlexNetx后，卷积神经网络，一类网络结构改进调整，一类网络深度增加。

               Perceptron(1957)
              Neocognitron(198x)
     NIN(2013)                  VGG(2014)
     Incepiton V1(2014)    MSRANet(2014)
     Incepiton V2(2015)    ResNet(2015)
     Incepiton V3(2015)    ResNet V2(2015)
            Inception ResNet V2(2016)

2013年，颜水成教授，Network in Network首次发表，优化卷积神经网络结构，推广1x1卷积结构。2014年，Google Incepiton Net V1,Inception Module，反复堆叠高效卷积网络结构，ILSVRC 2014冠军。2015年初，Incepiton V2,Batch Normalization，加速训练过程，提升网络性能。2015年末，Inception V3,Factorization in Small Convolutions思想，分解大尺寸卷积为多个小卷积或一维卷积。

2014年，ILSVRC亚军，VGGNet，全程3x3卷积，19层网络。季军MSRA-Net(微软)也是深层网络。2015年，微软ResNet，152层网络，ILSVRC 2015冠军，top-5错误率3.46%。ResNet V2,Batch Normalization，去除激活层，用Identity Mapping或Preactivation，提升网络性能。Inception ResNet V2,融合Inception Net网络结构,和ResNet训练极深网络残差学习模块。

GPU计算资源，开源工具。

循环神经网络(RNN)，NLP(Nature Language Processing，自然语言处理)最常用神经网络结构。Word2Vec，语言字词转化稠密向量(Dense Vector)。

Word2Vec


    link: 'Collegamento',
        insert: 'Inserisci Collegamento',
        unlink: 'Elimina collegamento',
        edit: 'Modifica collegamento',
        textToDisplay: 'Testo del collegamento',
        url: 'URL del collegamento',
        openInNewWindow: 'Apri in una nuova finestra'
      },
      table: {
        table: 'Tabella'
      },
      hr: {
        insert: 'Inserisce una linea di separazione'
      },
      style: {
        style: 'Stili',
        normal: 'Normale',
        blockquote: 'Citazione',
        pre: 'Codice',
        h1: 'Titolo 1',
        h2: 'Titolo 2',
        h3: 'Titolo 3',
        h4: 'Titolo 4',
        h5: 'Titolo 5',
        h6: 'Titolo 6'
      },
      lists: {
        unordered: 'Elenco non ordinato',
        ordered: 'Elenco ordinato'
      },
      options: {
        help: 'Aiuto',
        fullscreen: 'Modalità a tutto schermo',
        codeview: 'Visualizza codice'
      },
      paragraph: {
        paragraph: 'Paragrafo',
        outdent: 'Diminuisce il livello di rientro',
        indent: 'Aumenta il livello di rientro',
        left: 'Allinea a sinistra',
        center: 'Centra',
        right: 'Allinea a destra',
        justify: 'Giustifica (allinea a destra e sinistra)'
      },
      color: {
        recent: 'Ultimo colore utilizzato',
        more: 'Altri colori',
        background: 'Colore di sfondo',
        foreground: 'Colore',
        transparent: 'Trasparente',
        setTransparent: 'Trasparente',
        reset: 'Reimposta',
        resetToDefault: 'Reimposta i colori'
      },
      shortcut: {
        shortcuts: 'Scorciatoie da tastiera',
        close: 'Chiudi',
        textFormatting: 'Formattazione testo',
        action: 'Azioni',
        paragraphFormatting: 'Formattazione paragrafo',
        documentStyle: 'Stili'
      },
      history: {
        undo: 'Annulla',
        redo: 'Ripristina'
      }
    }
  });
})(jQuery);
(function ($) {
  $.extend($.summernote.lang, {
    'ja-JP': {
      font: {
        bold: '太字',
        italic: '斜体',
        underline: '下線',
        clear: 'クリア',
        height: '文字高',
        name: 'フォント',
        strikethrough: '取り消し線',
        size: '大きさ'
      },
      image: {
        image: '画像',
        insert: '画像挿入',
        resizeFull: '最大化',
        resizeHalf: '1/2',
        resizeQuarter: '1/4',
        floatLeft: '左寄せ',
        floatRight: '右寄せ',
        floatNone: '寄せ解除',
        dragImageHere: 'ここに画像をドラッグしてください',
        selectFromFiles: '画像ファイルを選ぶ',
        url: 'URLから画像を挿入する',
        remove: '画像を削除する'
      },
      video: {
        video: '動画',
        videoLink: '動画リンク',
        insert: '動画挿入',
        url: '動画のURL',
        providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion, Youku)'
      },
      link: {
        link: 'リンク',
        insert: 'リンク挿入',
        unlink: 'リンク解除',
        edit: '編集',
        textToDisplay: 'リンク文字列',


concatenacao = 'A' + 'B' + 'C'
print(concatenacao)

a_dez_vezes = 'A' * 10
tres_vezes_gabriel = 3 * 'Gabriel'
print(a_dez_vezes)
print(tres_vezes_gabriel)


), assets.tile`ComputerScreenOn`)
    music.powerUp.play()
    game.showLongText("Powering Up", DialogLayout.Bottom)
}
let mySpriteAnimationMs = 0
let tileMapWidth = 0
let SplitChestData: string[] = []
let mySpriteFacing = ""
let calculatedPlayerInteractiveRow = 0
let mapTileSize = 0
let mySprite: Sprite = null
let calculatedPlayerInteractiveCol = 0
let chestContents: string[] = []
let FacingDown = ""
let FacingUp = ""
let FacingLeft = ""
let FacingRight = ""
let Separator = ""
Separator = "/"
FacingRight = "Right"
FacingLeft = "Left"
FacingUp = "Up"
FacingDown = "Down"
SetupCharacter()
SetupMap()
import Instruction, { IInstruction, JInstruction, RInstruction, utils } from '../../src/Instruction'
import { expect } from 'chai'

describe('Instruction', () => {
  let instr: any

  describe('Type R instruction', () => {
    before('Creates instruction', () => {
      // 0b00000001010010110100100000100000
      instr = utils.fromInt(0x014b4820)
      console.log('Instruction: ', instr)
    })

    it('Instruction created is of the right type', () => {
      expect(utils.isR(instr)).to.be.true
      expect(instr.type).to.equal('R')
    })

    it('Verifies opcode, rs, rt, rd, shamt and funct', () => {
      // 0b000000 01010 01011 01001 00000 100000
      expect(instr.op).to.equal(0b000000)
      expect(instr.rs).to.equal(0b01010)
      expect(instr.rt).to.equal(0b01011)
      expect(instr.rd).to.equal(0b01001)
      expect(instr.sh).to.equal(0b00000)
      expect(instr.func).to.equal(0x20)
    })
  })

  describe('Type I instruction', () => {
    before('Creates instruction', () => {
      // 0b00100100000000101111111111111111
      instr = utils.fromInt(0x2402ffff)
      console.log('Instruction: ', instr)
    })

    it('Instruction created is of the right type', () => {
      expect(utils.isI(instr)).to.be.true
      expect(instr.type).to.equal('I')
    })

    it('Verifies opcode, rs, rt and immediate', () => {
      // 0b001001 00000 00010 1111111111111111
      expect(instr.op).to.equal(0b001001)
      expect(instr.rs).to.equal(0b00000)
      expect(instr.rt).to.equal(0b00010)
      expect(instr.imm).to.equal(0xffff)
    })
  })

  describe('Type J instruction', () => {
    before('Creates instruction', () => {
      // 0b00001000001011111111111111111111
      instr = utils.fromInt(0x082fffff)
      console.log('Instruction: ', instr)
    })

    it('Instruction created is of the right type', () => {
      expect(utils.isJ(instr)).to.be.true
      expect(instr.type).to.equal('J')
    })

    it('Verifies opcode and address', () => {
      // 0b000010 00 0010 1111 1111 1111 1111 1111
      expect(instr.j).to.equal(0b000010)
      expect(instr.addr).to.equal(0x02fffff)
    })
  })

  describe('Type FR instruction', () => {
    before('Creates instruction', () => {
      // 0b0100 0110 0000 0100 0010 1001 1000 0000
      instr = utils.fromInt(0x46042980)
      console.log('Instructi


271 2.813-4.554 4.941.871 2.582 3.87 2.702 6.995 1.692l-.636-1.727s-3.635 1.162-4.244-.548c-.333-.936 1.381-1.845 3.176-2.358l3.451 9.379c-2.784.836-5.299 2.814-4.578 4.949.871 2.582 3.898 2.703 7.023 1.693l.037.102c.734 1.988 1.36 2.817 2.612 2.817.615 0 1.383-.201 2.388-.563l3.896-1.402 26.931-7.258c3.121-.867 4.955-4.031 4.093-7.068M4.239 22.427c-.336-.944 1.414-1.862 3.227-2.372l1.058 2.873c-.051.016-3.679 1.197-4.285-.501m4.434 11.99c-.335-.94 1.402-1.856 3.209-2.367l1.053 2.86c-.007.002-3.653 1.215-4.262-.493m8.25 22.39c-.335-.939 1.396-1.854 3.2-2.365l1.071 2.91c-.006.002-3.664 1.164-4.271-.545m9.265 2.749c-.818.295-1.393.444-1.709.444h-.015c-.093-.106-.33-.452-.719-1.508l-1.633-4.437c.082-.007.169-.019.246-.023-.011.271.027.549.127.819.41 1.114 1.654 1.688 2.78 1.282s1.706-1.636 1.298-2.749a2.174 2.174 0 00-2.779-1.281c-.081.029-.153.071-.229.108-.646-.182-1.395-.229-2.182-.161l-3.452-9.38c.091-.009.187-.021.272-.026-.011.271.027.549.127.82a2.176 2.176 0 002.781 1.281 2.14 2.14 0 001.297-2.75 2.175 2.175 0 00-2.779-1.281c-.081.029-.152.072-.229.109-.652-.184-1.411-.229-2.208-.158l-3.313-9c.079-.007.163-.019.238-.023-.009.266.028.538.126.804a2.177 2.177 0 002.781 1.282 2.14 2.14 0 001.297-2.75 2.174 2.174 0 00-2.779-1.281c-.089.032-.168.077-.249.119-.64-.176-1.377-.222-2.151-.155l-3.677-9.988c.073-.006.151-.017.222-.021-.004.251.031.506.123.756a2.177 2.177 0 002.781 1.282 2.139 2.139 0 001.297-2.75 2.174 2.174 0 00-2.779-1.281c-.111.04-.212.094-.313.149-.612-.159-1.313-.202-2.047-.143-.342-1.109-.293-1.548-.217-1.711.043-.091.261-.415 1.297-.788l4.139-1.491L40.18 4.237A4.07 4.07 0 0141.543 4c1.606 0 3.046.976 3.581 2.428l13.771 37.418c.333.904.288 1.89-.124 2.775a3.87 3.87 0 01-2.221 2.007l-26.222 9.438-4.14 1.49"/><path fill="currentColor" d="m38.087 15.948-17.185 6.186 2.652 7.205 17.185-6.187-2.652-7.204m-15.898 6.785 15.302-5.508 1.961 5.327-15.302 5.509-1.961-5.328"/></svg>';
  static const S


64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V320v5.5c0 17-6.7 33.3-18.7 45.3l-90.5 90.5c-12 12-28.3 18.7-45.3 18.7H288z"],
    "face-sad-tear": [512, 512, [128546, "sad-tear"], "f5b4", "M175.9 448c-35-.1-65.5-22.6-76-54.6C67.6 356.8 48 308.7 48 256C48 141.1 141.1 48 256 48s208 93.1 208 208s-93.1 208-208 208c-28.4 0-55.5-5.7-80.1-16zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM128 369c0 26 21.5 47 48 47s48-21 48-47c0-20-28.4-60.4-41.6-77.7c-3.2-4.4-9.6-4.4-12.8 0C156.6 308.6 128 349 128 369zm128-65c-13.3 0-24 10.7-24 24s10.7 24 24 24c30.7 0 58.7 11.5 80 30.6c9.9 8.8 25 8 33.9-1.9s8-25-1.9-33.9C338.3 320.2 299 304 256 304zm47.6-96a32 32 0 1 0 64 0 32 32 0 1 0 -64 0zm-128 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"],
    "hand-point-left": [512, 512, [], "f0a5", "M64 128l177.6 0c-1 5.2-1.6 10.5-1.6 16l0 16-32 0L64 160c-8.8 0-16-7.2-16-16s7.2-16 16-16zm224 16c0-17.7 14.3-32 32-32c0 0 0 0 0 0l24 0c66.3 0 120 53.7 120 120l0 48c0 52.5-33.7 97.1-80.7 113.4c.5-3.1 .7-6.2 .7-9.4c0-20-9.2-37.9-23.6-49.7c4.9-9 7.6-19.4 7.6-30.3c0-15.1-5.3-29-14-40c8.8-11 14-24.9 14-40l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-40 0-40zm32-80s0 0 0 0c-18 0-34.6 6-48 16L64 80C28.7 80 0 108.7 0 144s28.7 64 64 64l82 0c-1.3 5.1-2 10.5-2 16c0 25.3 14.7 47.2 36 57.6c-2.6 7-4 14.5-4 22.4c0 20 9.2 37.9 23.6 49.7c-4.9 9-7.6 19.4-7.6 30.3c0 35.3 28.7 64 64 64l64 0 24 0c92.8 0 168-75.2 168-168l0-48c0-92.8-75.2-168-168-168l-24 0zM256 400c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0zM240 224c0 5.5 .7 10.9 2 16l-2 0-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l32 0 0 16zm24 64l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l24 0z"]
  };

  bunker(function () {
    defineIcons('far', icons);
    defineIcons('fa-regular', icons);
  });

}());
(function () {
  'use strict';

  var _WINDOW = {};
  var _DOCUMENT = {};

  try {
    if (typeof window !== 'undefined') _WINDOW = window;
    if (typeof document !== 'undefined') _DOCUMENT = document;
  } catch (e) {}

  var _ref = _WINDOW.navigator || {},
      _ref$userAgent = _ref.userAgent,
      userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;
  var WINDOW = _WINDOW;
  var DOCUMENT = _DOCUMENT;
  var IS_BROWSER = !!WINDOW.document;


  }

  /// Watch scrolling to fetch more data.
  void onScroll(double offset) {
    if (!_hasMoreResults) {
      return;
    }

    if (_pageState == EnumPageState.searching ||
        _pageState == EnumPageState.searchingMore ||
        _pageState == EnumPageState.loading ||
        _pageState == EnumPageState.loadingMore) {
      return;
    }

    if (_pageScrollController.position.maxScrollExtent - offset > 200) {
      return;
    }

    if (_pageScrollController.position.maxScrollExtent - offset <= 200) {
      fetchQuotes();
    }
  }

  /// Open share image bottom sheet.
  void onShareImage(Quote quote) {
    final Size windowSize = MediaQuery.of(context).size;
    _textWrapSolution = Utils.graphic.getTextSolution(
      quote: quote,
      windowSize: windowSize,
      style: Utils.calligraphy.body(),
    );

    Utils.graphic.onOpenShareImage(
      context,
      mounted: mounted,
      quote: quote,
      screenshotController: _screenshotController,
      textWrapSolution: _textWrapSolution,
    );
  }

  /// Callback fired to share quote as link.
  void onShareLink(Quote quote) {
    Utils.graphic.onShareLink(context, quote: quote);
  }

  /// Callback fired to share quote as text.
  void onShareText(Quote quote) {
    Utils.graphic.onShareText(
      context,
      quote: quote,
      onCopyQuote: (Quote quote) {
        onCopyQuote(quote);
        Utils.graphic.showSnackbar(
          context,
          message: "quote.copy.success.name".tr(),
        );
      },
    );
  }

  /// Callback on tap topic name -> scroll to top.
  void onTapTopicName() {
    _pageScrollController.animateTo(
      0.0,
      duration: const Duration(milliseconds: 150),
      curve: Curves.decelerate,
    );
  }
}
import "package:easy_localization/easy_localization.dart";
import "package:flutter/material.dart";
import "package:kwotes/globals/constants.dart";
import "package:kwotes/globals/utils.dart";

/// Favourites page header.
class FavouritesPageHeader extends StatelessWidget {
  /// Header part of favourites page.
  const FavouritesPageHeader({
    super.key,
    this.isMobileSize = false,
  });

  /// Reduce font size if true.
  final bool isMobileSize;

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.only(left: 6.0),
      child: Hero(
        tag: "favourites",
        child: Material(
          color: Colors.transparent,
          child: Text.rich(
            TextSpan(text: "favourites.name".tr(), children: [
              TextSpan(
                text: ".",
                style: TextStyle(
                  color: Constants.colors.likes,
                ),
              ),
            ]),
            maxLines: 1,
            style: Utils.calligraphy.title(
              textStyle: TextStyle(
                fontSize: isMobileSize ? 74.0 : 124.0,
                fontWeight: FontWeight.w600,
                overflow: TextOverflow.ellipsis,
                color: Theme.of(context)
                    .textTheme
                    .bodyMedium
                    ?.color
                    ?.withOpacity(0.8),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
import "package:flutter/material.dart";
import "package:kwotes/screens/signup/signup_page_email_input.dart";
import "package:kwotes/screens/signup/signup_page_footer.dart";
import "package:kwotes/screens/signup/signup_page_password_inputs.dart";
import "package:kwotes/screens/signup/signup_page_username_input.dart";
import "package:kwotes/types/enums/enum_page_state.dart";

class SignupPageBody extends Stat


nImprovement(old.m_minImprovement)
   , m_goodEnoughRatio(old.m_goodEnoughRatio)
{
   assert(m_maxIterations > 0);
   assert(m_minImprovement > 0.0 && m_minImprovement <= 1.0);
   assert(m_goodEnoughRatio >= 0.0);
}

SPxGeometSC& SPxGeometSC::operator=(const SPxGeometSC& rhs)
{
   if (this != &rhs)
   {
      SPxScaler::operator=(rhs);
   }

   return *this;
}

void SPxGeometSC::scale(SPxLPBase<Real>& lp, bool persistent)
{

   MSG_INFO1( (*spxout), (*spxout) << "Geometric scaling LP" << (persistent ? " (persistent)" : "") << (postequilibration ? " with post-equilibration" : "") << std::endl; )

   setup(lp);

   /* We want to do that direction first, with the lower ratio.
    * See SPxEquiliSC::scale() for a reasoning.
    */
   const Real colratio = maxColRatio(lp);
   const Real rowratio = maxRowRatio(lp);

   const bool colFirst = colratio < rowratio;

   Real p0start;
   Real p1start;

   if( colFirst )
   {
     p0start = colratio;
     p1start = rowratio;
   }
   else
   {
     p0start = rowratio;
     p1start = colratio;
   }

   MSG_INFO2( (*spxout), (*spxout) << "before scaling:"
                        << " min= " << lp.minAbsNzo()
                        << " max= " << lp.maxAbsNzo()
                        << " col-ratio= " << colratio
                        << " row-ratio= " << rowratio
                        << std::endl; )

   // perform geometric scaling only if maximum ratio is above threshold
   bool geoscale = p1start > m_goodEnoughRatio;

   if( !geoscale )
   {
      MSG_INFO2( (*spxout), (*spxout) << "No geometric scaling done, ratio good enough" << std::endl; )

      if( !postequilibration )
      {
         lp.setScalingInfo(true);
         return;
      }

      MSG_INFO2( (*spxout), (*spxout) << " ... but will still perform equilibrium scaling" << std::endl; )
   }

   std::vector<Real> rowscale(unsigned(lp.nRows()), 1.0);
   std::vector<Real> colscale(unsigned(lp.nCols()), 1.0);

   Real p0 = 0.0;
   Real p1 = 0.0;

   if( geoscale )
   {
      Real p0prev = p0start;
      Real p1prev = p1start;

      // we make at most maxIterations.
      for( int count = 0; count < m_maxIterations; count++ )
      {
         if( colFirst )
         {
            p0 = computeScalingVec(lp.colSet(), rowscale, colscale);
            p1 = computeScalingVec(lp.rowSet(), colscale, rowscale);
         }
         else
         {
            p0 = computeScalingVec(lp.rowSet(), colscale, rowscale);
            p1 = computeScalingVec(lp.colSet(), rowscale, colscale);
         }

         MSG_INFO3( (*spxout), (*spxout) << "Geometric scaling round " << count
                              << " col-ratio= " << (colFirst ? p0 : p1)
                              << " row-ratio= " << (colFirst ? p1 : p0)
                              << std::endl; )

         if( p0 > m_minImprovement * p0prev && p1 > m_minImprovement * p1prev )
            break;

         p0prev = p0;
         p1prev = p1;
      }

      // perform geometric scaling only if there is enough (default 15%) improvement.
      geoscale = (p0 <= m_minImprovement * p0


 a.s * b.s;
                return qr;
            }

            if (a instanceof Rot && b instanceof es.Vector2) {
                return new es.Vector2(a.c * b.x + a.s * b.y, -a.s * b.x + a.c * b.y);
            }
        }

        public static mulT(q: Rot, v: es.Vector2) {
            return new es.Vector2(q.c * v.x + q.s * v.y, -q.s * v.x + q.c * v.y);
        }

        public static cross(a: es.Vector2, b: es.Vector2) {
            return a.x * b.y - a.y * b.x;
        }
    }

    /**
     * 2×2矩阵。 以列主要顺序存储
     */
    export class Mat22 {
        public ex: es.Vector2;
        public ey: es.Vector2;

        constructor(c1: es.Vector2, c2:es.Vector2) {
            this.ex = c1;
            this.ey = c2;
        }

    }
}import { ArticuloLectura } from './ArticuloLectura';

export class Revista extends ArticuloLectura {
    private articulos: string[];

    public constructor(ISBN: number, autor: string, editorial: string, titulo: string, cantidadPaginas: number, articulos: string[]) {
        super();
        this.contructor(ISBN, autor, editorial, titulo, cantidadPaginas);
        this.articulos = articulos;

    }

    public getArticulos(): string[] {
        return this.articulos;
    }
    //Verifico que el numero de paginas no supere las 50, en caso de hacerlo muestro un mensaje de error y no ejecuto la operacion.
    public setCantidadPaginas(c: number) {
        if (this.cantidadPaginas + c > 50)

            console.error("Max de paginas = 50;");
        else
            this.cantidadPaginas += c;

    }
}
import * as deepFreeze from 'deep-freeze'

import renameTodo, { type as RENAME_TODO } from '../../actions/renameTodo'
import toggleTodo, { type as TOGGLE_TODO } from '../../actions/toggleTodo'
import addTodo, { type as ADD_TODO } from '../../actions/addTodo'

import { Todo } from '../../state'

import todosReducer, { INITIAL_STATE } from '../todosReducer'

const originalName = 'some name'

const makeToggle = (idx: number): Todo => ({
  id: `some id ${idx}`,
  name: originalName,
  checked: false
})

const initializeState = (count: number) => {
  const todos = Array.from(Array(count))
    .map((v, i) => makeToggle(i))
  return deepFreeze(todos) as Todo[]
}

describe('todosReducer', () => {
  describe('initialize', () => {
    it('should return initial state to an uninitialized call', () => {
      const actual = todosReducer(undefined, { type: 'initialize' })
      const expected = INITIAL_STATE

      expect(actual).toBe(expected)
    })
  })

  describe(RENAME_TODO, () => {
    let state: Todo[] = initializeState(4)
    beforeEach(() => state = initializeState(4))

    state.forEach(item => {
      it('should rename the chosen todo', () => {
        const expected = 'new name'
        const mutated = todosReducer(state, renameTodo({
          id: item.id,
          name: expected
        }))

        const actual = mutated.find(m => m.id === item.id)
        expect(actual.name).toBe(expected)
      })

      it