foo").is_err());
            c.set_str("a.foo", "foobar1").unwrap();
            c.set_str("a.bar", "foobar2").unwrap();
            assert_eq!(
                fetch_value(&c.entries(None).unwrap(), "a.foo"),
                Some(String::from("foobar1"))
            );
            assert_eq!(
                fetch_value(&c.entries(None).unwrap(), "a.bar"),
                Some(String::from("foobar2"))
            );
        }
    }
}
<reponame>Sauro98/appr_dbscan_rust<filename>tests/int_tests.rs
extern crate appr_dbscan;
use appr_dbscan::do_appr_dbscan_auto_dimensionality_file;
use appr_dbscan::do_appr_dbscan_file;
use appr_dbscan::utils::DBSCANResult;
#[test]
fn out_3_test_1() {
    let res : DBSCANResult<3> = do_appr_dbscan_file("./datasets/out_3.txt", 1.25, 1.0, 15);
    assert_eq!(res.len() - 1, 11);
    assert_eq!(res[0].len(),1476);
}

#[test]
fn out_3_test_2() {
    let res : DBSCANResult<3> = do_appr_dbscan_file("./datasets/out_3.txt", 1.25, 0.7, 15);
    assert_eq!(res.len() - 1, 18);
    assert_eq!(res[0].len(),2038);
}

#[test]
fn out_3_test_3() {
    let res : DBSCANResult<3> = do_appr_dbscan_file("./datasets/out_3.txt", 1.25, 0.001, 15);
    assert_eq!(res.len() - 1, 33);
    assert_eq!(res[0].len(),3162);
}

#[test]
fn out20000_test_1() {
    let (res,dim) = do_appr_dbscan_auto_dimensionality_file("./datasets/out20000.txt", 0.3, 0.1, 30);
    assert_eq!(dim,2);
    assert_eq!(res.len() - 1, 4);
    assert_eq!(res[0].len(),0);
}

#[test]
fn out20000_test_2() {
    let (res,_) = do_appr_dbscan_auto_dimensionality_file("./datasets/out20000.txt", 0.25, 0.001, 30);
    assert_eq!(res.len() - 1, 6);
    assert_eq!(res[0].len(),0);
}

#[test]
fn out20000_test_3() {
    let (res,_) = do_appr_dbscan_auto_dimensionality_file("./datasets/out20000.txt", 0.05, 0.0001, 15);
    assert_eq!(res.len() - 1, 8);
    assert_eq!(res[0].len(),305);
}<reponame>infinyon/fluvio
//!
//! # Streaming Coordinator Metadata
//!
//! Metadata stores a copy of the data from KV store in local memory.
//!
use std::sync::Arc;

use crate::config::ScConfig;
use crate::stores::spu::*;
use crate::stores::partition::*;
use crate::stores::topic::*;
use crate::stores::spg::*;
use crate::stores::connector::*;
use crate::stores::smartmodule::*;
use crate::stores::table::*;
use crate::stores::*;

pub type SharedContext = Arc<Context>;

/// Global Context for SC
/// This is where we store globally accessible data
#[derive(Debug)]
pub struct Context {
    spus: StoreContext<SpuSpec>,
    partitions: StoreContext<PartitionSpec>,
    topics: StoreContext<TopicSpec>,
    spgs: StoreContext<SpuGroupSpec>,
    managed_connectors: StoreContext<ManagedConnectorSpec>,
    smart_modules: StoreContext<SmartModuleSpec>,
    tables: StoreContext<TableSpec>,
    health: SharedHealthCheck,
    config: ScConfig,
}

// -----------------------------------
// ScMetadata - Imple


)
  local engine = env.engine
  local context = engine.context
  local c_input = context.input  -- 原始未轉換輸入碼
  -- local array30_r = string.match(c_input, "^==")  -- 改用 schema 內限制
  local _end2 = context:get_preedit().sel_end + 2
  local array30_nil_cand = Candidate("simp_array30nil", 0, _end2, "", "⎔")  -- 選擇空碼"⎔"效果為取消，測試string.len('⎔')等於「3」，如設置「4」為==反查時就不會露出原英文編碼（"⎔"只出現在一二碼字）
  -- local array30_nil_cand = Candidate("simp_array30nil", 0, string.len(c_input) , "", "⎔")  -- 選擇空碼"⎔"效果為取消，測試string.len('⎔')等於「3」，如設置「4」為==反查時就不會露出原英文編碼（"⎔"只出現在一二碼字）
  -- local array30_nil_cand = Candidate("simp_array30nil", 0, string.len(g_c_t) , "", "⎔")  -- 選擇空碼"⎔"效果為卡住，但 preedit 顯示會有問題

  for cand in inp:iter() do
    if #c_input<5 then
      -- array30_nil_cand.preedit = cand.preedit
      -- yield(string.match(cand.text, "^⎔%d$" ) and array30_nil_cand or cand)
      local cand_filtr = string.match(cand.text, "^⎔%d$" ) and change_preedit(array30_nil_cand, cand.preedit) or cand
      yield(cand_filtr)
    else
      yield(cand)
    end
  end

  -- --- 以下舊寫法
  -- if array30_r then
  --   for cand in inp:iter() do
  --     if string.match(cand.text, "^⎔%d$" ) then
  --       -- local cccc = string.gsub(cand.text, "^⎔2$", "⎔")
  --       -- cand.text = '⎔'
  --       -- cand:get_genuine().text = '@'
  --       -- cand:get_genuine().comment = cand.comment .. "⎔"
  -- --[[
  --       欲定義的 translator 包含三個輸入參數：
  --       - input: 待翻譯的字符串
  --       - seg: 包含 `start` 和 `_end` 兩個屬性，分別表示當前串在輸入框中的起始和結束位置
  --       - env: 可選參數，表示 translator 所處的環境
  -- --]]
  --       -- yield(Candidate("date", seg.start, seg._end, "⎔" , "〔日期〕"))
  --       -- yield(Candidate("date", seg.start, seg._end, string.gsub(cand.text, "^⎔2$", "⎔") , "〔日期〕"))
  -- --[[
  --       -- local g_c_t = env.engine.context:get_commit_text()  -- 原版樣式
  --       -- local text = cand.text  -- 原版樣式
  --       -- yield(Candidate("cap", 0, string.len(g_c_t) , text, cand.comment))  -- 原版樣式
  -- --]]
  --       -- local array30_nil_


 (artist:def*)) +(folderId:"
                + FID1 + ")", query.toString());

        query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ARTIST_ID3);
        assertEquals("SearchSong",
                "+((artist:abc*) (artist:def*)) +(folderId:" + FID1
                        + " folderId:" + FID2 + ")",
                query.toString());
    }

    @Test
    public void testSearchAlbumId3() throws IOException {
        SearchCriteria criteria = new SearchCriteria();
        criteria.setOffset(10);
        criteria.setCount(Integer.MAX_VALUE);
        criteria.setQuery(QUERY_ENG_ONLY);

        Query query = queryFactory.search(criteria, SINGLE_FOLDERS, IndexType.ALBUM_ID3);
        assertEquals(
                "SearchAlbumId3", "+(((album:abc*)^1.1 artist:abc*) ((album:def*)^1.1 artist:def*)) "
                        + "+(folderId:" + FID1 + ")",
                query.toString());

        query = queryFactory.search(criteria, MULTI_FOLDERS, IndexType.ALBUM_ID3);
        assertEquals("SearchAlbumId3",
                "+(((album:abc*)^1.1 artist:abc*) ((album:def*)^1.1 artist:def*)) +(folderId:"
                        + FID1 + " folderId:"
                        + FID2 + ")",
                query.toString());
    }

    @Test
    public void testSearchByNameArtist() throws IOException {
        Query query = queryFactory.searchByName(FieldNames.ARTIST, QUERY_ENG_ONLY);
        assertEquals("SearchByNameArtist", "artist:abc artist:def*", query.toString());
    }

    @Test
    public void testSearchByNameAlbum() throws IOException {
        Query query = queryFactory.searchByName(FieldNames.ALBUM, QUERY_ENG_ONLY);
        assertEquals("SearchByNameAlbum", "album:abc album:def*", query.toString());
    }

    @Test
    public void testSearchByNameTitle() throws IOException {
        Query query = queryFactory.searchByName(FieldNames.TITLE, QUERY_ENG_ONLY);
        assertEquals("SearchByNameTitle", "title:abc title:def*", query.toString());
    }

    @Test
    public void testGetRandomSongs() throws IOException {
        RandomSearchCriteria criteria = new RandomSearchCriteria(50, "Classic Rock",
                1900, 2000, SINGLE_FOLDERS);

        Query query = queryFactory.getRandomSongs(criteria);
        assertEquals(ToStringBuilder.reflectionToString(criteria),
                "+mediaType:MUSIC +genre:Classic Rock +year:[1900 TO 2000] +(folder:" + PATH1 + ")",
                query.toString());

        criteria = new RandomSearchCriteria(50, "Classic Rock", 1900,
                2000, MULTI_FOLDERS);
        query = queryFactory.getRandomSongs(criteria);
        assertEquals(ToStringBuilder.reflectionToString(criteria),
                "+mediaType:MUSIC +genre:Classic Rock +year:[1900 TO 2000] +(folder:" + PATH1 + " folder:" + PATH2
                        + ")",
                query.toString());

        criteria = new RandomSearchCriteria(50, "Classic Rock", null, null, MULTI_FOLDERS);
        query = queryFactory.getRandomSongs(criteria);
        assertEquals(ToStringBuilder.reflectionToString(criteria),
                "+mediaType:MUSIC +genre:Classic Rock +(folder:" + PATH1 + " folder:" + PATH2 + ")",
                query.toString());

        criteria = new RandomSearchCriteria(50, "Classic Rock", 1900, null,
                MULTI_FOLDERS);
        query = queryFactory.getRandomSongs(criteria);
        assertEquals(ToStringBuilder.reflectionToString(criteria),
                "+mediaType:MUSIC +genre:Classic Rock +year:[1900 TO 2147483647] +(folder:" + PATH1 + " folder:" + PATH2
                        + ")",
                query.toString());

        criteria = new RandomSearchCriteria(50, "Classic Rock", null, 2000,


'''	 track_yellow_draw_line.py

This program just track a yellow object in front of camera and draws a yellow line according to movement of the object.

Written by Abid.K	--mail me at abidrahman2@gmail.com	'''

################################################################################################

import cv
posx=0
posy=0

def getthresholdedimg(im):
	'''this function take RGB image.Then convert it into HSV for easy colour detection and threshold it with yellow part as white and all other regions as black.Then return that image'''
	imghsv=cv.CreateImage(cv.GetSize(im),8,3)
	cv.CvtColor(im,imghsv,cv.CV_BGR2HSV)				# Convert image from RGB to HSV
	imgthreshold=cv.CreateImage(cv.GetSize(im),8,1)
	cv.InRangeS(imghsv,cv.Scalar(20,100,100),cv.Scalar(30,255,255),imgthreshold)	# Select a range of yellow color
	return imgthreshold

def getpositions(im):
	''' this function returns leftmost,rightmost,topmost and bottommost values of the white blob in the thresholded image'''
	leftmost=0
	rightmost=0
	topmost=0
	bottommost=0
	temp=0
	for i in range(im.width):
		col=cv.GetCol(im,i)
		if cv.Sum(col)[0]!=0.0:
			rightmost=i
			if temp==0:
				leftmost=i
				temp=1
	for i in range(im.height):
		row=cv.GetRow(im,i)
		if cv.Sum(row)[0]!=0.0:
			bottommost=i
			if temp==1:
				topmost=i
				temp=2
	return (leftmost,rightmost,topmost,bottommost)

capture=cv.CaptureFromCAM(0)
frame=cv.QueryFrame(capture)
test=cv.CreateImage(cv.GetSize(frame),8,3)
cv.NamedWindow("output")

while(1):
	frame=cv.QueryFrame(capture)
	cv.Flip(frame,frame,1)
	imdraw=cv.CreateImage(cv.GetSize(frame),8,3)	# we make all drawings on imdraw.
	imgyellowthresh=getthresholdedimg(frame)	# we get coordinates from imgyellowthresh
	cv.Erode(imgyellowthresh,imgyellowthresh,None,1)# eroding removes small noises
	(leftmost,rightmost,topmost,bottommost)=getpositions(imgyellowthresh)
	if (leftmost-rightmost!=0) or (topmost-bottommost!=0):
		lastx=posx
		lasty=posy
		posx=cv.Round((rightmost+leftmost)/2)
		posy=cv.Round((bottommost+topmost)/2)
		if lastx!=0 and lasty!=0:
			cv.Line(imdraw,(posx,posy),(lastx,lasty),(0,255,255))
			cv.Circle(imdraw,(posx,posy),5,(0,255,255),-1)

	cv.Add(test,imdraw,test)			# adding imdraw on test keeps all lines there on the test frame. If not, we don't get full drawing, instead we get only that fraction of line at the moment.
	cv.ShowImage("output",test)
	if cv.WaitKey(33)==1048603:			# exit if Esc key is pressed
		break
cv.DestroyWindow("output")				# releasing window
#######################################################################################################
## Please try mouse_callback.py and then read pick_and_track.py


контактной информации, страны происхождения товара.

Открывается по команде Страны мира раздела Справочники. В списке можно хранить только несколько необходимых для работы стран.

Может быть заполнен как вручную, так и по данным общероссийского классификатора стран мира (ОКСМ). Классификатор стран мира открывается по соответствующей команде меню Еще.

В списке выводится информация:

Поля Наименование и Полное наименование предназначены для хранения соответственно краткого и полного официального наименования страны мира. Для представления страны, в том числе и при печати, будет использовано по умолчанию краткое наименование. Отсутствие в позиции списка полного наименования страны мира означает его совпадение с кратким наименованием.

Поле Код содержит трёхзначный цифровой код страны мира, позволяющий однозначно идентифицировать страну согласно ОКСМ. Для стран, таможенных союзов и прочих данных, не относящихся к классификатору стран (например, Евросоюз), в это поле рекомендуется вводить "--".

Поля Код Альфа-2 и Код Альфа-3 содержат двухзначный (альфа-2) и трёхзначный (альфа-3) коды для идентификации государств и зависимых территорий, основных административных образований внутри государств, согласно ГОСТ 7.67 и ISO 3166

Участник ЕАЭС - если страна является участником ЕАЭС, то в соответствующей колонке проставляется флажок.

Для удобства работы со списком можно добавлять страны в список из классификатора по мере необходимости. В случае необходимости в списке можно отредактировать страну, если данные о ней изменились, и классификатор еще не обновляется.

Добавление страны из классификатора

Нажмите Добавить из классификатора.

Ввод вручную

В некоторых случаях необходимо ввести какую-нибудь область, или содружество стран, например, Евросоюз.

<li


tionCompletion).Squared();
            LeftFrontArmScale = Sqrt(NeckAppearInterpolant);
            RightFrontArmScale = Sqrt(NeckAppearInterpolant);
            LeftFrontArmOpacity = InverseLerp(0f, 0.2f, NeckAppearInterpolant);
            RightFrontArmOpacity = LeftFrontArmOpacity;
            LilyScale = NeckAppearInterpolant.Squared();
            LegScale = Vector2.One * NeckAppearInterpolant;
            HeadOpacity = InverseLerp(0f, 0.4f, NeckAppearInterpolant);
        }

        // Make the Avatar's rotation stabilize, just in case it wasn't zero when the teleport was initiated.
        NPC.rotation = NPC.rotation.AngleLerp(0f, 0.02f).AngleTowards(0f, 0.04f);

        // Make the portal close and then open up again.
        NPC.scale = (1f - InverseLerpBump(0.3f, 0.5f, 0.5f, 0.7f, animationCompletion)).Squared();
        RiftVanishInterpolant = 1f - NPC.scale;

        // Perform the teleport.
        if (AITimer == (int)(Teleport_TeleportDuration * 0.5f))
        {
            // Go to the new teleport spot.
            if (Main.netMode != NetmodeID.MultiplayerClient)
            {
                NPC.Center = TeleportAction();
                HeadPosition = NPC.Center;
                LeftArmPosition = NPC.Center;
                RightArmPosition = NPC.Center;
                NPC.netUpdate = true;
                NPC.netSpam = 0;
            }

            // Play a teleport sound.
            if (!Main.LocalPlayer.dead)
                SoundEngine.PlaySound(GennedAssets.Sounds.Avatar.RiftOpen);

            // Shake the screen.
            ScreenShakeSystem.StartShake(8.4f);

            // Shake the screen.
            ScreenShakeSystem.StartShakeAtPoint(NPC.Center, 8f);
            GeneralScreenEffectSystem.ChromaticAberration.Start(NPC.Center, 1.2f, 60);

            // Create teleport particle effects.
            ExpandingGreyscaleCircleParticle circle = new ExpandingGreyscaleCircleParticle(NPC.Center, Vector2.Zero, new(255, 0, 39), 10, 0.28f);
            VerticalLightStreakParticle bigLightStreak = new VerticalLightStreakParticle(NPC.Center, Vector2.Zero, new(105, 215, 239), 10, new(2.4f, 3f));
            MagicBurstParticle magicBurst = new MagicBurstParticle(NPC.Center, Vector2.Zero, new(150, 109, 219), 15, 2f, 0.07f);
            for (int i = 0; i < 30; i++)
            {
                Vector2 smallLightStreakSpawnPosition = NPC.Center + Main.rand.NextVector2Square(-NPC.width, NPC.width) * new Vector2(0.15f, 0.2f);
                Vector2 smallLightStreakVelocity = Vector2.UnitY * Main.rand.NextFloat(-3f, 3f);
                VerticalLightStreakParticle smallLightStreak = new VerticalLightStreakParticle(smallLightStreakSpawnPosition, smallLightStreakVelocity, Color.White, 10, new(0.1f, 0.3f));
                smallLightStreak.Spawn();
            }
            bigLightStreak.Spawn();
            circle.Spawn();
            magicBurst.Spawn();

            // Clear fluids.
            LiquidDrawContents.LiquidPoints.Clear();
        }

        // Update limbs.
        PerformStandardLimbUpdates();
    }

    public void DoBehavior_TeleportAbovePlayer()
    {
        Vector2 teleportDestination = Target.Center - Vector2.UnitY * 350f;
        if (AITimer == 1 && !NPC.WithinRange(teleportDestination, 480f))
            StartTeleportAnimation(() => Target.Center - Vector2.UnitY * 350f);
    }

    public void StartTeleportAnimation(Func<Vector2> tele


-vertexes related to target vertex', () => {
        expect(pathfinder.getInVertexes('A')).toEqual([])
        expect(pathfinder.getInVertexes('B')).toEqual(['A'])
      })
    })
  })

  describe('static', () => {
    describe('#getDegree', () => {
      it('returns degree of vertex', () => {
        expect(Pathfinder.getDegree(graph, 'A')).toBe(3)
      })
    })

    describe('#getInDegree', () => {
      it('returns in-degree of vertex', () => {
        expect(Pathfinder.getInDegree(graph, 'A')).toBe(0)
        expect(Pathfinder.getInDegree(graph, 'B')).toBe(1)
      })
    })

    describe('#getOutDegree', () => {
      it('returns out-degree of vertex', () => {
        expect(Pathfinder.getOutDegree(graph, 'A')).toBe(3)
        expect(Pathfinder.getOutDegree(graph, 'B')).toBe(2)
      })
    })

    describe('#getEdgesOf', () => {
      it('returns edges of vertex', () => {
        expect(Pathfinder.getEdgesOf(graph, 'A')).toEqual(['AB', 'AC', 'AD'])
        expect(Pathfinder.getEdgesOf(graph, 'B')).toEqual(['AB', 'BC', 'BD'])
      })
    })

    describe('#getInEdgesOf', () => {
      it('returns in-edges of vertex', () => {
        expect(Pathfinder.getInEdgesOf(graph, 'A')).toEqual([])
        expect(Pathfinder.getInEdgesOf(graph, 'B')).toEqual(['AB'])
      })
    })

    describe('#getOutEdgesOf', () => {
      it('returns out-edges of vertex', () => {
        expect(Pathfinder.getOutEdgesOf(graph, 'A')).toEqual(['AB', 'AC', 'AD'])
        expect(Pathfinder.getOutEdgesOf(graph, 'B')).toEqual(['BC', 'BD'])
      })
    })

    describe('#getOutVertexes', () => {
      it('returns out-vertexes related to target vertex', () => {
        expect(Pathfinder.getOutVertexes(graph, 'A')).toEqual(['B', 'C', 'D'])
        expect(Pathfinder.getOutVertexes(graph, 'B')).toEqual(['C', 'D'])
      })
    })

    describe('#getInVertexes', () => {
      it('returns in-vertexes related to target vertex', () => {
        expect(Pathfinder.getInVertexes(graph, 'A')).toEqual([])
        expect(Pathfinder.getInVertexes(graph, 'B')).toEqual(['A'])
      })
    })
  })
})
import { Component, OnInit } from '@angular/core';
import { Variable } from '@angular/compiler/src/render3/r3_ast';

@Component({
    selector: 'app-math',
    templateUrl: './math.component.html',
    styleUrls: ['./math.component.css'],

  })
export class MathComponent implements OnInit {

    clickMessage = '';

    onClickMe() {

      var num:number = parseInt(document.getElementById("1").value);
      var num2:number = parseInt(document.getElementById("2").value);
      //I know this is wrong because angular is throwing a huge hissy fit, but for now this works, I'll look into other stuff later.

      if (!num || !num2)
      {
        this.clickMessage = "Please enter something";
      }
      else{
        this.clickMessage = 'Sum is: ' + this.add(num,num2);
      }

    }
  add( x:number  ,y:number ):number{


#ifndef __KERN_SYNC_WAIT_H__
#define __KERN_SYNC_WAIT_H__

#include <list.h>

typedef struct {
    list_entry_t wait_head;
} wait_queue_t;

struct proc_struct;

typedef struct {
    struct proc_struct *proc;
    uint32_t wakeup_flags;
    wait_queue_t *wait_queue;
    list_entry_t wait_link;
} wait_t;

#define le2wait(le, member)         \
    to_struct((le), wait_t, member)

void wait_init(wait_t *wait, struct proc_struct *proc);
void wait_queue_init(wait_queue_t *queue);
void wait_queue_add(wait_queue_t *queue, wait_t *wait);
void wait_queue_del(wait_queue_t *queue, wait_t *wait);

wait_t *wait_queue_next(wait_queue_t *queue, wait_t *wait);
wait_t *wait_queue_prev(wait_queue_t *queue, wait_t *wait);
wait_t *wait_queue_first(wait_queue_t *queue);
wait_t *wait_queue_last(wait_queue_t *queue);

bool wait_queue_empty(wait_queue_t *queue);
bool wait_in_queue(wait_t *wait);
void wakeup_wait(wait_queue_t *queue, wait_t *wait, uint32_t wakeup_flags, bool del);
void wakeup_first(wait_queue_t *queue, uint32_t wakeup_flags, bool del);
void wakeup_queue(wait_queue_t *queue, uint32_t wakeup_flags, bool del);

void wait_current_set(wait_queue_t *queue, wait_t *wait, uint32_t wait_state);

#define wait_current_del(queue, wait)                                       \
    do {                                                                    \
        if (wait_in_queue(wait)) {                                          \
            wait_queue_del(queue, wait);                                    \
        }                                                                   \
    } while (0)

#endif /* !__KERN_SYNC_WAIT_H__ */


ssChanged(SeekBar seekBar, int progress, boolean fromUser) {
                mViewz2Main.setRadius(progress);
            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {

            }

            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {

            }
        });
        // 圆的间距
        mViewz2Seek2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                mViewz2Main.setGap(progress);
            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {

            }

            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {

            }
        });
    }
}
package com.sdwfqin.mvpseed.util;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.text.TextUtils;

import com.sdwfqin.mvpseed.base.App;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * 描述：系统工具类
 *
 * @author zhangqin
 */
public class SystemUtil {

    /**
     * 检查WIFI是否连接
     */
    public static boolean isWifiConnected() {
        ConnectivityManager connectivityManager = (ConnectivityManager) App.getInstance().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo wifiInfo = connectivityManager
                .getNetworkInfo(ConnectivityManager.TYPE_WIFI);
        return wifiInfo != null;
    }
    /**
     * 检查手机网络(4G/3G/2G)是否连接
     */
    public static boolean isMobileNetworkConnected() {
        ConnectivityManager connectivityManager = (ConnectivityManager) App.getInstance().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo mobileNetworkInfo = connectivityManager
                .getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
        return mobileNetworkInfo != null;
    }
    /**
     * 检查是否有可用网络
     */
    public static boolean isNetworkConnected() {
        ConnectivityManager connectivityManager = (ConnectivityManager) App.getInstance().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
        return connectivityManager.getActiveNetworkInfo() != null;
    }

    /**
     * 根据手机的分辨率从 dp 的单位 转成为 px(像素)
     */
    public static int dp2px(Context context, float dpValue) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }

    public static int dp2px(float dpValue) {
        final float scale = App.getInstance().getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }

    /**
     * 根据手机的分辨率从 px(像素) 的单位 转成为 dp
     */
    public static int px2dp(Context context, float pxValue) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (pxValue / scale + 0.5f);
    }

    public static


-22v-10z' fill='#e19acd' /></svg><svg viewBox="0 0 32 32" width="80" height="80"><path d='M20 2v6l-2 4l-2 2l-4 2h-8v-2h6l4 -2l2 -4v-4h-12v-2z' fill='#e4c8aa' /><path d='M22 6v-4h4v16h-4v-4h-4v-2h4v-4h-4v-2zM32 2v16h-4v-16z' fill='#8ef49b' /><path d='M12 20v8h8l4 -4v-2h-4v-2h12v2h-4v2l4 4v2h-2l-4 -4l-4 4h-14v-10z' fill='#cfa2be' /></svg><svg viewBox="0 0 32 32" width="80" height="80"><path d='M20 2v6l-2 4l-2 2l-4 2h-8v-2h6l4 -2l2 -4v-4h-12v-2z' fill='#e4c8aa' /><path d='M22 6v-4h4v16h-4v-4h-4v-2h4v-4h-4v-2zM32 2v16h-4v-16z' fill='#8ef49b' /><path d='M12 20v8h8v2h-12v-10zM24 22v-2h4v2h4v2h-2l2 2v2l-2 2h-8l-2 -2v-2l2 -2h-2v-2zM24 26v2h4v-2z' fill='#f5babb' /></svg><svg viewBox="0 0 32 32" width="80" height="80"><path d='M20 2v6l-2 4l-2 2l-4 2h-8v-2h6l4 -2l2 -4v-4h-12v-2z' fill='#e4c8aa' /><path d='M22 6v-4h4v16h-4v-4h-4v-2h4v-4h-4v-2zM32 2v16h-4v-16z' fill='#8ef49b' /><path d='M30 20v2h-18v6h18v2h-22v-10z' fill='#accdfe' /></svg><svg viewBox="0 0 32 32" width="80" height="80"><path d='M20 2v6l-2 4l-2 2l-4 2h-8v-2h6l4 -2l2 -4v-4h-12v-2z' fill='#e4c8aa' /><path d='M22 6v-4h4v16h-4v-4h-4v-2h4v-4h-4v-2zM32 2v16h-4v-16z' fill='#8ef49b' /><path d='M30 20v6h-18v2h18v2h-22v-6h18v-2h-18v-2z' fill='#a1f0be' /></svg><svg viewBox="0 0 32 32" width="80" height="80"><path d='M20 2v6l-2


* b   Second number to add in Montgomery form.
 * m   Modulus (prime).
 */
#ifndef __APPLE__
.text
.globl	sp_384_mont_add_6
.type	sp_384_mont_add_6,@function
.align	16
sp_384_mont_add_6:
#else
.section	__TEXT,__text
.globl	_sp_384_mont_add_6
.p2align	4
_sp_384_mont_add_6:
#endif /* __APPLE__ */
        pushq	%r12
        pushq	%r13
        pushq	%r14
        movq	(%rsi), %rax
        movq	8(%rsi), %rcx
        movq	16(%rsi), %r8
        movq	24(%rsi), %r9
        movq	32(%rsi), %r10
        movq	40(%rsi), %r11
        addq	(%rdx), %rax
        adcq	8(%rdx), %rcx
        movq	$0xffffffff00000000, %r13
        adcq	16(%rdx), %r8
        movq	$0xfffffffffffffffe, %r14
        adcq	24(%rdx), %r9
        adcq	32(%rdx), %r10
        adcq	40(%rdx), %r11
        sbbq	%rsi, %rsi
        movl	%esi, %r12d
        andq	%rsi, %r13
        andq	%rsi, %r14
        subq	%r12, %rax
        sbbq	%r13, %rcx
        sbbq	%r14, %r8
        sbbq	%rsi, %r9
        sbbq	%rsi, %r10
        sbbq	%rsi, %r11
        adcq	$0x00, %rsi
        andq	%rsi, %r12
        andq	%rsi, %r13
        andq	%rsi, %r14
        subq	%r12, %rax
        sbbq	%r13, %rcx
        movq	%rax, (%rdi)
        sbbq	%r14, %r8
        movq	%rcx, 8(%rdi)
        sbbq	%rsi, %r9
        movq	%r8, 16(%rdi)
        sbbq	%rsi, %r10
        movq	%r9, 24(%rdi)
        sbbq	%rsi, %r11
        movq	%r10, 32(%rdi)
        movq	%r11, 40(%rdi)
        popq	%r14
        popq	%r13
        popq	%r12
        repz retq
#ifndef __APPLE__
.size	sp_384_mont_add_6,.-sp_384_mont_add_6
#endif /* __APPLE__ */
/* Double a Montgomery form number (r = a + a % m).
 *
 * r   Result of doubling.
 * a   Number to double in Montgomery form.
 * m   Modulus (prime).
 */
#ifndef __APPLE__
.text
.globl	sp_384_mont_dbl_6
.type	sp_384_mont_dbl_6,@function
.align	16
sp_384_mont_dbl_6:
#else
.section	__TEXT,__text
.globl	_sp_384_mont_dbl_6
.p2align	4
_sp_384_mont_dbl_6:
#endif /* __APPLE__ */
        pushq	%r12
        pushq	%r13
        pushq	%r14
        movq	(%rsi), %rdx
        movq	8(%rsi), %rax
        movq	16(%rsi), %rcx
        movq	24(%rsi), %r8
        m


 8px 0 0;
}
.wp-core-ui .chosen-rtl .chosen-single span {
  margin-right: 0;
  margin-left: 26px;
  direction: rtl;
}
.wp-core-ui .chosen-rtl .chosen-single-with-deselect span {
  margin-left: 38px;
}
.wp-core-ui .chosen-rtl .chosen-single div {
  right: auto;
  left: 3px;
}
.wp-core-ui .chosen-rtl .chosen-single abbr {
  right: auto;
  left: 26px;
}
.wp-core-ui .chosen-rtl .chosen-choices li {
  float: right;
}
.wp-core-ui .chosen-rtl .chosen-choices li.search-field input[type=text] {
  direction: rtl;
}
.wp-core-ui .chosen-rtl .chosen-choices li.search-choice {
  margin: 3px 5px 3px 0;
  padding: 3px 5px 3px 19px;
}
.wp-core-ui .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
  right: auto;
  left: 4px;
}
.wp-core-ui .chosen-rtl.chosen-container-single .chosen-results {
  margin: 0 0 4px 4px;
  padding: 0 4px 0 0;
}
.wp-core-ui .chosen-rtl .chosen-results li.group-option {
  padding-right: 15px;
  padding-left: 0;
}
.wp-core-ui .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
  border-right: none;
}
.wp-core-ui .chosen-rtl .chosen-search input[type=text] {
  padding: 4px 5px 4px 20px;
  direction: rtl;
}
.wp-core-ui .flatpickr-calendar {
  background: 0 0;
  opacity: 0;
  display: none;
  text-align: center;
  visibility: hidden;
  padding: 0;
  -webkit-animation: none;
  animation: none;
  direction: ltr;
  border: 0;
  font-size: 14px;
  line-height: 24px;
  border-radius: 5px;
  position: absolute;
  width: 307.875px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  background: #fff;
  -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);
  box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);
}
.wp-core-ui .flatpickr-calendar.inline, .wp-core-ui .flatpickr-calendar.open {
  opacity: 1;
  max-height: 640px;
  visibility: visible;
}
.wp-core-ui .flatpickr-calendar.open {
  display: inline-block;
  z-index: 99999;
}
.wp-core-ui .flatpickr-calendar.animate.open {
  -webkit-animation: fpFadeInDown 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  animation: fpFadeInDown 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.wp-core-ui .flatpickr-calendar.inline {
  display: block;
  position: relative;
  top:


self,
        _: context::Context,
        derivation_path: ExtendedDerivationPath,
        hashed_message: Vec<u8>,
        nonce: Randomness,
        key: IDkgTranscriptInternal,
        kappa_unmasked: IDkgTranscriptInternal,
        lambda_masked: IDkgTranscriptInternal,
        kappa_times_lambda: IDkgTranscriptInternal,
        key_times_lambda: IDkgTranscriptInternal,
        algorithm_id: AlgorithmId,
    ) -> Result<ThresholdEcdsaSigShareInternal, ThresholdEcdsaSignShareError> {
        let vault = self.local_csp_vault;
        let job = move || {
            vault.ecdsa_sign_share(
                &derivation_path,
                &hashed_message,
                &nonce,
                &key,
                &kappa_unmasked,
                &lambda_masked,
                &kappa_times_lambda,
                &key_times_lambda,
                algorithm_id,
            )
        };
        execute_on_thread_pool(self.thread_pool_handle, job).await
    }
}

impl TarpcCspVaultServerImpl {
    pub fn new(sks_dir: &Path, listener: UnixListener, logger: ReplicaLogger) -> Self {
        let node_secret_key_store =
            ProtoSecretKeyStore::open(sks_dir, SKS_DATA_FILENAME, Some(new_logger!(&logger)));
        let canister_secret_key_store = ProtoSecretKeyStore::open(
            sks_dir,
            CANISTER_SKS_DATA_FILENAME,
            Some(new_logger!(&logger)),
        );
        let local_csp_server = Arc::new(LocalCspVault::new(
            node_secret_key_store,
            canister_secret_key_store,
            Arc::new(CryptoMetrics::none()),
            new_logger!(&logger),
        ));
        let thread_pool = threadpool::Builder::new()
            .thread_name("ic-crypto-csp".to_string())
            .build(); // defaults the number of threads to the number of CPUs
        Self {
            local_csp_vault: local_csp_server,
            listener,
            thread_pool,
            logger,
        }
    }

    pub async fn run(self) {
        // Wrap data in telegrams with a length header.
        let codec_builder = LengthDelimitedCodec::builder();

        // Listen for connections; spawns one `tokio` task per client.
        loop {
            let (conn, _addr) = self.listener.accept().await.unwrap_or_else(|e| {
                panic!(
                    "Error listening at socket {:?}: {}",
                    &self.listener.local_addr(),
                    e
                )
            });
            let local_csp_vault = Arc::clone(&self.local_csp_vault);
            let thread_pool_handle = self.thread_pool.clone(); // creates a pool handle similar to Arc
            tokio::spawn(async move {
                let framed = codec_builder.new_framed(conn);
                let transport = serde_transport::new(framed, Bincode::default());
                let worker = TarpcCspVaultServerWorker {
                    local_csp_vault,
                    thread_pool_handle,
                };
                let channel_executor =
                    BaseChannel::with_defaults(transport).execute(worker.serve());
                channel_executor.await;
            });
        }
    }
}
use solana_program::pubkey::Pubkey;
use spl_governance::state::{enums::MintMaxVoteWeightSource, realm::RealmConfigArgs};

#[derive(Clone, Debug, PartialEq)]
pub struct SetRealmConfigArgs {
    pub realm_config_args: RealmConfigArgs,
    pub community_voter_weight_addin:


다.

### 인터페이스

우리는 우리의 새로운 `PlayStore`를 유닛 테스트하기 위한 가장 쉬운 방법인 `io.Reader`를 사용해서 코드를 만들기 시작했다. 코드를 개발해나가며 `io.ReaderWriter`에서 `io.ReadWriteSeeker`로 옮겨갔고, `*os.File`와는 별개로 실제로 구현된 것이 표준 라이브러리 안에는 없다는 것을 알게 되었다. 우리는 직접 만들거나 오픈소스를 사용하는 것으로 결정을 내렸을 수도 있었지만 테스트를 위한 임시 파일을 만드는 것이 실용적이라고 느꼈다.

마지막으로 `*os.File`에도 있는 `Truncate`가 필요하다. 이런 요구사항들을 만족시키는 자체 인터페이스를 만들기 위한 옵션이었을 것이다.

```go
type ReadWriteSeekTruncate interface {
    io.ReadWriteSeeker
    Truncate(size int64) error
}
```

그러나 우리는 이를 통해 무엇을 얻었는가? 우리는 _mock을 만들지 않았다_ 는 것과 **file system** 스토어가 `*os.File`외의 다른 타입을 가지는 것이 비현실적이기 때문에 인터페이스의 다형성이 필요하지 않다는 것을 명심해야 한다.

우리가 했던 것처럼 타입을 자르고 변경하고 실험하는 것을 두려워하지 말아야 한다. 정적 타입 언어를 사용하는 가장 큰 이점은 컴파일러가 모든 변경사항들로 당신을 도와줄 수 있다는 점이다.

## 에러 핸들링

정렬을 작업하기 전에 현재의 코드에 만족하며 가지고 있는 기술 부채를 모두 제거했다는 것을 확실히 해야 한다. 동작하는 소프트웨어에 가능한 빨리 도달해야 한다(red state에서 벗어나야 한다)는 것은 중요한 원칙이지만 에러 케이스들을 무시해야한다는 것을 의미하지는 않는다.

`FileSystemStore.go`로 돌아가보면 생성자 안에는 `league, _ := NewLeague(f.database)`가 있다.

`NewLeague`는 제공받는 `io.Reader`로부터 league를 파싱하지 못하는 경우 에러를 반환할 수 있다.

그 때는 이미 실패 테스트들을 했기 때문에 에러를 무시하는 것이 실용적이었다. 만약 이것을 한번에 다뤘다면, 한번에 두 가지를 효율적으로 해결했을 것이다.

생성자가 에러를 반환할 수 있도록 만들어보자.

```go
//file_system_store.go
func NewFileSystemPlayerStore(file *os.File) (*FileSyst


({ { is_pendulum = true } },
                'j_joy_pendulumoon', false,
                "e_negative")
        end
    end,
    can_use = function(self, card)
        if card.area and card.area == G.jokers and not (#G.jokers.cards + G.GAME.joker_buffer + JoyousSpring.get_card_limit(card) <= G.jokers.config.card_limit) then
            return false
        end
        return JoyousSpring.count_materials_in_graveyard({ { is_pendulum = true } }, true) > 0
    end,
})

-- Pandora's Jewelry Box
SMODS.Joker({
    key = "pandora",
    atlas = 'Misc04',
    pos = { x = 7, y = 4 },
    rarity = 2,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = true,
    cost = 5,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.hands } }
    end,
    set_sprites = JoyousSpring.set_back_sprite,
    config = {
        extra = {
            joyous_spring = JoyousSpring.init_joy_table {
                is_pendulum = true,
                attribute = "DARK",
                monster_type = "Wyrm",
            },
            hands = 2
        },
    },
    calculate = function(self, card, context)
        if JoyousSpring.can_use_abilities(card) then
            if context.setting_blind and context.main_eval and #JoyousSpring.extra_deck_area.cards == 0 then
                ease_hands_played(card.ability.extra.hands)
            end
        end
    end,
    use = function(self, card, area, copier)
        local choices = JoyousSpring.get_materials_owned({ { is_pendulum = true } })
        local joker = pseudorandom_element(choices, 'j_joy_pandora')
        if joker then
            local edition = poll_edition('j_joy_pandora', nil, true, true)
            joker:set_edition(edition, true)
        end
    end,
    can_use = function(self, card)
        return JoyousSpring.count_materials_owned({ { is_pendulum = true } }, true) >
            (card.area and card.area == G.jokers and 1 or 0)
    end,
})

-- Anchamoufrite
SMODS.Joker({
    key = "anchamoufrite",
    atlas = 'Misc04',
    pos = { x = 3, y = 4 },
    rarity = 2,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = true,
    cost = 5,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.draws, card.ability.extra.h_size } }
    end,
    set_sprites = JoyousSpring.set_back_sprite,
    config = {
        extra = {
            joyous_spring = JoyousSpring.init_joy_table {
                is_pendulum = true,
                attribute = "LIGHT",
                monster_type = "Spellcaster",
            },
            draws = 5,
            h_size = 2,
            active = false
        },
    },
    calculate = function(self, card, context)
        if JoyousSpring.can_use_abilities(card) then
            if not card.ability.extra.active and context.setting_blind and context.main_eval and #JoyousSpring.extra_deck_area.cards == 0 then
                card.ability.extra.active = true
                G.hand:change_size(card.ability.extra.h_size)
            end
            if card.ability.extra.active and context.end_of_round and context.game_over == false and conte


  EXPECT_EQ(t.source().range.begin.column, 1u);
    EXPECT_EQ(t.source().range.end.line, 1u);
    EXPECT_EQ(t.source().range.end.column, 1u);
    EXPECT_EQ(t.to_str(), "invalid UTF-8");
}
INSTANTIATE_TEST_SUITE_P(LexerTest,
                         InvalidUnicodeIdentifierTest,
                         testing::ValuesIn({
                             "\x80\x80\x80\x80",  // 10000000
                             "\x81\x80\x80\x80",  // 10000001
                             "\x8f\x80\x80\x80",  // 10001111
                             "\x90\x80\x80\x80",  // 10010000
                             "\x91\x80\x80\x80",  // 10010001
                             "\x9f\x80\x80\x80",  // 10011111
                             "\xa0\x80\x80\x80",  // 10100000
                             "\xa1\x80\x80\x80",  // 10100001
                             "\xaf\x80\x80\x80",  // 10101111
                             "\xb0\x80\x80\x80",  // 10110000
                             "\xb1\x80\x80\x80",  // 10110001
                             "\xbf\x80\x80\x80",  // 10111111
                             "\xc0\x80\x80\x80",  // 11000000
                             "\xc1\x80\x80\x80",  // 11000001
                             "\xf5\x80\x80\x80",  // 11110101
                             "\xf6\x80\x80\x80",  // 11110110
                             "\xf7\x80\x80\x80",  // 11110111
                             "\xf8\x80\x80\x80",  // 11111000
                             "\xfe\x80\x80\x80",  // 11111110
                             "\xff\x80\x80\x80",  // 11111111

                             "\xd0",          // 2-bytes, missing second byte
                             "\xe8\x8f",      // 3-bytes, missing third byte
                             "\xf4\x8f\x8f",  // 4-bytes, missing fourth byte

                             "\xd0\x7f",          // 2-bytes, second byte MSB unset
                             "\xe8\x7f\x8f",      // 3-bytes, second byte MSB unset
                             "\xe8\x8f\x7f",      // 3-bytes, third byte MSB unset
                             "\xf4\x7f\x8f\x8f",  // 4-bytes, second byte MSB unset
                             "\xf4\x8f\x7f\x8f",  // 4-bytes, third byte MSB unset
                             "\xf4\x8f\x8


  [9179] = "Jazzrik",
  [9180] = "Gerador de Evento Mundial",
  [9196] = "Grão-lorde Omokk",
  [9197] = "Mago de Batalha Agulhapétrea",
  [9198] = "Místico Agulhapétrea",
  [9199] = "Impositor Agulhapétrea",
  [9200] = "Aniquilador Agulhapétrea",
  [9201] = "Ogro-mago Agulhapétrea",
  [9216] = "Senhor da Guerra Agulhapétrea",
  [9217] = "Mestre Mago Agulhapétrea",
  [9218] = "Senhor da Batalha Agulhapétrea",
  [9219] = "Carniceiro Agulhapétrea",
  [9236] = "Caçadora Sombria Vosh\'gajin",
  [9237] = "Senhor da Guerra Voone",
  [9238] = "Quentin",
  [9239] = "Místico Fumocardo",
  [9240] = "Sacerdote Sombrio Fumocardo",
  [9241] = "Caçador de Cabeças Fumocardo",
  [9256] = "Galinha Caipira",
  [9257] = "Bruxo do Escudo Marcado",
  [9258] = "Saqueador do Escudo Marcado",
  [9259] = "Bruto Temerário",
  [9260] = "Legionário Temerário",
  [9261] = "Tecetrevas Temerário",
  [9262] = "Invocador Temerário",
  [9263] = "Terrorista Temerário",
  [9264] = "Piromante Temerário",
  [9265] = "Caçador Sombrio Fumocardo",
  [9266] = "Mandingueiro Fumocardo",
  [9267] = "Arremessador de Machados Fumocardo",
  [9268] = "Berserker Fumocardo",
  [9269] = "Vidente Fumocardo",
  [9270] = "Williden Marshal",
  [9271] = "Hol\'anyee Marshal",
  [9272] = "Chispa Minanilo",
  [9273] = "Petra Grossen",
  [9274] = "Dadanga",
  [9275] = "Launcher",
  [9276] = "Launcher2",
  [9296] = "Madel Quintana",
  [9297] = "Mantícora Enfurecida",
  [9298] = "Bruna Covaneve",
  [9299] = "Gaeriyan",
  [9316] = "Juntatudy Jogafora",
  [9317] = "Rilli Passomal",
  [9318] = "Incendossauro",
  [9319] = "Mestre de Matilha Grebmar",
  [9336] = "Chefe Cobreplugue",
  [9356] = "Estalajadeiro Shul\'kar",
  [9376] = "Agni",
  [9377] = "Vórtice Giratório",
  [9396] = "Soca-terra",
  [9397] = "Tempestade Viva",
  [9398] = "Carrasco do Martelo do Crepúsculo",
  [9416] = "Worg do Escudo Marcado",
  [9417] = "Dragão Adormecido",
  [9436] = "Prole de Bael\'gar",
  [9437] = "Guardião Sombrio Vorfalk",
  [9438] = "Guardião Sombrio Bethekk",
  [9439] = "Guardião Sombrio Uggel",
  [9441


█║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//
// This file is generated,
// Please do not edit it manually.
// Run the following in the root of the repo:
//
// cargo run -p api_generator
//
// -----------------------------------------------
"
        .as_bytes(),
    )?;

    let mut file = OpenOptions::new().append(true).write(true).open(&path)?;
    file.write_all(input.as_bytes())?;

    Ok(())
}

/// Reads Api from a directory of REST Api specs
fn read_api(branch: &str, download_dir: &PathBuf) -> Result<Api, failure::Error> {
    let paths = fs::read_dir(download_dir)?;
    let mut namespaces = BTreeMap::new();
    let mut enums: HashSet<ApiEnum> = HashSet::new();
    let mut common_params = BTreeMap::new();
    let root_key = "root";

    for path in paths {
        let path = path?.path();
        let name = path.file_name().map(|path| path.to_str());
        let display = path.to_string_lossy().into_owned();

        if name
            .unwrap()
            .map(|name| !name.starts_with('_'))
            .unwrap_or(true)
        {
            let mut file = File::open(&path)?;
            let (name, api_endpoint) = endpoint_from_file(display, &mut file)?;

            // Only generate builders and methods for stable APIs, not experimental or beta
            if &api_endpoint.stability != "stable" {
                continue;
            }

            let name_parts: Vec<&str> = name.splitn(2, '.').collect();
            let (namespace, method_name) = match name_parts.len() {
                len if len > 1 => (name_parts[0].to_string(), name_parts[1].to_string()),
                _ => (root_key.to_string(), name),
            };

            // collect unique enum values
            for param in api_endpoint
                .params
                .iter()
                .filter(|p| p.1.ty == TypeKind::Enum)
            {
                let options: Vec<String> = param
                    .1
                    .options
                    .iter()
                    .map(|v| v.as_str().unwrap().to_string())
                    .collect();

                enums.insert(ApiEnum {
                    name: param.0.to_string(),
                    values: options,
                });
            }

            // collect api endpoints into namespaces
            if !namespaces.contains_key(&namespace) {
                let mut api_endpoints = BTreeMap::new();
                api_endpoints.insert(method_name, api_endpoint);
                namespaces.insert(namespace.to_string(), api_endpoints);
            } else {
                namespaces
                    .get_mut(&namespace)
                    .unwrap()
                    .insert(method_name, api_endpoint);
            }
        } else if name
            .map(|name| name == Some("_common.json"))
            .unwrap_or(true)
        {
            let mut file = File::open(&path)?;
            let common = common_params_from


p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6",
			"Africa/Casablanca|LMT WET WEST CET|u.k 0 -10 -10|0121212121212121213121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0 11A0 5A0 e00 17c0 1fA0 1a00 1a00 1fA0 17c0 1io0 14o0 1lc0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1lc0 14o0 1fA0|32e5",
			"Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18o0 3I00 17c0 1fA0 1a00 1io0 1a00 1y7p0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0


irai(hiddenSince = "2.7")
internal val PacketLogger: MiraiLoggerWithSwitch
    get() = PacketCodec.PacketLogger

/**
 * Registered factories.
 */
internal object KnownPacketFactories {
    object OutgoingFactories : List<OutgoingPacketFactory<*>> by mutableListOf(
        WtLogin.Login,
        WtLogin.ExchangeEmp,
        WtLogin.TransEmp,
        StatSvc.Register,
        StatSvc.GetOnlineStatus,
        StatSvc.SimpleGet,
        StatSvc.GetDevLoginInfo,
        MessageSvcPbGetMsg,
        MessageSvcPushForceOffline,
        MessageSvcPbSendMsg,
        MessageSvcPbDeleteMsg,
        MessageSvcPbGetRoamMsgReq,
        MessageSvcPbGetGroupMsg,
        FriendList.GetFriendGroupList,
        FriendList.DelFriend,
        FriendList.GetTroopListSimplify,
        FriendList.GetTroopMemberList,
        FriendList.SetGroupReqPack,
        FriendList.MoveGroupMemReqPack,
        ImgStore.GroupPicUp,
        PttStore.GroupPttUp,
        PttStore.GroupPttDown,
        PttStore.C2CPttDown,
        PttCenterSvr.GroupShortVideoUpReq,
        PttCenterSvr.ShortVideoDownReq,
        LongConn.OffPicUp,
//        LongConn.OffPicDown,
        TroopManagement.EditSpecialTitle,
        TroopManagement.Mute,
        TroopManagement.GroupOperation,
        TroopManagement.GetTroopConfig,
        TroopManagement.ModifyAdmin,
        TroopManagement.GetGroupLastMsgSeq,
        //  TroopManagement.GetGroupInfo,
        TroopManagement.EditGroupNametag,
        TroopManagement.Kick,
        TroopManagement.SwitchAnonymousChat,
        TroopEssenceMsgManager.SetEssence,
        TroopEssenceMsgManager.RemoveEssence,
        NudgePacket,
        Heartbeat.Alive,
        PbMessageSvc.PbMsgWithDraw,
        MultiMsg.ApplyUp,
        MultiMsg.ApplyDown,
        NewContact.SystemMsgNewFriend,
        NewContact.SystemMsgNewGroup,
        ProfileService.GroupMngReq,
        StrangerList.GetStrangerList,
        StrangerList.DelStranger,
        SummaryCard.ReqSummaryCard,
        ChangeFriendRemark,
        MusicSharePacket,
        *FileManagement.factories
    )

    object IncomingFactories : List<IncomingPacketFactory<*>> by mutableListOf(
        OnlinePushPbPushGroupMsg,
        OnlinePushReqPush,
        OnlinePushPbPushTransMsg,
        OnlinePushSidExpired,
        MessageSvcPushNotify,
        MessageSvcPushReaded,
        MessageSvcRequestPushStatus,
        ConfigPushSvc.PushReq,
        PbC2CMsgSync,
        StatSvc.ReqMSFOffline,
        StatSvc.SvcReqMSFLoginNotify
    )
    // SvcReqMSFLoginNotify 自己的其他设备上限
    // MessageSvcPushReaded 电脑阅读了别人的消息, 告知手机
    // OnlinePush.PbC2CMsgSync 电脑发消息给别人, 同步给手机

    fun findPacketFactory(commandName: String): PacketFactory<*>? {
        return OutgoingFactories.firstOrNull


0x4000, 160, 449, 132,344, 0   },
{ 0x10B  ,M_TEXT   ,1056,400, 132,50, 8,  8, 1 ,0xB8000 ,0x4000, 160, 449, 132,400, 0   },
{ 0x10C  ,M_TEXT   ,1056,480, 132,60, 8,  8, 2 ,0xB8000 ,0x4000, 160, 531, 132,480, 0   },

/* VESA higher color modes */
{ 0x10D  ,M_LIN15  ,320 ,200 ,40 ,25 ,8 ,8  ,1 ,0xA0000 ,0x10000,100 ,449 ,80 ,400 , _VGA_PIXEL_DOUBLE | _EGA_LINE_DOUBLE },
{ 0x10E  ,M_LIN16  ,320 ,200 ,40 ,25 ,8 ,8  ,1 ,0xA0000 ,0x10000,100 ,449 ,80 ,400 , _VGA_PIXEL_DOUBLE | _EGA_LINE_DOUBLE },
{ 0x10F  ,M_LIN32  ,320 ,200 ,40 ,25 ,8 ,8  ,1 ,0xA0000 ,0x10000,50  ,449 ,40 ,400 , _VGA_PIXEL_DOUBLE | _EGA_LINE_DOUBLE },
{ 0x110  ,M_LIN15  ,640 ,480 ,80 ,30 ,8 ,16 ,1 ,0xA0000 ,0x10000,200 ,525 ,160,480 ,0   },
{ 0x111  ,M_LIN16  ,640 ,480 ,80 ,30 ,8 ,16 ,1 ,0xA0000 ,0x10000,200 ,525 ,160,480 ,0   },
{ 0x112  ,M_LIN32  ,640 ,480 ,80 ,30 ,8 ,16 ,1 ,0xA0000 ,0x10000,100 ,525 ,80 ,480 ,0   },
{ 0x113  ,M_LIN15  ,800 ,600 ,100,37 ,8 ,16 ,1 ,0xA0000 ,0x10000,264 ,628 ,200,600 ,0   },
{ 0x114  ,M_LIN16  ,800 ,600 ,100,37 ,8 ,16 ,1 ,0xA0000 ,0x10000,264 ,628 ,200,600 ,0   },
{ 0x115  ,M_LIN32  ,800 ,600 ,100,37 ,8 ,16 ,1 ,0xA0000 ,0x10000,132 ,628 ,100,600 ,0   },
{ 0x116  ,M_LIN15  ,1024,768 ,128,48 ,8 ,16 ,1 ,0xA0000 ,0x10000,336 ,806 ,256,768 ,0	},
{ 0x117  ,M_LIN16  ,1024,768 ,128,48 ,8 ,16 ,1 ,0xA0000 ,0x10000,336 ,806 ,256,768 ,0	},
{ 0x118  ,M_LIN32  ,1024,768 ,128,48 ,8 ,16 ,1 ,0xA0000 ,0x10000,168 ,806 ,128,768 ,0	},

/* those should be interlaced but ok */
//{ 0x119  ,M_LIN15  ,1280,1024,160,64 ,8 ,16 ,1 ,0xA0000 ,0x10000,424 ,1066,320,1024,0	},
//{ 0x11A  ,M_LIN16  ,1280,1024,160,64 ,8 ,16 ,1 ,0xA0000 ,0x10000,424 ,1066,320,1024,0	},

{ 0x150  ,M_LIN8   ,320 ,200 ,40 ,25 ,8 ,8  ,1 ,0xA0000 ,0x10000,100 ,449 ,80 ,400 , _VGA_PIXEL_DOUBLE | _EGA_LINE_DOUBLE },
{ 0x151  ,M_LIN8   ,320 ,240 ,40 ,30 ,8 ,8  ,1 ,0xA0000 ,0x10000,100 ,525 ,80 ,480 , _VGA_PIXEL_DOUBLE | _EGA_LINE_DOUBLE },
{ 0x152  ,M_LIN8   ,320 ,400 ,40 ,50 ,8 ,8  ,1 ,0


eTest._C.coordinate_map_stride_test(
            coordinates, stride
        )
        self.assertEqual(map_size, 5)
        self.assertEqual(tensor_stride, [2, 1])

        stride = torch.IntTensor([4, 4])
        map_size, tensor_stride = MinkowskiEngineTest._C.coordinate_map_stride_test(
            coordinates, stride
        )
        self.assertEqual(map_size, 2)
        self.assertEqual(tensor_stride, [4, 4])

        coordinates = torch.IntTensor([[0, -1], [0, -2], [0, 1], [0, 0]]).to(0)
        stride = torch.IntTensor([2])
        map_size, tensor_stride = MinkowskiEngineTest._C.coordinate_map_stride_test(
            coordinates, stride
        )
        self.assertEqual(map_size, 2)
        self.assertEqual(tensor_stride, [2])


0)), std::abs(delta(1)));
          delta(0) = delta(0) / larger_delta * MAX_DELTA;
          delta(1) = delta(1) / larger_delta * MAX_DELTA;
        }
        deltaScore = fmax(1, 1) - b.transpose() * delta +
            1.0 / 2.0 * delta.transpose() * A * delta;
      }
      assert(std::abs(delta(0)) <= MAX_DELTA);
      assert(std::abs(delta(1)) <= MAX_DELTA);
      // find maximum of detla scores
      keypoints(k, 0 * keypoint_count + j) =
          x0 + (0.5 + maxX + delta(0)) * xLen / heatmap_size;
      keypoints(k, 1 * keypoint_count + j) =
          y0 + (0.5 + maxY + delta(1)) * yLen / heatmap_size;
      keypoints(k, 2 * keypoint_count + j) = deltaScore;
      if (should_output_softmax_) {
        keypoints(k, 3 * keypoint_count + j) = probs(heatmap_index, maxIndex);
      } else {
        keypoints(k, 3 * keypoint_count + j) = .0f;
      }
    }
  }

  return true;
}

} // namespace caffe2
#include "caffe2/operators/elementwise_ops.h"

#include "caffe2/core/operator_gradient.h"
#include "caffe2/utils/proto_utils.h"

namespace caffe2 {

namespace {

const char* kBroadcastDoc = R"DOC(
If necessary the right-hand-side argument will be broadcasted to match the
shape of left-hand-side argument. When broadcasting is specified, the second
tensor can either be of size 1 (a scalar value), or having its shape as a
contiguous subset of the first tensor's shape. The starting of the mutually
equal shape is specified by the argument "axis", and if it is not set, suffix
matching is assumed. 1-dim expansion doesn't work yet.

For example, the following tensor shapes are supported (with broadcast=1):
```
  shape(A) = (2, 3, 4, 5), shape(B) = (,), i.e. B is a scalar
  shape(A) = (2, 3, 4, 5), shape(B) = (5,)
  shape(A) = (2, 3, 4, 5), shape(B) = (4, 5)
  shape(A) = (2, 3, 4, 5), shape(B) = (3, 4), with axis=1
  shape(A) = (2, 3, 4, 5), shape(B) = (2), with axis=0
```
Argument `broadcast=1` needs to be passed to enable broadcasting.

Github Links:

- https://github.com/pytorch/pytorch/blob/master/caffe2/operators/elementwise_op_schema.cc

)DOC";

const char* kAddExample = R"DOC(
<details>

<summary> <b>Example</b> </summary>

**Code**

```

workspace.ResetWorkspace()

op = core.CreateOperator(
    "Add",
    ["A",  "B"],
    ["C"],
)

workspace.FeedBlob("A", np.array([[1,2],[3,4]]))
workspace.FeedBlob("B", np.array([[5,6],[7,8]]))
print("A:", workspace.FetchBlob("A"))
print("B:", workspace.FetchBlob("B"))
workspace.RunOperatorOnce(op)
print("C:", workspace.FetchBlob("C"))

```

**Result**

```

A:
[[1 2]
 [3 4]]
B:
[[5 6]
 [7 8]]
C:
[[ 6  8]
 [10 12]]

```

</details>

)DOC";

const c


控制生产，以免造成新的积压。对于质次价高的产品，要采取有效的措施，限期提高质量，降低成本；质量太坏的，要停 产整顿。

   在交通运输方面，要充分利用当前运输任务不太繁忙的时机，大力加强机车、货车、汽车、船舶等运输设备和线路、桥梁、公路、码头的维护修理工作。对短途运输，各地要调整好运力的部署，为秋收后农副产品的收购和工业品下乡的运输作好准备。

   第二，积极解决某些工业企业产品的积压问题。

   会议讨论了解决某些企业产品积压的问题，认为目前积压产品，从全国范围来看，数量虽然不是很大的，但是，一些产品积压在生产企业，不但给这些企业的生产 活动造成很大的困难，而且对于进一步活跃国民经济也带来不利的影响。因此，应当根据不同产品积压的具体原因，采取有效的措施，切实加以解决。

   企业产品积压的原因是多方面的。

   在生活资料方面，一部分小商品，如铁锅、缝衣针、鞋钉、金属发卡、锁、菜刀等，是由于生产超过了社会的正常需要；一部分产品是由于质量差，价格高，花色 单调，品种规格不对路，而造成积压。这些产品，在商品供应严重不足的时候，还可以销售出去，现在商品供应紧张的状况比较缓和了，产品质次价高同群众要求物 美价廉之间的矛盾就突出了。这个矛盾，在一些工业比较落后的地区，表现得更为尖锐。这些地区的企业，虽然经过努力，提高了产品的质量，降低了成本，但是还 比不上先进地区。还有一部分产品，该降低售价而没有及时降低，或者销售工作上有缺点，影响了销路。也有少数产品，是由于商业部门没有按合同或协议及时收 购，造成企业积压，最近，商业部门在这方面做了不少工作，情况已经有了改变。

   在生产资料方面，原材料和机电产


es

	// If we end up with no validation samples, just re-split the training samples. This
	// happens when the number of files is so low that the validation sample rate ends up pulling
	// only 1 or 2 files. If we get unlucky with those files, we may end up with no samples
	// This happens when attempting to tune on requests-oauthlib, for example (22 python files)
	//
	// TODO(tarak): What we should do is generate all samples, then split them based on train/validate/test
	// ratios instead of splitting by files. That works for our large training runs but can cause edge cases here.
	// We can do this if we are OK with removing the LastModifiedTimeSplit option.
	if len(validationSamples) == 0 && len(trainSamples) != 0 {
		splitIdx := int(float64(len(res.TrainSamples)) * params.ValidateRatio)
		validationSamples = trainSamples[:splitIdx]
		trainSamples = trainSamples[splitIdx:]
	}

	log.Printf("training samples: %d, validation samples: %d", len(trainSamples), len(validationSamples))

	if len(trainSamples) == 0 && len(validationSamples) == 0 {
		log.Println("not enough training/validation samples, exiting")
		os.Exit(1)
	}

	maxNumSteps := 2 * args.MaxTrainIters

	trainWriter := utils.NewSampleWriter(args.OutTrainSamples, "", args.TrainBatchSize, args.StepsPerFile)
	defer trainWriter.Flush()

	// TODO: kind of nasty, we cycle through data multiple
	// times if needed to get enough samples
	for trainWriter.StepsWritten() < maxNumSteps {
		for _, s := range trainSamples {
			sample := utils.Sample{
				Lang:    s.LangTag,
				Context: s.Sample,
			}
			fail(trainWriter.WriteSample(sample))
			if trainWriter.StepsWritten() >= maxNumSteps {
				break
			}
		}
	}

	validateWriter := utils.NewSampleWriter(args.OutValidateSamples, "", args.ValidateBatchSize, args.StepsPerFile)
	defer validateWriter.Flush()

	for validateWriter.StepsWritten() < maxNumSteps {
		for _, s := range validationSamples {
			sample := utils.Sample{
				Lang:    s.LangTag,
				Context: s.Sample,
			}
			fail(validateWriter.WriteSample(sample))
			if validateWriter.StepsWritten() >= maxNumSteps {
				break
			}
		}
	}
}

func writeToJSON(content interface{}, filename string) {
	buf, err := json.Marshal(content)
	fail(err)

	fail(ioutil.WriteFile(filename, buf, os.ModePerm))
}

func contextSizeForModel(path string) int {
	hp, err := predict.NewHParams(fileutil.Join(path, "config.json"))
	fail(err)
	return hp.ContextSize
}
package main

import (
	"fmt"
	"log"
	"math/rand"
	"path/filepath"
	"sync"
	"sync/atomic"
	"time"

	"github.com/alexflint/go-arg"
	"github.com/kiteco/kiteco/kite-golib/lexicalv0"
	"github.com/kiteco/kiteco/kite-golib/lexicalv0/lexer"
	"github.com/kiteco/kiteco/kite-golib/pipeline"
	"github.com/kiteco/kiteco/kite-golib/pipeline/aggregator"
	"github.com/kiteco/kiteco/kite-golib/pipeline/sample"
	"github.com/kiteco/kiteco/kite-golib/pipeline/source"
	"github.com/kiteco/kiteco/local-pipelines/lexical/train/cmds/utils"

	_ "net/http


":          {"/"},
			":":          {":"},
			";":          {""},
			"@":          {""},
			"[":          {""},
			"]":          {""},
			"h":          {"hour"},
			"s":          {"second"},
			"z":          {"z"},
			"|":          {""},
		},
		RelativeType: map[string]string{
			"hurrengo hilabetea": "in 1 month",
			"aurreko hilabetea":  "1 month ago",
			"hurrengo astea":     "in 1 week",
			"hurrengo urtea":     "in 1 year",
			"minutu honetan":     "0 minute ago",
			"aurreko astea":      "1 week ago",
			"aurreko urtea":      "1 year ago",
			"hilabete hau":       "0 month ago",
			"ordu honetan":       "0 hour ago",
			"aste hau":           "0 week ago",
			"aurten":             "0 year ago",
			"bihar":              "in 1 day",
			"orain":              "0 second ago",
			"atzo":               "1 day ago",
			"gaur":               "0 day ago",
		},
		RelativeTypeRegexes: []ReplacementData{
			{regexp.MustCompile(`(?i)(\d+[.,]?\d*) hilabete barru`), "in $1 month"},
			{regexp.MustCompile(`(?i)duela (\d+[.,]?\d*) hilabete`), "$1 month ago"},
			{regexp.MustCompile(`(?i)(\d+[.,]?\d*) segundo barru`), "in $1 second"},
			{regexp.MustCompile(`(?i)duela (\d+[.,]?\d*) segundo`), "$1 second ago"},
			{regexp.MustCompile(`(?i)(\d+[.,]?\d*) minutu barru`), "in $1 minute"},
			{regexp.MustCompile(`(?i)duela (\d+[.,]?\d*) minutu`), "$1 minute ago"},
			{regexp.MustCompile(`(?i)(\d+[.,]?\d*) aste barru`), "in $1 week"},
			{regexp.MustCompile(`(?i)(\d+[.,]?\d*) egun barru`), "in $1 day"},
			{regexp.MustCompile(`(?i)(\d+[.,]?\d*) ordu barru`), "in $1 hour"},
			{regexp.MustCompile(`(?i)(\d+[.,]?\d*) urte barru`), "in $1 year"},
			{regexp.MustCompile(`(?i)duela (\d+[.,]?\d*) aste`), "$1 week ago"},
			{regexp.MustCompile(`(?i)duela (\d+[.,]?\d*) egun`), "$1 day ago"},
			{regexp.MustCompile(`(?i)duela (\d+[.,]?\d*) ordu`), "$1 hour ago"},
			{regexp.MustCompile(`(?i)duela (\d+[.,]?\d*) urte`), "$1 year ago"},
		},
		RxCombined:      regexp.MustCompile(`(?i)(\A|[^\pL\pM\d]|_)(\d+[.,]?\d* hilabete barru|duela \d+[.,]?\d* hilabete|\d+[.,]?\d* segundo barru|duela \d+[.,]?\d* segundo|\d+[.,]?\d* minutu barru|duela \d+[.,]?\d* minutu|\d+[.,]?\d* aste barru|\d+[.,]?\d* egun barru|\d+[.,]?\d* ordu barru|\d+[.,]?\d* urte barru|duela \d+[.,]?\d* aste|duela \d+[.,]?\d* egun|duela \d+[.,]?\d* ordu|duela \d+[.,]?\d* urte)(\z


	FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
			FE_CAN_HIERARCHY_AUTO | FE_CAN_RECOVER |
			FE_CAN_MUTE_TS
	},

	.release = mt352_release,

	.init = mt352_init,
	.sleep = mt352_sleep,
	.write = _mt352_write,

	.set_frontend = mt352_set_parameters,
	.get_frontend = mt352_get_parameters,
	.get_tune_settings = mt352_get_tune_settings,

	.read_status = mt352_read_status,
	.read_ber = mt352_read_ber,
	.read_signal_strength = mt352_read_signal_strength,
	.read_snr = mt352_read_snr,
	.read_ucblocks = mt352_read_ucblocks,
};

module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");

MODULE_DESCRIPTION("Zarlink MT352 DVB-T Demodulator driver");
MODULE_AUTHOR("Holger Waechtler, Daniel Mack, Antonio Mancuso");
MODULE_LICENSE("GPL");

EXPORT_SYMBOL(mt352_attach);


ca3ceaa4f0c7b8ba649558", null ],
    [ "fetchStringList", "class_query_result.htm#af49aaa8a26876c7a095326c8b2d5ba6a", null ],
    [ "fetchVars", "class_query_result.htm#a0d6642a5d017d6f99e0f5cb06d6740ca", null ],
    [ "fetchVars", "class_query_result.htm#ac77eccf0a47750e309e11e7e66bb2d8a", null ],
    [ "fetchVars", "class_query_result.htm#a1a43faec4675b58bd0506a4de7c3976f", null ],
    [ "fetchVars", "class_query_result.htm#af49ff273eb3efd184ca423df846ba507", null ],
    [ "fetchVars", "class_query_result.htm#a50a5fa4850f774f301ed88a488a44726", null ],
    [ "fetchVars", "class_query_result.htm#a91d15081bc1d6eccefe089f4948438cb", null ],
    [ "fetchVars", "class_query_result.htm#af2870c71cd1b750c8151a7b4420903fa", null ],
    [ "fetchVars", "class_query_result.htm#aaeb262416e472885dc6a3c7c3c7c3306", null ],
    [ "fetchVars", "class_query_result.htm#a8c17bed4e4380137912a2baba19e5a30", null ],
    [ "fetchVars", "class_query_result.htm#a5421dce74a177933675ede65a68972a0", null ],
    [ "fetchVars", "class_query_result.htm#a0b82a02ab7a45f1092e93d56a87dc67b", null ],
    [ "fetchVars", "class_query_result.htm#acf30d6c095e00eb7b1bc942563597d4b", null ],
    [ "fetchVars", "class_query_result.htm#aa62c42135a62658a7e56426a024d0146", null ],
    [ "fetchVars", "class_query_result.htm#aadabff776f939dd7c3895318396ae59e", null ],
    [ "fetchVars", "class_query_result.htm#aab68396b876b689f21109301cf350ee3", null ],
    [ "fetchVars", "class_query_result.htm#a462dc42f451155eca3b56b9239cf8535", null ],
    [ "fetchVars", "class_query_result.htm#a5efedd7a6e170ddeaddbac5428951085", null ],
    [ "fetchVars", "class_query_result.htm#a0a381517b5fa64a68e4d10972b0ceefc", null ],
    [ "fetchVector", "class_query_result.htm#ad111370ab183d4d6a1522123c03f183d", null ],
    [ "first", "class_query_result.htm#a406abd3501b2f3d89bf6bb7e5e8cd7c3", null ],
    [ "isActive", "class_query_result.htm#a46b374177ab23d8f9d7dc9366eb57655", null ],
    [ "isForwardOnly", "class_query_result.htm#a5b6ef75a4da642c0c467d0110ce1701a", null ],
    [ "isValid", "class_query_result.htm#ae9ec64a1171aba3f7cef8b081c8158be", null ],
    [ "last", "class_query_result.htm#a0e5a5d108da1d03b0f624e18330a10f5", null ],
    [ "lastError", "class_query_result.htm#ac56dbe38b558a9e55591f645d50eacde", null ],
    [ "lastQuery", "class_query_result.htm#af86eb1e97db39a70d504389494


	-12.782931f,45.507035f, -13.072467f,45.436904f, -13.150354f,45.395022f, -13.241990f,45.266931f, -13.273255f,45.136061f,
		-13.237377f,44.975470f, -13.110506f,44.823538f, -12.919092f,44.749889f, -12.760359f,44.770136f, -12.661548f,44.743668f,
		-12.577477f,44.760477f, -12.496259f,44.821940f, -12.396000f,44.990042f);
			poly[18] = new TzPolygon(1.448202f,40.227580f, 1.448202f,40.990761f, -0.833975f,40.993376f, -1.598574f,41.558912f, -1.662078f,41.559365f,
		-1.803197f,41.718166f, -1.912243f,41.650687f, -2.252429f,41.345545f, -2.763425f,40.751201f, -3.085740f,40.418741f,
		-3.369973f,40.335936f, -3.562595f,40.227580f);
			poly[19] = new TzPolygon(1.448202f,40.990761f, 2.828298f,40.989180f, 3.141237f,41.312053f, 4.016664f,41.943017f, 4.055481f,41.946277f,
		4.179113f,42.087372f, 4.202464f,42.525584f, 4.260387f,42.702992f, 4.266755f,42.824904f, 4.380478f,42.951970f,
		4.559042f,43.034761f, 4.626329f,43.115314f, 4.794544f,43.434687f, 4.902107f,43.809025f, 4.950439f,44.153985f,
		4.930188f,44.770743f, 1.466525f,44.770743f, 1.448202f,44.746692f);
			poly[20] = new TzPolygon(4.055009f,40.227580f, 4.104848f,40.387772f, 4.245001f,40.717448f, 4.284943f,40.759583f, 4.246260f,40.844100f,
		4.212840f,40.882380f, 4.154620f,40.904160f, 4.132070f,40.965080f, 3.942580f,41.169266f, 3.958885f,41.235302f,
		3.938760f,41.326310f, 3.962760f,41.391250f, 3.944940f,41.430190f, 3.954630f,41.509770f, 3.982140f,41.545160f,
		3.966667f,41.566898f, 3.983294f,41.627705f, 3.959925f,41.674412f, 3.992460f,41.720593f, 3.982106f,41.791788f,
		3.958645f,41.796766f, 3.946486f,41.833158f, 3.982684f,41.906750f, 3.141237f,41.312053f, 2.828298f,40.989180f,
		1.448202f,40.990761f, 1.448202f,40.227580f);
			poly


//===- llvm/MC/MCMachOCASWriter.h - Mach CAS Object Writer ------*- 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_MC_MCMACHOCASWRITER_H
#define LLVM_MC_MCMACHOCASWRITER_H

#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/CAS/ObjectStore.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCMachObjectWriter.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/MCValue.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
#include <memory>
#include <string>
#include <vector>

namespace llvm {

namespace cas {
class ObjectStore;
class CASID;
} // namespace cas

class MachOCASWriter : public MachObjectWriter {
public:
  /// ObjectStore
  const Triple Target;
  cas::ObjectStore &CAS;
  CASBackendMode Mode;
  std::optional<MCTargetOptions::ResultCallBackTy> ResultCallBack;

  MachOCASWriter(
      std::unique_ptr<MCMachObjectTargetWriter> MOTW, const Triple &TT,
      cas::ObjectStore &CAS, CASBackendMode Mode, raw_pwrite_stream &OS,
      bool IsLittleEndian,
      std::function<const cas::ObjectProxy(llvm::MachOCASWriter &,
                                           llvm::MCAssembler &,
                                           cas::ObjectStore &, raw_ostream *)>
          CreateFromMcAssembler,
      std::function<Error(cas::ObjectProxy, cas::ObjectStore &, raw_ostream &)>
          SerializeObjectFile,
      std::optional<MCTargetOptions::ResultCallBackTy> CallBack,
      raw_pwrite_stream *CasIDOS = nullptr);

  uint8_t getAddressSize() { return Target.isArch32Bit() ? 4 : 8; }

  uint64_t writeObject(MCAssembler &Asm) override;

  void resetBuffer() { OSOffset = InternalOS.tell(); }

  StringRef getContent() const { return InternalBuffer.substr(OSOffset); }

private:
  raw_pwrite_stream &OS;
  raw_pwrite_stream *CasIDOS;

  SmallString<512> InternalBuffer;
  raw_svector_ostream InternalOS;

  uint64_t OSOffset = 0;

  std::function<const cas::ObjectProxy(llvm::MachOCASWriter &,
                                       llvm::MCAssembler &, cas::ObjectStore &,
                                       raw_ostream *)>
      CreateFromMcAssembler;
  std::function<Error(cas::ObjectProxy, cas::ObjectStore &, raw_ostream &)>
      SerializeObjectFile;
};

/// Construct a new Mach-O CAS writer instance.
///
/// This routine takes ownership of the target writer subclass.
///
/// \param MOTW - The target specific Mach-O writer subclass.
/// \param TT - The target triple.
/// \param CAS - The ObjectStore instance.
/// \param OS - The stream to write to.
/// \returns The constructed object writer.
std::unique_ptr<MCObjectWriter> createMachOCASWriter(
    std::unique_ptr<MCMachObjectTargetWriter> MOTW, const Triple &TT,
    cas::ObjectStore &CAS, CASBackendMode Mode, raw_pwrite_stream &OS,
    bool IsLittleEndian,
    std::function<const cas::ObjectProxy(llvm::MachOCASWriter &,
                                         llvm::MCAssembler &,
                                         cas::ObjectStore &, raw_ostream *)>
        CreateFromMcAssembler,
    std::function<Error(cas::ObjectProxy, cas::ObjectStore &, raw_ostream &)>
        SerializeObjectFile,
    std::optional<MCTargetOptions::ResultCallBackTy> CallBack = std::nullopt,
    raw_pwrite_stream *CasIDOS = nullptr);

} // end namespace llvm

#endif // LLVM_MC_MCMACHOCASWRITER_H


IGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @ "},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},e.COMMENT("[;@]","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"label",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),e.registerLanguage("xml",function(e){var t="[A-Za-z0-9\\._:-]+",r={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:"php"},n={endsWithParent:!0,illegal:/</,relevance:0,contains:[r,{className:"attribute",begin:t,relevance:0},{begin:"=",relevance:0,contains:[{className:"value",contains:[r],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","a


vice("ReplicatedStorage").Remote.CastSpell:FireServer(2, v)
				FUNTAIN.CFrame=player.Character.HumanoidRootPart.CFrame+Vector3.new(0,0,0)
			end
		end
		for i,v in pairs(workspace.BossArenas:GetDescendants()) do
			if v.ClassName == "Model" and v:FindFirstChild("HumanoidRootPart") then
				game:GetService("ReplicatedStorage").Remote.CastSpell:FireServer(1, v)
				game:GetService("ReplicatedStorage").Remote.CastSpell:FireServer(2, v)
				FUNTAIN.CFrame=player.Character.HumanoidRootPart.CFrame+Vector3.new(0,0,0)
			end
		end
	end
end


    public InputStream() {
        this(checkPermission());
    }

    /**
     * Unmarshalls a value type from the input stream.
     * @return the value type unmarshalled from the input stream
     */
    public java.io.Serializable read_value() {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    /**
     * Unmarshalls a value type from the input stream.
     * @param clz is the declared type of the value to be unmarshalled
     * @return the value unmarshalled from the input stream
     */
    public java.io.Serializable read_value(java.lang.Class clz) {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    /**
     * Unmarshalls a value type from the input stream.
     * @param factory is the instance fo the helper to be used for
     * unmarshalling the value type
     * @return the value unmarshalled from the input stream
     */
    public java.io.Serializable read_value(org.omg.CORBA.portable.BoxedValueHelper factory) {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    /**
     * Unmarshalls a value type from the input stream.
     * @param rep_id identifies the type of the value to be unmarshalled
     * @return value type unmarshalled from the input stream
     */
    public java.io.Serializable read_value(java.lang.String rep_id) {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    /**
     * Unmarshalls a value type from the input stream.
     * @param value is an uninitialized value which is added to the orb's
     * indirection table before calling Streamable._read() or
     * CustomMarshal.unmarshal() to unmarshal the value.
     * @return value type unmarshalled from the input stream
     */
    public java.io.Serializable read_value(java.io.Serializable value) {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    /**
     * Unmarshal the value object or a suitable stub object.
     * @return ORB runtime returns the value object or a suitable stub object.
     */
    public java.lang.Object read_abstract_interface() {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    /**
     * Unmarshal the class object or the stub class corresponding to the passed type.
     * @param clz is the Class object for the stub class which corresponds to
     * the type that is statically expected.
     * @return ORB runtime returns the value object or a suitable stub object.
     */
    public java.lang.Object read_abstract_interface(java.lang.Class clz) {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

}
package org.omg.PortableServer.POAPackage;

/**
* org/omg/PortableServer/POAPackage/WrongPolicyHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Friday, April 10, 2015 10:49:23 AM PDT
*/

abstract public class WrongPolicyHelper
{
  private static String  _id = "IDL:omg.org/PortableServer/POA/WrongPolicy:1.0";

  public static void insert (org.omg.CORBA.Any a, org.omg.PortableServer.POAPackage.WrongPolicy that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  public static org.omg.PortableServ


at ACTIVITY_1A0001_LIVENESS_THRESHOLD = getFloat("activity1A0001LivenessThreshold");

    /**
     * 昨日活跃奖励 - 参与一个活动的返点.
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_ACTIVITY_PER = getFloat("activitYesterdayLivenessReward.activity.perPoint");

    /**
     * 昨日活跃奖励 - 发布一篇帖子的返点.
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_ARTICLE_PER = getFloat("activitYesterdayLivenessReward.article.perPoint");

    /**
     * 昨日活跃奖励 - 发布一条回帖的返点
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_COMMENT_PER = getFloat("activitYesterdayLivenessReward.comment.perPoint");

    /**
     * 昨日活跃奖励 - 一个 PV 的返点
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_PV_PER = getFloat("activitYesterdayLivenessReward.pv.perPoint");

    /**
     * 昨日活跃奖励 - 一次打赏的返点.
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_REWARD_PER = getFloat("activitYesterdayLivenessReward.reward.perPoint");

    /**
     * 昨日活跃奖励 - 一次感谢操作的返点.
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_THANK_PER = getFloat("activitYesterdayLivenessReward.thank.perPoint");

    /**
     * 昨日活跃奖励 - 一次点赞点踩的返点.
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_VOTE_PER = getFloat("activitYesterdayLivenessReward.vote.perPoint");

    /**
     * 昨日活跃奖励 - 一次采纳回答的返点.
     */
    public static final float ACTIVITY_YESTERDAY_REWARD_ACCEPT_ANSWER_PER = getFloat("activitYesterdayLivenessReward.acceptAnswer.perPoint");

    /**
     * 昨日活跃奖励积分值上限.
     */
    public static final int ACTIVITY_YESTERDAY_REWARD_MAX = getInt("activitYesterdayLivenessReward.maxPoint");

    /**
     * 邮件渠道，可配置为本地 {@code local}、阿里云 {@code aliyun} 或者 SendCloud {@code sendcloud}.
     * 不建议用本地渠道，会有很高概率被收件方服务拒信。
     */
    public static final String MAIL_CHANNEL = get("mail.channel");

    /**
     * 按邮箱后缀指定邮件渠道，比如配置 {@literal mail.channel.mailDomains=aliyun:163.com,126.com;sendcloud:qq.com} 表示
     *
     *

     *
163.com, 126.com 使用 aliyun 渠道

     *
qq.com 使用 sendcloud

     *

     *

     * 其他后缀默认使用 {@code mail.channel} 的配置
     */
    public static final String MAIL_CHANNEL_MAIL_DOMAINS = get("mail.channel.mailDomains");

    /**
     * 允许使用的邮箱后�


Tafsir(tafsir.fileName);

        // Set the tafsir in shared preferences
        SharedPreferencesService.addTafsir(tafsir);

        // Download completed successfully
        state = state.setDownloadStatusData();

        // Update the selected tafsir in the manage tafsir controller
        manageTafsirController.addTafsir(tafsir.fileName);
      } else {
        // Download failed
        throw Exception('Download failed');
      }

      // // Mock the function:
      // state = state.setDownloadStatusLoading();
      // await Future.delayed(const Duration(seconds: 2));
      // state = state.setDownloadProgress(0.2);
      // await Future.delayed(const Duration(seconds: 2));
      // state = state.setDownloadProgress(0.5);
      // await Future.delayed(const Duration(seconds: 2));
      // state = state.setDownloadProgress(0.8);
      // await Future.delayed(const Duration(seconds: 2));
      // state = state.setDownloadProgress(1.0);
      // await Future.delayed(const Duration(seconds: 2));
      // state = state.setDownloadStatusData();
      // manageTafsirController.addTafsir(tafsir.fileName);
    } catch (e, st) {
      // Handle any errors that occur during the download
      state = state.setDownloadStatusError(e, st);
    }
  }

  Future<void> deleteTafsir() async {
    try {
      // First, remove the file from storage
      await IO.removeTafsir(tafsir.fileName);

      // Delete the tafsir from manageTafsirController's state
      manageTafsirController.removeTafsir(tafsir.fileName);

      // Remove the tafsir from shared preferences
      SharedPreferencesService.removeTafsir(tafsir.fileName);
    } catch (e, st) {
      // TODO: handle error
      logger.error(e, stackTrace: st);
    }
  }
}

class TafsirCardState extends Equatable {
  final AsyncValue downloadStatus;
  final double downloadProgress;

  const TafsirCardState({
    this.downloadStatus = const AsyncData(null),
    this.downloadProgress = 0.0,
  });

  int get downloadProgressInt {
    return (downloadProgress * 100).toInt();
  }

  int? get downloadProgressIntOrNull {
    if (downloadProgress == 0) return null;
    return (downloadProgress * 100).toInt();
  }

  String get downlaodProgressPercentage {
    return '$downloadProgressInt%';
  }

  TafsirCardState copyWith({
    AsyncValue? downloadStatus,
    double? downloadProgress,
  }) {
    return TafsirCardState(
      downloadStatus: downloadStatus ?? this.downloadStatus,
      downloadProgress: downloadProgress ?? this.downloadProgress,
    );
  }

  TafsirCardState setDownloadStatusLoading() {
    return copyWith(downloadStatus: const AsyncLoading());
  }

  TafsirCardState setDownloadStatusError(Object e, StackTrace st) {
    return copyWith(downloadStatus: AppException.asAsyncError(e, st));
  }

  TafsirCardState setDownloadStatusData() {
    return copyWith(downloadStatus: const AsyncData(null));
  }

  TafsirCardState setDownloadProgress(double progress) {
    return copyWith(downloadProgress: progress);
  }

  @override
  List<Object?> get props => [downloadStatus, downloadProgress];
}
import 'package:animations/animations.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';

enum AnimationDirection {
  appearFromTop,
  appearFromBottom;

  bool reverse(bool isShow) {


Internal< ::YellowPages::Phone >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
/* This source file must have a .cpp extension so that all C++ compilers
   recognize the extension without flags.  Borland does not know .cxx for
   example.  */
#ifndef __cplusplus
# error "A C compiler has been selected for C++."
#endif

/* Version number components: V=Version, R=Revision, P=Patch
   Version date components:   YYYY=Year, MM=Month,   DD=Day  */

#if defined(__COMO__)
# define COMPILER_ID "Comeau"
  /* __COMO_VERSION__ = VRR */
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)

#elif defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# if defined(_MSC_VER)
#  define SIMULATE_ID "MSVC"
# endif
  /* __INTEL_COMPILER = VRP */
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER   % 10)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
  /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
#  define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER)
   /* _MSC_VER = VVRR */
#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif

#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
# if defined(__PATHCC_PATCHLEVEL__)
#  define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
# endif

#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__     & 0xFFFF)

#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
  /* __BORLANDC__ = 0xVRR */
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)

#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
# define COMPILER_ID "Watcom"
   /* __WATCOMC__ = VVRR */
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
#  define COMPILER_VE


/*
Magma - Abstraction layer over Khronos Vulkan API.
Copyright (C) 2018-2024 Victor Coda.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once

namespace magma
{
    class ShaderModule;
    class Specialization;

    /* Presence of a shader stage in a pipeline is indicated by
       including a valid shader stage info with module and an
       entry point from a shader module, where that entry point
       is valid for the specified stage. */

    class PipelineShaderStage : public VkPipelineShaderStageCreateInfo
    {
    public:
        explicit PipelineShaderStage(const VkShaderStageFlagBits stage,
            std::shared_ptr<ShaderModule> module,
            const char *const entrypoint,
            std::shared_ptr<Specialization> specialization = nullptr,
            VkPipelineShaderStageCreateFlags flags = 0) noexcept;
        PipelineShaderStage(const PipelineShaderStage&) noexcept;
        PipelineShaderStage(PipelineShaderStage&&) noexcept;
        PipelineShaderStage& operator=(const PipelineShaderStage&) noexcept;
        PipelineShaderStage& operator=(PipelineShaderStage&&) noexcept;
        virtual ~PipelineShaderStage() { delete[] pName; }
        const std::shared_ptr<ShaderModule>& getShaderModule() const noexcept { return shaderModule; }
        const std::shared_ptr<Specialization>& getSpecialization() const noexcept { return specialization; }
        hash_t getHash() const noexcept;
        friend std::ostream& operator<<(std::ostream&, const PipelineShaderStage&);

    private:
        std::shared_ptr<ShaderModule> shaderModule;
        std::shared_ptr<Specialization> specialization;
    };
} // namespace magma


5A684 00455BC4  38 1F 00 60 */	addi r0, r31, 0x60
/* 8045A688 00455BC8  80 7D 00 14 */	lwz r3, 0x14(r29)
/* 8045A68C 00455BCC  38 81 00 10 */	addi r4, r1, 0x10
/* 8045A690 00455BD0  54 A5 10 3A */	slwi r5, r5, 2
/* 8045A694 00455BD4  7D 00 2A 14 */	add r8, r0, r5
/* 8045A698 00455BD8  7C E5 00 AE */	lbzx r7, r5, r0
/* 8045A69C 00455BDC  88 C8 00 01 */	lbz r6, 1(r8)
/* 8045A6A0 00455BE0  88 A8 00 02 */	lbz r5, 2(r8)
/* 8045A6A4 00455BE4  88 08 00 03 */	lbz r0, 3(r8)
/* 8045A6A8 00455BE8  98 E1 00 10 */	stb r7, 0x10(r1)
/* 8045A6AC 00455BEC  98 C1 00 11 */	stb r6, 0x11(r1)
/* 8045A6B0 00455BF0  98 A1 00 12 */	stb r5, 0x12(r1)
/* 8045A6B4 00455BF4  98 01 00 13 */	stb r0, 0x13(r1)
/* 8045A6B8 00455BF8  48 06 2C 99 */	bl func_804BD350
/* 8045A6BC 00455BFC  3C 9E 00 01 */	addis r4, r30, 1
/* 8045A6C0 00455C00  38 60 00 09 */	li r3, 9
/* 8045A6C4 00455C04  80 84 82 1C */	lwz r4, -0x7de4(r4)
/* 8045A6C8 00455C08  38 A0 00 06 */	li r5, 6
/* 8045A6CC 00455C0C  48 05 F1 2D */	bl func_804B97F8
/* 8045A6D0 00455C10  3C 9E 00 01 */	addis r4, r30, 1
/* 8045A6D4 00455C14  38 60 00 0A */	li r3, 0xa
/* 8045A6D8 00455C18  80 84 82 20 */	lwz r4, -0x7de0(r4)
/* 8045A6DC 00455C1C  38 A0 00 06 */	li r5, 6
/* 8045A6E0 00455C20  48 05 F1 19 */	bl func_804B97F8
/* 8045A6E4 00455C24  3C 9E 00 01 */	addis r4, r30, 1
/* 8045A6E8 00455C28  80 64 82 24 */	lwz r3, -0x7ddc(r4)
/* 8045A6EC 00455C2C  A0 84 82 38 */	lhz r4, -0x7dc8(r4)
/* 8045A6F0 00455C30  48 06 37 B9 */	bl func_804BDEA8
lbl_8045A6F4:
/* 8045A6F4 00455C34  80 9D 00 04 */	lwz r4, 4(r29)
/* 8045A6F8 00455C38  38 60 00 00 */	li r3, 0
/* 8045A6FC 00455C3C  80 BD 00 08 */	lwz r5, 8(r29)
/* 8045A700 00455C40  38 C0 00 FF */	li r6, 0xff
/* 8045A704 00455C44  48 06 2E C5 */	bl func_804BD5C8
/* 8045A708 00455C48  80 7D 00 04 */	lwz r3, 4(r29)
/* 8045A70C 00455C4C  38 80


InstanceShapeConfigDetails{
						Ocpus:                   common.Float32(2),
						MemoryInGBs:             common.Float32(100),
						BaselineOcpuUtilization: core.LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8,
					},
					AvailabilityDomain:             common.String("ad2"),
					CompartmentId:                  common.String("test"),
					IsPvEncryptionInTransitEnabled: common.Bool(true),
					DefinedTags:                    map[string]map[string]interface{}{},
					FreeformTags: map[string]string{
						ociutil.CreatedBy:                 ociutil.OCIClusterAPIProvider,
						ociutil.ClusterResourceIdentifier: "resource_uid",
					},
				}
				computeClient.EXPECT().LaunchInstance(gomock.Any(), gomock.Eq(core.LaunchInstanceRequest{
					LaunchInstanceDetails: launchDetails,
					OpcRetryToken:         ociutil.GetOPCRetryToken("machineuid")})).Return(core.LaunchInstanceResponse{}, nil)
			},
		},
		{
			name:          "check all params together, with subnet id set, nsg id list",
			errorExpected: false,
			testSpecificSetup: func(machineScope *MachineScope, computeClient *mock_compute.MockComputeClient) {
				setupAllParams(ms)
				ms.OCIMachine.Spec.CapacityReservationId = common.String("cap-id")
				ms.OCIMachine.Spec.DedicatedVmHostId = common.String("dedicated-host-id")
				ms.OCIMachine.Spec.NetworkDetails.HostnameLabel = common.String("hostname-label")
				ms.OCIMachine.Spec.NetworkDetails.SubnetId = common.String("subnet-machine-id")
				ms.OCIMachine.Spec.NetworkDetails.NSGIds = []string{"nsg-machine-id-1", "nsg-machine-id-2"}
				// above array should take precedence
				ms.OCIMachine.Spec.NetworkDetails.NSGId = common.String("nsg-machine-id")
				ms.OCIMachine.Spec.NetworkDetails.SkipSourceDestCheck = common.Bool(true)
				ms.OCIMachine.Spec.NetworkDetails.AssignPrivateDnsRecord = common.Bool(true)
				ms.OCIMachine.Spec.NetworkDetails.AssignIpv6Ip = true
				ms.OCIMachine.Spec.NetworkDetails.DisplayName = common.String("display-name")
				ms.OCIMachine.Spec.LaunchVolumeAttachment = []infrastructurev1beta2.LaunchVolumeAttachment{
					{
						Type: infrastructurev1beta2.IscsiType,
						IscsiAttachment: infrastructurev1beta2.LaunchIscsiVolumeAttachment{
							Device:      common.String("/dev/oci"),
							IsShareable: common.Bool(true),
							LaunchCreateVolumeFromAttributes: infrastructurev1beta2.LaunchCreateVolumeFromAttributes{
								DisplayName: common.String("test-volume"),
								SizeInGBs:   common.Int64(75),
								VpusPerGB:   common.Int64(20),
							},
						},
					},
				}
				ms.OCIMachine.Spec.InstanceSourceViaImageDetails = &infrastructurev1beta2.InstanceSourceViaImageConfig{
					KmsKeyId:            common.String("kms-key-id"),
					BootVolumeVpusPerGB: common.Int64(32),
				}
				computeClient.EXPECT().ListInstances(gomock.Any(), gomock.Eq(core.ListInstancesRequest{
					DisplayName:   common.String("name"),
					CompartmentId: common.String("test"),
				})).Return(core.ListInstancesResponse{}, nil)

				launchDetails := core.LaunchInstanceDetails{DisplayName: common.String("name"),
					CapacityReservationId: common.String("cap-id"),
					DedicatedVmHostId:     common.String("dedicated-host-id"),
					SourceDetails: core.InstanceSourceViaImageDetails{
						ImageId:             common.String("image"),
						BootVolumeSizeInGBs: common.Int64(120),
						KmsKeyId:


    switch (segment.command) {
      case 'Q':
        box = QuadUtil.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4]);
        break;
      case 'C':
        box = CubicUtil.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], params[5], params[6]);
        break;
      case 'A':
        const arcParams = segment.arcParams;
        box = EllipseArcUtil.box(
          arcParams.cx,
          arcParams.cy,
          arcParams.rx,
          arcParams.ry,
          arcParams.xRotation,
          arcParams.startAngle,
          arcParams.endAngle
        );
        break;
      default:
        xArr.push(currentPoint[0]);
        yArr.push(currentPoint[1]);
        break;
    }
    if (box) {
      segment.box = box;
      xArr.push(box.x, box.x + box.width);
      yArr.push(box.y, box.y + box.height);
    }
    if ((segment.command === 'L' || segment.command === 'M') && segment.prePoint && segment.nextPoint) {
      segmentsWithAngle.push(segment);
    }
  }
  // bbox calculation should ignore NaN for path attribute
  // ref: https://github.com/antvis/g/issues/210
  xArr = xArr.filter((item) => !Number.isNaN(item));
  yArr = yArr.filter((item) => !Number.isNaN(item));
  let minX = Math.min.apply(null, xArr);
  let minY = Math.min.apply(null, yArr);
  let maxX = Math.max.apply(null, xArr);
  let maxY = Math.max.apply(null, yArr);
  if (segmentsWithAngle.length === 0) {
    return {
      x: minX,
      y: minY,
      width: maxX - minX,
      height: maxY - minY,
    };
  }
  for (let i = 0; i < segmentsWithAngle.length; i++) {
    const segment = segmentsWithAngle[i];
    const { currentPoint } = segment;
    let extra;
    if (currentPoint[0] === minX) {
      extra = getExtraFromSegmentWithAngle(segment, lineWidth);
      minX = minX - extra.xExtra;
    } else if (currentPoint[0] === maxX) {
      extra = getExtraFromSegmentWithAngle(segment, lineWidth);
      maxX = maxX + extra.xExtra;
    }
    if (currentPoint[1] === minY) {
      extra = getExtraFromSegmentWithAngle(segment, lineWidth);
      minY = minY - extra.yExtra;
    } else if (currentPoint[1] === maxY) {
      extra = getExtraFromSegmentWithAngle(segment, lineWidth);
      maxY = maxY + extra.yExtra;
    }
  }
  return {
    x: minX,
    y: minY,
    width: maxX - minX,
    height: maxY - minY,
  };
}

// 获取 L segment 的外尖角与内夹角的距离 + 二分之一线宽
function getExtraFromSegmentWithAngle(segment, lineWidth) {
  const { prePoint, currentPoint, nextPoint } = segment;
  const currentAndPre = Math.pow(currentPoint[0] - prePoint[0], 2) + Math.pow(currentPoint[1] - prePoint[1], 2);
  const currentAndNext = Math


unit_density_lbusliqgal_name',
    symbol: 'lb/US.liq.gal',
    inGramPerCubicMeter: 453.59237 / (0.001 * 3.785411784));

final _DENSITY_OUNCEPERUSLIQUIDGALLON = Density(
    name: 'common_unit_density_ozusliqgal_name',
    symbol: 'lb/US.liq.gal',
    inGramPerCubicMeter: 453.59237 / 16.0 / (0.001 * 3.785411784));

final _DENSITY_POUNDPERUSBUSHEL = Density(
    name: 'common_unit_density_lbusbu_name',
    symbol: 'lb/US.bu',
    inGramPerCubicMeter: 453.59237 / (0.001 * 4.40488377086 * 8));

final List<Density> densities = [
  DENSITY_KILOGRAMPERCUBICMETER,
  _DENSITY_GRAMPERCUBICCENTIMETER,
  _DENSITY_GRAMPERCUBICMETER,
  _DENSITY_GRAMPERMILLILITER,
  _DENSITY_MILLIGRAMPERLITER,
  DENSITY_GRAMPERLITER,
  _DENSITY_KILOGRAMPERLITER,
  _DENSITY_POUNDPERCUBICFOOT,
  _DENSITY_POUNDPERCUBICYARD,
  _DENSITY_POUNDPERUSLIQUIDGALLON,
  _DENSITY_OUNCEPERUSLIQUIDGALLON,
  _DENSITY_POUNDPERUSBUSHEL
];
import 'package:gc_wizard/tools/science_and_technology/unit_converter/logic/unit.dart';

class Energy extends Unit {
  late double Function(double) toJoule;
  late double Function(double) fromJoule;

  Energy({required String name, required String symbol, bool isReference = false, required double inJoule})
      : super(name, symbol, isReference, (e) => e * inJoule, (e) => e / inJoule) {
    toJoule = toReference;
    fromJoule = fromReference;
  }
}

final ENERGY_JOULE = Energy(
  name: 'common_unit_energy_j_name',
  symbol: 'J',
  inJoule: 1.0,
  isReference: true,
);

final ENERGY_CALORIE = Energy(name: 'common_unit_energy_cal_name', symbol: 'cal', inJoule: 4.1868);

final _ENERGY_BRITISHTHERMALUNIT = Energy(name: 'common_unit_energy_btu_name', symbol: 'BTU', inJoule: 1055.05585262);

final _ENERGY_ERG = Energy(name: 'common_unit_energy_erg_name', symbol: 'erg', inJoule: 1e-7);

final _ENERGY_FTLB = Energy(name: 'common_unit_energy_ftlb_name', symbol: 'ft-lb', inJoule: 1.35581795);

// https://webmadness.net/blog/?post=knuth
final _ENERGY_VREEBLE = Energy(name: 'common_unit_energy_vreeble_name', symbol: 'v', inJoule: 34.33 * 4.1868);

final List<Energy> energies = [
  ENERGY_JOULE,
  ENERGY_CALORIE,
  _ENERGY_BRITISHTHERMALUNIT,
  _ENERGY_ERG,
  _ENERGY_FTLB,
  _ENERGY_VREEBLE,
];
import 'package:gc_wizard/tools/science_and_technology/unit_converter/logic/unit.dart';

class Power extends Unit {
  late double Function(double) toWatt;
  late double Function(double) fromWatt;

  Power({required String name, required String symbol, bool is


, 0xba, 0x72, 0x39, 0xe7, 0x9d, 0xc8, 0x83, 0x54, 0xfe,
        0xe1, 0x82, 0x73, 0x58, 0x75, 0x9c, 0x45, 0xe2, 0x42,
    ]);
    let expected_tag = Tag::from_public_slice(&[
        0x65, 0xcd, 0xff, 0x31, 0x95, 0xe1, 0xe2, 0x71, 0x3b, 0x58, 0x55, 0xf0, 0x90, 0xc0, 0xda,
        0x7f,
    ]);

    let (ct, tag) = gimli_aead_encrypt(&msg, &ad, nonce, key);
    assert_secret_seq_eq!(expected_ct, ct, U8);
    assert_secret_array_eq!(expected_tag, tag, U8);

    let msg_out = gimli_aead_decrypt(&ct, &ad, tag, nonce, key);
    assert_secret_seq_eq!(msg, msg_out, U8);
}

#[test]
fn tg_gimli_aead_115_154() {
    let key = Key::from_public_slice(&[
        0x68, 0xf5, 0x1e, 0x7, 0xc4, 0x9, 0xf3, 0x80, 0x66, 0x5f, 0x57, 0xba, 0x67, 0xa, 0x64,
        0xf4, 0xbb, 0xdb, 0xd3, 0x6, 0xc1, 0x78, 0x69, 0xde, 0x3f, 0xb9, 0x94, 0x1d, 0xf5, 0x2b,
        0xf7, 0xc9,
    ]);
    let nonce = Nonce::from_public_slice(&[
        0x60, 0xe8, 0x83, 0x1c, 0x29, 0xdb, 0x2d, 0xdc, 0xe7, 0xea, 0xce, 0xf5, 0xb0, 0x39, 0x46,
        0xd2,
    ]);
    let msg = ByteSeq::from_public_slice(&[
        0xba, 0x1, 0xfa, 0x7d, 0x68, 0xef, 0x37, 0xd0, 0x70, 0xa3, 0xca, 0x37, 0xff, 0xf1, 0x7,
        0x8e, 0x89, 0xbc, 0xe5, 0xa9, 0x86, 0x1d, 0x14, 0xf5, 0x1c, 0x30, 0xee, 0x6d, 0x46, 0x7b,
        0xd2, 0x1f, 0xec, 0x70, 0xb8, 0x69, 0x28, 0xfa, 0x14, 0xe8, 0x6, 0xa6, 0x5e, 0x80, 0x1d,
        0xb, 0x17, 0x29, 0x6, 0x99, 0xe8, 0x39, 0x0, 0xc7, 0x1f, 0xed, 0x4e, 0xcc, 0x21, 0x89, 0x5,
        0x8, 0x78, 0x67, 0xb9, 0x5b, 0x74, 0xfe, 0x7c, 0x6, 0x35, 0x8c, 0x96, 0xa7, 0x13, 0xee,
        0x13, 0xea, 0xb9, 0x84, 0xc2, 0x65, 0xec, 0xd9, 0x4b, 0xbd, 0x2e, 0x8f, 0x2