E_VERTICAL,
                        7,
                    ).createGrid()

            // first column
            grid.cells[0].possibles = setOf(2, 3, 4, 6)
            grid.cells[2].possibles = setOf(4, 6)
            grid.cells[4].possibles = setOf(2, 3, 4, 5, 6)
            grid.cells[6].possibles = setOf(1, 2, 5)
            grid.cells[8].possibles = setOf(1, 2, 5)
            grid.cells[10].possibles = setOf(1, 2)
            // second column
            grid.cells[1].possibles = setOf(3, 4, 6)
            grid.cells[3].possibles = setOf(1, 2, 4)
            grid.cells[5].possibles = setOf(2, 3, 4, 5, 6)
            grid.cells[7].possibles = setOf(1, 2, 3, 4, 5, 6)
            grid.cells[9].possibles = setOf(1, 2, 3, 4, 5, 6)
            grid.cells[11].possibles = setOf(1, 2, 3, 4, 6)

            val solver = PossibleMustBeContainedInSingleCageInLineDeleteFromOtherCages()

            println(grid)

            // solver should find two possibles and delete one of them for each run
            solver.fillCellsWithNewCache(grid) shouldBe true
            solver.fillCellsWithNewCache(grid) shouldBe true
            solver.fillCellsWithNewCache(grid) shouldBe true

            println(grid)

            assertSoftly {
                withClue("cell 0") {
                    grid.cells[0].possibles shouldContainExactly setOf(3, 4, 6)
                }
                withClue("cell 2") {
                    grid.cells[2].possibles shouldContainExactly setOf(4, 6)
                }
                withClue("cell 4") {
                    grid.cells[4].possibles shouldContainExactly setOf(3, 4, 6)
                }
            }
        }
    })
package org.piepmeyer.gauguin.difficulty.human.strategy

import io.kotest.assertions.assertSoftly
import io.kotest.assertions.withClue
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.collections.shouldContainExactly
import io.kotest.matchers.shouldBe
import org.piepmeyer.gauguin.creation.GridBuilder
import org.piepmeyer.gauguin.creation.cage.GridCageType
import org.piepmeyer.gauguin.difficulty.human.HumanSolverCacheImpl
import org.piepmeyer.gauguin.grid.GridCageAction

class GridEachCageWithPossibleMustIncludePossibleOnceTest :
    FunSpec({

        test("4x3 grid") {
            val grid =
                GridBuilder(4, 3)
                    .addCage(
                        4,
                        GridCageAction.ACTION_DIVIDE,
                        GridCageType.DOUBLE_VERTICAL,
                        0,
                    ).addCage(
                        48,
                        GridCageAction.ACTION_MULTIPLY,
                        GridCageType.TETRIS_VERTICAL_LEFT_TOP,
                        1,
                    ).addCage(
                        1,
                        GridCageAction.ACTION_SUBTRACT,
                        GridCageType.DOUBLE_HORIZONTAL,
                        2,
                    ).addCage(
                        2,
                        GridCageAction.ACTION_SUBTRACT,
                        GridCageType.DOUBLE_VERTICAL,
                        7,
                    ).addCage(
                        2,
                        GridCageAction.ACTION_DIVIDE,
                        GridCageType.DOUBLE_HORIZONTAL,
                        8,
                    ).createGrid()

            grid.cells[0].possibles = setOf(1, 4)
            grid.cells[


}  # statistics dictionary
    for split in 'train', 'val', 'test':
        if data.get(split) is None:
            stats[split] = None  # i.e. no test set
            continue
        x = []
        dataset = LoadImagesAndLabels(data[split])  # load dataset
        for label in tqdm(dataset.labels, total=dataset.n, desc='Statistics'):
            x.append(np.bincount(label[:, 0].astype(int), minlength=data['nc']))
        x = np.array(x)  # shape(128x80)
        stats[split] = {'instance_stats': {'total': int(x.sum()), 'per_class': x.sum(0).tolist()},
                        'image_stats': {'total': dataset.n, 'unlabelled': int(np.all(x == 0, 1).sum()),
                                        'per_class': (x > 0).sum(0).tolist()},
                        'labels': [{str(Path(k).name): round_labels(v.tolist())} for k, v in
                                   zip(dataset.img_files, dataset.labels)]}

        if hub:
            im_dir = hub_dir / 'images'
            im_dir.mkdir(parents=True, exist_ok=True)
            for _ in tqdm(ThreadPool(NUM_THREADS).imap(hub_ops, dataset.img_files), total=dataset.n, desc='HUB Ops'):
                pass

    # Profile
    stats_path = hub_dir / 'stats.json'
    if profile:
        for _ in range(1):
            file = stats_path.with_suffix('.npy')
            t1 = time.time()
            np.save(file, stats)
            t2 = time.time()
            x = np.load(file, allow_pickle=True)
            print(f'stats.npy times: {time.time() - t2:.3f}s read, {t2 - t1:.3f}s write')

            file = stats_path.with_suffix('.json')
            t1 = time.time()
            with open(file, 'w') as f:
                json.dump(stats, f)  # save stats *.json
            t2 = time.time()
            with open(file, 'r') as f:
                x = json.load(f)  # load hyps dict
            print(f'stats.json times: {time.time() - t2:.3f}s read, {t2 - t1:.3f}s write')

    # Save, print and return
    if hub:
        print(f'Saving {stats_path.resolve()}...')
        with open(stats_path, 'w') as f:
            json.dump(stats, f)  # save stats.json
    if verbose:
        print(json.dumps(stats, indent=2, sort_keys=False))
    return stats


件托盘, 如果创建的是其它类型托盘返回nil
	AsLCLTray() *LCLTray                         //AsLCLTray 尝试转换为 LCL 组件托盘, 如果创建的是其它类型托盘返回nil
	Notice(title, content string, timeout int32) //Notice 托盘系统通知
}

func notification(tray lcl.IComponent, title, content string, timeout int32) {
	var lclTrayNotice *lcl.TTrayIcon
	if tray != nil {
		lclTrayNotice = tray.(*lcl.TTrayIcon)
	}
	var lclNotice = func() {
		lclTrayNotice.SetBalloonTitle(title)
		lclTrayNotice.SetBalloonHint(content)
		lclTrayNotice.SetBalloonTimeout(timeout)
		lclTrayNotice.ShowBalloonHint()
	}
	var sysNotice = func() {
		notify := notice.NewNotification(title, content)
		notify.SetTimeout(timeout)
		notice.SendNotification(notify)
	}
	if lclTrayNotice != nil {
		lclNotice()
	} else {
		sysNotice()
	}
}
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Apache License Version 2.0, January 2004
//
// https://www.apache.org/licenses/LICENSE-2.0
//
//----------------------------------------

// CEF TBufferPanel

package cef

import (
	"github.com/energye/energy/v2/cef/internal/def"
	"github.com/energye/energy/v2/common/imports"
	"github.com/energye/golcl/lcl"
	"github.com/energye/golcl/lcl/api"
	"github.com/energye/golcl/lcl/types"
	"unsafe"
)

type TBufferPanel struct {
	lcl.IWinControl
	instance unsafe.Pointer
}

// NewBufferPanel
//
//	创建一个新的对象。
func NewBufferPanel(owner lcl.IComponent) *TBufferPanel {
	m := new(TBufferPanel)
	var result uintptr
	imports.SysCallN(def.BufferPanel_Create, owner.Instance(), uintptr(unsafe.Pointer(&result)))
	m.instance = unsafe.Pointer(result)
	return m
}

// AsBufferPanel
//
// 动态转换一个已存在的对象实例。
//
// Dynamically convert an existing object instance.
func AsBufferPanel(obj interface{}) *TBufferPanel {
	instance := getInstance(obj)
	if instance == nil {
		return nil
	}
	return &TBufferPanel{instance: instance}
}

// Free
//
// 释放对象。
//
// Free object.
func (m *TBufferPanel) Free() {
	if m.instance != nil {
		imports.SysCallN(def.BufferPanel_Free, m.Instance())
		m.instance = nil
	}
}

// Instance
//
// 返回对象实例指针。
//
// Return object instance pointer.
func (m *TBufferPanel) Instance() uintptr {
	return uintptr(m.instance)
}

// IsValid
//
// 检测地址是否为空。
//
// Check if the address is empty.
func (m *TBufferPanel) IsValid() bool {
	return m.instance != nil
}

// TBufferPanelClass
//
// 获取类信息指针。
//
// Get class information pointer.
func TBufferPanelClass() types.TClass {
	return types.TClass(imports.SysCallN(def.BufferPanel_StaticClassType))
}

// Can


Name:      "Ba Ria-Vung Tau Province",
					PostalKey: "Bà Rịa–Vũng Tàu",
				},
				{
					ID:        "54",
					Name:      "Bac Giang Province",
					PostalKey: "Bắc Giang",
				},
				{
					ID:        "53",
					Name:      "Bac Kan Province",
					PostalKey: "Bắc Kạn",
				},
				{
					ID:        "55",
					Name:      "Bac Lieu Province",
					PostalKey: "Bạc Liêu",
				},
				{
					ID:        "56",
					Name:      "Bac Ninh Province",
					PostalKey: "Bắc Ninh",
				},
				{
					ID:        "50",
					Name:      "Ben Tre Province",
					PostalKey: "Bến Tre",
				},
				{
					ID:        "31",
					Name:      "Binh Dinh Province",
					PostalKey: "Bình Định",
				},
				{
					ID:        "57",
					Name:      "Binh Duong Province",
					PostalKey: "Bình Dương",
				},
				{
					ID:        "58",
					Name:      "Binh Phuoc Province",
					PostalKey: "Bình Phước",
				},
				{
					ID:        "40",
					Name:      "Binh Thuan Province",
					PostalKey: "Bình Thuận",
				},
				{
					ID:        "59",
					Name:      "Ca Mau Province",
					PostalKey: "Cà Mau",
				},
				{
					ID:        "CT",
					Name:      "Can Tho City",
					PostalKey: "Cần Thơ",
				},
				{
					ID:        "04",
					Name:      "Cao Bang Province",
					PostalKey: "Cao Bằng",
				},
				{
					ID:        "DN",
					Name:      "Da Nang City",
					PostalKey: "Đà Nẵng",
				},
				{
					ID:        "33",
					Name:      "Dak Lak Province",
					PostalKey: "Đắk Lắk",
				},
				{
					ID:        "72",
					Name:      "Dak Nong Province",
					PostalKey: "Đăk Nông",
				},
				{
					ID:        "71",
					Name:      "Dien Bien Province",
					PostalKey: "Điện Biên",
				},
				{
					ID:        "39",
					Name:      "Dong Nai Province",
					PostalKey: "Đồng Nai",
				},
				{
					ID:        "45",
					Name:      "Dong Thap Province",
					PostalKey: "Đồng Tháp",
				},
				{
					ID:        "30",
					Name:      "Gia Lai Province",
					PostalKey: "Gia Lai",
				},
				{
					ID:        "03",
					Name:      "Ha Giang Province",
					PostalKey: "Hà Giang",
				},
				{
					ID:        "63",
					Name:      "Ha Nam Province",
					PostalKey: "Hà Nam",
				},
				{
					ID:        "23",
					Name:      "Ha Tinh Province",
					PostalKey: "Hà Tĩnh",
				},
				{
					ID:        "61",
					Name:      "Hai Duong Province",
					PostalKey: "Hải Dương",
				},
				{
					ID:        "HP",
					Name:      "Haiphong City",
					PostalKey: "Hải Phòng",
				},
				{
					ID:        "HN",
					Name:      "Hanoi City",
					PostalKey: "Hà Nội",
				},
				{
					ID:        "73",


 data_iter)?;
        let mb = read_u8(&mut data_iter)?;
        let is_bad = (ix==0 && iy==0 && id==0) || id>=16;
        if !is_bad {
            level.objects.push(Object {
                x: ix as i32,
                y: iy as i32,
                obj_id: id as usize,
                modifier: ObjectModifier::from_lvl(ma),
                is_upside_down: mb == 0x8f,
            });
        }
    }

    // Terrain.
    for _ in 0..400 {
        let a = read_u8(&mut data_iter)?; // significant nibble = flags, other = x.
        let b = read_u8(&mut data_iter)?; // x.
        let c = read_u8(&mut data_iter)?; // First 8 of 9 bits of y.
        let d = read_u8(&mut data_iter)?; // Another bit of y, and terrain id.
        let terrain_id = d & 0x7f;
        let is_bad = (a==0xff && b==0xff && c==0xff && d==0xff) || terrain_id>=64;
        if !is_bad {
            let x: u16 = (((a & 0xf) as u16) << 8) + (b as u16);
            let y_bits: u16 = ((c as u16) << 1) + ((d >> 7) as u16);
            let y_2s_comp: u16 = if y_bits & 0x100 == 0 { y_bits } else { y_bits | 0xfe00 };
            let y_i: i16 = y_2s_comp as i16;
            let flags: u8 = a >> 4;
            let do_not_overwrite_existing_terrain = (flags & 8) == 8;
            let remove_terrain = (flags & 2) == 2;
            level.terrain.push(Terrain {
                do_not_overwrite_existing_terrain: do_not_overwrite_existing_terrain,
                is_upside_down: (flags & 4) == 4,
                remove_terrain: remove_terrain && !do_not_overwrite_existing_terrain, // If both flags are on, only honor 'do not overwrite'.
                x: x as isize,
                y: y_i as isize - 4,
                terrain_id: terrain_id as usize,
            });
        }
    }

    // Steel.
    for _ in 0..32 {
        let a = read_u8(&mut data_iter)?; // First 8 of 9 bits of x.
        let b = read_u8(&mut data_iter)?; // Last x bit, y.
        let c = read_u8(&mut data_iter)?; // Area.
        let d = read_u8(&mut data_iter)?; // Unused, pity after all that packing!
        let is_bad = a==0 && b==0 && c==0 && d==0;
        if !is_bad {
            let x: u16 = ((a as u16) << 1) + ((b >> 7) as u16);
            let y: u8 = b & 0x7f;
            level.steel.push(SteelArea {
                x: (x as isize),
                y: (y as isize) * 4 - 4, // TODO test this makes the steel in the correct place?
                width: c >> 4,
                height: c & 0xf,
            });
        }
    }

    // Name.
    let mut str_raw: Vec<u8> = Vec::with_capacity(32);
    for _ in 0..32 {
        let byte = read_u8(&mut data_iter)?;
        str_raw.push(byte);
    }
    let raw_name = string_from_vec(str_raw)?;
    level.name = raw_name.trim().to_string();

    Ok(level)
}
<gh_stars>0
use crate::prelude::*;
use serenity::{
    framework::standard::{macros::command, A


ripten/system/lib/dlmalloc.c"
      HEAP32[(($head426)>>2)]=$or425; //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $301=$psize; //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $302=$p; //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $303=$302; //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $304=$psize; //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $add_ptr427=(($303+$304)|0); //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $305=$add_ptr427; //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $prev_foot428=(($305)|0); //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      HEAP32[(($prev_foot428)>>2)]=$301; //@line 4807 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $306=$p; //@line 4808 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $307=HEAP32[((((__gm_+20)|0))>>2)]; //@line 4808 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $cmp429=(($306)|0)==(($307)|0); //@line 4808 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      if ($cmp429) { __label__ = 148; break; } else { __label__ = 149; break; } //@line 4808 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
    case 148: // $if_then431
      var $308=$psize; //@line 4809 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      HEAP32[((((__gm_+8)|0))>>2)]=$308; //@line 4809 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      __label__ = 194; break; //@line 4810 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
    case 149: // $if_end432
      __label__ = 150; break;
    case 150: // $if_end433
      __label__ = 151; break;
    case 151: // $if_end434
      __label__ = 153; break; //@line 4813 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
    case 152: // $if_else435
      var $309=$next; //@line 4815 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $head436=(($309+4)|0); //@line 4815 "/media/data/unix/tools/emscripten/master/emscripten/system/lib/dlmalloc.c"
      var $310=HEAP32[(($head436)>>2)]; //@line


using JetBrains.Annotations;
using Perfolizer.Common;
using Perfolizer.Extensions;
using Perfolizer.Mathematics.Common;
using Perfolizer.Mathematics.Functions;
using Perfolizer.Tests.Common;
using Perfolizer.Tests.Infra;

namespace Perfolizer.Tests.Mathematics.Common;

public class RankerTests(ITestOutputHelper output)
{
    [AssertionMethod]
    private void Check(double[] x, double[] expectedRanks)
    {
        double[] actualRanks = Ranker.Instance.GetRanks(x);

        string Present(double[] values) => new Sample(values).ToString();

        output.WriteLine("Input         : " + Present(x));
        output.WriteLine("ExpectedRanks : " + Present(expectedRanks));
        output.WriteLine("ActualRanks   : " + Present(actualRanks));

        Assert.Equal(expectedRanks, actualRanks, AbsoluteEqualityComparer.E9);
    }

    private void DoSimpleTest(int n, Func<double, double> transform)
    {
        double[


"""
a secure password generator
"""
import random,string,sqlite3
def shuffle(cont):  # we can use random.shuffle but i prefer to use this
    "cont:container"
    lim=len(cont)-1
    c=list(cont)
    for _ in "."*(lim/2):
        a=random.randint(0,lim)
        b=random.randint(0,lim)
        t=c[a]
        c[a]=c[b]
        c[b]=t
    return "".join(c)

def Gen_Pass(name):
    n=random.randint(7,10)  #Length of password
    #--------------------Data Base
    conn=sqlite3.connect("pass.db")
    cur=conn.cursor()
    cur.execute("CREATE TABLE IF NOT EXISTS passwords(user TEXT UNIQUE,pass TEXT UNIQUE)")
    #--------------------
    rand=random.SystemRandom()
    lst=list(string.letters[26:52]+string.digits[1:])#lst=list(string.letters[:52])
    word=""
    for i in range(n):
        word+=lst[rand.randint(0,len(lst)-1)]
    word=shuffle(word)
    try:
        cur.execute("INSERT OR IGNORE INTO passwords(user,pass) VALUES (?,?)",(name,word))
        conn.commit()
        print "the pass is ",word
        print "ok , now it is inserted"
    except:
        print "there are some problems"
    cur.close()
    conn.close()
if __name__=="__main__":
    Gen_Pass("UserName")


ayCron({});
    } else if (periodType === PeriodType.week) {
      return new WeekCron({ dayOfWeekOneBased });
    } else if (periodType === PeriodType.month) {
      return new MonthCron({});
    } else if (periodType === PeriodType.hour) {
      return new HourCron({});
    } else if (periodType === PeriodType.minute) {
      return new MinuteCron({});
    } else if (periodType === PeriodType.hour) {
      return new HourCron({});
    }
  }

  static getCronFromExp(cronExp: string, dayOfWeekOneBased = true, strictValidate = true) {
    if (!cronExp) {
      return new DayCron({});
    }
    // 验证cronExp正确性
    if (!cronValidate(cronExp, dayOfWeekOneBased, strictValidate)) {
      return new DayCron({});
    }

    const [second, minute = "", hour = "", day, month, week] = cronExp.split(
      " "
    );
    if (
      day === "*" &&
      !minute.includes("/") &&
      !hour.includes(",") &&
      !hour.includes("/")
    ) {
      return new DayCron({
        time: Moment(`${hour}:${minute}`, "HH:mm"),
        isSchedule: hour !== "0" || minute !== "0"
      });
    } else if (day === "?") {
      return new WeekCron({
        time: Moment(`${hour}:${minute}`, "HH:mm"),
        weeks: week.split(","),
        dayOfWeekOneBased
      });
    } else if (day !== "*" && isStrNum(hour)) {
      // 每月多少号
      return new MonthCron({
        days: day.split(","),
        time: Moment(`${hour}:${minute}`, "HH:mm")
      });
    } else if (minute.includes("/")) {
      const [beginMinute, stepMinute] = minute.split("/");
      const [beginHour, endHour] = hour.split("-");

      return new MinuteCron({
        beginTime: Moment(`${beginHour}:${beginMinute}`, "HH:mm"),
        endTime: Moment(`${endHour}:00`, "HH:mm"),
        stepMinute
      });
    } else {
      if (hour.includes(",")) {
        // 时间点
        return new HourCron({
          hours: hour.split(","),
          hasInterval: false
        });
      } else if (hour.includes("/")) {
        // 时间段
        const [duration, stepHour] = hour.split("/");
        const [beginHour, endHour] = hour.split("-");

        return new HourCron({
          beginTime: Moment(`${beginHour}:${minute}`, "HH:mm"),
          endTime: Moment(`${endHour}:00`, "HH:mm"),
          stepHour,
          hasInterval: true // 有时间段，默认为true
        });
      } else {
        return new HourCron({ hours: [] });
      }
    }
  }
}

export class DayCron extends Cron {
  readonly periodType = PeriodType.day;

  time = Moment("00:00", "HH:mm");
  isSchedule = false;

  changeIsSchedule(isSchedule: boolean) {
    if (this.isSchedule && !isSchedule) {
      this.time = Moment("00:00", "HH:mm");
    }

    this.isSchedule = isSchedule;
  }

  /** 产生预测时间-Day */
  getPredictedTimes(times = 5, format = DEFAULT_FORMAT): string[] {
    const time = this.time;
    const now = Moment();
    // isBefore表示当前时间之前是否是设置时间之前


.CSS3DObject( element );
					object.position.x = Math.random() * 4000 - 2000;
					object.position.y = Math.random() * 4000 - 2000;
					object.position.z = Math.random() * 4000 - 2000;
					scene.add( object );

					objects.push( object );

					// 表格需要坐标进行排序的
					var object = new THREE.Object3D();
					// object.position.x = ( table[ i + 3 ] * 140 ) - 1330;
					// object.position.y = - ( table[ i + 4 ] * 180 ) + 990;
					object.position.x = ( table[ i ].p_x * 140 ) - 1330;
					object.position.y = - ( table[ i ].p_y * 180 ) + 990;

					targets.table.push( object );

				}

				// sphere

				var vector = new THREE.Vector3();
				var spherical = new THREE.Spherical();

				for ( var i = 0, l = objects.length; i < l; i ++ ) {

					var phi = Math.acos( -1 + ( 2 * i ) / l );
					var theta = Math.sqrt( l * Math.PI ) * phi;

					var object = new THREE.Object3D();

					spherical.set( 800, phi, theta );

					object.position.setFromSpherical( spherical );

					vector.copy( object.position ).multiplyScalar( 2 );

					object.lookAt( vector );

					targets.sphere.push( object );

				}

				// helix

				var vector = new THREE.Vector3();
				var cylindrical = new THREE.Cylindrical();

				for ( var i = 0, l = objects.length; i < l; i ++ ) {

					var theta = i * 0.175 + Math.PI;
					var y = - ( i * 5 ) + 450;

					var object = new THREE.Object3D();

					// 参数一 圈的大小 参数二 左右间距 参数三 上下间距
					cylindrical.set( 900, theta, y );

					object.position.setFromCylindrical( cylindrical );

					vector.x = object.position.x * 2;
					vector.y = object.position.y;
					vector.z = object.position.z * 2;

					object.lookAt( vector );

					targets.helix.push( object );

				}

				// grid

				for ( var i = 0; i < objects.length; i ++ ) {

					var object = new THREE.Object3D();

					object.position.x = ( ( i % 5 ) * 400 ) - 800; // 400 图片的左右间距  800 x轴中心店
					object.position.y = ( - ( Math.floor( i / 5 ) % 5 ) * 300 ) + 500;  // 500 y轴中心店
					object.position.z = ( Math.floor( i / 25 ) ) * 200 - 800;// 300调整 片间距 800z轴中心店

					targets.grid.push( object );

				}

				//渲染
				renderer = new THREE.CSS3DRenderer();
				renderer.setSize( window.innerWidth, window.innerHeight );
				renderer.domElement.style.position = 'absolute';
				document.getElementById( 'container' ).appendChild( renderer.domElement );

				// 鼠标控制
				controls = new THREE.TrackballControls( camera, renderer.domElement );
				controls.rotateSpeed = 0.5;
				controls.minDistance = 500;
				controls.maxDistance = 6000;
				controls.addEventListener( 'change', render );

				// 自动更换
				var ini = 0;
				setInterval(function(){
					ini = ini >= 3 ? 0 : ini;
					++ini;
					switch(ini){
						case 1:


        public static void End(IAsyncResult result)
        {
            AsyncResult.End<ByeOperationApril2005AsyncResult>(result);
        }

        protected override bool ValidateContent(ByeMessageApril2005 message)
        {
            return (message.Bye != null);
        }

        protected override DiscoveryMessageSequence GetMessageSequence(ByeMessageApril2005 message)
        {
            return DiscoveryUtility.ToDiscoveryMessageSequenceOrNull(message.MessageSequence);
        }

        protected override EndpointDiscoveryMetadata GetEndpointDiscoveryMetadata(ByeMessageApril2005 message)
        {
            return message.Bye.ToEndpointDiscoveryMetadata();
        }
    }
}


-event-list-standard ul.mec-categories li.mec-category a:before {
    font-size: 16px !important;
    content: "\f105";
    position: absolute;
    font-family: fontawesome;
    left: 8px;
    font-size: 15px;
}

@media only screen and (max-width: 960px) {
    .mec-event-list-standard .mec-topsec {
        display: block;
    }

    .mec-event-list-standard .mec-col-table-c.mec-event-image-wrap {
        display: block;
        width: 40%;
    }

    .mec-event-list-standard .mec-col-table-c.mec-event-content-wrap {
        display: block;
        min-height: 230px;
    }

    .mec-event-list-standard .mec-event-meta-wrap {
        display: block;
        border-left: none;
        border-top: 1px solid #eee;
        width: 100%;
        float: none;
        padding-top: 20px;
    }
}

@media only screen and (min-width: 480px) and (max-width: 960px) {

    .mec-event-list-standard .mec-col-table-c.mec-event-image-wrap,
    .mec-event-list-standard .mec-col-table-c.mec-event-content-wrap {
        display: table-cell;
    }
}

@media only screen and (max-width: 479px) {

    .mec-event-list-standard .mec-col-table-c.mec-event-image-wrap,
    .mec-event-list-standard .mec-col-table-c.mec-event-image-wrap img {
        float: none;
        width: 100%;
        padding: 0;
    }

    .mec-event-list-standard .mec-col-table-c.mec-event-content-wrap {
        padding: 10px 10px 10px 30px;
    }
}

/* Local Time
	-------------------------- */
.mec-localtime-details {
    color: #777;
    font-weight: 400;
    line-height: 12px;
    font-size: 12px;
}

.mec-localtime-details .mec-localtitle,
.mec-localtime-details .mec-localdate,
.mec-localtime-details .mec-localtime {
    display: inline-block;
}

.mec-localtime-details .mec-start-date-label {
    padding-right: 5px;
}

.mec-localtime-details .mec-localtime {
    padding-left: 5px;
}

.mec-event-list-minimal .mec-localtime-details {
    display: inline-flex;
    font-size: 15px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0;
    color: #9a9a9a;
    padding-left: 9px;
}

.mec-event-grid-clean .mec-localtime-details,
.mec-event-grid-classic .mec-localtime-details {
    color: #fff;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #fff;
    padding: 0 0;
    line-height: 18px;
    margin-top: -3px;
}

.tooltipster-box .mec-localtime-details,
.mec-event-grid-colorful .mec-localtime-details,
.mec-event-grid-clean .mec-localtime-details


\033[32m😬 啥？啥？啥？你输入的是个啥？我直接一个忽略!\033[0m")

            # 提示用户输入要删除的目标对象
            targets_input = input("\n\033[35m🧰 请输入要删除的目标对象（如IM23, SD8, Form1), 用逗号分隔, 或者回车删除全部：\033[0m\n ")
            output_file = input_file.replace('.pdf', '_removed_images.pdf')
            if targets_input == "":
                targets = ["-a"]
                process_pdf(input_file, output_file, targets, resources_info)
            else:
                found = False
                targets = [target.strip() for target in targets_input.split(",")]
                targets = [f'/{target}' for target in targets]
                for target in targets:
                    if found: break
                    for category, items in resources_info.items():
                        if found: break
                        for item in items:
                            if target == item[0]:
                                found = True
                                break
                if found:
                    process_pdf(input_file, output_file, targets, resources_info)
                else:
                    print("\033[33m🫠  就不想删除呗，我再来！\033[0m\n")

        except KeyboardInterrupt:
            colors = ["\033[31m", "\033[33m", "\033[32m", "\033[34m", "\033[35m"]
            text = "👋🏻 程序已退出。客官走好，欢迎下次光临~"
            symbol = "👋🏻 "
            colored_text = symbol + "".join(f"{colors[i % len(colors)]}{char}\033[0m" for i, char in enumerate(text[len(symbol):]))
            print(f"\n{colored_text}")
            print("Open Source: https://github.com/Peaceful-World-X/PDF-PicKiller", end=" ")
            print(Fore.GREEN + "       公众号: 耗不尽的先生\n\n")
            sys.exit(0)

# 运行程序
if __name__ == "__main__":
    try:
        init()
        welcome_text = pyfiglet.figlet_format("PDF PicKiller", font="starwars", width=90, justify="center")
        print(welcome_text)
        print("Open Source: https://github.com/Peaceful-World-X/PDF-PicKiller", end=" ")
        print(Fore.GREEN + "       公众号: 耗不尽的先生\n\n\033[0m")
        main()
    except Exception as e:
        print(f"程序发生错误: {e}")
        time.sleep(10)  # 稍作停顿，便于查看错误信息


adients
    self.gradParameters:zero()

    local qvalues = self.model:forward(observations)

    self.targets:resizeAs(qvalues)
    self.targets:copy(qvalues)

    -- A simple trick to avoid using a mask for other actions.
    -- Set targets only for taken actions, zero gradient for others.
    for i=1,actions:size(1) do
      self.targets[i][actions[i][1]] = qtargets[i]
    end

    local error = self.criterion:forward(qvalues, self.targets)
    local df_do = self.criterion:backward(qvalues, self.targets)

    self.model:backward(observations, df_do)

    return error, self.gradParameters
  end

  optim[self.optimConfig.optimizer](feval, self.parameters, self.optimConfig)
end

function DQN:update(observations, actions, rewards, next_observations, mask)
  local qtargets = self:create_targets(rewards, next_observations, mask)
  self:update_params(observations, actions, qtargets)
end


#pragma once

#include <ATen/cpu/vec/functional.h>
#include <ATen/cpu/vec/vec.h>
#include <immintrin.h>
// namespace {
namespace torch_ipex {
namespace cpu {
using namespace at::vec;

template <
    typename scalar_t,
    typename std::enable_if_t<c10::is_reduced_floating_point_v<scalar_t>, int> =
        0>
inline Vectorized<scalar_t> convert_from_float_ext(
    const Vectorized<float>& a,
    const Vectorized<float>& b) {
  return at::vec::convert_from_float<scalar_t>(a, b);
}

#if defined(CPU_CAPABILITY_AVX512_BF16)

// at::vec::convert_from_float<>` from PyTorch doesn't have avx512-bf16
// intrinsics use native instruction for bfloat16->float32 conversion
template <>
inline Vectorized<at::BFloat16> convert_from_float_ext<at::BFloat16>(
    const Vectorized<float>& a,
    const Vectorized<float>& b) {
  return (__m512i)(_mm512_cvtne2ps_pbh(__m512(b), __m512(a)));
}

#define CVT_BF16_TO_FP32(a) \
  _mm512_castsi512_ps(_mm512_slli_epi32(_mm512_cvtepu16_epi32(a), 16))

#define CVT_FP16_TO_FP32(a) \
  _mm512_cvtps_ph(a, (_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC))

#endif

// vector to scalar reduction
#if defined(CPU_CAPABILITY_AVX512) && 0
inline float vec_reduce_sum(const Vectorized<float>& a) {
  return _mm512_reduce_add_ps(__m512(a));
}

inline float vec_reduce_max(const Vectorized<float>& a) {
  return _mm512_reduce_max_ps(__m512(a));
}
#else
inline float vec_reduce_sum(const Vectorized<float>& a) {
  return vec_reduce_all(
      [](Vectorized<float>& x, Vectorized<float>& y) { return x + y; }, a);
}

inline float vec_reduce_max(const Vectorized<float>& a) {
  return vec_reduce_all(
      [](Vectorized<float>& x, Vectorized<float>& y) { return maximum(x, y); },
      a);
}
#endif

// } // anonymous namespace
} // namespace cpu
} // namespace torch_ipex


classes,
    institutions,
    instruction_modes,
    instructors,
    section_types,
    sections,
    semesters,
);
<reponame>guimingyue/lc-rust<gh_stars>1-10
use crate::lc::Solution;

/// #Iter.map, Iter.sum, Iter.max
impl Solution {
    pub fn maximum_wealth(accounts: Vec<Vec<i32>>) -> i32 {
        accounts.iter().map(|acc| acc.iter().sum()).max().unwrap()
    }
}

#[test]
fn test() {
    assert_eq!(6, Solution::maximum_wealth(vec![vec![1,2,3],vec![3,2,1]]));
    assert_eq!(10, Solution::maximum_wealth(vec![vec![1,5],vec![7,3],vec![3,5]]));
    assert_eq!(17, Solution::maximum_wealth(vec![vec![2,8,7],vec![7,1,3],vec![1,9,5]]));
}<filename>src/main.rs
use crossterm_cursor::cursor;
use crossterm_terminal::terminal;
use std::{thread, time};

extern "C" {
    fn hello();
}

include!(concat!(env!("OUT_DIR"), "/beret.rs"));

fn main() {
    let cursor = cursor();
    let _ = cursor.hide();
    let terminal = terminal();
    let _ = terminal.clear(crossterm_terminal::ClearType::All);
    unsafe {
        hello();
    }
    println!("Terminal width: {}", terminal.terminal_size().0);

    loop {
        TAB.iter().for_each(|v| {
            let _ = cursor.goto(*v, 10);
            print!(" █ ");
            thread::sleep(time::Duration::from_millis(5));
        })
    }
}
<gh_stars>0
use std::ops::*;
use {Expressible, BoxedExpressible};

#[derive(Clone, Copy, Debug)]
pub enum BinaryOp {
    ADD,
    SUB,
    MUL,
    DIV,
    REM,
    BOR,
    OR,
    BAND,
    AND,
    BXOR,
    SHL,
    SHR,
}

pub struct BinaryOpTwig {
    op: BinaryOp,
    a: BoxedExpressible,
    b: BoxedExpressible,
}

impl Expressible for BinaryOpTwig {

}

impl BinaryOpTwig {
    pub fn get_left(&self) -> &Expressible {
        &*self.a
    }

    pub fn get_right(&self) -> &Expressible {
        &*self.b
    }

    pub fn get_op(&self) -> BinaryOp {
        self.op
    }
}

macro_rules! impl_binary_op {
    ($stdtrait:ident, $op:ident, #[$fdoc:meta] $stdfunc:ident) => {
        impl $stdtrait<BoxedExpressible> for BoxedExpressible {
            type Output = BinaryOpTwig;

            fn $stdfunc(self, other: BoxedExpressible) -> BinaryOpTwig {
                use BinaryOp::*;
                BinaryOpTwig {
                    op: $op,
                    a: self,
                    b: other,
                }
            }
        }

        #[$fdoc]
        #[inline]
        pub fn $stdfunc<A: Expressible + 'static, B: Expressible + 'static>(a: A, b: B) -> BinaryOpTwig {
            a.to_boxed().$stdfunc(b.to_boxed())
        }
    };
}

macro_rules! binop_for {
    ($name:path, $stdtrait:ident, $stdfunc:ident) => {
        impl<O: Expressible + 'static> $stdtrait<O> for $name {
            typ


1d22d1, 0x21d88ac
.word Function_21d22f0+1 @ =0x21d22f1, 0x21d88b0
.word Function_21d23e8+1 @ =0x21d23e9, 0x21d88b4
.word Function_21d2420+1 @ =0x21d2421, 0x21d88b8
.word Function_21d2464+1 @ =0x21d2465, 0x21d88bc
.word Function_21d2480+1 @ =0x21d2481, 0x21d88c0
.word Function_21d24a0+1 @ =0x21d24a1, 0x21d88c4
.word Function_21d24d0+1 @ =0x21d24d1, 0x21d88c8
.word Function_21d24f0+1 @ =0x21d24f1, 0x21d88cc
.word Function_21d2510+1 @ =0x21d2511, 0x21d88d0
.word Function_21d254c+1 @ =0x21d254d, 0x21d88d4
.word Function_21d2598+1 @ =0x21d2599, 0x21d88d8
.word Function_21d25c4+1 @ =0x21d25c5, 0x21d88dc
.word Function_21d25dc+1 @ =0x21d25dd, 0x21d88e0
.word Function_21d2628+1 @ =0x21d2629, 0x21d88e4
.word Function_21d269c+1 @ =0x21d269d, 0x21d88e8
.word Function_21d2704+1 @ =0x21d2705, 0x21d88ec
.word Function_21d2738+1 @ =0x21d2739, 0x21d88f0
.word Function_21d2828+1 @ =0x21d2829, 0x21d88f4
.word Function_21d2850+1 @ =0x21d2851, 0x21d88f8
.word Function_21d2950+1 @ =0x21d2951, 0x21d88fc
.word Function_21d2988+1 @ =0x21d2989, 0x21d8900
.word Function_21d29c0+1 @ =0x21d29c1, 0x21d8904
.word Function_21d29e4+1 @ =0x21d29e5, 0x21d8908
.word Function_21d2a18+1 @ =0x21d2a19, 0x21d890c
.word Function_21d2a44+1 @ =0x21d2a45, 0x21d8910
.word Function_21d2a78+1 @ =0x21d2a79, 0x21d8914
.word Function_21d2ac8+1 @ =0x21d2ac9, 0x21d8918
.word Function_21d2ae0+1 @ =0x21d2ae1, 0x21d891c
.word Function_21d2af8+1 @ =0x21d2af9, 0x21d8920
.word Function_21d2b28+1 @ =0x21d2b29, 0x21d8924
.word Function_21d2b3c+1 @ =0x21d2b3d, 0x21d8928
.word Function_21d2b50+1 @ =0x21d2b51, 0x21d892c
.word Function_21d2b64+1 @ =0x21d2b65, 0x21d8930
.word Function_21d2b80+1 @ =0x21d2b81, 0x21d8934

.incbin "./baserom/overlay/overlay_0101.bin", 0x7bb8, 0x21d8e58 - 0x21d8938

.word Function_21d6a60


c-webfont.svg#OpenSansExtraboldItalic) format('svg');font-weight:800;font-style:italic}.am-wrapper{min-height:100%;padding-top:80px}.am-top-header{background-color:#f7c954;border:0;margin-bottom:0}.am-animate .am-top-header{-webkit-transition:all .35s ease;-o-transition:all .35s ease;transition:all .35s ease}.am-top-header .navbar-header .navbar-brand{background-color:#3d3c3c;color:#fff;padding-top:0;padding-bottom:0;line-height:80px;height:80px;width:100px;background-image:url(../../img/logo.png);background-repeat:no-repeat;background-position:center center;margin-right:20px;border-bottom:1px solid #474646}@media (max-width:767px){.am-wrapper{padding-top:0}.am-top-header .navbar-header .navbar-brand{display:none}}.am-nosidebar-left .am-top-header .navbar-header .navbar-brand{background-color:transparent;border-bottom-width:0;margin-left:0;margin-right:10px;width:180px;background-image:url(../../img/logo-full.png)}@media (min-width:768px) and (max-width:991px){.am-top-header .navbar-header .navbar-brand{margin-right:10px}.am-nosidebar-left .am-top-header .navbar-header .navbar-brand{margin-right:0;padding-left:0;width:160px}}.am-top-header .navbar-header .am-toggle-left-sidebar{border-radius:0;position:absolute;left:0;top:0;margin:0;font-size:0;text-align:center;display:none;padding:0 18px;border-width:0;line-height:70px}.am-top-header .navbar-header .am-toggle-left-sidebar .icon-bar{display:inline-block;background-color:transparent;height:auto;width:auto;vertical-align:middle}.am-top-header .navbar-header .am-toggle-left-sidebar .icon-bar span{display:block;width:25px;height:1px;margin-top:6px;background-color:#fff}.am-top-header .navbar-header .am-toggle-left-sidebar .icon-bar span:first-child{margin-top:0}.am-top-header .navbar-header .am-toggle-left-sidebar:focus,.am-top-header .navbar-header .am-toggle-left-sidebar:hover{background-color:transparent}@media (max-width:767px){.am-top-header .navbar-header .am-toggle-left-sidebar{display:block}}.am-top-header .navbar-header .page-title{display:none;color:#fff;font-family:Raleway,sans-serif;font-size:19px;line-height:70px}@media (max-width:767px){.am-top-header .navbar-header .page-title{display:inline-block}.am-top-header .navbar-header{text-align:center}}.am-top-header .navbar-collapse{padding-right:20px}.am-top-header .navbar-collapse .navbar-nav>li>a{line-height:80px;color:#fff;font-family:Raleway,sans-serif;font-size:14px;padding:0 18px;outline:0}@media (min-width:768px) and (max-width:991px){.am-top-header .navbar-collapse .navbar-nav>li>a{padding:0 12px}}.am-top-header .navbar-collapse .navbar-nav>li.dropdown>a .angle-down{font


nUk",
    "native": "ребёнок",
    "language": "russian",
    "meaning": "child"
  },
  {
    "sound": "vY",
    "pronunciation": "zvy9ery9",
    "native": "зверь",
    "language": "russian",
    "meaning": "animal"
  },
  {
    "sound": "tY",
    "pronunciation": "pty9i9tsU",
    "native": "пти́ца",
    "language": "russian",
    "meaning": "bird"
  },
  {
    "sound": "mY",
    "pronunciation": "zmy9Iya9",
    "native": "змея́",
    "language": "russian",
    "meaning": "snake"
  },
  {
    "sound": "txY",
    "pronunciation": "txy9erfy9",
    "native": "червь",
    "language": "russian",
    "meaning": "worm"
  },
  {
    "sound": "sY",
    "pronunciation": "sy9emy9U",
    "native": "се́мя",
    "language": "russian",
    "meaning": "seed"
  },
  {
    "sound": "vY",
    "pronunciation": "tsvy9Ito9k",
    "native": "цвето́к",
    "language": "russian",
    "meaning": "flower"
  },
  {
    "sound": "mY",
    "pronunciation": "my9asU",
    "native": "мя́со",
    "language": "russian",
    "meaning": "flesh"
  },
  {
    "sound": "vY",
    "pronunciation": "vy9Iry9O9fkU",
    "native": "верёвка",
    "language": "russian",
    "meaning": "rope (chord)"
  },
  {
    "sound": "hv",
    "pronunciation": "hvost",
    "native": "хвост",
    "language": "russian",
    "meaning": "tail"
  },
  {
    "sound": "i#",
    "pronunciation": "kri0lyo",
    "native": "крыло́",
    "language": "russian",
    "meaning": "wing"
  },
  {
    "sound": "J",
    "pronunciation": "koj0U",
    "native": "ко́жа",
    "language": "russian",
    "meaning": "skin"
  },
  {
    "sound": "C",
    "pronunciation": "maCi0r",
    "native": "maður",
    "language": "icelandic",
    "meaning": "human"
  },
  {
    "sound": "i#",
    "pronunciation": "fi0kl",
    "native": "fugl",
    "language": "icelandic",
    "meaning": "bird"
  },
  {
    "sound": "i#",
    "pronunciation": "hi0nti0r",
    "native": "hundur",
    "language": "icelandic",
    "meaning": "dog"
  },
  {
    "sound": "i#",
    "pronunciation": "1rmi0r",
    "native": "ormur",
    "language": "icelandic",
    "meaning": "worm"
  },
  {
    "sound": "C",
    "pronunciation": "huC",
    "native": "húð",
    "language": "icelandic",
    "meaning": "skin"
  },


import boa
import pytest
from ..conftest import PRICE, approx

@pytest.fixture(scope="module")
def ema_price_oracle(price_oracle, admin):
    with boa.env.prank(admin):
        signature = price_oracle.price.args_abi_type(0)[0]
        signature = b'\x00' * (32 - len(signature)) + signature
        return boa.load('contracts/price_oracles/EmaPriceOracle.vy', 10000, price_oracle.address, signature)

def test_price_oracle(price_oracle, amm):
    assert price_oracle.price() == PRICE * 10**18
    assert amm.price_oracle() == price_oracle.price()

def test_p_oracle_updown(amm):
    p_base = amm.get_base_price()
    A = amm.A()
    assert amm.p_oracle_up(0) == p_base
    assert approx(amm.p_oracle_down(0), p_base * (A - 1) // A, 1e-14)

    for i in range(-10, 10):
        mul = ((A - 1) / A) ** i
        p_up = p_base * mul
        p_down = p_up * (A - 1) / A
        assert approx(amm.p_oracle_up(i), p_up, 1e-14)
        assert approx(amm.p_oracle_down(i), p_down, 1e-14)

def test_p_current_updown(amm):
    p_base = amm.get_base_price()
    p_oracle = amm.price_oracle()
    A = amm.A()

    for i in range(-1023, 1023):
        mul = ((A - 1) / A) ** i
        p_base_up = p_base * mul
        p_base_down = p_base_up * (A - 1) / A
        p_current_up = p_oracle**3 / p_base_down**2
        p_current_down = p_oracle**3 / p_base_up**2
        assert approx(amm.p_current_up(i), p_current_up, 1e-10)
        assert approx(amm.p_current_down(i), p_current_down, 1e-10)

def test_ema_wrapping(ema_price_oracle, price_oracle):
    with boa.env.anchor():
        assert price_oracle.price() == ema_price_oracle.last_price()
        assert price_oracle.price() == ema_price_oracle.price()
        ema_price_oracle.price_w()
        boa.env.time_travel(20000)
        assert price_oracle.price() == ema_price_oracle.price()
        ema_price_oracle.price_w()
        boa.env.time_travel(20000)
        assert price_oracle.price() == ema_price_oracle.price()

def test_ema_sleep(ema_price_oracle, price_oracle, admin):
    with boa.env.anchor():
        p = price_oracle.price()
        with boa.env.prank(admin):
            price_oracle.set_price(p // 2)
        boa.env.time_travel(5)
        ema_price_oracle.price_w()
        boa.env.time_travel(1000000)
        assert (ema_price_oracle.price() - p // 2) < p / 10


}
}
// Copyright (c) 2020, Frappe Technologies and contributors
// For license information, please see license.txt

frappe.ui.form.on("DocType Layout", {
	onload_post_render(frm) {
		// disallow users from manually adding/deleting rows; this doctype should only
		// be used for managing layout, and docfields and custom fields should be used
		// to manage other field metadata (hidden, etc.)
		frm.set_df_property("fields", "cannot_add_rows", true);
		frm.set_df_property("fields", "cannot_delete_rows", true);

		$(frm.wrapper).on("grid-move-row", (e, frm) => {
			// refresh the layout after moving a row
			frm.dirty();
		});
	},

	refresh(frm) {
		frm.events.add_buttons(frm);
	},

	async document_type(frm) {
		if (frm.doc.document_type) {
			// refreshing the doctype fields resets the new name input field;
			// once the fields are set, reset the name to the original input
			if (frm.is_new()) {
				const document_name = frm.doc.__newname || frm.doc.name;
			}

			frm.set_value("fields", []);
			await frm.events.sync_fields(frm, false);

			if (frm.is_new()) {
				frm.doc.__newname = document_name; // eslint-disable-line
				frm.refresh_field("__newname");
			}
		}
	},

	add_buttons(frm) {
		if (!frm.is_new()) {
			frm.add_custom_button(__("Go to {0} List", [frm.doc.name]), () => {
				window.open(`/app/${frappe.router.slug(frm.doc.name)}`);
			});

			frm.add_custom_button(__("Sync {0} Fields", [frm.doc.name]), async () => {
				await frm.events.sync_fields(frm, true);
			});
		}
	},

	async sync_fields(frm, notify) {
		frappe.dom.freeze("Fetching fields...");
		const response = await frm.call({ doc: frm.doc, method: "sync_fields" });
		frm.refresh_field("fields");
		frappe.dom.unfreeze();

		if (!response.message) {
			frappe.msgprint(__("No changes to sync"));
			return;
		}

		frm.dirty();
		if (notify) {
			const addedFields = response.message.added;
			const removedFields = response.message.removed;

			const getChangedMessage = (fields) => {
				let changes = "";
				for (const field of fields) {
					if (field.label) {
						changes += `
Row #${field.idx}: ${field.fieldname.bold()} (${
							field.label
						})
`;
					} else {
						changes += `<li>Row #${field.idx}: ${field.fieldname.bold()}</li>`;
					}
				}
				return changes;
			};

			let message = "";

			if (addedFields.length) {
				message += `The following fields have been added:

${getChangedMessage(
					addedFields
				)}
`;
			}

			if (removedFields.length) {
				message += `The following fields have been removed:

${getChangedMessage(
					removedFields
				)}
`;
			}

			if (message) {
				frappe.msgprint({
					message: __(message),
					indicator: "green",
					title: __("Synced Fields"),
				});
			}
		}
	},
});
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors /


0] HANGUL JUNGSEONG FILLER (JV) ÷ [0.3]
× 00A0 × 0308 × 1160 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [12.0] HANGUL JUNGSEONG FILLER (JV) ÷ [0.3]
× 00A0 × 0308 × 0020 ÷ 1160 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) ÷ [18.0] HANGUL JUNGSEONG FILLER (JV) ÷ [0.3]
× 00A0 × 000A ÷	#  × [0.3] NO-BREAK SPACE (GL) × [6.0] <LINE FEED (LF)> (LF) ÷ [0.3]
× 00A0 × 0020 × 000A ÷	#  × [0.3] NO-BREAK SPACE (GL) × [7.01] SPACE (SP) × [6.0] <LINE FEED (LF)> (LF) ÷ [0.3]
× 00A0 × 0308 × 000A ÷	#  × [0.3] NO-BREAK SPACE (GL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [6.0] <LINE FEED (LF)> (LF) ÷ [0.3]
× 00A0 × 0308 × 0020 × 000A ÷	#  × [0.3] NO-BREAK SPACE (GL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) × [6.0] <LINE FEED (LF)> (LF) ÷ [0.3]
× 00A0 × 0085 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [6.0] <NEXT LINE (NEL)> (NL) ÷ [0.3]
× 00A0 × 0020 × 0085 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [7.01] SPACE (SP) × [6.0] <NEXT LINE (NEL)> (NL) ÷ [0.3]
× 00A0 × 0308 × 0085 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [6.0] <NEXT LINE (NEL)> (NL) ÷ [0.3]
× 00A0 × 0308 × 0020 × 0085 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [7.01] SPACE (SP) × [6.0] <NEXT LINE (NEL)> (NL) ÷ [0.3]
× 00A0 × 17D6 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [12.0] KHMER SIGN CAMNUC PII KUUH (NS) ÷ [0.3]
× 00A0 × 0020 ÷ 17D6 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [7.01] SPACE (SP) ÷ [18.0] KHMER SIGN CAMNUC PII KUUH (NS) ÷ [0.3]
× 00A0 × 0308 × 17D6 ÷	#  × [0.3] NO-BREAK SPACE (GL) × [9.0] COMBINING DIAERESIS (CM1_CM) × [12.0] KHMER SIGN CAMNUC PII KUUH (NS) ÷ [0.3]
× 00A0 × 0308 × 0020 ÷ 17D6 ÷	#  × [0.3] NO-BREAK SPACE (GL)


ating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-valid-color)}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-success);border-radius:var(--bs-border-radius)}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:var(--bs-form-valid-border-color);padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:var(--bs-form-valid-border-color)}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{--bs-form-select-bg-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");padding-right:4.125rem;background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:var(--b


db	10,	5	dw	0x8000 + 1962
	db	118,	5	dw	0x8000 + 1967
	db	10,	5	dw	0x8000 + 1972
	db	118,	4	dw	0x8000 + 1977
	db	10,	5	dw	0x8000 + 1981
	db	118,	4	dw	0x8000 + 1986
	db	10,	5	dw	0x8000 + 1990
	db	118,	4	dw	0x8000 + 1995
	db	10,	5	dw	0x8000 + 1999
	db	118,	4	dw	0x8000 + 2004
	db	11,	4	dw	0x8000 + 2008
	db	117,	4	dw	0x8000 + 2012
	db	11,	4	dw	0x8000 + 2016
	db	117,	4	dw	0x8000 + 2020
	db	11,	4	dw	0x8000 + 2024
	db	117,	4	dw	0x8000 + 2028
	db	11,	4	dw	0x8000 + 2032
	db	117,	4	dw	0x8000 + 2036
	db	11,	4	dw	0x8000 + 2040
	db	117,	4	dw	0x8000 + 2044
	db	11,	4	dw	0x8000 + 2048
	db	117,	3	dw	0x8000 + 2052
	db	11,	4	dw	0x8000 + 2055
	db	117,	3	dw	0x8000 + 20


九圍。`,
      `受小球大球、為下國綴旒。
何天之休、不競不絿、不剛不柔、敷政優優、百祿是遒。`,
      `受小共大共、為下國駿厖。
何天之龍、敷奏其勇、不震不動、不戁不竦、百祿是總。`,
      `武王載旆、有虔秉鉞。
如火烈烈、則莫我敢曷。
苞有三蘗、莫遂莫達、九有有截。
韋顧既伐、昆吾夏桀。`,
      `昔在中葉、有震且業。
允也天子、降予卿士、實維阿衡、實左右商王。`
    ]
  },
  {
    category: '頌',
    subCategory: '商頌',
    title: '殷武',
    content: [
      `撻彼殷武、奮伐荊楚。
冞入其阻、裒荊之旅。
有截有所、湯孫之緒。`,
      `維女荊楚、居國南鄉。
昔有成湯、自彼氐羌、莫敢不來享、莫敢不來王、曰商是常。`,
      `天命多辟、設都于禹之績。
歲事來辟、勿予禍適、稼穡匪解。`,
      `天命降監、下民有嚴。
不僭不濫、不敢怠遑。
命于下國、封建厥福。`,
      `商邑翼翼、四方之極。
赫赫厥聲、濯濯厥靈。
壽考且寧、以保我後生。`,
      `陟彼景山、松柏丸丸。
是斷是遷、方斲是虔。
松桷有梴、旅楹有閑、寢成孔安。`
    ]
  }
];
import * as generateId from 'shortid';
import { Tool, ToolImplementation, ToolFactory } from './types';

type RegistryEntry = {
    factory: ToolFactory;
    implementation: ToolImplementation;
    count: number;
};

class Registry {
    private entries = new Map<string, RegistryEntry>();

    register = (
        toolName: string,
        toolFactory: ToolFactory,
        toolImplementation: ToolImplementation
    ) => {
        const entry = {
            factory: toolFactory,


="FD2019Q3YTD" format="ixt-sec:boolballotbox">☐</ix:nonNumeric>
		 TRANSITION REPORT PURSUANT TO SECTION 13 OR
			15(d) OF THE SECURITIES EXCHANGE ACT OF 1934

For the transition period
			from            to

Commission File Number:
			<ix:nonNumeric id="d205898790e473-wk-Fact-A9AAB28ADA815DF09A765BFB6CF3A408" name="dei:EntityFileNumber"
				contextRef="FD2019Q3YTD">001-35551</ix:nonNumeric>

____________________________________________

			<ix:nonNumeric id="d205898790e482-wk-Fact-481A04844D44136FB6E9F6385B149DB5" name="dei:EntityRegistrantName"
				contextRef="FD2019Q3YTD">Facebook, Inc.
			</ix:nonNumeric>

(Exact name of registrant as specified in its
			charter)

____________________________________________

					<td
						style="vertical-align:top;padding-left:2px;padding-top:2px;padding-bottom:2px;padding-r


-performance, zero-panic parser combinator library for Rust with rich error reporting.

## Features

- **Zero Panics**: All errors handled through `Result` types
- **Rich Error Messages**: Line numbers, context, and visual error pointers
- **Performance Focused**: Byte-level operations with minimal allocations
- **UTF-8 Support**: Full Unicode parsing capabilities
- **Composable**: Build complex parsers from simple building blocks
- **Type Safe**: Parser output types are statically known

## Quick Start

```rust
use parsicomb::{byte, is_byte, is_string, u64, Parser};
use parsicomb::combinators::{and::AndExt, or::OrExt, map::MapExt};

// Parse a number
let number = u64();
let result = number.parse("42".as_bytes());

// Parse alternatives
let boolean = is_string("true").map(|_| true)
    .or(is_string("false").map(|_| false));

// Sequence parsers
let pair = u64().and(is_byte(b',')).and(u64())
    .map(|((a, _), b)| (a, b));
// Parses "10,20" → (10, 20)
```

## Core Concepts

### ByteCursor

The foundation of parsing - an immutable cursor that tracks position in a byte array:

```rust
let cursor = ByteCursor::new(b"hello world");
// Cursors can be copied for backtracking
let saved = cursor;
```

### Parser Trait

All parsers implement this trait:

```rust
pub trait Parser<'a>: Sized {
    type Output;
    fn parse(&self, cursor: ByteCursor<'a>) -> Result<(Self::Output, ByteCursor<'a>), Error>;
}
```

## Basic Parsers

| Parser | Description | Example |
|--------|-------------|---------|
| `byte()` | Consumes any byte | `byte().parse(b"a")` → `Ok((b'a', ...))` |
| `is_byte(b)` | Matches specific byte | `is_byte(b'x').parse(b"x")` → `Ok((b'x', ...))` |
| `is_string(s)` | Matches string | `is_string("hello").parse(b"hello")` → `Ok(("hello", ...))` |
| `u64()` | Parses unsigned integer | `u64().parse(b"123")` → `Ok((123, ...))` |
| `i64()` | Parses signed integer | `i64().parse(b"-42")` → `Ok((-42, ...))` |
| `f64()` | Parses floating point | `f64().parse(b"3.14")` → `Ok((3.14, ...))` |
| `char()` | Parses UTF-8 character | `char().parse("🦀".as_bytes())` → `Ok(('🦀', ...))` |

## Combinators

### Sequencing with `and()`

```rust
let parser = is_string("hello")
    .and(is_byte(b' '))
    .and(is_string("world"))
    .map(|((greeting, _), target)| format!("{} {}", greeting, target));

// Parses "hello world" → "hello world"
```

### Alternation with `or()`

```rust
let parser = is_string("yes").map(|_| true)
    .or(is_string("no").map(|_| false));

// Parses "yes" → true, "no" → false
```

### Repetition

```rust
use parsicomb::combinators::{many, some};

// Zero or more
let parser = many(digit());  // Parses "" → vec![], "123" → vec!['1', '2', '3']

// One or more
let parser = some(digit());  // Parses "123" → vec!['1', '2', '3'], "" → Error
```

### Lists and Pairs

```rust
use parsicomb::combinators::{separated_list, separated_pair, between};

// Parse comma-separated numbers
let list = separated_list(u64(), is_byte(b','));
// Parses "1,2,3"


ds [1]
        sll	$8, 6, $8 	# Caller Frame Size in words in place [1]
        bis	$5, $6, $5 	# [1]
        bis	$5, $8, $5 	# [1]
/* TagCdr. */
        srl	$2, 6, $22 	# [1]
        srl	$7, 30, $6 	# [1]
        subq	$22, $6, $8 	# [2]
        cmovge	$8, $22, $6 	# [1]
        sll	$6, 30, $6 	# [2]
        and	$7, $4, $7 	# Mask off unwanted bits [1]
        bis	$7, $6, $7 	# Add trap mode [1]
        bis	$7, $5, $7 	# Add argsize, apply, disposition, caller FS [1]
        stl	$7, PROCESSORSTATE_CONTROL($14)	#  [0di]
/* Convert real continuation to PC. */
        and	$2, 1, $9 	# [1-]
        addq	$3, $9, $9 	# [1]
        addq	$3, $9, $9 	# [1]
/* Check for stack overflow */
        srl	$7, 30, $7 	# Isolate trap mode [1]
        ldl	$8, PROCESSORSTATE_CSLIMIT($14)	# Limit for emulator mode [1-]
        ldl	$22, PROCESSORSTATE_CSEXTRALIMIT($14)	# Limit for extra stack and higher modes [1]
        cmovne	$7, $22, $8 	# Get the right limit for the current trap mode [3]
        extll	$8, 0, $8 	# Might have been sign extended [2]
/* Convert stack cache address to VMA */
        ldq	$22, PROCESSORSTATE_STACKCACHEDATA($14)	#  [1-]
        ldq	$7, PROCESSORSTATE_STACKCACHEBASEVMA($14)	#  [1]
        subq	$12, $22, $22 	# stack cache base relative offset [2-]
        srl	$22, 3, $22 	# convert byte address to word address [1]
        addq	$22, $7, $7 	# reconstruct VMA [2]
        cmplt	$7, $8, $22 	# Check for overflow [1]
        beq	$22, STACKOVERFLOW	# Jump if overflow [1]
/* Convert a halfword address into a CP pointer. */
        srl	$9, CacheLineRShift, $13 	# Get third byte into bottom [0di]
        ldq	$22, PROCESSORSTATE_ICACHEBASE($14)	# get the base of the icache [1-]
        lda	$8, -1	#  [0di]
        ldah	$8, 4($8)	#  [1]
        sll	$13, CacheLineLShift, $13 	# Now third byte is zero-shifted [1]
        addq	$9, $13, $13 	# [2]
        and	$13, $8, $13 	# [1]
        sll	$13, 5, $8 	# temp=cpos*32 [1]
        sll	$13, 4, $13 	# cpos=cpos*16 [1]
        addq	$22, $8, $22 	# temp2=base+cpos*32 [1]
        addq	$22, $13, $13 	# cpos=base+cpos*48 [1]
        br	$31, CACHEVALID	# [1-]
.end FinishPreTrap
.align 5
.globl ILLEGALOPERAND
.ent ILLEGALOPERAND 0
.align 3
ILLEGALOPERAND:


as"]}},19931:e=>{e.exports={en:["Lagos"],es:["Lagos"]}},63815:e=>{e.exports={en:["Last day change"],es:["Cambio del último día"]}},59444:e=>{e.exports={en:["Lima"],es:["Lima"]}},3554:e=>{e.exports={en:["Line"],es:["Línea"]}},9394:e=>{e.exports={en:["Line with markers"],es:["Línea con marcadores"]}},43588:e=>{e.exports={en:["Line break"],es:["Ruptura de línea"]}},56982:e=>{e.exports={en:["Lines"],es:["Líneas"]}},37367:e=>{e.exports={en:["Link to the chart image copied to clipboard {emoji}"],es:["Enlace a la imagen del gráfico copiado al portapapeles {emoji}"]}},53375:e=>{e.exports={en:["Lisbon"],es:["Lisboa"]}},81038:e=>{e.exports={en:["Luxembourg"],es:["Luxemburgo"]}},60663:e=>{e.exports={en:["Move the point to position the anchor then tap to place"],es:["Mueva el punto para posicionar el anclaje y después, toque para colocar"]}},35049:e=>{e.exports={en:["Move to"],es:["Mover a"]}},26493:e=>{e.exports={en:["Move scale to left"],es:["Mover escala hacia la izquierda"]}},40789:e=>{e.exports={en:["Move scale to right"],
es:["Mover escala hacia la derecha"]}},70382:e=>{e.exports={en:["Modified Schiff"],es:["Schiff modificado"]}},57681:e=>{e.exports={en:["Modified Schiff Pitchfork"],es:["Tridente de Schiff modificado"]}},93907:e=>{e.exports={en:["More settings"]}},64039:e=>{e.exports={en:["Moscow"],es:["Moscú"]}},52066:e=>{e.exports={en:["Madrid"],es:["Madrid"]}},38365:e=>{e.exports={en:["Malta"],es:["Malta"]}},48991:e=>{e.exports={en:["Manila"],es:["Manila"]}},92767:e=>{e.exports={en:["Mar"],es:["Mar"]}},73332:e=>{e.exports={en:["Mexico City"],es:["Ciudad de Mexico"]}},88314:e=>{e.exports={en:["Merge all scales into one"],es:["Combinar todas las escalas en una"]}},54215:e=>{e.exports={en:["Mixed"],es:["Mixto"]}},24866:e=>{e.exports={en:["Micro"],es:["Micro"]}},87957:e=>{e.exports={en:["Millennium"],es:["Millennium"]}},14724:e=>{e.exports={en:["Minuette"],es:["Minuette"]}},78273:e=>{e.exports={en:["Minuscule"],es:["Minúsculo"]}},28941:e=>{e.exports={en:["Mirrored"],es:["Reflejado"]}},9865:e=>{e.exports={en:["Muscat"],es:["Muscat"]}},96935:e=>{e.exports={en:["N/A"],es:["No disponible"]}},36252:e=>{e.exports={en:["No data here"],es:["Aquí no hay datos"]}},11254:e=>{e.exports={en:["No scale (fullscreen)"],es:["Sin escala (pantalla completa)"]}},9140:e=>{e.exports={en:["No sync"],es:["No sincronizar"]}},50910:e=>{e.exports={en:["No volume data"],es:["Sin datos sobre el volumen"]}},94389:e=>{e.exports={en:["Note"],es:["Nota"]}},26899:e=>{e.exp


xa0019297190c47f2
	.xword	0x2505dc1eab5af0e5
	.xword	0x4973c20e575dac7e
	.xword	0x2f30d692b248632b
	.xword	0x07aa4a65473f462e
	.xword	0x7cedeb6e66a67b4a
	.xword	0x649df6913f6b0e08
	.xword	0x36a682c000d02bdb
	.xword	0xf23d2083db2455bc
	.xword	0x124ad04c6fb363f0
	.xword	0xef07acd35d8b634b
	.xword	0x30baa129f6e079e2
	.xword	0x5afbc114d94886b1

#if 0
!!# /*
!!#  */
!!#
!!# %%section c_declarations
!!#
!!#
!!#   int i, j;
!!#   int loop_cnt = 0;
!!#
!!#
!!#
!!# my_imm_asi_to_rvar (int line, int rv_ro, field_type_t fld, void *data);
!!#
!!#
!!# %%
!!# %%section control
!!#
!!# %%
!!# %%section init
!!# {
!!#
!!#
!!#   IJ_bind_thread_group("diag.j", 34, th_all,  0xf);
!!#   IJ_bind_thread_group("diag.j", 35, th_0,    0x1);
!!#   IJ_bind_thread_group("diag.j", 36, th_1,    0x2);
!!#   IJ_bind_thread_group("diag.j", 37, th_2,    0x4);
!!#   IJ_bind_thread_group("diag.j", 38, th_3,    0x8);
!!#   IJ_bind_thread_group("diag.j", 39, th_2_3,  0xc);
!!#
!!#   IJ_set_default_rule_wt_rvar ( "diag.j", 41,"{16}" );
!!#   IJ_set_rvar ("diag.j", 42, Rv_low_wt, "{1}");
!!#   IJ_set_rvar ("diag.j", 43, Rv_mid_wt, "{8}");
!!#
!!#   IJ_set_rvar ("diag.j", 45, Rv_thrdint_param,
!!#                "46'{0},"     // RSVD0
!!# 	       "2'brr,"      // Type
!!#                "3'b000,"     // RSVD1
!!#                "5'brrrrr,"   // THREAD
!!#                "2'b00,"      // RSVD2
!!#                "6'brr rrrr"  // VECTOR
!!#               );
!!#   IJ_set_rvar ("diag.j", 53, Rv_ma_cntl, "12'b0001 r100 0000");
!!#
!!#   // Random data pattern
!!#   IJ_set_rvar ("diag.j", 56, Rv_rand64, "64'hrrrr rrrr rrrr rrrr");
!!#
!!#   // IO HW interrupt vector
!!#   IJ_set_rvar ("diag.j", 59, Rv_intr_vect, "18'brr 0000


glib_none().0,
                info,
                deserializable.to_glib(),
                buffer.as_ref().to_glib_none().0,
            );
        }
    }

    #[doc(alias = "gtk_target_list_add_text_targets")]
    pub fn add_text_targets(&self, info: u32) {
        unsafe {
            ffi::gtk_target_list_add_text_targets(self.to_glib_none().0, info);
        }
    }

    #[doc(alias = "gtk_target_list_add_uri_targets")]
    pub fn add_uri_targets(&self, info: u32) {
        unsafe {
            ffi::gtk_target_list_add_uri_targets(self.to_glib_none().0, info);
        }
    }

    #[doc(alias = "gtk_target_list_find")]
    pub fn find(&self, target: &gdk::Atom) -> Option<u32> {
        unsafe {
            let mut info = mem::MaybeUninit::uninit();
            let ret = from_glib(ffi::gtk_target_list_find(
                self.to_glib_none().0,
                target.to_glib_none().0,
                info.as_mut_ptr(),
            ));
            let info = info.assume_init();
            if ret {
                Some(info)
            } else {
                None
            }
        }
    }

    #[doc(alias = "gtk_target_list_remove")]
    pub fn remove(&self, target: &gdk::Atom) {
        unsafe {
            ffi::gtk_target_list_remove(self.to_glib_none().0, target.to_glib_none().0);
        }
    }
}
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// pp-exact

#![feature(custom_attribute)]
#![feature(box_syntax)]
#![feature(stmt_expr_attributes)]

fn main() { }

fn _0() {

    #[attr]
    foo();
}

fn _1() {

    #[attr]
    unsafe {
        // code
    }
}

fn _2() {

    #[attr]
    { foo(); }

    {
        #![attr]

        foo()
    }
}

fn _3() {

    #[attr]
    match () { _ => { } }
}

fn _4() {

    #[attr]
    match () {
        #![attr]
        _ => (),
    }

    let _ =
        #[attr] match () {
                    #![attr]
                    () => (),
                };
}

fn _5() {

    #[attr]
    let x = 1;

    let x = #[attr] 1;

    let y = ();
    let z = ();

    foo3(x, #[attr] y, z);

    qux(3 + #[attr] 2);
}

fn _6() {

    #[attr]
    [#![attr] 1, 2, 3];

    let _ = #[attr] [#![attr] 1, 2, 3];

    #[attr]
    [#![attr] 1; 4];

    let _ = #[attr] [#![attr] 1; 4];
}

struct Foo {
    data: (),
}

struct Bar(());

fn _7() {

    #[attr]
    Foo{#![attr] data: (),};

    let _ = #[attr] Foo{#![attr] data: (),};
}

fn _8() {


 as math;

import '../barcode_format.dart';
import '../binary_bitmap.dart';
import '../checksum_exception.dart';
import '../common/detector/math_utils.dart';
import '../decode_hint.dart';
import '../formats_exception.dart';
import '../multi/multiple_barcode_reader.dart';
import '../not_found_exception.dart';
import '../reader.dart';
import '../result.dart';
import '../result_metadata_type.dart';
import '../result_point.dart';
import 'decoder/pdf417_scanning_decoder.dart';
import 'detector/detector.dart';
import 'pdf417_common.dart';
import 'pdf417_result_metadata.dart';

/// This implementation can detect and decode PDF417 codes in an image.
///
/// @author Guenther Grau
class PDF417Reader implements Reader, MultipleBarcodeReader {
  //static const List<Result> _EMPTY_RESULT_ARRAY = [];

  /// Locates and decodes a PDF417 code in an image.
  ///
  /// @return a String representing the content encoded by the PDF417 code
  /// @throws NotFoundException if a PDF417 code cannot be found,
  /// @throws FormatException if a PDF417 cannot be decoded
  @override
  Result decode(BinaryBitmap image, [DecodeHint? hints]) {
    final result = _decodeStatic(image, hints, false);
    if (result.isEmpty) {
      // || result[0] == null
      throw NotFoundException.instance;
    }
    return result[0];
  }

  @override
  List<Result> decodeMultiple(
    BinaryBitmap image, [
    DecodeHint? hints,
  ]) {
    try {
      return _decodeStatic(image, hints, true);
    } on FormatsException catch (_) {
      throw NotFoundException.instance;
    } on ChecksumException catch (_) {
      throw NotFoundException.instance;
    }
  }

  static List<Result> _decodeStatic(
    BinaryBitmap image, [
    DecodeHint? hints,
    bool multiple = true,
  ]) {
    final results = <Result>[];
    final detectorResult = Detector.detect(image, hints, multiple);
    for (List<ResultPoint?> points in detectorResult.points) {
      final decoderResult = PDF417ScanningDecoder.decode(
        detectorResult.bits,
        points[4],
        points[5],
        points[6],
        points[7],
        _getMinCodewordWidth(points),
        _getMaxCodewordWidth(points),
      );
      final result = Result(
        decoderResult.text,
        decoderResult.rawBytes,
        points,
        BarcodeFormat.pdf417,
      );
      result.putMetadata(
        ResultMetadataType.errorCorrectionLevel,
        decoderResult.ecLevel!,
      );
      result.putMetadata(
        ResultMetadataType.errorsCorrected,
        decoderResult.errorsCorrected ?? 0,
      );
      result.putMetadata(
        ResultMetadataType.erasuresCorrected,
        decoderResult.erasures ?? 0,
      );
      final pdf417ResultMetadata = decoderResult.other as PDF417ResultMetadata?;
      if (pdf417ResultMetadata != null) {
        result.putMetadata(
          ResultMetadataType.pdf417ExtraMetadata,
          pdf417ResultMetadata,
        );
      }
      result.putMetadata(
        ResultMetadataType.orientation,
        detectorResult.rotation,
      );
      result.putMetadata(
        ResultMetadataType.symbologyIdentifier,
        ']L${decoderResult.symbologyModifier}',
      );
      results.add(result);
    }
    return results;
  }

  static int _getMaxWidth(ResultPoint? p1, ResultPoint? p2) {
    if (p1 == null || p2 == null) {
      return 0;
    }
    return (p1.x - p2.x).abs().toInt();
  }

  static int _getMinWidth(ResultPoint? p1, ResultPoint? p2) {
    if (p1 == null || p2 == null) {
      return MathUtils.maxValue; // Integer.MAX


 age) VALUES ({0:Refiner_STRING}, {1:Refiner_INT})",
      "0" to "Refiner_STRING", "1" to "Refiner_INT"
    ),
    "insert/simple/Params1" to cr(
      "INSERT INTO Person (name, age) VALUES ({0:John}, {1:42})",
      "0" to "John", "1" to "42"
    ),
    "insert/simple/Params2" to cr(
      "INSERT INTO Person (name, age) VALUES ({0:Jane}, {1:43})",
      "0" to "Jane", "1" to "43"
    ),
    "insert/simple/Params3" to cr(
      "INSERT INTO Person (name, age) VALUES ({0:Jack}, {1:44})",
      "0" to "Jack", "1" to "44"
    ),
    "insert/simple" to kt(
      "[ParamSingle(0, John, String), ParamSingle(1, 42, Int)], [ParamSingle(0, Jane, String), ParamSingle(1, 43, Int)], [ParamSingle(0, Jack, String), ParamSingle(1, 44, Int)]"
    ),
    "insert/simple with setParams/SQL" to cr(
      "INSERT INTO Person (id, name, age) VALUES ({0:Refiner_INT}, {1:Refiner_STRING}, {2:Refiner_INT})",
      "0" to "Refiner_INT", "1" to "Refiner_STRING", "2" to "Refiner_INT"
    ),
    "insert/simple with setParams" to kt(
      "[ParamSingle(0, 1, Int), ParamSingle(1, John, String), ParamSingle(2, 42, Int)], [ParamSingle(0, 2, Int), ParamSingle(1, Jane, String), ParamSingle(2, 43, Int)], [ParamSingle(0, 3, Int), ParamSingle(1, Jack, String), ParamSingle(2, 44, Int)]"
    ),
    "insert/simple with setParams and exclusion/SQL" to cr(
      "INSERT INTO Person (name, age) VALUES ({0:Refiner_STRING}, {1:Refiner_INT})",
      "0" to "Refiner_STRING", "1" to "Refiner_INT"
    ),
    "insert/simple with setParams and exclusion" to kt(
      "[ParamSingle(0, John, String), ParamSingle(1, 42, Int)], [ParamSingle(0, Jane, String), ParamSingle(1, 43, Int)], [ParamSingle(0, Jack, String), ParamSingle(1, 44, Int)]"
    ),
    "insert/with returning/SQL" to cr(
      "INSERT INTO Person (name, age) VALUES ({0:Refiner_STRING}, {1:Refiner_INT}) RETURNING id",
      "0" to "Refiner_STRING", "1" to "Refiner_INT"
    ),
    "insert/with returning" to kt(
      "[ParamSingle(0, John, String), ParamSingle(1, 42, Int)], [ParamSingle(0, Jane, String), ParamSingle(1, 43, Int)], [ParamSingle(0, Jack, String), ParamSingle(1, 44, Int)]"
    ),
    "insert/with returning/returningType" to cr(
      "ClauseInQuery"
    ),
    "insert/with returning and params/SQL" to cr(
      "INSERT INTO Person (name, age) VALUES ({0:Refiner_STRING}, {1:Refiner_INT}) RETURNING id, {2:Refiner_STRING}",
      "0" to "Refiner_STRING", "1" to "Refiner_INT", "2" to "Refiner_STRING"
    ),
    "insert/with returning and params" to kt(
      "[ParamSingle(0, John, String), ParamSingle(1, 42, Int), ParamSingle(2, John, String)], [ParamSingle(0, Jane, String), ParamSingle(1, 43, Int), ParamSingle(2, Jane, String)], [ParamSi


o
explicitly utilize complementary information when attempting to seek the
consistency of shared information across all views. Specifically, we perform a
within-reconstruction using the private and shared information of each view and
a cross-reconstruction using the shared information of all views. The dual
consistency constraints are not only effective in improving the representation
quality of data but also easy to extend to other scenarios, especially in
complex multi-view scenes. This could be the first attempt to employ dual
consistent constraint in a unified MVC theoretical framework. During the
training procedure, the consistency and complementarity features are jointly
optimized. Extensive experiments show that our method outperforms baseline
methods.

### [Not All Data Are Unlearned Equally](https://arxiv.org/abs/2504.05058)
*Aravind Krishnan,Siva Reddy,Marius Mosbach*

Task: 研究大型语言模型（LLM）中知识遗忘的效果，特别是知识在预训练数据中的频率对遗忘成功的影响。

Motivation: 现有方法对所有需要遗忘的数据点一视同仁，但实际中不同知识的遗忘难度可能不同，尤其是隐私相关数据。

  Details
Method: 分析知识在预训练数据中的频率对遗忘效果的影响，并比较基于概率和生成的评估方法。

Result: 发现高频知识更难遗忘，且模型规模增大会加剧评估方法的不一致性。

Conclusion: 需要改进评估方法并开发考虑训练数据的新型遗忘方法。

Abstract: Machine unlearning is concerned with the task of removing knowledge learned
from particular data points from a trained model. In the context of large
language models (LLMs), unlearning has recently received increased attention,
particularly for removing knowledge about named entities from models for
privacy purposes. While various approaches have been proposed to address the
unlearning problem, most existing approaches treat all data points to be
unlearned equally, i.e., unlearning that Montreal is a city in Canada is
treated exactly the same as unlearning the phone number of the first author of
this paper. In this work, we show that this all data is equal assumption does
not hold for LLM unlearning. We study how the success of unlearning depends on
the frequency of the knowledge we want to unlearn in the pre-training data of a
model and find that frequency strongly affects unlearning, i.e., more frequent
knowledge is harder to unlearn. Additionally, we uncover a misalignment between
probability and generation-based evaluations of unlearning and show that this
problem worsens as models become larger. Overall, our experiments highlight the
need for better evaluation practices and novel methods for LLM unlearning that
take the training data of models into account.

### [DeclutterNeRF: Generative-Free 3D Scene Recovery for Occlusion Removal](https://arxiv.org/abs/2504.04679)
*Wanzhou Liu,Zhexiao Xiong,Xinyu Li,Nathan Jacobs*

Task: 提出一种无需生成先验的遮挡物去除方法DeclutterNeRF，并构建包含复杂遮挡场景的数据集DeclutterSet。

Motivation: 现有遮挡物去除方法依赖生成先验，导致新伪影和模糊；且现有评估数据集缺乏真实复杂性和视角变化。

  Details
Method: DeclutterNeRF通过联合多视�


    {
                    arguments = {
                        {
                            type = 'light userdata',
                            name = 'id',
                            description = 'The identifier of the touch-press. Use love.touch.getTouches, love.touchpressed, or love.touchmoved to obtain touch id values.',
                        },
                    },
                    returns = {
                        {
                            type = 'number',
                            name = 'pressure',
                            description = 'The pressure of the touch-press. Most touch screens aren\'t pressure sensitive, in which case the pressure will be 1.',
                        },
                    },
                },
            },
        },
        {
            name = 'getTouches',
            description = 'Gets a list of all active touch-presses.',
            variants = {
                {
                    description = 'The id values are the same as those used as arguments to love.touchpressed, love.touchmoved, and love.touchreleased.\n\nThe id value of a specific touch-press is only guaranteed to be unique for the duration of that touch-press. As soon as love.touchreleased is called using that id, it may be reused for a new touch-press via love.touchpressed.',
                    returns = {
                        {
                            type = 'table',
                            name = 'touches',
                            description = 'A list of active touch-press id values, which can be used with love.touch.getPosition.',
                        },
                    },
                },
            },
        },
    },
    enums = {
    },
}


rototype_Amber",
      refinement:
        "Using an Elemental Burst regenerates **4/4,5/5/5,5/6** Energy every 2s for 6s. All party members will regenerate **4/4,5/5/5,5/6%** HP every 2s for this duration.",
    },
  ],
  [
    "mappamare",
    {
      name: "Mappa Mare",
      description:
        "A nautical chart featuring nearby currents and climates that somehow found its way into Liyue via foreign traders.",
      thumbnail:
        "https://static.wikia.nocookie.net/gensin-impact/images/4/4d/Weapon_Mappa_Mare.png/revision/latest/scale-to-width-down/256?cb=20201116034208",
      color: "RANDOM",
      category: "Catalyst",
      stars: "⭐⭐⭐⭐",
      baseAttack: "44",
      secondaryStat: "Elemental Mastery",
      secondaryStatValue: "24",
      specialAbility: "Infusion Scroll",
      moreInfo: "https://genshin-impact.fandom.com/wiki/Mappa_Mare",
      refinement:
        "Triggering an Elemental reaction grants a **8/10/12/14/16%** Elemental DMG Bonus for 10s. Max 2 stacks.",
    },
  ],
  [
    "favoniuscodex",
    {
      name: "Favonius Codex",
      description:
        "A secret tome that belonged to the scholars of the Knights of Favonius. It describes the logic and power of elements and matter.",
      thumbnail:
        "https://static.wikia.nocookie.net/gensin-impact/images/3/36/Weapon_Favonius_Codex.png/revision/latest/scale-to-width-down/256?cb=20201116033719",
      color: "RANDOM",
      category: "Catalyst",
      stars: "⭐⭐⭐⭐",
      baseAttack: "42",
      secondaryStat: "Energy Recharge",
      secondaryStatValue: "10%",
      specialAbility: "Critical Charge",
      moreInfo: "https://genshin-impact.fandom.com/wiki/Favonius_Codex",
      refinement:
        "CRIT hits have a **60/70/80/90/100%** chance to generate a small amount of Elemental Particles, which will regenerate 6 Energy for the character. Can only occur once every **12/10,5/9/7,5/6s**.",
    },
  ],
  [
    "blackcliffagate",
    {
      name: "Blackcliff Agate",
      description:
        "A mysterious catalyst made of blackstone. It has an ominous crimson glow that seems to pulse in synchronization with the tremors from deep within the earth.",
      thumbnail:
        "https://static.wikia.nocookie.net/gensin-impact/images/a/a6/Weapon_Blackcliff_Agate.png/revision/latest/scale-to-width-down/256?cb=20201119233950",
      color: "RANDOM",
      category: "Catalyst",
      stars: "⭐⭐⭐⭐",
      baseAttack: "42",
      secondaryStat: "CRIT DMG",
      secondaryStatValue: "12%",
      specialAbility: "Press the Advantage",
      moreInfo: "https://genshin-impact.fandom.com/wiki/Blackcliff_Agate",
      refinement:
        "After defeating an opponent, ATK is increased by **12/15/18/21/24%** for 30s. This effect has a maximum of 3 stacks, and the duration of each stack is independent of the others.",
    },
  ],
  [
    "lostprayertothesacredwinds",
    {
      name: "Lost Prayer to the Sacred Winds",


/*---------------------------------------------------------*\
| RGBController_XG270QG.h                                   |
|                                                           |
|   RGBController for ViewSonic XG270QG                     |
|                                                           |
|   Lanzaa                                      23 Jan 2022 |
|                                                           |
|   This file is part of the OpenRGB project                |
|   SPDX-License-Identifier: GPL-2.0-or-later               |
\*---------------------------------------------------------*/

#pragma once

#include "VS_XG270QG_Controller.h"
#include "RGBController.h"

class RGBController_XG270QG : public RGBController
{
public:
    RGBController_XG270QG(VS_XG270QG_Controller* controller_ptr);

    void SetupZones();
    void ResizeZone(int zone, int new_size);

    void DeviceUpdateLEDs();
    void UpdateZoneLEDs(int zone);
    void UpdateSingleLED(int led);

    void DeviceUpdateMode();

private:
    VS_XG270QG_Controller* controller;
};


ublic License for more details.

    You should have received a copy of the GNU General Public License
    along with dnSpy.  If not, see <http://www.gnu.org/licenses/>.
*/

using dnSpy.Contracts.Settings.Groups;
using dnSpy.Text.Settings;
using Microsoft.VisualStudio.Utilities;

namespace dnSpy.Documents.Tabs.DocViewer.Settings {
	sealed class DocumentViewerOptions : CommonEditorOptions, IDocumentViewerOptions {
		public DocumentViewerOptions(ITextViewOptionsGroup group, IContentType contentType)
			: base(group, contentType) {
		}
	}
}


hardIdAdds;
            shardIdAdds = reader.GetSqlGuid(offset + 5);
            this.OriginalShardVersionAdds = shardIdAdds.IsNull ? default(Guid) : shardIdAdds.Value;
        }

        /// <summary>
        /// Identity of operation.
        /// </summary>
        public Guid Id
        {
            get;
            private set;
        }

        /// <summary>
        /// Operation code. Helps in deserialization during factory method.
        /// </summary>
        public StoreOperationCode OpCode
        {
            get;
            private set;
        }

        /// <summary>
        /// Serialized representation of the operation.
        /// </summary>
        public SqlXml Data
        {
            get;
            private set;
        }

        /// <summary>
        /// State from which Undo will start.
        /// </summary>
        public StoreOperationState UndoStartState
        {
            get;
            private set;
        }

        /// <summary>
        /// Original shard version for remove steps.
        /// </summary>
        public Guid OriginalShardVersionRemoves
        {
            get;
            private set;
        }

        /// <summary>
        /// Original shard version for add steps.
        /// </summary>
        public Guid OriginalShardVersionAdds
        {
            get;
            private set;
        }
    }
}


}
  /** Removes all the elements in the set. */
  clear() {
    this.m_kvMap!.clear();
    super.clear();
  }
  /**
   * Removes an item from the set if found.
   * Only used if a custom key derivation function was set in the constructor.
   * @param {T} value The item to remove.
   * @return {boolean} True if the set was modified, false otherwise.
   */
  delete(value: T) {
    const kv = this.m_kv!(value);
    if (this.m_kvMap!.has(kv)) {
      const item = this.m_kvMap!.get(kv)!;
      this.m_kvMap!.delete(kv);
      return super.delete(item);
    }
    return false;
  }
  /**
   * Check if an item is in the set.
   * Only used if a custom key derivation function was set in the constructor.
   * @param {T} value The item to check.
   * @return {boolean} True if the value was found, false otherwise.
   */
  has(value: T) {
    return this.m_kvMap!.has(this.m_kv!(value));
  }
  /**
   * Called automatically by JSON.stringify
   * @return {T[]} An array of elements.
   */
  toJSON(): T[] {
    return [...this.values()];
  }
  /**
   * Creates a new set instance from the array returned by JSON.parse.
   * If no parser is specified, this method returns `new KeyDerivationSet<T>(iterable, kd)`
   * @param {Iterable<any>} iterable Items to add to the set.
   * @param {(item: T) => number | string} [options.keyDerivation] Function to create a key value that can be used to identify it.
   * @param {(item: any) => T} [options.parser] Function to use as parser for the items.
   * @return {KeyDerivationSet<T>} The set loaded with the values parsed from the array.
   */
  static fromJSON<T>(iterable: Iterable<any>, options?: { keyDerivation?: KeyDerivation<T>, parser?: Parser<T> }): KeyDerivationSet<T> {
    options = options || {};
    if (!options.parser)
      return new KeyDerivationSet<T>(iterable, options.keyDerivation);
    const set = new KeyDerivationSet<T>(options.keyDerivation);
    for (let item of iterable)
      set.add(options.parser(item));
    return set;
  }
}
import GameComponent from "./GameComponent";
import Mesh from "../rendering/Mesh";
import Material from "../rendering/Material";
import { RenderMode } from "../core/Display";
import RenderingEngine from "../rendering/RenderingEngine";
import Shader from "../rendering/Shader";

export default class MeshRenderer extends GameComponent {
    private m_mesh: Mesh;
    private m_material: Material;

    constructor(mesh: Mesh, material:Material) {
        super();
        this.m_mesh = mesh;
        this.m_material = material;

        const program:WebGLProgram | null = this.m_material.getShader().getProgram();
        if(!program) {
            throw new Error("Error get shader program");
        }
        this.m_mesh.init(program);
    }

    // private init(): void {

    //     console.log("init2")
    // }

    // @Override
    public render(shader:Shader, renderingEngine: RenderingEngine): void {

        super.render(shader, renderingEngine);

        this.m_material.getShader().update(this.getTransform(), this.m_material, renderingEngine)

        // this.m_shader.bind();
        // this.m_shader.updateUniforms(this.getTransform(), this.m_material, renderingEngine);
        // this.m_sha


'''OUTPUT for 4 rows:
1111
 222
  33
   4'''
row_size = int(input("Enter row size:"))
value = 1
for i in range(row_size,0,-1):
    for j in range(row_size-i):
        print(" ",end="")
    for k in range(i):
        print(value,end="")
    value = value+1
    print("")

i = row_size
val = 1
while i > 0:
    j = 0
    k = 0
    while j < row_size-i:
        print(" ",end="")
        j = j+1
    while k < i:
        print(val,end="")
        k = k+1
    val = val+1
    print("")
    i = i-1


2] == 0) then
                d:append(v[1]);
            elseif (v[2] == 1) then
                j:append(v[1]);
            elseif (v[2] == 2) then
                i:append(v[1]);
            end
        end

        print(chat.header(addon.name):append(chat.message('Auto-join will decline invites from the following players:')));
        print(chat.header(addon.name):append(chat.color1(5, d:join(', '))));
        print(chat.header(addon.name):append(chat.message('Auto-join will accept invites from the following players:')));
        print(chat.header(addon.name):append(chat.color1(5, j:join(', '))));
        print(chat.header(addon.name):append(chat.message('Auto-join will ignore invites from the following players:')));
        print(chat.header(addon.name):append(chat.color1(5, i:join(', '))));
        return;
    end

    -- Handle: /autojoin add (decline|join|ignore) <name> - Adds a player name to the given list.
    if (#args == 4 and args[2]:any('add')) then
        if (not args[3]:any('decline', 'join', 'ignore')) then
            print_help(true);
            return;
        end

        -- Checks if a given autojoin user list contains a given player name..
        local function has_user(n, m)
            for _, v in pairs(autojoin.users) do
                if (v[1]:lower() == n:lower() and v[2] == m) then
                    return true;
                end
            end
            return false;
        end

        local m = -1;
        local n = T{ 'decline', 'join', 'ignore', };

        switch(args[3], {
            ['decline'] = function () m = 0; end,
            ['join'] = function () m = 1; end,
            ['ignore'] = function () m = 2; end,
        });

        if (m == -1) then
            print(chat.header(addon.name):append(chat.error('Invalid add table given. Expected one of: ')):append(chat.message('decline, join, ignore')));
            return;
        end

        -- Check if the user is already being handled..
        if (has_user(args[4], m)) then
            print(chat.header(addon.name):append(chat.message(('Player already exists in the %s list.'):fmt(n[m + 1]))));
            return;
        end

        -- Update the settings and rebuild the user list..
        autojoin.settings[n[m + 1]]:append(args[4]);
        settings.save();
        build_users();

        print(chat.header(addon.name) + chat.message('Added \'') + chat.success(args[4]) + chat.message('\' ') + chat.message(('to the %s list.'):fmt(n[m + 1])));
        return;
    end

    -- Handle: /autojoin (del|delete|remove) (decline|join|ignore) <name> - Removes a player name from the given list.
    if (#args == 4 and args[2]:any('del', 'delete', 'remove')) then
        if (not args[3]:any('decline', 'join', 'ignore')) then
            print_help(true);
            return;
        end

        -- Checks if a given autojoin user list contains a given playe


.Association }

func (a tagListHasOneTagTx) Find() (result *dao.TagIndex, err error) {
	return result, a.tx.Find(&result)
}

func (a tagListHasOneTagTx) Append(values ...*dao.TagIndex) (err error) {
	targetValues := make([]interface{}, len(values))
	for i, v := range values {
		targetValues[i] = v
	}
	return a.tx.Append(targetValues...)
}

func (a tagListHasOneTagTx) Replace(values ...*dao.TagIndex) (err error) {
	targetValues := make([]interface{}, len(values))
	for i, v := range values {
		targetValues[i] = v
	}
	return a.tx.Replace(targetValues...)
}

func (a tagListHasOneTagTx) Delete(values ...*dao.TagIndex) (err error) {
	targetValues := make([]interface{}, len(values))
	for i, v := range values {
		targetValues[i] = v
	}
	return a.tx.Delete(targetValues...)
}

func (a tagListHasOneTagTx) Clear() error {
	return a.tx.Clear()
}

func (a tagListHasOneTagTx) Count() int64 {
	return a.tx.Count()
}

func (a tagListHasOneTagTx) Unscoped() *tagListHasOneTagTx {
	a.tx = a.tx.Unscoped()
	return &a
}

type tagListDo struct{ gen.DO }

func (t tagListDo) Debug() *tagListDo {
	return t.withDO(t.DO.Debug())
}

func (t tagListDo) WithContext(ctx context.Context) *tagListDo {
	return t.withDO(t.DO.WithContext(ctx))
}

func (t tagListDo) ReadDB() *tagListDo {
	return t.Clauses(dbresolver.Read)
}

func (t tagListDo) WriteDB() *tagListDo {
	return t.Clauses(dbresolver.Write)
}

func (t tagListDo) Session(config *gorm.Session) *tagListDo {
	return t.withDO(t.DO.Session(config))
}

func (t tagListDo) Clauses(conds ...clause.Expression) *tagListDo {
	return t.withDO(t.DO.Clauses(conds...))
}

func (t tagListDo) Returning(value interface{}, columns ...string) *tagListDo {
	return t.withDO(t.DO.Returning(value, columns...))
}

func (t tagListDo) Not(conds ...gen.Condition) *tagListDo {
	return t.withDO(t.DO.Not(conds...))
}

func (t tagListDo) Or(conds ...gen.Condition) *tagListDo {
	return t.withDO(t.DO.Or(conds...))
}

func (t tagListDo) Select(conds ...field.Expr) *tagListDo {
	return t.withDO(t.DO.Select(conds...))
}

func (t tagListDo) Where(conds ...gen.Condition) *tagListDo {
	return t.withDO(t.DO.Where(conds...))
}

func (t tagListDo) Order(conds ...field.Expr) *tagListDo {
	return t.withDO(t.DO.Order(conds...))
}

func (t tagListDo) Distinct(cols ...field.Expr) *tagListDo {
	return t.withDO(t.DO.Distinct(cols...))
}

func (t tagListDo) Omit(cols ...field.Expr) *tagListDo {
	return t.withDO(t.DO.Omit(cols...))
}

func (t tagListDo) Join(table schema.Tabler, on ...field.Expr) *tagListDo {
	return t.withDO(t.DO.


IRMATION", Value: 39},
	{Name: "X25_REGISTRATION_CONFIRMATION", Value: 247},
	{Name: "X25_REGISTRATION_REQUEST", Value: 243},
	{Name: "X25_REJ", Value: 9},
	{Name: "X25_RESET_CONFIRMATION", Value: 31},
	{Name: "X25_RESET_REQUEST", Value: 27},
	{Name: "X25_RESTART_CONFIRMATION", Value: 255},
	{Name: "X25_RESTART_REQUEST", Value: 251},
	{Name: "X25_RNR", Value: 5},
	{Name: "X25_RR", Value: 1},
	{Name: "XATTR_CREATE", Value: 1},
	{Name: "XATTR_REPLACE", Value: 2},
	{Name: "XDP_COPY", Value: 2},
	{Name: "XDP_MMAP_OFFSETS", Value: 1},
	{Name: "XDP_MMAP_OFFSETS_SIZE", Value: 96},
	{Name: "XDP_PGOFF_RX_RING"},
	{Name: "XDP_PGOFF_TX_RING", Value: 2147483648},
	{Name: "XDP_RX_RING", Value: 2},
	{Name: "XDP_SHARED_UMEM", Value: 1},
	{Name: "XDP_STATISTICS", Value: 7},
	{Name: "XDP_STATISTICS_SIZE", Value: 24},
	{Name: "XDP_TX_RING", Value: 3},
	{Name: "XDP_UMEM_COMPLETION_RING", Value: 6},
	{Name: "XDP_UMEM_FILL_RING", Value: 5},
	{Name: "XDP_UMEM_PGOFF_COMPLETION_RING", Value: 6442450944},
	{Name: "XDP_UMEM_PGOFF_FILL_RING", Value: 4294967296},
	{Name: "XDP_UMEM_REG", Value: 4},
	{Name: "XDP_ZEROCOPY", Value: 4},
	{Name: "XFRMA_ADDRESS_FILTER", Value: 26},
	{Name: "XFRMA_ALG_AEAD", Value: 18},
	{Name: "XFRMA_ALG_AUTH", Value: 1},
	{Name: "XFRMA_ALG_AUTH_TRUNC", Value: 20},
	{Name: "XFRMA_ALG_COMP", Value: 3},
	{Name: "XFRMA_ALG_CRYPT", Value: 2},
	{Name: "XFRMA_COADDR", Value: 14},
	{Name: "XFRMA_ENCAP", Value: 4},
	{Name: "XFRMA_ETIMER_THRESH", Value: 12},
	{Name: "XFRMA_KMADDRESS", Value: 19},
	{Name: "XFRMA_LASTUSED", Value: 15},
	{Name: "XFRMA_LTIME_VAL", Value: 9},
	{Name: "XFRMA_MARK", Value: 21},
	{Name: "XFRMA_MIGRATE", Value: 17},
	{Name: "XFRMA_OFFLOAD_DEV", Value: 28},
	{Name: "XFRMA_OUTPUT_MARK", Value: 29},
	{Name: "XFRMA_POLICY", Value: 7},
	{Name: "XFRMA_POLICY_TYPE", Value: 16},
	{Name: "XFRMA_PROTO", Value: 25},
	{Name: "XFRMA_REPLAY_ESN_VAL", Value: 23},
	{Name: "XFRMA_REPLAY_THRESH", Value: 11},
	{Name: "XFRMA_REPLAY_VAL", Value: 10},
	{Name: "XFRMA_SA", Value: 6},
	{Name


了(其实就是 kafka 自己的 delete 策略，只不过我们只删除有问题的分区)。删除 – 重启 — 等待，不能消费的 consumer 终于又都开始消费了，终于松了一口气，睡觉。

躺在床上，越想越不对劲啊。__consumer_offsets 是用来干什么的呢，是用来保存消费进度的，那么这个__consumer_offsets 里的内容应该类似：

为了简化，上图只是显示了一个 topic(t1)，一个 consumer group(g1) 消费一个 partition(p1) 的消费进度(最后的数字是消费进度，即 offset )，其实这个__consumer_offsets 里包含很多各种 topic ，各种 consumer_group 消费各种 partition 的消费进度。

那么对于消费进度来讲，其实只有最新的进度才有意义的，比如我现在已经消费到了100，那么之前的10其实是没有意义的。在上面的例子中，t1 g1 p1出现了三次，那其实只有第三条才有意义。 那么就很奇怪了，__consumer_offsets 的策略是 compact ，经过 compact 后，__consumer_offsets 应该非常小才对，觉得最多也就几十兆吧，为什么我们的__consumer_offsets 每个都有200多G?

看来是 compact 没生效啊，看了下代码发现是有专门的 compact 线程，打一个 jstack ，然后发现压根儿就没对应的线程啊，看来是 compact 线程挂掉了。看看 log clean 的日志，发现输出这样的日志： nnn messages in segment __consumer_offsets/0000000000000.log but offset map can fit only mmmmm. You can increase log.cleaner.dedupe.buffer.size or decrease log.cleaner.threads。

这又是什么鬼呢？看了下代码发现 Kafka 的 compact 的原理是在内存里有一个 map(OffsetMap) ，然后读取一条消息，用一个哈希算法(比如md5)计算这条消息 key 的值，然后插入到 map 里，这个 map 的 value 就是消息的 offset ，这样用大的 offset 替换掉小的，这样就达到去重的效果了。这里有两个参数：log.cleaner.dedupe.buffer.size 和log.cleaner.threads 。

前一个参数就是你能总共用多少内存来做去重这件事情

第二个参数是你用几个线程来做。

注意前一个参数是总内存，如果


, r0]
	bl      Function_2002114
	mov     r1, #0x0
	mvn     r1, r1
	cmp     r0, r1
	beq     branch_2245018
	.hword  0x1e49 @ sub r1, r1, #0x1
	cmp     r0, r1
	bne     branch_2244ff6
	bl      Function_203848c
	mov     r1, #0x0
	mov     r0, r4
	mov     r2, r1
	bl      Function_223c4c0
	mov     r0, #0xb
	str     r0, [r4, #0x2c]
	b       branch_2245018
@ 0x2244ff6

.thumb
branch_2244ff6: @ 2244ff6 :thumb
	ldr     r0, [pc, #0x2c] @ 0x2245024, (=0xf0f)
	ldr     r1, [pc, #0x2c] @ 0x2245028, (=0xb9c)
	str     r0, [sp, #0x0]
	mov     r2, #0x1
	ldr     r1, [r4, r1]
	mov     r0, r4
	mov     r3, r2
	bl      Function_2245824
	mov     r0, r4
	mov     r1, #0xc
	mov     r2, #0x2
	bl      Function_223c3f4
	mov     r0, r4
	bl      Function_223c5d8
.thumb
branch_2245018: @ 2245018 :thumb
	mov     r0, #0x3
	add     sp, #0x4
	pop     {r3,r4,pc}
@ 0x224501e

.align 2

.word 0x1070 @ 0x2245020
.word 0xf0f @ 0x2245024
.word 0xb9c @ 0x2245028
.thumb
Function_224502c: @ 224502c :thumb
	push    {r3,r4,lr}
	add     sp, #-0x4
	ldr     r1, [pc, #0x20] @ 0x2245054, (=0xf0f)
	mov     r4, r0
	str     r1, [sp, #0x0]
	ldr     r1, [pc, #0x20] @ 0x2245058, (=0xb94)
	mov     r2, #0x7
	ldr     r1, [r4, r1]
	mov     r3, #0x1
	bl      Function_2245824
	mov     r0, r4
	mov     r1, #0xd
	mov     r2, #0x10
	bl      Function_223c3f4
	mov     r0, #0x3
	add     sp, #0x4
	pop     {r3,r4,pc}
@ 0x2245052

.align 2

.word 0xf0f @ 0x2245054
.word 0xb94 @ 0x2245058
.thumb
Function_224505c: @ 224505c :thumb
	push    {r4,lr}
	mov     r4, r0
	ldr     r0, [pc, #0x58] @ 0x22450bc, (=0x1070)
	mov     r1, #0x3e
	ldr     r0, [r4, r0]
	bl      Function_2002114
	mov     r1, #0x0
	mvn     r1, r1
	cmp     r0, r1
	beq     branch_22450b8
	.hword  0x1e49 @ sub r1, r1, #0x1
	cmp     r0, r1
	bne     branch_224509a
	blx     Function_4_21d7a8c


func, vids[0], verbose),
                FmtVid(func, vids[1], verbose)
            )?;
        }
        Hhbc::NewStructDict(ref keys, ref values, _) => {
            write!(
                w,
                "new_struct_dict [{}]",
                FmtCommaSep::new(keys.iter().zip(values.iter()), |w, (k, v)| {
                    write!(
                        w,
                        "{} => {}",
                        FmtQuotedStringId(*k, ctx.strings),
                        FmtVid(func, *v, verbose)
                    )
                })
            )?;
        }
        Hhbc::NewVec(ref vids, _) => {
            write!(
                w,
                "new_vec [{}]",
                FmtCommaSep::new(vids.iter(), |w, vid| FmtVid(func, *vid, verbose).fmt(w))
            )?;
        }
        Hhbc::Not(vid, _) => write!(w, "not {}", FmtVid(func, vid, ctx.verbose))?,
        Hhbc::OODeclExists(vids, op, _) => {
            let kind = match op {
                OODeclExistsOp::Class => "class",
                OODeclExistsOp::Interface => "interface",
                OODeclExistsOp::Trait => "trait",
                _ => unreachable!(),
            };
            write!(
                w,
                "oo_decl_exists {}, {} {}",
                FmtVid(func, vids[0], verbose),
                FmtVid(func, vids[1], verbose),
                kind
            )?;
        }
        Hhbc::ParentCls(_) => {
            write!(w, "parent")?;
        }
        Hhbc::Print(vid, _) => write!(w, "print {}", FmtVid(func, vid, ctx.verbose))?,
        Hhbc::ResolveClsMethodD(clsid, method, _) => {
            write!(
                w,
                "resolve_cls_method_d {}::{}",
                FmtIdentifierId(clsid.id, ctx.strings),
                FmtIdentifierId(method.id, ctx.strings),
            )?;
        }
        Hhbc::ResolveClsMethodS(clsref, method, _) => {
            write!(
                w,
                "resolve_cls_method_s {}::{}",
                FmtSpecialClsRef(clsref),
                FmtIdentifierId(method.id, ctx.strings),
            )?;
        }
        Hhbc::ResolveFunc(func, _) => {
            write!(w, "resolve_func {}", FmtIdentifierId(func.id, ctx.strings))?;
        }
        Hhbc::ResolveMethCaller(func, _) => {
            write!(
                w,
                "resolve_meth_caller {}",
                FmtIdentifierId(func.id, ctx.strings)
            )?;
        }
        Hhbc::SelfCls(_) => {
            write!(w, "self")?;
        }
        Hhbc::SetG([target, value], _) => {
            write!(
                w,
                "set_global {}, {}",
                FmtVid(func, target, verbose),
                FmtVid(func, value, verbose),
            )?;
        }
        Hhbc::SetImplicitContextByValue(vid, _) => {
            write!(
                w,
                "set_implicit_context_by_value {}",
                FmtVid(func, vid, verbose)
            )?;
        }
        Hhbc::SetL(vid, lid, _) => {
            write!(
                w,
                "set_local {}, {}",
                FmtLid(lid, ctx.s