			location.X = (screen.Left + screen.Width) - Size.Width;
			}

			if (location.Y + Size.Height > (screen.Top + screen.Height))
			{
				_resizableTop = true;
				location.Y -= Size.Height + area.Height;
			}

			location = control.PointToClient(location);
			Show(control, location, ToolStripDropDownDirection.BelowRight);
		}

		private const int Frames = 1;
		private const int Totalduration = 0; // ML : 2007-11-05 : was 100 but caused a flicker.
		private const int Frameduration = Totalduration / Frames;

		protected override void SetVisibleCore(bool visible)
		{
			var opacity = Opacity;
			if (visible && UseFadeEffect && FocusOnOpen) Opacity = 0;
			base.SetVisibleCore(visible);
			if (!visible || !UseFadeEffect || !FocusOnOpen) return;
			for (var i = 1; i <= Frames; i++)
			{
				if (i > 1)
				{
					System.Threading.Thread.Sleep(Frameduration);
				}

				Opacity = opacity * i / Frames;
			}

			Opacity = opacity;
		}

		private bool _resizableTop;
		private bool _resizableRight;

		private void SetOwnerItem(Control control)
		{
			if (control == null)
				return;

			var popup = control as Popup;
			if (popup != null)
			{
				_ownerPopup = popup;
				_ownerPopup._childPopup = this;
				OwnerItem = popup.Items[0];
				return;
			}

			if (control.Parent != null)
				SetOwnerItem(control.Parent);
		}

		protected override void OnSizeChanged(EventArgs e)
		{
			Content.MinimumSize = Size;
			Content.MaximumSize = Size;
			Content.Size = Size;
			Content.Location = Point.Empty;
			base.OnSizeChanged(e);
		}

		protected override void OnOpening(CancelEventArgs e)
		{
			if (Content.IsDisposed || Content.Disposing)
			{
				e.Cancel = true;
				return;
			}

			UpdateRegion();
			base.OnOpening(e);
		}

		protected override void OnOpened(EventArgs e)
		{
			if (_ownerPopup != null)
			{
				_ownerPopup._allowResizable = false;
			}

			if (FocusOnOpen)
			{
				Content.Focus();
			}

			base.OnOpened(e);
		}

		protected override void OnClosed(ToolStripDropDownClosedEventArgs e)
		{
			if (_ownerPopup != null)
			{
				_ownerPopup._allowResizable = true;
			}

			base.OnClosed(e);
		}

		public DateTime LastClosedTimeStamp = DateTime.Now;

		protected override void OnVisibleChanged(EventArgs e)
		{
			if (Visible == false)
				LastClosedTimeStamp = DateTime.Now;
			base.OnVisibleChanged(e);
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		protected override void WndProc(ref Message m)
		{
			if (InternalProcessResizing(ref m, false))
				return;

			base.WndProc(ref m);
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		public bool ProcessResizing(ref Message m)
		{
			return InternalProcessResizing(ref m, true);
		}

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		private bool InternalProcessResizing(ref Message m, bool contentControl)
		{
			if (m.Msg == NativeMethods.WM_NCACTIVATE && m.WParam != IntPtr.Zero && _childPopup != null && _childPopup.Visible)
			{
				_childPopup.Hide();
			}

			if (!Resizable)
			{
				return false;
			}

			switch (m.Msg)
			{
				case NativeMethods.WM


ire_banned_before_time := uint32(now.Add(-ExpireBannedPeerAfter).Unix())
		recs := make(manyPeers, PeerDB.Count())
		var i, c_dead1, c_dead2, c_seen_alive, c_banned int
		PeerDB.Browse(func(k qdb.KeyType, v []byte) uint32 {
			if i >= len(recs) {
				println("ERROR: PeersDB grew since we checked its size. Please report!")
				return 0
			}
			recs[i] = NewPeer(v)
			i++
			return 0
		})
		if i < len(recs) {
			println("ERROR: PeersDB shrunk since we checked its size. Please report!")
			recs = recs[:i]
		}
		sort.Sort(recs)
		for i = len(recs) - 1; i > MinPeersInDB; i-- {
			var delit bool
			rec := recs[i]
			if !rec.SeenAlive {
				if PeerDB.Count() > MaxPeersInDB-MaxPeersDeviation {
					// if DB is full, we delete all the oldest never-alive records
					delit = true
					c_dead1++
				} else {
					// otherwise we only delete those older than 24 hours (ExpireDeadPeerAfter)
					if rec.Time < expire_dead_before_time {
						delit = true
						c_dead2++
					} else {
						break
					}
				}
			} else if rec.Time < expire_alive_before_time {
				if rec.Banned == 0 {
					delit = true
					c_seen_alive++
				} else if rec.Banned < expire_banned_before_time {
					delit = true
					c_banned++
				}
			}
			if delit {
				PeerDB.Del(qdb.KeyType(rec.UniqID()))
				if PeerDB.Count() <= MinPeersInDB {
					break
				}
			}
		}
		common.CounterMutex.Lock()
		if c_dead1 > 0 {
			common.CountAdd("PeersExpiredDead1", uint64(c_dead1))
		}
		if c_dead2 > 0 {
			common.CountAdd("PeersExpiredDead2", uint64(c_dead2))
		}
		if c_seen_alive > 0 {
			common.CountAdd("PeersExpiredAlive", uint64(c_seen_alive))
		}
		if c_banned > 0 {
			common.CountAdd("PeersExpiredBanned", uint64(c_banned))
		}
		common.CounterMutex.Unlock()
		PeerDB.Defrag(false)
	} else {
		common.CountSafe("PeersExpireNone")
	}
}

func (p *PeerAddr) Save() {
	if p.Banned > p.Time {
		p.lastSaved = int64(p.Banned)
	} else {
		p.lastSaved = int64(p.Time)
	}
	peerdb_mutex.Lock()
	PeerDB.Put(qdb.KeyType(p.UniqID()), p.Bytes())
	//PeerDB.Sync()
	peerdb_mutex.Unlock()
}

func (p *PeerAddr) Ban(reason string) {
	now := time.Now().Unix()
	p.Banned = uint32(now)
	if p.Banned == 0 || p.BanReason == "" && reason != "" || now-p.lastSaved >= 60 {
		p.BanReason = reason
		p.Save()
	}
}

func (p *PeerAddr) Alive() {
	now := time.Now().Unix()
	p.Time = uint32(now)


NNEL_WRITE: usize = 502;

mod fs;
mod process;

use fs::*;
use process::*;

pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize {
    match syscall_id {
        SYSCALL_CLOSE => sys_close(args[0]),
        SYSCALL_READ => sys_read(args[0], args[1] as *const u8, args[2]),
        SYSCALL_WRITE => sys_write(args[0], args[1] as *const u8, args[2]),
        SYSCALL_EXIT => sys_exit(args[0] as i32),
        SYSCALL_YIELD => sys_yield(),
        SYSCALL_GET_TIME => sys_get_time(),
        SYSCALL_MMAP => sys_mmap(args[0], args[1], args[2]),
        SYSCALL_MUNMAP => sys_munmap(args[0], args[1]),
        SYSCALL_GETPID => sys_getpid(),
        SYSCALL_FORK => sys_fork(),
        SYSCALL_EXEC => sys_exec(args[0] as *const u8),
        SYSCALL_WAITPID => sys_waitpid(args[0] as isize, args[1] as *mut i32),
        SYSCALL_CREATE_TASK => sys_create_task(args[0] as *const u8),
        SYSCALL_MMAP_CREATE => sys_mmap_create(args[0], args[1]),
        SYSCALL_CHANNEL_READ => sys_channel_read(args[0] as *mut u8, args[1]),
        SYSCALL_CHANNEL_WRITE => sys_channel_write(args[0] as *const u8, args[1] as *const u8, args[2]),
        SYSCALL_SERVICE_REGISTER => sys_register(args[0] as *const u8, args[1] as *const u8),
        _ => panic!("Unsupported syscall_id: {}", syscall_id),
    }
}
use anyhow::{ensure, Error};
use std::{
    env,
    io::Write,
    process::{Command, Stdio},
    str::from_utf8,
};

fn have_check_lrat() -> Result<(), Error> {
    println!("rerun-if-env-changed=VARISAT_HAVE_CHECK_LRAT");
    if env::var("VARISAT_HAVE_CHECK_LRAT").is_ok() {
        return Ok(());
    }

    let mut child = Command::new("check-lrat")
        .stdin(Stdio::piped())
        .stdout(Stdio::piped())
        .spawn()?;
    let stdin = child.stdin.as_mut().unwrap();
    stdin.write_all(b":pc lrat-check\n")?;

    let output = child.wait_with_output()?;
    let stdout = from_utf8(&output.stdout)?;

    ensure!(
        stdout.contains("INCLUDE-BOOK \"projects/sat/lrat/stobj-based/run\""),
        "stobj-based lrat-check not found"
    );

    Ok(())
}

fn have_check_clrat() -> Result<(), Error> {
    println!("rerun-if-env-changed=VARISAT_HAVE_CHECK_LRAT");
    if env::var("VARISAT_HAVE_CHECK_LRAT").is_ok() {
        return Ok(());
    }

    let mut child = Command::new("check-clrat")
        .stdin(Stdio::piped())
        .stdout(Stdio::piped())
        .spawn()?;
    let stdin = child.stdin.as_mut().unwrap();
    stdin.write_all(b":pc lrat-check\n")?;

    let output = child.wait_with_output()?;
    let stdout = from_utf8(&output.stdout)?;

    ensure!(
        stdout.contains("


tainer.Height / BlazorDiagram.Zoom;

        var minX = _vX;
        var minY = _vY;
        var maxX = _vX + _vWidth;
        var maxY = _vY + _vHeight;

        foreach (var node in BlazorDiagram.Nodes.Union(BlazorDiagram.Groups))
        {
            if (node.Size == null)
                continue;

            minX = Math.Min(minX, node.Position.X);
            minY = Math.Min(minY, node.Position.Y);
            maxX = Math.Max(maxX, node.Position.X + node.Size.Width);
            maxY = Math.Max(maxY, node.Position.Y + node.Size.Height);
        }

        var width = maxX - minX;
        var height = maxY - minY;
        var scaledWidth = width / Width;
        var scaledHeight = height / Height;
        var scale = Math.Max(scaledWidth, scaledHeight);
        var viewWidth = scale * Width;
        var viewHeight = scale * Height;

        _scaledMargin = Margin * scale;
        _x = minX - (viewWidth - width) / 2 - _scaledMargin;
        _y = minY - (viewHeight - height) / 2 - _scaledMargin;
        _width = viewWidth + _scaledMargin * 2;
        _height = viewHeight + _scaledMargin * 2;
        InvokeAsync(StateHasChanged);
    }

    private RenderFragment GetNodeRenderFragment(NodeModel node)
    {
        return builder =>
        {
            if (UseNodeShape)
            {
                var shape = node.GetShape();
                if (shape is Ellipse ellipse)
                {
                    RenderEllipse(node, builder, ellipse);
                    return;
                }
            }

            RenderRect(node, builder);
        };
    }

    private void RenderRect(NodeModel node, RenderTreeBuilder builder)
    {
        builder.OpenElement(0, "rect");
        builder.SetKey(node);
        builder.AddAttribute(1, "class", "navigator-node");
        builder.AddAttribute(2, "fill", NodeColor);
        builder.AddAttribute(2, "x", node.Position.X.ToInvariantString());
        builder.AddAttribute(2, "y", node.Position.Y.ToInvariantString());
        builder.AddAttribute(2, "width", node.Size!.Width.ToInvariantString());
        builder.AddAttribute(2, "height", node.Size.Height.ToInvariantString());
        builder.CloseElement();
    }

    private void RenderEllipse(NodeModel node, RenderTreeBuilder builder, Ellipse ellipse)
    {
        builder.OpenElement(0, "ellipse");
        builder.SetKey(node);
        builder.AddAttribute(1, "class", "navigator-node");
        builder.AddAttribute(2, "fill", NodeColor);
        builder.AddAttribute(2, "cx", ellipse.Cx.ToInvariantString());
        builder.AddAttribute(2, "cy", ellipse.Cy.ToInvariantString());
        builder.AddAttribute(2, "rx", ellipse.Rx.ToInvariantString());
        builder.AddAttribute(2, "ry", ellipse.Ry.ToInvariantString());
        builder.CloseElement();
    }
}


Convertible(
    ToDict[ToDictDT_co],
    FromDict[FromDictDT_contra],
    Protocol[ToDictDT_co, FromDictDT_contra],
): ...

IntoArrowTable: TypeAlias = "ArrowStreamExportable | pa.Table"
"""An object supporting the [Arrow PyCapsule Interface], or a native [`pyarrow.Table`].

[Arrow PyCapsule Interface]: https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html#arrowstream-export
[`pyarrow.Table`]: https://arrow.apache.org/docs/python/generated/pyarrow.Table.html
"""
ToArrowT_co = TypeVar("ToArrowT_co", covariant=True)
FromArrowDT_contra = TypeVar(
    "FromArrowDT_contra", contravariant=True, default=IntoArrowTable
)

class ToArrow(Protocol[ToArrowT_co]):
    def to_arrow(self, *args: Any, **kwds: Any) -> ToArrowT_co: ...

class FromArrow(Protocol[FromArrowDT_contra]):
    @classmethod
    def from_arrow(cls, data: FromArrowDT_contra, *args: Any, **kwds: Any) -> Self: ...

class ArrowConvertible(
    ToArrow[ToArrowT_co],
    FromArrow[FromArrowDT_contra],
    Protocol[ToArrowT_co, FromArrowDT_contra],
): ...

FromNativeT = TypeVar("FromNativeT")

class FromNative(Protocol[FromNativeT]):
    @classmethod
    def from_native(cls, data: FromNativeT, *args: Any, **kwds: Any) -> Self: ...
    @staticmethod
    def _is_native(obj: FromNativeT | Any, /) -> TypeIs[FromNativeT]:
        """Return `True` if `obj` can be passed to `from_native`."""
        ...

ToNarwhalsT_co = TypeVar("ToNarwhalsT_co", covariant=True)

class ToNarwhals(Protocol[ToNarwhalsT_co]):
    def to_narwhals(self) -> ToNarwhalsT_co:
        """Convert into public representation."""
        ...


.

### For anyone (users, admins and developers) working with ArcGIS

No matter what's your job, you will find documentation, courses, books, community pages, tools, ... for ArcGIS users on this domains.

|Domain|Description|
|---|---|
|[doc.arcgis.com](https://doc.arcgis.com)|Landing page with links to every product's documentation page
|[training.esri.com](https://www.esri.com/training/)|Free courses and paid courses
|[esripress.esri.com](https://esripress.esri.com/display/index.cfm)|Esri Press publishes books and tutorials on GIS, cartography, and the application of spatial analysis. All publications are available to purchase online.
|[esri.com/mooc](http://www.esri.com/mooc)|Esri massive open online courses (MOOCs)
|[community.esri.com](https://community.esri.com)|Esri Community Site|
|[earlyadopter.esri.com](https://earlyadopter.esri.com/welcome/)|Early adopter community
|[codesharing.arcgis.com](https://codesharing.arcgis.com)|Interface to help anyone to find code samples hosted as items in ArcGIS Online ([equivalent search](http://www.arcgis.com/home/search.html?q=%28type%3A%22code%20samples%22%20OR%20type%3A%22add-ins%22%20OR%20type%3A%22geoprocessing%20samples%22%29%20-type%3A%22Code%20Attachment%22%20-type%3A%22Featured%20Items%22%20-type%3A%22Symbol%20Set%22%20-type%3A%22Color%20Set%22%20-type%3A%22Windows%20Viewer%20Add%20In%22%20-type%3A%22Windows%20Viewer%20Configuration%22&start=1&sortOrder=desc&sortField=relevance%29))
|[proceedings.esri.com](http://proceedings.esri.com/library/userconf/index.html)|Official channel to host the slides of every Esri Event but also to find User Groups|
|[support.esri.com](https://support.esri.com)|Technical articles, white papers, patches, software updates, product lifecycles, system requirements
|[video.esri.com](https://www.esri.com/videos)|Video portal mixing content hosted by itself and our [Youtube channels](#youtube-channels).
|[enterprise.arcgis.com](enterprise.arcgis.com)|n.a
|[geonet.esri.com](https://geonet.esri.com)|Alias of [community.esri.com](https://community.esri.com)
|[forums.esri.com](http:/forums.esri.com)|Alias of [community.esri.com](https://community.esri.com)
|[beta.esri.com](http://beta.esri.com)|Alias of [earlyadopter.esri.com](https://earlyadopter.esri.com/welcome/)

## Youtube channels

You can also find more information on any of our Youtube Channels:

|Name|Subscribers|Topics (Playlists)|
|---|---|---|
|[Esri Events](https://www.youtube.com/channel/UC_yE3TatdZKAXvt_TzGJ6mw)|+4425|>23 [playlists](https://www.youtube.com/channel/UC_yE3TatdZKAXvt_TzGJ6mw/playlists?disable_polymer=1): [2017 Developer Summit Plenary](https://www.youtube.com/playlist?list=PLaPDDLTCmy4aJoXyro9yWOr2pdIe0mr9A), ...
|[ArcGIS](https://www.youtube.com/channel/UCgGDPs8cte-VLJbgpaK4GPw)|+3500|>35 [playlists](https://www.youtube.com/channel/UCgGDPs8cte-VLJbgpaK4GPw/playlists?disable_polymer=1): [Insights](https://www.youtube.com/playlist?list=PLG


etResourceLimiter returns struct containing limits (max, min) for resources (cores, memory etc.).
func (kubemark *KubemarkCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error) {
	return nil, cloudprovider.ErrNotImplemented
}

// Refresh is called before every main loop and can be used to dynamically update cloud provider state.
// In particular the list of node groups returned by NodeGroups can change as a result of CloudProvider.Refresh().
func (kubemark *KubemarkCloudProvider) Refresh() error {
	return cloudprovider.ErrNotImplemented
}

// Cleanup cleans up all resources before the cloud provider is removed
func (kubemark *KubemarkCloudProvider) Cleanup() error {
	return cloudprovider.ErrNotImplemented
}

// BuildKubemark builds Kubemark cloud provider.
func BuildKubemark(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider {
	klog.Fatal("Failed to create Kubemark cloud provider: only supported on Linux")
	return nil
}
/*
Copyright 2019 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package azure

import (
	"fmt"
	"os"
	"reflect"
	"strings"
	"testing"
	"time"

	"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/mockvmclient"
	"sigs.k8s.io/cloud-provider-azure/pkg/retry"

	"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2022-08-01/compute"
	"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources"
	"github.com/Azure/go-autorest/autorest/date"
	"github.com/Azure/go-autorest/autorest/to"
	"github.com/stretchr/testify/assert"
	"go.uber.org/mock/gomock"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider"
	"k8s.io/autoscaler/cluster-autoscaler/config"
	azclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient"
	azclients "sigs.k8s.io/cloud-provider-azure/pkg/azureclients"
	"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient"
	"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient"
	providerazureconsts "sigs.k8s.io/cloud-provider-azure/pkg/consts"
	providerazure "sigs.k8s.io/cloud-provider-azure/pkg/provider"
	providerazureconfig "sigs.k8s.io/cloud-provider-azure/pkg/provider/config"
)

const validAzureCfg = `{
	"cloud": "AzurePublicCloud",
	"tenantId": "fakeId",
	"subscriptionId": "fakeId",
	"aadClientId": "fakeId",
	"aadClientSecret": "fakeId",
	"resourceGroup": "fakeId",
	"location": "southeastasia",
	"subnetName": "fakeName",
	"securityGroupName": "fakeName",
	"vnetName": "fakeName",
	"routeTableName": "fakeName",
	"primaryAvailabilitySetName": "fakeName",
	"vmssCacheTTLInSeconds": 60,
	"vm


lice.reverse();
            bs.add_slice(slice)
        }
    }
}

macro_rules! impl_for_base_type {
    ( $($t:ty),* ) => {
    $( impl BSAdapter for $t {}) *
    }
}

impl_for_base_type! { u8, u16, u32, u64, i64, bool }

impl BSAdapter for SocketAddr {
    fn add(this: Self, bs: &mut crate::utils::BinaryStream)
    where
        Self: Sized,
    {
        bs.add(if this.is_ipv4() { 4u8 } else { 6u8 });

        bs.add_slice(&match this.ip() {
            IpAddr::V4(addr) => addr.octets(),
            IpAddr::V6(_addr) => unimplemented!(),
        });

        bs.add(this.port());
        //from raw parts...............
    }

    //FIXME: only IPv4
    fn read(bs: &mut crate::utils::BinaryStream) -> Self
    where
        Self: Sized,
    {
        bs.skip(1);
        SocketAddr::new(
            IpAddr::V4(Ipv4Addr::new(bs.read(), bs.read(), bs.read(), bs.read())),
            bs.read(),
        )
    }
}

/*impl<T: BSAdapter> BSAdapter for Vec<T> {
    fn add(this: Self, bs: &mut BinaryStream)
    where
        Self: Sized,
    {
        this.into_iter().for_each(|p| bs.add(p));
    }

    fn read(_bs: &mut BinaryStream) -> Self
    where
        Self: Sized,
    {
        unimplemented!("read operation for Vec<T>")
    }
}*/
<reponame>arrayJY/tiny-renderer
use std::ops::Mul;

use generic_array::ArrayLength;
use typenum::{Prod, Unsigned};

use super::{Matrix, Matrix3f, Matrix4f};
impl<T, Row, Col> From<&Matrix<T, Row, Col>> for Matrix<T, Row, Col>
where
    T: Default + Clone,
    Row: Unsigned + Mul<Col>,
    Col: Unsigned,
    Prod<Row, Col>: ArrayLength<T>,
{
    fn from(other: &Matrix<T, Row, Col>) -> Matrix<T, Row, Col> {
        Matrix {
            data: other.data.clone(),
        }
    }
}
impl From<&Matrix4f> for Matrix3f {
    fn from(matrix: &Matrix4f) -> Self {
        Matrix3f {
            data: matrix
                .data
                .iter()
                .enumerate()
                .filter_map(|(i, &v)| {
                    if i / 4 != 3 && i % 4 != 3 {
                        Some(v)
                    } else {
                        None
                    }
                })
                .collect(),
        }
    }
}use crate::mean;

pub fn get_median(list: &mut Vec<i32>) -> Option<i32> {
    list.sort();

    let len = list.len();

    if len % 2 != 0 {
        return Some(list[(len / 2) + 1]);
    } else {
        let middle = len / 2;
        return mean::get_mean(&list[middle - 1..middle + 1].to_vec());
    }
}
use serde::Deserialize;
use tabled::Tabled;

use crate::util::deserialize::null_to_default;

#[derive(Default, Deserialize)]
#[serde(default)]
pub struct Vlans {
    pub vlans: Vec<Vlan>,
}

#[derive(Tabled, Default, Deserialize)]
#[serde(default)]
pub struct Vlan {
    #[serde(


ntries := 100 * entriesPerMB

	for i := 0; i < totalEntries; i++ {
		entry := map[string]interface{}{
			"type":       "user",
			"session_id": fmt.Sprintf("sess_%03d", i%10),
			"timestamp":  time.Now().Add(time.Duration(i) * time.Second).Format(time.RFC3339),
			"content": map[string]interface{}{
				"text": fmt.Sprintf("This is message number %d with some padding to make it larger %s", i, strings.Repeat("x", 500)),
			},
		}
		data, _ := json.Marshal(entry)
		buf.Write(data)
		buf.WriteByte('\n')
	}

	parser := NewJSONLParser()
	parser.SetOptions(ParseOptions{
		BufferSize: 128 * 1024, // 128KB buffer for better performance
		ParseTools: false,       // Skip tool parsing for speed
	})

	reader := bytes.NewReader(buf.Bytes())
	entries, errors := parser.ParseStream(reader)

	// Process in streaming fashion
	count := 0
	errorCount := 0

	// Handle errors in separate goroutine
	go func() {
		for err := range errors {
			errorCount++
			t.Logf("Error processing large file: %v", err)
		}
	}()

	start := time.Now()
	for range entries {
		count++
		if count%10000 == 0 {
			t.Logf("Processed %d entries...", count)
		}
	}
	duration := time.Since(start)

	if count != totalEntries {
		t.Errorf("Expected %d entries, got %d", totalEntries, count)
	}
	if errorCount != 0 {
		t.Errorf("Expected 0 errors, got %d", errorCount)
	}

	t.Logf("Processed %d entries in %v (%.0f entries/sec)", count, duration, float64(count)/duration.Seconds())
}

func TestMaxEntriesLimit(t *testing.T) {
	parser := NewJSONLParser()
	parser.SetFilter(FilterOptions{
		MaxEntries: 3,
	})

	reader := strings.NewReader(sampleJSONL)
	entries, _ := parser.ParseStream(reader)

	count := 0
	for range entries {
		count++
	}

	if count != 3 {
		t.Errorf("Expected max 3 entries, got %d", count)
	}
}

func TestSampling(t *testing.T) {
	// Create 100 entries
	var jsonl strings.Builder
	for i := 0; i < 100; i++ {
		jsonl.WriteString(fmt.Sprintf(`{"type":"user","session_id":"sess_001","timestamp":"2025-01-01T10:00:%02dZ","content":{"text":"Message %d"}}`, i%60, i))
		jsonl.WriteByte('\n')
	}

	parser := NewJSONLParser()
	parser.SetFilter(FilterOptions{
		SampleRate: 0.1, // Sample 10% of entries
	})

	reader := strings.NewReader(jsonl.String())
	entries, _ := parser.ParseStream(reader)

	count := 0
	for range entries {
		count++
	}

	// With 10% sampling of 100 entries, we expect around 10 entries
	// Allow some variance due to sampling algorithm
	if count < 8 || count > 12 {
		t.Errorf("Expected approximately 10 entries with 10%% sampling, got %d", count)
	}
}

func TestEmptyLines(t *testing.T) {
	// JSONL with empty lines
	jsonlWithEmpty := `{"type":"user","session_id":"sess_001","timestamp":"2025-01-01T10:00:00Z","content":{"text":"Line 1"}}

{"type":"user","session_id":"sess_001","timestamp":"2025-01-01T10:00:01Z","content":{"text":"Line 2"}}

{"type":"user","session_id":"sess_001","timestamp":"2025-01-01T10:00:02Z


t, function (error, response, body) {
      if (!error && response.statusCode == 200) {
        return body;
      }
    });
  }
}

module.exports = performRequest;

/*
Typical Api call:

{
          "latitude": 42.3601,
          "longitude": -71.0589,
          "timezone": "America/New_York",
          "currently": {
              "time": 1509993277,
              "summary": "Drizzle",
              "icon": "rain",
              "nearestStormDistance": 0,
              "precipIntensity": 0.0089,
              "precipIntensityError": 0.0046,
              "precipProbability": 0.9,
              "precipType": "rain",
              "temperature": 66.1,
              "apparentTemperature": 66.31,
              "dewPoint": 60.77,
              "humidity": 0.83,
              "pressure": 1010.34,
              "windSpeed": 5.59,
              "windGust": 12.03,
              "windBearing": 246,
              "cloudCover": 0.7,
              "uvIndex": 1,
              "visibility": 9.84,
              "ozone": 267.44
          },
          "minutely": {
              "summary": "Light rain stopping in 13 min., starting again 30 min. later.",
              "icon": "rain",
              "data": [{
                  "time": 1509993240,
                  "precipIntensity": 0.007,
                  "precipIntensityError": 0.004,
                  "precipProbability": 0.84,
                  "precipType": "rain"
              },
            ...
            ]
          },
          "hourly": {
              "summary": "Rain starting later this afternoon, continuing until this evening.",
              "icon": "rain",
              "data": [{
                  "time": 1509991200,
                  "summary": "Mostly Cloudy",
                  "icon": "partly-cloudy-day",
                  "precipIntensity": 0.0007,
                  "precipProbability": 0.1,
                  "precipType": "rain",
                  "temperature": 65.76,
                  "apparentTemperature": 66.01,
                  "dewPoint": 60.99,
                  "humidity": 0.85,
                  "pressure": 1010.57,
                  "windSpeed": 4.23,
                  "windGust": 9.52,
                  "windBearing": 230,
                  "cloudCover": 0.62,
                  "uvIndex": 1,
                  "visibility": 9.32,
                  "ozone": 268.95
              },
            ...
            ]
          },
         "daily": {
              "summary": "Mixed precipitation throughout the week, with temperatures falling to 39°F on Saturday.",
              "icon": "rain",
              "data": [{
                  "time": 1509944400,
                  "summary": "Rain starting in the afternoon, continuing until evening.",
                  "icon": "rain",
                  "sunriseTime": 1509967519,
                  "sunsetTime": 1510003982,
                  "moonPhase": 0.59,
                  "precipIntensity": 0.0088,
                  "precipIntensityMax": 0.0725,
                  "precipIntensityMaxTime": 1510002000,
                  "precipProbability": 0.73,
                  "precipType": "rain",
                  "temperatureHigh": 66.35,
                  "temperatureHighTime": 1509994800,
                  "temperatureLow": 41.28,
                  "temperatureLowTime": 1510056000,
                  "apparentTemperatureHigh": 66.53,
                  "apparentTemperatureHighTime": 1509994800,
                  "apparentTemperatureLow": 35.74,
                  "apparentTemperatureLowTime": 1510056000,


QUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, 0x0000, nullptr, nullptr);
}

#endif // defined(USB_METHODS_INLINE)
#endif // USB_FLASH_DRIVE_SUPPORT
/*
  Copyright (c) 2011 Arduino.  All right reserved.

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

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

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include "pins_arduino.h"

#ifdef __cplusplus
extern "C" {
#endif

// Pin number
const PinName digitalPin[] = {
  PA_0,  //D0
  PA_1,  //D1
  PA_2,  //D2
  PA_3,  //D3
  PA_4,  //D4
  PA_5,  //D5
  PA_6,  //D6
  PA_7,  //D7
  PA_8,  //D8
  PA_9,  //D9
  PA_10, //D10
  PA_11, //D11
  PA_12, //D12
  PA_13, //D13
  PA_14, //D14
  PA_15, //D15
  PB_0,  //D16
  PB_1,  //D17
  PB_2,  //D18
  PB_3,  //D19
  PB_4,  //D20
  PB_5,  //D21
  PB_6,  //D22
  PB_7,  //D23
  PB_8,  //D24
  PB_9,  //D25
  PB_10, //D26
  PB_11, //D27
  PB_12, //D28
  PB_13, //D29
  PB_14, //D30
  PB_15, //D31
  PC_0,  //D32
  PC_1,  //D33
  PC_2,  //D34
  PC_3,  //D35
  PC_4,  //D36
  PC_5,  //D37
  PC_6,  //D38
  PC_7,  //D39
  PC_8,  //D40
  PC_9,  //D41
  PC_10, //D42
  PC_11, //D43
  PC_12, //D44
  PC_13, //D45
  PC_14, //D46
  PC_15, //D47
  PD_0,  //D48
  PD_1,  //D49
  PD_2,  //D50
  PD_3,  //D51
  PD_4,  //D52
  PD_5,  //D53
  PD_6,  //D54
  PD_7,  //D55
  PD_8,  //D56
  PD_9,  //D57
  PD_10, //D58
  PD_11, //D59
  PD_12, //D60
  PD_13, //D61
  PD_14, //D62
  PD_15, //D63
  PE_0,  //D64
  PE_1,  //D65
  PE_2,  //D66
  PE_3,  //D67
  PE_4,  //D68
  PE_5,  //D69
  PE_6,  //D70
  PE_7,  //D71
  PE_8,  //D72
  PE_9,  //D73
  PE_10, //D74
  PE_11, //D75
  PE_12, //D76
  PE_13, //D77
  PE_14, //D78
  PE_15, //D79
  PF_0,  //D80
  PF_1,  //D81
  PF_2,  //D82
  PF_3,  //D83
  PF_4,  //D84
  PF_5,  //D85
  PF_6,


 c.S, E3 = bNOT(d.S)}
	e.S = bAND3(e.E1, e.E2, e.E3)

	A333_sts_msg.AP_DUAL_HYD_LO_GB.Video.IN = bool2num[e.S]

end

function A333_sts_msg.AP_DUAL_HYD_LO_BY.Monitor()

	local a = {E1 = HNVMBPF, E2 = HBRLL}
	a.S = bOR(a.E1, a.E2)

	local b = {E1 = HYRLL, E2 = HNVMYEPF}
	b.S = bOR(a.E1, a.E2)

	local c = {E1 = HBSYSLP, E2 = HYSYSLP}
	c.S = bAND(c.E1, c.E2)

	local d = {E1 = a.S, E2 = b.S}
	d.S = bAND(d.E1, d.E2)

	local e = {E1 = bNOT(ZGND), E2 = c.S, E3 = bNOT(d.S)}
	e.S = bAND3(e.E1, e.E2, e.E3)

	A333_sts_msg.AP_DUAL_HYD_LO_BY.Video.IN = bool2num[e.S]

end

function A333_sts_msg.L_TK_GRVTY_FEED_ONLY.Monitor()

	local a = {E1 = USKD, E2 = bNOT(EGN1COF)}
	a.S = bAND(a.E1, a.E2)

	local b = {E1 = EEMER, E2 = bNOT(a.S)}
	b.S = bAND(b.E1, b.E2)

	local c = {E1 = ZPH1, E2 = ZPH10}
	c.S = bOR(c.E1, c.E2)

	local d = {E1 = FLTP12F, E2 = EDCEC, E3 = b.S}
	d.S = bOR(d.E1, d.E2, d.E3)

	local e = {E1 = bNOT(c.S), E2 = d.S}
	e.S = bAND(e.E1, e.E2)

	local f = {E1 = bNOT(FLRGFEED), E2 = e.S}
	f.S = bAND(f.E1, f.E2)

	FLGFEED = e.S

	A333_sts_msg.L_TK_GRVTY_FEED_ONLY.Video.IN = bool2num[f.S]

end

function A333_sts_msg.R_TK_GRVTY_FEED_ONLY.Monitor()

	local a = {E1 = USKD, E2 = bNOT(EGN1COF)}
	a.S = bAND(a.E1, a.E2)

	local b = {E1 = EEMER, E2 = bNOT(a.S)}
	b.S = bAND(b.E1, b.E2)

	local c = {E1 = ZPH1, E2 = ZPH10}
	c.S = bOR(c.E1, c.E2)

	local d = {E1 = FRTP12F, E2 = EDCEC, E3 = b.S}
	d.S = bOR(d.E1, d.E2, d.E3)

	local e = {E1 = bNOT(c.S), E2 = d.S}
	e.S = bAND(e.E1, e.E2)

	local f = {E1 = bNOT(FLRGFEED), E2 = e.S}
	f.S = bAND(f.E1, f.E2)

	FRGFEED = e.S

	A333_sts_msg.R_TK_GRVTY_FEED_ONLY.Video.IN = bool2num[f.S]

end

function A333_sts_msg.PITCH_MECH_


s1_139"><bdo dir='rtl'>ی</bdo>

Á»

<bdo dir='rtl'>¶ آن م·¸و</bdo>

º

<bdo dir='rtl'>ا</bdo>

É

<bdo dir='rtl'>ر¼ ¼ ش</bdo>

³

<bdo dir='rtl'>و</bdo>

Ã ç

<bdo dir='rtl'>و</bdo>

Á ¶Ç»

<bdo dir='rtl'>ر</bdo>

»

<bdo dir='rtl'>ا با</bdo>

ÔÉ¸ ¼ Ù

<bdo dir='rtl'>یس¾ی</bdo>

Á

<bdo dir='rtl'> م·باشد:</bdo>

»²

<bdo dir='rtl'>ج</bdo>

» Æ

<bdo dir='rtl'> قاب</bdo>

²±

<bdo dir='rtl'> ب¶ صورت ز</bdo>

Ù±³²

<bdo dir='rtl'> ک</bdo>

µÎÞ

<bdo dir='rtl'> آن ص</bdo>

³

<bdo dir='rtl'>ر مور</bdo>

³ ¶

<bdo dir='rtl'>کد´ ک</bdo>

function

Car

(){

var

<div id="t5d


장군의 용가죽 갑옷",
[16550] = "장군의 용가죽 투구",
[16551] = "장군의 용가죽 견장",
[16552] = "전투사령관의 용가죽 다리보호구",
[16554] = "전투사령관의 용가죽 장화",
[16555] = "전투사령관의 용가죽 장갑",
[16558] = "전투사령관의 가죽 장화",
[16560] = "전투사령관의 가죽 장갑",
[16561] = "장군의 가죽 투구",
[16562] = "장군의 가죽 어깨갑옷",
[16563] = "장군의 가죽 흉갑",
[16564] = "전투사령관의 가죽 다리보호대",
[16565] = "장군의 사슬 흉갑",
[16566] = "장군의 사슬 투구",
[16567] = "전투사령관의 사슬 다리보호대",
[16568] = "장군의 사슬 어깨보호구",
[16569] = "전투사령관의 사슬 장화",
[16571] = "전투사령관의 사슬 장갑",
[16573] = "전투사령관의 쇠사슬 장화",
[16574] = "전투사령관의 쇠사슬 건틀릿",
[16577] = "장군의 쇠사슬 갑옷",
[16578] = "장군의 쇠사슬 투구",
[16579] = "전투사령관의 쇠사슬 다리보호구",
[16580] = "장군의 쇠사슬 어깨갑옷",
[16581] = "리조나이트 수정",
[16583] = "악마의 구슬",
[16602] = "트롤 부적",
[16603] = "마력 깃든 리조나이트 수정",
[16604] = "엘룬의 달빛 로브",
[16605] = "빛의 수사 로브",
[16606] = "주술 부적 로브",
[16607] = "제물의 수행사제 로브",
[16608] = "물병자리 허리띠",
[16622] = "찔레가시 활",
[16623] = "유리 메달",
[16642] = "벌


()).toList();
    // }
    // if (this.highs != null) {
    //   data['highs'] = this.highs.map((v) => v.toJson()).toList();
    // }
    // if (this.window != null) {
    //   data['window'] = this.window.map((v) => v.toJson()).toList();
    // }
    // data['mask_type'] = this.maskType;
    // if (this.postList != null) {
    //   data['post_list'] = this.postList.map((v) => v.toJson()).toList();
    // }
    // if (this.dynamicList != null) {
    //   data['dynamic_list'] = this.dynamicList.map((v) => v.toJson()).toList();
    // }
    // if (this.newestDynamicList != null) {
    //   data['newest_dynamic_list'] =
    //       this.newestDynamicList.map((v) => v.toJson()).toList();
    // }
    if (tainfo != null) {
      data['tainfo'] = tainfo?.toJson();
    }
    // if (this.userGodInfo != null) {
    //   data['user_god_info'] = this.userGodInfo.map((v) => v.toJson()).toList();
    // }
    // if (this.newGodRankinfo != null) {
    //   data['new_god_rankinfo'] =
    //       this.newGodRankinfo.map((v) => v.toJson()).toList();
    // }
    // if (this.tbbookrack != null) {
    //   data['tbbookrack'] = this.tbbookrack.map((v) => v.toJson()).toList();
    // }
    if (ucCard != null) {
      data['uc_card'] = ucCard?.toJson();
    }
    if (videoChannelInfo != null) {
      data['video_channel_info'] = videoChannelInfo?.toJson();
    }
    if (userAgreeInfo != null) {
      data['user_agree_info'] = userAgreeInfo?.toJson();
    }
    if (urlMap != null) {
      data['url_map'] = urlMap?.map((v) => v.toJson()).toList();
    }
    // if (this.recomSwanList != null) {
    //   data['recom_swan_list'] =
    //       this.recomSwanList.map((v) => v.toJson()).toList();
    // }
    if (duxiaoman != null) {
      data['duxiaoman'] = duxiaoman?.toJson();
    }
    if (goodsWin != null) {
      data['goods_win'] = goodsWin?.toJson();
    }
    data['uk'] = uk;
    data['is_black_white'] = isBlackWhite;
    if (blockInfo != null) {
      data['block_info'] = blockInfo?.toJson();
    }
    data['server_time'] = serverTime;
    data['time'] = time;
    data['ctime'] = ctime;
    data['logid'] = logid;
    data['error_code'] = errorCode;
    return data;
  }
}

class NicknameInfo {
  String? leftDays;

  NicknameInfo({this.leftDays});

  NicknameInfo.fromJson(Map<String, dynamic> json) {
    leftDays = json['left_days'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['left_days'] = leftDays;
    return data;
  }
}

class AntiStat {
  String? blockStat;
  String? vcodeStat;
  String? hideStat;
  String? daysTofree;
  String? hasChance;

  AntiStat(
      {this.blockStat,
      this.vcodeStat,
      this.hideStat,
      this.daysTofree,
      this.hasChance});

  AntiStat.fromJson(Map


ONUS;
                else if (!(indexToBit(passerSq-8) & bBlock))
                    blackPawnScore += rFactor * FREE_STOP_BONUS;
                if ((pathToQueen & bDefend) == pathToQueen)
                    blackPawnScore += rFactor * FULLY_DEFENDED_PASSER_BONUS;
                else if (indexToBit(passerSq-8) & bDefend)
                    blackPawnScore += rFactor * DEFENDED_PASSER_BONUS;
            }

            blackPawnScore += OPP_KING_DIST * (int) kingDistance[passerSq-8][kingSq[WHITE]] * rFactor;
            blackPawnScore -= OWN_KING_DIST * (int) kingDistance[passerSq-8][kingSq[BLACK]] * rFactor;
        }
    }

    // Doubled pawns
    whitePawnScore += DOUBLED_PENALTY * count(pieces[WHITE][PAWNS] & (pieces[WHITE][PAWNS] << 8));
    blackPawnScore += DOUBLED_PENALTY * count(pieces[BLACK][PAWNS] & (pieces[BLACK][PAWNS] >> 8));

    // Isolated pawns
    // Count the pawns on each file
    int wPawnCtByFile[8];
    int bPawnCtByFile[8];
    for (int i = 0; i < 8; i++) {
        wPawnCtByFile[i] = count(pieces[WHITE][PAWNS] & FILES[i]);
        bPawnCtByFile[i] = count(pieces[BLACK][PAWNS] & FILES[i]);
    }
    // Fill a bitmap of which files have pawns
    uint64_t wIsolated = 0, bIsolated = 0;
    for (int i = 7; i >= 0; i--) {
        wIsolated |= (bool) (wPawnCtByFile[i]);
        bIsolated |= (bool) (bPawnCtByFile[i]);
        wIsolated <<= 1;
        bIsolated <<= 1;
    }
    wIsolated >>= 1;
    bIsolated >>= 1;
    // If there are pawns on either adjacent file, we remove this pawn
    wIsolated &= ~((wIsolated >> 1) | (wIsolated << 1));
    bIsolated &= ~((bIsolated >> 1) | (bIsolated << 1));

    uint64_t wIsolatedBB = wIsolated;
    wIsolatedBB |= wIsolatedBB << 8;
    wIsolatedBB |= wIsolatedBB << 16;
    wIsolatedBB |= wIsolatedBB << 32;
    uint64_t bIsolatedBB = bIsolated;
    bIsolatedBB |= bIsolatedBB << 8;
    bIsolatedBB |= bIsolatedBB << 16;
    bIsolatedBB |= bIsolatedBB << 32;

    // Score isolated pawns
    for (int f = 0; f < 8; f++) {
        if (wIsolated & indexToBit(f)) {
            whitePawnScore += ISOLATED_PENALTY * wPawnCtByFile[f];
            if (!(FILES[f] & pieces[BLACK][PAWNS]) && (pieces[BLACK][QUEENS] | pieces[BLACK][ROOKS]))
                whitePawnScore += ISOLATED_SEMIOPEN_PENALTY * wPawnCtByFile[f];
        }
        if (bIsolated & indexToBit(f)) {
            blackPawnScore += ISOLATED_PENALTY * bPawnCtByFile[f];
            if (!(FILES[f] & pieces[WHITE][PAWNS]) && (pieces[WHITE][QUEENS] | pieces[WHITE][ROOKS]))
                blackPawnScore += ISOLATED_SEMIOPEN_PENALTY * bPawnCtByFile[f];
        }
    }

    // Backward pawns
    uin


	CurrentJob *Job
	ValidJobs  map[string]*Job

	CoinbaseHasher func([]byte) []byte

	DaemonManager *daemons.DaemonManager

	NewBlockEvent chan *Job
}

func NewJobManager(options *config.Options, dm *daemons.DaemonManager, storage *storage.DB) *JobManager {
	placeholder, _ := hex.DecodeString("f000000ff111111f")
	extraNonce1Generator := NewExtraNonce1Generator()

	return &JobManager{
		PoolAddress: options.PoolAddress,

		Options:               options,
		ExtraNonce1Generator:  extraNonce1Generator,
		ExtraNoncePlaceholder: placeholder,
		ExtraNonce2Size:       len(placeholder) - extraNonce1Generator.Size,
		CurrentJob:            nil,
		ValidJobs:             make(map[string]*Job),
		CoinbaseHasher:        utils.Sha256d,
		Storage:               storage,
		DaemonManager:         dm,
	}
}

func (jm *JobManager) Init(gbt *daemons.GetBlockTemplate) {
	jm.ProcessTemplate(gbt)
}

func (jm *JobManager) ProcessShare(share *types.Share) {
	// isValidBlock
	var isAccepted bool
	var tx string
	if share.BlockHex != "" {
		log.Info("submitting new Block: ", share.BlockHex)
		jm.DaemonManager.SubmitBlock(share.BlockHex)

		isAccepted, tx = jm.CheckBlockAccepted(share.BlockHash)
		share.TxHash = tx
		if isAccepted {
			log.Info("Block ", share.BlockHash, " Accepted! generation tx: ", share.TxHash, ". Wait for pendding!")
		}

		gbt, err := jm.DaemonManager.GetBlockTemplate()
		if err != nil {
			log.Panic("failed fetching GBT: ", err)
		}
		jm.ProcessTemplate(gbt)
	}

	// notValidBlock but isValidShare
	go jm.Storage.PutShare(share, isAccepted)

}

func (jm *JobManager) CheckBlockAccepted(blockHash string) (isAccepted bool, tx string) {
	_, results := jm.DaemonManager.CmdAll("getblock", []interface{}{blockHash})

	isAccepted = true
	for i := range results {
		isAccepted = isAccepted && results[i] != nil && results[i].Error == nil
	}

	for i := range results {
		if results[i] == nil {
			continue
		}

		gb := daemons.BytesToGetBlock(results[i].Result)
		if gb.Tx != nil {
			return isAccepted, gb.Tx[0]
		}
	}

	return isAccepted, ""
}

// UpdateCurrentJob updates the job when mining the same height but tx changes
func (jm *JobManager) UpdateCurrentJob(rpcData *daemons.GetBlockTemplate) {
	tmpBlockTemplate := NewJob(
		jm.CurrentJob.JobId,
		rpcData,
		jm.PoolAddress.GetScript(),
		jm.ExtraNoncePlaceholder,
		jm.Options.Coin.Reward,
		jm.Options.Coin.TxMessages,
		jm.Options.RewardRecipients,
	)

	jm.CurrentJob = tmpBlockTemplate
	jm.ValidJobs[tmpBlockTemplate.JobId] = tmpBlockTemplate

	log.Debug("Job updated")
}

// CreateNewJob creates a new job when mining new height
func (jm *JobManager) CreateNewJob(rpcData *daemons.GetBlockTemplate) {
	// creates a new job when mining new height

	tmpBlockTemplate := NewJob(
		utils.RandHexUint64(),
		rpcData,
		jm.PoolAddress.GetScript(),
		j


fragment].size(), (int)particles_of_fragment[second_largest_fragment].size(), sim.number_of_particles) == COLLISION_RESULT_BOUNCING)
        {
            vec3 delta_v;
            delta_v[0] = fragment_velocities[3*largest_fragment+0] - fragment_velocities[3*second_largest_fragment+0];
            delta_v[1] = fragment_velocities[3*largest_fragment+1] - fragment_velocities[3*second_largest_fragment+1];
            delta_v[2] = fragment_velocities[3*largest_fragment+2] - fragment_velocities[3*second_largest_fragment+2];
            double speed = sqrt(delta_v[0]*delta_v[0] + delta_v[1]*delta_v[1] + delta_v[2]*delta_v[2]);

            fprintf(file, "# largest / second largest fragment: %i / %i\n", largest_fragment, second_largest_fragment);
            fprintf(file, "# delta v = (%g, %g, %g) => ||delta v|| = %g\n", delta_v[0], delta_v[1], delta_v[2], speed);

            if(sim.sim_info.info_storage[2] > 0)
                fprintf(file, "# => coefficient of restitution = %g\n", speed / sim.sim_info.info_storage[2]);
        }
    }

    fclose(file);
    delete [] fragment_velocities;

    return EC_OK;
}

ErrorCode SimLib::printElasticCharge(Simulation &sim, FILE *file)
{
    int charged_contacts = 0;
    double elastic_charge = SimLib::getElasticCharge(sim, &charged_contacts);
    double kinetic_energy = SimLib::getKineticEnergy(sim);

    /*fprintf(file, "# number of contacts: %i\n", sim.number_of_contacts);
    fprintf(file, "# number of charged contacts: %i\n", charged_contacts);
    fprintf(file, "# elastic charge: %g (in F_c * delta_c)\n", elastic_charge *  ENEGRY_UNIT);*/

    if(file)
        fprintf(file, "%i %i %g %g\n", sim.number_of_contacts, charged_contacts, elastic_charge * ENERGY_UNIT, kinetic_energy * ENERGY_UNIT);

    return EC_OK;
}

double SimLib::getElasticCharge(Simulation &sim, int *charged_contacts)
{
    double elastic_charge = 0;
    ContactListEntry *cl_entry;
    vec3 n1;
    vec3 n2;
    vec3 delta_n;
    vec3 n_c;
    vec3 displacement;
    double rolling_displacement;
    double sliding_displacement;

    *charged_contacts = 0;

    for(int p = 0; p < sim.number_of_particles; ++p)
    {
        cl_entry = sim.contact_list[p];

        while(cl_entry)
        {
            bool inelastic = false;

            // calculate current contact pointers
            cl_entry->contact->getCurrentN1(&n1);
            cl_entry->contact->getCurrentN2(&n2);
            delta_n[0] = n1[0] - n2[0];
            delta_n[1] = n1[1] - n2[1];
            delta_n[2] = n1[2] - n2[2];

            // determine distance between particles & contact normal
            n_c[0] = sim.pos_new[X_COORD(p)] - sim.pos_new[X_COORD(cl_entry->id)];
            n_c[1] = sim.pos_new[Y_COORD(p)] - sim.pos_new[Y_COORD(cl_entry->id)];
            n_c[2] = sim.pos_new[Z_C


_point as i16, direction, end_point);
                    // if self.count_end_point != 2 {
                    // }
                    self.count_bottle_neck(pos);
                }

                // 石の左上からスタート。
                for direction in 0..=3 {
                    self.clear_count_board(pos);
                    let end_point = pos.get_board().get_top_left_of(target) as i16;
                    self.search_by_right_hand(pos, end_point as i16, direction, end_point);
                    // if self.count_end_point != 2 {
                    // }
                    self.count_bottle_neck(pos);
                }
            }
        }

        let mut vec: Vec<usize> = Vec::new();

        // 着手禁止点以外は、全部合法手☆（*＾～＾*）
        println!("ボトルネック {0} 箇所。", self.bottle_neck_addr.len());
        for target in self.bottle_neck_addr.iter() {

            // 連ID。
            let piece_id = pos.get_piece_database().get_stone_piece_distribution().get(*target as usize);
            println!("連ID: {0}.", piece_id);
            let terittory = match pos.get_piece_database().get_piece_mappings().get_piece(piece_id) {
                Some(piece) => {piece.get_territory()},
                None => {0},
            };

            // 着手禁止点ではなく、相手の領域でもない。
            if
                !is_forbidden(*target as usize, pos, record)
                &&
                terittory != opponent
            {
                vec.push(*target as usize);
            }
        }

        vec
    }

    /// 端の手を省く。
    pub fn pick_move_air2018_filter2(&mut self, pos:&Position, record:&Record, vec_source: Vec<usize>) -> Vec<usize> {
        let mut vec: Vec<usize> = Vec::new();

        // 石を数える。
        let mut stone_count = 0;
        for target in pos.get_left_top_on_board() ..= pos.get_right_bottom_on_board() {
            let stone = pos.get_board().get_stone(target as usize);

            if stone == 1 || stone == 2 {
                stone_count += 1;
            }
        }

        // 避ける列の数
        let mut avoid = 0;
        if stone_count < 8 {
            avoid = 4;
        }
        else if stone_count < 20 {
            avoid = 3;
        }
        else if stone_count < 55 {
            avoid = 2;
        }
        else if stone_count < 170 {
            avoid = 1;
        }

        println!("石が {0} 個なので、端から {1} 列は避ける☆（＾～＾）", stone_count, avoid);
        for target in vec_source {

            // 19路盤は 21x21 のボード☆（＾～＾）
            // 21 で割って 1 余れば 1列目、 19 余れば 19 列目☆（＾～＾）
            // 21 で割って小数点以下切り捨てて、 1 なら 1 行目、 19 なら 19 行目☆（＾～＾）
            let column = target % 21;
            let row = target / 21;

            // 着手禁止点ではなく、端でもない。
            if
                !is_forbidden(target as usize, pos, record)
                &&
                (0 + avoid < column && column < 20 - avoid && 0 + avoid < row &&  row < 20 - avoid)
            {
                vec.push(target as usize);
            }
        }

        vec
    }

    /// 壁に右手を付けての探索。
    /// * `direction` - 顔の向き。 0:上、1:右、2:下、3:左。
    pub fn search_by_right_hand(&mut self, pos:&Position, end_point:


"""Demonstrates tool-use: model calls browse web tool, then we judge the answer."""

from ai import complete_with_tools, openai
from browse_web import browse_web_tool_config

prompt = (
	"I want to buy a hoodie with a fur lined hood. It needs a full zipper. "
	"Near Times Square in NYC. Where can I buy one today at lunch time?"
)

def main():
	# Run with tool-choice enabled; tool calls are resolved automatically
	completion = complete_with_tools({
		"messages": [{"role": "developer", "content": prompt}],
		"model": "llama3.2:latest",
		"tool_choice": "auto",
		"tools": [browse_web_tool_config],
	})
	answer = completion.get("choices", [{}])[0].get("message", {}).get("content")
	print("\n\n" + "#" * 40)
	print(f"Answer: {answer}")

	# Judge completeness of the response
	check = openai.chat.completions.create({
		"model": "llama3.2:latest",
		"messages": [{
			"role": "developer",
			"content": (
				"You are a strict critic. Given the following question, determine if the answer a full answer to the question.\n\n"
				f"Question: {prompt}\n\nAnswer: {answer}"
			),
		}],
	})
	judge = check.get("choices", [{}])[0].get("message", {}).get("content", "").lower()
	is_done = "yes" in judge or "true" in judge or "complete" in judge
	print("\n\n" + "#" * 40)
	print(f"LLM as judge: {'👍' if is_done else '👎'}")

if __name__ == "__main__":
	main()


# RUN: llvm-mc -triple x86_64-pc-linux -filetype=obj %s -o %t
# RUN: not llvm-dwarfdump -v %t 2>%t.err | FileCheck %s
# RUN: FileCheck %s <%t.err -check-prefix=ERR

# CHECK: .debug_info contents:
# CHECK: 0x0000000b: DW_TAG_compile_unit [1]
# CHECK:             DW_AT_low_pc [DW_FORM_addr]       (0x0000000000000000 ".text")
# CHECK-NEXT:        DW_AT_ranges [DW_FORM_sec_offset] (0x00000000
# CHECK-NEXT:    [0x0000000000000000, 0x0000000000000001) ".text"
# CHECK-NEXT:    [0x0000000000000003, 0x0000000000000006) ".text"
# CHECK-NEXT:    [0x0000000000000001, 0x0000000000000002) ".text.foo1")

.text
.globl foo
.type foo,@function
foo:
.Lfunc_begin0:
  nop
.Ltmp0:
  nop
  nop
.Ltmp1:
  nop
  nop
  nop
.Ltmp2:

.section .text.foo1,"ax",@progbits
.Ltmp3:
 nop
.Ltmp4:
 nop
.Ltmp5:

.section .debug_abbrev,"",@progbits
.byte 1                       # Abbreviation Code
.byte 17                      # DW_TAG_compile_unit
.byte 0                       # DW_CHILDREN_no
.byte 37                      # DW_AT_producer
.byte 14                      # DW_FORM_strp
.byte 19                      # DW_AT_language
.byte 5                       # DW_FORM_data2
.byte 3                       # DW_AT_name
.byte 14                      # DW_FORM_strp
.byte 16                      # DW_AT_stmt_list
.byte 23                      # DW_FORM_sec_offset
.byte 27                      # DW_AT_comp_dir
.byte 14                      # DW_FORM_strp
.byte 17                      # DW_AT_low_pc
.byte 1                       # DW_FORM_addr
.byte 85                      # DW_AT_ranges
.byte 23                      # DW_FORM_sec_offset
.byte 0                       # EOM(1)
.byte 0                       # EOM(2)
.byte 0                       # EOM(3)

.section .debug_info,"",@progbits
.Lcu_begin0:
.long 38                      # Length of Unit
.short 4                      # DWARF version number
.long .debug_abbrev           # Offset Into Abbrev. Section
.byte 8                       # Address Size (in bytes)
.byte 1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
.long 0                       # DW_AT_p


ul{margin-right:0}}.tc-content-inner ul.socials,.tc-content-inner ul.tags{list-style:none;margin:0}dl{margin-bottom:1.25em}dl dt{text-align:right;position:relative;padding:1.25em 1.25em .625em 1.25em}dl dt::before{content:"";position:absolute;width:1.25em;height:2px;bottom:calc(1.25em - 6px);right:0;background:#313131}dl .wp-caption-dt::before{content:none}dl dd{padding-right:1.25em}.widget_shopping_cart dl,.woocommerce-cart-form dl{margin-bottom:0}.widget_shopping_cart dl dt,.woocommerce-cart-form dl dt{white-space:normal;clear:none;text-align:inherit;padding:0}.widget_shopping_cart dl dt::before,.woocommerce-cart-form dl dt::before{display:none}.widget_shopping_cart dl dd,.woocommerce-cart-form dl dd{padding:0}.widget_shopping_cart dl p,.woocommerce-cart-form dl p{margin-top:0}.marketing{margin-bottom:6.25em;margin-top:.5em}.featured-page{margin-top:2em;position:relative;text-align:center;font-size:1.15em}.featured-page .czr-thumb-wrapper{overflow:hidden}.featured-page .no-effect .czr-thumb-wrapper{margin-bottom:2.5em}.featured-page img{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);backface-visibility:hidden}.center-images-disabled .featured-page img{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.fp-button,.fp-title,[class*=fp-text-]{width:90%;margin-left:auto;margin-right:auto}.fp-title{line-height:1.25em;margin-top:.625em;margin-bottom:1.25em;word-break:break-word;position:relative}.fp-title::after{content:"";position:absolute;width:1.25em;background:#313131;height:2px;top:100%;left:0;right:0;margin:.3125em auto 0;transition:all .6s ease}.widget-front.hover .fp-title::after{background:#777;width:2.5em}.featured-page .btn-edit{margin:-1em 0 0}[class*=fp-text-]{margin:1.5em auto;color:#777}.fp-button{display:inline-block;padding:0}.fp-button .btn-more{margin-bottom:1.25em}.featured-page .widget-front.hover{color:#777}.icn-format:before{content:'\e81c'}.format-link .icn-format:before{content:'\e812'}.format-quote .icn-format:before{content:'\e808'}.format-image .icn-format:before{content:'\e803'}.format-aside .icn-format:before,.format-chat .icn-format:before,.format-status .icn-format:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;font-family:'Font Awesome\ 5 Free';font-weight:900;font-size:inherit;text-rendering:auto}.format-chat .icn-format:before{content:'\f086'}.format-aside .icn-format:before{content:'\f08d'}.format-status .icn-format:before{content:'\f0e7'}.post-type__icon{font-size:2.985984em;margin:0 auto;text-align:center}.grid .post-type__icon{width:3em;height:3em;line-height:3em;position:absolute;rig


 Avoid overlapping bullets interaction.
			PhysicsWorld.actor_disable_gravity(Game.physics_world, bullet_actor)
			PhysicsWorld.actor_disable_collision(Game.physics_world, bullet_actor)

			-- Bullets may have been recycled while still in motion.
			PhysicsWorld.actor_set_linear_velocity(Game.physics_world, bullet_actor, Vector3.zero())
			PhysicsWorld.actor_set_angular_velocity(Game.physics_world, bullet_actor, Vector3.zero())

			-- Teleport bullet somewhere player can't see it.
			PhysicsWorld.actor_teleport_world_position(Game.physics_world, bullet_actor, Vector3(0, 0, -100))

			Game.ages[Game.bullets_head] = 0
			Game.bullets_head = Game.bullets_head % Game.max_bullets + 1
			Game.num_bullets = Game.num_bullets - 1
		end
	end

	-- Shoot a bullet when left mouse button is pressed.
	if Mouse.pressed(Mouse.button_id("left")) then
		local tr = SceneGraph.instance(Game.scene_graph, Game.camera:unit())
		local pos = SceneGraph.world_position(Game.scene_graph, tr)
		local dir = Matrix4x4.y(SceneGraph.local_pose(Game.scene_graph, tr))
		Vector3.normalize(dir)

		if Game.num_bullets == Game.max_bullets then
			-- Empty magazine. Play a sad sound maybe.
		else
			local bullet_unit = Game.bullets[Game.bullets_tail]
			local bullet_actor = PhysicsWorld.actor_instance(Game.physics_world, bullet_unit)

			-- Gravity and collision is disabled when the bullet gets recycled. Re-enable both.
			PhysicsWorld.actor_enable_gravity(Game.physics_world, bullet_actor)
			PhysicsWorld.actor_enable_collision(Game.physics_world, bullet_actor)

			-- Move the bullet in front of player and shoot it forward.
			PhysicsWorld.actor_teleport_world_position(Game.physics_world, bullet_actor, pos + dir * 1.5)
			PhysicsWorld.actor_add_impulse(Game.physics_world, bullet_actor, dir * 50.0)

			World.play_sound(GameBase.world, "sfx/shoot", false, 0.6)

			Game.bullets_tail = Game.bullets_tail % Game.max_bullets + 1
			Game.num_bullets = Game.num_bullets + 1
		end
	end

	-- Actionable door.
	if Keyboard.pressed(Keyboard.button_id("e")) then
		local camera_transform = SceneGraph.instance(Game.scene_graph, Game.camera:unit())
		local camera_position = SceneGraph.world_position(Game.scene_graph, camera_transform)
		local camera_forward = Matrix4x4.y(SceneGraph.world_pose(Game.scene_graph, camera_transform))
		local hit, hit_pos, normal, time, unit, actor = PhysicsWorld.cast_ray(Game.physics_world, camera_position, camera_forward, 100)

		if hit then
			local door_button = World.unit_by_name(GameBase.world, "raycast_door_button")

			-- If we hit the door button and we are not too far, open/close the door.
			if unit == door_button and Vector3.distance(camera_position, hit_pos) < 10 then
				local door = World.unit_by_name(GameBase.world, "raycast_door")
				local door_transform = SceneGraph.instance(Game.scene_graph, door)
				local door_position = SceneGraph.local_position(Game.scene_graph, door_transform)
				local door_dx = 2.3
				local new_door_position = door_position + Vector3(Game.door_open and door_


12">

本站内容仅供学习与技术研究用途，无意传播或倡导任何违反法律法规的行为。在此声明：用户须自行了解所在地法律法规，合法合规使用；因使用不当产生的法律责任，与本站及作者无关；请在使用前仔细阅读本声明，继续使用即视为同意以上条款。

                                                首页 |
                                                免费节点 |
                                                推荐机场 |
                                                客户端 |
                                                新闻资讯 |
                                                关于我们 |
                        免责申明 |
                        隐私申明 |
                        网站地图

                        Free Singbox节点订阅官网 版权所有 Powered by WordPress

<%= include('header', 'Change payment information


isA<InvalidInputException>()),
        );
      },
    );

    test(
      'predict throws InvalidInputException for invalid IoU threshold',
      () async {
        final inference = YOLOInference(
          channel: mockChannel,
          instanceId: 'test_instance',
          task: YOLOTask.detect,
        );

        final imageBytes = Uint8List.fromList([1, 2, 3, 4, 5]);

        expect(
          () => inference.predict(imageBytes, iouThreshold: 1.5),
          throwsA(isA<InvalidInputException>()),
        );

        expect(
          () => inference.predict(imageBytes, iouThreshold: -0.1),
          throwsA(isA<InvalidInputException>()),
        );
      },
    );

    test('predict handles platform exceptions', () async {
      final errorChannel = YOLOTestHelpers.setupMockChannel(
        customResponses: {
          'predictSingleImage': (_) => throw PlatformException(
            code: 'INFERENCE_ERROR',
            message: 'Inference failed',
          ),
        },
      );

      final inference = YOLOInference(
        channel: errorChannel,
        instanceId: 'test_instance',
        task: YOLOTask.detect,
      );

      final imageBytes = Uint8List.fromList([1, 2, 3, 4, 5]);

      expect(
        () => inference.predict(imageBytes),
        throwsA(isA<YOLOException>()),
      );
    });

    test('predict processes different task types', () async {
      final tasks = [
        YOLOTask.detect,
        YOLOTask.segment,
        YOLOTask.classify,
        YOLOTask.pose,
        YOLOTask.obb,
      ];

      for (final task in tasks) {
        final inference = YOLOInference(
          channel: mockChannel,
          instanceId: 'test_instance',
          task: task,
        );

        final imageBytes = Uint8List.fromList([1, 2, 3, 4, 5]);
        final result = await inference.predict(imageBytes);

        expect(result, isA<Map<String, dynamic>>());
        expect(result.containsKey('detections'), isTrue);
      }
    });

    test('predict with default instance ID', () async {
      final inference = YOLOInference(
        channel: mockChannel,
        instanceId: 'default',
        task: YOLOTask.detect,
      );

      final imageBytes = Uint8List.fromList([1, 2, 3, 4, 5]);
      await inference.predict(imageBytes);

      YOLOTestHelpers.assertMethodCalled(
        log,
        'predictSingleImage',
        arguments: {'image': imageBytes},
      );
    });
  });
}
// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

import 'package:flutter/material.dart';

/// A loading overlay widget that displays model loading progress
class ModelLoadingOverlay extends StatelessWidget {
  const ModelLoadingOverlay({
    super.key,
    required this.loadingMessage,
    required this.downloadProgress,
  });

  final String loadingMessage;
  final double downloadProgress;

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.black87,
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Image.asset(
              'assets/logo.png',
              width: 120,
              height: 120,
              color: Colors.white.withValues(alpha: 0.8),
            ),
            const SizedBox(height: 32),
            Text(
              loadingMessage,
              style: const TextStyle(
                color: Colors.white,
                fontSize: 16,
                fontWeight: FontWeight.w500,
              ),
              textAlign: TextAlign.center,
            ),
            if (downloadProgress > 0) ...[
              const SizedBox(height: 24),
              SizedBox(


ARIO_IN_PLACE"
	hash "0x142A02425FF02BD9"
	jhash (0xE50D6DDE)
	arguments {
		Ped "ped",

		charPtr "scenarioName",

		int "unkDelay",

		BOOL "playEnterAnim",
	}
	ns "BRAIN"
	returns	"void"
	doc [[!
<summary>
		Plays a scenario on a Ped at their current location.

		unkDelay - Usually 0 or -1, doesn't seem to have any effect. Might be a delay between sequences.
		playEnterAnim - Plays the "Enter" anim if true, otherwise plays the "Exit" anim. Scenarios that don't have any "Enter" anims won't play if this is set to true.

		----

		From "am_hold_up.ysc.c4" at line 339:

		AI::TASK_START_SCENARIO_IN_PLACE(NETWORK::NET_TO_PED(l_8D._f4), sub_adf(), 0, 1);

		I'm unsure of what the last two parameters are, however sub_adf() randomly returns 1 of 3 scenarios, those being:
		WORLD_HUMAN_SMOKING
		WORLD_HUMAN_HANG_OUT_STREET
		WORLD_HUMAN_STAND_MOBILE

		This makes sense, as these are what I commonly see when going by a liquor store.
		-------------------------
		List of scenarioNames: pastebin.com/6mrYTdQv
		(^ Thank you so fucking much for this)

		Also these:
		WORLD_FISH_FLEE
		DRIVE
		WORLD_HUMAN_HIKER
		WORLD_VEHICLE_ATTRACTOR
		WORLD_VEHICLE_BICYCLE_MOUNTAIN
		WORLD_VEHICLE_BIKE_OFF_ROAD_RACE
		WORLD_VEHICLE_BIKER
		WORLD_VEHICLE_CONSTRUCTION_PASSENGERS
		WORLD_VEHICLE_CONSTRUCTION_SOLO
		WORLD_VEHICLE_DRIVE_PASSENGERS
		WORLD_VEHICLE_DRIVE_SOLO
		WORLD_VEHICLE_EMPTY
		WORLD_VEHICLE_PARK_PARALLEL
		WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN
		WORLD_VEHICLE_POLICE_BIKE
		WORLD_VEHICLE_POLICE_CAR
		WORLD_VEHICLE_POLICE_NEXT_TO_CAR
		WORLD_VEHICLE_SALTON_DIRT_BIKE
		WORLD_VEHICLE_TRUCK_LOGS
</summary>
	]]

native "TASK_START_SCENARIO_AT_POSITION"
	hash "0xFA4EFC79F69D4F07"
	jhash (0xAA2C4AC2)
	arguments {
		Ped "ped",

		charPtr "scenarioName",

		float "x",

		float "y",

		float "z",

		float "heading",

		int "duration",

		BOOL "sittingScenario",

		BOOL "teleport",
	}
	ns "BRAIN"
	returns	"void"
	doc [[!
<summary>
		List of scenarioNames: pastebin.com/6mrYTdQv

		Also a few more listed at AI::TASK_START_SCENARIO_IN_PLACE just above.
		---------------
		The first parameter in every scenario has always been a Ped of some sort. The second like TASK_START_SCENARIO_IN_PLACE is the name of the scenario.

		The next 4 parameters were harder to decipher. After viewing "hairdo_shop_mp.ysc.c4", and being confused fro


r1=d2,<r1=d3
vtrn.32 d2,d3

# qhasm: 2x x4 = r4 + t4
# asm 1: vadd.i64 >x4=reg128#3,<r4=reg128#3,<t4=reg128#11
# asm 2: vadd.i64 >x4=q2,<r4=q2,<t4=q10
vadd.i64 q2,q2,q10

# qhasm: 				r3 = r3[0,2,1,3]
# asm 1: vtrn.32 <r3=reg128#1%bot,<r3=reg128#1%top
# asm 2: vtrn.32 <r3=d0,<r3=d1
vtrn.32 d0,d1

# qhasm: 				x01 = x01[0,1] r1[0,1]
# asm 1: vext.32 <x01=reg128#4%top,<r1=reg128#2%bot,<r1=reg128#2%bot,#0
# asm 2: vext.32 <x01=d7,<r1=d2,<r1=d2,#0
vext.32 d7,d2,d2,#0

# qhasm: 				x23 = x23[0,1] r3[0,1]
# asm 1: vext.32 <x23=reg128#10%top,<r3=reg128#1%bot,<r3=reg128#1%bot,#0
# asm 2: vext.32 <x23=d19,<r3=d0,<r3=d0,#0
vext.32 d19,d0,d0,#0

# qhasm: 				x4 = x4[0,2,1,3]
# asm 1: vtrn.32 <x4=reg128#3%bot,<x4=reg128#3%top
# asm 2: vtrn.32 <x4=d4,<x4=d5
vtrn.32 d4,d5

# qhasm: mem128[input_0]


DD22C 801EC4BC 8FB6002C */  lw    $s6, 0x2c($sp)
/* 1DD230 801EC4C0 8FB70030 */  lw    $s7, 0x30($sp)
/* 1DD234 801EC4C4 03E00008 */  jr    $r


hIs = -1927895408, ModNam = 'cs3_05_dirttrck_10'},
    {HashIs = -1211171840, ModNam = 'cs3_05_dirttrck_11'},
    {HashIs = -434799483, ModNam = 'cs3_05_dirttrck_11b'},
    {HashIs = -1567305332, ModNam = 'cs3_05_dirttrck_12'},
    {HashIs = -1732395530, ModNam = 'cs3_05_dirttrck_13'},
    {HashIs = -2117627894, ModNam = 'cs3_05_dirttrck_14'},
    {HashIs = 2133369569, ModNam = 'cs3_05_dirttrck_14a'},
    {HashIs = -858019999, ModNam = 'cs3_05_dirttrck_20'},
    {HashIs = -1644492728, ModNam = 'cs3_05_glue_01'},
    {HashIs = -801248051, ModNam = 'cs3_05_glue_02'},
    {HashIs = 1558062874, ModNam = 'cs3_05_land09'},
    {HashIs = -809602829, ModNam = 'cs3_05_pref_prx_hd4'},
    {HashIs = -477186142, ModNam = 'cs3_05_prerefproc_02'},
    {HashIs = -74530911, ModNam = 'cs3_05_prerefproc_04_hd'},
    {HashIs = -1260824008, ModNam = 'cs3_05_prerefproc_05'},
    {HashIs = -2073387381, ModNam = 'cs3_05_prerefproc_05b'},
    {HashIs = -777579565, ModNam = 'cs3_05_prerefproc_07'},
    {HashIs = 1020182735, ModNam = 'cs3_05_prerefprochd_02'},
    {HashIs = -2123418490, ModNam = 'cs3_05_prerefprochd_02d'},
    {HashIs = 1548150482, ModNam = 'cs3_05_prerefprochd_05b'},
    {HashIs = -2077251819, ModNam = 'cs3_05_prerefprox_02a'},
    {HashIs = -1819360281, ModNam = 'cs3_05_prerefprox_03'},
    {HashIs = -984832158, ModNam = 'cs3_05_prerefprox_04'},
    {HashIs = -919822254, ModNam = 'cs3_05_prerefprox_07b'},
    {HashIs = 305483785, ModNam = 'cs3_05_prerefprox4_02'},
    {HashIs = 498399290, ModNam = 'cs3_05_prerefproxhd_02a'},
    {HashIs = 1197400761, ModNam = 'cs3_05_prerefproxhd_03'},
    {HashIs = 1973436219, ModNam = 'cs3_05_prerefproxhd_04'},
    {HashIs = 2116571211, ModNam = 'cs3_05_prerefproxhd_07'},
    {HashIs = -406024788, ModNam = 'cs3_05_prerefprx_02c'},
    {HashIs = -794278725, ModNam = 'cs3_05_prerefprx_09'},
    {HashIs = -691350440, ModNam = 'cs3_05_prerefprx_10'},
    {HashIs = -660149516, ModNam = 'cs3_05_prerefprxhd_02c'},
    {HashIs = -687141854, ModNam = 'cs3_05_prerefprxhd_09'},


  color: currentColor;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  position: relative;
  opacity: 0.4;
  transition: transform 0.2s ease-in, opacity 0.2s ease-in;
}
.q-rating__icon--hovered {
  transform: scale(1.3);
}
.q-rating__icon--active {
  opacity: 1;
}
.q-rating__icon--exselected {
  opacity: 0.7;
}
.q-rating--no-dimming .q-rating__icon {
  opacity: 1;
}
.q-rating--editable .q-rating__icon-container {
  cursor: pointer;
}
.q-responsive {
  position: relative;
  max-width: 100%;
  max-height: 100%;
}
.q-responsive__filler {
  width: inherit;
  max-width: inherit;
  height: inherit;
  max-height: inherit;
}
.q-responsive__content {
  border-radius: inherit;
}
.q-responsive__content > * {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  max-width: 100% !important;
}
.q-scrollarea {
  position: relative;
  contain: strict;
}
.q-scrollarea__bar,
.q-scrollarea__thumb {
  opacity: 0.2;
  transition: opacity 0.3s;
  will-change: opacity;
  cursor: -webkit-grab;
  cursor: grab;
}
.q-scrollarea__bar--v,
.q-scrollarea__thumb--v {
  right: 0;
  width: 10px;
}
.q-scrollarea__bar--h,
.q-scrollarea__thumb--h {
  bottom: 0;
  height: 10px;
}
.q-scrollarea__bar--invisible,
.q-scrollarea__thumb--invisible {
  opacity: 0 !important;
  pointer-events: none;
}
.q-scrollarea__thumb {
  background: #000;
}
.q-scrollarea__thumb:hover {
  opacity: 0.3;
}
.q-scrollarea__thumb:active {
  opacity: 0.5;
}
.q-scrollarea__content {
  min-height: 100%;
  min-width: 100%;
}
.q-scrollarea--dark .q-scrollarea__thumb {
  background: #fff;
}
.q-select--without-input .q-field__control {
  cursor: pointer;
}
.q-select--with-input .q-field__control {
  cursor: text;
}
.q-select .q-field__input {
  min-width: 50px !important;
  cursor: text;
}
.q-select .q-field__input--padding {
  padding-left: 4px;
}
.q-select__autocomplete-input,
.q-select__focus-target {
  position: absolute;
  outline: 0 !important;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
}
.q-select__dropdown-icon {
  cursor: pointer;
  transition: transform 0.28s;
}
.q-select.q-field--readonly .q-field__control,
.q-select.q-field--readonly .q-select__dropdown-icon {
  cursor: default;
}
.q-select__dialog {
  width: 90vw !important;
  max-width: 90vw !important;
  max-height: calc(100vh - 70px) !important;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.q-select__dialog > .scroll {
  position


() override
   {
      mClientPagerMessage.end();
   }

   EncodeStream& encodeBrief(EncodeStream& strm) const override
   {
      return strm << "ClientPagerMessageEndCommand";
   }
private:
   ClientPagerMessage& mClientPagerMessage;
};

void
ClientPagerMessage::endCommand()
{
   mDum.post(new ClientPagerMessageEndCommand(*this));
}

size_t
ClientPagerMessage::msgQueued() const
{
   return  mMsgQueue.size();
}

void
ClientPagerMessage::pageFirstMsgQueued()
{
   resip_assert(mMsgQueue.empty() == false);
   mRequest->header(h_CSeq).sequence()++;
   mRequest->setContents(mMsgQueue.front().contents);
   DumHelper::setOutgoingEncryptionLevel(*mRequest, mMsgQueue.front().encryptionLevel);
   DebugLog(<< "ClientPagerMessage::pageFirstMsgQueued: " << *mRequest);
   mDum.send(mRequest);
}

void
ClientPagerMessage::clearMsgQueued()
{
   MsgQueue::iterator   contents;
   for(contents = mMsgQueue.begin(); contents != mMsgQueue.end(); ++contents)
   {
      Contents* p = contents->contents;
      delete p;
   }
   mMsgQueue.clear();
}

EncodeStream&
ClientPagerMessage::dump(EncodeStream& strm) const
{
   strm << "ClientPagerMessage queued: " << mMsgQueue.size();
   return strm;
}

/* ====================================================================
 * The Vovida Software License, Version 1.0
 *
 * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the

 *    distribution.
 *
 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
 *    and "Vovida Open Communication Application Library (VOCAL)" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written
 *    permission, please contact vocal@vovida.org.
 *
 * 4. Products derived from this software may not be called "VOCAL", nor
 *    may "VOCAL" appear in their name, without prior written
 *    permission of Vovida Networks, Inc.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
 * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by Vovida
 * Networks, Inc. and many individuals on behalf of Vovida Networks,
 * Inc.  For more information on Vovida Networks, Inc., please see
 * <http://www.vovida.org/>.
 *
 */
#if !defined(RESIP_DialogEventHandler_HXX)
#define RESIP_DialogEventHandler_HXX

namespace resip
{

   class InviteDialogs
   {
      public:
	 enum TerminatedReason
	 {
	    Error,
	    Timeout,
	    Replaced,
	    LocalBye,
	    RemoteBye
	 };
	 virtual


/* $XConsortium: LED.h /main/1 1995/11/30 19:20:18 kaleb $ */
/************************************************************
 Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.

 Permission to use, copy, modify, and distribute this
 software and its documentation for any purpose and without
 fee is hereby granted, provided that the above copyright
 notice appear in all copies and that both that copyright
 notice and this permission notice appear in supporting
 documentation, and that the name of Silicon Graphics not be
 used in advertising or publicity pertaining to distribution
 of the software without specific prior written permission.
 Silicon Graphics makes no representation about the suitability
 of this software for any purpose. It is provided "as is"
 without any express or implied warranty.

 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
 THE USE OR PERFORMANCE OF THIS SOFTWARE.

 ********************************************************/
#ifndef _XawLED_h
#define _XawLED_h

#include <X11/Xaw/Simple.h>

/* Resources:

 Name		     Class		RepType		Default Value
 ----		     -----		-------		-------------
 background	     Background		Pixel		XtDefaultBackground
 bevel               Bevel              Dimension       1
 bitmap		     Pixmap		Pixmap		None
 border		     BorderColor	Pixel		XtDefaultForeground
 borderWidth	     BorderWidth	Dimension	1
 bottomColor         BottomColor        Pixel           "White"
 cursor		     Cursor		Cursor		None
 cursorName	     Cursor		String		NULL
 destroyCallback     Callback		XtCallbackList	NULL
 foreground	     Foreground		Pixel		XtDefaultForeground
 height		     Height		Dimension	10
 insensitiveBorder   Insensitive	Pixmap		Gray
 ledWidth            ledWidth           Dimension	6
 ledHeight           ledHeight          Dimension       12
 mappedWhenManaged   MappedWhenManaged	Boolean		True
 offColor	     OffColor		Pixel		#001000
 on		     On			Boolean		False
 onColor	     OnColor		Pixel		Green
 pointerColor	     Foreground		Pixel		XtDefaultForeground
 pointerColorBackground Background	Pixel		XtDefaultBackground
 resize		     Resize		Boolean		False
 sensitive	     Sensitive		Boolean		False
 topColor            TopColor           Pixel           "black"
 width		     Width		Dimension	6
 x		     Position		Position	0
 y		     Position		Position	0

*/

#define	XtNbevel	"bevel"
#define	XtNon		"on"
#define	XtNonColor	"onColor"
#define	XtNoffColor	"offColor"
#define	XtNtopColor	"topColor"
#define	XtNbottomColor	"bottomColor"
#define	XtNledWidth	"ledWidth"
#define	XtNledHeight	"ledHeight"
#define	XtCBevel	"Bevel"
#define	XtCOn		"On"
#define	XtCOnColor	"OnColor"
#define	XtCOffColor	"OffColor"
#define	XtCTopColor	"TopColor"
#define	XtCBottomColor	"BottomColor"
#define	XtCLedWidth	"LedWidth"
#define	XtCLedHeight	"LedHeight"

#ifndef _XtStringDefs_h_
#define XtNbitmap "bitmap"
#define XtNforeground "foreground"
#define XtNresize "resize"
#define XtCResize "Resize"
#define XtCBitmap "Bitmap"
#endif

/* Class record constants */

extern WidgetClass ledWidgetClass;

typedef struct _LEDClassRec *LEDWidgetClass;
typedef struct _LEDRec      *LEDWidget;

#endif /* _XawLED_h */


 rat", "", 3, 4, 2, 2, true, sprites, 0, 0, 0, 0, 115, 45, 7, 7, 10, i++));
		sprites = new int[]{0, 1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1};
		npcs.add(new NPCDef("Romeo", "He looks mildly confused", "", 20, 60, 60, 40, false, sprites, 16761440, 255, 8409120, 15523536, 125, 220, 6, 6, 5, i++));
		sprites = new int[]{3, 4, 2, -1, -1, -1, -1, 89, -1, -1, -1, -1};
		npcs.add(new NPCDef("Juliet", "She looks a little stressed", "", 2, 4, 3, 2, false, sprites, 15645552, 16036851, 16036851, 15523536, 125, 225, 6, 6, 5, i++));
		sprites = new int[]{0, 1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1};
		npcs.add(new NPCDef("Father Lawrence", "A kindly looking priest", "", 0, 0, 3, 0, false, sprites, 11167296, 2105376, 3, 15523536, 145, 220, 6, 6, 5, i++));
		sprites = new int[]{0, 1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1};
		npcs.add(new NPCDef("Apothecary", "I wonder if he has any good potions", "", 10, 5, 7, 5, false, sprites, 11167296, 8409120, 8409120, 15523536, 145, 220, 6, 6, 5, i++));
		sprites = new int[]{125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
		npcs.add(new NPCDef("spider", "Incey wincey", "", 5, 2, 2, 1, true, sprites, 0, 0, 0, 0, 40, 35, 6, 6, 5, i++));
		sprites = new int[]{124, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
		npcs.add(new NPCDef("Delrith", "A freshly summoned demon", "", 42, 35, 7, 37, true, sprites, 0, 0, 0, 0, 275, 262, 11, 11, 30, i++));
		sprites = new int[]{3, 4, 2, -1, -1, -1, -1, 88, -1, -1, -1, -1};
		npcs.add(new NPCDef("Veronica", "She doesn't look too happy", "", 1, 1, 5, 1, false, sprites, 15643488, 255, 3, 15523536, 140, 220, 6, 6, 5, i++));
		sprites = new int[]{0, 1, 2, -1, 48, -1, -1, -1, -1, -1, -1, -1};
		npcs.add(new NPCDef("Weaponsmaster", "The phoenix gang quartermaster", "", 35, 20, 20, 28, true, sprites, 1, 16711680, 3, 15523536, 145, 220, 6, 6, 5, i++));
		sprites = new int[]{7, 1, 2, -1, -1, -1, -1, -1, -1, -1, 10, -1};
		npcs.add(new NPCDef("Professor Oddenstein", "A mad scientist if I ever saw one", "", 3, 3, 7, 3, false, sprites, 16777215, 16777215, 16777215, 15523536, 145, 220, 6, 6, 5, i++


 or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @bug 4462714
 * @summary using of synthetic names in local class causes ClassFormatError
 * @author gafter
 *
 * @compile/fail SynthName2.java
 */

import java.io.PrintStream;

class SynthName1 {
    public static void main(String args[]) {
        run(args, System.out);
    }
    public static void run(String args[],PrintStream out) {
        int  res1, res2;
        Intf ob = meth(1, 2);

        res1 = ob.getFirst();
        res2 = ob.getSecond();

        if ( res1 == 1 && res2 == 2 )
            return;
        out.println("Failed:  res1=" + res1 + ", res2=" + res2);
        throw new Error("test failed!");
    }
    interface Intf {
        int getFirst();
        int getSecond();
    }
    static Intf meth(final int prm1, final int zzz) {
        class InnClass implements Intf {
            int val$prm1 = prm1;
            int val$zzz  = zzz;
            int locVar;
            public int getFirst() {
                locVar = val$prm1;
                return prm1;
            }
            public int getSecond() {
                return zzz;
            }
        }
        return new InnClass();
    }
}
/*
 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

/*
 * @test
 * @bug 4884387
 * @summary Use ldc instruction for class literals
 * @author gafter
 *
 * @compile -source 1.5 -target 1.5 ClassLit.java
 * @run main ClassLit
 */

public class ClassLit {
    public static void main(String[] args) {
        ClassLit t = new ClassLit();
        if (t.getClass() != ClassLit.class) throw new Error();
        int[] a = new int[2];
        if (a.getClass() != int[].class) throw new Error();
        if (int.class != Integer.TYPE) throw new Error();
    }
}
/*
 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be us


 $brand-orange-dark !important;
    color: #FFF !important;
}
.badge-blue{
    background-color: $brand-blue !important;
    color: #FFF !important;
}
.badge-green{
    background-color: $brand-green !important;
    color: #FFF !important;
}
.badge-xs{
    font-size: 70%;
    padding: 3px 6px;
}/*Author      : @arboshiki*/
.lobi-rating{
    margin-bottom: 5px;
    line-height: $lobi-rating-label-line-height;
    input{
        position: absolute;
        left: -9999px;
    }
    label{
        position: relative;
        float: right;
        margin-right: 2px;
        margin-bottom: 0;
        color: $lobi-rating-color;
        font-size: $lobi-rating-label-font-size;
        @include transition(color $transition-duration);
        &:hover{
            cursor: pointer;
        }
    }
    fieldset[disabled] &,
    &[disabled]{
        cursor: not-allowed;
        color: darken($lobi-rating-disabled-color, 15%);
        label{
            color: $lobi-rating-disabled-color;
            &:hover{
                &, & ~ label{
                    cursor: not-allowed;
                    color: $lobi-rating-disabled-color;
                }
            }
        }
    }
    @include lobi-rating-variant($lobi-rating-checked-color, $lobi-rating-checked-disabled-color);
    @include clearfix();
}

.lobi-rating-xs{
    font-size: $lobi-rating-xs-font-size;
    line-height: $lobi-rating-xs-line-height;
    label{
        font-size: $lobi-rating-xs-label-font-size;
    }
}

.lobi-rating-sm{
    font-size: $lobi-rating-sm-font-size;
    line-height: $lobi-rating-sm-line-height;
    label{
        font-size: $lobi-rating-sm-label-font-size;
    }
}

.lobi-rating-lg{
    font-size: $lobi-rating-lg-font-size;
    line-height: $lobi-rating-lg-line-height;
    label{
        font-size: $lobi-rating-lg-label-font-size;
    }
}
.lobi-rating-xl{
    font-size: $lobi-rating-xl-font-size;
    line-height: $lobi-rating-xl-line-height;
    label{
        font-size: $lobi-rating-xl-label-font-size;
    }
}

.lobi-rating-info{
    @include lobi-rating-variant($lobi-rating-info-color, $lobi-rating-info-disabled-color);
}
.lobi-rating-success{
    @include lobi-rating-variant($lobi-rating-success-color, $lobi-rating-success-disabled-color);
}
.lobi-rating-warning{
    @include lobi-rating-variant($lobi-rating-warning-color, $lobi-rating-warning-disabled-color);
}
.lobi-rating-danger{
    @include lobi-rating-variant($lobi-rating-danger-color, $lobi-rating-danger-disabled-color);
}
.lobi-rating-inverse{
    @include lobi-rating-variant($lobi-rating-inverse-color, $lobi-rating-inverse-disabled-color);
}
/*
    Author      : @arboshiki
*/
//------------------------------------------------------------------------------
//----------------------------BUTTON GROUPS VERTICAL----------------------------
//------------------------------------------------------------------------------
.btn-group-vertical > .btn {
    &:first-child:not(:last-child) {
        border-top-right-radius: $btn-border-radius !important;
        border


corrupted or missing fields.";
				default: return "Encountered an unknown error. Most likely this is a new error that hasn't been included in SharpFont yet. Error:" + (int)err;
			}
		}
	}
}


= (function() {
    var clearIfNecessary = function(event) {
      var element = this;
      setTimeout(function() {
        var innerHTML = element.innerHTML.toLowerCase();
        if (innerHTML == "

" ||
            innerHTML == "

") {
          element.innerHTML = "";
        }
      }, 0);
    };

    return function(composer) {
      dom.observe(composer.element, ["cut", "keydown"], clearIfNecessary);
    };
  })();

  /**
   * In Opera when the caret is in the first and only item of a list (

|

) and the list is the first child of the contentEditable element, it's impossible to delete the list by hitting backspace
   *
   * @param {Object} contentEditableElement The contentEditable element to observe for clearing events
   * @exaple
   *    wysihtml5.quirks.ensureProperClearing(myContentEditableElement);
   */
  wysihtml5.quirks.ensureProperClearingOfLists = (function() {
    var ELEMENTS_THAT_CONTAIN_LI = ["OL", "UL", "MENU"];

    var clearIfNecessary = function(element, contentEditableElement) {
      if (!contentEditableElement.firstChild || !wysihtml5.lang.array(ELEMENTS_THAT_CONTAIN_LI).contains(contentEditableElement.firstChild.nodeName)) {
        return;
      }

      var list = dom.getParentElement(element, { nodeName: ELEMENTS_THAT_CONTAIN_LI });
      if (!list) {
        return;
      }

      var listIsFirstChildOfContentEditable = list == contentEditableElement.firstChild;
      if (!listIsFirstChildOfContentEditable) {
        return;
      }

      var hasOnlyOneListItem = list.childNodes.length <= 1;
      if (!hasOnlyOneListItem) {
        return;
      }

      var onlyListItemIsEmpty = list.firstChild ? list.firstChild.innerHTML === "" : true;
      if (!onlyListItemIsEmpty) {
        return;
      }

      list.parentNode.removeChild(list);
    };

    return function(composer) {
      dom.observe(composer.element, "keydown", function(event) {
        if (event.keyCode !== wysihtml5.BACKSPACE_KEY) {
          return;
        }

        var element = composer.selection.getSelectedNode();
        clearIfNecessary(element, composer.element);
      });
    };
  })();

})(wysihtml5);
// See https://bugzilla.mozilla.org/show_bug.cgi?id=664398
//
// In Firefox this:
//      var d = document.createElement("div");
//      d.innerHTML ='';
//      d.innerHTML;
// will result in:
//
// which is wrong
(function(wysihtml5) {
  var TILDE_ESCAPED = "%7E";
  wysihtml5.quirks.getCorrectInnerHTML = function(element) {
    var innerHTML = element.innerHTML;
    if (innerHTML.indexOf(TILDE_ESCAPED) === -1) {
      return innerHTML;
    }

    var elementsWithTilde = element.querySelectorAll("[href*='~'], [src*='~']"),
        url,
        urlToSearch,
        length,
        i;
    for (i=0, length=elementsWithTilde.length; i<length; i++) {
      url         = elementsWithTilde[i].href || elementsWithTilde[i].src;
      urlToSearch = wysihtml5.lang.string(url).replace("~").by(TILDE_ESCAPED);
      innerHTML   = wysihtml5.lang.string(innerHTML).replace(urlToSearch).by(url);
    }
    return innerHTML;
  };
})(wysihtml5);/**
 * Some browsers don't insert line breaks when hitting return in a content


Rust算法实现：流程、模型与形式化分析](#rust算法实现流程模型与形式化分析)
  - [目录](#目录)
  - [1. 引言：算法、流程与Rust特性](#1-引言算法流程与rust特性)
  - [2. 流程视角下的算法实现](#2-流程视角下的算法实现)
    - [2.1 控制流 (Control Flow)](#21-控制流-control-flow)
      - [定义与形式化](#定义与形式化)
      - [Rust实现：结构化控制与迭代器](#rust实现结构化控制与迭代器)
      - [代码示例与原理](#代码示例与原理)
    - [2.2 数据流 (Data Flow)](#22-数据流-data-flow)
      - [2.2.1 定义与形式化](#221-定义与形式化)
      - [Rust实现：所有权、借用与函数式模式](#rust实现所有权借用与函数式模式)
      - [2.2.2 代码示例与原理](#222-代码示例与原理)
    - [2.3 执行流 (Execution Flow)](#23-执行流-execution-flow)
      - [2.3.1 定义与形式化](#231-定义与形式化)
      - [Rust实现：从`main`到任务完成](#rust实现从main到任务完成)
    - [2.4 工作流 (Workflow - 作为高层组合)](#24-工作流-workflow---作为高层组合)
      - [2.4.1 定义与形式化](#241-定义与形式化)
      - [Rust实现：函数组合与状态机](#rust实现函数组合与状态机)
  - [3. 执行模型视角下的算法实现](#3-执行模型视角下的算法实现)
    - [3.1 同步执行 (Synchronous Execution)](#31-同步执行-synchronous-execution)
      - [3.1.1 定义与形式化](#311-定义与形式化)
      - [3.1.2 Rust实现：默认模型与阻塞操作](#312-rust实现默认模型与阻塞操作)
      - [3.1.3 代码示例与原理](#313-代码示例与原理)
    - [3.2 并发执行 (Concurrent Execution)](#32-并发执行-concurrent-execution)
      - [3.2.1 定义与形式化](#321-定义与形式化)
      - [3.2.2 Rust实现：线程、通道与共享状态](#322-rust实现线程通道与共享状态)
      - [3.2.3 形式化保证：`Send`/`Sync`与数据竞争避免](#323-形式化保证sendsync与数据竞争避免)
      - [3.2.4 代码示例与原理](#324-代码示例与原理)
    - [3.3


c = ScaleTo::create(0.5f, active ? 0.6f : 1.f);
	auto bounce = EaseBounceOut::create(ac);
	this->runAction(bounce);
}

void PlayerObject::pushButton()
{
	if (this->inPlayLayer)
	{
		m_bIsHolding = true;
		_hasJustHeld = true;
		_queuedHold = true;
	}
	if((_currentGamemode == PlayerGamemode::PlayerGamemodeCube || _currentGamemode == PlayerGamemode::PlayerGamemodeRobot) && m_bOnGround) _jumpedTimes++;
}

void PlayerObject::releaseButton()
{
	if (this->inPlayLayer)
	{
		_queuedHold = false;
		_hasJustHeld = false;
		m_bIsHolding = false;
	}
}

PlayerObject* PlayerObject::create(int playerFrame, Layer* gameLayer)
{
	auto pRet = new (std::nothrow) PlayerObject();

	if (pRet && pRet->init(playerFrame, gameLayer))
	{
		pRet->autorelease();
		return pRet;
	}
	AX_SAFE_DELETE(pRet);
	return pRet;
}#include <stdlib.h>
#include "filterresult.h"
#include "stats.h"
#include "htmlreporter.h"
#include <memory.h>

#define MAX_ADAPTER_REC 20000
#define LOW_COMPLEXITY_SKIP 5000

FilterResult::FilterResult(Options* opt, bool paired){
    mOptions = opt;
    mPaired = paired;
    mTrimmedAdapterRead = 0;
    mTrimmedAdapterBases = 0;
    mMergedPairs = 0;
    for(int i=0; i<FILTER_RESULT_TYPES; i++) {
        mFilterReadStats[i] = 0;
    }
    mCorrectionMatrix = new long[64];
    memset(mCorrectionMatrix, 0, sizeof(long)*64);
    mCorrectedReads = 0;
}

FilterResult::~FilterResult() {
    delete mCorrectionMatrix;
}

void FilterResult::addFilterResult(int result, int readNum) {
    if(result < PASS_FILTER || result >= FILTER_RESULT_TYPES)
        return ;
    mFilterReadStats[result] += readNum;
}

void FilterResult::addMergedPairs(int pairs) {
    mMergedPairs += pairs;
}

FilterResult* FilterResult::merge(vector<FilterResult*>& list) {
    if(list.size() == 0)
        return NULL;
    FilterResult* result = new FilterResult(list[0]->mOptions, list[0]->mPaired);

    long* target = result->getFilterReadStats();
    // read stats
    for(int i=0; i<list.size(); i++) {
        long* current = list[i]->getFilterReadStats();
        for(int j=0; j<FILTER_RESULT_TYPES; j++) {
            target[j] += current[j];
        }
        result->mTrimmedAdapterRead += list[i]->mTrimmedAdapterRead;
        result->mTrimmedAdapterBases += list[i]->mTrimmedAdapterBases;
        result->mMergedPairs += list[i]->mMergedPairs;

        for(int b=0; b<4; b++) {
          result->mTrimmedPolyXReads[b] += list[i]->mTrimmedPolyXReads[b];
          result->mTrimmedPolyXBases[b] += list[i]->mTrimmedPolyXBases[b];
        }

        // merge adapter stats
        map<string, long>::iterator iter;
        for(iter = list[i]->mAdapter1.begin(); iter != list[i]->mAdapter1.end(); iter++) {


using System.Diagnostics;
using System.Windows.Forms;
using SuchByte.MacroDeck.Device;
using SuchByte.MacroDeck.Folders;
using SuchByte.MacroDeck.GUI.CustomControls;
using SuchByte.MacroDeck.Language;
using SuchByte.MacroDeck.Profiles;
using MessageBox = SuchByte.MacroDeck.GUI.CustomControls.MessageBox;

namespace SuchByte.MacroDeck.GUI;

public partial class AddFolder : DialogForm
{
    MacroDeckFolder ParentFolder;
    MacroDeckFolder Folder;

    public AddFolder(MacroDeckFolder parentFolder)
    {
        ParentFolder = parentFolder;
        InitializeComponent();
        UpdateTranslation();
        btnCreateFolder.Text = LanguageManager.Strings.Create;
    }

    public AddFolder(MacroDeckFolder folder, bool rename)
    {
        Folder = folder;
        InitializeComponent();
        UpdateTranslation();
        btnCreateFolder.Text = LanguageManager.Strings.Save;
        folderName.Enabled = !folder.IsRootFolder;
    }

    private void UpdateTranslation()
    {
        lblFolderName.Text = LanguageManager.Strings.FolderName;
        lblApplication.Text = LanguageManager.Strings.Application;
        lblDevices.Text = LanguageManager.Strings.Devices;
        groupAutomaticallySwitchFolder.Text = LanguageManager.Strings.AutomaticallySwitchToFolder;
        radioNever.Text = LanguageManager.Strings.Never;
        radioOnFocus.Text = LanguageManager.Strings.OnApplicationFocus;
    }

    private void BtnCreateFolder_Click(object sender, EventArgs e)
    {
        if (folderName.Text.Length < 1) return;

        if (Folder == null)
        {
            if (ProfileManager.CurrentProfile.Folders.Find(x => x.DisplayName.Equals(folderName.Text, StringComparison.OrdinalIgnoreCase)) != null)
            {
                using var msgBox = new MessageBox();
                msgBox.ShowDialog(LanguageManager.Strings.CantCreateFolder, string.Format(LanguageManager.Strings.FolderCalledXAlreadyExists, folderName.Text), MessageBoxButtons.OK);
                msgBox.Dispose();
                return;
            }

            if (ParentFolder == null || !ProfileManager.CurrentProfile.Folders.Contains(ParentFolder))
            {
                ParentFolder = ProfileManager.CurrentProfile.Folders[0];
            }

            Folder = ProfileManager.CreateFolder(folderName.Text, ParentFolder, ProfileManager.CurrentProfile);
        }
        else
        {
            if (ProfileManager.CurrentProfile.Folders.Find(x => x.DisplayName.Equals(folderName.Text, StringComparison.OrdinalIgnoreCase)) != null && ProfileManager.CurrentProfile.Folders.Find(x => x.DisplayName.Equals(folderName.Text, StringComparison.OrdinalIgnoreCase)) != Folder)
            {
                using var msgBox = new MessageBox();
                msgBox.ShowDialog(LanguageManager.Strings.CantCreateFolder, string.Format(LanguageManager.Strings.FolderCalledXAlreadyExists, folderName.Text), MessageBoxButtons.OK);
                msgBox.Dispose();
                return;
            }
        }

        Folder.DisplayName = folderName.Text;
        Folder.ApplicationToTrigger = appli


/Sources/Entities/ArmorItem.es"
m_iSoundComponent  = SOUND_SHARD ;
#line 157 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
break ;
#line 158 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
case ARIT_SMALL :
#line 159 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
ForceCollisionBoxIndexChange  (ITEMHOLDER_COLLISION_BOX_MEDIUM );
#line 160 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
m_fValue  = 25.0f;
#line 161 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
m_bOverTopArmor  = FALSE ;
#line 162 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
m_fRespawnTime  = 10.0f;
#line 163 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
m_strDescription  . PrintF  ("Small - H:%g  T:%g" , m_fValue  , m_fRespawnTime );
#line 165 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
AddItem  (MODEL_25  , TEXTURE_25  , TEX_REFL_LIGHTMETAL01  , TEX_SPEC_MEDIUM  , 0);
#line 166 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
AddFlare  (MODEL_FLARE  , TEXTURE_FLARE  , FLOAT3D (0 , 0.6f , 0) , FLOAT3D (2 , 2 , 0.5f));
#line 167 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
StretchItem  (FLOAT3D (2.0f , 2.0f , 2.0f));
#line 168 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
m_iSoundComponent  = SOUND_SMALL ;
#line 169 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
break ;
#line 170 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
case ARIT_MEDIUM : {
#line 171 "/data/data/com.termux/files/home/doom3/SeriousSamClassic-1.10.7/SamTFE/Sources/Entities/ArmorItem.es"
ForceCollisionBoxIndexChange  (ITEMHOLDER_COLLISION_BOX_MEDIUM );


"""
Classifies: CHEBI:26004 phenylpropanoid
"""
from rdkit import Chem

def is_phenylpropanoid(smiles: str):
    """
    Determines if a molecule is a phenylpropanoid based on its SMILES string.
    Phenylpropanoids are organic aromatic compounds with a phenylpropane-derived skeleton.

    Args:
        smiles (str): SMILES string of the molecule

    Returns:
        bool: True if molecule is a phenylpropanoid, False otherwise
        str: Reason for classification
    """

    # Parse SMILES
    mol = Chem.MolFromSmiles(smiles)
    if mol is None:
        return False, "Invalid SMILES string"

    # Create SMARTS patterns that represent common features in phenylpropanoids
    phenylpropanoid_pattern1 = Chem.MolFromSmarts("c1ccccc1CC")  # Example: simple phenylpropane
    flavonoid_pattern = Chem.MolFromSmarts("c1c(=O)oc2ccccc2c1") # Example: flavone
    coumarin_pattern = Chem.MolFromSmarts("c1ccc2oc1ccc2=O")  # Example: coumarin

    # Check for phenylpropanoid-like patterns
    if mol.HasSubstructMatch(phenylpropanoid_pattern1):
        return True, "Contains phenylpropane skeleton"
    if mol.HasSubstructMatch(flavonoid_pattern):
        return True, "Contains flavone-like structure"
    if mol.HasSubstructMatch(coumarin_pattern):
        return True, "Contains coumarin-like structure"

    # Additional logic for derivatives or structurally similar compounds,
    # which can improve hit rate over simply phenylpropane and can include
    # naturally occurring substituents, fused aromatic systems, etc.

    return False, "Does not match phenylpropanoid structure"